scidec

Crates.ioscidec
lib.rsscidec
version0.1.7
sourcesrc
created_at2022-12-05 08:29:50.192011
updated_at2023-10-30 18:15:30.962635
descriptionScientific number converter
homepage
repositoryhttps://github.com/wisbery/scidec.git
max_upload_size
id730091
size46,184
Dariusz Depta (DariuszDepta)

documentation

https://docs.rs/scidec/

README

Number converter from scientific notation

The library converts the input text containing a number in scientific notation, e.g:

1234.5678e-2

to 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

at your option.

Contribution

All contributions intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 2

cargo fmt