DEFDBL A-Z
SCREEN 12
WINDOW (0, -1.5)-(3.14, 1.5)
DEF fnfact (m)
P = 1
FOR r = 2 TO m
P = P * r
NEXT r
fnfact = P
END DEF
DEF fnpoly (x)
Sum = x
Sign = -1
FOR k = 3 TO 17 STEP 2
Sum = Sum + Sign * x ^ k / fnfact(k)
Sign = (-1) * Sign
NEXT k
fnpoly = Sum
END DEF
FOR x = 0 TO 3.14 STEP .01
LINE (x, fnpoly(x))-(x + .01, fnpoly(x + .01))
NEXT x