Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語

Please note that the recommended version of Scilab is 6.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Polynomials > bezout

bezout

Bezout equation for polynomials or integers

Calling Sequence

[thegcd,U]=bezout(p1,p2)

Arguments

p1, p2

two real polynomials or two integer scalars (type equal to 1 or 8)

thegcd

scalar of the same type as p1 and p2

U

2x2 matrix of the same type as p1 and p2

Description

[thegcd, U] = bezout(p1, p2) computes the GCD thegcd of p1 and p2, and in addition a (2x2) unimodular matrix U such that:

[p1 p2]*U = [thegcd 0]

The lcm of p1 and p2 is given by:

p1*U(1,2) (or -p2*U(2,2))

Examples

// Polynomials
x = poly(0,'x');
p1 = (x+1)*(x-3)^5;
p2 = (x-2)*(x-3)^3;
[pgcd,U] = bezout(p1, p2)
det(U)
clean([p1 p2]*U)
ppcm = p1*U(1,2)
lcm([p1 p2])

// Integers
i1 = int32(2*3^5);
i2 = int32(2^3*3^2);
[thegcd,U] = bezout(i1, i2)
V = int32([2^2*3^5 2^3*3^2 2^2*3^4*5]);
[thegcd,U] = gcd(V)
V*U
lcm(V)

// Doubles
i1 = 2*3^5;
i2 = 2^3*3^2;
[thegcd,U] = bezout(i1, i2)
V = [2^2*3^5 2^3*3^2 2^2*3^4*5];
[thegcd,U] = gcd(V)
V*U
lcm(V)

See Also

  • poly — определение полинома
  • roots — roots of polynomials
  • simp — rational simplification
  • clean — очищает матрицы (округление малых значений до нуля)
  • lcm — наименьшее общее кратное (НОК)
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 14:01:06 CEST 2014