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/zmij/README.md # 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 / zmij / README.md` 42 lines · 1744 bytes Raw Blame History Rendered 1 # Żmij 2 3 [github](https://github.com/dtolnay/zmij) 4 [crates.io](https://crates.io/crates/zmij) 5 [docs.rs](https://docs.rs/zmij) 6 [build status](https://github.com/dtolnay/zmij/actions?query=branch%3Amaster) 7 8 Pure Rust implementation of Żmij, an algorithm to quickly convert floating point 9 numbers to decimal strings. 10 11 This Rust implementation is a line-by-line port of Victor Zverovich's 12 implementation in C++, [https://github.com/vitaut/zmij][upstream]. 13 14 [upstream]: https://github.com/vitaut/zmij/tree/`b32688a1849d1b8f092c1740c61a6b05ea4679ae` 15 16 ## Example 17 18 ```rust 19 fn main() { 20 let mut buffer = zmij::Buffer::new(); 21 let printed = buffer.format(1.234); 22 assert_eq!(printed, "1.234"); 23 } 24 ``` 25 26 ## Performance 27 28 The [dtoa-benchmark] compares this library and other Rust floating point 29 formatting implementations across a range of precisions. The vertical axis in 30 this chart shows nanoseconds taken by a single execution of 31 `zmij::Buffer::new().format_finite(value)` so a lower result indicates a faster 32 library. 33 34 [dtoa-benchmark]: https://github.com/dtolnay/dtoa-benchmark 35 36 ![performance](https://raw.githubusercontent.com/dtolnay/zmij/master/dtoa-benchmark.png) 37 38
39 40 #### License 41 42 MIT license.