I am trying to solve a problem that requires me to find b^e mod m, where b is a rational base, e is a rational exponent, m is an integer, b^e can get really large.
I have tried the binary method and the memory efficient method described in this Wikipedia Page , however both algorithms do not support rational exponents (in binary approach, you can't convert rational number into binary, and for memory efficient, you can loop between rational numbers)). Is there any other method/algorithm that supports rational number (excluding the inefficient straight forward method)?