A simple sieve in Phobos?

safety0ff safety0ff.dev at gmail.com
Mon Mar 31 00:07:06 PDT 2014


On Monday, 31 March 2014 at 06:10:08 UTC, Dominikus Dittes 
Scherkl wrote:
> On Sunday, 30 March 2014 at 23:05:57 UTC, safety0ff wrote:
>
>> I find myself often reimplementing ilog2, isqrt, isPowerOf2,
> isPowerOf2 { x => (x && !(x & (x-1))) }

The point is that it should be in the standard library instead of 
copy pasted every time I have a short 1-file program that 
requires it.


More information about the Digitalmars-d mailing list