Difference between revisions of "GCD Command"

From GeoGebra Manual
Jump to: navigation, search
m
Line 8: Line 8:
 
: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[{12, 30, 18}]</nowiki></code> yields ''6''.</div>}}
 
:{{example| 1=<div><code><nowiki>GCD[{12, 30, 18}]</nowiki></code> yields ''6''.</div>}}
==CAS Syntax==
+
 
;GCD[ <Number> , <Number> ]
+
{{hint|In the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] you can also use the following syntax:}}
:Calculates the greatest common divisor of the two numbers .
 
:{{example| 1=<div><code><nowiki>GCD[12, 15]</nowiki></code> yields ''3''.</div>}}
 
;GCD[ &lt;List of Numbers> ]
 
:Calculates the greatest common divisor of the list of numbers.
 
:{{example| 1=<div><code><nowiki>GCD[{12, 30, 18}]</nowiki></code> yields ''6''.</div>}}
 
 
;GCD[ <Polynomial>, <Polynomial> ]
 
;GCD[ <Polynomial>, <Polynomial> ]
 
:Calculates the greatest common divisor of the two polynomials.
 
:Calculates the greatest common divisor of the two polynomials.

Revision as of 11:37, 9 September 2015



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.


Note Hint: In the Menu view cas.svg 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.
© 2024 International GeoGebra Institute