Home Online Manual
Top
Back: binary_add
Forward: is_prime
FastBack:
FastForward:
Up: crypto_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.12.2.40 inverse_modulus

Procedure from library crypto.lib (see crypto_lib).

Usage:
inverse_modulus(num, mod1)

Return:
inverse element of num modulo mod1

Example:
 
LIB "crypto.lib";
ring r = 0,x,lp;
int mod1 = 13;
int num = 5;
inverse_modulus(num,mod1);
==> 8