RosettaCodeData/Task/Modular-exponentiation/Quackery/modular-exponentiation.quackery
2023-07-01 13:44:08 -04:00

15 lines
407 B
Text

[ temp put 1 unrot
[ dup while
dup 1 & if
[ unrot tuck *
temp share mod
swap rot ]
1 >>
swap dup *
temp share mod
swap again ]
2drop temp release ] is **mod ( n n n --> n )
2988348162058574136915891421498819466320163312926952423791023078876139
2351399303373464486466122544523690094744975233415544072992656881240319
10 40 ** **mod echo