Fboemer/fix eval poly
-
Fixes #172 (closed)
-
With
WITH_NATIVEOPT=ON
, clang and gcc had slightly different behavior foruint64_t scConstant = static_cast<uint64_t>(constant * scFactor + 0.5);
For
scFactor 3.43597e+10
constant -0.75
gcc would return scConstant = 18446744047939747841
, whereas clang would return 18446744073709551615
.
Regardless, these are both the result of static_cast<uint64_t>
on a negative double, which should be avoided.
Edited by Fabian Boemer