| Crates.io | zmij |
| lib.rs | zmij |
| version | 1.0.17 |
| created_at | 2025-12-18 06:03:00.609652+00 |
| updated_at | 2026-01-25 19:17:06.865769+00 |
| description | A double-to-string conversion algorithm based on Schubfach and yy |
| homepage | |
| repository | https://github.com/dtolnay/zmij |
| max_upload_size | |
| id | 1991770 |
| size | 86,634 |
Pure Rust implementation of Żmij, an algorithm to quickly convert floating point numbers to decimal strings.
This Rust implementation is a line-by-line port of Victor Zverovich's implementation in C++, https://github.com/vitaut/zmij.
fn main() {
let mut buffer = zmij::Buffer::new();
let printed = buffer.format(1.234);
assert_eq!(printed, "1.234");
}
The dtoa-benchmark compares this library and other Rust floating point
formatting implementations across a range of precisions. The vertical axis in
this chart shows nanoseconds taken by a single execution of
zmij::Buffer::new().format_finite(value) so a lower result indicates a faster
library.
