Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

numlib::jacobi

Jacobi symbol

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

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.

See Also

MuPAD Functions

Was this topic helpful?