aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/algfunc.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/algfunc.spad.pamphlet')
-rw-r--r--src/algebra/algfunc.spad.pamphlet10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/algebra/algfunc.spad.pamphlet b/src/algebra/algfunc.spad.pamphlet
index 3bd69cdc..7925927f 100644
--- a/src/algebra/algfunc.spad.pamphlet
+++ b/src/algebra/algfunc.spad.pamphlet
@@ -446,11 +446,13 @@ AlgebraicFunction(R, F): Exports == Implementation where
-- one?(x := first l) or one? n => x
((x := first l) = 1) or (n = 1) => x
(r := retractIfCan(x)@Union(R,"failed")) case R => iroot(r::R,n)
- (u := isExpt(x, oproot)) case Record(var:K, exponent:Z) =>
+ (u := isExpt(x)) case Record(var:K, exponent:Z) =>
pr := u::Record(var:K, exponent:Z)
- (first argument(pr.var)) **
- (pr.exponent /$Fraction(Z)
- (n * retract(second argument(pr.var))@Z))
+ is?(pr.var,oproot) and #argument(pr.var) = 2 =>
+ (first argument(pr.var)) **
+ (pr.exponent /$Fraction(Z)
+ (n * retract(second argument(pr.var))@Z))
+ inroot0(x, n, false, false)
inroot0(x, n, false, false)
-- removes powers of positive integers from numer and denom