External Publication
Visit Post

Add something like `num_traits` to STD, or move it into std entirely

Rust Internals [Unofficial] April 19, 2026
Source

scottmcm:

Now that we have 4 floating point types in the works, we could make f<N> work if we wanted

I think we'd need something more complex than that since there are multiple types that can reasonably have size 16 (IEEE 754 half f16 and brain float bf16) and waay more for size 8. there's also x87 f80 and ppc's 128-bit double double type (not to be confused with IEEE 754 f128). This makes me say that's too much complexity to try to have a generic float type like the generic integer types u<N> and i<N>, so I think having a generic f<N> is a bad idea.

Discussion in the ATmosphere

Loading comments...