Could we have mod in std.math?
    bearophile 
    bearophileHUGS at lycos.com
       
    Sat Dec 24 13:12:31 PST 2011
    
    
  
Caligo:
> I'm hoping to see something like the above mod function in Phobos someday.
I'd like that, for both int/long/BigInts. And I'd like some functions for BigInts:
- divmod: returns both % and div and %, but it's more efficient if you need both values;
- gcd
- pow: with a third optional argument (like in Python pow built-in) to quickly compute (x ^^ y) % z.
Bye,
bearophile
    
    
More information about the Digitalmars-d
mailing list