3 ms·
"and on my hardware it caused the splitValue to be equal to point2" The fix is the right one, but in C/C++, hardware is not what dictates rounding mode, the la
by Someone 10y ago
"and on my hardware it caused the splitValue to be equal to point2"
The fix is the right one, but in C/C++, hardware is not what dictates rounding mode, the language implementation does, and that can be changed at runtime (http://www.cplusplus.com/reference/cfenv/fesetround/ http://www.cplusplus.com/reference/cfenv/fesetround/)
I think C/C++ default to 'round to nearest', with ties doing 'round to even'. Gnu libc certainly does (http://www.gnu.org/software/libc/manual/html_node/Rounding.html http://www.gnu.org/software/libc/manual/html_node/Rounding.h...)