Search:

Type: Posts; User: manny721

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    6,698

    I changed the code a bit and it works for...

    I changed the code a bit and it works for integers below 100 but for every odd number above 100 it returns the number as prime. I'll post the code below :-

    #include<iostream>#include<math.h>...
  2. Replies
    7
    Views
    6,698

    Sorry, for begin so ambigious and tanks for the...

    Sorry, for begin so ambigious and tanks for the advice.
    I got the pseudocode from my textbook. It is as follows:-

    1) Find an odd integer 's' such that p-1=(2^r) *s.

    2) Select at random a...
  3. Replies
    7
    Views
    6,698

    I made the changes u suggested but, the program...

    I made the changes u suggested but, the program is still returning all odd numbers as prime.



    /* miller-rabin */


    #include<iostream>
    #include<stdlib.h>
    #include<math.h>
  4. Replies
    7
    Views
    6,698

    Miller-Rabin primality Test Error

    Hi! I am having problems with this program, for every odd number it returns the number as prime.

    here's my program


    /* Miller-Rabin Primality Test * By- manny721
    * 15 oct 2011
    * */
Results 1 to 4 of 4