Project

General

Profile

Feature #11003

Fast modular exponentiation

Added by venkatvb (venkatesh babu) about 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:<unknown>]

Description

I would like to suggest, implementing "fast Modular Exponentiation " (http://en.wikipedia.org/wiki/Modular_exponentiation) for fixnum class.
Eg: A function like pow(a, n, MOD) can be computed more efficiently than (a**n) % MOD


Related issues

Is duplicate of CommonRuby - Feature #12508: Integer#mod_powClosedmatz (Yukihiro Matsumoto)Actions

Also available in: Atom PDF