Thread overview
[Issue 6244] Add powmod / modpow function to std.math
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=6244

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|future                      |D2

--
September 28, 2015
https://issues.dlang.org/show_bug.cgi?id=6244

--- Comment #1 from josvanuden@gmail.com <josvanuden@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;
}

--
October 07, 2017
https://issues.dlang.org/show_bug.cgi?id=6244

alex.jercaianu@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alex.jercaianu@gmail.com
           Assignee|nobody@puremagic.com        |alex.jercaianu@gmail.com

--
October 16, 2017
https://issues.dlang.org/show_bug.cgi?id=6244

--- Comment #2 from github-bugzilla@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 <andralex@users.noreply.github.com>

--
October 16, 2017
https://issues.dlang.org/show_bug.cgi?id=6244

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
December 18, 2017
https://issues.dlang.org/show_bug.cgi?id=6244

--- Comment #3 from github-bugzilla@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

--