Page images
PDF
EPUB

200 PRINT +123456E27,+123456E+27 210 PRINT +123456.E27,+123456.E+27 220 PRINT +12345.6E28, +12345.6E+28 230 PRINT +1234.56E29, +1234.56E+29 240 PRINT +123.456E 30, +123.456E+30 250 PRINT +12.3456E31,+12.3456E+31 260 PRINT +1.23456E32, +1.23456E+32 270 PRINT +. 123456E33,+.123456E+33 280 PRINT +1.2345600000000E32, +1.2345600000000E+32 290 PRINT +.00000123456E38, +.00000123456E+38 300 PRINT +.00001234560000E 37, +.00001234560000E+37 310 PRINT 320 PRINT "*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT PRINT" 330 PRINT" AS '1.23456E+32' 340 PRINT 350 PRINT"

END TEST." 360 PRINT 363 PRINT "SECTION 10.2: POSITIVE NUMBER AND UNSIGNED SIGNIFICAND." 366 PRINT 367 PRINT"

BEGIN TEST." 368 PRINT 370 PRINT "SOURCE FORM: UNSIGNED SIGNIFICAND BOTH COLUMNS" 380 PRINT " UNSIGNED EXRAD

COLUMN 1" 390 PRINT " SIGNED EXRAD

COLUMN 2" 400 PRINT 430 PRINT 123456E27, 123456E+27 440 PRINT 123456.E27, 123456.E+27 450 PRINT 12345.6E28, 12345.6E+28 460 PRINT 1234.56E29, 1234.56E+29 470 PRINT 123.456 E 30, 123.456E+30 480 PRINT 12.3456E31, 12.3456E+31 490 PRINT 1.23456E32,1.23456E+32 500 PRINT .123456E33,.123456E+33 510 PRINT 1.2345600000000E32, 1.2345600000000E+32 520 PRINT .00000123456E38,.00000123456E+38 530 PRINT .00001234560000E37,.00001234560000E+37 540 PRINT 550 PRINT "*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT PRINT" 560 PRINT" AS '1.23456E+32' *** 570 PRINT 580 PRINT "

END TEST." 590 PRINT 593 PRINT "SECTION 10.3: NEGATIVE NUMBER AND SIGNED SIGNIFICAND." 595 PRINT 597 PRINT"

BEGIN TEST." 598 PRINT 600 PRINT "SOURCE FORM: SIGNED SIGNIFICAND BOTH COLUMNS" 610 PRINT"

UNSIGNED EXRAD

COLUMN 1" 620 PRINT "

SIGNED EXRAD

COLUMN 2" 630 PRINT

[ocr errors]
[ocr errors]
[ocr errors]

[ocr errors]
[ocr errors]

11

660 PRINT -123456E27.-123456E+27 670 PRINT -123456.E27,-123456.E+27 680 PRINT -12345.6E28,-12345.6E+28 690 PRINT -1234.56 E29,-1234.56E+29 700 PRINT -123.456E 30,-123.456E+30 710 PRINT -12.3456E31,-12.3456E+31 720 PRINT -1.23456E32,-1.23456E+32 730 PRINT -. 123456E33,-. 123456E+33 740 PRINT -1.2345600000000E32,-1.2345600000000E+32 750 PRINT -.00000123456E38,-.00000123456E+38 760 PRINT -.00001234560000E37,-.00001234560000E+37 770 PRINT 780 PRINT "*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT PRINT" 790 PRINT" AS '-1.23456E+32' **** 800 PRINT 810 PRINT "

END TEST." 820 PRINT 822 PRINT "SECTION 10.4: POSITIVE NUMBER AND NEGATIVE EXRAD." 824 PRINT 826 PRINT "

BEGIN TEST." 828 PRINT 830 PRINT "SOURCE FORM: SIGNED EXRAD

BOTH COLUMNS" 840 PRINT

SIGNED SIGNIFICAND COLUMN 1" 850 PRINT"

