frac_lcm: Least common multiple and greatest common divisor

Description Usage Arguments Value Examples

View source: R/frac_lcm.R

Description

Least common multiple and greatest common divisor

Usage

1
2
3

Arguments

...

Integer vectors or vectors that can be coerced to integer.

max

If the least common multiple is greater than max, max is returned instead.

Value

An integer.

Examples

1
2
3
4
5
6
7
8
9
frac_lcm(1, 2, 3, 4, 5, 6)
x <- 1:6
frac_lcm(x)
frac_lcm(x, 7)

frac_gcd(12, 42, 60)
y <- c(12, 42, 60)
frac_gcd(y)
frac_gcd(y, 39)

fracture documentation built on Sept. 8, 2020, 5:06 p.m.