about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorRobin Kruppe <robin.kruppe@gmail.com>2015-06-27 21:59:31 +0200
committerRobin Kruppe <robin.kruppe@gmail.com>2015-08-08 17:12:29 +0200
commitb55806ca8ff97ee89f77f9c784619ace3034c32c (patch)
treec5f2dd3addb5fdcfd1e38e95485e8c3547b0115c /src/libcore/num
parente5d90d98402475b6e154ce216f9efcb80da1a747 (diff)
downloadrust-b55806ca8ff97ee89f77f9c784619ace3034c32c.tar.gz
rust-b55806ca8ff97ee89f77f9c784619ace3034c32c.zip
Make core::num::dec2flt::strategy::grisu::Fp methods public.
The intent is to allow decimal-to-float parsing to use Fp in its fast path.
That code is added in a later commit.
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/flt2dec/strategy/grisu.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/num/flt2dec/strategy/grisu.rs b/src/libcore/num/flt2dec/strategy/grisu.rs
index 390920a354c..52eafcec184 100644
--- a/src/libcore/num/flt2dec/strategy/grisu.rs
+++ b/src/libcore/num/flt2dec/strategy/grisu.rs
@@ -34,7 +34,7 @@ pub struct Fp {
 
 impl Fp {
     /// Returns a correctly rounded product of itself and `other`.
-    fn mul(&self, other: &Fp) -> Fp {
+    pub fn mul(&self, other: &Fp) -> Fp {
         const MASK: u64 = 0xffffffff;
         let a = self.f >> 32;
         let b = self.f & MASK;
@@ -51,7 +51,7 @@ impl Fp {
     }
 
     /// Normalizes itself so that the resulting mantissa is at least `2^63`.
-    fn normalize(&self) -> Fp {
+    pub fn normalize(&self) -> Fp {
         let mut f = self.f;
         let mut e = self.e;
         if f >> (64 - 32) == 0 { f <<= 32; e -= 32; }
@@ -66,7 +66,7 @@ impl Fp {
 
     /// Normalizes itself to have the shared exponent.
     /// It can only decrease the exponent (and thus increase the mantissa).
-    fn normalize_to(&self, e: i16) -> Fp {
+    pub fn normalize_to(&self, e: i16) -> Fp {
         let edelta = self.e - e;
         assert!(edelta >= 0);
         let edelta = edelta as usize;