("runInShell" [visibleWhen notRunning] getDevicesFrom: "~installDir/veeos/lib/runInShell.vxe")
Determines if a number is prime.
Use whenever you would like to test a number to see if it is prime. A typical use would be to generate a set of primes for factorization.
menu: veeos ==> Math ==> isPrime
library: mathLib
o_isPrime(4) returns 0
o_isPrime(99961) returns 1
The algorithm used here is fairly brute-force but as such as about foolproof. While it is reasonably fast , it would not be appropriate to use for extremely large values.
VEE 7.0+, all platforms