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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.