Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Apollonius graph -- how to assign additional information to sites?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Apollonius graph -- how to assign additional information to sites?


Chronological Thread 
  • From: Stefan Salewski <>
  • To:
  • Subject: Re: [cgal-discuss] Apollonius graph -- how to assign additional information to sites?
  • Date: Sun, 06 Oct 2013 21:11:04 +0200

On Sun, 2013-10-06 at 17:11 +0200, Stefan Salewski wrote:
> I guess it may be
> problematic due to rounding -- I may use two doubles to create a site
> and as keys of my hash entry, but may get back a rounded double value
> due to CGAL's intern exact arithmetic?

Or in other words:

double x = 3.14; // double constant
p = Point(x, x);
s = Site(p, 2);
h = ag.insert(s);
Point pp = h->site().point();
double xx = CGAL::to_double(pp.x());
assert(xx != x);

I think the assert() is never executed, because CGAL::to_double() always
returns the exact initial value?

I still wonder how serious arithmetic errors are for apollonius graphs?
May I get small errors when I would use plain double data type, or may
the whole graph generation fail?

Best regards,

Stefan Salewski





Archive powered by MHonArc 2.6.18.

Top of Page