numbers v5.0.0-rc0 Numbers.Protocols.ToFloat protocol

Summary

Functions

Convert the custom Numeric struct to the built-in float datatype

Types

t()
t() :: term

Functions

to_float(num)
to_float(t) :: {:ok, t_as_float :: float} | :error

Convert the custom Numeric struct to the built-in float datatype.

It is okay to lose precision during this conversion.