X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibstd%2Ff64.rs;h=d89b38e1a003501c1002639537b890d1bbee9163;hb=5c384ab00c7b4b39e457b75d385e9cbe12e699f5;hp=61ce7b29e26fc306d71d98e8814277bb510cdc41;hpb=6d9913d51b0e5b898f5d42a21bdcd9510658ec9c;p=rust.git diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index 61ce7b29e26..d89b38e1a00 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -109,10 +109,10 @@ pub fn trunc(self) -> f64 { /// # Examples /// /// ``` - /// let x = 3.5_f64; - /// let y = -3.5_f64; - /// let abs_difference_x = (x.fract() - 0.5).abs(); - /// let abs_difference_y = (y.fract() - (-0.5)).abs(); + /// let x = 3.6_f64; + /// let y = -3.6_f64; + /// let abs_difference_x = (x.fract() - 0.6).abs(); + /// let abs_difference_y = (y.fract() - (-0.6)).abs(); /// /// assert!(abs_difference_x < 1e-10); /// assert!(abs_difference_y < 1e-10); @@ -323,7 +323,7 @@ pub fn powf(self, n: f64) -> f64 { unsafe { intrinsics::powf64(self, n) } } - /// Takes the square root of a number. + /// Returns the square root of a number. /// /// Returns NaN if `self` is a negative number. /// @@ -506,7 +506,7 @@ pub fn abs_sub(self, other: f64) -> f64 { unsafe { cmath::fdim(self, other) } } - /// Takes the cubic root of a number. + /// Returns the cubic root of a number. /// /// # Examples ///