Add `f16` formatting and parsing by tgross35 · Pull Request #127013 · rust-lang/rust
added
S-waiting-on-review
labels
Jun 27, 2024
Dylan-DPC
added
S-waiting-on-author
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Aug 20, 2024
rustbot
added
the
T-bootstrap
label
Aug 25, 2024Use the existing Lemire (decimal -> float) and Dragon / Grisu algorithms (float -> decimal) to add support for `f16`. This allows updating the implementation for `Display` to the expected behavior for `Display` (currently it prints the a hex bitwise representation), matching other floats, and adds a `FromStr` implementation. In order to avoid crashes when compiling with Cranelift or on targets where f16 is not well supported, a fallback is used if `cfg(target_has_reliable_f16)` is not true.
bors added a commit to rust-lang-ci/rust that referenced this pull request
May 18, 2025Extend the existing tests for `f32` and `f64` with versions that include `f16`'s new printing and parsing implementations. Co-authored-by: Speedy_Lex <alex.ciocildau@gmail.com>
bors added a commit to rust-lang-ci/rust that referenced this pull request
May 18, 2025fmease added a commit to fmease/rust that referenced this pull request
May 18, 2025github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request
May 21, 2025rust-bors bot pushed a commit that referenced this pull request
Jun 9, 2025Upstream Rust currently does not support printing f16s in decimal. For the intrinsics tests to work, make C++ print float16_t in the same format. Can be droppen once #127013 is merged.
tautschnig pushed a commit to model-checking/verify-rust-std that referenced this pull request
Jul 3, 2025Upstream Rust currently does not support printing f16s in decimal. For the intrinsics tests to work, make C++ print float16_t in the same format. Can be droppen once rust-lang#127013 is merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters