3 ms·
Why don't all these languages fold down to the same FPU add and hence produce the same output (on the same hardware)? Are you telling me they implement their o
by xedarius 11y ago
Why don't all these languages fold down to the same FPU add and hence produce the same output (on the same hardware)?
Are you telling me they implement their own version of the IEEE float standard? Surely that way madness lies.
- dpkendal 11y agoThe difference is in how the result is converted to a string, not in how the result is produced.
- xedarius 11y agogotcha
- JoeAltmaier 11y agoThe difference is between the length of their floating-point number (e.g. float vs double).
- dragonwriter 11y agoIn some cases, string conversion is different, and the same calculation is going on, but the output is different. In some cases, the internal representation isn't binary floating point at all, so the errors resulting from approximating an exact decimal with a binary float don't occur.