Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] can't use the CGAL::sqrt() ?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] can't use the CGAL::sqrt() ?


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Subject: Re: [cgal-discuss] can't use the CGAL::sqrt() ?
  • Date: Sun, 27 Oct 2013 14:05:58 +0100 (CET)

On Sun, 27 Oct 2013, Samaras wrote:

I want to compute the norm() of point in D dimension. I am extending the
point_d class.
I use these typedefs:
#include <CGAL/Cartesian_d.h>
#include <CGAL/Gmpq.h>

typedef CGAL::Gmpq NT;
[...]
What is the newbie missing?

That it doesn't make sense to compute the square root of an exact rational number, because the exact rational type won't be able to represent the result? If you only want something approximate, feel free to convert to double and then compute the square root of that.

--
Marc Glisse



Archive powered by MHonArc 2.6.18.

Top of Page