mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
By avoiding integer overflow in the implementation entirely. The multiplication was already explicitly checked for overflow, so also add a check for the addition and remove the overflow checks after the calculation.
This is bcmath, a library of arbitrary precision math routines. These routines, in a different form, are the routines that to the arbitrary precision calculations for GNU bc and GNU dc. This library is provided to make these routines useful in a larger context with less restrictions on the use of them. These routines do not duplicate functionality of the GNU gmp library. gmp is similar, but the actual computation is different.