Hi,
On 03.10.23 00:48, Jorg Sowa wrote:
Hello,
Recently I was trying to fix and clean some of the stuff within the BCmath
extension along with Girgias who helped me. I wanted to enrich this
extension with similar functions that GMP contains and improve the
performance, however, I went to some conclusions and stopped it.
1. BCMath extension isn't fast enough compared to other existing arbitrary
precision PHP extensions. Comparison:
https://php-decimal.github.io/#performance
2. BCMath doesn't have OO API and thus it may break the backward
compatibility as Claude noticed.
3. GMP GNU library provides support for float numbers, however, its
functionality is not exposed in the PHP extension. And BCMath doesn't
provide as many functions as GMP.
There was an RFC back in 2014 from Sara :
https://wiki.php.net/rfc/gmp-floating-point (never put to vote)
and another one from 2013 : https://wiki.php.net/rfc/gmp_number (never
put to vote).
Also I think to remember about a proposal to have GMP natively supported
for numbers in PHP but I can't find it anymore.
Kind regards,
Jorg
Best,
Marc