Feature #1108
New fn: IsCoprime (whenever gcd makes sense)
Status:
Closed
Priority:
Normal
Assignee:
Category:
New Function
Target version:
Description
Define a new fn IsCoprime
which is equivalent to IsInvertible(gcd(arg1, arg2))
JAA thinks it is better to write code like this:
if (IsCoprime(f,g)) { cmds; }
than like this:
if (gcd(f,g) == 1) { cmds; }
or like this:
if (IsInvertible(gcd(f,g))) { cmds; }
Related issues
History
#1 Updated by John Abbott over 6 years ago
The fn should be defined when gcd
makes sense (i.e. for true GCD domains and BigInt
).
At the moment I prefer the name IsCoprime
to AreCoprime
because most other boolean fns are called IsXYZ
and also AreCoprime
almost gives the idea that it could apply to a list (but with what semantics?)
#2 Updated by John Abbott over 6 years ago
- Status changed from New to Resolved
- Assignee set to John Abbott
- % Done changed from 0 to 80
I have written a first trivial implementation. Seems to work.
#3 Updated by John Abbott over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 80 to 100
#4 Updated by John Abbott over 1 year ago
- Related to Bug #1710: IsSqFree, IsIrred bugs in ZZ[x] and QQ[x] added