]> git.lizzy.rs Git - rust.git/commitdiff
Fix typo in dec2flt/algorithm.rs
authorIrfan Hudda <irfanhudda@gmail.com>
Sat, 25 Mar 2017 10:51:08 +0000 (16:21 +0530)
committerIrfan Hudda <irfanhudda@gmail.com>
Sat, 25 Mar 2017 10:51:08 +0000 (16:21 +0530)
src/libcore/num/dec2flt/algorithm.rs

index 604bc7c10dea0aedaa886e976f1c63e392314fce..60dab943a3acfa094b93b275162bacc294610b78 100644 (file)
@@ -141,7 +141,7 @@ pub fn fast_path<T: RawFloat>(integral: &[u8], fractional: &[u8], e: i64) -> Opt
 ///
 /// It rounds ``f`` to a float with 64 bit significand and multiplies it by the best approximation
 /// of `10^e` (in the same floating point format). This is often enough to get the correct result.
-/// However, when the result is close to halfway between two adjecent (ordinary) floats, the
+/// However, when the result is close to halfway between two adjacent (ordinary) floats, the
 /// compound rounding error from multiplying two approximation means the result may be off by a
 /// few bits. When this happens, the iterative Algorithm R fixes things up.
 ///
@@ -392,7 +392,7 @@ fn underflow<T: RawFloat>(x: Big, v: Big, rem: Big) -> T {
     //
     // Therefore, when the rounded-off bits are != 0.5 ULP, they decide the rounding
     // on their own. When they are equal and the remainder is non-zero, the value still
-    // needs to be rounded up. Only when the rounded off bits are 1/2 and the remainer
+    // needs to be rounded up. Only when the rounded off bits are 1/2 and the remainder
     // is zero, we have a half-to-even situation.
     let bits = x.bit_length();
     let lsb = bits - T::sig_bits() as usize;