Numbers.Protocols.ToFloat protocol (numbers v5.2.4)

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

Specs

t() :: term()

Link to this section Functions

Specs

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.