Re: [PrimeNumbers] Can someone help me with this?
- David Cleaver <wraithx@...> wrote:
I'm guessing MR is Miller-Rabin. If so, then your MR function is
returning an integer value. The isPrime function is returning a
boolean value of "True" or "False". When you run the line:
if Result <> isprime(p)
It is always true because your integer Result never equals the boolean
from isprime(). Unless of course your MR routine already returns a
boolean, and then it disagrees in every single case with isprime().
If thats the case, then you might want to return the opposite of what
you are currently returning.
P.S. If MR is something other than miller-rabin, we'd like to hear
Yeah, MR is miller-rabin