Subject: CGAL users discussion list
List archive
- From: Alejandro Aragon <>
- To:
- Subject: Re: [cgal-discuss] point lying over a line problem
- Date: Wed, 23 Jul 2008 16:00:12 -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:x-priority:date :references:x-mailer; b=IcJ9PmW2+JttHbJN7cg/jOpHDAeaTcUCPBoTD9yQDq4tUH4a8uVUIEfVDGDoH+KJyF +7c12AP9l0WZEza4m91yZ9EPPai8/FrAY4fkFKokAqp/k29GcVIYQaNxz3WuPifGa03v 4xZfcW9yR8p1YEV/95DveIOQEaSd+zJJsFf04=
Well, that is subjective because for me 20 is honestly way beyond, so it doesn't make sense to set the precision of cout to 20 for doubles. Anyways, do you know by chance in which file I can find the code that computes the oriented side? I'm using Eclipse and you may know that the indexer is broken when you work with large projects.
Thanks again for replying,
Alejandro M. Aragón
On Jul 23, 2008, at 3:36 PM, Fernando Cacciola wrote:
Alejandro Aragon wrote:
Oh, and for your information, the precision(20) that you suggested is
stupid because you're way beyond the precision for that type
numeric_limits<double>::digits10 is 15 in a typical implementation, so I wouldn't say 20 is way beyond that.
Also, according to this paper:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2005.pdf
17 would be a reasonable precision for outputing double values in decimal format
, so you're basically outputting garbage.What makes you think that using more decimal digits than minimally required results in garbage??
Try this for yourself:
double d = ( 1.0 / 3.0 ) + numeric_limits<double>::epsilon() ;
cout.precision(numeric_limits<double>::digits10); cout << d << endl ;
cout.precision(20); cout << d << endl ;
cout.precision(40); cout << d << endl ;
cout.precision(200); cout << d << endl ;
Finally: did you understand that your point IS NOT really on the line because the actual coordinates are not exactly the same as the decimal literals you used to initialized them?
Best
Fernando Cacciola
www.geometryfactory.com
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- Re: [cgal-discuss] point lying over a line problem, (continued)
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Fernando Cacciola, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Camille Wormser, 07/23/2008
- RE: [cgal-discuss] point lying over a line problem, Xiaofan Li, 07/24/2008
- Re: [cgal-discuss] point lying over a line problem, Alejandro Aragon, 07/23/2008
- Re: [cgal-discuss] point lying over a line problem, Sylvain Pion, 07/23/2008
Archive powered by MHonArc 2.6.16.