All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added an option to
cmp
to normalize values values before comparison (default istrue
, i.e., compare mathematical values).
normalize
method (can now be safely defined in user space asnew Decimal128(x.toString())
.- Option to normalize strings in the constructor (we now accept the given digit string as-is)
- Restore possibility to specify rounding mode in arithmetic operations and constructor (#72)
- Addition, subtraction, multiplication, division, and remainder are now static methods. This is a breaking change.
sqrt
pow
reciprocal
truncate
,floor
, andceil
(useround
instead)
- Rounding modes for all operations (#54)
- LICENSE file
- Ensure that the NPM package is nice and lean (#57) by removing unnecessary files and dependencies
toExponentialString
: Output a sign (+
or-
) in the exponent part. This is a breaking change.- Fused multiply-and-add (
multiplyAdd
)
- Square root operation
- Internal change in the representation of not-a-number and +/- infinity. No user-visible changes.
- We now support non-normalized decimals, i.e. decimals with a non-zero integer part. This is a breaking change for some use cases. In this approach, trailing zeros are not removed; they are considered significant. For instance,
0.25
plus0.75
is now1.00
, not1
.
round
now takes a number argument (default 0) to specify the index of the decimal digit after which rounding should take place (#45)
pow
for raising a decimal to a power (#43)