From 81e31b67f46ef3ee983d7716d2abfa626e022dbd Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 11 Jun 2019 14:04:04 -0700 Subject: [PATCH] Sync to ulfjack/ryu@00ecce8 --- README.md | 2 +- src/d2s.rs | 2 ++ src/f2s.rs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b4941c..ebeb66d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ C, [https://github.com/ulfjack/ryu][upstream]. uses nothing from the Rust standard library so is usable from no_std crates.* [paper]: https://dl.acm.org/citation.cfm?id=3192369 -[upstream]: https://github.com/ulfjack/ryu/tree/608ce6fdfe7743a6dbaadeebd81ae1146603fc6d +[upstream]: https://github.com/ulfjack/ryu/tree/00ecce8c59ab9bdb7b8f6c3dc54ee467cfab6b43 ```toml [dependencies] diff --git a/src/d2s.rs b/src/d2s.rs index 8d5c9e3..5faf5cf 100644 --- a/src/d2s.rs +++ b/src/d2s.rs @@ -145,6 +145,8 @@ pub fn decimal_length17(v: u64) -> u32 { // A floating decimal representing m * 10^e. pub struct FloatingDecimal64 { pub mantissa: u64, + // Decimal exponent's range is -324 to 308 + // inclusive, and can fit in i16 if needed. pub exponent: i32, } diff --git a/src/f2s.rs b/src/f2s.rs index d99bfa5..4ad50a1 100644 --- a/src/f2s.rs +++ b/src/f2s.rs @@ -176,6 +176,8 @@ fn mul_pow5_div_pow2(m: u32, i: u32, j: i32) -> u32 { // A floating decimal representing m * 10^e. pub struct FloatingDecimal32 { pub mantissa: u32, + // Decimal exponent's range is -45 to 38 + // inclusive, and can fit in i16 if needed. pub exponent: i32, }