On Fri, 25 Nov 2016 11:10:47 +0300, Rasmus Lerdorf <ras...@lerdorf.com> wrote:

On Thu, Nov 24, 2016 at 11:54 PM, Craig Duncan <p...@duncanc.co.uk> 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 merging this?


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.

-Rasmus

I'm afraid majority of people (myself included) see number_format
and money_format not as a IEEE 754-accurate float value rendering functions.

Instead people use them for printing human-readable numbers, which
usually excludes implementation quirks such as negative zero or
`2.0` represented as `1.999~`.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to