	double precision function  ppvalu( break , coef	, l	, k	,
     *			       x     , jderiv)
        implicit double precision (a-h,o-z)
c
c	function  ppvalu  calculates value at x of jderiv-th derivative
c	of fct from pp-representation
c
c	break, coef, l, k, ...
c				forms the pp-representation of the function
c				f to be evaluated. specifically,
c				the j-th derivative of	f  is given by
c
c				(d**j)f(x)  =
c					coef(j+1,i) + h*(coef(j+2,i) +
c					h*( ... (coef(k-1,i) +
c					h*(coef(k,i)/(k-j-1))/(k-j-2) ...)/2)/1
c
c				with  h:= x - break(i), and
c
c				i := max( 1 , max( j : break(j).le.x,
c						       1.le.j.le.l ) ).
c
c	x   			the point at which to evaluate.
c	jderiv			integer giving the order of the derivative
c				to be evaluated. assumed to be nonnegative.
c
c	ppvalue			the value of the (jderiv)-th derivative
c				of f at x.
c
	integer  jderiv, k     , l     , i    , m     , ndummy
c
	double precision break ( l    ), coef  ( k    , l    ), x     ,
     *		 fmmjdr, h
c
	ppvalu	=  0.
	fmmjdr	=  k - jderiv
c
c	derivatives of order k or higher are identically zero.
c
	if  (fmmjdr .le. 0)  go  to  99
c
c		find index i of largest breakpoint to the left of  x.
c
		call  interv( break , l     , x     , i     , ndummy)
c
c		evaluate jderiv-th derivative of i-th polynomial
c		piece at  x.
c
		h  =  x - break(i)
		do  10	m = k,jderiv+1,-1
			ppvalu	=  (ppvalu/fmmjdr)*h + coef(m,i)
			fmmjdr	=  fmmjdr - 1.
10		continue
99	continue
	return
	end
 

