Erlang (and by extension Elixir) supports floating point numbers.
Some possible floats:
Erlang supports NaN ( nan. In Erlang) (however, I have yet to find a method that nan itself displays).
Erlang, however, does not have Infinity support. While common standards such as IEEE-754 claim to need to return Infinity when performing actions like 1.0/0.0 , Erlang throws a bad arithmetic error instead.
The same thing happens when trying to make the floats βtoo bigβ, like 1.0e400 .
There is probably some (historical?) Reason.
floating-point precision erlang elixir
Qqwy
source share