Re: [RFC] [Discussion] Change the edge case of round()

From: Date: Tue, 07 Nov 2023 23:58:22 +0000
Subject: Re: [RFC] [Discussion] Change the edge case of round()
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-121613@lists.php.net to get a copy of this message
On 8/11/23 03:06, Saki Takamachi wrote:
I have added as much of the rationale for the changes as I can think of to the RFC. I would be happy if you could see it again.
Thanks for the detailed RFC and the PR. I reviewed the RFC and the PR. I would vote in favour of this change. I look forward to seeing a PR for the manual which will better explain the limitations of decimal rounding of a binary floating point number. The current manual entry for round() makes it sound as if it will magically always work. I think, most often, round() is done on the result of some calculation, not on decimal literals. The previous implementation seems to prioritize rounding of decimal literals over correct rounding of the actual value. -- Tim Starling

« previous php.internals (#121613) next »