10 PRINT "PROGRAM FILE 123: EXCEPTION - UNDERFLOW ON VALUE OF"
20 PRINT "        EXP FUNCTION."
30 PRINT "    ANSI STANDARD 8.4, 8.6"
40 PRINT
50 PRINT "SECTION 123.1: EXCEPTION - UNDERFLOW ON VALUE OF"
60 PRINT "        EXP FUNCTION."
70 PRINT
80 PRINT "THE OBJECT OF THIS TEST IS TO SEE WHETHER THE PROCESSOR"
90 PRINT "RECOGNIZES AN EXCEPTION WHEN THE VALUE RETURNED"
100 PRINT "BY THE EXP FUNCTION IS LESS THAN MACHINE INFINITESIMAL"
110 PRINT "AND TO ENSURE THAT ZERO IS SUPPLIED ON UNDERFLOW."
120 PRINT
130 PRINT "TO PASS THIS TEST:"
140 PRINT
150 PRINT "    1) A MESSAGE IDENTIFYING AN EXCEPTION MAY BE"
160 PRINT "       DISPLAYED (NOT MANDATORY), AND"
170 PRINT
180 PRINT "    2) ZERO MUST BE SUPPLIED AS THE VALUE"
190 PRINT "       OF THE FUNCTION AND EXECUTION CONTINUES."
220 PRINT
230 PRINT
240 PRINT "                               BEGIN TEST."
250 PRINT
260 PRINT
270 LET F=1.1
280 LET A=-87
290 PRINT "ABOUT TO ATTEMPT EXP(";A;")"
300 LET C=EXP(A)
310 PRINT "VALUE RETURNED BY EXP = ";C
320 PRINT
330 PRINT "---------------------------------------"
340 PRINT
350 IF C=0 THEN 390
360 LET F=F*1.1
370 LET A=A*F
380 GOTO 290
390 PRINT "LAST INVOCATION OF EXP SHOULD HAVE BEEN REPORTED AS"
400 PRINT "UNDERFLOW IN ORDER TO COMPLY WITH ANSI RECOMMENDATION;"
410 PRINT
420 PRINT "***** TEST PASSES, SINCE ZERO WAS SUPPLIED.  *****"
430 PRINT
440 PRINT "                               END TEST"
450 PRINT
460 PRINT "END PROGRAM 123"
470 END
