# Add float types with niche

**URL:** <https://internals.rust-lang.org/t/add-float-types-with-niche/23429>\
**Category:** libs\
**Created:** [August 20, 2025, 12:22pm UTC](https://internals.rust-lang.org/t/add-float-types-with-niche/23429 "2025-08-20T12:22:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![kpreid](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kpreid/32/8484_2.png) [@kpreid](https://internals.rust-lang.org/u/kpreid)\
**Post date:** [August 20, 2025, 4:34pm UTC](https://internals.rust-lang.org/t/add-float-types-with-niche/23429/4 "2025-08-20T16:34:29Z")

</div>

I [recently wrote the opinion](https://internals.rust-lang.org/t/matches-index-july-2025-reviving-the-left-pad-index/23272/14) that `std` should probably not gain a `NotNaN`/`NonNaN` wrapper type, because it’s unclear what the behavior of most operations under that restriction should be. I now think that was too strong a statement; a type which simply does not have any operations other than those which naturally do not produce NaN, and which can provide niches, `Eq`, and `Ord`, does seem worthwhile.

---

_[View the full topic](https://internals.rust-lang.org/t/add-float-types-with-niche/23429)._
