|
|
1.1 ! root 1: c comment section ! 2: c ! 3: c fm041 ! 4: c ! 5: c this routine tests arithmetic assignments of the ! 6: c form integer variable = primary ** primary ! 7: c where the first of two primaries is an integer variable or an ! 8: c integer constant and the second primary is an integer constant. ! 9: c ! 10: c references ! 11: c american national standard programming language fortran, ! 12: c x3.9-1978 ! 13: c ! 14: c section 4.3, integer type ! 15: c section 4.3.1, integer constant ! 16: c section 6.1, arithmetic expressions ! 17: c section 10.1, arithmetic assignment statement ! 18: c ! 19: c ! 20: c ********************************************************** ! 21: c ! 22: c a compiler validation system for the fortran language ! 23: c based on specifications as defined in american national standard ! 24: c programming language fortran x3.9-1978, has been developed by the ! 25: c federal cobol compiler testing service. the fortran compiler ! 26: c validation system (fcvs) consists of audit routines, their related ! 27: c data, and an executive system. each audit routine is a fortran ! 28: c program, subprogram or function which includes tests of specific ! 29: c language elements and supporting procedures indicating the result ! 30: c of executing these tests. ! 31: c ! 32: c this particular program/subprogram/function contains features ! 33: c found only in the subset as defined in x3.9-1978. ! 34: c ! 35: c suggestions and comments should be forwarded to - ! 36: c ! 37: c department of the navy ! 38: c federal cobol compiler testing service ! 39: c washington, d.c. 20376 ! 40: c ! 41: c ********************************************************** ! 42: c ! 43: c ! 44: c ! 45: c initialization section ! 46: c ! 47: c initialize constants ! 48: c ************** ! 49: c i01 contains the logical unit number for the card reader. ! 50: i01 = 5 ! 51: c i02 contains the logical unit number for the printer. ! 52: i02 = 6 ! 53: c system environment section ! 54: c ! 55: cx010 this card is replaced by contents of fexec x-010 control card. ! 56: c the cx010 card is for overriding the program default i01 = 5 ! 57: c (unit number for card reader). ! 58: cx011 this card is replaced by contents of fexec x-011 control card. ! 59: c the cx011 card is for systems which require additional ! 60: c fortran statements for files associated with cx010 above. ! 61: c ! 62: cx020 this card is replaced by contents of fexec x-020 control card. ! 63: c the cx020 card is for overriding the program default i02 = 6 ! 64: c (unit number for printer). ! 65: cx021 this card is replaced by contents of fexec x-021 control card. ! 66: c the cx021 card is for systems which require additional ! 67: c fortran statements for files associated with cx020 above. ! 68: c ! 69: ivpass=0 ! 70: ivfail=0 ! 71: ivdele=0 ! 72: iczero=0 ! 73: c ! 74: c write page headers ! 75: write (i02,90000) ! 76: write (i02,90001) ! 77: write (i02,90002) ! 78: write (i02, 90002) ! 79: write (i02,90003) ! 80: write (i02,90002) ! 81: write (i02,90004) ! 82: write (i02,90002) ! 83: write (i02,90011) ! 84: write (i02,90002) ! 85: write (i02,90002) ! 86: write (i02,90005) ! 87: write (i02,90006) ! 88: write (i02,90002) ! 89: c ! 90: c test section ! 91: c ! 92: c arithmetic assignment statement ! 93: c ! 94: c test 615 through test 631 contain arithmetic assignment statements ! 95: c of the form integer variable = integer constant ** integer con. ! 96: c ! 97: c test 632 through test 648 contain arithmetic assignment statements ! 98: c of the form integer variable = integer variable ** integer con. ! 99: c ! 100: c ! 101: ivtnum = 615 ! 102: c ! 103: c **** test 615 **** ! 104: c test 615 - small number base; zero exponent ! 105: c ! 106: if (iczero) 36150, 6150, 36150 ! 107: 6150 continue ! 108: ivcomp = 1 ** 0 ! 109: go to 46150 ! 110: 36150 ivdele = ivdele + 1 ! 111: write (i02,80003) ivtnum ! 112: if (iczero) 46150, 6161, 46150 ! 113: 46150 if (ivcomp - 1) 26150,16150,26150 ! 114: 16150 ivpass = ivpass + 1 ! 115: write (i02,80001) ivtnum ! 116: go to 6161 ! 117: 26150 ivfail = ivfail + 1 ! 118: ivcorr = 1 ! 119: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 120: 6161 continue ! 121: ivtnum = 616 ! 122: c ! 123: c **** test 616 **** ! 124: c test 616 - zero base to first power ! 125: c ! 126: if (iczero) 36160, 6160, 36160 ! 127: 6160 continue ! 128: ivcomp = 0 ** 1 ! 129: go to 46160 ! 130: 36160 ivdele = ivdele + 1 ! 131: write (i02,80003) ivtnum ! 132: if (iczero) 46160, 6171, 46160 ! 133: 46160 if (ivcomp) 26160,16160,26160 ! 134: 16160 ivpass = ivpass + 1 ! 135: write (i02,80001) ivtnum ! 136: go to 6171 ! 137: 26160 ivfail = ivfail + 1 ! 138: ivcorr = 0 ! 139: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 140: 6171 continue ! 141: ivtnum = 617 ! 142: c ! 143: c **** test 617 **** ! 144: c test 617 - base =1; exponent = 1 ! 145: c ! 146: if (iczero) 36170, 6170, 36170 ! 147: 6170 continue ! 148: ivcomp = 1 ** 1 ! 149: go to 46170 ! 150: 36170 ivdele = ivdele + 1 ! 151: write (i02,80003) ivtnum ! 152: if (iczero) 46170, 6181, 46170 ! 153: 46170 if (ivcomp - 1) 26170,16170,26170 ! 154: 16170 ivpass = ivpass + 1 ! 155: write (i02,80001) ivtnum ! 156: go to 6181 ! 157: 26170 ivfail = ivfail + 1 ! 158: ivcorr = 1 ! 159: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 160: 6181 continue ! 161: ivtnum = 618 ! 162: c ! 163: c **** test 618 **** ! 164: c test 618 - large number base; exponent = 1 ! 165: c ! 166: if (iczero) 36180, 6180, 36180 ! 167: 6180 continue ! 168: ivcomp = 32767 ** 1 ! 169: go to 46180 ! 170: 36180 ivdele = ivdele + 1 ! 171: write (i02,80003) ivtnum ! 172: if (iczero) 46180, 6191, 46180 ! 173: 46180 if (ivcomp - 32767) 26180,16180,26180 ! 174: 16180 ivpass = ivpass + 1 ! 175: write (i02,80001) ivtnum ! 176: go to 6191 ! 177: 26180 ivfail = ivfail + 1 ! 178: ivcorr = 32767 ! 179: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 180: 6191 continue ! 181: ivtnum = 619 ! 182: c ! 183: c **** test 619 **** ! 184: c test 619 - large exponent ! 185: c ! 186: if (iczero) 36190, 6190, 36190 ! 187: 6190 continue ! 188: ivcomp = 1 ** 32767 ! 189: go to 46190 ! 190: 36190 ivdele = ivdele + 1 ! 191: write (i02,80003) ivtnum ! 192: if (iczero) 46190, 6201, 46190 ! 193: 46190 if (ivcomp - 1) 26190,16190,26190 ! 194: 16190 ivpass = ivpass + 1 ! 195: write (i02,80001) ivtnum ! 196: go to 6201 ! 197: 26190 ivfail = ivfail + 1 ! 198: ivcorr = 1 ! 199: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 200: 6201 continue ! 201: ivtnum = 620 ! 202: c ! 203: c **** test 620 **** ! 204: c test 620 - zero base; large number exponent ! 205: c ! 206: if (iczero) 36200, 6200, 36200 ! 207: 6200 continue ! 208: ivcomp = 0 ** 32767 ! 209: go to 46200 ! 210: 36200 ivdele = ivdele + 1 ! 211: write (i02,80003) ivtnum ! 212: if (iczero) 46200, 6211, 46200 ! 213: 46200 if (ivcomp) 26200,16200,26200 ! 214: 16200 ivpass = ivpass + 1 ! 215: write (i02,80001) ivtnum ! 216: go to 6211 ! 217: 26200 ivfail = ivfail + 1 ! 218: ivcorr = 0 ! 219: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 220: 6211 continue ! 221: ivtnum = 621 ! 222: c ! 223: c **** test 621 **** ! 224: c test 621 -large number base; zero exponent ! 225: c ! 226: if (iczero) 36210, 6210, 36210 ! 227: 6210 continue ! 228: ivcomp = 32767 ** 0 ! 229: go to 46210 ! 230: 36210 ivdele = ivdele + 1 ! 231: write (i02,80003) ivtnum ! 232: if (iczero) 46210, 6221, 46210 ! 233: 46210 if (ivcomp - 1) 26210,16210,26210 ! 234: 16210 ivpass = ivpass + 1 ! 235: write (i02,80001) ivtnum ! 236: go to 6221 ! 237: 26210 ivfail = ivfail + 1 ! 238: ivcorr = 1 ! 239: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 240: 6221 continue ! 241: ivtnum = 622 ! 242: c ! 243: c **** test 622 **** ! 244: c test 622 -exponent is power of two ! 245: c ! 246: if (iczero) 36220, 6220, 36220 ! 247: 6220 continue ! 248: ivcomp = 181 ** 2 ! 249: go to 46220 ! 250: 36220 ivdele = ivdele + 1 ! 251: write (i02,80003) ivtnum ! 252: if (iczero) 46220, 6231, 46220 ! 253: 46220 if (ivcomp - 32761) 26220,16220,26220 ! 254: 16220 ivpass = ivpass + 1 ! 255: write (i02,80001) ivtnum ! 256: go to 6231 ! 257: 26220 ivfail = ivfail + 1 ! 258: ivcorr = 32761 ! 259: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 260: 6231 continue ! 261: ivtnum = 623 ! 262: c ! 263: c **** test 623 **** ! 264: c test 623 - base and exponent are both powers of two ! 265: c ! 266: if (iczero) 36230, 6230, 36230 ! 267: 6230 continue ! 268: ivcomp = 2 ** 8 ! 269: go to 46230 ! 270: 36230 ivdele = ivdele + 1 ! 271: write (i02,80003) ivtnum ! 272: if (iczero) 46230, 6241, 46230 ! 273: 46230 if (ivcomp - 256) 26230,16230,26230 ! 274: 16230 ivpass = ivpass + 1 ! 275: write (i02,80001) ivtnum ! 276: go to 6241 ! 277: 26230 ivfail = ivfail + 1 ! 278: ivcorr = 256 ! 279: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 280: 6241 continue ! 281: c ! 282: c tests 624 and 625 test to ensure exponentiation operator is ! 283: c not commutative ! 284: c ! 285: ivtnum = 624 ! 286: c ! 287: c **** test 624 **** ! 288: c ! 289: if (iczero) 36240, 6240, 36240 ! 290: 6240 continue ! 291: ivcomp = 3 ** 9 ! 292: go to 46240 ! 293: 36240 ivdele = ivdele + 1 ! 294: write (i02,80003) ivtnum ! 295: if (iczero) 46240, 6251, 46240 ! 296: 46240 if (ivcomp - 19683) 26240,16240,26240 ! 297: 16240 ivpass = ivpass + 1 ! 298: write (i02,80001) ivtnum ! 299: go to 6251 ! 300: 26240 ivfail = ivfail + 1 ! 301: ivcorr = 19683 ! 302: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 303: 6251 continue ! 304: ivtnum = 625 ! 305: c ! 306: c **** test 625 **** ! 307: c ! 308: if (iczero) 36250, 6250, 36250 ! 309: 6250 continue ! 310: ivcomp = 9 ** 3 ! 311: go to 46250 ! 312: 36250 ivdele = ivdele + 1 ! 313: write (i02,80003) ivtnum ! 314: if (iczero) 46250, 6261, 46250 ! 315: 46250 if (ivcomp - 729) 26250,16250,26250 ! 316: 16250 ivpass = ivpass + 1 ! 317: write (i02,80001) ivtnum ! 318: go to 6261 ! 319: 26250 ivfail = ivfail + 1 ! 320: ivcorr = 729 ! 321: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 322: 6261 continue ! 323: c ! 324: c tests 626 through 631 test positive and negative bases to positive ! 325: c odd and even number powers checking the sign ! 326: c of the results ! 327: c ! 328: ivtnum = 626 ! 329: c ! 330: c **** test 626 **** ! 331: c ! 332: if (iczero) 36260, 6260, 36260 ! 333: 6260 continue ! 334: ivcomp = 1 ** 2 ! 335: go to 46260 ! 336: 36260 ivdele = ivdele + 1 ! 337: write (i02,80003) ivtnum ! 338: if (iczero) 46260, 6271, 46260 ! 339: 46260 if (ivcomp - 1) 26260,16260,26260 ! 340: 16260 ivpass = ivpass + 1 ! 341: write (i02,80001) ivtnum ! 342: go to 6271 ! 343: 26260 ivfail = ivfail + 1 ! 344: ivcorr = 1 ! 345: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 346: 6271 continue ! 347: ivtnum = 627 ! 348: c ! 349: c **** test 627 **** ! 350: c ! 351: if (iczero) 36270, 6270, 36270 ! 352: 6270 continue ! 353: ivcomp= (-1) ** 2 ! 354: go to 46270 ! 355: 36270 ivdele = ivdele + 1 ! 356: write (i02,80003) ivtnum ! 357: if (iczero) 46270, 6281, 46270 ! 358: 46270 if (ivcomp - 1) 26270,16270,26270 ! 359: 16270 ivpass = ivpass + 1 ! 360: write (i02,80001) ivtnum ! 361: go to 6281 ! 362: 26270 ivfail = ivfail + 1 ! 363: ivcorr = 1 ! 364: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 365: 6281 continue ! 366: ivtnum = 628 ! 367: c ! 368: c **** test 628 **** ! 369: c ! 370: if (iczero) 36280, 6280, 36280 ! 371: 6280 continue ! 372: ivcomp = 7 ** 3 ! 373: go to 46280 ! 374: 36280 ivdele = ivdele + 1 ! 375: write (i02,80003) ivtnum ! 376: if (iczero) 46280, 6291, 46280 ! 377: 46280 if (ivcomp - 343) 26280,16280,26280 ! 378: 16280 ivpass = ivpass + 1 ! 379: write (i02,80001) ivtnum ! 380: go to 6291 ! 381: 26280 ivfail = ivfail + 1 ! 382: ivcorr = 343 ! 383: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 384: 6291 continue ! 385: ivtnum = 629 ! 386: c ! 387: c **** test 629 **** ! 388: c ! 389: if (iczero) 36290, 6290, 36290 ! 390: 6290 continue ! 391: ivcomp = (-7) ** 3 ! 392: go to 46290 ! 393: 36290 ivdele = ivdele + 1 ! 394: write (i02,80003) ivtnum ! 395: if (iczero) 46290, 6301, 46290 ! 396: 46290 if (ivcomp + 343) 26290,16290,26290 ! 397: 16290 ivpass = ivpass + 1 ! 398: write (i02,80001) ivtnum ! 399: go to 6301 ! 400: 26290 ivfail = ivfail + 1 ! 401: ivcorr = -343 ! 402: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 403: 6301 continue ! 404: ivtnum = 630 ! 405: c ! 406: c **** test 630 **** ! 407: c ! 408: if (iczero) 36300, 6300, 36300 ! 409: 6300 continue ! 410: ivcomp = 7 ** 4 ! 411: go to 46300 ! 412: 36300 ivdele = ivdele + 1 ! 413: write (i02,80003) ivtnum ! 414: if (iczero) 46300, 6311, 46300 ! 415: 46300 if (ivcomp - 2401) 26300,16300,26300 ! 416: 16300 ivpass = ivpass + 1 ! 417: write (i02,80001) ivtnum ! 418: go to 6311 ! 419: 26300 ivfail = ivfail + 1 ! 420: ivcorr = 2401 ! 421: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 422: 6311 continue ! 423: ivtnum = 631 ! 424: c ! 425: c **** test 631 **** ! 426: c ! 427: if (iczero) 36310, 6310, 36310 ! 428: 6310 continue ! 429: ivcomp = (-7) ** 4 ! 430: go to 46310 ! 431: 36310 ivdele = ivdele + 1 ! 432: write (i02,80003) ivtnum ! 433: if (iczero) 46310, 6321, 46310 ! 434: 46310 if (ivcomp - 2401) 26310,16310,26310 ! 435: 16310 ivpass = ivpass + 1 ! 436: write (i02,80001) ivtnum ! 437: go to 6321 ! 438: 26310 ivfail = ivfail + 1 ! 439: ivcorr = 2401 ! 440: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 441: 6321 continue ! 442: ivtnum = 632 ! 443: c ! 444: c **** test 632 **** ! 445: c test 632 - small number base; zero exponent ! 446: c ! 447: if (iczero) 36320, 6320, 36320 ! 448: 6320 continue ! 449: ivon01 = 1 ! 450: ivcomp = ivon01 ** 1 ! 451: go to 46320 ! 452: 36320 ivdele = ivdele + 1 ! 453: write (i02,80003) ivtnum ! 454: if (iczero) 46320, 6331, 46320 ! 455: 46320 if (ivcomp - 1) 26320,16320,26320 ! 456: 16320 ivpass = ivpass + 1 ! 457: write (i02,80001) ivtnum ! 458: go to 6331 ! 459: 26320 ivfail = ivfail + 1 ! 460: ivcorr = 1 ! 461: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 462: 6331 continue ! 463: ivtnum = 633 ! 464: c ! 465: c **** test 633 **** ! 466: c test 633 - zero base to first power ! 467: c ! 468: if (iczero) 36330, 6330, 36330 ! 469: 6330 continue ! 470: ivon01 = 0 ! 471: ivcomp = ivon01 ** 1 ! 472: go to 46330 ! 473: 36330 ivdele = ivdele + 1 ! 474: write (i02,80003) ivtnum ! 475: if (iczero) 46330, 6341, 46330 ! 476: 46330 if (ivcomp) 26330,16330,26330 ! 477: 16330 ivpass = ivpass + 1 ! 478: write (i02,80001) ivtnum ! 479: go to 6341 ! 480: 26330 ivfail = ivfail + 1 ! 481: ivcorr = 0 ! 482: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 483: 6341 continue ! 484: ivtnum = 634 ! 485: c ! 486: c **** test 634 **** ! 487: c test 634 - base =1; exponent = 1 ! 488: c ! 489: if (iczero) 36340, 6340, 36340 ! 490: 6340 continue ! 491: ivon01 = 1 ! 492: ivcomp = ivon01 ** 1 ! 493: go to 46340 ! 494: 36340 ivdele = ivdele + 1 ! 495: write (i02,80003) ivtnum ! 496: if (iczero) 46340, 6351, 46340 ! 497: 46340 if (ivcomp - 1) 26340,16340,26340 ! 498: 16340 ivpass = ivpass + 1 ! 499: write (i02,80001) ivtnum ! 500: go to 6351 ! 501: 26340 ivfail = ivfail + 1 ! 502: ivcorr = 1 ! 503: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 504: 6351 continue ! 505: ivtnum = 635 ! 506: c ! 507: c **** test 635 **** ! 508: c test 635 - large exponent ! 509: c ! 510: if (iczero) 36350, 6350, 36350 ! 511: 6350 continue ! 512: ivon01 = 1 ! 513: ivcomp = ivon01 ** 32767 ! 514: go to 46350 ! 515: 36350 ivdele = ivdele + 1 ! 516: write (i02,80003) ivtnum ! 517: if (iczero) 46350, 6361, 46350 ! 518: 46350 if (ivcomp - 1) 26350,16350,26350 ! 519: 16350 ivpass = ivpass + 1 ! 520: write (i02,80001) ivtnum ! 521: go to 6361 ! 522: 26350 ivfail = ivfail + 1 ! 523: ivcorr = 1 ! 524: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 525: 6361 continue ! 526: ivtnum = 636 ! 527: c ! 528: c **** test 636 **** ! 529: c test 636 - large number base; exponent = 1 ! 530: c ! 531: if (iczero) 36360, 6360, 36360 ! 532: 6360 continue ! 533: ivon01 = 32767 ! 534: ivcomp = ivon01 ** 1 ! 535: go to 46360 ! 536: 36360 ivdele = ivdele + 1 ! 537: write (i02,80003) ivtnum ! 538: if (iczero) 46360, 6371, 46360 ! 539: 46360 if (ivcomp - 32767) 26360,16360,26360 ! 540: 16360 ivpass = ivpass + 1 ! 541: write (i02,80001) ivtnum ! 542: go to 6371 ! 543: 26360 ivfail = ivfail + 1 ! 544: ivcorr = 32767 ! 545: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 546: 6371 continue ! 547: ivtnum = 637 ! 548: c ! 549: c **** test 637 **** ! 550: c test 637 - zero base; large number exponent ! 551: c ! 552: if (iczero) 36370, 6370, 36370 ! 553: 6370 continue ! 554: ivon01 = 0 ! 555: ivcomp = ivon01 ** 32767 ! 556: go to 46370 ! 557: 36370 ivdele = ivdele + 1 ! 558: write (i02,80003) ivtnum ! 559: if (iczero) 46370, 6381, 46370 ! 560: 46370 if (ivcomp) 26370,16370,26370 ! 561: 16370 ivpass = ivpass + 1 ! 562: write (i02,80001) ivtnum ! 563: go to 6381 ! 564: 26370 ivfail = ivfail +1 ! 565: ivcorr = 0 ! 566: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 567: 6381 continue ! 568: ivtnum = 638 ! 569: c ! 570: c **** test 638 **** ! 571: c test 638 -large number base; zero exponent ! 572: c ! 573: if (iczero) 36380, 6380, 36380 ! 574: 6380 continue ! 575: ivon01 = 32767 ! 576: ivcomp = ivon01 ** 0 ! 577: go to 46380 ! 578: 36380 ivdele = ivdele + 1 ! 579: write (i02,80003) ivtnum ! 580: if (iczero) 46380, 6391, 46380 ! 581: 46380 if (ivcomp - 1) 26380,16380,26380 ! 582: 16380 ivpass = ivpass + 1 ! 583: write (i02,80001) ivtnum ! 584: go to 6391 ! 585: 26380 ivfail = ivfail + 1 ! 586: ivcorr = 1 ! 587: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 588: 6391 continue ! 589: ivtnum = 639 ! 590: c ! 591: c **** test 639 **** ! 592: c test 639 -exponent is power of two ! 593: c ! 594: if (iczero) 36390, 6390, 36390 ! 595: 6390 continue ! 596: ivon01 = 181 ! 597: ivcomp = ivon01 ** 2 ! 598: go to 46390 ! 599: 36390 ivdele = ivdele + 1 ! 600: write (i02,80003) ivtnum ! 601: if (iczero) 46390, 6401, 46390 ! 602: 46390 if (ivcomp - 32761) 26390,16390,26390 ! 603: 16390 ivpass = ivpass + 1 ! 604: write (i02,80001) ivtnum ! 605: go to 6401 ! 606: 26390 ivfail = ivfail + 1 ! 607: ivcorr = 32761 ! 608: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 609: 6401 continue ! 610: ivtnum = 640 ! 611: c ! 612: c **** test 640 **** ! 613: c test 640 - base and exponent are both powers of two ! 614: c ! 615: if (iczero) 36400, 6400, 36400 ! 616: 6400 continue ! 617: ivon01 = 2 ! 618: ivcomp = ivon01 ** 8 ! 619: go to 46400 ! 620: 36400 ivdele = ivdele + 1 ! 621: write (i02,80003) ivtnum ! 622: if (iczero) 46400, 6411, 46400 ! 623: 46400 if (ivcomp - 256) 26400,16400,26400 ! 624: 16400 ivpass = ivpass + 1 ! 625: write (i02,80001) ivtnum ! 626: go to 6411 ! 627: 26400 ivfail = ivfail + 1 ! 628: ivcorr = 256 ! 629: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 630: 6411 continue ! 631: c ! 632: c tests 641 and 642 test to ensure exponentiation operator is ! 633: c not commutative ! 634: c ! 635: ivtnum = 641 ! 636: c ! 637: c **** test 641 **** ! 638: c ! 639: if (iczero) 36410, 6410, 36410 ! 640: 6410 continue ! 641: ivon01 = 3 ! 642: ivcomp = ivon01 ** 9 ! 643: go to 46410 ! 644: 36410 ivdele = ivdele + 1 ! 645: write (i02,80003) ivtnum ! 646: if (iczero) 46410, 6421, 46410 ! 647: 46410 if (ivcomp - 19683) 26410,16410,26410 ! 648: 16410 ivpass = ivpass + 1 ! 649: write (i02,80001) ivtnum ! 650: go to 6421 ! 651: 26410 ivfail = ivfail + 1 ! 652: ivcorr = 19683 ! 653: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 654: 6421 continue ! 655: ivtnum = 642 ! 656: c ! 657: c **** test 642 **** ! 658: c ! 659: if (iczero) 36420, 6420, 36420 ! 660: 6420 continue ! 661: ivon01 = 9 ! 662: ivcomp = ivon01 ** 3 ! 663: go to 46420 ! 664: 36420 ivdele = ivdele + 1 ! 665: write (i02,80003) ivtnum ! 666: if (iczero) 46420, 6431, 46420 ! 667: 46420 if (ivcomp - 729) 26420,16420,26420 ! 668: 16420 ivpass = ivpass + 1 ! 669: write (i02,80001) ivtnum ! 670: go to 6431 ! 671: 26420 ivfail = ivfail + 1 ! 672: ivcorr = 729 ! 673: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 674: 6431 continue ! 675: c ! 676: c tests 643 through 648 test positive and negative bases to positive ! 677: c odd and even number powers checking the sign ! 678: c of the results ! 679: c ! 680: ivtnum = 643 ! 681: c ! 682: c **** test 643 **** ! 683: c ! 684: if (iczero) 36430, 6430, 36430 ! 685: 6430 continue ! 686: ivon01 = 1 ! 687: ivcomp = ivon01 ** 2 ! 688: go to 46430 ! 689: 36430 ivdele = ivdele + 1 ! 690: write (i02,80003) ivtnum ! 691: if (iczero) 46430, 6441, 46430 ! 692: 46430 if (ivcomp - 1) 26430,16430,26430 ! 693: 16430 ivpass = ivpass + 1 ! 694: write (i02,80001) ivtnum ! 695: go to 6441 ! 696: 26430 ivfail = ivfail + 1 ! 697: ivcorr = 1 ! 698: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 699: 6441 continue ! 700: ivtnum = 644 ! 701: c ! 702: c **** test 644 **** ! 703: c ! 704: if (iczero) 36440, 6440, 36440 ! 705: 6440 continue ! 706: ivon01 = -1 ! 707: ivcomp = ivon01 ** 2 ! 708: go to 46440 ! 709: 36440 ivdele = ivdele + 1 ! 710: write (i02,80003) ivtnum ! 711: if (iczero) 46440, 6451, 46440 ! 712: 46440 if (ivcomp - 1) 26440,16440,26440 ! 713: 16440 ivpass = ivpass + 1 ! 714: write (i02,80001) ivtnum ! 715: go to 6451 ! 716: 26440 ivfail = ivfail + 1 ! 717: ivcorr = 1 ! 718: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 719: 6451 continue ! 720: ivtnum = 645 ! 721: c ! 722: c **** test 645 **** ! 723: c ! 724: if (iczero) 36450, 6450, 36450 ! 725: 6450 continue ! 726: ivon01 = 7 ! 727: ivcomp = ivon01 ** 3 ! 728: go to 46450 ! 729: 36450 ivdele = ivdele + 1 ! 730: write (i02,80003) ivtnum ! 731: if (iczero) 46450, 6461, 46450 ! 732: 46450 if (ivcomp - 343) 26450,16450,26450 ! 733: 16450 ivpass = ivpass + 1 ! 734: write (i02,80001) ivtnum ! 735: go to 6461 ! 736: 26450 ivfail = ivfail + 1 ! 737: ivcorr = 343 ! 738: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 739: 6461 continue ! 740: ivtnum = 646 ! 741: c ! 742: c **** test 646 **** ! 743: c ! 744: if (iczero) 36460, 6460, 36460 ! 745: 6460 continue ! 746: ivon01 = -7 ! 747: ivcomp = ivon01 ** 3 ! 748: go to 46460 ! 749: 36460 ivdele = ivdele + 1 ! 750: write (i02,80003) ivtnum ! 751: if (iczero) 46460, 6471, 46460 ! 752: 46460 if (ivcomp + 343) 26460,16460,26460 ! 753: 16460 ivpass = ivpass + 1 ! 754: write (i02,80001) ivtnum ! 755: go to 6471 ! 756: 26460 ivfail = ivfail + 1 ! 757: ivcorr = -343 ! 758: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 759: 6471 continue ! 760: ivtnum = 647 ! 761: c ! 762: c **** test 647 **** ! 763: c ! 764: if (iczero) 36470, 6470, 36470 ! 765: 6470 continue ! 766: ivon01 = 7 ! 767: ivcomp = ivon01 ** 4 ! 768: go to 46470 ! 769: 36470 ivdele = ivdele + 1 ! 770: write (i02,80003) ivtnum ! 771: if (iczero) 46470, 6481, 46470 ! 772: 46470 if (ivcomp - 2401) 26470,16470,26470 ! 773: 16470 ivpass = ivpass + 1 ! 774: write (i02,80001) ivtnum ! 775: go to 6481 ! 776: 26470 ivfail = ivfail + 1 ! 777: ivcorr = 2401 ! 778: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 779: 6481 continue ! 780: ivtnum = 648 ! 781: c ! 782: c **** test 648 **** ! 783: c ! 784: if (iczero) 36480, 6480, 36480 ! 785: 6480 continue ! 786: ivon01 = -7 ! 787: ivcomp = ivon01 ** 4 ! 788: go to 46480 ! 789: 36480 ivdele = ivdele + 1 ! 790: write (i02,80003) ivtnum ! 791: if (iczero) 46480, 6491, 46480 ! 792: 46480 if (ivcomp - 2401) 26480,16480,26480 ! 793: 16480 ivpass = ivpass + 1 ! 794: write (i02,80001) ivtnum ! 795: go to 6491 ! 796: 26480 ivfail = ivfail + 1 ! 797: ivcorr = 2401 ! 798: write (i02,80004) ivtnum, ivcomp ,ivcorr ! 799: 6491 continue ! 800: c *** end of tests *** ! 801: c ! 802: c write page footings and run summaries ! 803: 99999 continue ! 804: write (i02,90002) ! 805: write (i02,90006) ! 806: write (i02,90002) ! 807: write (i02,90002) ! 808: write (i02,90007) ! 809: write (i02,90002) ! 810: write (i02,90008) ivfail ! 811: write (i02,90009) ivpass ! 812: write (i02,90010) ivdele ! 813: c ! 814: c ! 815: c terminate routine execution ! 816: stop ! 817: c ! 818: c format statements for page headers ! 819: 90000 format (1h1) ! 820: 90002 format (1h ) ! 821: 90001 format (1h ,10x,34hfortran compiler validation system) ! 822: 90003 format (1h ,21x,11hversion 1.0) ! 823: 90004 format (1h ,10x,38hfor official use only - copyright 1978) ! 824: 90005 format (1h ,5x,4htest,5x,9hpass/fail, 5x,8hcomputed,8x,7hcorrect) ! 825: 90006 format (1h ,5x,46h----------------------------------------------) ! 826: 90011 format (1h ,18x,17hsubset level test) ! 827: c ! 828: c format statements for run summaries ! 829: 90008 format (1h ,15x,i5,19h errors encountered) ! 830: 90009 format (1h ,15x,i5,13h tests passed) ! 831: 90010 format (1h ,15x,i5,14h tests deleted) ! 832: c ! 833: c format statements for test results ! 834: 80001 format (1h ,4x,i5,7x,4hpass) ! 835: 80002 format (1h ,4x,i5,7x,4hfail) ! 836: 80003 format (1h ,4x,i5,7x,7hdeleted) ! 837: 80004 format (1h ,4x,i5,7x,4hfail,10x,i6,9x,i6) ! 838: 80005 format (1h ,4x,i5,7x,4hfail,4x,e12.5,3x,e12.5) ! 839: c ! 840: 90007 format (1h ,20x,20hend of program fm041) ! 841: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.