In a recent thread Rodger Rosenbaum suggested:

Quote:

Try doing the sin cos tan atan acos asin test all on one command line with starting values of 6,7,8,10,11, and 12 degrees and see if the results are all as good as when starting with 9 degrees.

I responded with the results with my Durabrand 828. I have since completed tests over the same input value range with several other machines as shown in the following table:

N N - f(N)where getting the results in tabular form takes more time than getting them. As expected the machines which carried more digits yielded better results. I note that only the TI-59 showed one result (for 6) which was much better than the typical values.Durabrand TI-30 HP-41/67 TI-59 HP-28 TI-85

5 +3.15E-09 -1.67E-01 +1.20E-04 -3.60E-05 +3.35E-06 -7.27E-08

6 +3.23E-09 -1.69E-01 -4.44E-04 +4.32E-08 +1.64E-06 +3.36E-08

7 +2.73E-09 -1.07E-01 +4.80E-04 -6.55E-05 -3.18E-06 +6.49E-08

8 +6.02E-10 -1.68E-01 -2.88E-04 -1.60E-05 +2.88E-06 +9.61E-09

9 +1.92E-09 -1.77E-01 -4.17E-04 -4.66E-06 +1.36E-06 +3.04E-08

10 +5.93E-10 -1.53E-01 +1.83E-04 -5.28E-05 +3.35E-06 +2.99E-08

11 +3.79E-10 -4.49E-02 -3.40E-04 -5.21E-05 +2.47E-06 +2.20E-08

12 +4.07E-10 -8.59E-02 -1.09E-04 -2.91E-05 +1.55E-06 -3.62E-08

13 +6.10E-10 -1.05E-01 -3.07E-05 -4.12E-05 +1.89E-07 -1.67E-08

14 +8.09E-09 -9.36E-02 -5.02E-05 -3.12E-05 -5.47E-07 -1.81E-08

15 +1.43E-09 -6.49E-02 -1.27E-04 -3.12E-05 -2.97E-07 -1.15E-08

20 +8.93E-10 -5.29E-02 -1.28E-04 -7.38E-06 -8.10E-07 -9.06E-09

25 +5.44E-10 -2.20E-02 +2.74E-05 -9.42E-06 -5.76E-07 -6.33E-09

30 +3.09E-10 -4.53E-02 +5.90E-05 -1.78E-06 -9.43E-07 +3.78E-09

In the same thread Rodger proposed some arithmetic tests of calculators and computers which do not use higher math functions:

Quote:

Here is a test that only checks the caalculator's basic arithmetic accuracy. It is based on the observation that if you reciprocate certain integers twice, you don't get the original integer back, and indeed you shouldn't on a finite precision BCD machine.For example, type 6 1/x 1/x and you should see 5.99999999... on any calculator that does rounded arithmetic properly. If you see exactly 6 then the calculator isn't displaying all the digits in the result, or it's a "pleaser", like the HP30 (you should get 6.00000...0002 if it truncates properly).

So, the idea is to program a loop, apply 1/x twice for a range of integers, each time subtracting the result from the original integer that was reciprocated, and summing the absolute values of those small differences. This is another of my "what should we get" tests, because the result is determinate; there is a correct result, depending on how many digits are used, and the rounding mode.

Here's the program:

10 N=500 REM NUMBER OF ITERATIONS

20 S=0 REM INITIALIZE RUNNING SUM

30 FOR I = 1 TO N

40 S=S+ABS(I-1/(1/I))

50 NEXT I

60 PRINT S

Rodger gave a result for the HP-71 and suggested "I'm sure you'll want to try it on your own calculators." I started with my old Radio Shack Model 100 which carries thirteen or fourteen digits depending on whether the value to the left of the decimal point has an odd or even number of digits. The sum was 1.9564E-09 .

Rodger also suggested that

Quote:

The square root function is also specified by the IEEE, so line 40 in the program can be modified to:40 S=S+ABS(I-SQRT(I)*SQRT(I))

and the program should give a specific result on a compliant machine.

I tried that on my Model 100. The sum was 7.9719E-09 . Then, I remembered that there are 22 perfect squares between 1 and 500 which should yield zeros for the value (I-SQRT(I)*SQRT(I)) . I added a couple of lines to the program which would count the occurrences of zeroes. The program reported 84 zeroes instead of the expected 22. I returned line 40 to the original format which tests reciprocals and found that the program reported 300 zeroes.

I tried the reciprocal and square root tests on the HP-41, HP-33s, TI-59, TI-85 and Durabrand 828 with the following results:

Reciprocal Test Square root - square TestI don't understand why the TI-59 only gets the expected 22 zeroes. I will try to look harder at how I am doing the Durabrand 828 tests. I remember that back when I was doing square root of two - squared tests on the Casio fx-7000G I had to be careful or adjacent square roots and squares would somehow just cancel each other out.Sum Zeroes Sum Zeroes

Model 100 1.956E-09 300 7.972E-09 84

HP-41 6.134E-06 397 3.217E-05 206

HP-33s 6.803E-08 389 3.127E-07 204

TI-59 6.894E-09 402 3.843E-07 22

TI-85 7.353E-10 386 5.743E-09 142

828 0 500 0 500