From: Srijayanth Sridhar Date: 2009-06-17T22:02:37+09:00 Subject: Re: Miller–Rabin primality test --000e0cd4cce0b03f71046c8ae78f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit (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/. > > --000e0cd4cce0b03f71046c8ae78f--