about summary refs log tree commit diff
path: root/src/libstd/num/f32.rs
diff options
context:
space:
mode:
authorSiegeLord <slabode@aim.com>2014-01-16 18:24:03 -0500
committerSiegeLord <slabode@aim.com>2014-01-22 20:32:40 -0500
commit2b4bd0780bb98f4171dd6464a4f01065b8d85ffd (patch)
tree85887b4fd5a178eda845b44343fa84cb46745fad /src/libstd/num/f32.rs
parentfce792249e72a181f2ad52413b25b1db643c371f (diff)
downloadrust-2b4bd0780bb98f4171dd6464a4f01065b8d85ffd.tar.gz
rust-2b4bd0780bb98f4171dd6464a4f01065b8d85ffd.zip
float_to_str_bytes_common can now handle exponential notation
Diffstat (limited to 'src/libstd/num/f32.rs')
-rw-r--r--src/libstd/num/f32.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index 5b0c75ef174..e95ad7ca7f5 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -718,7 +718,7 @@ impl Float for f32 {
 #[inline]
 pub fn to_str(num: f32) -> ~str {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigAll);
+        num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
     r
 }
 
@@ -732,7 +732,7 @@ pub fn to_str(num: f32) -> ~str {
 #[inline]
 pub fn to_str_hex(num: f32) -> ~str {
     let (r, _) = strconv::float_to_str_common(
-        num, 16u, true, strconv::SignNeg, strconv::DigAll);
+        num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
     r
 }
 
@@ -748,7 +748,7 @@ pub fn to_str_hex(num: f32) -> ~str {
 #[inline]
 pub fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
     strconv::float_to_str_common(num, rdx, true,
-                           strconv::SignNeg, strconv::DigAll)
+                           strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
 }
 
 ///
@@ -763,7 +763,7 @@ pub fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
 #[inline]
 pub fn to_str_exact(num: f32, dig: uint) -> ~str {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigExact(dig));
+        num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
     r
 }
 
@@ -779,7 +779,7 @@ pub fn to_str_exact(num: f32, dig: uint) -> ~str {
 #[inline]
 pub fn to_str_digits(num: f32, dig: uint) -> ~str {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigMax(dig));
+        num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
     r
 }
 
@@ -804,7 +804,7 @@ impl num::ToStrRadix for f32 {
     #[inline]
     fn to_str_radix(&self, rdx: uint) -> ~str {
         let (r, special) = strconv::float_to_str_common(
-            *self, rdx, true, strconv::SignNeg, strconv::DigAll);
+            *self, rdx, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
         if special { fail!("number has a special value, \
                             try to_str_radix_special() if those are expected") }
         r