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::igcdmult

Extended Euclidean algorithm for integers

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::igcdmult(par1, par2, …)

Description

numlib::igcdmult is an extension of the kernel function igcdex.

numlib::igcdmult returns an error if the arguments evaluate to numbers which are not all of the correct type.

For integers a_1,a_2,...,a_n, numlib::igcdmult(a_1,a_2,...,a_n) returns a list [d, v1, …, vn] of integers such that d is the nonnegative greatest common divisor of a_1,a_2,...,a_n and d = a_1*v_1 + a_2*v_2 + ...+ a_n*v_n.

For integers a_1,a_2,...,a_n, numlib::igcdmult(a_1,a_2,...,a_n) returns a list [d, v1, …, vn] of integers such that d is the nonnegative greatest common divisor of a_1,a_2,...,a_n and d = a_1*v_1 + a_2*v_2 + ...+ a_n*v_n.

Examples

Example 1

Computing the greatest non-negative common divisor d of 455, 385, 165, 273 and integers v1, v2, v3, v4 such that d = 455 v1 + 385 v2 + 165 v3 + 273 v4:

numlib::igcdmult(455,385,165,273)

Parameters

par1

Integer

par2, …

Integers

Return Values

List of integers, or the function call with evaluated arguments if some argument is not a number.

See Also

MuPAD Functions

Was this topic helpful?