## [Inkscape-devel] Big epsilon in 2geom/coord.h

 [Inkscape-devel] Big epsilon in 2geom/coord.h From: Markus Engel - 2013-10-22 00:06:09 Attachments: Message as HTML ```Hi, in 2geom/coord.h there is an epsilon defined as 1e-5. This is used in many ways, e. g. in Geom::are_near, . Now I'm wondering why this value is that big. This causes at least one problem, see the last two comments here: https://bugs.launchpad.net/inkscape/+bug/1231990 Is there any reason why "1e-18" has been commented out? Regards, Markus ```

 [Inkscape-devel] Big epsilon in 2geom/coord.h From: Markus Engel - 2013-10-22 00:06:09 Attachments: Message as HTML ```Hi, in 2geom/coord.h there is an epsilon defined as 1e-5. This is used in many ways, e. g. in Geom::are_near, . Now I'm wondering why this value is that big. This causes at least one problem, see the last two comments here: https://bugs.launchpad.net/inkscape/+bug/1231990 Is there any reason why "1e-18" has been commented out? Regards, Markus ```
 Re: [Inkscape-devel] Big epsilon in 2geom/coord.h From: mathog - 2013-10-22 16:17:44 ```On 21-Oct-2013 17:06, Markus Engel wrote: > Hi, > > in 2geom/coord.h there is an epsilon defined as 1e-5. This is used in > many > ways, e. g. in Geom::are_near, . > > Now I'm wondering why this value is that big. Probably related to the precision limit of a small series of 32 bit float operations being around 1e-6. 2geom may use all doubles (I did not look), but probably there are applications that pass it 32 bit floats that are promoted to doubles, which does not provide more precision than the original value. For a little measure of safety to handle precision loss in longish calculations they probably went up to 1e-5. > Is there any reason why "1e-18" has been commented out? Way too much precision for 32 bit float, would be my guess. I ran into this issue a couple of decades ago in a simple problem: given an arbitrarily oriented unit vector and a radius A is which side of a plane defined by a point and another unit vector does A*vector lie? All of the values were regular float, not double. By the time all the math was done the final comparison was fuzzy to around 1e-6. Regards, David Mathog mathog@... Manager, Sequence Analysis Facility, Biology Division, Caltech ```