Status: Accepted
Owner: ----
Labels: Milestone-2.0 Type-Feature
New issue 7158 by
[hidden email]: Let 0.0 negated answer Float
negativeZero
http://code.google.com/p/pharo/issues/detail?id=7158I have this working correctly:
(SqNumberParser readSmalltalkNumberFrom: '-0.0') -> -0.0.
But note the difference with:
(Compiler evaluate: '-0.0') -> 0.0.
This is beacuse parser send negated by itself.
I suggest 0.0 negated -> -0.0.
This is easy to implement:
Float>>negated
^Float negativeZero - self
Then once we have boostrapped with above code, we can further simplify with
a literal:
Float>>negated
^-0.0 - self
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker