Primality Test VHDL - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Primality Test VHDL

Hi!

I need to develop a primality test in VHDL. In fact, i am triying to implement Miller and Rabin primality test.

Do you know where can I find this implemented?

Thanks a lot!

Comments

  • Razorback64Razorback64 Posts: 2Member
    Yes. Classic brute force approach. In fact you can leave out steps 2,3,4, and 5, as they are part of 6. But the algorithm is not well determined. How are you going to find the primes m < sqrt(N)? You could try creating a set of primes less than sqrt(N) using the sieve of Eratosthenes, iteratively, and trying each new prime as a divisor as you go along constructing the set, if all you want to do is see if N is prime. I'm sure there are better algorithms.
Sign In or Register to comment.