Scilab 6.0.1
Change language to:
English - Français - Português - Русский

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

# lcm

### 呼び出し手順

```pp = lcm(p)
[pp, fact] = lcm(p)```

p

fact

pp

### 説明

`pp = lcm(p)` は,多項式ベクトル`p` の最小公倍数`pp`を計算します.

`[pp, fact] = lcm(p)` は,これに加えて以下のような ベクトル`fact`を計算します `p .* fact = pp * ones(p)`

If `p` is a set of integers with some negative ones, the returned value `pp` of their LCM is always positive.

If `p` is an array of decimal integers, they are priorly converted into `int32` before processing.

### 例

```//多項式の場合
s=poly(0,'s');
p=[s,s*(s+1)^2,s^2*(s+2)];
[pp,fact]=lcm(p);
p.*fact, pp
//整数の場合
V=int32([2^2*3^5, 2^3*3^2,2^2*3^4*5]);
lcm(V)```

### 参照

• gcd — Greatest (positive) Common Divisor
• bezout — Bezout法により、2つの多項式または2つの整数の最大公約数を計算します

### 履歴

 Version Description 6.0.1 For input integers possibly negative, the returned LCM is now always positive.
 Report an issue << gcd Discrete mathematics perms >>

 Copyright (c) 2022-2023 (Dassault Systèmes)Copyright (c) 2017-2022 (ESI Group)Copyright (c) 2011-2017 (Scilab Enterprises)Copyright (c) 1989-2012 (INRIA)Copyright (c) 1989-2007 (ENPC)with contributors Last updated:Mon Feb 12 23:12:39 CET 2018