Difference between revisions of "LCM Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
(command syntax: changed [ ] into ( ))
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}}
{{command|cas=true|algebra}}
 
 
UK English: LCM = lowest common multiple
 
UK English: LCM = lowest common multiple
;LCM[ <Number a>, <Number b>]
+
;LCM( <Number>, <Number> )
:Calculates the least common multiple of two numbers ''a'' and ''b''.
+
:Calculates the least common multiple of two numbers.
:{{example| 1=<div><code><nowiki>LCM[12, 15]</nowiki></code> yields ''60''.</div>}}
+
:{{example| 1=<div><code><nowiki>LCM(12, 15)</nowiki></code> yields ''60''.</div>}}
;LCM[ <List of numbers>]
+
;LCM( &lt;List of Numbers> )
:Calculates the least common multiple of the elements of the list.
+
:Calculates the least common multiple of the elements in the list.
:{{example| 1=<div><code><nowiki>LCM[{12, 30, 18}]</nowiki></code> yields ''180''.</div>}}
+
:{{example| 1=<div><code><nowiki>LCM({12, 30, 18})</nowiki></code> yields ''180''.</div>}}
==CAS Syntax==
+
 
;LCM[ <Number a>, <Number b> ]
+
{{hint|In the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] you can also use the following syntax:}}
:Calculates the least common multiple of numbers ''a'' and ''b''.
+
;LCM( <Polynomial>, <Polynomial> )
:{{example| 1=<div><code><nowiki>LCM[12, 15]</nowiki></code> yields ''60''.</div>}}
 
;LCM[ <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> ]
 
 
: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 <math>x^3 + x^2 - 8 x - 12</math>.</div>}}
+
:{{example| 1=<div><code><nowiki>LCM(x^2 + 4 x + 4, x^2 - x - 6)</nowiki></code> yields <math>x^3 + x^2 - 8 x - 12</math>.</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 polynomials in the list.
:{{example| 1=<div><code><nowiki>LCM[{x^2 + 4 x + 4, x^2 - x - 6, x^3 - 4 x^2 - 3 x + 18}]</nowiki></code> yields <math>x^4 - 2 x^3 - 11 x^2 + 12 x + 36</math>.</div>}}
+
:{{example| 1=<div><code><nowiki>LCM({x^2 + 4 x + 4, x^2 - x - 6, x^3 - 4 x^2 - 3 x + 18})</nowiki></code> yields <math>x^4 - 2 x^3 - 11 x^2 + 12 x + 36</math>.</div>}}
 +
 
 +
 
 +
{{note|See also [[GCD Command]].}}

Latest revision as of 12:54, 5 October 2017


UK English: LCM = lowest common multiple

LCM( <Number>, <Number> )
Calculates the least common multiple of two numbers.
Example:
LCM(12, 15) yields 60.
LCM( <List of Numbers> )
Calculates the least common multiple of the elements in the list.
Example:
LCM({12, 30, 18}) yields 180.


Note Hint: In the Menu view cas.svg CAS View you can also use the following syntax:
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^3 + x^2 - 8 x - 12.
LCM( <List of Polynomials> )
Calculates the least common multiple of the polynomials in the list.
Example:
LCM({x^2 + 4 x + 4, x^2 - x - 6, x^3 - 4 x^2 - 3 x + 18}) yields x^4 - 2 x^3 - 11 x^2 + 12 x + 36.


Note: See also GCD Command.
© 2024 International GeoGebra Institute