Dear Waldek,

I do not really understand your patch to isExpt.

         isExpt:(%,OP) -> Union(Record(var:K,exponent:Z),"failed")
           ++ isExpt(p,op) returns \spad{[x, n]} if \spad{p = x**n}
           ++ and \spad{n <> 0} and \spad{x = op(a)}.
         isExpt:(%,SY) -> Union(Record(var:K,exponent:Z),"failed")
           ++ isExpt(p,f) returns \spad{[x, n]} if \spad{p = x**n}
           ++ and \spad{n <> 0} and \spad{x = f(a)}.

>From the documentation I'd think that 

(1) -> p := sum(1/i, i=0..n)

         n
        --+   1
   (1)  >     -
        --+   i
        i= 0
                                         Type: Union(Expression(Integer),...)

(2) -> isExpt(p^2, operator first kernels p)

               n
              --+   1
   (2)  [var= >     -,exponent= 2]
              --+   i
              i= 0
  Type: Union(Record(var: Kernel(Expression(Integer)),exponent: Integer),...)

But it seems that after the patch, this is not the case anymore.

Furthermore:

Index: src/algebra/algfunc.spad.pamphlet
===================================================================
--- src/algebra/algfunc.spad.pamphlet   (Revision 392)
+++ src/algebra/algfunc.spad.pamphlet   (Arbeitskopie)
@@ -446,11 +446,13 @@
 --        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 => 

shouldn't the test for oproot be enough?

+              (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)
 


Martin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to