numbers (version 0.8-5)

coprime: Coprimality

Description

Determine whether two numbers are coprime, i.e. do not have a common prime divisor.

Usage

coprime(n,m)

Value

Logical, being TRUE if the numbers are coprime.

Arguments

n, m

integer scalars

Details

Two numbers are coprime iff their greatest common divisor is 1.

See Also

GCD

Examples

Run this code
coprime(46368, 75025)  # Fibonacci numbers are relatively prime to each other
coprime(1001, 1334)

Run the code above in your browser using DataLab