Download Wang 700 A/B

Transcript
Section V
Decision Commands
MARK
-
PRIME. Key X, SEARCH 0
.
0
X
2
ST DIR
REG 02
I
ST DIR
REG 01
I
•
U"l
0
.~
~
~
-0
-0
'"
"'"
E-"
-0
~
"
'"
--'"
~
;:l
'"
U
MARK
0800
REDIR
REG 02
.;. DIR
REG 01
REDIR
REG 01
Ex changes Tn
and S to save
previous S.
()
+
SKIP Y = X
Exits
from loop
when addition
of term no
longer affects
SEARCH
0800
STOP
sum.
The program calculates the sum
k
~
n=O
I
Xn
to 12 significant digits
for any value of x. The loop is performed many more times fat a smaller value of x than it
would be for a larger value of x, simply because the series converges faster for large values of
x. In all cases when Tn < 10- 1 I, the loop is terminated and the final sum is displayed in x
and y. If only three digits of accuracy were needed, each successive term could be compared
to 10- 3 ; and when Tn < 10- 3, the loop could be terminated.
5·7