[vtkusers] TriangleArea() return the not correct value.

David Cole dlrdave at aol.com
Wed Sep 3 08:43:31 EDT 2014


> Error of up to 0.0000000000000001 is acceptable in my program.

Good luck with getting to the 1e-16 level for acceptable error.
DBL_EPSILON is typically ~2.2e-16, and it is super easy, depending on
how many calculations you need to do, to have accumulated calculation
errors reach the 1e-15 to 1e-14 levels... even when you're doing
double-precision math everywhere.

http://stackoverflow.com/questions/1566198/how-to-portably-get-dbl-epsilon-in-c-c
http://en.wikipedia.org/wiki/Loss_of_significance

You have to be really careful with your code if you want/need to keep
all your error levels close to DBL_EPSILON.

Good luck,
David C.



More information about the vtkusers mailing list