Jacobi: Computation of the Jacobi Symbol for vli Objects

Description Usage Arguments Value Author(s) Examples

View source: R/Jacobi.R

Description

Computation of the Jacobi Symbol for vli (Very Large Integers) objects. The Jacobi Symbol is a generalization of the Legendre Symbol, not being necessary that n be a prime number.

It is needed in many algorithms of modular arithmetic, computational number theory and cryptography. For example, it is used by the present package in the Solovay-Strassen probabilistic primality test.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Jacobi(a, n)

## Default S3 method:
Jacobi(a, n)

## S3 method for class 'numeric'
Jacobi(a, n)

## S3 method for class 'vli'
Jacobi(a, n)

Arguments

a

object of class vli or 32 bits integer

n

positive odd integer; object of class vli or 32 bits integer

Value

object of class vli with value -1, 0 or 1.

Author(s)

Javier Leiva Cuadrado

Examples

1
2
3
x <- as.vli("342635653456")
y <- as.vli("3210591001")
Jacobi(x, y)

VeryLargeIntegers documentation built on March 26, 2020, 5:48 p.m.