0 'ARITH.BA - Author unknown
1 'CLUB 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE
2 O1 = 1.0:H1 = 0.5:Z0 = 0.0:M1 = -1.0:W1 = O1
3 W1 = W1 + W1:X = W1 + O1:Y = X - W1:Z = Y - O1:IF (M1 + ABS(Z)) < Z0 THEN 3
4 Y = O1
5 R1 = W1 + Y:Y = Y + Y:R1 = R1 - W1:IF R1 = Z0 THEN 5
6 PRINT "Radix = ";R1:P1 = Z0:F1 = O1
7 P1 = P1 + O1:F1 = F1 * R1:Y = F1 + O1:IF (Y - F1) = O1 THEN 7
8 PRINT "Precision = ";P1:PRINT "FpWidth = ";F1:U1 = O1/F1:PRINT "Closest relative separation found is UlpOne = ";U1:N1 = (H1 - U1) + H1:U2 = R1 * U1:R2 = R1 - O1:R2 = (R2 - U2) + O1:X = O1 - U1:Y = O1 - N1:Z = O1 - X:S = R1 - U2:T = R1 - R2
9 U = R1 - S:IF Y = U1 AND Z = U1 THEN 11
10 GOTO 14
11 IF T = U2 AND U = U2 THEN 13
12 GOTO 14
13 PRINT "Add/subtract has a guard digit as it should.":GOTO 15
14 PRINT "Add/subtract lack guard digit, cancellation obscured."
15 END