The second module of the old erlang_decimal library: conversion between
{coef, exp} decimals and binaries, charlists and floats.
Unlike :decimal, which is a thin shim over the Elixir Decimal library,
this module is a direct port of the original Erlang source. The parser and
the float printer decide which strings are valid and which digits a float
produces, and those decisions have to match the original exactly — including
the badarg raised on malformed input.
Summary
Types
@type binary_opts() :: %{optional(:pretty) => boolean()}
Functions
@spec from_binary(binary()) :: :decimal.decimal()
@spec from_float(float()) :: :decimal.decimal()
@spec from_list(charlist()) :: :decimal.decimal()
@spec to_binary(:decimal.decimal(), binary_opts()) :: binary()