- Add
Decimal.cast/1
- Add
Decimal.eq?/2
,Decimal.gt?/2
, andDecimal.lt?/2
- Add guards to
Decimal.new/3
to prevent invalid Decimal numbers
- Add
Decimal.sqrt/1
- Support for canonical XSD representation on
Decimal.to_string/2
- Fix exponent off-by-one when converting from decimal to float
- Fix negative?/1 and positive?/1 specs
- Deprecate passing float to
Decimal.new/1
in favor ofDecimal.from_float/1
- Add
Decimal.positive?/1
andDecimal.negative?/1
- Accept integers and strings in arithmetic functions, e.g.:
Decimal.add(1, "2.0")
- Add
Decimal.from_float/1
- Soft deprecate passing float to
new/1
in favor offrom_float/1
- 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
- Fix
Decimal.to_integer/1
for large coefficients - Fix rounding of ~0 values
- Fix errors when comparing and adding two infinities