Bezout法により、2つの多項式または2つの整数の最大公約数を計算します
thegcd = bezout(p1,p2) [thegcd, U] = bezout(p1,p2)
2つの実数多項式または2つの整数スカラー(8型)
scalar with the type of p1
:
The Greatest Common Divisor of p1
and p2
.
2x2
unimodular matrix of the type of p1
,
such that [p1 p2]*U = [thegcd 0]
.
[thegcd,U]=bezout(p1,p2)
は GCD,
p1
および p2
の
thegcd
および
以下のような(2x2) ユニモジュラ行列U
を計算します:
[p1,p2]*U = [thegcd,0]
p1
およびp2
のlcmは
以下のように指定されます:
p1*U(1,2)
(または -p2*U(2,2)
)
// 多項式の場合 x = poly(0,'x'); p1 = (x+1)*(x-3)^5; p2 = (x-2)*(x-3)^3; [thegcd, U] = bezout(p1,p2) det(U) clean([p1,p2]*U) thelcm = p1*U(1,2) lcm([p1,p2]) // 整数の場合 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) | ![]() | ![]() |
Version | Description |
6.0.1 | The second output U is now optional. |