Skip to content

Commit

Permalink
docs: use correct link, use secondary example
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Feb 13, 2024
1 parent 30f6665 commit 0f53e72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions library/alloc/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,20 @@
//! Hello, ` 123` has 3 right-aligned characters
//! ```
//!
//! When truncuating these values, Rust uses round-to-even, which may
//! cause concern when formatting for scientific notation. For example,
//! When truncating these values, Rust uses [round half-to-even](https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even),
//! which is the default rounding mode in IEEE 754.
//! For example,
//!
//! ```
//! print!("{0:.1$e}", 12345, 3);
//! print!("{0:.1$e}", 12355, 3);
//! ```
//!
//! Would return:
//!
//! ```text
//! 1.234e4
//! 1.236e4
//! ```
//!
//! ## Localization
Expand Down

0 comments on commit 0f53e72

Please sign in to comment.