(50G) Discrete Log Modulo a Prime - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (50G) Discrete Log Modulo a Prime (/thread-7925.html) |
(50G) Discrete Log Modulo a Prime - Gerald H - 03-12-2017 07:59 AM For input P a prime, B a primitive root of P & N an integer the programme finds the discrete logarithm of N for base B modulo P. For info on discrete logarithms please see https://en.wikipedia.org/wiki/Discrete_logarithm For a programme to test primitiveness see http://www.hpmuseum.org/forum/thread-7924.html eg For input 10007 666 1953 the programme returns 9868 meaning 666 ^ 9868 = 1953 mod 10007. Code:
|