[Issue 6244] Add powmod / modpow function to std.math
https://issues.dlang.org/show_bug.cgi?id=6244 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7781aaa7b1b50858c459372b291fd80092f5ef18 Fix Issue 6244 - Add powmod / modpow function to std.math https://github.com/dlang/phobos/commit/24cc67c1576c8da291d5812bc31279d8e871bdf2 Merge pull request #5761 from jercaianu/powmod --
[Issue 6244] Add powmod / modpow function to std.math
https://issues.dlang.org/show_bug.cgi?id=6244 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 6244] Add powmod / modpow function to std.math
https://issues.dlang.org/show_bug.cgi?id=6244 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7781aaa7b1b50858c459372b291fd80092f5ef18 Fix Issue 6244 - Add powmod / modpow function to std.math addmod for powmod powm refactor supports unsigned added more tests specify imported symbols spaces around casts review comments https://github.com/dlang/phobos/commit/24cc67c1576c8da291d5812bc31279d8e871bdf2 Merge pull request #5761 from jercaianu/powmod Fix Issue 6244 - Add powmod / modpow function to std.math merged-on-behalf-of: Andrei Alexandrescu <andra...@users.noreply.github.com> --
[Issue 6244] Add powmod / modpow function to std.math
https://issues.dlang.org/show_bug.cgi?id=6244 alex.jercai...@gmail.com changed: What|Removed |Added CC||alex.jercai...@gmail.com Assignee|nob...@puremagic.com|alex.jercai...@gmail.com --
[Issue 6244] Add powmod / modpow function to std.math
https://issues.dlang.org/show_bug.cgi?id=6244 --- Comment #1 from josvanu...@gmail.com--- ulong powmod(ulong b, ulong e, ulong m) { ulong r = 1; for (; e > 0; e >>= 1) { if (e & 1) { r = (r * b) % m; } b = (b * b) % m; } return r; } --
[Issue 6244] Add powmod / modpow function to std.math
https://issues.dlang.org/show_bug.cgi?id=6244 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|future |D2 --