On Sat, Jun 21, 2014 at 9:45 AM, Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum 10353@lyskom.lysator.liu.se wrote:
So -0.0 is a thing. Should we fix any of these:
-0.0;
(1) Result: -0.0
equal(-0.0, 0.0);
(2) Result: 1
-0.0 < 0.0;
(4) Result: 0
These look fine. IEEE 754 says that negative and positive zero are equal.
decode_value(encode_value(-0.0));
(3) Result: 0.0
This is the only one that could be called wrong. I doubt it's going to have tripped people up, so changing it or not changing it could be simply a matter of convenience.
ChrisA
pike-devel@lists.lysator.liu.se