Re:High Performance Correctly Rounded Math Libraries for 32-...
by thxg on Friday August 27, 2021 @03:28AM
(#28325240)
Code using "long double" on x86_64 will compile to x87 instructions (at least with GCC on Linux).
This can be triggered unintentionally. For example, string-to-double conversions in Boost use long doubles.
(I have been bitten by that when using valgrind: Valgrind emulates x87 80-bit registers using 64-bit doubles. As a result, some Boost-using code will have a different behavior under valgrind.)
Re:High Performance Correctly Rounded Math Libraries for 32-...
by ant6n on Thursday August 26, 2021 @08:16PM
(#28322739)
That seems like a fault of the language/compiler, not the 80but float. There are operations for storing the 80bit float in full precision, and I think Pascal even used real=80bit.
even today it's still possible to end up with things in the x87 registers, I don't know of a compiler toggle to entirely and unequivocally disable it.