      double precision function DSPLY(AVAR,N,DX,CVAR)
      integer N
      double precision AVAR(20), CVAR(N), DX
      integer I, NX
      include 'UNITS.INC'
      if (N.lt.1 .or. N.gt.100) go to 110
      DSPLY = AVAR(N+1)
      do 100 I = 1, N
         NX = N-I+1
         DSPLY = DSPLY*(DX-CVAR(NX))+AVAR(NX)
100   continue
      go to 120
110   continue
      write (TTYOUT(MACHNO),5000)
5000  format (1X,'Error in Subroutine DSPLY.')
      DSPLY = 0.0D+00
120   continue
      return
      end
