All Versions
12
Latest Version
Avg Release Cycle
155 days
Latest Release
47 days ago

Changelog History
Page 1

  • v2.0.0

    September 08, 2020

    Decimal v2.0 requires Elixir v1.2+.

    โœจ Enhancements

    • โž• Add Decimal.integer?/1

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ”„ Change Decimal.compare/2 to return :lt | :eq | :gt
    • ๐Ÿ”„ Change Decimal.cast/1 to return {:ok, t} | :error
    • ๐Ÿ”„ Change Decimal.parse/1 to return {t, binary} | :error
    • โœ‚ Remove :message and :result fields from Decimal.Error
    • โœ‚ Remove sNaN
    • ๐Ÿ“‡ Rename qNaN to NaN
    • โœ‚ Remove deprecated support for floats in Decimal.new/1
    • โœ‚ Remove deprecated Decimal.minus/1
    • โœ‚ Remove deprecated Decimal.plus/1
    • โœ‚ Remove deprecated Decimal.reduce/1
    • Remove deprecated Decimal.with_context/2, Decimal.get_context/1, Decimal.set_context/1, and Decimal.update_context/1
    • โœ‚ Remove deprecated Decimal.decimal?/1

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ Deprecate Decimal.cmp/2
  • v2.0.0-rc.0

    January 21, 2020

    Decimal v2.0 requires Elixir v1.2+.

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ”„ Change Decimal.compare/2 to return :lt | :eq | :gt
    • ๐Ÿ”„ Change Decimal.cast/1 to return {:ok, t} | :error
    • ๐Ÿ”„ Change Decimal.parse/1 to return {t, binary} | :error
    • โœ‚ Remove :message and :result fields from Decimal.Error
    • โœ‚ Remove sNaN
    • ๐Ÿ“‡ Rename qNaN to NaN
    • โœ‚ Remove deprecated support for floats in Decimal.new/1
    • โœ‚ Remove deprecated Decimal.minus/1
    • โœ‚ Remove deprecated Decimal.plus/1
    • โœ‚ Remove deprecated Decimal.reduce/1
    • Remove deprecated Decimal.with_context/2, Decimal.get_context/1, Decimal.set_context/1, and Decimal.update_context/1
    • โœ‚ Remove deprecated Decimal.decimal?/1

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ Deprecate Decimal.cmp/2
  • v1.9.0

    September 08, 2020

    โœจ Enhancements

    • โž• Add Decimal.negate/1
    • โž• Add Decimal.apply_context/1
    • โž• Add Decimal.normalize/1
    • โž• Add Decimal.Context.with/2, Decimal.Context.get/1, Decimal.Context.set/2,
      โšก๏ธ and Decimal.Context.update/1
    • โž• Add Decimal.is_decimal/1

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ Deprecate Decimal.minus/1 in favour of the new Decimal.negate/1
    • ๐Ÿ—„ Deprecate Decimal.plus/1 in favour of the new Decimal.apply_context/1
    • ๐Ÿ—„ Deprecate Decimal.reduce/1 in favour of the new Decimal.normalize/1
    • Deprecate Decimal.with_context/2, Decimal.get_context/1, Decimal.set_context/2,
      โšก๏ธ and Decimal.update_context/1 in favour of new functions on the Decimal.Context module
    • ๐Ÿ—„ Deprecate Decimal.decimal?/1 in favour of the new Decimal.is_decimal/1
  • v1.9.0-rc.0

    January 07, 2020

    โœจ Enhancements

    • โž• Add Decimal.negate/1
    • โž• Add Decimal.apply_context/1
    • โž• Add Decimal.normalize/1
    • โž• Add Decimal.Context.with/2, Decimal.Context.get/1, Decimal.Context.set/2,
      โšก๏ธ and Decimal.Context.update/1
    • โž• Add Decimal.is_decimal/1

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ Deprecate Decimal.minus/1 in favour of the new Decimal.negate/1
    • ๐Ÿ—„ Deprecate Decimal.plus/1 in favour of the new Decimal.apply_context/1
    • ๐Ÿ—„ Deprecate Decimal.reduce/1 in favour of the new Decimal.normalize/1
    • Deprecate Decimal.with_context/2, Decimal.get_context/1, Decimal.set_context/2,
      โšก๏ธ and Decimal.update_context/1 in favour of new functions on the Decimal.Context module
    • ๐Ÿ—„ Deprecate Decimal.decimal?/1 in favour of the new Decimal.is_decimal/1
  • v1.8.1

    December 20, 2019

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fix Decimal.compare/2 with string arguments
    • ๐Ÿšฆ Set :signal on error
  • v1.8.0

    June 24, 2019

    โœจ Enhancements

    • โž• Add Decimal.cast/1
    • โž• Add Decimal.eq?/2, Decimal.gt?/2, and Decimal.lt?/2
    • โž• Add guards to Decimal.new/3 to prevent invalid Decimal numbers
  • v1.7.0

    February 16, 2019

    โœจ Enhancements

    • โž• Add Decimal.sqrt/1
  • v1.6.0

    November 22, 2018

    โœจ Enhancements

    • ๐Ÿ‘Œ Support for canonical XSD representation on Decimal.to_string/2

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fix exponent off-by-one when converting from decimal to float
    • ๐Ÿ›  Fix negative?/1 and positive?/1 specs

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ Deprecate passing float to Decimal.new/1 in favor of Decimal.from_float/1
  • v1.5.0

    March 24, 2018

    โœจ Enhancements

    • โž• Add Decimal.positive?/1 and Decimal.negative?/1
    • Accept integers and strings in arithmetic functions, e.g.: Decimal.add(1, "2.0")
    • โž• Add Decimal.from_float/1

    ๐Ÿ—„ Soft deprecations (no warnings emitted)

    • ๐Ÿ—„ Soft deprecate passing float to new/1 in favor of from_float/1
  • v1.4.1

    October 12, 2017

    ๐Ÿ›  Bugfixes

    • Include the given value as part of the error reason
    • ๐Ÿ›  Fix :half_even :lists.last bug (empty signif)
    • ๐Ÿ›  Fix error message for round
    • ๐Ÿ›  Fix :half_down rounding error when remainder is greater than 5
    • ๐Ÿ›  Fix Decimal.new/1 float conversion with bigger precision than 4
    • ๐Ÿ›  Fix precision default value