TI-BASIC:Gcd
From Learn @ Cemetech
Jump to navigationJump to searchCommand Summary
Finds the greatest common divisor of two values.
Command Syntax
gcd(value1, value2)
Menu Location
Press:
- MATH to access the Math menu.
- RIGHT to access the NUM submenu.
- 9 to select gcd(, or use arrows.
TI-83/84/+/SE
2 bytes
Returns the greatest common divisor (GCD) of two nonnegative integers. Also works on lists.
gcd(8,6) 2 gcd({9,12},6) {3 6} gcd({14,12},{6,8}) {2 4}
Error Conditions
- ERR:DIM MISMATCH is thrown if the arguments are two lists that don't have the same number of elements.
- ERR:DOMAIN is thrown if the arguments aren't positive integers (or lists of positive integers) less than 1e12.