mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
7c6fc44b7c
Split the `dec2flt::RawFloat` trait for easier reuse `RawFloat` is an internal trait with quite a few useful float properties. It currently resides in the `dec2flt` module but is also used in parsing, and would be nice to reuse other places. Unfortunately it cannot be implemented on `f128` because of limitations with how the parsing API is implemented (mantissa must fit into a u64). To make the trait easier to work with, split it into the following: * `Float`: Anything that is reasonably applicable to all floating point types. * `FloatExt`: Items that should be part of `Float` but don't work for all float types. This will eventually be merged back into `Float` once it can be implemented on f128. * `Lemire`: Items that are specific to the Lemire dec2flt algorithm. These traits are then moved to places that make sense. Builds on top of https://github.com/rust-lang/rust/pull/151900