Module

Float

Changes by version

Elixir 1.14.0

· 2 changes

Enhancement Tool: Elixir

Do not show floats in scientific notation if below 1.0e16 and the fractional value is precisely zero

Enhancement Tool: Elixir

Add Float.min_finite/0 and Float.max_finite/0

Elixir 1.12.0

· 1 change

Enhancement Tool: Elixir

Add Float.pow/2

Elixir 1.8.1

· 1 change

Bugfix Tool: Elixir

Fix rounding for subnormal floats

Elixir 1.8.0

· 1 change

Bugfix Tool: Elixir

Handle subnormal floats in Float.ratio/1

Elixir 1.4.0

· 3 changes

Enhancement Tool: Elixir

Introduce Float.ratio/1 that returns a tuple with the numerator and denominator as integers to retrieve the given float

Bugfix Tool: Elixir

Avoid multiple roundings in Float.ceil/2, Float.floor/2 and Float.round/2

Enhancement Tool: Elixir

Float.to_char_list/2 and Float.to_string/2 are deprecated (use the :erlang functions if such conversions are desired)

Elixir 1.3.0

· 1 change

Enhancement Tool: Elixir

Float.to_string/2 and Float.to_char_list/2 has been soft-deprecated as Elixir will now attempt to print the shortest and most accurate representation by default. Developers can always fallback to :erlang.float_to_binary/2 and :erlang.float_to_list/2 if they need the previous functionality

Elixir 1.1.0

· 1 change

Bugfix Tool: Elixir

Support complete scientific notation in Float.parse/1

Elixir 1.0.5

· 1 change

Enhancement Tool: Elixir

Avoid rounding errors on Float.parse/1

Elixir 0.14.3

· 2 changes

Enhancement Tool: Elixir

Support precision in Float.ceil/1 and Float.floor/1

Enhancement Tool: Elixir

Float.ceil/2 and Float.floor/2 now always returns floats and no longer accept integers

Elixir 0.12.1

· 1 change

Enhancement Tool: Elixir

Fix Float.parse/1 to handle numbers of the form "-0.x"

Elixir 0.12.0

· 1 change

Enhancement Tool: Elixir

Add Float.floor/1, Float.ceil/1 and Float.round/3