🔬This is a nightly-only experimental API. (
flt2dec
)Expand description
Rust adaptation of the Grisu3 algorithm described in “Printing Floating-Point Numbers Quickly and Accurately with Integers”1. It uses about 1KB of precomputed table, and in turn, it’s very quick for most inputs.
Florian Loitsch. 2010. Printing floating-point numbers quickly and accurately with integers. SIGPLAN Not. 45, 6 (June 2010), 233-243. ↩
Constants§
- ALPHA 👻
Experimental - CACHED_
POW10_ 👻FIRST_ E Experimental - CACHED_
POW10_ 👻LAST_ E Experimental - GAMMA 👻
Experimental
Statics§
- CACHED_
POW10 👻Experimental
Functions§
- cached_
power 👻Experimental - format_
exact Experimental - The exact and fixed mode implementation for Grisu with Dragon fallback.
- format_
exact_ opt Experimental - The exact and fixed mode implementation for Grisu.
- format_
shortest Experimental - The shortest mode implementation for Grisu with Dragon fallback.
- format_
shortest_ opt Experimental - The shortest mode implementation for Grisu.
- max_
pow10_ 👻no_ more_ than Experimental - Given
x > 0
, returns(k, 10^k)
such that10^k <= x < 10^(k+1)
.