10 PRINT "PROGRAM FILE 122: EXCEPTION - OVERFLOW ON VALUE OF"
15 PRINT "        EXP FUNCTION."
20 PRINT "    ANSI STANDARD 8.5"
30 PRINT
40 PRINT "SECTION 122.1: EXCEPTION - OVERFLOW ON VALUE OF"
50 PRINT "        EXP FUNCTION."
60 PRINT
70 PRINT "THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR"
80 PRINT "RECOGNIZES AN EXCEPTION WHEN THE VALUE RETURNED"
90 PRINT "BY THE EXP FUNCTION EXCEEDS MACHINE INFINITY."
100 PRINT
110 PRINT "TO PASS THIS TEST:"
120 PRINT
130 PRINT "    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE"
140 PRINT "       DISPLAYED, AND"
150 PRINT
160 PRINT "    2) THE PROGRAM MUST SUPPLY MACHINE INFINITY AND"
170 PRINT "       CONTINUE EXECUTION."
180 PRINT
190 PRINT "                               BEGIN TEST."
200 PRINT
205 PRINT
210 LET F=1.1
220 LET A=87
230 LET B=1
240 PRINT "ABOUT TO ATTEMPT EXP(";A;")"
250 LET C=EXP(A)
260 PRINT "VALUE RETURNED BY EXP = ";C
270 PRINT
280 PRINT "---------------------------------------"
290 PRINT
300 IF B=C THEN 350
310 LET B=C
320 LET F=F*1.1
330 LET A=A*F
340 GOTO 240
350 PRINT "LAST TWO INVOCATIONS OF EXP SHOULD HAVE BEEN REPORTED"
360 PRINT "AS OVERFLOW, AND MACHINE INFINITY SUPPLIED; IF SO,"
370 PRINT "***  TEST PASSED  ***  OTHERWISE  ***  TEST FAILED  ***"
380 PRINT
390 PRINT "                               END TEST."
400 PRINT
410 PRINT "END PROGRAM 122"
420 END
