Property | Value |
---|---|
Hex Value | $BB09 |
Categories | |
Localizations |
|
gcd(
Overview
Returns the greatest common divisor of valueA
and valueB
, which can be real numbers or lists.
Availability: Token available everywhere.
Syntax
gcd(valueA,valueB)
Arguments
Name | Type | Optional |
---|---|---|
valueA | real|expression|real[] | |
valueB | real|expression|real[] |
Location
math, NUM
, 9:gcd(
Description
The gcd( command returns the greatest common divisor (GCD) of two nonnegative integers. It also works on lists.
gcd(8,6)
2
gcd({9,12},6)
{3 6}
gcd({14,12},{6,8})
{2 4}
Advanced Uses
A gcd( command can be nested inside another gcd( command to compare up to four numbers.
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.
Related Commands
See Also
Source: parts of this page were written by the following TI|BD contributors: burr, CloudVariable, DarkerLine, GoVegan, kg583, Myles_Zadok, thornahawk, Trenly.
History
Calculator | OS Version | Description |
---|---|---|
TI-83 | 0.01013 | Added |
Authors: