16. Jacobi Symbol {VeryLargeIntegers}R Documentation

Computation of the Jacobi Symbol for vli Objects

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

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

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

[Package VeryLargeIntegers version 0.2.1 Index]