core.checkedint added to druntime

David Nadlinger via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Jun 20 04:46:36 PDT 2014


On Thursday, 19 June 2014 at 03:42:11 UTC, David Bregman wrote:
> I think the mulu implementation is incorrect. There can be an 
> overflow even when r = 0. For example consider the int version 
> with x = y = 1<<16.

I also noticed this; another easy counter-example would be 1<<32 
for ulong multiplication.

Filed as: https://issues.dlang.org/show_bug.cgi?id=12958


More information about the Digitalmars-d-announce mailing list