Skip to main content

single_decimal_to_float_lossy

Function single_decimal_to_float_lossy 

Source
pub fn single_decimal_to_float_lossy<D, F>(
    f: &F,
    x: D::Native,
    scale: i32,
) -> f64
where D: DecimalType, F: Fn(D::Native) -> f64,
Expand description

Lossy conversion from decimal to float.

Conversion is lossy and follows standard floating point semantics. Values that exceed the representable range become INFINITY or -INFINITY without returning an error.