Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PrimeNumbers] Can someone help me with this?

Expand Messages
  • nimzo_indy
    David Cleaver wrote: I m guessing MR is Miller-Rabin. If so, then your MR function is returning an integer value. The isPrime function
    Message 1 of 4 , May 18, 2006
      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.

      HTH,
      -David C.

      P.S. If MR is something other than miller-rabin, we'd like to hear
      about it!

      Yeah, MR is miller-rabin
    Your message has been successfully submitted and would be delivered to recipients shortly.