dtoa
This crate provides fast functions for printing floating-point primitives to an
io::Write
. The implementation is a straightforward Rust port of Milo Yip's
C++ implementation dtoa.h. The original C++ code of each function is included
in comments.
See also itoa
for printing integer primitives.
Version requirement: rustc 1.0+
[]
= "0.4"
Performance (lower is better)
Examples
use io;
The function signature is:
;
where dtoa::Floating
is implemented for f32 and f64. The return value gives
the number of bytes written.