Skip to content

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)
    }
    
    void IntNextPrime(Int *result, Int *value) {
        ValidateInt(result);
        ValidateInt(value);
    
    bool test_int_next_prime(void) {
        WriteFmt("Testing IntNextPrime\n");
    
        Int value = IntFromStr("1000000000");
        Str text = StrInit();
    
        IntNextPrime(&next, &value);
        text = IntToStr(&next);
Last updated on