4 ms·
There's a ton of hardware and software that uses IEEE754 data formats but the actual arithmetic isn't IEEE754. It would be a disaster for C++ to prohibit this.
by greglindahl 8y ago
There's a ton of hardware and software that uses IEEE754 data formats but the actual arithmetic isn't IEEE754. It would be a disaster for C++ to prohibit this. Also, the IEEE 754 standard does include extended precision formats like Intel's 8087 80-bit format.
- tspiteri 8y agoWhile it does include many sizes, I don't think 80-bit is included. The sizes mentioned in IEEE754-2008 are 16, 32, 64 and then multiples of 32 that are greater or equal to 128 (96 is not included).
- greglindahl 8y agoHere's a whole Wikipedia section about extended formats: https://en.wikipedia.org/wiki/Extended_precision#IEEE_754_extended_precision_formats https://en.wikipedia.org/wiki/Extended_precision#IEEE_754_ex... Now I totally agree that people should almost always not be storing these things on disk or passing them across the network, but they were RECOMMENDED by the IEEE committee, and that's why Intel and Motorola implemented them. A kinda bad idea, bad implementation choices, but recommended.
- tspiteri 8y agoYou're right, I confused the interchange formats with extended and extendable precisions. And the standard only recommends the extended and extendable precisions "for extending the precisions used for arithmetic beyond the basic formats", not for interchange.
- TillE 8y agoThe standard doesn't have to prohibit anything, merely define names for types which are guaranteed to be conformant. Even if they redefine float and double, you could always have platform-specific names for weird types.
- greglindahl 8y agoConformant to the bit formats or conformant to the accuracy guarantees? I was mostly talking about the latter.