[Issue 8666] std.math.abs(int.min) returns int.min

2014-01-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=8666 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 8666] std.math.abs(int.min) returns int.min

2014-01-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=8666 --- Comment #3 from Don 2014-01-24 01:50:36 PST --- This is just a consequence of the fact that overflow checking never happens for integral types. int x = abs(int.min); returns an incorrect result, in the same way that int y = int.max + in

[Issue 8666] std.math.abs(int.min) returns int.min

2012-09-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8666 --- Comment #2 from Caligo 2012-09-16 10:53:57 PDT --- (In reply to comment #1) > This is a known anomaly. I assume you are proposing that returning long is the > right way to go about it, but it really isn't. > > One possibility would be to r

[Issue 8666] std.math.abs(int.min) returns int.min

2012-09-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8666 Andrei Alexandrescu changed: What|Removed |Added CC||and...@metalanguage.com --- Comm