diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/algebra/algfunc.spad.pamphlet | 10 | ||||
-rw-r--r-- | src/algebra/color.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/fspace.spad.pamphlet | 6 | ||||
-rw-r--r-- | src/testsuite/interpreter/aw-23.input | 7 |
5 files changed, 24 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 78650627..637d3a64 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-10-13 Waldek Hebisch <hebisch@math.uni.wroc.pl> + + Fix AW/23 + * algebra/fspace.spad.pamphlet (isExpt): Tidy. + * algebra/algfunc.spad.pamphlet (inroot): Likewise. + 2008-10-13 Gabriel Dos Reis <gdr@cs.tamu.edu> Don't step over Common Lisp MAP. 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 diff --git a/src/algebra/color.spad.pamphlet b/src/algebra/color.spad.pamphlet index 54c5e403..a8a0e329 100644 --- a/src/algebra/color.spad.pamphlet +++ b/src/algebra/color.spad.pamphlet @@ -195,7 +195,7 @@ Palette(): Exports == Implementation where light c == [5,c] hue p == p.hueField shade p == p.shadeField - sample() == bright(sample()) + -- sample() == bright(sample()) coerce(c:Color):% == bright c coerce(p:%):OutputForm == hconcat ["[",coerce(p.hueField),"] from the ",SHADE.(p.shadeField)," palette"] diff --git a/src/algebra/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet index b5c57214..b7e0fcc5 100644 --- a/src/algebra/fspace.spad.pamphlet +++ b/src/algebra/fspace.spad.pamphlet @@ -830,12 +830,14 @@ FunctionSpace(R:OrderedSet): Category == Definition where isExpt(x:%, op:OP) == (u := isExpt x) case "failed" => "failed" - is?((u::Record(var:K, exponent:Z)).var, op) => u + v := (u::Record(var:K, exponent:Z)).var + is?(v,op) and #argument(v) = 1 => u "failed" isExpt(x:%, sy:SY) == (u := isExpt x) case "failed" => "failed" - is?((u::Record(var:K, exponent:Z)).var, sy) => u + v := (u::Record(var:K, exponent:Z)).var + is?(v, sy) and #argument(v) = 1 => u "failed" if R has RetractableTo Z then diff --git a/src/testsuite/interpreter/aw-23.input b/src/testsuite/interpreter/aw-23.input new file mode 100644 index 00000000..f6293584 --- /dev/null +++ b/src/testsuite/interpreter/aw-23.input @@ -0,0 +1,7 @@ +-- +-- expected +-- +exp^(log x) +exp^(2 * log x) +(exp^(log x))^2 + |