3.9 Number theory
All
Application
Manual
Name
Summary
Help
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)
[det]
crypto_modular_inverse
(
+X, +M, -Y
)
Compute the modular multiplicative inverse of the integer
X
.
Y
is unified with an integer such that
X
*
Y
is congruent to 1 modulo
M
.