calculating decimal power of 10

2.7k views Asked by At

I need some help with this calculation :

10**7342345.54334 % m

I am calculating it in python but that says Result too large

pow(10,7342345.54334,m) 

Can not be used because all parameters must be integers. If I convert this decimal value to integer then the answer changes.

2

There are 2 answers

1
Ignacio Vazquez-Abrams On

107342345.54334 is equal to 107342345 times 100.54334. Now can you do it?

0
NPE On

Hint: Make use of the equivalence of the following expressions

expression 1

and

expression 2

For further details, see Modular exponentiation in Wikipedia.