routine is-prime
1 | class Int |
1.1 | (Int) routine is-prime |
Documentation for routine is-prime
assembled from the following types:
class Int
From Int
(Int) routine is-prime
Defined as:
multi sub is-prime (Int --> Bool)multi method is-prime (Int: --> Bool)
Returns True
if this Int
is known to be a prime, or is likely to be a prime based on a probabilistic Miller-Rabin test.
Returns False
if this Int
is known not to be a prime.
say 2.is-prime; # OUTPUT: «True»say is-prime(9); # OUTPUT: «False»