4 ms·
Very interesting, you are right. The IEEE 754 standard defines positive/negative zero as not subnormal numbers. Mechanically speaking, the two zeros use the su
by nayuki 8d ago
Very interesting, you are right. The IEEE 754 standard defines positive/negative zero as not subnormal numbers.
Mechanically speaking, the two zeros use the subnormal number format, so in that sense they are subnormal (but definitionally they aren't). Also, I guess FPUs treat zero differently from other subnormal numbers, which is why zero doesn't have a performance penalty.
Relevant articles to read: https://stackoverflow.com/questions/73890260/why-is-zero-not-a-subnormal-number https://stackoverflow.com/questions/73890260/why-is-zero-not... , https://en.wikipedia.org/wiki/Sterbenz_lemma https://en.wikipedia.org/wiki/Sterbenz_lemma , https://en.wikipedia.org/wiki/Subnormal_number https://en.wikipedia.org/wiki/Subnormal_number