UNSIGNED SIGNIFICAND COLUMN 2" 860 PRINT 880 PRINT +123456E-29, 123456E-29 890 PRINT +123456.E-29, 123456.E-29 900 PRINT +12345.6E-28, 12345.6E-28 910 PRINT +1234.56E-27, 1234.56E-27 920 PRINT +123.456E-26, 123.456E-26 930 PRINT +12.3456E-25, 12.3456 E-25 940 PRINT +1.23456E-24, 1.23456E-24 950 PRINT +, 123456E-23,. 123456E-23

. 960 PRINT +1.2345600000000E-24, 1.2345600000000E-24

, 970 PRINT +.00000123456E-18,.00000123456E-18 980 PRINT +.00001234560000E-19,.00001234560000E-19 990 PRINT 1000 PRINT "*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT" 1010 PRINT " PRINT AS '1.23456E-24'

*** 1020 PRINT 1030 PRINT "

END TEST." 1040 PRINT 1042 PRINT "SECTION 10.5: NEGATIVE NUMBER AND NEGATIVE EXRAD." 1044 PRINT 1046 PRINT "

BEGIN TEST." 1048 PRINT 1050 PRINT "SOURCE FORM: SIGNED SIGNIFICAND COLUMN 1" 1060 PRINT "

SIGNED EXRAD

- COLUMN 1" 1070 PRINT

1100 PRINT -123456E-29
1110 PRINT -123456.E-29
1120 PRINT -12345.6E-28
1130 PRINT -1234.56E-27
1140 PRINT -123.456E-26
1150 PRINT -12.3456E-25
1160 PRINT -1.23456E-24
1170 PRINT -. 123456E-23
1180 PRINT -1.2345600000000E-24
1190 PRINT -.00000123456E-18
1200 PRINT -.0000 1234560000E-19
1210 PRINT
1220 PRINT "*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT"
1230 PRINT " PRINT AS '-1.23456E-240
1240 PRINT
1250 PRINT "

END TEST." 1260 PRINT 1270 PRINT "SECTION 10.6: MISCELLANEOUS NR3 CONSTANTS." 1280 PRINT 1290 PRINT "ON OUTPUT, TRAILING ZEROS MAY BE OMITTED IN THE FRACTIONAL" 1300 PRINT "PART OF THE SIGNIFICAND AND LEADING ZEROS MAY BE OMITTED IN" 1310 PRINT "THE EXRAD FOR NR3 CONSTANTS. THE FORMAT SHALL CONTAIN" 1320 PRINT "A PERIOD IN THE SIGNIFICAND AND A SIGN FOLLOWING THE E." 1330 PRINT "THE SIGNIFICAND MUST BE >=1 AND <10." 1340 PRINT 1350 PRINT

BEGIN TEST." 1360 PRINT 1363 PRINT "(EXPECTED OUTPUT DISPLAYED WITH ZEROS SUPPRESSED.)" 1366 PRINT 1370 PRINT "SOURCE","OUTPUT","ACTUAL" 1380 PRINT "CONSTANT","SHOULD BE", "OUTPUT" 1390 PRINT 1400 PRINT "1.E30"," 1.E+30", 1.E30 1410 PRINT "10.E30", " 1.E+31", 10.30 1420 PRINT "1E09"," 1.E+9", 1E09 1430 PRINT "25.01E036"," 2.501E+37", 25.01E036 1440 PRINT "25.01E36"," 2.501E+37", 25.01E36 1450 PRINT "-1.E30","-1.E+30".-1.E30 1460 PRINT "1E-30", " 1.E-30", 1E-30 1470 PRINT "-1E-30","-1.E-30",-10-30 1480 PRINT "1.000E034", " 1.E+34", 1.000E034 1500 PRINT 1510 PRINT "*** TEST PASSED IF ACTUAL OUTPUT MATCHES OUTPUT AS IT" 1520 PRINT" SHOULD BE ALLOWING FOR OPTIONAL TRAILING ZEROS IN" 1530 PRINT " THE SIGNIFICAND AND LEADING ZEROS IN THE EXRAD *** 1535 PRINT 1540 PRINT"

END TEST." 1550 PRINT 1560 PRINT "SECTION 10.7: NR3 CONSTANTS SEPARATED BY COMMAS TO PRODUCE" 1570 PRINT"

