Fast Prime Number Generator

Category:
Dates and Math
Type:
Snippets
Difficulty:
Intermediate
Author:
Marcel Slooff

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This is a very efficient algorithm for generating prime numbers. It was tested on a PIII 500MHz and generated 1,000,000 primes in less than 5 minutes.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: