4 ms·
x87 always had a choice of 32/64/80-bit user-facing floats. It just operated internally on 80 bits.
by Sharlin 6mo ago
x87 always had a choice of 32/64/80-bit user-facing floats. It just operated internally on 80 bits.
- adrian_b 6mo agoYou can set x87 to round each operation result to 32-bit or 64-bit. With this setting in operates internally exactly on those sizes. Operating internally on 80-bits is just the default setting, because it is the best for naive users, who are otherwise prone to computing erroneous results. This is the same reason why the C language has made "double" the default precision in constants and intermediate values. Unless you do graphics or ML/AI, single-precision computations are really only for experts who can analyze the algorithm and guarantee that it is correct.