## `numlib::jacobi` -- Jacobi symbol

#### Introduction

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

#### Call(s)

`numlib::jacobi(a, m)`

#### Parameters

`a` | - | an integer
`m` | - | an odd positive integer

#### Returns

`numlib::jacobi``(a,m)` returns a nonnegative integer, or the function call with evaluated arguments if one of the arguments is not a number.

#### Related Functions

`numlib::legendre`, `numlib::isquadres`

#### Details

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

#### Example 1

Computing the Jacobi symbol :

    >> numlib::jacobi(222222, 304679)

                                        -1

#### Example 2

Computing the Jacobi-Symbol :

    >> numlib::jacobi(222222, 324899)

                                         1

#### Example 3

Computing the Jacobi symbol :

    >> numlib::jacobi(222222, 333333)

                                         0

#### Background

- `numlib::jacobi` doesn't use `ifactor`.
- If is an integer and is an odd integer not coprime to then by definition the Jacobi Symbol is zero.

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000