PrecisionCalc
xl
Precision
Get Your Numbers Right
xlpISPRIME
Determines whether a number is prime, with up to 32,767 significant digits of precision. Returns TRUE if number is prime; returns FALSE if not. Returns #NUM! if input cannot be resolved to a valid integer.
Caution: using xlpISPRIME on large numbers can take hours or days or longer to calculate.
Requires the 5,000 SD edition of xlPrecision or higher, or the Free Edition.
Syntax
xlpISPRIME(num)
num | Required. The number to determine whether it is prime. |
Remarks
num can accept both numbers and text.
num can accept text formatted with the local currency symbol and thousands separators, and negatives can be formatted with either a leading hyphen or parentheses.
num can accept text up to 32,767 characters long.
Examples
Formula | Description | Result |
=xlpISPRIME(7) | Determines whether 7 is prime | TRUE |
=xlpISPRIME(4) | Determines whether 4 is prime | FALSE |
=xlpISPRIME(3.2) | Determines whether 3.2 is prime | #NUM! (error because 3.2 is not an integer) |
=xlpISPRIME("abc") | Determines whether "abc" is prime | #NUM! (error because "abc" is not an integer) |