
Originally Posted by
TriLogic
Sorry if this sounds too confusing to be of any use.
It is. I need to study it more.

Originally Posted by
Pradeep1210
This is just a basic one and it takes less that half a second to list all primes upto 100,000
And if one wanted to run this indefinitely? What I mean is, it would take a bit more.
I appreciate everyone replies.
What I am using is below:
Code:
Function IsPrimeA(ByVal N As ULong) As Short
Dim C As ULong
IsPrimeA = 0
Half = N ^ 0.5
For C = 3 To Half Step 2
If N Mod C = 0 Then Exit Function
Next
IsPrimeA = 1
Return IsPrimeA
End Function