Artifact 6f3276eae06e0fd3c4085455cf5132f8a1c3080251fa3ca31d5606f3a6e1a88a:
- Executable file
r37/packages/misc/comfac.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: 891) [annotate] [blame] [check-ins using] [more...]
- Executable file
r38/packages/misc/comfac.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: 891) [annotate] [blame] [check-ins using]
module comfac; % Multivariate common factor/content routines. % Author: Anthony C. Hearn. % Copyright (c) 1989 The RAND Corporation. All Rights Reserved. symbolic smacro procedure domain!-gcd(u,v); gcdn(u,v); symbolic smacro procedure domain!-onep u; onep u; symbolic procedure mv!-pow!-zerop u; null u or zerop car u and mv!-pow!-zerop cdr u; symbolic procedure mv!-pow!-gcd(u,v); if null u then nil else min(car u,car v) . mv!-pow!-gcd(cdr u,cdr v); symbolic procedure mv!-content u; % Finds the term that is the content of u. if null u then nil else begin scalar x,y; x := mv!-lc u; y := mv!-lpow u; a: u := mv!-red u; if null u or domain!-onep x and mv!-pow!-zerop y then return mv!-!.!*(y,x); x := domain!-gcd(x,mv!-lc u); y := mv!-pow!-gcd(y,mv!-lpow u); go to a end; endmodule; end;