Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] point lying over a line problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] point lying over a line problem


Chronological Thread 
  • From: Alejandro Aragon <>
  • To:
  • Subject: Re: [cgal-discuss] point lying over a line problem
  • Date: Wed, 23 Jul 2008 11:38:21 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=lAgS5umqKM9gAUaNKe7XxR6aizqypBPQWFbVrMH3cCo4nLguzYiQGRejrtZXMDbxz/ 9vfzapR+yvUY7UaFpczcVEFv93AM6e15+LHOvpoCuYUWguFYWp52sFLnCkUT8zsOJ1NY HGKezNJNnPxS8IjZY2VCHr/AX1aMVWUPO0mCo=

I see your point but as soon as you start using double precision, the "mathematical sense" is out of question, right? So that a < b is not true if they are within tolerance. Also, what is the chance that your algorithms encounter something like what you described, where in "mathematical sense" a < b < c and then you think CGAL has a bug because it's not giving you the answer you expect? Instead, if you use a type that is not exact, you would expect algorithms to behave with the same degree of "exactness". I guess that is what users would expect, at least that is what I expect. If they want a more exact predicate, then use an "exact" type.

Alejandro M. Aragón

On Jul 23, 2008, at 11:25 AM, Andreas Fabri wrote:


tolerant algorithms are difficult to implement correctly.
Imagine you do 1D geometry, and decide that points (numbers)
are equal if they only differ on the 15th digit.

Imagine a < b < c in the mathematical sense, and positioned
in a way that a ~ b and b ~ c, but a !~ c then your algorithms
on top of the equality test of points must be written with
the assumption that your equality test is not transitive.


andreas

Alejandro Aragon wrote:
Thanks for replying, I actually read the FAQ before posting my message and I understand that the double type is inexact. However, I don't see why the need of using an "exact" number type when algorithms can be modified such that they give exact results within tolerance. If a double precision type is exact up to the 15th digit, then algorithms should take that into account so when I try to intersect that point with the line, the point is supposed to lie over the line within let's say tol = 10e-14.
Why would I use an exact number type? I don't want to do that, it will slow down a program that I'm actually trying to speed up by doing some profiling.
Alejandro M. Aragón
On Jul 23, 2008, at 10:42 AM, Olivier Devillers wrote:
Alejandro Aragon a écrit :
typedef CGAL::Cartesian<double> KernelType;

If you compute with double, rounding errors make your points non collinear
(e.g. during the decimal to binary conversion if your input is given by
floating point number in decimal notation)

http://www.cgal.org/FAQ.html#inexact_NT
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page