4 ms·
No, because NaN is a valid floating point number in rust.
by lachlan-sneff 8y ago
No, because NaN is a valid floating point number in rust.
- alkonaut 8y agoThere really should be a ”normal” f32 and f64 type with guarantees for non-NaN, similar to the nonzero integers. More importantly than size, these floats would be totally ordered unlike the partially ordered regular ieee floats. Edit: turns out these exist in various forms e.g “noisy float”
- tlb 8y ago"in IEEE-754 there are 2^53-2 different bit patterns that all represent NaN" From https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Sp..., which describes how Mozilla implements nan-boxing.