Chromium Code Reviews| Index: runtime/lib/double.dart |
| =================================================================== |
| --- runtime/lib/double.dart (revision 3960) |
| +++ runtime/lib/double.dart (working copy) |
| @@ -48,6 +48,10 @@ |
| double remainder_(double other) native "Double_remainder"; |
| double operator negate() { |
| + if (this == 0.0) { |
| + // -0.0 is canonicalized by the VM's parser, therefore no cycles. |
|
regis
2012/02/06 21:45:19
I do not understand this comment. Does it mean tha
srdjan
2012/02/06 22:07:24
Yes, it can, but it is important that -0.0 is not
|
| + return isNegative() ? 0.0 : -0.0; |
| + } |
| return 0.0 - this; |
| } |
| bool operator ==(other) { |