BER program listing
Program:
«
x
«
'x/2' NUM 2 1
xover2 j sum
«
DO
sum
'sum+(-1)^(j/2)*
xover2^(2*j)/SQ(j!)'
EVAL
2 'j' STO+
DUP 'sum' STO
UNTIL
==
END
sum
»
»
»
`OBER K
Checksum: # 15837d
Bytes:
203
Example: Calculate BER(3).
J
3 %BER%
Calculate BER(2) in algebraic syntax.
O %BER% !Ü2
N
Animation of Successive Taylor's Polynomials
This section contains three programs that manipulate graphics objects to display a sequence of Taylor's
polynomials for the sine function.
SINTP draws a sine curve, and saves the plot in a variable.
!
2-30 RPL Programming Examples
Comments:
Creates local variable x.
Begins outer defining procedure.
Enters x/2, the first counter value, and
the first term of the series, then creates
local variables.
Begins inner defining procedure.
Begins the loop.
Recalls the old sum and calculates the
new sum.
Increments the counter.
Stores the new sum.
Ends the loop clause.
Tests the old and new sums.
Ends the loop.
Recalls the sum.
Ends inner defining procedure.
Ends outer defining procedure.
Stores the program in BER.