Returns 1 for each series value that is prime, else 0.
ISPRIMES(series)
series |
- |
A series to test. |
A series or scalar is the input is a scalar.
W1: 0..8
W2: isprime(W1)
W2 contains the series {0, 0, 1, 1, 0, 1, 0, 1, 0} indicating the values {2, 3, 5, 7} are prime and {0, 1, 4, 6, 8} are not prime.
W1: 0..8
W2: W1[find(isprime(W1))]
W2 contains the series {2, 3, 5, 7}, the prime values of W1.
A prime number is a natural number (positive integer) with exactly two divisors, 1 and itself. Thus, 0 and 1 are not prime.