PackageTrack
Sign in Get early access

prestashop/decimal

Object-oriented wrapper/shim for BC Math PHP extension. Allows for arbitrary-precision math operations.

1.5.0 9.2M downloads/mo #1856 most downloaded on Packagist PrestaShop/decimal

What this package is like to depend on

Last release 5 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 1.9 years

Most releases are documented

notes for 5 of 6 stable releases

Nothing withdrawn

no release was ever pulled

9 years old

6 releases · first in 2017

0 releases in the last 12 months

see the full history below

Release timeline

6 releases · Aug 2017 to Feb 2022
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 6
  1. 1.5.0 02 Feb 2022
    Release notes

    This release fixes bug #19 and also contains multiple commits improving the CI.

    Open source →
  2. 1.4.0 08 Oct 2020
    Release notes

    This release rename calls.

    Previously, you call new PrestaShop\Decimal\Number.
    Now, you call new new PrestaShop\Decimal\DecimalNumber.

    But the call for new PrestaShop\Decimal\Number is always available for retrocompatibility, but deprecated.

    Open source →
  3. 1.3.0 15 Apr 2020
    Release notes

    This release adds a couple shorthand methods to perform comparisons with zero:

    $a = new PrestaShop\Decimal\Number('777.777');
    
    $a->equalsZero();               // returns false
    $a->isLowerThanZero();          // returns false 
    $a->isLowerOrEqualThanZero();   // returns false
    $a->isGreaterThanZero();        // returns true
    $a->isGreaterOrEqualThanZero(); // returns true
    Open source →
  4. 1.2.0 17 Jul 2019
    Release notes

    This version adds support for creating Numbers using the scientific notation (as described in the PHP documentation), as well as floats without leading zero (e.g. .001).

    Open source →
  5. 1.1.0 22 Aug 2017
    Release notes

    This minor version fixes an ambiguity in the way trailing zeroes are handled by Decimal.

    BCMath always returns trailing zeroes whereas Decimal 1.0 always strips them, unless the requested precision is greater than the number's (in that case it adds trailing zeroes).

    We fixed that ambiguity by exposing two methods instead of one:

    • toPrecision() - which always returns trailing zeroes
    • round() - which always strips trailing zeroes
    Open source →
  6. 1.0.0 10 Aug 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive