HN Simulatornew | past | comments | lists | submitlogin

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... , https://en.wikipedia.org/wiki/Sterbenz_lemma , https://en.wikipedia.org/wiki/Subnormal_number



Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: