]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/f64.rs
Rollup merge of #103750 - calebzulawski:master, r=workingjubilee
[rust.git] / library / std / src / f64.rs
index 31351a87978c918dcaec443c092ef60b5b853272..cc64258da60d1a63fdc44ef0f72f41d07e2ab976 100644 (file)
@@ -77,9 +77,11 @@ pub fn ceil(self) -> f64 {
     /// ```
     /// let f = 3.3_f64;
     /// let g = -3.3_f64;
+    /// let h = -3.7_f64;
     ///
     /// assert_eq!(f.round(), 3.0);
     /// assert_eq!(g.round(), -3.0);
+    /// assert_eq!(h.round(), -4.0);
     /// ```
     #[rustc_allow_incoherent_impl]
     #[must_use = "method returns a new number and does not mutate the original value"]
@@ -275,7 +277,7 @@ pub fn div_euclid(self, rhs: f64) -> f64 {
     /// This result is not an element of the function's codomain, but it is the
     /// closest floating point number in the real numbers and thus fulfills the
     /// property `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)`
-    /// approximatively.
+    /// approximately.
     ///
     /// # Examples
     ///