Mir Random [WIP]

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 24 05:50:42 PST 2016


On Thursday, 24 November 2016 at 12:02:22 UTC, John Colvin wrote:
> Because it's correct. If a.length is larger than int.max then 
> cast(int)a.length will half the time be negative and therefore 
> a simple rightshift would not be equivalent to division by 2.

It can't be possibly correct when a.length is larger than int.max 
because it doesn't recover information lost in a narrowing 
conversion.


More information about the Digitalmars-d mailing list