3 ms·
When doing floating point arithmetic on the x86 though, it can extend to `80 - 1 (sign) - 15 (exponent) = 64` bits. So if the result of a floating point just so
by syockit 7y ago
When doing floating point arithmetic on the x86 though, it can extend to `80 - 1 (sign) - 15 (exponent) = 64` bits. So if the result of a floating point just so happens to have zero exponent, the mantissa can fit just right in a long int.
- stephencanon 7y agoThis hasn't been dependably true on x86 for almost two decades. SSE2 does double-precision computation at native width, not in the extended 80-bit format. Some 32b compilers still use 80-bit x87, but almost no 64b compilers do so.
- bitminer 7y ago> This hasn't been dependably true on x86 for almost two decades. SSE2 does double-precision computation at native width, not in the extended 80-bit format. Some 32b compilers still use 80-bit x87, but almost no 64b compilers do so. My experience has been different -- forcing SSE instructions gives me a different result on some math calculations. Core2 cpu, boost odeint calculations. Clang or gcc. Do you have a reference for why it's rare?
- stephencanon 7y agox87 is the default for 32b processes on Windows and Linux. 32b processes on macOS and 64b processes on all three OSes use SSE2 for double precision.