Difference between revisions of "LCM Command"

From GeoGebra Manual
Jump to: navigation, search
m (Bot: Automated text replacement (-{{command +{{command|cas=true))
Line 3: Line 3:
 
UK English: LCM = lowest common multiple
 
UK English: LCM = lowest common multiple
 
; LCM[Number a, Number b]: Calculates the least common multiple of two numbers ''a'' and ''b''.
 
; LCM[Number a, Number b]: Calculates the least common multiple of two numbers ''a'' and ''b''.
 +
:{{example| 1=<div><code><nowiki>LCM[12, 15]</nowiki></code> yields ''60''.</div>}}
 
; LCM[List of numbers]: Calculates the least common multiple of the elements of the list.
 
; LCM[List of numbers]: Calculates the least common multiple of the elements of the list.
 +
:{{example| 1=<div><code><nowiki>LCM[{12, 30, 18}]</nowiki></code> yields ''180''.</div>}}
 
==CAS Syntax==
 
==CAS Syntax==
 
; LCM[Number a, Number b]
 
; LCM[Number a, Number b]
 
: Calculates the least common multiple of numbers ''a'' and ''b''.
 
: Calculates the least common multiple of numbers ''a'' and ''b''.
 +
:{{example| 1=<div><code><nowiki>LCM[12, 15]</nowiki></code> yields ''60''.</div>}}
 
;LCM[List of Numbers]
 
;LCM[List of Numbers]
 
: Calculates the least common multiple of the list of numbers.
 
: Calculates the least common multiple of the list of numbers.
 +
:{{example| 1=<div><code><nowiki>LCM[{12, 30, 18}]</nowiki></code> yields ''180''.</div>}}
 
;LCM[Polynomial, Polynomial]
 
;LCM[Polynomial, Polynomial]
 
: Calculates the least common multiple of the two polynomials.
 
: Calculates the least common multiple of the two polynomials.
 +
:{{example| 1=<div><code><nowiki>LCM[x^2 + 4 x + 4, x^2 - x - 6]</nowiki></code> yields ''x³ + x² - 8x - 12''.</div>}}
 
;LCM[List of Polynomials]
 
;LCM[List of Polynomials]
 
: Calculates the least common multiple of the list of polynomials.
 
: Calculates the least common multiple of the list of polynomials.
 +
:{{example| 1=<div><code><nowiki>LCM[{x^2 + 4 x + 4, x^2 - x - 6, x³ - 4x² - 3x + 18}]</nowiki></code> yields ''x⁴ - 2x³ - 11x² + 12x + 36''.</div>}}

Revision as of 16:12, 26 October 2011


UK English: LCM = lowest common multiple

LCM[Number a, Number b]
Calculates the least common multiple of two numbers a and b.
Example:
LCM[12, 15] yields 60.
LCM[List of numbers]
Calculates the least common multiple of the elements of the list.
Example:
LCM[{12, 30, 18}] yields 180.

CAS Syntax

LCM[Number a, Number b]
Calculates the least common multiple of numbers a and b.
Example:
LCM[12, 15] yields 60.
LCM[List of Numbers]
Calculates the least common multiple of the list of numbers.
Example:
LCM[{12, 30, 18}] yields 180.
LCM[Polynomial, Polynomial]
Calculates the least common multiple of the two polynomials.
Example:
LCM[x^2 + 4 x + 4, x^2 - x - 6] yields x³ + x² - 8x - 12.
LCM[List of Polynomials]
Calculates the least common multiple of the list of polynomials.
Example:
LCM[{x^2 + 4 x + 4, x^2 - x - 6, x³ - 4x² - 3x + 18}] yields x⁴ - 2x³ - 11x² + 12x + 36.
© 2024 International GeoGebra Institute