10 releases
new 0.1.9 | Feb 14, 2025 |
---|---|
0.1.8 | Feb 14, 2025 |
0.1.7 | Oct 30, 2023 |
0.1.5 | Dec 8, 2022 |
0.0.1 | Dec 5, 2022 |
#554 in Encoding
212 downloads per month
23KB
531 lines
Number converter from scientific notation
Overview
This library converts the input text containing a number in scientific notation like:
1234.5678e-2
into a number, represented by the following tuple:
(sign, mantissa-hi-64-bits, mantissa-lo-64-bits, exponent)
Example
use scidec::{Number, number_from_string};
let result = number_from_string("1234.5678e-2");
match result {
Number::Fin(false, 0, 12345678, -6) => {}
_ => panic!()
}
License
Licensed under either of
- MIT license (see LICENSE-MIT) or
- Apache License, Version 2.0 (see LICENSE and NOTICE)
at your option.
Contribution
Any contributions to scidec are greatly appreciated. All contributions intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.