Artifact 04904e32a35fd747163504e31bd067acb0d3607dea2426a01e9d77400804895d:
- Executable file
r37/packages/sum/sum.red
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 868) [annotate] [blame] [check-ins using] [more...]
module sum; % Driver for various sum capabilities. % Author: Anthony C. Hearn, derived from code by F. Kako and W. Koepf. create!-package('(sum sum2 complx prod),'(contrib sum)); % create!-package('(sum sum2 complx prod zeilberg),'(contrib sum)); fluid '(!*zeilberg); switch zeilberg; put('sum,'simpfn,'simp!-sum); symbolic procedure simp!-sum u; %ARGUMENT CAR U: expression of prefix form. % CADR U: kernel. % CADDR U: lower bound. % CADDDR U: upper bound. %value : expression of sq form. begin scalar y; y := cdr u; u := simp!* car u; return if null numr u then u else if atom y then !*p2f(car fkern(list('sum,prepsq u)) .* 1) ./ 1 else if !*zeilberg then gosper!*(mk!*sq u,y) else simp!-sum0(u,y) end; endmodule; end;