Module core::num::flt2dec::strategy::grisu [] [src]

Unstable (flt2dec)

: internal routines only exposed for testing

Rust adaptation of Grisu3 algorithm described in [1]. It uses about 1KB of precomputed table, and in turn, it's very quick for most inputs.

[1] Florian Loitsch. 2010. Printing floating-point numbers quickly and accurately with integers. SIGPLAN Not. 45, 6 (June 2010), 233-243.

Reexports

use prelude::v1::*;
use num::diy_float::Fp;
use num::flt2dec::{Decoded, MAX_SIG_DIGITS, round_up};

Constants

ALPHA [Unstable]
CACHED_POW10_FIRST_E [Unstable]
CACHED_POW10_LAST_E [Unstable]
GAMMA [Unstable]

Statics

CACHED_POW10 [Unstable]

Functions

cached_power [Unstable]
format_exact [Unstable]

The exact and fixed mode implementation for Grisu with Dragon fallback.

format_exact_opt [Unstable]

The exact and fixed mode implementation for Grisu.

format_shortest [Unstable]

The shortest mode implementation for Grisu with Dragon fallback.

format_shortest_opt [Unstable]

The shortest mode implementation for Grisu.

max_pow10_no_more_than [Unstable]

Given x > 0, returns (k, 10^k) such that 10^k <= x < 10^(k+1).