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

2023-11-09 Thread Saki Takamachi
Hi Jordan, > I think this makes much more sense if PHP programmers had internal access > to the float type in PHP, but that's not the case. You cannot choose > between float representations, you cannot easily examine the mantissa bits > directly. In the absence of stuff like that, I think the

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

2023-11-09 Thread Jordan LeDoux
On Mon, Oct 23, 2023 at 4:14 AM Saki Takamachi wrote: > Hi, internals > > I would like to start the discussion for my RFC "Change the edge case of > round()”. > https://wiki.php.net/rfc/change_the_edge_case_of_round < > https://wiki.php.net/rfc/adding_bcround_bcfloor_bcceil_to_bcmath> > >

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

2023-11-08 Thread Saki Takamachi
I forgot to quote again. > It might make sense to also put some info what other languages / dbs do. For > example Python round(0.285, 2) result is 0.28 and it's got also decimal > parameter. If you can find other implementations that have got such function, > that would be great! Added

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

2023-11-08 Thread Saki Takamachi
Hi Jakub, Thank you for the advice! Added results for Ruby, Python, and major DBs. Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-11-08 Thread Jakub Zelenka
On Wed, Nov 8, 2023 at 9:40 AM Saki Takamachi wrote: > I added and modified into the RFC. I would be happy if you could check it > out. > It looks much better. It might make sense to also put some info what other languages / dbs do. For example Python round(0.285, 2) result is 0.28 and it's

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

2023-11-08 Thread Saki Takamachi
Hi Jakub, I added and modified into the RFC. I would be happy if you could check it out. Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-11-07 Thread Saki Takamachi
Hi Tim, > 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. Yes, as Jakub pointed out, there was a lack of explanation

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

2023-11-07 Thread Saki Takamachi
Hi Jakub, > please do not top post - you might want to check these rules for PHP mailing > lists: https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md > if you haven't seen them already ;) I intended to post with all the quotes deleted, but it seems I was wrong. > It would be

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

2023-11-07 Thread Tim Starling
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

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

2023-11-07 Thread Jakub Zelenka
Hi, please do not top post - you might want to check these rules for PHP mailing lists: https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md if you haven't seen them already ;) On Tue, Nov 7, 2023 at 4:07 PM Saki Takamachi wrote: > I have added as much of the rationale for the

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

2023-11-07 Thread Saki Takamachi
Hi Mike, I'm still new to RFC and your advice would be very helpful. 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. Thank you, regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

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

2023-11-07 Thread Michael Wallner
On Mon, 6 Nov 2023 21:12:40 +0900, Saki Takamachi wrote: Hi Saki! > 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

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

2023-11-06 Thread Saki Takamachi
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

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

2023-11-05 Thread Claude Pache
> Le 5 nov. 2023 à 08:31, Saki Takamachi a écrit : > Hi, > > It's almost been two weeks since I opened this discussion. If there are no > other opinions, I am thinking of starting a vote tomorrow or later. > > Regards. > > Saki Hi Saki, Reading the RFC, it is unclear for me what are the

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

2023-11-05 Thread Saki Takamachi
Hi, It's almost been two weeks since I opened this discussion. If there are no other opinions, I am thinking of starting a vote tomorrow or later. Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-10-23 Thread Saki Takamachi
Hi, Max This was originally discussed in a pull request. If you're interested in the original discussion, check out this pull request. https://github.com/php/php-src/pull/12268 Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

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

2023-10-23 Thread Max Semenik
This sounds like a subtle breakage to a lot of code. Could you elaborate the motivation for such change? One sentence doesn't seem enough. Also, have you tried assessing how much existing code might be affected? On Mon, Oct 23, 2023 at 2:19 PM Saki Takamachi wrote: > Sorry, I posted a

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

2023-10-23 Thread Saki Takamachi
Sorry, I posted a completely unrelated URL. Correct url: https://wiki.php.net/rfc/change_the_edge_case_of_round Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] [RFC] [Discussion] Change the edge case of round()

2023-10-23 Thread Saki Takamachi
Hi, internals I would like to start the discussion for my RFC "Change the edge case of round()”. https://wiki.php.net/rfc/change_the_edge_case_of_round Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To