Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Nikita Nefedov
On Fri, 25 Nov 2016 11:10:47 +0300, Rasmus Lerdorf wrote: On Thu, Nov 24, 2016 at 11:54 PM, Craig Duncan wrote: I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( https://bugs.php.net/bug.php?id=73581). Kalle suggested I

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Alex Bowers
Php doesn't have a concept of negative zero except in a string instance. And the main use case for this is displaying the number as a string which has very few real world use cases as being a negative zero. On 25 Nov 2016 9:05 am, "Craig Duncan" wrote: > On 25 November 2016

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Craig Duncan
On 25 November 2016 at 08:58, Sherif Ramadan wrote: > I'm pretty sure this is covered by the language reference [ > http://php.net/language.types.float] as per precision of floating point > numbers in PHP. Though I don't see much harm in adding a note with > references

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Sherif Ramadan
I'm pretty sure this is covered by the language reference [ http://php.net/language.types.float] as per precision of floating point numbers in PHP. Though I don't see much harm in adding a note with references there to the documentation for number_format(), if that's what you meant. On Fri, Nov

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Craig Duncan
On 25 Nov 2016 08:11, "Rasmus Lerdorf" wrote: > > This doesn't seem like a bug to me. Our floating point is all IEEE 754 and as per IEEE 754 -0.00 is the correct and expected result here. I've just read the link below and I'm inclined to agree on the technical reasoning.

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Rasmus Lerdorf
On Thu, Nov 24, 2016 at 11:54 PM, Craig Duncan wrote: > I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( > https://bugs.php.net/bug.php?id=73581). > > Kalle suggested I run the change by here to see if there are any concerns > or feedback about

[PHP-DEV] number_format() = "-0.00"

2016-11-24 Thread Craig Duncan
Hi internals, I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( https://bugs.php.net/bug.php?id=73581). Kalle suggested I run the change by here to see if there are any concerns or feedback about merging this? Thanks for your time, Craig