Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions library/std/src/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ impl f32 {
/// ```
/// let x = 2.0_f32;
/// let abs_difference = (x.powi(2) - (x * x)).abs();
///
/// assert!(abs_difference <= f32::EPSILON);
///
/// assert_eq!(f64::powi(f32::NAN, 0), 1.0);
/// ```
#[rustc_allow_incoherent_impl]
#[must_use = "method returns a new number and does not mutate the original value"]
Expand All @@ -329,8 +330,10 @@ impl f32 {
/// ```
/// let x = 2.0_f32;
/// let abs_difference = (x.powf(2.0) - (x * x)).abs();
///
/// assert!(abs_difference <= f32::EPSILON);
///
/// assert_eq!(f32::powf(1.0, f32::NAN), 1.0)
/// assert_eq!(f32::powf(f32::NAN, 0.0), 1.0)
/// ```
#[rustc_allow_incoherent_impl]
#[must_use = "method returns a new number and does not mutate the original value"]
Expand Down
Loading