GREATEST_COMMON_DIVISOR
Calculate greatest common divisor

Description

Given a list of numbers, calculates the greatest common divisor for them.

Function signature

1
GREATEST_COMMON_DIVISOR(list: Array) => Number
Copied!
Parameter
Description
List
List of numeric values

Examples

Formula
Return value
GREATEST_COMMON_DIVISOR([10, 100, 1000])
10
GREATEST_COMMON_DIVISOR([14, 21, 42])
7
GREATEST_COMMON_DIVISOR([12, 9, 15])
3
Last modified 11mo ago
Export as PDF
Copy link