Skip to main content

read_float

Function read_float 

Source
pub fn read_float(value: &Value, widening: bool) -> Result<f64, Error>
Expand description

A Float from its text, or from that of a Nat or an Int if widening is set: the nearest f64, which is the one loss that a mapping is allowed. A number too small to be held other than as zero is zero, and one too large for an f64, such as 1.0e400, is an error at it, since making it infinite would change a finite value into one that is not. There is no negative zero, so -0.0 is 0.0.