Program to demonstrate math error

Author(s): John (Basil) Wentworth
Publication: Update Magazine
Pub Details: Update January 1995
Date: January 1995
Pages: 22

22 AUGUST 1994

Dear Frank,

Here’s a puzzler that might be of interest to UPDATE readers. It’s a 2068 program.

You’ll notice glitches at (page = 2.3), (page = 9.5), and (page = 37.8). I didn’t pursue it beyond this number.

Maybe your readers can tell me what’s wrong?

Best regards,
Basil

 100 LET page=1
110 FOR f=353 TO 375
150 LET page=page+.1
160 LET panel=page-INT (page)
165 LET panel=.1*INT (10*panel)
250 PRINT page,panel
1000 NEXT f
1.1     0.1     | 7.7     0.6     | 36.3    0.3
1.2     0.2     | 7.8     0.7     | 36.4    0.4
1.3     0.3     | 7.9     0.8     | 36.5    0.5
1.4     0.4     | 8       0.9     | 36.6    0.6
1.5     0.5     | 8.1     0       | 36.7    0.7
1.6     0.6     | 8.2     0.1     | 36.8    0.8
1.7     0.7     | 8.3     0.2     | 36.9    0.9
1.8     0.8     | 8.4     0.3     | 37      0
1.9     0.9     | 8.5     0.4     | 37.1    0.1
2       0       | 8.6     0.5     | 37.2    0.2
2.1     0.1     | 8.7     0.6     | 37.3    0.3
2.2     0.2 ]   | 8.8     0.7     | 37.4    0.4
2.3     0.2 ]   | 8.9     0.8     | 37.5    0.5
2.4     0.3     | 9       0.9     | 37.6    0.6
2.5     0.4     | 9.1     0       | 37.7    0.7 ]
2.6     0.5     | 9.2     0.1     | 37.8    0.7 ]
2.7     0.6     | 9.3     0.2     | 37.9    0.8
2.8     0.7     | 9.4     0.3 ]   | 38      0.9
2.9     0.8     | 9.5     0.5 ]   | 38.1    0
3       0.9     | 9.6     0.6     | 38.2    0.1
3.1     0       | 9.7     0.7     | 38.3    0.2
3.2     0.1     | 9.8     0.8     | 38.4    0.3
3.3     0.2     | 9.9     0.9     | 38.5    0.4

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.