[Issue 20205] std.math: Wrong result for abs(int.min)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 4 12:17:28 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20205
--- Comment #9 from Dominikus Dittes Scherkl <dominikus at scherkl.de> ---
(In reply to Ajieskola from comment #8)
> The fix had to be reverted, due to confusion and code breakage it would have
> caused - see Dlang Bot links.
I can't see why it is confusing that the result of abs() is unsigned.
Vice versa - the absolute value is especially designed to result in an unsigned
type and I find it heavily irritating that it doesn't.
> So the original issue still persists.
Yeah. Bad design.
> I personally think this should be left as-is.
So I will continue to use my better approach instead of phobos. Sic.
--
More information about the Digitalmars-d-bugs
mailing list