All notable changes to this project will be documented in this file. This project follows Semantic Versioning.
- Default decimal precision changed from 28 to 34 to match Decimal128.
- Decimal operations now use the minimum precision of all operands, rather than the maximum.
- Added
Decimal\Rationalimplementation for rational numbers (fractions). - Added
Decimal\Numberabstract number class. - Added
Decimal\Precisioninterface. - Added
Decimal\Decimal::reducemethod. - Renamed
toScitotoScientific. - Remove
signummethods. - Remove
paritymethods. - Better consistency around scientific notation when converting to string or JSON.
- Precision is now applied on operations only (input is preserved).
- Decimal constructors are now private - must use
\Decimal\Number::valueOf. - Performance improvements, reduced object allocations.
- PHP 8.2, 8.3, and 8.4 compatibility.
- Fixed
isPositive/isNegativeto return false for zero values. - Fixed array/debug output for Decimal and Rational objects.
- Fixed sqrt of -INF returning -INF rather than NAN. #13
- Disable opcache pass 2 due to numeric string to float casts. Thanks @krakjoe
- Change signum of NAN returning 1, now throws RuntimeException. #10
- Change toInt of NAN and INF returning 0, now throws RuntimeException. #11
- Fix pthreads incompatibility (properly). #12
- Fix pthreads incompatibility. #12
- Fix
signumreturning 1 for zero, instead of 0. #9
- Added
trimmethod to Decimal to trim trailing zeroes.
- Added docs and tests to package.xml @remicollet
- Smarter libmpdec lib check in config.m4 @remicollet
- Initial public release, request for comments.