3 ms·
For 32-bit floats, subnormals are the numbers closer to 0 than 2**(-126) == 0.0000000000000000000000000000000000000117549. For 64-bit doubles, it's 2**(-1022),
by dgrunwald 13d ago
For 32-bit floats, subnormals are the numbers closer to 0 than 2**(-126) == 0.0000000000000000000000000000000000000117549.
For 64-bit doubles, it's 2**(-1022), a number starting with 308 decimal zeroes.
- fuzzfactor 13d agoWhat about 8-bit and 16-bit?
- nayuki 13d ago8-bit: There is no IEEE 754 standard format. 16-bit: https://en.wikipedia.org/wiki/Half-precision_floating-point_format https://en.wikipedia.org/wiki/Half-precision_floating-point_...
- adrian_b 12d agoIt should be noted that subnormals have appeared for the first time in standards a decade before Intel 8087 (the ancestor of the IEEE standard), in the standards for digital telephony, and that happened in a certain form of FP8. When telephony transitioned from analog voice transmission to digital, the PCM (pulse-code modulation) encoded audio signal used 8-bit samples, which were a form of 8-bit floating-point numbers (with American and European encoding variants: mu-law and A-law). The use of a floating-point format enabled the 8-bit samples to have a dynamic range as big as for a 12-bit or 13-bit fixed-point encoding. Subnormals where used in digital telephony, because otherwise the errors around zero would have been so great that the voice audio would not have been intelligible. In general, in smaller floating-point formats the use of subnormals is even more important than in bigger formats, in order to avoid the loss of precision around zero.