iscoprime: Tests if two integers are coprime.

Description Usage Arguments Value References Examples

Description

Two integers a and b are said to be relatively prime (also called relatively prime) if they share no positive divisors except 1.

Usage

1
iscoprime(a, b)

Arguments

a

First integer

b

Second integer

Value

TRUE if given integers are coprime, FALSE otherwise

References

Cormen, T., Leiserson, C., Rivest, R., & Stein, C. (2009). Introduction to algorithms (3rd ed., pp. 931). Cambridge (Inglaterra): Mit Press. Weisstein, Eric W. "Relatively Prime." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/RelativelyPrime.html

Examples

1
2
iscoprime(2, 3)
iscoprime(2, 4)

aschleg/numberr documentation built on May 14, 2019, 10:31 a.m.