Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/serde_json/src/lexical/mod.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / serde_json / src / lexical / mod.rs` 38 lines ยท 1059 bytes Raw Blame History 1 // The code in this module is derived from the `lexical` crate by @Alexhuszagh 2 // which the author condensed into this minimal subset for use in serde_json. 3 // For the serde_json use case we care more about reliably round tripping all 4 // possible floating point values than about parsing any arbitrarily long string 5 // of digits with perfect accuracy, as the latter would take a high cost in 6 // compile time and performance. 7 // 8 // Dual licensed as MIT and Apache 2.0 just like the rest of serde_json, but 9 // copyright Alexander Huszagh. 10 11 //! Fast, minimal float-parsing algorithm. 12 13 // MODULES 14 pub(crate) mod algorithm; 15 mod bhcomp; 16 mod bignum; 17 mod cached; 18 mod cached_float80; 19 mod digit; 20 mod errors; 21 pub(crate) mod exponent; 22 pub(crate) mod float; 23 mod large_powers; 24 pub(crate) mod math; 25 pub(crate) mod num; 26 pub(crate) mod parse; 27 pub(crate) mod rounding; 28 mod shift; 29 mod small_powers; 30 31 #[cfg(fast_arithmetic = "32")] 32 mod large_powers32; 33 34 #[cfg(fast_arithmetic = "64")] 35 mod large_powers64; 36 37 // API 38 pub use self::parse::{parse_concise_float, parse_truncated_float};