Crates.io | scidec |
lib.rs | scidec |
version | 0.1.9 |
source | src |
created_at | 2022-12-05 08:29:50.192011+00 |
updated_at | 2025-02-14 18:05:18.234183+00 |
description | Scientific number converter |
homepage | |
repository | https://github.com/EngosSoftware/scidec.git |
max_upload_size | |
id | 730091 |
size | 51,644 |
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)
use scidec::{Number, number_from_string};
let result = number_from_string("1234.5678e-2");
match result {
Number::Fin(false, 0, 12345678, -6) => {}
_ => panic!()
}
Licensed under either of
at your option.
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.