From: Srijayanth Sridhar Date: 2009-06-17T22:03:20+09:00 Subject: Re: Miller–Rabin primality test --001e680f11ec1b533c046c8aead3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I mean when n>0 Jayanth On Wed, Jun 17, 2009 at 6:32 PM, Srijayanth Sridhar wrote: > (a ** ((2 ** r) * d)) % n == -1 > > > Can that be true? Can a remainder ever be negative? > > Jayanth > > > On Wed, Jun 17, 2009 at 6:28 PM, Ftf 3k3 wrote: > >> Lars Christensen wrote: >> >> > You don't say what you expected and how it actually works. >> > >> > Hint: How big a number is (a ** ((2 ** r) * d)) ? >> >> I expect it to return 'YES' if the number is prime and otherwise 'NO'. >> Unfortunately, it returns 'NO' all the time. >> -- >> Posted via http://www.ruby-forum.com/. >> >> > --001e680f11ec1b533c046c8aead3--