Artifact ca10437acd37c33a0ab4abee18067d089b0125a5a1c2724e283f7e677fe0aa27:
- Executable file
r37/lisp/csl/html/r37_0142.html
— 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: 1706) [annotate] [blame] [check-ins using] [more...]
<A NAME=COEFFN> <TITLE>COEFFN</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>COEFFN</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P> <P> <P> <P> The <em>coeffn</em> operator takes three arguments: an expression, a kernel, and a non-negative integer. It returns the coefficient of the kernel to that integer power, appearing in the expression. <P> <P> <P> <H3> syntax: </H3> <em>coeffn</em>(<expression>,<kernel>,<integer>) <P> <P> <P> <expression> must be a polynomial, unless <A HREF=r37_0322.html>ratarg</A> is on which allows rational expressions. <kernel> must be a kernel, and <integer> must be a non-negative integer. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> ff := x**7 + sin(y)*x**5 + y**4 + x + 7; 5 7 4 FF := SIN(Y)*X + X + X + Y + 7 coeffn(ff,x,5); SIN(Y) coeffn(ff,z,3); 0 coeffn(ff,y,0); 5 7 SIN(Y)*X + X + X + 7 rr := 1/y**2+y**3+sin(y); 2 5 SIN(Y)*Y + Y + 1 RR := -------------------- 2 Y on ratarg; coeffn(rr,y,-2); ***** -2 invalid as COEFFN index coeffn(rr,y,5); 1 --- 2 Y </TT></PRE><P>If the given power of the kernel does not appear in the expression , <em>coeffn</em> returns 0. Negative powers are never detected, even if they appear in the expression and <A HREF=r37_0322.html>ratarg</A> are on. <em>coeffn</em> with an integer argument of 0 returns any terms in the expression that do not contain the given kernel. <P> <P> <P>