about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-25 09:30:33 -0700
committerGitHub <noreply@github.com>2017-03-25 09:30:33 -0700
commitfbcb370fe81f25eca3fa03d84c509d429e05d4f3 (patch)
tree9cb7eaeb7fcfba0bc95136f2822bb9f90aab54f2 /src/libcore
parent2bdbcb061806e8e03507ecdfa22493d9195bf25c (diff)
parent5d9d652e0f746d7db9542f95115d5820fefeedaa (diff)
downloadrust-fbcb370fe81f25eca3fa03d84c509d429e05d4f3.tar.gz
rust-fbcb370fe81f25eca3fa03d84c509d429e05d4f3.zip
Rollup merge of #40820 - irfanhudda:fix-typo-algorithm, r=BurntSushi
Fix typo in dec2flt/algorithm.rs
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/num/dec2flt/algorithm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/num/dec2flt/algorithm.rs b/src/libcore/num/dec2flt/algorithm.rs
index 604bc7c10de..60dab943a3a 100644
--- a/src/libcore/num/dec2flt/algorithm.rs
+++ b/src/libcore/num/dec2flt/algorithm.rs
@@ -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;