% File:  TAYLOR.DIF  (c)	07/18/81	The Soft Warehouse %


FUNCTION TAYLOR (EXPN, X, A, N,
    % Local % J, C, ANS, NUMNUM, DENNUM),
  WHEN POSITIVE (N) OR ZERO (N),
    NUMNUM: DENNUM: 30,
    J: ANS: 0,
    C: 1,
    LOOP
      ANS: ANS + C * EVSUB (EXPN, X, A),
      WHEN J=N, ANS EXIT,
      EXPN: DIF (EXPN, X),
      J: J + 1,
      C: C * (X-A) / J
    ENDLOOP EXIT,
  LIST ('TAYLOR, EXPN, X, A, N)
ENDFUN $

RDS () $
