3.9 Number theory
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SSL Interface
        • library(crypto): Cryptography and authentication library
          • Number theory
            • crypto_modular_inverse/3
            • crypto_generate_prime/3
            • crypto_is_prime/2
Availability::- use_module(library(crypto)).(can be autoloaded)
Source[semidet]crypto_is_prime(+P, +Options)
True iff P passes a probabilistic primality test. Options is a list of options. Currently, the only supported option is:
iterations(N)
N is the number of iterations that are performed. If this option is not specified, a number of iterations is used such that the probability of a false positive is at most 2^(-80).