Skip to main content

float_repr

Function float_repr 

Source
pub fn float_repr(x: f64) -> String
Expand description

Python’s repr(x) for a float as json.dumps writes it: the core’s py_float_repr (the nearest of the shortest digits that read back, ties to even), but JSON’s NaN, Infinity and -Infinity.