Skip to main content

py_float_repr

Function py_float_repr 

Source
pub fn py_float_repr(f: f64) -> String
Expand description

Python’s float.__repr__: the shortest round-trip digits, fixed notation for decimal exponents in (-4, 16], otherwise d.ddde±XX with at least two exponent digits; json.dumps spells the non-finite values NaN / Infinity / -Infinity.