← Back to team overview

yade-dev team mailing list archive

Mathr::ZERO_TOLERANCE vs Mathr::EPSILON

 

Hello,

Out of curiosity, why do we have both Mathr::ZERO_TOLERANCE and Mathr::EPSILON in the code [*] ?

I would understand they're both intended to give an expected magnitude of rounding errors. (Note that ZERO_TOLERANCE is hardcoded as 1e-20, while EPSILON is ~ 2e-16 here)

Both are used throughout the code (EPSILON more often ?)


Thanks,

Jérôme



[*] https://github.com/yade/trunk/blob/3269232e4982c1aa527581a200a0224555b09a1e/lib/base/Math.cpp

------
Chargé de Recherche / Research Associate
Irstea, RECOVER
3275 route de Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
+33 (0)4 42 66 99 21



Follow ups