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 25, 2016 at 3:21 AM, Craig Duncan <p...@duncanc.co.uk> wrote: > On 25 Nov 2016 08:11, "Rasmus Lerdorf" <ras...@lerdorf.com> 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. > https://en.wikipedia.org/wiki/Signed_zero > I'm not sure of its practical usage in PHP, I think most of our developers > would expect "0.00", but bring consistent with IEEE 754 makes sense. > > Shall I add a note to the docs about this expected behaviour instead? >