numbers v5.2.2 Numbers.Protocols.ToFloat protocol

For supporting Numbers.to_float/1.

Link to this section Summary

Functions

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

Link to this section Types

Link to this section Functions

Link to this function

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.