next up previous index
Next: B300 An integral Up: CERNLIB Previous: B102 Hyperbolic Arcsine

B105 Value of a Polynomial

Routine ID: B105
Author(s): K.S. KölbigLibrary: MATHLIB
Submitter: Submitted: 01.12.1994
Language: FortranRevised:

Function subprograms RPLNML, DPLNML calculate the value of the polynomial

pn(x) = a0+a1x+a2x2+...+anxn

or

qn(x) = a0xn+a1xn-1+a2xn-2+...+an

for real values x, whereas function subprograms CPLNML, WPLNML calculate the value of the polynomial

rn(z) = c0+c1z+c2z2+...+cnzn

or

sn(x) = c0zn+c1zn-1+c2zn-2+...+cn

for complex values z.

On CDC and Cray computers, the double-precision versions DPLNML and WPLNML are not available.

Structure:

FUNCTION subprograms
User Entry Names: RPLNML, DPLNML, CPLNML, WPLNML

Usage:

For t=R (type REAL), t=D (type DOUBLE PRECISION),

    tPLNML(X,N,A,MODE)
has, in any arithmetic expression, the value pn(x) or qn(x) ;

for t=C (type COMPLEX), t=W (type COMPLEX*16),

    tPLNML(Z,N,C,MODE)
has, in any arithmetic expression, the value rn(z) or sn(z) .
X,Z
(type according to t) Arguments x or z, respectively.
N
( INTEGER) Degree n of pn(x), qn(x) or rn(z), sn(z) .
A,C
(type according to t) One-dimensional arrays of dimension (0:d) where d ≥N , containing the coefficients ak or ck (k=0,...,n) in A(k) or C(k), respectively.
MODE
( INTEGER) Either +1 for pn(x), rn(z) or -1 for qn(x), sn(z) .

Method:

The Horner scheme is used.

Notes:

A reference with N<0 or MODE different from +1 or -1 returns the value zero.

B300

K.S. Kölbig


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995