Releases: php-decimal/ext-decimal
Releases · php-decimal/ext-decimal
v2.0.1
Decimal v2.0.1
Stable release of the ext-decimal PHP extension with Rational number support.
(Version bumped from 2.0.0 which was previously published on PECL as alpha.)
Changes since v1.x
- 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. - Removed
signumandparitymethods. - 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.
Requirements
- PHP >= 8.2
- libmpdec
Install
pecl install decimal
or via PIE:
pie install php-decimal/ext-decimal
v2.0.0
Decimal v2.0.0
Stable release of the ext-decimal PHP extension with Rational number support.
Changes
- 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. - Removed
signumandparitymethods. - 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.
Requirements
- PHP >= 8.2
- libmpdec
Install
pecl install decimal-2.0.0.tgz
or via PIE:
pie install php-decimal/ext-decimal
v2.0.0-alpha
What's Changed
- Fix
isPositive()withNaNby @julienfalque in #68 - Fix registering object handlers on PHP 8.3 by @Majkl578 in #80
New Contributors
- @julienfalque made their first contribution in #68
- @Majkl578 made their first contribution in #80
Full Changelog: v1.4.0...v2.0.1-alpha
v1.5.0
What's Changed
- Fix
isPositive()withNaNby @julienfalque in #68 - Fix registering object handlers on PHP 8.3 by @Majkl578 in #80
New Contributors
- @julienfalque made their first contribution in #68
- @Majkl578 made their first contribution in #80
Full Changelog: v1.4.0...v1.5.0
v1.3.0
v2.0.0-alpha
Full Changelog: v2.0.0-alpha...v2.0.0-alpha
v1.3.0
Full Changelog: v1.2.0...v1.3.0
What's Changed
- Adds between(mixed, mixed) method to Decimal class by @fruit in #18
- fix test for PHP 7.4 by @remicollet in #25
- Fix #31: Use qcopy variant for abs calculation by @bobvandevijver in #32
New Contributors
- @fruit made their first contribution in #18
- @bobvandevijver made their first contribution in #32
Full Changelog: v1.3.0...v1.3.1
v1.3.0
Full Changelog: v1.2.0...v1.3.0
v1.2.0
v1.1.2
This version should not be used in a ZTS environment. Please use 1.2.0 instead.