TABULAR OUTPUT." 1580 PRINT 1590 PRINT "

BEGIN TEST." 1600 PRINT

1610 PRINT "00000000011111111112222222222333333333344444444445"; 1620 PRINT "5555555556666666666777" 1630 PRINT "12345678901234567890123456789012345678901234567890"; 1640 PRINT "1234567890123456789012" 1650 PRINT 1E30,-9.87E-37, 1.23456E32 1660 PRINT -1.23456E32, +1.7865E36,5E-20 1670 PRINT +99E 10,-765.32E32, +0.00082E-9 1700 PRINT 1710 PRINT **** TEST PASSED IF THE FIRST THREE PRINT ZONES EACH CONTAIN" 1720 PRINT " A COLUMN OF NR3 NUMBERS **** 1730 PRINT 1733 PRINT "

END TEST." 1736 PRINT 1740 PRINT "SECTION 10.8: WIDTH FOR PRINTED E-FORMAT CONSTANTS" 1745 PRINT 1750 PRINT "THE SPACE FOR THE CONSTANT IS DELIMITED BY ASTERISKS." 1760 PRINT 1770 PRINT"

BEGIN TEST." 1780 PRINT 1790 PRINT "00000000011111111112222222222333333333344444444445"; 1800 PRINT "5555555556666666666777" 1810 PRINT "12345678901234567890123456789012345678901234567890"; 1820 PRINT "1234567890123456789012" 1830 PRINT "*";1.23456E32;"* 1840 PRINT "*";-1.23456E32;"*" 1850 PRINT "*";1.23456E-32;"*" 1860 PRINT "*":-1.23456E-32;"*" 1870 PRINT "*";0.123456E32;"*" 1880 PRINT 1890 PRINT **** TEST PASSED IF THE CONSTANTS ABOVE ARE PRECEDED BY A" 1900 PRINT " SPACE OR A MINUS AND ARE FOLLOWED BY A SPACE

*** 1910 PRINT 1920 PRINT "

END TEST." 1930 PRINT 2140 PRINT "END PROGRAM 10" 2150 END

[ocr errors]

PROGRAM FILE 10: PRINTING NR3 NUMERIC CONSTANTS.

ANSI STANDARD 5.2, 5.4, 12.4

THESE TESTS ASSUME THAT A MINIMUM OF SIX SIGNIFICANT DIGITS
WILL BE PRINTED. PROCESSORS WHICH PRINT MORE SIGNIFICANT
DIGITS SHOULD HAVE COMPARABLE ACCURACY.

NOTE THAT THE DISPLAYED STANDARD OUTPUT IS ORIENTED TO
THE MINIMAL REQUIREMENTS OF SIGNIFICAND-WIDTH, D,
EQUAL TO SIX, AND EXRAD-WIDTH, E, EQUAL TO TWO. FOR D > 6
AND E > 2, THERE MAY BE EXTRA TRAILING AND LEADING ZEROS,
RESPECTIVELY.

[ocr errors]

SECTION 10.1: POSITIVE NUMBER AND SIGNED SIGNIFICAND.

BEGIN TEST.

SOURCE FORM: SIGNED SIGNIFICAND - BOTH COLUMNS
UNSIGNED EXRAD

COLUMN 1
SIGNED EXRAD

COLUMN 2

[ocr errors]

1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32 1.23456E+32

*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT PRINT

AS '1.23456E+32'

END TEST.

SECTION 10.2: POSITIVE NUMBER AND UNSIGNED SIGNIFICAND.

BEGIN TEST.

SOURCE FORM: UNSIGNED SIGNIFICAND - BOTH COLUMNS
UNSIGNED EXRAD

COLUMN 1
SIGNED EXRAD

COLUMN 2

[blocks in formation]

*** TEST PASSED IF ALL THE NUMBERS IN THE ABOVE OUTPUT PRINT

AS '1.23456E+32'

***

END TEST.

SECTION 10.3: NEGATIVE NUMBER AND SIGNED SIGNIFICAND.

BEGIN TEST.

« PreviousContinue »