Subnormal floating-point numbers are expensive on Intel processors
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Subnormal floating-point numbers are expensive on Intel processors
Unofficial Hacker News client; not affiliated with Y Combinator.
gwbas1c · · focus · HN ↗
Unfortunately, the Wikipedia article, while probably being accurate, doesn't give a clear and concise answer.
IE, is 0.0001 a subnormal? Or is it 0.000000000000000000001?
jcranmer · · focus · HN ↗
This problem is fixed by reserving one of the exponents for the representation of 0. Some of the formats (e.g. VAX floating point) that introduced this implicit-1-bit for the binary format said that every number with this special-0-exponent was a zero. But IEEE 754 introduced the concept of gradual underflow, and says instead that it is a bit string with the implicit digit before the decimal point as a 0 instead of 1.
Putting it differently and more succinctly: a subnormal number is a number that has fewer digits of precision than is normally implied by the format. Which numbers are subnormal numbers is entirely dependent on the floating-point format.