Dear Waldek,

Waldek Hebisch <[EMAIL PROTECTED]> writes:

> In all places where isExpt is used for operators which have different number
> of arguments than 1 we need to insert explicit tests for operator and number
> of arguments.

I just did a quick check who uses isExpt with two arguments:

grep -nH -e "isExpt([^,]*,[^,]*)" *
algfunc.spad.pamphlet:449:        (u := isExpt(x, oproot)) case Record(var:K, 
exponent:Z) =>
combfunc.spad.pamphlet:521:          (u := isExpt(x := first l, OPEXP)) case 
"failed" => kernel(oppow, l)
combfunc.spad.pamphlet:548:        (u := isExpt(x, OPEXP)) case "failed" => 
kernel(oppow, l)
elemntry.spad.pamphlet:666:      (u := isExpt(x, opexp)) case Record(var:K, 
exponent:Integer) =>
manip.spad.pamphlet:374:        (u := isExpt(x, op)) case "failed" => 
kernel(op, [x, n::F])
transsolve.spad.pamphlet:199:       (u:=isExpt(f,"exp"::Symbol)) case 
Record(var:Kernel RE,exponent:Integer) =>       

(the other results are just the definitions in fspace.spad)


I think it would be best to remove the two argument form of isExpt entirely, or

1) leave it as it was and clarify the documentation:

         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(a1,a2,...)}.

2) and do the check for the number of arguments outside.

The usage with second argument being a symbol (in manip.spad) looks
particularly fishy to me, and I think it should be removed in any case.

I'll look at this a little later.


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