Is there a good way to do this?(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to figure out a good way to calculate a^b mod m, but the problem is that b is huge and a is irrational, and therefore I am getting inaccurate values because too much precision is required. I'm trying to find a smaller, "equivalent" ^b mod m to use so that b is not so huge and thus not as much precision would be needed in my a-term.

Is this doable?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Shrinking down a^b mod m when b is huge and a is irrational?

**Physics Forums | Science Articles, Homework Help, Discussion**