Modular exponentiation: Difference between revisions
Content deleted Content added
Draft change! Increase result from 20 to 40 digits. Adjust some programs to match. |
m →{{header|Java}}: Update to 40 digits |
||
Line 72: | Line 72: | ||
BigInteger b = new BigInteger( |
BigInteger b = new BigInteger( |
||
"2351399303373464486466122544523690094744975233415544072992656881240319"); |
"2351399303373464486466122544523690094744975233415544072992656881240319"); |
||
BigInteger m = new BigInteger(" |
BigInteger m = new BigInteger("10000000000000000000000000000000000000000"); |
||
System.out.println(a.modPow(b, m)); |
System.out.println(a.modPow(b, m)); |
||
Line 78: | Line 78: | ||
}</lang> |
}</lang> |
||
Output: |
Output: |
||
<pre> |
<pre>1527229998585248450016808958343740453059</pre> |
||
=={{header|Perl}}== |
=={{header|Perl}}== |