euclidean: The Euclidean algorithm: Greatest common divisor of two...

Description Usage Arguments Value Source Examples

View source: R/euclidean.R

Description

The Euclidean algorithm: Greatest common divisor of two scalars

Usage

1
euclidean(a, b)

Arguments

a

A natural number.

b

A natural number.

Value

Returns the greatest common divisor of a and b

Source

https://en.wikipedia.org/wiki/Euclidean_algorithm

Examples

1
2
euclidean(123612, 13892347912) # = 4
euclidean(100, 1000) # = 100

TheodorEmanuelsson/dijkstrasAlgorithm documentation built on Dec. 18, 2021, 4:11 p.m.