Re: [RFC] [Discussion] Fix up BCMath Number Class / Change GMP bool cast behavior
| From: | Saki Takamachi | Date: | Tue, 02 Jul 2024 11:05:27 +0000 |
| Subject: | Re: [RFC] [Discussion] Fix up BCMath Number Class / Change GMP bool cast behavior | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124175@lists.php.net to get a copy of this message | ||
Hi all,
> Hi internals,
>
> Created a follow-up RFC for the BCMath\Number class. This RFC also contains proposed changes to
> GMP's bool cast. I have proposed similar changes to BCMath, so for procedural efficiency I have
> combined them into the same RFC.
>
> Note that although they are combined into one RFC, these votes are taken independently.
>
> https://wiki.php.net/rfc/fix_up_bcmath_number_class
>
> Regards,
>
> Saki
Added changes to RFC. It is a proposal to remove all rounding during calculations due to convenience
issues and the fact that the functionality is "excessive" to begin with.
To be precise, it will have the same truncation behavior as the existing BCMath function, making it
impossible for users to change this behavior during calculations. If the user wants to perform
rounding, they must always use the
round() method.
Regards,
Saki