Cldr.Math.to_float

You're seeing just the function to_float, go back to Cldr.Math module for more information.

Specs

to_float(%Decimal{coef: term(), exp: term(), sign: term()}) :: float()

Convert a Decimal to a float

  • decimal must be a Decimal

This is very likely to lose precision - lots of numbers won't make the round trip conversion. Use with care. Actually, better not to use it at all.