mirror of
https://github.com/openharmony/third_party_rust_ryu.git
synced 2026-07-19 19:13:31 -04:00
Sync to ulfjack/ryu@00ecce8
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user