Cldr.Math.coef_exponent_digits
You're seeing just the function
coef_exponent_digits
, go back to Cldr.Math module for more information.
Specs
coef_exponent_digits(number_or_decimal()) :: {Cldr.Digits.t(), integer()}
Returns a tuple representing a number in a normalized form with
the mantissa in the range 0 < m < 10
and a base 10 exponent.
The mantissa is represented as tuple of the form Digits.t
.
number
is an integer, float or Decimal
Examples
Cldr.Math.coef_exponent_digits(Decimal.new(1.23004))
{{[1, 2, 3, 0], 1, 1}, 0}
Cldr.Math.coef_exponent_digits(Decimal.new(465))
{{[4, 6, 5], 1, 1}, -1}
Cldr.Math.coef_exponent_digits(Decimal.new(-46.543))
{{[4, 6, 5, 4], 1, -1}, 1}