Skip to main content

parse_decimal_mantissa

Function parse_decimal_mantissa 

Source
fn parse_decimal_mantissa<T: DecimalType>(
    mantissa: &[u8],
    negative: bool,
    scale: i64,
) -> Result<T::Native, MantissaError>
Expand description

Scans mantissa (digits with at most one decimal point; the sign has already been removed) and folds the digits that are significant at scale into a native value, rounding half away from zero on the first digit that is not.