Open Crzyrndm opened 6 years ago
Also, the Approx class in the Catch2 test framework
i recommend reading on the UNUM ( universal number ) to understand the error with the use of IEEE Standard for Floating-Point Arithmetic (IEEE 754)
This is excellent reading, and has code to match that you can copy paste if you don't want to suck in the whole boost library (copy from header)
https://www.boost.org/doc/libs/1_67_0/libs/math/doc/html/math_toolkit/float_comparison.html
On Sun., 22 Jul. 2018, 1:59 pm sukoi26, notifications@github.com wrote:
i recommend reading on the UNUM ( universal number ) to understand the error with the use of IEEE Standard for Floating-Point Arithmetic (IEEE 754)
https://en.wikipedia.org/wiki/Unum_(number_format)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tfussell/xlnt/issues/318#issuecomment-406843298, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkgSyTQd2aqYkB7CxAQdda21JWRJ-VNks5uJBTHgaJpZM4VZZvp .
GCC and Clang have -Wfloat-equal that warns on the use of float/double::operator==, and for good reason (MSVC doesn't appear to have a similar warning).
Some references on float equality, why it should be enabled, and how to make the comparison in a less error prone manner