Re: [RFC] [Discussion] Change the edge case of round()
| From: | Saki Takamachi | Date: | Mon, 06 Nov 2023 12:12:40 +0000 |
| Subject: | Re: [RFC] [Discussion] Change the edge case of round() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121597@lists.php.net to get a copy of this message | ||
Hi Claude,
> Reading the RFC, it is unclear for me what are the benefits of the change, and whether it is
> worth the subtle breaking of existing code that implicitly relies on the current behaviour. “FP is
> just FP” looks like an ideal position, and one that has a counteragument given in the RFC that
> introduced the current behaviour.
>
> We could live with any behaviour of round(), and they are arguments on both sides. My issue at
> this point is not exactly what behaviour we have picked, but whether changing between the two is
> sufficiently motivated.
As for the motivation for the change, it's based on the idea that the current
round() behavior is some kind of bug.
In other words, the behavior of HALF_UP 0.285 to become 0.29 is itself a
bug.
To be honest, I'm completely neutral on this. I believe that this is a matter of will and what
we want to do. As far as I know, Tim and Gina want change on this issue. I don't want to ignore
such opinions and move forward with implementation, so I would like to hear a wider range of
opinions.
I have created this RFC in order to determine "our intention" once again.
Regards.
Saki