Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# numlib::jacobi

Jacobi symbol

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```numlib::jacobi(a, m)
```

## Description

numlib::jacobi(a,m) returns the Jacobi symbol (a | m).

numlib::jacobi returns an error if one of its arguments evaluates to a number of wrong type.

## Examples

### Example 1

Computing the Jacobi symbol (222222 | 304679):

`numlib::jacobi(222222, 304679)`

### Example 2

Computing the Jacobi-Symbol (222222 | 324889):

`numlib::jacobi(222222, 324899)`

### Example 3

Computing the Jacobi symbol (222222 | 333333):

`numlib::jacobi(222222, 333333)`

## Parameters

 a An integer m An odd positive integer

## Return Values

numlib::jacobi(a,m) returns 0, 1, or -1, or the function call with evaluated arguments if one of the arguments is not a number.

## Algorithms

numlib::jacobi doesn't use ifactor.

If a is an integer and m is an odd integer not coprime to a then by definition the Jacobi Symbol (a | m) is zero.