10 PRINT "PROGRAM FILE 116: EVALUATION OF SGN FUNCTION."
20 PRINT "    ANSI STANDARD 8.4"
30 PRINT
40 PRINT "SECTION 116.1: EVALUATION OF SGN FUNCTION."
50 PRINT
60 PRINT "THIS SECTION TESTS WHETHER THE SGN NUMERIC-SUPPLIED-FUNCTION"
70 PRINT "RETURNS THE CORRECT VALUE FOR A VARIETY OF ARGUMENTS."
100 PRINT
110 PRINT "                BEGIN TEST"
120 PRINT
130 LET F=0
140 PRINT " ","CORRECT","ACTUAL","TEST"
150 PRINT "ARGUMENT","VALUE","VALUE","RESULT"
160 PRINT
170 READ A,V
180 IF A=999 THEN 280
190 LET V1=SGN(A)
210 LET R$=" OK "
220 IF V=V1 THEN 260
240 LET R$="FAIL"
250 LET F=F+1
260 PRINT A,V,V1,R$
270 GOTO 170
280 PRINT
290 IF F=0 THEN 320
300 PRINT "*** TEST FAILED IN ";F;" CASE(S) ***"
310 GOTO 330
320 PRINT "*** TEST PASSED ***"
330 PRINT
340 PRINT "                 END TEST"
350 PRINT
360 PRINT "END PROGRAM 116"
370 DATA 0,0,1,1,-1,-1,3,1,-4,-1,86.1234,1,-345.678E22,-1
380 DATA +22.2222E-33,1,.0000000123,1
390 DATA 1E38,1,-1E38,-1,1E-38,1,-1E-38,-1,-0,0,+0,0
400 DATA -00.00E11,0
410 DATA 999,999
420 END
