Difference between revisions of "GCD Command"
From GeoGebra Manual
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= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} |
− | {{command|cas=true|algebra}} | ||
{{Alternate Language|region=US|page_type=Command|US_version=GCD|non-US_version=HCF}} | {{Alternate Language|region=US|page_type=Command|US_version=GCD|non-US_version=HCF}} | ||
− | ;GCD | + | ;GCD( <Number>, <Number> ) |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
:Calculates the greatest common divisor of the two numbers . | :Calculates the greatest common divisor of the two numbers . | ||
− | :{{example| 1=<div><code><nowiki>GCD | + | :{{example| 1=<div><code><nowiki>GCD(12, 15)</nowiki></code> yields ''3''.</div>}} |
− | ;GCD | + | ;GCD( <List of Numbers> ) |
:Calculates the greatest common divisor of the list of numbers. | :Calculates the greatest common divisor of the list of numbers. | ||
− | :{{example| 1=<div><code><nowiki>GCD | + | :{{example| 1=<div><code><nowiki>GCD({12, 30, 18})</nowiki></code> yields ''6''.</div>}} |
− | ;GCD | + | |
+ | {{hint|In the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] you can also use the following syntax:}} | ||
+ | ;GCD( <Polynomial>, <Polynomial> ) | ||
:Calculates the greatest common divisor of the two polynomials. | :Calculates the greatest common divisor of the two polynomials. | ||
− | :{{example| 1=<div><code><nowiki>GCD | + | :{{example| 1=<div><code><nowiki>GCD(x^2 + 4 x + 4, x^2 - x - 6)</nowiki></code> yields ''x + 2''.</div>}} |
− | ;GCD | + | ;GCD( <List of Polynomials> ) |
: Calculates the greatest common divisor of the list of polynomials. | : Calculates the greatest common divisor of the list of polynomials. | ||
− | :{{example| 1=<div><code><nowiki>GCD | + | :{{example| 1=<div><code><nowiki>GCD({x^2 + 4 x + 4, x^2 - x - 6, x^3 - 4 x^2 - 3 x + 18})</nowiki></code> yields ''x + 2''.</div>}} |
+ | |||
+ | {{note|See also [[LCM Command]].}} |
Revision as of 12:51, 5 October 2017
This command differs among variants of English:
|
- GCD( <Number>, <Number> )
- Calculates the greatest common divisor of the two numbers .
- Example:
GCD(12, 15)
yields 3.
- GCD( <List of Numbers> )
- Calculates the greatest common divisor of the list of numbers.
- Example:
GCD({12, 30, 18})
yields 6.
Hint: In the CAS View you can also use the following syntax:
- GCD( <Polynomial>, <Polynomial> )
- Calculates the greatest common divisor of the two polynomials.
- Example:
GCD(x^2 + 4 x + 4, x^2 - x - 6)
yields x + 2.
- GCD( <List of Polynomials> )
- Calculates the greatest common divisor of the list of polynomials.
- Example:
GCD({x^2 + 4 x + 4, x^2 - x - 6, x^3 - 4 x^2 - 3 x + 18})
yields x + 2.
Note: See also LCM Command.