Files
calc/help/isrel
2017-05-21 15:38:36 -07:00

36 lines
692 B
Plaintext

NAME
isrel - whether two values are relatively prime
SYNOPSIS
isrel(x, y)
TYPES
x int
y int
return int
DESCRIPTION
Determine if x and y are relatively prime. If gcd(x,y) == 1, then
return 1, otherwise return 0.
EXAMPLE
> print isrel(6, 5), isrel(5, 6), isrel(-5, 6)
1 1 1
> print isrel(6, 2), isrel(2, 6), isrel(-2, 6)
0 0 0
LIMITS
none
LIBRARY
BOOL zrelprime(ZVALUE x, y)
SEE ALSO
gcd,
isassoc, isatty, isblk, isconfig, isdefined, iserror, iseven, isfile,
ishash, isident, isint, islist, ismat, ismult, isnull, isnum, isobj,
isobjtype, isodd, isprime, isrand, israndom, isreal,
issimple, issq, isstr, istype