IntNextPrime
IntNextPrime
Description
Find the next probable prime greater than or equal to a value.
Parameters
| Name | Direction | Description |
|---|---|---|
result |
out | Destination for the prime |
value |
in | Starting point |
Usage example (from documentation)
IntNextPrime(&prime, &value);Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:1874:
}
void IntNextPrime(Int *result, Int *value) {
ValidateInt(result);
ValidateInt(value);- In
Int.Math.c:771:
bool test_int_next_prime(void) {
WriteFmt("Testing IntNextPrime\n");
Int value = IntFromStr("1000000000");- In
Int.Math.c:777:
Str text = StrInit();
IntNextPrime(&next, &value);
text = IntToStr(&next);
Last updated on