PreviousPrime (Float function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 21: | Line 21: | ||
===See also=== | ===See also=== | ||
[[List of | [[List of intrinsic Float methods]] | ||
[[Category: Intrinsic Float methods|PreviousPrime function]] | [[Category: Intrinsic Float methods|PreviousPrime function]] | ||
[[Category: Intrinsic methods]] | [[Category: Intrinsic methods]] |
Revision as of 15:59, 29 December 2010
This intrinsic function returns the prime number that immediately precedes the method object value.
The PreviousPrime function is available as of version 7.3 of the Sirius Mods.
PreviousPrime syntax
%value = number:PreviousPrime
Syntax terms
- %value
- A numeric variable to receive the method result.
- number
- A Float value.
Usage Notes
- The method object value is initially rounded to the nearest integer before the preceding prime is determined.
- If number rounds to 2 or less or is greater than 231-1, the request is cancelled.
- PreviousPrime always returns a value lower than the method object value, even if the method object value is prime.
Examples
The following statement returns “2.8:previousPrime = 2”.
PrintText {~} = {2.8:previousPrime}
See also
List of intrinsic Float methods