BCMath: Supporting scientific notation
| From: | Saki Takamachi | Date: | Sat, 15 Mar 2025 00:14:31 +0000 |
| Subject: | BCMath: Supporting scientific notation | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-126775@lists.php.net to get a copy of this message | ||
Hi all!
In the following issue, there was a proposal to add support for scientific notation in BCMath.
https://github.com/php/php-src/issues/17876
I agree with this and have already created a prototype.
https://github.com/php/php-src/pull/18068
The prototype allows to pass scientific notation values to both functions and classes in the
same way as normal numeric string.
The Number class could add a method to convert strings to scientific notation, or it could simply
not accept scientific notation in the constructor and create a dedicated static method for it.
We can also choose not to accept scientific notation in BCMath functions.
Could you please give your opinion on this?
Regards,
Saki