Free42: Modulo Powering Programme - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not quite HP Calculators - but related (/forum-8.html) +--- Thread: Free42: Modulo Powering Programme (/thread-4018.html) |
Free42: Modulo Powering Programme - Gerald H - 05-29-2015 03:48 PM Free42 can reliably deal with exact calculations on integer arguments with 11 digits (possibly higher, but I'm not sure). The programme MOD↑ calculates the Yth power of Z modulo base X. eg For input 7777777 7777777 10^21 the programme returns 951673149961995347697. Remember: modulo powering provides a quick pseudo-prime test, namely if a ^ (b - 1) mod b = 1 it's a fairly safe bet b is prime. Code: 0. { 60-Byte Prgm } |