decimal 2.0.1

Correctly-rounded arbitrary precision decimal floating-point arithmetic in PHP


Correctly-rounded arbitrary precision decimal floating-point arithmetic in PHP

License: MIT License

Changes

- Default decimal precision changed from 28 to 34.
- Decimal operations now use the **minimum** precision of all operands.
- Added `Decimal\Rational` implementation for rational numbers (fractions).
- Added `Decimal\Number` abstract class.
- Performance improvements, reduced object allocations.
- Private constructors, static initializers via `valueOf`.
- PHP 8.2, 8.3, and 8.4 compatibility.
- Fixed isPositive/isNegative to return false for zero values.
- Fixed array/debug output for Decimal and Rational objects.
- Renamed `toSci` to `toScientific`.