Li. S. DEPARTMENT OF COMMERCE Natii.nal Bureau of Stdrolards FUNDAMENTAL PHYSICAL CONSTANTS

These cunstanis were compileH l>y E. R. Cohen and B. N. Tayhtr under ihe auspices of the COD ATA Task Group (in Eundantental Conslanls. officially adopted

b> CODATA. and published in J. Phys. Cheni. Rel. Data. Vol. 2. No. 4 p. 653

(I973I. CODATA Bulletin No. 11 (Dec 19731. and DIMENSION.S/NB.S (Jan. 19741.

Quantity Symbol Num. value LIncert. Units (SI

Speed of light in vacuum .... c 299792458 1.2 m

Permeability of vacuum M.. 12.5663706144 10 ' H m--

Permittivity of vacuum. l/^„f- «i. 8.854187818 71 10 '= Em-'

a 7.2973506 60 10

||i„c-/47r] le-'//icl a"' 137.03604 11 Elementary charge e 1.6021892 46 10 .. Q

h 6.626176 35 10- ")s

h/2n 1.0545887 57 10- " Js

Avogadro constant 6.022045 31 10" mot'

Atomic mass unit** 1.6505555 86 10- " kg

Electron rest mass 9.109534 47 10- •" kg

Proton rest mass 1.6725485 86 10 kg

Proton to electron mass ratio ni iJm^ 1836.15152 70 Neutron rest mass 1.6749543 86 1(1 -' kg

Elementary charge to mass

ratio elrrif 1.7588047 49 10' C kg-' Magnetic flux quantum. hl'Ie 2.0678506 54 10 " Wb

Josephson freq. -voltage ratio 2e/h Quantum of circulation A/2mp

Faraday constant. \ F

Rydberg constant, ar/2A, /? . Bohr radius, ai^R^ n„

Classical electron radius, aJl, . Thomson cross section ct^ Free electron g-factor, ^,1^1^ gJ2

Free muon g-faclpr ?*i'2 Bohr magneton,'.*^i/2m^ /x^ Electron magnetic moment ... Proton gyromagnetic ratio, H^O . y* corrected for diamagnelism . Proton magnetic moment^

in Bohr magnetons . » Mp^Mb

in nuclear magnetons

in y_,0 in Bohr magnetons M' ^n

in HjO in nuclear magnetons

Electron-proton mag. mom.

ratio Me^Mp

Nuclear magneton, efi/2nij, /xs Compton wavelength:

electron. /i/mf.c=or72/? , .... proton, h/mi,c Xc.p neutron, hlrtinC Xt\p Muon-prolon mag. mom. ratio tiJti-t,

4.835969 13 10' Hz V

' 3.5369455 60 10-« J s kg-' 9.648456 27 10' C ; mo^'

1.097373177 83 10' m-' 5.2917705 44 10- '

' m

2.8179380 70 10 " m

0.6652448 33 10- m'-' 1.0011596567 35 1.00115515 31 9.274078 36 10-» J T9.284832 36 10- -M T-' 2.5751301 75 10" s-'T-'

2.6751987 75 10" s'T-'

1.4106171 55 10- j.j-i 1.521032209 15 10- 2.7928456 11 1.52099322 10- 2.7927740 11

658.2105880 66

5.050824 20 10- j.j-'

2.4253089 40 10- ' m

1.3214099 22 10- '' m

1.3195909 22 10- m

3.1833402 72

Quantity Symbol Num. value Uncert Units (SI) Muon magnetic moment 4.490474 18 10 «

J T

' Muon to electron mass ratio . . 206.76865 47 Muon rest mass 1.883566 11 10- " kg Molar volume, ideal gas, s.l.p 22.41383 70 10- m ' mol ' Molar gas constant R 8.31441 26 J mol ' K

' Bollzmann constant, A/ZV^ . . . . < 1.380652 44 10- ^' JK ' Stefan-Boltzmann constant . . . a 5.67032 71 10 " W m -• K

First radiation constant, 2nhc~ c, 3.741832 20 10 " W • m= Second radiation constant, hclk c- 1.438786 45 10- - m K

Gravitational constant c 6.6720 41 10 ' m' '-- kgRatio, kx-unit to Angstrom,

XlCiii(a,)>l.S374O0 kxu A 1.0020772 54 ^ERGY CONVERSION FACTORS AND EOUIVALENTS

Quantity Num. value Llncertainty* Units

5.609545 16 10=» MeV

1 Atomic mass unit ^ac'^ .... 931.5016 26 MeV

1 Electron mass im^c' 1 0.5110034 14 MeV

1 Muon masslfflpC^i 105.65948 35 MeV

1 Proton mass (fflpC^I 938.27% 27 MeV

1 Neutron mass Im 939.5731 27 MeV

1.6021892 46 10-" J

I eV/* 2.417%% 63 10" Hz

1 eVrtc 8.065479 21 10» m

'

1 eV/t 1.160450 36 10' K

Voltage-wavelength conv., Ac 1.2398520 32 10" eV m

Rydberg constant «,Ac . 2.179907 12 10-'" J 13.605804 36 eV «.c 3.28984200 25 10" Hz R ,hclk 1.578885 49 10» K

Bohr magneton M» 5.7883785 95 10-' eV T-' M,/A 1.39%123 39 10"' Hz T-' 46.68604 13 m ' T'

Mb/* 0.671712 21 K T'

Nuclear magneton Mn 3.1524515 53 10 " eV T-' 7.522532 22 lO'Hz T

' 2.5426030 72 10-' m-' T-'

Mr*/* 3.65825 12 10* K T

'

•Uncertainly (1 std. dev.) applies to last digits of preceeding column; /ij, is exactly

4ir X 10-' H m- . For some entries, energies are given in non-SI units. For values in SI

units, see revised reprint of the January 1974 DIMENSIONS/NBS article. •*10-' kg mol -' yv,

'

NBS Special Publication 398, issued August 1974, supersedes NBS Spec. Publ.

344. For sale by Superintendent of Documents, U,S. Government Printing Office. Washington, D. C. 20402: order by SD Catalog No. C13.10:398, 25 cents each. tA.35 per 100. Stock Number 0303-01331.

NBS SPECIAL PUBLICATION 399

Volume 1

U.S. DEPARTMENT OF COMMERCE / National Bureau of Standards

r

NBS FORTRAN Test Progra 11

K

Volume 1-Documentation for

Versions 1 and 3
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards' was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology

and facilitate their effective application for public benefit. To this end, the Bureau conducts

research and provides: (1) a basis for the Nation's physical measurement system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to promote public safety. The Bureau consists of the Institute for Basic Standards, the Institute for Materials Research, the Institute for Applied Technology,

the Institute for Computer Sciences and Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United

States of a complete and consistent system of physical measurement; coordinates that system

with measurement systems of other nations; and furnishes essential services leading to accurate and uniform physical measurements throughout the Nation's scientific community, industry, and commerce. The Institute consists of a Center for Radiation Research, an Office of Measurement Services and the following divisions: Applied Mathematics — Electricity — Mechanics — Heat — Optical Physics — Nuclear

Sciences ' — Applied Radiation - —• Quantum Electronics — Electromagnetics ' — Time

and Frequency " — Laboratory Astrophysics " — Cryogenics

THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to improved methods of measurement, standards, and data on the properties of well-characterized

materials needed by industry, commerce, educational institutions, and Government; provides

advisory and research services to other Government agencies; and develops, produces, and

distributes standard reference materials. The Institute consists of the Office of Standard Reference Materials and the following divisions: Analytical Chemistry — Polymers — Metallurgy — Inorganic Materials — Reactor

Radiation — Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to promote

the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations leading to the development of

technological standards (including mandatory safety standards), codes and methods of test; and provides technical advice and services to Government agencies upon request. The Institute consists of a Center for Building Technology and the following divisions and offices: Engineering and Product Standards — Weights and Measures — Invention and Innovation — Product Evaluation Technology — Electronic Technology — Technical Analysis — Measurement Engineering — Structures, Materials, and Life Safety * — Building

Environment * — Technical Evaluation and Application * — Fire Technology.

THE INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research and provides technical services designed to aid Government agencies in improving cost effec- tiveness in the conduct of their programs through the selection, acquisition, and effective

utilization of automatic data processing equipment; and serves as the principal focus within

the executive branch for the development of Federal standards for automatic data processing

equipment, techniques, and computer languages. The Institute consists of the following

divisions: Computer Services — Systems and Software — Computer Systems Engineering — Information Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination and

accessibility of scientific information generated within NBS and other agencies of the Federal Government; promotes the development of the National Standard Reference Data System and

a system of information analysis centers dealing with the broader aspects of the National Measurement System; provides appropriate services to ensure that the NBS staff has optimum

accessibility to the scientific information of the world. The Office consists of the following

organizational units: Office of Standard Reference Data — Office of Information Activities — Office of Technical

Publications — Library — Office of International Relations.

1 Headquarters and Laboratories at Gaithersburg, Washington, D.C. 20234.

' Part of the Center for Radiation Research.

» Located at Boulder, Colorado 80302.

* Part of the Center for Building Technology.

Maryland, unless otherwise noted; mailing address
NBS FORTRAN Test Programs

Volume 1-Documentation for Versions 1 and 3

Frances E. Holberton and

Elizabeth G. Parker

Institute for Computer Sciences and Technology

National Bureau of Standards

Washington, D.C. 20234

U.S. DEPARTMENT OF COMMERCE, Frederick B. Dent, Secretary

NATIONAL BUREAU OF STANDARDS, Richard W. Roberts, D/recfor

Issued October 1974
Library of Congress Cataloging in Publication Data

Holberton, Frances E NBS FORTRAN test programs.

National Bureau of Standards Special Publications 399. CONTENTS: V. 1. Documentation for versions 1 and 3. —V. 2. Listings for version 1.—V. 3. Listings for version 3. Supt. of Docs. No.: C 13.10:399.

1. Computer programs—Testing. 2. FORTRAN (Computer

program language) I. Parker, Elizabeth G., joint author. IL

United States. National Bureau of Standards. III. Title. IV. Series: United States. National Bureau of Standards. Special Publication

399. QC100.U57 no. 399 [0A76.6] 389'.08s [001.6'425] 74-12314

National Bureau of Standards Special Publication 399

Nat. Bur. Stand. (U.S.), Spec. Publ. 399,171pages (Oct. 1974) CODEN: XNBSAV

U.S. GOVERNMENT PRINTING OFFICE

WASHINGTON: 1974

For sale by the Superintendent of Documents, U.S. Government Printing OflBce, Washington, D.C. 20402 (Order by SD Catalog No. C13.10:399/V.l). Price $2.35 cents.
FORIWORD

It has now become inperative, because of the noltitude of conputers on

the mrket and the corr^esponding multitude of FORTRAN compilers, to develop a means of testing the overall quality of these compilers, thereby

making meaningful comparisons possible. The National Bureau of Standards

has sponsored a project to develop methods and tools to assist in the

evaluation process. Before the evaluation process can be undertaken, it

is necessary to develop a priirary tool, such as a set of FORTRAN programs

which can validate whether a FORTRAN compiler is in compliance with

the FORTRAN specification as described in the American Standard FORTRAN

document X3. 9-1966.

In 1966 the National Bureau of Standards formulated the design criteria

and specifications for the development of such a set of FORTRAN programs.

The initial implementation of this design was performed, under contract,

by the Advanced Coirputer Techniques Corporation in 1967. Since this

time, these programs have been desk checked, computer checked, revised,

extended, many test units replaced, and the system reorganized to

improve the tests and decrease the difficulty of performing the actual

validation process.

Version 2 of these test programs was prepared by NBS, under contract,

for the Joint Technical Support Activity of the Defense Communications

Agency.

The purpose of these FORTRAN programs is to assist in the validation

of FORTRAN compilers. There is no attenpt to measure the performance

of the compiler or the object program efficiency.

Currently, the FORTRAN Standard, ASA X3. 9-1966, is undergoing revision

and the FORTRAN language is being extended by the X3J3 technical committee

of the American National Standards Institute (formerly identified as the

American Standards Association) . The revised FORTRAN Standaird will be

considered for Federal adoption. This will, if approved, require that

the test programs be revised accordingly.

The National Bureau of Standards wishes to thank the Bell Telephone

Laboratories for the preparation of the camera-ready copy of the program

listings derived from the NBS FORTRAN Test Program Distribution Tape.

These listings appear in Volumes 2 and 3 of this report.
ABSTRACT

NBS FORTRAN TEST PROGRAMS

The NBS FORTRAN test programs, written in Standard FORTR^, are designed to

test whether a FORTRAN conpiler accepts the forms and interpretations of the

FORTRAN language as described in the Anerican National Standarxi FORTRAN

document X3. 9-1966. The test programs, conprised of 116 test units, are structured into two versions, each containing approximately 14,500 punch

card images. The test units may be used as separate executable FORTRAN

programs, or may be linked end to end with other test units, with a minijnum of user effort, to improve operating efficiency. Version 1 is

structured into 116 executable FORTRAN programs, and Version 3, containing

the same 116 test units, is structured into 14 executable FORTRAN programs

for use on large FORTRAN processors.

The test program design criteria was to:

- Constrain all test programs to the FORTRAN Standard X3.9-1966.

- Reduce the effect of those areas in which the FORTRAN Standard does not

prescribe a method or solution, e.g., range, precision, size of computer, etc.

- Sijiplify the use of the FORTRAN test programs.

- Test FORTRAN language elements before they are used in support of

other tests.

- Maintain an open ended system so that tests my be changed or added.

The test programs require the use of a card reader, printer and one

intermediate tape unit.

During the development of the test systems ten different computing systems

were used, and the current set of tests were run on five major systems.

The largest test unit required less than 3,000 vrords of memory and when

structured into 14 executable programs the largest program required less

than 6,000 words of memory to execute the compiled programs. The test units,

for the most part, are straight line programs and during the debugging of

the tests, less than 15 minutes was required to compile and execute the

set of 14 structured FORTRAN programs, excluding card read and printer time.

The magnetic tape, containing the NBS FORTRAN Test Programs, Version 1 and

Version 3, together with the documentation (3 volumes) is available from:

National Technical Information Service

Department of Ccmmerce

5285 Port Royal Road

Springfield, Virginia 22151

The magnetic tape is available in 800 cpi recording density in the following

forms:

7 track even parity BCD, recorded from the FORTRAN H set punch

card code (see FORTRAN Standard, Appendix D X3. 9-1966)

9 track odd parity EBCDIC code

9 track odd parity ASCII code

Keywords: Computer programming language ; FORTRAN: FORTRAN

validation; language validation; standards FORTRAN; test program design.

iv
INTRODUCTION

This document. Volume 1 of three volumes, contains the documentation,

including the systems design, operating procedures, expected test results

and distribution tape organization for a set of FORTRAN Test Programs

developed by the Institute for Computer Sciences and Technology, National

Bureau of Standards. These test programs are written in ASA Standard

FORTRAN and test the language elenents described in the ASA Standard

FORTRAN document X3. 9-1966.

The NBS FORTRAN Test Programs, Version 1, contain 116 test units, each

structured as an executable FORTRAN program.

The NBS FORTRAN Test Programs, Version 3, containing the same 116 test

units, structured into 14 executable FORTRAN Programs, have been organized for use on large FORTRAN Processors for the purpose of reducin.g

the number of systems control cards needed to perform the tests.

The NBS FORTRAN Test Programs, recorded on magnetic tape as approximately 14,500 punch card images for each version, contain the FORTRAN

source language programs and data. Extensive FORTRAN comment lines are interspersed throughout the programs to enable the user to both run the

programs and determine the nature of the tests without the need for

additional documentation. The test results contain informtion related

to the expected results.

Volume 1, Section I describes the system design, the progranming techniques and conventions used in the program development and should enable

the user to extend, alter or reorganize the test programs.

Volume 1, Section II defines the organization and operating procedure

for performing the tests and contains a set of representative results

obtained from actual running of the test programs on several FORTRAN

processors.

Volume 1, Section III describes the order and location of each test

unit and data as recorded on magnetic tape for distribution.

Volume 2 contains the program listings for the NBS FORTRAN Test Programs,

Version 1.

Volume 3 contains the program listings for the NBS FORTRAN Test Programs,

Version 3.

V
NBS FORTRAN TEST PROGRAMS

Table of Contents

Foreword

Abstract

Introduction

Section I SYSTEMS MANUAL

A. FORTRAN Test Program Design I-A-1

Al. Objective I-A-1

A2. Design Criteria I-A-1

A3. Design Considerations I-A-1

A4„ Design Implementation I-A-4

A5. FORTRAN Concepts Excluded from the Test Programs I-A-6

A6. Interpretations Made to the FORTRAN Standard I-A-8

B. Description of Each Segment I-B-1

C. Test Unit Segments Indexed to the FORTRAN Standard I-C-1

Document ASA X3. 9-1966

D. Program Information I-D-1

Dl. Conventions Used in the Test Programs I-D-1

D2„ Assumed Levels for Non-specified FORTRAN Areas I-D-4

D3o Names and Statement Numbers Used in the Test I-D-6

Programs

Eo Structuring, Restructuring and Extending the Test Programs I-E-1

El. Program Structure I-E-1

E2. Consolidating Test Program Units Using Version 1 I-E-1

E3. Deleting a Section of a Test Unit I-E-4

E4. Deleting an Entire Test Unit I-E-4

E5. Adding to a Test Unit I-E-4

E6. Adding New Test Units I-E-5

Fc Difficulties Encountered During the Test Program Development I-F-1

Flo Interpreting the FORTRAN Standard I-F-1

F2. Precision, Conversion and Maximum Value of I-F-1

Numeric Data

F3o Meaningful Tests and Comprehensible Results I-F-1

F4. FORTRAN Compilers with Language Extensions I-F-3

F5. Performing the Tests I-F-3

vi
G. References I-G-1

Section II USERS MANUAL

A. Operating Procedures II-A-1

Al. Organization of Tests and Facilities Requirements II-A-1

A2o Input Data Preparation II-A-3

A3. List of Test Programs for Version 1 II-A-4

A4. List of Test Units by Parts for Version 3 II-A-11

B. Procedures for Isolating Test Unit Failures from Version 3 II-B-1

81. Deleting a Test Unit II-B-1

B2. Creating a Single Test from a Deleted Unit II-B-1

C. Sample Test Results II-C-1

CI. Interpreting the Test Results II-C-1

C2. Test Results II-C-2

Section III DISTRIBUTION TAPE ORGANIZATION

A. General Description III-A-1

Al. FORTRAN Test Programs and Data Version 1 III-A-3

A2. FORTRAN Test Programs and Data Version 3 III-A-5

vii
NBS FORTRAN Test Program Results

Table of Contents

Page

008 FTITRW Formatted Input/Output II- C- 3

009 —

>

AFRMT A-Converslon II- C- 7

010 DATA2 DATA Statement Use II- C- 8

Oil _ AASGN Real and Integer Arith Assignment. Stmnts. II- C- 9

013 DASGN Simple D.P. Assignment Statements II- C- 11 015 _ CASGN Simple Complex Assignment Statements II- C- 15

016 LASGN Logical Assignment Statements II- c- 19

017 INTRL Arithmetic Assignment Statements II- C- 20

020 UGOTO Unconditional GO TO Statements II- c- 22

021 AGOTO GO TO Assignment Statements II- c- 22

022 CGOTO Computed GO TO Statements II- c- 23

030 ARBAD Basic Addition II- c- 23

031 — ARFAD Double Precision Addition II- c- 24

032 ARBSB Basic Subtraction II- c- 24

033 ARFSB Double Precision Subtraction II- c- 24

034 ARBAS Basic Addition and Subtraction II- c- 24

035 — ARFAS Addition and Subtraction of D.P. Values II- c- 25

036 ARBMI Multiplication of Integer Values II- c- 25

037 _ ARBMR Multiplication of Real Values II- c- 25

038 _ ARFMD Multiplication of D.P. Values II~ c- 25

039 ARBDV Division of Integer and Real Values II- c- 26

040 _ ARFDV Division of D.P. Values II- c- 26

041 _ ARBEX Exponentiation of Integer and Real Values II- c- 26

042 ARFEX Exponentiation of D.P. Values II- c- 26

043 ARBHI Hierarchy of Operators and Parentheses II- c- 27

050 SBB67 Subscripts of Integer, Real Arrays v, k II- c- 27

051 _ SBB45 Subscripts of Int., Real Arrays v+k, v—

k

II- c- 27

052 SBB13 Subscripts of Int., Real Arrays c*v, c*v+k.

c*v-k II- c- 28

053 SBF17 Subscripts of D.P. Arrays v, k, c*v, c*v+k.

c v~k , vH"k , V—

k

II- c- 28

054 SIMIF Arith. IF, Logical IF followed by GO TO II- c- 28

055 IFABS Intrinslr Fiinrtions ARS TABS II- C- 29

056 IFFLT Intrinsic Function FLOAT II- c- 29

057 IFFIX Intrinsic Function IFIX II- c- 29

058 IFSGN Intrinsic Functions SIGN, ISIGN II- c- 29

059 IFDAB Intrinsic Function DABS II- c-29

060 IFTRN Intrinsic Functions AINT, INT, IDINT II- c- 30

061 IFMOD Intrinsic Functions AMOD, MOD II- c- 30

062 IFMAX Intr. Funct. AMAXO, AMAXl, MAXO, MAXl', DMAXl II- c- 31

063 IFTIIN Intr. Funct. AMINO, AMINl, MINO, MINI, DMINl II- c- 32

064 IFDSG Intrinsic Function DSIGN II- c- 32

viii
NBS FORTRAN Test Program Results

Table of Contents

Page

065 — IFDIM Intrinsic Functions DIM, IDIM II - c -33

066 - IFSGL Intrinsic Function SNGL II - c -33

067 — IFREL Intrinsic Function REAL II -C - 34

068 — IFIMG Intrinsic Function AIMAG II -C - 34

069 — IFDBL Intrinsic Function DBLE II--C -35

070 — IFCPX Intrinsic Function CMPLX II-- C--35

071 - IFCJG Intrinsic Function CONJG II-- c 35

072 - IFBMS Integer and Real Intrinsic Functions II--c -36

073 — IFFMS Int.

,

Real and D.P. Intrinsic Functions II--C--36

080 — EXPON Basic External Function EXP II-C--37

081 - DEXPO Basic External Function DEXP II- c -38

082 - CEXPO Basic External Function CEXP II- c--38

083 - LOGTM Basic External Function ALOG II-• c--40

084 - DPLOG Basic External Function DLOG II- C- 40

085 - CXLOG Basic External Function CLOG II- C- 41

086 - COLOG Basic External Function ALOGIO II- C- 42

087 - DCLOG Basic External Function DLOGIO II- C- 43

088 - SINUS . Basic External Function SIN II- C- 43

089 — DP SIN Basic External Function DSIN II- C- 44

090 — CSICO Basic External Functions CSIN, CCDS II- c- 44

091 — COSNS Basic External Function COS II- c- 45

092 _ DP COS Basic External Function DCOS II- c- 45

094 _ TANGH Basic External Function TANH II- C- 46

095 — SQROT Basic External Function SQRT II- c- 46

096 - DSQRO Basic External Function DSQRT II- c- 47

097 CSQRO Basic External Function CSQRT II- c- 47

098 ARCTG Basic External Function ATAN II- c- 48

099 DACTG Basic External Function DATAN II- c- 48

100 ACTG2 Basic External Function ATAN2 II- c- 49

101 DATN2 Basic External Function DATAN2 II- c- 49

102 DMODA Basic External Function DMOD II- c- 50

103 CABSA Basic External Function CABS II- c- 50

110 BSFTS Statement Functions - Integer and Real II- c- 51

111 FSFTS Statement Funct. - D.P., Complex, Logical II- c- 51

140 CPXAD Addition and Subtraction of Complex II- c- 52

141 CPXMU Multiplication of Complex Numbers II- c- 52

142 CPXDV Division of Complex Numbers II- c- 53

ix
NBS FORTRAN Test Program Results

Table of Contents

Page

143 — CPXEX

144 — CPXOP

145 — CREAD

146 — CREMU

147 CREDV

148 — CREOP

149 — MISC3

150 — MISC4

160 — BRFCP

161 — BIFCP

162 — FRFCP

163 — FIFCP

164 — CFCCP

165 DPFCP

166 BFCCP

167 SBRTN

168 FSBRT

169 — BLKDT

179 — BLKDA

180 — UNFRW

182 — BACUP

190 — DOTRM

191 — DOLMT

192 — DONSC

193 — DONS I 194 — DONSX

195 — D0N14L

196 — DONIO

197 — MORDO

200 - SUBRl

300 LOGIF

301 BARIF

302 FARIF

310 lOFMT

312 RDFMT

350 MISC5

351 FUNMX

352 NAMES

360 SPEC2

Exponentiation of Complex Numbers

Arithmetic Operations on Complex

Add and Subtract Complex and Real Numbers

Multiply Complex by Real Numbers

Divide Complex by Real and the Reverse

Combined Operations on Complex and Real

Blanks in, Cont, of Statement to Max Lines

Special Characters for Continuations

Real External Functions

Integer External Functions

Real External Functions

Integer External Functions

Complex External Function

Double Precision External Functions

Logical External Functions

Subroutine Subprogram

Subroutine Subprogram

BLOCK DATA Test

BLOCK DATA Test

Unformatted WRITE and READ

BACKSPACE Tape

DO Loops - Terminal Statements

DO Loops - Parameters as Variable Names

DO Loops - Completely Nested Nest

DO Loops - Incomplete DO, Exit by GO TO

DO Loops - Extended Range

DO Loops - Nested Nest

DO Loops - I/O Terminal Statements

DO Loops - I/O, Statmt. Ft., Intr Ft., CALL

Subroutine - Operations Done at Sub Level

Logical IF Statements

Arithmetic IF Statements - Integer, Real

Arithmetic IF Statements - D.P.

Formatted READ/WRITE - Additional Features

Formats in Arrays

Specifications for Program Form

Basic External Functions - Trig Formulae

Names Resemble FORTRAN Verbs, Functions

COMMON, DIMENSION, EQUIVALENCE

II-C-53

II-C-54

II-C-54

II-C-54

II-C-54

II-C- 55

II-C-55

II-C- 5 5 II-C-55

II-C- 56

II-C- 56

II-C- 56

II-C- 56

II-C- 57

II-C- 57

II-C- 57

II-C 58

II-C- 58

II-C- 59

II-C- 59

II-C- 60

II-C- 60

II-C- 60

II-C- 60

II-C- 60

II-C- 61

II-C- 61

II-C- 61

II-C- 62

II-C- 62

II-C- 62

II-C- 63

II-C- 63

II-C- 63

II-C- 65

II-C- 66

II-C- 67

II-C- 67

II-C -67

X
SECTION I SYSTEMS MANUAL

A. FORTRAN TEST PROGRAM DESIGN

Objective : To develop a set of FORTRAN test programs, available to

a wide range of FORTRAN processors with a minimum of user effort

required to perform the tests. These tests shall conform to the ASA

FORTRAN Standard X3. 9-1966. [1]

A2. Design Criteria

a) To constrain all test programs to the FORTRAN language described

in the ASA FORTRAN Standard X3.9-1966.

b) To reduce the effect of those areas in which the FORTRAN standard

does not prescribe a method or solution; the programs must be

adaptable to differing environments such as:

- Size of computer and I/O facilities.

- Power of the FORTRAN compiler as reflected in the size and

complexity of a FORTRAN program,

- Variations in the range and precision of numeric values.

- Differences in form and media for submitting a program and data.

- Differences in procedures for compiling and running a FORTRAN

program.

c) To simplify the use of the FORTRAN test programs.

- The cost of computer time for compiling and running must be

kept to a minimum.

- The cost of human resources for the analysis of test results,

determination of test failures and the comprehension of the test

design must be taken into consideration in the system design.

d) To test FORTRAN language elements before they are used in

support of other tests.

e) To maintain an open ended system so that tests may be changed or added.

A3. Design Considerations

It is recognized that any set of programs which is designed to test

a complex set of specifications, such as ASA FORTRAN (X3. 9-1966)

can never test every interaction of every FORTRAN statement, with all

permissible forms, in all permissible positions in an executable

program. However, it is desirable to design a system such that those

parts of the language which have been tested are relatively easy

to determine and at the same time permit extensions to the system

without extensive knowledge of the entire system.

The test programs must be designed with the realization that a FORTRAN processor might not accept various elements of the

language and the action could be identified at one or more of the

following times or conditions:

I-A-1
a) Compile time.

- The compiler might terminate without completion of the

compilation and with insufficient information for the user

to determine the cause.

- The compilation may be completed with diagnostic messages on the

program listing, which as a general rule (although outside of

the FORTRAN standard specification) assist in locating the trouble.

b) Link Edit and Load Time.

- The executable program may fail to meet the loader, etc.,

requirements-which may or may not be identified in the program

listing.

c) Execution Time.

Conditions in the computer or compiler may produce improper

machine code which causes the test program to be aborted

before completion. (Any one or more of these conditions could occur prior to obtaining the test program results.)

d) Unexpected Test Results.

The running of the test programs could produce printed results which

were different from the expected results. This can occur if:

- Some well defined element of the Standard FORTRAN language was implemented in the compiler in a variant way.

- Some ill defined part of the language was interpreted by

the compiler writer different from the test program writers.

- An improper interpretation of the standard by the test program

writers.

- An actual bug in the test programs.

- An actual bug in the compiler.

Because many unforseen difficulties can occur during the running

of the test programs, where it will be necessary for the user to

refer to the program listing to determine what elements of the language

are being tested as distinct from those elements which must

be used to support the test, it is imperative that the program

listing be liberally interspersed with FORTRAN comment lines to

assist the reader.

Because the FORTRAN standard document is a semi-technical

specifications document without a rigid definition of the

semantics of the language, the document is subject to interpretation

differently by different individuals.

The ASA FORTRAN Standard is a reference standard and does not

address the medium or its coded characteristics, so that the

form of the FORTRAN program on a medium such as punched cards is

outside the scope of the standard. However, because a common medium is punched cards, and the H-set punch card code was designed for FORTRAN, the H-set is deemed the most universally

I -A2
accepted card code on which to prepare the FORTRAN test programs

and data for a processor. If a processor does not accept this

card code it is reasoned that a conversion routine probably does

exist which could convert this set to the processor punch card code.

If the programs are to be available to both large and small

FORTRAN processors the I/O facilities must be kept to a minimum.

If the processor has a card reader then most likely a printer

and either one tape unit or a disc would also be available, so that the test programs could be confined to these I/O devices.

In order to determine what capabilities existed for FORTRAN or FORTRAN- like compilers in 1966 when this project was initiated, a survey of the literature was made and specifications for forty

compilers were compared. From this unpublished study, a "FORTRAN

processor" was defined to contain the minimum range and precision

of numeric values and the most limited program size which could

be found among the forty compilers examined. This lead to the

constraints used in the test programs which are described under

Program Information Section I-D.

The assumption was made, because of the nature of FORTRAN, that

all processors probably had something aJcin to "Compile- Load- and Go"

as a form of operations.

Each test program, if it were to run on a small computer, must be

limited in size. It is theoretically possible to test almost all

characteristics of the language in a single executable program if

a processor were large enough. However, it might be desirable to

test a new compiler on a large computer for the first time with

small test elements, so that any difficulties might be recognized

more rapidly, while any later running of the test programs or updated versions of the compiler could be performed more economically

if the test elements were combined into larger executable programs.

In order for the test units to be run independently and later

combined into larger executable programs, as well as changed or expanded it was necessary to consider the following:

- The required positioning of certain FORTRAN statements such

as specification statements and statement functions.

- The choice of symbolic names, such that they did not constrain

the testing of elements of the language, and at the same time

would not require the knowledge by the user of symbolic names which had been used when changes or expansion of the test were

necessary.

- The allocation of statement labels so that duplication would

not result.

- The handling of those aspects of a FORTRAN program which are not covered by the standard such as precision, size of program,

number of arguments, depth of DO nesting, the number of subprograms,

etc.

I -A3
A4. Design Implementation

The FORTRAN test programs are not designed for use in debugging of a FORTRAN compiler . In fact, the assumption has been made that the

compiler, for the most part, is working but may not have all of the

FORTRAN language features available in the system.

Those elements of the language which are used in support of test units

are limited to what can be considered "defacto FORTRAN". That is,

language features which were not universally implemented in 1966

but which appear in the standard are tested but are never used in

support of other tests. Therefore, such features as: extended range

of a DO, the Gw.d format field descriptor, a constant of the form

26E1 containing no decimal point, etc., are not used after their

appearance in a test unit.

The test program units, for the most part, are small main programs with

straight line logic. Each test unit is implemented to be run as a separate

test or linked end to end with another test. All data used within a program

test unit is defined within that unit, except the tests for the FORMAT

statement which require external input data to be read.

The selected order of the test units is dictated by the need for testing

the basic fundamentals of the language so that these features may be used to

support later tests. Certain elements of formatted READ and WRITE are tested first, so that test results can be written out.

The initial test of the DATA statement appears as an early test sequence

because a constraint would be placed upon the use of symbolic names in other

test units prior to the occurrence of the DATA statement test if the test

appeared later in the set. Other appearances of the DATA statement are in

a subprogram and as a format specification. These are for the purpose of

the tests and no further use is made of this statement.

All testing is performed at the main program level except those concepts

and associations which are unique to a subprogram. One test unit which

is performed at the main program level containing a variety of FORTRAN

statements is basically duplicated in a test unit which performs the same statements at the subprogram level. Other appearances of subprograms

in the test set are basically for the purpose of argument association

testing and for those FORTRAN statements which may occur only in a subprogram.

The FORTRAN statements used in the test units may appear, at first glance,

to be nonsense operations. To comprehend the true meaning of the

statement in a test unit, it is necessary to read the statement transforming

the variable name or constant used into its attributes and utilization

associated with an operator. Such an example might be: A one dimensional

array element appearing in a common block is raised to the power of an unsigned integer constant.

To assist the test program implementors as well as the reader of the

test programs, naming conventions described in Program Information,

I-A-4
Section I-D, have been used throughout the programs to convey the

attributes of the name, which appear in specification statements,

directly in the name itself, so that no reference need be made to

the specification statements to comprehend this information. In

addition, comment cards have been used freely in the test units to

convey the nature of the test and the operations being performed.

The design of a computer program system for automatic insertion of

operating system control cards and the linking of test program units was initiated. Further analysis into the problems has brought to light

the potential difficulties of using the output of such a system and its

doubtful economics. For the following reasons, this system has not

been implemented:

- The lack of common terminology for similar functions among various

operating systems control languages would cause difficulty in

communicating with a wide audience the information required to be

inserted into an automated system for producing the desired effect.

For example, what is called a JOB card in one system is called a RUN

card in another, while what is called a RUN card in another system

may be called an EXECUTE card in the first system. Because similar

terminology for operating system control functions is used for

functions of the system at different levels of control, it would

be necessary to describe levels of functions to a user, who might

not be aware of this logic.

- The FORTRAN standard does not define the order of presentation to

a compiler of program units, so that this becomes an additional

burden to the user to comprehend when this order may not affect the

majority of FORTRAN processors.

- Operating systems control cards may require special control punch

codes which are outside the codes defined for data use. For example,

a control card which contains a code containing the digits 6, 7, 8

and 9 in a single column on the card can be obtained only by a keypunch device with provisions for over striking in a single column.

- To produce punched cards from an automated system with special codes

outside the normal punch card character set would require the

software-hardware system to permit column binary cards to be punched.

This facility, although available in the hardware of some systems

is not available to the user because of software constraints. Of

the computer systems surveyed, only one system permitted column

binary cards to be produced and this facility is available only to

the assembly language programming system.

- If cards can be produced by the colunm binary operations from the

system, the device which interprets and prints on the card would not

necessarily print the appropriate symbols, because codes for certain

FORTRAN characters and the control card codes may have different

graphic associations or no valid association.

I-A-5
- If the test programs with their interpersed operating systems

control cards were placed on tape, there is no assurance that

the receiving installation has provisions for using or even obtaining punched cards from such a tape. Although the images

on tape would be in coded character representation for the

receiving installation, the operating system may not permit the

reading of control card sensitive information and the passing

of it to an applications program for the purpose of producing

punch cards. If the tape is read as a binary tape, the parity

bit, record size, pulse code and blocking characteristics might

not conform to the receiving computer's requirements

»

Because of these numerous difficulties which may affect the user and the

potential additional costs which may be encountered in preparing the

test program information at the receiving installation, these test programs

have been prepared for use without the inclusion of systems control cards

«

To simplify the task of grouping test units together into larger programs

for testing, and thus eliminate the need for an abundance of systems

control cards to operate each test unit as a separate computer run,

those cards which must be revised are identified in the test units as comment cards containing the characters "C=" in the first two columns.

The FORTRAN specification statements taken from different test units

require the elimination of duplicate names to conform to the language

definition. To simiplify this task, symbolic names appearing in a "C=" specification statement will always appear in the same type of

specification statement throughout the entire program test set, so that

elimination of duplicate names is achieved by inspection of a collection

of a similar type of specification statement. That is, if an array

declarator in one program test unit is contained in an INTEGER

statement, all other occurrences of that symbolic name in a specification

statement will be in an INTEGER statement and not in a DIMENSION

statement. See Structuring, Restructuring and Extending Test Programs,

Section I-E.

FORTRAN Concepts Excluded from the Test Programs .

Because the FORTRAN Clarification Reports [2, 3] do not have the status

of updating the current ASA FORTRAN document X3,9-1966, extreme caution

was exercised in making use of some of the interpretations in the

FORTRAN test programs. The following FORTRAN Statements and concepts

have been excluded from the FORTRAN Test Programs:

a) An I/O unit number specified by an unsigned integer constant.

All I/O statements express the unit numbers as integer variable

names which are assigned values in the first executable statements.

This increases program portability.

b) PAUSE and PAUSE n. These statements are excluded from the test

because many systems do not permit them and, action by an operator

would be required to resume the program test.

I -A6
c) The name of a Basic External Function specified as a user subprogram name. This action would not permit the inclusion

of a Basic External Function so defined to appear in any test

unit which was combined with other test units.

d) An external procedure written in a language other than FORTRAN.

Unless Basic External Functions can be considered in this class

of procedures no test is made of this facility,

e) As currently structured in Version 3, with test units 169 and 179

in Parts 11 and 12, respectively, a single labeled common block

does not receive initialized data from more than one Block Data

Subprogram, The proposed revised FORTRAN Standard tentatively

places such a restriction upon Block Data Subprograms.

Combining these test units would test the ability to initialize

data from more than a single Block Data Subprogram to a specified

labeled common block. Individual data elements, however, are not

initialized more than once.

f) Formatted and Unformatted records on the same I/O device within

the same test unit. This concept is the subject of a FORTRAN

clarification. Because a unit may be declared by the implementor

not to contain this property, because this concept conflicts with

the Magnetic Tape Label for Information Interchange Standard

(X3, 27-1969) and because this concept does not enhance program

interchange, this feature was excluded from a single test unit.

However, when test units 196 and 197 are combined in an executable

program as in Version 3 Part 12 this feature is tested,

g) A Formatted external output field whose width does not contain

enough character positions to include a positive sign and a leading

zero. This concept is the subject of a FORTRAN clarification.

Because these optional character positions are described in the

FORTRAN Standard in the same paragraph which describes the optional

external exponent form (implementor option), it is unclear whether

the optional character positions are an implementor or a user option,

h) A subprogram name passed as an actual argument, and then a corresponding dummy name appearing in an argument list of a function

reference or CALL to a lower level subprogram. The rules of the

FORTRAN standard are incomplete. Because a dummy subprogram name

may not appear in an EXTEIWAL Statement it is unclear how a subprogram name may be passed more than one level and maintain a proper association as a subprogram.

i) A labeled FORMAT statement which is not referenced in an I/O

statement. It is unclear in the FORTRAN Standard whether a standard conforming FORTRAN program may contain such a statement

which is not referenced.

I-A-7
j) Hollerith constants are constrained to the FORTRAN character

set, and therefore the character set is a subset of the characters

capable of representation by the processor. This increases

program portability.

k) The ENDFILE statement appears in a test unit but cannot be tested,

because the action is undefined when an endfile record is encountered

during execution of a READ statement.

A6. Interpretations Made to the FORTRAN Standard

The following interpretations have been made to the FORTRAN Standard:

a) Those items identified in the FORTRAN Clarification Reports as "Correction to Typographical and Transcription Errors" and

"Corrections to Mistakes" in the FORTRAN document X3, 9-1966

have been recognized and the interpretation to the standard is as if these items had actually been corrected in the original

document.

b) A relational operator is not immediately followed by a signed

constant. A left parenthesis appears between the relational

operator and the signed constant. Tlie FORTRAN standard does

not appear to permit two adjacent operators.

c) Hollerith data does not appear "under the guise" of a complex

or double precision type.

d) Tl-ie word "range" may not be broadened to include "extended range"

and therefore a GO TO or arithmetic IF statement in an "extended

range" may not reenter the DO nest at a common terminal statement.

e) The FORTRAN Standard does not state how a Hollerith constant is

positioned in a storage unit. In order for a Format Specification

to be introduced into an array by way of a DATA Statement, the

following assumption has been made based upon the Aw Format field

descriptor, "Let 'g' be the number of characters represented in a storage unit", and "w" be the value of n in the nH form of a Hollerith constant, then:" If the field width is less than g, the w characters will appear left justified with g-w trailing blanks

in the internal representation [1, page 22L22].

f) There are no separate class rules for Basic External Functions and

therefore referencing of these is handled under Class V, an external

function. By these rules a Basic External Function may be passed

as the actual argument of an external procedure reference provided

the symbolic name appears also in an EXTERNAL statement.

g) The unit of angular measurement for the trigonometric functions

is assumed to be expressed in radians.

I-A-8
h) "The value zero is considered neither positive nor negative",

does not constrain the appearance as a constant to be an unsigned

zero, but may appear with either a plus (+) or minus (-) sign.

i) The FORTRAN Standard does not describe the condition of non-nested

DO loops contained in an outer DO loop, nor is this condition

described in earlier FORTRAN implementation manuals. However,

this concept is fundamental to the DO loop and is considered

defacto.

In the following picture each bracket is considered to be

a DO loop:

[

[

I-A-9

B. DESCRIPTION OF EACH SEGMENT

The FORTRAN Test Programs are made up from 185 segments containing sequences

of FORTRAN statements. There are 116 main program sequences, whose segment

number and name are each printed with the test program results, 63 subprograms

which are each associated with a single test, and 6 sequences, one of which

(segment 007) is always associated with each executable program. Elements

from the other five sequences (segments 000, 001, 003, 005, 006) are included

when appropriate. The FORTRAN Test Programs Version 1 and 3 are structured to

include the necessary elements from these segments. The following is a brief

description of each segment:

000

,

, (non-executable) contains a Directory of Test Programs introduced

by comment lines before the first executable program on Version 1. In Version 3, the Directory appropriate to each of the 14 parts is inserted

before each of the 14 executable programs.

001, SPECS , (non-executable) declares variable types, function types, and

array sizes and types for use in later segments of the test programs.

This segment is not executable since it contains only specification

statements, but statements from this segment are included in other

segments, as required, to furnish the necessary specifications for an executable program.

003, DATAl , (non-executable) examines the format of the DATA statement,

which causes variables and array elements to be initially defined. It

is run with segment 010, DATA2.

005, BSFDF , (non-executable) defines arithmetic statement functions of type

integer and real. Segment 005 is run with segment 110 and 197.

006, FSFDF , (non-executable) defines statement functions of type double

precision, logical, and complex.

The expressions contain constants, variables and intrinsic function

references, references to previously defined statement functions and

to external functions. Segment 006 is run with segment 111.

007, lODEF , (included in all executable programs) defines the system input,

system output and a work unit to be used in the testing programs. Three

integer variables are given values in simple assignment statements, to

be associated with those units, which must be included with each program

that requires such definitions. However, the values assigned to these

variables may be changed to satisfy specific computer systems. These

units are referred to by the following variable names:

NUVI - for results, usually a line printer defined as unit 6.

IRVI - for input, usually a card reader defined as unit 5. —- INVI - for intermediate input/output data, usually a magnetic

tape defined as unit 9. This unit is used only in Segments

180, 182, 196, 197, and 200.

I-B-1
Ill Versions 1 and 3, 6 input cards (three of which are prepared

by the user) are associated with this segment but run with

segment 008. In Version 3 also each one of the executable programs

(14 Parts) contains these cards so that the user can identify the

environment of the execution of the tests.

008, FMTRW , (executable) tests the FORMAT and formatted I/O statements.

Under control of the FORMAT statements in the segment, 40 data cards

are read in from the system input unit, and written to the system

output unit. The reading into and writing from a FORMAT specification

as well as the symmetry of the terminal slash in a FORMAT specification

is inserted into segment 007 but executed as part of segment 008.

Also written to the output unit, are lines of data produced by Hollerith

information showing how the data should appear. Additional tests are performed in Segment 310.

009, AFRMT , (executable) tests FORMAT and formatted I/O statements as related

to A-conversion. It tests that the Aw descriptor causes w Hollerith characters to be read into or written from a single list item, provided w does

not exceed the number of characters representable in a single storage unit.

The last line of the test results should print the last letters of the

alphabet equal to the number of Hollerith characters contained in a storage unit. If the number of characters is less than 4, the first

three test lines will contain missing characters, but the corresponding

Hollerith information should be aligned.

010, DATA2 , (executable) tests the contents of variables and array elements

which were initialized by way of the DATA statement, in segment 003.

Via formatted output, the contents of the initialized variables and array

elements are written out. The values are integer, real, double precision,

complex and Hollerith. The FORMAT statements are varied, and contain

descriptors, repeated by parentheses and constants.

011, AASGN , (executable) tests simple arithmetic assignment statements with

the formation of integer and real constants.

013, DASGN , (executable) tests the formation of double precision constants,

the referencing of double precision array elements and the assignment

of values to this type in arithmetic assignment statements. The

proper application of the unary sign to double precision is also tested.

015, CASGN , (executable) tests the formation of complex constants, the

referencing of complex variables and array elements and the assignment

of values to this type in arithmetic assignment statements. The proper

application of the unary sign to complex types is also tested.

016, LASGN , (executable) tests logical assignment statements. Values are assigned to integer variables used in relational expressions of

logical assignment statements. Variables and array elements are declared logical in type statements, then used in mixtures of relational

expressions and logical expressions which are assigned to variables

and array elements. Logical values are either true or false.

I-B-2
017, INTRL , (executable) tests arithmetic assignment statements in which

each side of the equation is of a different type. Integer values

are assigned to real and double precision variables and arrays; real

values are assigned to integer and to double precision variables and

arrays

.

020, UGOTO , (executable) tests the unconditional GOTO statement. Branching

into labeled executable statements, in both a forward direction and a backward direction and to statements immediately following the GOTO.

Each set of statements causes an integer to be generated. The test

is designed to cause the unconditional transfers to be executed in

such an order as to produce a consecutive set of integer values.

021, AGOTO , (executable) tests the GOTO assignment statement. The integer

variable used in an ASSIGN statement is referenced only in an assigned

GOTO statement, while defined as a statement label. Assigned GOTO

statements branch only to excutable statements; they have a maximum

of nine branches, though the ANSI standard does not specify a maximum.

The value of the integer variable after the execution of the ASSIGN

statement is designed to correspond to a statement label in the list

of the assigned GOTO statement.

022, CGOTO , (executable) tests the computed GOTO statement. Lists in the

statements have nine or fewer statement labels, which are within the same program unit. The integer variable referenced is always greater

than zero and does not exceed the number of statement labels in the

list.

030, 031, 052, 033 , examine the formation of expressions with the addition

or subtraction operator. Expressions involve variables, array elements

and constants in varying orders, such as:

variable +_ array element +_ constant

variable +_ constant

array element +^ constant

array element +_ variable.

In each of these segments, numeric values are assigned to the variables

and array elements which are then referenced in simple arithmetic

statements.

030, ARBAD , (executable) forms expressions in which real values or integer

values are added together. Expressions contain two to eight terms. One

expression contains only variables, one contains only array elements and

an other contains only constants.

031, ARFAD , (executable) combines double precision values with the addition

operator. Values are positive or negative variables and array elements.

Two, four or five terms make up each expression.

I-B-3
032, ARBSB , (executable) forms expressions in which real or integer

values are subtracted. Values are positive or negative variables

and array elements. Expressions contain two to four variables,

array elements and constants.

035, ARFSB , (executable) examines expressions involving the subtraction of

double precision values. Values are positive and negative. Elements

are variables, array elements and constants. Statements contain two

to four variables, array elements and constants.

054, AREAS , (executable) combines both addition and subtraction in

expressions containing real or integer values. Variables, array

elements and constants appear in various combinations and orders.

Numeric values which are assigned are positive and negative. Expressions

contain two to six elements.

055, AREAS , (executable) combines subtraction and addition in expressions

with double precision values. Some expressions contain parenthesized

expressions within parenthesized expressions, others contain variables,

array elements and constants without parentheses.

036, ARBMI , (executable) tests the multiplication of integer values, which

are both positive and negative. One to six multiplication operations occur within a single expression.

037, ARBMR , (executable) tests the multiplication of real values. Expressions

contain two to seven terms. Values are positive and negative.

038, ARFMD , (executable) tests expressions which involve the multiplication

of double precision values. Variables, array elements and constants occur in various orders in expressions which contain from two to seven terms.

059, ARBDV , (executable) tests expressions of type real or integer in

which variables and constants are divided by variables and constants.

Some expressions contain successive division operations, in order

to examine the order of evaluation of the terms.

040, ARFDV , (executable) tests the division of double precision variables,

array elements and constants. Within an expression, values are of

the same type and divisors are never zero. Expressions contain one

to four division operations.

041, ARBEX , (executable) tests expressions in which integer or real values

are raised to integer or real powers. The exponent assumes values

which include zero and a negative one. Successive exponentiation

occurs in some expressions so that the order of evaluation might be

examined.

A**B

(A**B) **C

(A**B)**(C**D)

I-B-4
042, ARFEX, (executable) tests expressions in which double precision values

are raised to real and double precision powers. Exponentiated values

are raised to exponentiated values. Expressions contain variables,

array elements, and constants.

043, ARBHI , (executable) tests tlie hierarchy of operators and parentheses.

Only integer expressions are used in this segment which also tests that

the laws of association and commutation may be applied. Integer terms

containing division, do not follow these laws. The order of evaluation,

generally, is according to the following hierarchy:

1. exponentiation

2. multiplication/division

3. addition/subtraction.

The elements of the expressions are then regrouped, using parentheses,

to cause new orders of evaluation.

050, SBB67 , (executable) tests the formation of subscripts for integer and

real arrays, where the form of the subscript is either an integer

variable, v, or an integer constant, k. Arrays are one, two or three

dimensions, and the variables in the subscripts are given values in

simple arithmetic assignment statements.

051, SBB45 , (executable) tests the formation of subscripts for integer and

real arrays, where the form of the subscript is either a variable plus

a constant, v+k, or a variable minus a constant, v-k. Expressions also

contain array elements with constant subscripts. Variables and constants

in subscripts are of integer type.

052, SBB13 , (executable) tests the formation of subscripts for integer and

real arrays where the form of the subscript is a variable multiplied

by a constant, c*v, or a variable multiplied by a constant plus a constant,

c*v+k, or a variable multiplied by a constant minus a constant, c*v-k.

Through simple arithmetic statements, real and integer values are assigned

to variables and array elements. Integer values are assigned to the

variables occuring in subscripts of array elements, which are then

computed; the array elements are then used in the evaluation of the

expression in which they occur.

053, SBF17 , (executable) tests the formation of subscripts for double

precision arrays using the allowable subscript constructs: v, k, v+k,

v-k, c*v, c*v+k, c*v-k, where c and k are integer constants and v is an integer variable. Arrays are one, two or three dimensional; subscript

expressions are of integer type and the values assigned to array elements

are of double precision type.

054, SIMIF , (executable) tests simple forms of expressions in an arithmetic

IF statement and a logical IF statement followed by a GOTO, so that

these statements may be used in subsequent tests, the logical IF is

—further tested in segment 300, and the arithmetic IF in segments 301

and 302.

I-B-5
055, IFABS , (executable) references the intrinsic functions, ABS, and

lABS, which obtain the value of the argument, disregarding the

sign. The arguments are integer, real variable names, and expressions.

056, IFFLT , (executable) references the intrinsic function, FLOAT, which

is to convert an integer to the real form. Arguments are integer

variable names and expressions.

057, IFFIX , (executable) references the intrinsic function, IFIX, which

is to convert a real value to the integer form. Arguments are real

variable names and expressions.

058, IFSGN , (executable) references the intrinsic functions, SIGN and

ISIGN which are to transfer the sign of the second argument to the

first argument. Arguments are integer or real variable names or expressions

.

059, IFDAB , (executable) references the intrinsic function, DABS, which obtains

the value of a double precision argument, disregarding the sign.

Arguments are double precision variable names and expressions.

060, IFTRN , (executable) references the intrinsic functions, AINT, INT, and

IDINT which are to truncate real and double precision values. Arguments

are variable names.

061, IFMOD , (executable) references the intrinsic functions AMOD and MOD,

defined as remaindering. The arguments are real and integer variables,

respectively.

062, IFMAX , (executable) references the intrinsic functions AMAXO, A^4AX1,

MAXO, MAXl, DMAXl, which are to choose the largest argument of a set of

arguments. Arguments are real, integer, and double precision variables.

There are two to five arguments in each argument list, though the ANSI

standard does not set a limit on the number of arguments.

065, IFMIN , (executable) references the intrinsic functions AMINO, AMINl, MINO,

MINI, DMINl, which are to choose the smallest value of a set of arguments

Arguments are integer, real, or double precision variables. There are two to five arguments in each list.

064, IFDSG , (executable) references the intrinsic function DSIGN, which is

the transfer of sign from the second argument to the first. The two

arguments are double precision variables.

065, IFDIM , (executable) references the intrinsic functions DIM and IDIM

which are to obtain the positive difference. Arguments are real and

integer variables, resp.

066, IFSGL , (executable) references the intrinsic function SNGL, which is to

obtain the most significant part of a double precision value. Arguments

are variables and expressions. The first and the last result should be

the same value.

I-B-6
067, IFREL , (executable) references the intrinsic function REAL which is

to obtain the real part of a complex quantity. Arguments are variables.

068, IFIMG , (executable) references the intrinsic function AIMAG, which

obtains the imaginary part of a complex value. Arguments are constants

and variables.

069, IFDBI^ (executable) references the intrinsic function DBLE, which expresses

a single precision argument in double precision form. Arguments are variables and intrinsic function references.

070, IFCPX , (executable) references the intrinsic function CMPLX, which is

to form a complex value from two real arguments. Arguments are constants

and variables.

071, IFCJG , (executable) references the intrinsic function CONJG, which is to

obtain the conjugate of a complex value. Arguments are constants and

variables.

072, IFBMS , (executable) tests the use of arithmetic expressions of several

terms or containing references to intrinsic functions as arguments to

other intrinsic functions.

075, IFFMS , (executable) references many of the intrinsic functions. The

arguments to them consist of all the primaries.

080, EXPON , (executable) references Basic External Function, EXP, the

exponential function of type real. The arguments which are powers of

2, are real variables and expressions containing intrinsic functions.

The expected results printed to a precision greater than the computed

results in the Basic External Function tests, are obtained from Table

values. [4]

081, DEXPO , (executable) references Basic External Function, DEXP, the double

precision exponential function. Arguments are powers of 2, ranging from

-16.0D0 to +16.0D0. Some arguments are expressions containing intrinsic

functions.

082, CEXPO , (executable) references Basic External Function, CEXP, the complex

exponential function. The testing range extends from 0 to 16 by steps of

PI/3.

083, LOGTM , (executable) references Basic External Function, ALOG, the natural

logarithm function of type real. Arguments are real variables and

expressions containing intrinsic functions.

084, DPLOG , (executable) tests Basic External Function, DLOG, the double

precision natural logarithm function. Arguments are double precision

variables and expressions containing intrinsic functions.

085, CXLOG , (executable) references Basic External function, CLOG, the complex

logarithm function. The testing range extends from 0 to 5.E7 by steps

of PI/3.

I-B-7
086, CO LOG , (executable) references Basic External Function, ALOGIO, the common logarithm function of type real. Arguments are real variables

and expressions containing intrinsic functions.

087, DCLOG , (executable) references Basic External Function, DLOGIO, the

double precision logarithm function. Arguments are double precision

variables and expressions containing intrinsic functions.

088, SINUS , (executable) references Basic External Function, SIN, the

trigonometric sine function of type real. The arguments which range

from 0 to 2 PI, are real variables and expressions containing intrinsic

functions.

089, OPSIN , (executable) references Basic External Function, DSIN, the double

precision trigonometric sine function. The arguments which range from

0 to 2 PI are double precision variables and expressions containing

intrinsic functions.

090, CSICO , (executable) references Basic External Functions ^ CSIN and CCOS,

the complex trigonometric sine and cosine functions. Arguments are complex variables.

091, COSNS , (executable) references Basic External Function, COS, the

trigonometric cosine function of type real. The arguments range from

0 to 2 PI, and are real variables and expressions.

092, DPCOS , (executable) references Basic External Function, DCOS, the

trigonometric cosine function of type double precision. Arguments are double precision variables and expressions which range from 0 to 2 PI.

094, TANGH , (executable) references Basic External Function, TANH, the

hyperbolic tangent function of type real. Arguments are real variables

and expressions containing intrinsic functions.

095, SQROT , (executable) references Basic External Function, SQRT, the square

root function of type real. Arguments are real variables and expressions

whose values are prime numbers.

096, DSQRO , (executable) references Basic External Function, DSQRT, the double

precision square root function. Arguments are double precision variables

and expressions whose values are prime numbers.

09 7, CSQRO , (executable) references Basic External Function, CSQRT, the complex

square root function. Arguments are complex expressions.

098, ARCTG , (executable) references Basic External Function, ATAN, the

trigonometric arctangent function of type real. Arguments are real

variables and expressions containing intrinsic functions and whose

values are powers or sums of 2.

099, DACTG , (executable) references Basic External Function, DATAN, the

single argument trigonometric arctangent of type double precision.

Arguments are real variables and simple arithmetic expressions containing

intrinsic functions, whose values are powers or sums of 2.

I-B-8
100, ACTG2 , (executable) references Basic External Function, ATAN2, the two

argument trigonometric arctangent function of type real. Arguments are real variables and expressions containing intrinsic functions, whose

values are powers or sums of 2.

101, DATN2 , (executable) references Basic External Function, DATAN2, the

two argument trigonometric arctangent function of type double precision.

Arguments are double precision variables and expressions containing

intrinsic functions, whose values are powers or sums of 2.

102, DMODA , (executable) references Basic External Function, DMOD, the

remaindering function of type double precision. Arguments are double

precision variables.

103, CABSA , (executable) references Basic External Function, CABS, the modulus

function. Arguments are the elements of an array of type complex.

110, BSFTS , (executable) references statement functions defined in an earlier segment, 005. The arguments are integer or real constants,

variables and arithmetic expressions. Type statements are used to

reaffirm the type of some intrinsic functions.

111, FSFTS , (executable) references statement functions in which the

arguments are logical, double precision or complex constants, variables,

and logical or arithmetic expressions. The statement functions were

defined in segment 006. Type statements are used to reaffirm the type

of some intrinsic functions.

140, CPXAD , (executable) tests expressions in whicli complex values are added or subtracted. Complex variables and constants occur in various

orders and combinations, with two to nine elements in each expression,

141, CPXMU , (executable) tests expressions in which complex values are multiplied by complex values. Expressions contain from two to ten

terms in various orders and combinations of complex variables and com- plex constants.

142, CPXDV , (executable) contains expressions in which complex values are divided by complex values. Variables and constants appear both as dividends and divisors. Some expressions involve only complex variables, some only complex constants, and others a combination of both.

143, CPXEX , (executable) involves the exponentiation of complex values. The

value of the integer power varies from 3 to 100. Expressions contain

variable and constant values raised to variable or constant powers.

Each expression contains a single term.

144, CPXOP , (executable) performs several arithmetic operations within an expression containing complex values. Each of the arithmetic statements

performs addition, subtraction, multiplication, division, and exponentiation. Only the exponents are of integer type.

I-B-9
145, CREAD , (executable) performs addition and subtraction within an expression containing complex and real values. Other than in

exponentiation, complex values may only be combined with real values

o

146, CREMU , (executable) performs multiplication of real and complex values

within an expression. The number of terms in an expression varies

from two to four.

147, CREDV , (executable) performs division of complex values by real values

and of real values by complex values. Expressions contain terms in which

values are variables or constants.

148, CREOP , (executable) performs, within an expression, addition, subtraction,

multiplication and division of complex and real values, and exponentiation of complex values. Exponents are integer values, only. The

hierarchy rules determine the order of evaluation.

149, MISC5 , (executable) contains arithmetic assignment statements in which

the statements are continued for several lines and are interspersed with

many blanks. Blanks occur within variable names and throughout the

statements which are one to twenty lines in length. The statements

involve real and integer values only. The digits, the letters and the

special FORTRAN characters make up the list of continuation characters for

the multiple line statements. The digit, zero, and the character, blank,

are not legitimate continuation characters, but are used in the initial

line of a statement.

150, MISC4 , (executable) has interspersed blanks within arithmetic assignment

statements containing complex values. Statements are one to twenty lines

with letters and special characters to indicate the continuationo Statements occur which have a single character on a line; others have one or two terms of the expression on a line. Uncounted blanks do not appear

in the midst of Hollerith information. Continuation lines of both a FORMAT statement and an assignment statement contain non space characters

in columns 2 through 5. The arithmetic assignments used in this segment

are similar to those used in segment 148.

160, BRFCP , (executable) references REAL functions, contained in segments 400,

420, 430, 440, 450, 460. The arguments of the functions are either integer

or real variable names, array names, array element names, and arithmetic

expressions. Arguments are given numerical values in arithmetic assignment

statements, and their names, values, or expressions appear in the argument

list of the function reference. Function references contain one or two

arguments in the argument list with only one list containing many arguments.

161, BIFCP , (executable) references INTEGER functions contained in segments

401, 421, 431, 441, 451, 461. Arguments are integer or real variable

names, array names, array element names and arithmetic expressions.

Argument lists contain as few as one argument and as many as twenty

arguments, though no limit is imposed by the ANSI standard. The expression in which the references occur are of the same type as the function

value to be returned.

I-B-10
162, FRFCP , (executable) references REAL functions; the arguments are the

types integer, real, double precision, complex and logical, and are variable names, array names, array element names, and external procedure

names. The functions referenced are contained in segments 402, 422,

432, 442, 452. Reference is also made to two intrinsic functions, REAL

and AIMAG, which return the real part and the imaginary part of complex

values, resp. to the expressions in which they occur. Common storage

is shared by the referencing program and a function.

165, FIFCP , (executable) references INTEGER functions with arguments of

types integer, real, double precision, complex and logical. Variable

names, array names, array element names and external procedure names

appear in the argument lists. Common storage is shared by the

referencing program and a function. The functions referenced are in

segments 403, 423, 433, 443, 453. One argument list contains twentyone arguments; all others contain one or two arguments.

164, CFCCP , (executable) references COMPLEX functions with arguments of

types integer, real, double precision, complex, and logical. The

argument lists include variable names, array names, array element names

and external procedure names. The functions referenced are contained

in segments 404, 414, 424, 434, 444, 454, 464. Common storage is

shared by the referencing program and a function.

165, DPFCP - (executable) references DOUBLE PRECISION functions with arguments

of types integer, real, double precision, complex and logical. Variable

names, array names, array element names, and external procedure

names appear in the argument lists. Common storage is shared by the referencing program and a function. The functions referenced are in segments

405, 415, 425, 435, 445, 455, 465, 475. These functions return a value

which is of the same type as the expressions in which they occur within

the calling program.

166, BFCCP , (executable) references LOGICAL functions with arguments of types

integer, real, double precision, complex and logical. The argument

lists include variable names, array names, array element names, and external

procedure names. Referenced functions are in segments 406, 416, 426, 436,

446, 456, 466, 476; the value of the function returned from each reference

is of type logical. Common storage is shared by the referencing program

and a function.

167, SBRTN , (executable) calls subroutine subprograms. Arguments are the

types integer and real and include variable names, array names, expressions

and a Basic External Function. A CALL from a subroutine is made to

another subroutine. One subroutine CALL contains no argument list.

Subroutines called are in segments 407, 417, 427, and one of them shares common storage with the calling program.

168, FSBRT , (executable) calls subroutine subprograms. Arguments are the

types integer, real, double precision, complex and logical and include — variable names, array names, and expressions. A CALL from one subroutine

is made to another subroutine; one subroutine CALL contains no argument

I-B-11
list. Subroutines called are in segments 40 8, 418, 428, and share common storage with the calling program. Values are returned via

the argument list of the CALLo

169, BLKDT , (executable) uses a block data subprogram. Labeled common

blocks contain variable names and dimensioned arrays. Implicit types

of variables and arrays are overridden by double precision, complex

and logical statements. The block data subprogram used to supply the

initial values of the labeled common blocks is contained in segment

409. Tliis segment writes out the values which are contained in the

labeled common blocks.

179, BLKDA , (executable) uses three block data subprograms, which contain

six labeled common blocks with elements to be initialized. Elements of

any block are initialized through only one of the block data subprograms

contained in segments 419, 429, 439. Implicit typing is sometimes over- ridden by double precision, complex, and logical statements. This

segment writes out the values which are contained in the labeled common blocks. They correspond to the labeled common blocks of the block data

subprogram.

180, UNFRW , (executable) tests the unformatted WRITE statement and the

unformatted READ statement with and without a list. Included in the

segment is an EfNlDFILE statement. This segment uses an intermediate

tape.

182, BACUP , (executable) examines the backspace statement. Data is created

in memory, written to tape, then changed in memory. The tape is then

backspaced, and the data read to memory in a forward direction. The

data block is 10 24 words in length and is written and read by way of

unformatted input/output statements. This segment uses an intermediate

tape o

190, DOTRM , (executable) examines DO statements and DO ranges which terminate

with a CONTINUE, ASSIGN, or logical IF statement. DO statements meet the

requirements that parameters of the DO must be greater than zero, and must

not be redefined during the execution of the range of that DO. In some DO

statements, tlie incrementation parameter appears; in others, it does not

appear and has an implied value of one.

191, DOLMT , (executable) examines a DO statement and its range, in which the

parameters are integer variable names. Numerical values are given for

them in aritlimetic assignment statements occurring before the DO

statement. The DO range consists of an arithmetic assignment statement

involving the induction variable and the terminal statement which is a CONTINUE.

192, DONSC , (executable) examines DO ranges contained within other DO ranges,

the parameters of which are integer constants and variables. Each range

of a DO witliin the nest has its own terminal statemento Another nest of

DO's has a single terminal statement. Nests contain two to five DO statements and the DO range includes arithmetic IF statements and GO TO

statements

„

I-B-12
195, DONSI , (executable) examines a DO statement and its associated range,

in which an exit is made from the range of a DO before the DO has

been satisfied. The induction variable is used both within and outside

of the range of the DO.

194, DONSX , (executable) examines a DO nest which has an extended range.

Exit from the innermost DO is by way of an unconditional transfer,

reentry is by way of an arithmetic IF statement.

195, DQNHL , (executable) examines the ranges of DO's which are within the

range of another DO, but are not nested. All parameters are integer

constants and the ranges contain arithmetic assignment statements.

196, DONIO , (executable) examines the ranges of DO's which have input or output statements as the terminal statement. The terminal statements

include a READ, a REWIND and a WRITE statement, each of which is also

the only statement within the range of that DO. This segment uses an intermediate tape.

19 7, MORDQ , (executable) examines DO ranges which have within, references to

statement functions and intrinsic functions, CALLS to subprograms, and

DO's with extended ranges. Input, output and rewind statements are also

within these DO ranges. This segment uses an intermediate tape.

200, SUBRl , (executable) passes tlie I/O assignments through common then calls

a subroutine subprogram without an argument list, and returns to an unlabeled CONTINUE statement. The subroutine called is contained in

segment 410. This segment uses an intermediate tape.

500, LOGIF , (executable) examines the logical IF statement. Variables and

array elements, declared logical, are assigned values of true or false.

These values are then used in the logical IF statement, which includes an executable statement which is not a DO statement nor an other logical

IF statement. A signed zero constant is tested in a relational

expression.

501, BARIF , (executable) examines the arithmetic IF statement which contains

integer or real values and references to intrinsic functions. The effect

of the sign of zero is tested.

502, FARIF , (executable) examines arithmetic IF statements in which the

expressions contain double precision values and references to intrinsic

functions

.

510, lOFMT , (executable) examines the formatted READ and WRITE statements and

FORMAT statements as they relate to fields of input card images. There

are 58 card images read as input to this segment; the fomiats under which

the variables and array elements are read and written include each of

the descriptors. Formats occur in which tliere is a one to one correspondence between elements in the list and descriptors; other

formats occur which do not have the same number of descriptors as there — are elements in the lists. Segment 510 examines additional features not

contained in segment 008.
312, RDFMT , (executable) examines formatted READ and WRITE statements in

which the format specifications are contained within arrays. Reference

is to an array name, in place of the reference to a format statement

label. The format specifications contained in arrays do not have

nH field descriptors. FORJ-IAT specifications are defined in DATA

statements, read in as elements of an array, and passed as an argument

to a subroutine. There are 13 card images read in this segment.

350, MISC5 , (executable) examines the specifications of the program form.

This includes verifying that comments are not executed, that every

statement within the unit, can be reached, that all characters in

a line are accepted, that labels can be one to 5 characters long and

may be placed anywhere in columns one to five. Other features of

program form are also examined.

35 1

,

FUNMX , (executable) further tests some Basic External Functions by

using trigonometric formulas.

352, NAMES , (executable) determines whether the compiler can distinquish predefined function names and data names from FORTRAN verbs. Tlie names of

intrinsic functions and FORTRAN verbs appear as variable names and array names in a program unit. In other units of the same program, these names appear as intrinsic function names and as FORTRAN verbs. Subprogram units

are segments 413, 463, 473, 483.

360, SPEC2 , (executable) examines the use of integer variables and arrays and

real variables and arrays, which are either in COMMON, or appear in

EQUIVALENCE statements, or both. All array names are in DIMENSION statements; some have two or three dimensions, which are written as one dimensional arrays in the EQUIVALENCE statement. The array element

successor function defines a relation by which a multi-dimensional array

can be made equivalent to a one dimensional array. The order of the

specifications is DIMENSION, COMMON, EQUIVALENCE and no dummy arguments

appear in COMMON or EQUIVALENCE statements. Numeric values are assigned

to variables and array elements to which other variables and array elements

have been equivalenced. The associated variables and array elements are then used in arithmetic assignment statements, DO statements, IF statements

and computed GOTO statements. A special blank common arrangement is used

in this segment and this segment may not be combined with other segments

requiring blank common.

Segments beginning with segment 400 are subprograms.

400, AFS , to be run with main program segment 160, is a real function of one real argument. The value of the function is the result of multiplying • the dummy argument by a constant.

420, BFS , to be run with main program segment 160, is a real function of two

real arguments which are added together to produce the value of the

function.

I-B-14
430, CFS , to be run with segment 160, is a real function of an integer

argument, which is the power to which a constant is raised, to produce

the value of the function.

440, DFS , is a real function of two integer arguments, one of which is

subtracted from the other producing the power to which a real constant

is raised. The result is the value of the function. This function is

referenced in segment 160.

450, EFS , is a real function of a real array, the size of which is declared

in a DIMENSION statement. The value of the function is the sum of the

elements of the array. This function is referenced in segment 160.

460, FFS , is a real function with twenty arguments of integer and real

variables and integer and real arrays. The expression defining the

function contains addition, subtraction, multiplication and exponentiation

of arguments. This subprogram is referenced in segment 160.

401, lAFI , is an integer function of a single real argument. The value of

the function is the product of a constant and the argument. This

subprogram is referenced in the main program contained in segment 161.

421, IBFI , is an integer function of two real variables. The value of the

function is the sum of the two arguments. This subprogram is referenced

in the main program contained in segment 161.

431, ICFI , is an integer function of an integer variable. The value of the

function is obtained by exponentiating a real constant. This segment

is referenced in the main program contained in segment 161.

441, IDFI , is an integer function of two integer arguments. The value of the

function is obtained by raising a real value to the power which is the

difference between the two arguments. The real variable is defined in a DATA statement. Segment 441 is referenced in segment 161.

451, lEFI , is an integer function with a single argument consisting of an integer array. The size of the array is declared in a DIMENSION statement and the elements of the array are added together to produce the

value of the function. Segment 451 is referenced in connection with

segment 161.

461, IFFI , is an integer function with twenty arguments of real variables

and arrays and integer variables and arrays. The dimensionality of

each array is declared within the subprogram. The value of the

function is obtained by evaluating the equation which contains addition,

subtraction, multiplication and exponentiation, of variables and array

elements. This segment is referenced in segment 161.

402, GFS , is a real function of a double precision argument. The argument

is assigned to the function naine„ This subprogram name is passed as an argument in segment 162 to segment 442, JRFS, which references it.

I-B-15
422, HFS , is a real function of two complex variables. The value of the

function is obtained by assigning the imaginary part of the product

of the complex values to the function name. This segment is referenced

in segment 162.

452, IRFS , is an explicitly typed real function of a logical variable. The

function value is defined by one of two logical IF statements, depending

upon the value of the argument. This segment is referenced twice in

segment 162.

442, JRFS , is an explicitly typed real function of an external procedure

(segment 402) and a double precision variable. The value of the

function is the value of the external procedure of which the double

precision value is the argument. This segment is referenced in

segment 162.

452, RFS , is a real function with twenty-one arguments of all the types of

variables and arrays and an external procedure which is not referenced.

Array and variable types are declared in logical, complex and double

precision statements. Adjustable arrays appear in this subprogram.

This segment is referenced in segment 162.

403, IFI , is an integer function of a double precision variable. The

variable is assigned to the function name to produce the value of the

function. This segment is referenced in segment 163 and also passed

as an argument from segment 163 to segment 453 and segment 443.

423, JFI , is an integer function of two complex arguments. The value of the

function is the imaginary part of the product of the two arguments.

This segment is referenced in segment 163.

435, KFI , is an integer function of a logical argument. The value of the

function is determined by one of two logical IF statements, depending

upon the value of the argument. This segment is referenced twice in

segment 163.

443, LFI, is an integer function of the external procedure IFI (segment 405)

and a double precision variable. The value of the function is the value

of the external procedure of which the variable is the argument. This

segment is referenced in segment 165.

455, MFI , is an integer function with twenty-one arguments of all the types

of variables and arrays and an external procedure. An adjustable array

and its adjustable dimensions are dummy arguments of this subprogram.

Tliis segment is refere'nced in segment 165, and is similar to segment 452

except for function type, and the dummy function is referenced.

404, AFC , is a complex function, explicitly typed, of a real variable. The sum of the real variable and a complex value is the value of the function.

This segment is referenced in segment 164.

I-B-16
414, BFC , is a complex function of an integer argument. A complex value is

raised to an integer power to produce the function value. This segment

is referenced in segment 164.

424, CFC, is a complex function of a real array. The elements of the array are subtracted from a complex constant to produce the function value. This

segment is referenced in segment 164.

434, DFC , is a complex function of a double precision variable. The value

of tlie function is obtained by subtracting a complex constant from the

product of a complex constant and a real variable. This segment is

referenced in segment 164.

444, EEC , is a complex function of a complex variable. The function value

is the complex argument minus a constant o This segment is referenced

in segment 164.,

454, FFC , is a complex function of a logical variable. The value of the

function is determined by one of two logical IF statements, depending

upon the value of the argument. This segment is referenced twice in

segment 164.

464, HFC , is a complex function with twenty-one arguments of all the types of

variables and arrays and a complex function which is not referenced.

Variable and array types are declared in type statements in the

subprogram. Adjustable arrays are arguments in this subprogram. A

value is passed through common and is redefined within the subprogramo

This segment is referenced in segment 164 and is similar to segment 452

„

405, AFP , is a double precision function of a real argument. The value of the

function is set equal to the argument. This subprogram is referenced

in segment 165 and also passed as an argument from segment 165 to segment 455

415, BFD , is a double precision function of an integer variableo A double

precision constant is raised to the power of the integer variable.

This segment is referenced in segment 165.

425, CFD , is a double precision function of a double precision argument

o

The value of the function is the value of the argument „ This segment is

referenced in segment 165.

435, DFD , is a double precision function of two complex variables. The value

of tlie function is the imaginary part of the product of the two complex

variables. This segment is referenced in segment 165.

445, EFD , is a double precision function of a logical variable. The value

of the function is determined by one of two logical IF statements,

depending upon the value of the argument. This segment is referenced

twice in segment 165.

455, FFD , is a double precision function of an external procedure (segment

405) and a double precision variable. This segment is referenced in

segment 165.

I-B-17
465, GFD , is a double precision function of a double precision array. The

elements of the array are added together to produce the value of the

function. This segment is referenced in segment 165.

475, HFD , is a double precision function with twenty-one arguments of all the

types of variables and arrays and a double precision function which is

not referenced. Adjustable arrays are arguments in this segment. A

value is passed through common and redefined in the function subprogram.

This segment is similar to segment 452 and is referenced in segment 165.

406, AFB , is a logical function of a real variable. This function is referenced

in segment 166.

416, BFB , is a logical function of an integer argument. This segment is

referenced in segment 166.

426, CPE , is a logical function of a double precision argument. This segment

is referenced in segment 166.

436, DFB , is a logical function of a logical variable. The value of the

function is the value of the argument. This segment is referenced in

segment 166.

446, EFB , is a logical function of a complex variable. This segment is

referenced in segment 166.

456, FFB , is a logical function of a real array. This segment is referenced

in segment 166.

466, GFB , is a logical function of a real variable and a logical external

procedure (segment 406). This segment is referenced in segment 166.

476, HFB , is a logical function with twenty-one arguments of all the types

of variables and array elements and an external function which is

referenced. This segment is referenced in segment 166.

407, AAQ , is a subroutine subprogram with integer and real variable and

array names and a function in the argument list. This subprogram,

called in segment 167, calls another subprogram (segment 417), whose

argument list Cv^ntams integer and real array names.

417, ABQ , is a subroutine subprogram called from another subroutine sub- . program (segment 407) which is called in segment 167.

427, ACQ , is a subroutine subprogram which has no argument list. Variables

and arrays are passed through comm.on; some are redefined within the subprogram. This segment is referenced in segment 167.

408, ADQ , is a subroutine subprogram with twenty-four arguments of type integer,

real, double precision, complex, and logical variables and arrays. This

subprogram, called in segment 168, calls another subprogram (segment 418),

whose arguments are integer and real variables and arrays.

I-B-18
418, AEQ , is a subroutine subprogram called from another subroutine subprogram

(segment 408), The arguments are integer and real variables and arrays.

This subroutine is used with segment 168.

428, AFQ, is a subroutine subprogram which has no arguments. Variables

and arrays are passed through common; some are redefined within the

subprogram. This segment is referenced in segment 168.

409, BLOKD , is a block data subprogram, which contains type, EQUIVALENCE,

DATA, DIMENSION, and COMMON statements. These are the allowable statements

in a block data subprogram, in which data statements assign values to

variables and array elements which are in labeled common blocks.

Hollerith data is assigned to each type of array, which are one, two,

and three dimensional. This segment is to be run with segment 169.

410, SUBRQ, is a subroutine subprogram which contains no argument list and

returns no values to the calling program. Arguments are passed through

blank common. The subprogram contains FORTRAN statements, including

input/output statements and references to intrinsic functions. This

subroutine is called in segment 200. This segment is similar to main

program segment 197.

Segment 419 BLAKD,

Segment 429 BLBKD,

Segment 439 BLCKD, are three block data subprograms, each of which, through

data statements, assigns values to a different labeled common block.

Each of these subprograms contains all of the statements allowed in a block data subprogram and each contains arrays of one, two, and three

dimensions. These segments are run with segment 179.

411, SMCQ , is a subroutine subprogram called from a logical IF statement

in the calling program, segment 300.

412, MDQ, is a subroutine subprogram called from within a DO of the calling

program. It is called from segment 197.

462, FMTQ, is a subroutine subprogram called by segment 312. FORMAT

specifications and Hollerith constants are passed as arguments of the

subroutine. An empty FORMAT specification is also tested.

413, MAQQ , is a subroutine subprogram in which an intrinsic function name is

used as a variable name and a second intrinsic function name is referenced.

This subroutine is called from segment 352.

463, MBQQ , is a subroutine subprogram in which an intrinsic function name is

used as a variable name. It is called from segment 352.

473, AMQQ , is a subroutine subprogram in which an intrinsic function name is

used as a variable name. This subroutine is called from segment 352.

483, BMQQ , is a subroutine subprogram in which several intrinsic function

references are nested and one intrinsic function name is used as a variable name. This subroutine is called from segment 352.

I-B-19

TEST UNIT SEGMENTS INDEXED TO THE FORTRAN STANDARD DOCUMENT ASA X3.9-1966

The following is the table of contents to the FORTRAN document X3,9-1966

with the corresponding FORTRAN Test Program Segments identified.

ASA X3„9-1966

Section Number and Title

1. Purpose and Scope

2o Basic Terminology

3. Program Form

3.1 The FORTRAN Character Set

3„1.1 Digits

3.1 .,2 Letters

3.1.3 Alphabetic Characters

3.1.4 Special Characters

3c 1.4.1 Blank Character

3.2 Lines

3o2ol Comment Line

3«2,2 End Line

302.3 Initial Line

3.2.4 Continuation Line

3.3 Statements

3.4 Statement Label

3.5 Symbolic Names

3.6 Ordering of Characters

4. Data Types

4.1 Data Type Association

4.2 Data Type Properties

4.2ol Integer Type

4.2.2 Real Type

402.3 Double Precision Type

4o2o4 Complex Type

4.2.5 Logical Type

4.2.6 Hollerith Type

5. Data and Procedure Identification

5,1 Data and Procedure Names

5.1.1 Constants

5.1.1.1 Integer Constant

5.1.1.2 Real Constant

5.1.1.3 Double Precision

Constant

5.1.1.4 Complex Constant

5.1.1.5 Logical Constant

5.1.1.6 Hollerith Constant

FORTRAN Test Program Segment

008,149

008,360

008,009

008,009

008,009

008,009,149,150

150,350

ALL, 350

ALL, 441

ALL

ALL, 149, 150

ALL, 149, 150

ALL, 150,350

ALL, 350, 352, 463, 473, 483

(ASSUMED)

003, 010, 149, ALL

054,301,302

Oil

Oil

013

015

016

003,010

017

003,010,011

003,010,011

003,010,013

003,010,015,067

003,010,016

003,010,312,462
5.1.2 Variable

5.1.3 Array

5.1.3.1 Array Element

5.1.3.2 Subscript

5.1.3.3 Subscript Expressions

5.1.4 Procedures

5o2 Function Reference

5.3 Type Rules for Data and

Procedure Identifiers

5.4 Dummy Arguments

003,010,312

003,010

003,010

003,010

050,051,052,053

(See Section 8)

(See Section 8)

003,010,110,111, (Tables 3 § 4 See

Section 8)

(See Section 8)

6. Expressions

6.1 Arithmetic Expressions

6.2 Relational Expressions

6.3 Logical Expressions

6o4 Evaluation of Expressions

030-043,140-148

016,300

016,300

011,013,015,017,043

7. Statements

7.1 Executable Statements

701.1 Assignment Statements

7.1.1.1 Arithmetic Assignment

Statement

7.1.1.2 Logical Assignment

Statement

7.1.1.3 GO TO Assignment

Statement

7.1.2 Control Statement

7.1.2.1 GO TO Statements

7.1.2.1.1

7.1.2.1.2

7.1.2.1.3

7.1.2.2

7.1.2.3

7.1.2.4

7.1.2.5

7.1.2„6

7.1.2.7

011,013,015,017,030-043,140-148

016

021

Unconditional GO TO 020

Statement

Assigned GO TO

Statement

Computed GO TO

Statement

Arithmetic If Statement

Logical If Statement

CALL Statement

RETURN Statement

CONTINUE Statement

Program Control

Statements

7 0 1.2. 7.1 STOP Statement

7.1.2.7.2 PAUSE Statement

7.1.2.8 DO Statement

7.1.3 Input/Output Statements

7.1.3.1 (initial record, next

and preceding record)

7„ 1.3.2 READ and WRITE Statements

7.1.3.2.1 Input /Output Lists

7.1.3.2.2 Formatted READ

7.1.3.2.3 Formatted WRITE

7.1.3.2.4 Unformatted READ

7.1.3.2.5 Unformatted WRITE

021

022

054,301,302

054,300

167,168,200,312,352,408

400-483

150,190-197,200

ALL, 360

(Omitted)

190-197

180,182

008,310

008,009,196,310,312

008,009,196,310,312

180,182

180,182

I-C-2
7.1.3.3 Auxiliary Input/Output

Statements

7.1.3.3.1 REWIND Statement 180,196

7.1.3.3.2 BACKSPACE Statement 182

7.1.3.3.3 ENDFILE Statement 180

7.1.3.4 Printing of Formatted 008

Records

7.2 Nonexecutable Statements

7.2.1 Specification Statements

7.2.1.1 Array-Declarator ALL

7.2.1.1.1 Array Element 003,008,180,192

Successor Function

and value of a subscript

7.2.1.1.2 Adjustable Dimension 162-166,452,453,464,475,476

7.2.1.2 DIMENSION Statement 003,008,169,409,360 (all parts)

7.2.1.3 COMMON Statement 162-169,200,360,409

7.2.1.4 EQUIVALENCE Statement 169,409,360

7.2.1.5 EXTERNAL Statement 162-167

7.2.1.6 Type-Statements 003,022,110,111

7.2.2 Data Initialization State- 003,010,312,441

ment

7.2.3 FORMAT Statement 008,009,310,312,410,462

7.2.3.1 Field Descriptors 008,009,312,462

7.2.3.2 Field Separators 008,009

7.2.3.3 Repeat Specifications 008,009

7.2.3.4 Format Control Inter- 008,310

action with Input/Output

List

7.2.3.5 Scale Factor 008,310

7.2.3.5.1 Scale Factor Effects 008,310

7.2.3.6 Numeric Conversions 008,310

7.2.3.6.1 Integer Conversion 008,011

7.2.3.6.2 Real Conversions 008,011

7.2.3.6.3 Double Precision 008,013

Conversions

7.2.3.6.4 Complex Conversion 008,015

7.2.3.7 Logical Conversion 008,016

7.2.3.8 Hollerith Field 009

Descriptor

7.2.3.9 Blank Field Descriptor 008

7.2.3.10 Format Specification in 312,462

Arrays

8. Procedures and Subprograms

8.1 Statement Functions

8.1.1 Defining Statement Functions 005,006,410

8.1.2 Referencing Statement 110,111,197,410

Functions

8.2 Intrinsic Functions and Their 055-073,352

References

I-C-3
8.3 External Functions

8.3.1 Defining Function Subprograms

8.3.2 Referencing External

Functions

8.3.3 Basic External Functions

8.4 Subroutine

8.4.1 Defining Subroutine Subprograms

8.4.2 Referencing Subroutines

8.5 Block Data Subprogram

9 . Programs

10. Intra-and Inter-Program Relationships

400, 420, 430, etc.

160-166

080-103,351

408,410,418,427,428,462

167,168,200,312

169,179,409,419,429,439

Rules stated are included under

tests related to Section 3 through

Section 8 of the FORTRAN Standard

I-C-4
Do PROGRAM INFORMATION

The following points describe the organization of F0RTR7\N test programs:

The programs are divided into a number of small segments.

Most segments, except for specification statements, I/O assignment

statements, statement functions, subprograms and DATA statements,

are completely self-contained.

Most segments are very simply written with the testing devoted to

related features described in the ASA standard. The number of FORTRAN

statement types is minimized in order to make each test less dependent

on other language features.

Every segment begins with a heading of comment lines which gives

the segment name, segment number, pertinent ASA references,

purpose of the segment and restrictions observed in the segment.

The last line in every segment is marked by a comment line with the

message "END OF TEST SEGMENT xxx."

Comments, throughout each segment, give detailed ASA references

and additional explanations of the coding.

Dl . Conventions Used in the Test Programs

Certain conventions have been adopted and are used throughout the document, the program code and the test results. These conventions provide the user with a means to:

identify types of data,

. determine the number of dimensions associated with a given

array,

distinguish program elements,

correlate references between the ASA FORTRAN standard document

and the pertinent test segments.

The conventions are described below.

a) Segment Identification

Each segment is identified in the following two ways:

By a 3- to 5- character (A-Z, 0-9) descriptive name (e.g.,

DPLOG, SBRTN).

By a unique 3-digit (0-9) number.

Both the segment name and number appear in the program listing,

the documentation and the generated test results.

I-D-1
b) Line Numbers

Line numbers, columns 73-80, are outside of the standard, but

are usually available in an implementation of the FORTRAN Standard,

when the source statements are introduced to the processor from

punched cards.

The scheme used to identify FORTRAN lines is a compromise between

the ability to associate the prosram listing with this document

and the card handling problem. The FORTRAN test program listing

represents both a statement of the program for the processor and

a document for the user. The program listing also assists in the

consolidation and isolation of test units. Although each line

number is unique, a test program unit may contain FORTRAN lines

with columns 74-76 (segment number) with segment numbers 001-007

inserted within the test units. Columns 73-80 are coded in the

following fashion:

Column 73 contains P for FORTRAN Test Version 1.

H for FORTRAN Test Version 3.

Columns 74, 75, 76 contain nnn where 'nnn' are 3 unique

digits (0-9) which identify

the program segment. (The

greatest segment number

al lowed is 699)

.

Columns 77, 78, 79 contain mmm where'mmm' are 3 digits (0-9)

representing a line number

within the program segment.

Column 80 contains x where x is either zero or five

and allows for the insertion of

lines at a later time.

In Version 1, the sequence numbers (columns 77-80 for segments 001

and 007 start with 0010 and are incremented by 5, with each new segment

number (columns 74-76) forcing the beginning sequence number to be even^

In Version 3, the sequence numbers (columns 77-80) for segments 000,

001, and 007 are increased by 5 in column 80 and each Part is initiated

by the following sequence number: Part 1, 0010; Part 2, 0400;

Part 3, 0700; Part 4, 1200; Part 5, 1800; Part 6, 2300; Part 7, 2700;

Part 8, 3200; Part 9, 3700; Part 10, 4300; Part 11, 4800; Part 12, 5400;

Part 13, 6000; Part 14, 6400; and the statement function definition

segment 005 imbedded in segment 19 7 begins at 0500.

c) Statement Labels

Each statement label is a string of four digits (0-9), To avoid

duplicate labels in the test program, the first three digits of the

string contains the number of the segment in which the statement label is found. (See the description of columns 74-76 above).

The fourth digit is used to make the string unique within that

particular segment.

I-D-2
This convention provides ten unique labels per program segment.

When more than ten labels are needed in any segment, digits 1-3 of

the extra labels contain a unique number between 700 and

999, instead of the program segment number. For this reason, the

greatest program number allowed is 699. A table of currently used

additional statement numbers is contained in Section I-D3e.

d) Format of Comments

Every comment line contains 'C in column 1, followed by five

asterisks (*) or a "C='' in columns 1 and 2.

Each segment is preceded by a heading of comment cards which

give the segment name, segment number, purpose of the segment,

restrictions observed, ASA references and miscellaneous

comments

,

Additional comment lines, interspersed with the actual coding

describe the specific purpose of the coding which follows and

give pertinent ASA references

.

Comment lines containing "C=" in columns 1 and 2 denote the

required Specification statements, I/O Assignment statements,

STOP statement and END line needed to construct a FORTRAN

program if each main program segment is to be run as a separate test unit.

e) Format of the Generated Test Results

The generated test results of every segment start on a new page and

are headed by several lines which give the segment name, segment number,

purpose of the segment (very briefly stated) , and ASA references . Tlie

printed area is constrained to an 8 1/2 by 11 inch page, with a maximum of 57 lines printed per page.

f) Naming Conventions

A unique 3- to 5-character designation is used to identify a variable, array, function or subprogram. The combination of the last

two characters in the name indicates the type and category. The

character preceding the last two flags items which appear in COMMON

or EQUIVALENCE statements. One or two optional characters may begin

each name to make it unique. The conventions are as follows:

If character 5 is I the type is integer;

(or last character) S the type is real;

D the type is double precision;

C the type is complex;

B the type is logical;

H the actual argument is Hollerith;

Q the string represents a subroutine

I-D-3
V the string represents a variable;

F the string represents a function; n where 'n' is a digit (1-3), the

string represents an array with n dimensions

;

a where 'a' is any other letter (A-E,

G-U, W-Z) for cases in which none

of the other codes are applicable.

W the name is a dummy argument;

X the name appears in a COMMON

statement

;

Y the name appears in an EQUIVALENCE

statement

;

Z the name appears in both COMMON and

EQUIVALENCE statements;

a where 'a' is any other letter (A-V)

,

the name appears neither in COMMON

nor in an EQUIVALENCE statement.

Characters 1 and 2 are aa where 'aa' are any letters (A-Z)

associated with the string. These

two characters are used only to

insure that each name is unique.

Either or both of them may be

omitted, if desired.

Examples of this convention are A3I, BBXVD, CBFS, PAAQ where the

strings represent a 3-dimensional integer array, a double precision

variable (used in a COMMON statement), a real function name and a subroutine name, respectively.

Assumed Levels for Non-specified FORTRAN Areas

The ASA standard does not impose specifications in many areas that are clearly subject to limitations in actual FORTRAN compilers. Therefore,

in order to design meaningful tests, some additional specifications

have been established. These limits are described below.

a) Level of Nesting

The DO loop segments of the program contain a maximum of FIVE nested

loops

.

b) Number of Arguments

The test program contains subprograms with up to TWENTY-FIVE

arguments

.

c) Size of Arrays

The size of arrays is generally very small, i.e., usually less than

TWENTY words.

If character 4 is

(or next to last

character)

If character 3 is

I-D-4
FORMAT Standards

FORMAT statements never cause more than FORTY characters on a line t be generated in the output.

Number of Parentheses

Expressions in the test program never exceed TEN levels of

parentheses,

GO TO Branches

The number of branches in assigned and computed GO TO statements never exceeds TWELVE branches.

Constant Length

Constants are kept small in order not to exceed the storage unit

length capacity of some computers. The limits on constant

length are set as follows:

Integer constants

Real constants

Double precision

constants

Complex constants

(each half)

Hollerith constants

5 digits

7 digits

14 digits

7 digits

2 characters except in segment 009

which tests A-conversion for 1 to 4

characters and 26 characters for the

truncation test.

I-D-5
D3. Names and Statement Numbers Used in the Test Programs

Only those names which are used as array names, external function

and subroutine names, common block names, and variable names appearing in

a DATA statement appear in the following lists. The list of array

declarators appearing in type statements and CO^'IMON statements is supplied

to assist the user when he wishes to extend or revise the test programs,

a) Subprogram Names Used in the Test Program Set and the Number

of Arguments

Integer Functions Real Functions Logical Functions

lAFI 1 AFS 1 AFB 1 IBFI 2 BPS 2 BFB 1 ICFI 1 CPS 1 CFB 1 IDFI 2 DPS 2 DFB 1 lEFI 1 EPS 1 EFB 1 iff: 20 PPS 20 FPB 1 IFI 1 GPS 1 GPB 2 JFI 2 HPS 2 HFB 21

KFI 1 IRFS 1 LFI 2 JRFS 2 MFI 21 RPS 21

Double Precision

Functions

Complex Functions

AFD

BFD

CFD

DFD

EFD

FFD

GFD

HFD

1

1

12

12

1 21

AFC

BPC

CFC

DFC

EFC

PFC

HFC

1

11

1

11 21

Subroutines

Block Data Subprograms -No Names Permitted

In FORTRAN Language But Identified by

Comment Cards As

:

AAQ 9 BLOKD

ABQ 3 BLAKD

ACQ 0 BLBKD

ADQ 24 BLCKD

AEQ 8

AFQ 0

MDQ 2 SMCQ 1 FMTQ 22

SUBRQ 0

MAQQ 2 MBQQ 2 AMQQ 2 BMQQ 2

I-D-6
b) Array Declarators in Type Statements and COMMON Statements

Double Precision Complex

ACID (10)

A1D(4)

A2D(2,2)

A3D(2,2,2)

BC2DC7,4)

CC3D(7,2,2)

DPA1D(5)

DPA2D(2,2)

EP1D(43)

FC2D(5,5)

MCA3DC1,4,2)

RC3D(3,3,3)

A1CC12)

A2C(2,2)

A3C(2,2,1)

B1C(8)

B2C(4,2)

B3C(2,2,2)

LL1C(32J

LM2C(8,4)

LN3C (9,2,2)

EP1C(30)

AXID

AX2D

AX 3D

DXID

DX2D

DX3D

AXlC

AX2C

AX3C

DXIC

DX2C

DZ3C

Logical Integer

A1B(2)

A2B(2,2)

A3B(2,2,2)

GG1B(2)

GH2B(1,2)

GI3B(1,1,2)

MCA1B(7)

LIB(IO)

111(5)

121(2,2)

131(2,2,2)

MCA3I(2,3,3)

IU2I(4,2)

IT3I(4,2,2)

IU3I (2,3,3)

AXIB

AX2B

AX3B

DXIB

DX2B

DX3B

I-D-7
Dimension Common

AC1S(25) IAX1I(4)

AC2S(5,6) IAX2I(3,3)

AC3SC1,1,3) IAX3IC2,2,2)

A1S(5) AX1S(4)

A2S(2,2) AX2S(3,3)

A3SC3,3,3) AX3S(2,2,2)

CMA1S(5) AX1D(2)

CMB1SC5) AX2D(2,2)

EP1S(33) AX3D(2,2,2)

IAC1IC5) AX1C(2)

IAC2IC2,7) AX2C(2,2)

AX3C(2,2,2)

MCA1I(5) AX1BC2)

LII(IO) AX2B(2,2)

IAB1I(4) AX3BC2,2,2)

IAB2I(3,3) /BLK1/JAX1IC2)

IAB3I(2,2,2) JAX2IC3,3)

AB1S(4) /BLK2/DX1S(2)

AB2S(3,3) 0X28(2,2)

AB3S(2,2,2) /BLK3/DX1D(2)

IV1I(1024) DX2DC2,2)

ZU1S(12) /BLK4/DX1C(2)

ZU3S(3,2,2) DX2C(2,2)

ZU2S(4,2) /BLK5/DX1B(2)

ZT1S(4) DX2B(2,2)

/BLK6/JAX3IC2,2,2)

YER1S(7) DX3S(2,2,2)

J(2) DX3D(2,2,2)

JJ(1,1) DZ3CC2,2,2)

JJJ(1,1,1) DX3BC2,2,2)

JJJJ(1,1)

JJJJJ(l)

JJJJJJCI)

GOTO (2, 2)

IF(5)

MX1I(3)

TX1SC3)

MMY1I(400)

NNY3IC20,10,2)

MX2I(2,3)

TX2S(2,2)

WAZ2SC3,2)

RVY1S(2)

RVY2S(1,2)

JY2I (2,2)

JY1I(5)

NZ1I(4)

NZ2I(4,2)

WAZ1S(2)

I-D-8
Blank Coiimon Organization and Block Names

There are two separate mappings of COMMON in the Program Set.

Segment 360, the last test in the program set, tests COMMON,

EQUIVALENCE, and DIMENSION using a special organization of blank

COMMON not associated with any other program segment. For this reason segment 360 may not be combined with any of the segments

listed below which make use of a different arrangement.

The following ordering of blank COMMON is used in Segments 162,

163, 164, 165, 166, 167, 168 and 200.

AXVS

CXVS

IXVI

IAX1I(4)

IAX2IC3,3)

IAX3I(2,2,2)

BXVS

AX1SC4)

AX2S(3,3)

AX3S(2,2,2)

AXVD

AX1D(2)

AX2D(2,2)

AX3D(2,2,2)

AXVC

AX1C(2)

AX2C(2,2)

AX 3C (2,2,2)

AXVB

AX1B(2)

AX2B(2,2}

AX3B(2,2,2)

The six labeled COM^^ON blocks are identified by the names:

BLKn where n is 1 to 6

The organization of the data in the labeled COMMON blocks is

specified in Segment 179.

I-D-9
Variables and Array Elements Defined in DATA Statements

Symbolic names of variables and array elements with their corresponding

values are defined in DATA statements in segment 003 and tested

in segment 010. When augmenting the test programs the following variable

names and array element names may not appear in subsequent DATA statements

nor be redefined in tests which precede segment 010 (e.g., 008 or 009).

No restriction is placed upon the redefinition of these variables or array elements in test segments which follow segment 010.

DATA Statement 1 Symbolic Name

Ill(l)

MCA3I(1,2,1)

MCA3I(2,2,2)

IAC21C2,5)

IAC2I(2,6)

MCA31 (2,1,1)

DATA Statement 2 Symbolic Name

EP1S(8)

EPIS(IO)

EP1S(12)

AC2S(5,5)

EPlS(ll)

AC2S(5,3)

AC2S(5,2)

DATA Statement 3

Symbolic Name

BVD

DPA2D(2,1)

CVD

DPA2D(1,2)

DVD

DPA2D(2,2)

DATA Statement 4

Symbolic Name

AD SVC

LN3C (9,1,2)

LL1C(30)

LN3C(8,2,2)

Iil2C(8,3)

LN3C(9,1,1)

LL1C(32)

LN3C(8,1,2)

Form and Value of the Entry

0

2* 10

3* 246

Form and Value of the Entry

2* 0.0

2*-750.05

.24615E3

2.4615E2

3.54674E+3

Form and Value of the Entry

+34567890. lD-3

345.678901D+2

112233. 5D-08

11.22335D-4

3.4D12

0.34D13

Form and Value of the Entry

2*(11.1, 22.22)

(-3.45E1, -67.8E-1)

(-34.5E0, -6.78E0)

(10. EO, -20. EO)

(l.OEl, -2.0E1)

(-20.0E1, +4.E3)

(-200. EO, +4000. EO)

I-D-10
DATA Statement 5

Symbolic Name

MAVB

MCA1B(6)

MBVB

DATA Statement 6

Symbolic Name

GI3BC1,1,2)

GGlB(l)

EPIS(IS)

DATA Statement 7

Symbolic Name

111(2)

IAC2I(1,5)

IAC2I(1,3)

111(5)

IAC2I(2,4)

MCA3I(1,1,2)

AVI (Integer type)

EP1S(13)

AC2S(2,6)

AC2S(1,6)

AC3S(1,1,1)

AC2S(3,6)

AC3S(1,1,2)

AC2S(4,6)

AVD

AlD(l)

DPA2D(1,1)

MCA3D (1,1,1)

A1D(2)

MCA3D(1,1,2)

LL1C(29)

LN3C(8,2,1)

BCVC

LM2C(8,4)

GH2B(1,1)

GI3B(1,1,1)

MOVE

111(3)

111(4)

MCA3I (1,2,2)

AC2S(5,6)

JVS (type REAL)

EPIS(14)

AC3S(1,1,3)

IAC2I(1,4)

CHEVC

Form and Value of the Entry

2* .TRUE.

.FALSE.

Hollerith Data Form

2HN0

2* 2HAD

Form and Value of the Entry

3* 0

4* -750

2* 0.

2* 246.15

354674. E-2

354.674E+1

35467. 4E-01

3* -.295D5

-29.5D+3

3456.78901D+01

0„345678901D+5

2* (l.llEl, +222.2E-1)

(-34.5, -6.78)

(-.345E2, -678. E-2)

2* .TRUE.

.FALSE.

2* 10

+246

-.75005E03

-7.5005E+02

2HBC

2H*=

2H P 2* (10., -20.)

I-D-11
LL1C(31)

DCVC

LM2C(8,2)

A1D(3)

MCA3D(1,3,1)

A1D(4)

MCA3DC1,4,1)

MCA1B(7)

GH2BC1,2)

(-200., +4000.)

C-2000.E-1, +400. El)

+1122.335D-6

0.00001122335D+2

34.0D11

0.034D14

2* .FALSE.

e) Statement Niombers Used (and Not Used) Between 7000-9999 With

the Segment Numbers Associated

Statement Label Segment # Not Used

7nnn_ / uuu— 7nm

/uuz — 7nn X 161 7004 / uut— 700A / UUD

700 / uu 7-/ — xo1 fi'^o 7m n_ 70 1 9 xo^ 701 / U X o% 7n 1 A- 7099 X09 709 / l/Z o— 70/ U 9QLi)

1 \j ou — 70 '^/l XOO 70 "^K 70 7Q

/ u ou— 71 01^ noR 71/ xuoOA — 710 / XU 7/ 71/ iUns_o — 71/ 1 11 9z nnft uu o 71/ X 1X JX_— 71/XX/1 7

71/ 1 J.1 R_o — 71 90 noR 7191

71 99_ 71 94 OOR uu O 71 9"^ 71 9fi / 1 ZO — 71 '^t^ OOR UU o 71 '^A / X OO — 71 '^7

/ X J / 71 Xft / i Oo — 71 i;a OOR UUo 71 1^7

/ X D / - 71/ xoyAQ

71 7n / 1 /U- 7171 017 UX / 71 74 / X / 4- 71 QQ / xyy

/ ZU

1

090 7909 7900 /zuy

79 1 0 791 Q 091 U^X

70 7n

7360- 7369 360 7370- 7539

7540- 7546 054 7547- 7849

7850- 7852 085 7853- 7879

7880 088 7881- 7889

7890 089 7891- 7899

7900- 7909 190

7910 091 7911- 7919

7920- 7929 192 7930- 7939

7940- 7947 194 7948

7949 194

7950- 7956 300 7957- 7991

7992 092 7993- 8094

8095- 8123 350 8124- 8209

8210- 8216 021 8217- 8219

8220- 8226 022 8227- 8299

8300- 8337 301 8338- 8359

8360- 8366 360 8367- 8859

8860 410 8861- 8862

Statement Label Segment # Not Used

8863-8864 410 8865

8866-8869 410

8870-8873* 015 § 8874-•8875

410

8876-8878 410 8879-•8899

8000-8000 TOO • 801

0

8090-8090 192 80 30- 8039

8040 J.104^ *T 8041

8049 104 J. ^ •+ 8043

oy HH- 104 Xi/ M- 804"^

804A-80'^4 104 XV H- oyo o —• 01y X 80oy

0 1 00-0 1 0 R xy10 7/ 01y X 00- yy —.0 '^00 •y juKj

0 '^0 1 -0 '^0 8 OKt ^09L 0'^00- y ouy

,0' y oxy '^1 0

0 '^90-0 "^40 O

^1X\J0 y ODU".0001 • y y u X 0009-z— xy1 00u y y u o— 0004

yy UD 1xyuQO QOOA yy UO-•yyU QQ07/ 9908 190 9909-•9919

9920-9921 192 9922

9923 192 9924- 9929

9930-9931 312 9932-•9938

99 39-9960 300

9961 197 9962

9963-9964 197 9965

9966-9969 197

9970-9975 302 9976- 9979

9980-9989 301 9990- 9993

9994-9995 073

9996-9997 063

9998-9999 062

1-14 350

22 350

333 350

22255 350

These statement numbers appear in a main program and a subprogram.

I-D-12
STRUCTURING, RESTRUCTURING AND EXTENDING THE TEST PROGRAMS

El . Program Structure

Version 1 has been structured as 116 executable FORTRAN programs with

provisions for linking test units end to end. Version 3 has been

structured into 14 executable FORTRAN programs.

Every main program test unit contains at least two segment numbers,

the first executable statements which assign the I/O unit numbers,

identified as segment 007 in columns 74-76, and the test segment

identified by the 3-digit identification 008 to 360.

An executable program includes some of the following segment numbers:

Specification Statements Segment 001

DATA Statements Segment 00 3

Statement Function Definitions Segment 005 or 006

I/O Assignment Statements Segment 007

Main program segments Segment 008-360

Subprograms . Segment 400-483

Because test units may be linked end to end, the segment numbers 001

to 007 are identified by these numbers within the test unit in which

they are embedded to facilitate the identification and location of

these elements in a FORTRAN program and to aid in the elimination of

duplicate elements when test units are consolidated.

Each test unit, even when consolidated with other test units, can be

viewed from the program listing as an independent test because the

necessary Specification statements, I/O assignment statements, STOP

statements, and END lines are inserted as specially structured comment

lines in their appropriate locations. Lines beginning with the

characters "C=" identify these otherwide FORTRAN statements.

E2 , ConSolidat_ing Test Program Units Using Version 1

Version 1 contains a directory of the test segments as a set of 342

comment lines before the first test segment. These are identified

as segment 000 and may be used to create a directory to head any

consolidation of the test programs. (A directory of only those

test units appearing in a specific part heads each executable program

in Version 3.

)

In both versions, comment lines have been inserted to ease the burden

of coupling test units together or isolating them.

Specification statements and END lines have unique position requirements

in the FORTRAN standard. Specification statements must precede Statement

Function definitions and the first executable statement, and the END — line must be the last line of a program unit. Comment lines may be

anywhere before the END line.
Each main program unit in Version 1 has been created as if it had

been developed from Version 3. That is, the comment lines inserted

into each test unit which directs the user how to create a single test

program from a consolidated set has actually been performed to create

Version 1, leaving the comment lines in place. This permits the user who has consolidated the test programs to later isolate individual test

units as needed with directions for the process contained in the program.

For example, in segment 008 test unit, the FORTRAN text contains the

following message:

C***** WHEN EXECUTING ONLY SEGMENT 008, THE SPECIFICATION STATEMENTS

C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS

C***** 1 AND 2 REMOVED

Below this message is a set of comment lines which, except for columns

1 and 2, look like Specification statements with the segment number 001

in columns 74-76. In Version 1, this action has already been performed

leaving the C= comment lines in the program and inserting the actual

Specification statements below these comment lines but with the segment

number changed from 001 to the test segment number, in this case 008.

The four digit sequence number, columns 77-80 is unique for these inserted

lines, and is assigned characters and digits which will facilitate the

location of these lines. Similar messages appear before the I/O assignment

statements and the STOP statement and END line. The following identification

code has been assigned for columns 74-80:

Specification Statements nnnAx]z(]2$

I/O Assigment Statements nnnBd]2^1z5

STOP and END nnnCd^]!^

Where nnn is the test segment number in which the statements are embedded,

X is 1 to 9 and A to F, and d is 1 or 2. The last two character positions

are blank. Specification statements may contain continuation lines, so that the sequence number is significant.

In order to link test units end to end into a single executable program,

it is necessary to eliminate duplicate specifications, STOP and END

lines, and I/O assignment statements (if the unit numbers are changed by

the user). These appear only in the main program test units. Elimination

of duplicate symbolic names from the Specification statements is performed

on each of the nine (DIMENSION, COMMON, EQUIVALENCE, EXTERNAL, REAL,

INTEGER, DOUBLE PRECISION, COMPLEX, and LOGICAL) statements independently.

That is, if dimension information is expressed in a type statement instead

of a DIMENSION statement, all test programs which require this specification

information for a particular symbolic name will be consistent.

The appropriate directory and the consolidated specifications, identified

as segment 001, should be placed in front of the first test unit of the

consolidated set, the I/O assignments placed as the first executable

statements (segment 007) within the first test unit, and a single STOP

statement and END line must appear as the last lines of the main program

unit. If Statement Function definitions are a part of a test unit, these

I-E-2
must be placed before the first executable statement. Segments 110,

111, and 197 contain Statement Function definitions. If segments 110

and 197 are combined into the same executable program, one copy of

segment 005 must be removed. Test units should be performed in the

order of the directory, particularly segment 010, Data Statement Use,

must appear in order, because the potential reuse of data names appearing

in a DATA statement in other program test units cannot be guaranteed.

If during the consolidation process, an attempt is made to include more

test units than the FORTRAN processor will accept into a single executable

program, it will be necessary to return the specification statements,

I/O assignment statements and STOP and END lines to the appropriate test

units not included with the finally consolidated set for later use in

another consolidation. The segment number associated with these lines

identified by the letters "A", "B", and "C" in column 77 is contained in

columns 74-76.

When test programs are consolidated into larger executable programs, it is

desirable to have some means of identifying the test results with some additional information related to the environment of performing the tests,

such as computer name, compiler version, operating system version, date,

and any additional information which would distinguish successive running

of the test programs. This can be achieved by incorporating the FORTRAN

lines, identified as segment 007-which are embedded in segment 008

starting with the comment line "IDENTIFY THE SOURCE OF THE TEST PROGRAMS",

into the first test of each consolidated test set following the I/O

assignment statements. The last continuation line of the FORMAT statement

at Statement Label 0071 should be altered to reflect a unique means of

identifying each executable program. In Version 3, this has been done

by identifying each executable program as a PART, numbered from 1 to 14.

The first six input cards associated with segment 008 will then be

required for running each of the consolidated test sets. Cards 1, 3

and 5 are prepared by the user, replacing the dummy information on the

card images supplied, with the environmental information. See Section II-A2

Input Data Preparation,

The number of test segments which may be linked end to end is a function

of the power of the FORTRAN processor with the following exceptions:

a) Segment 360 may not be linked with any other test segment which

uses blank common.

b) Segments 169 and 179 when consolidated into a single program will

cause different elements of a specific labeled common block to be

initialized from DATA statements in different BLOCK DATA subprograms.

While the current FORTRTW standard does not exclude this, it is

anticipated that the future revised FORTRAN standard may prohibit the

user from so doing.

I-E-3
E3„ Deleting a Section of a Test Unit

If certain test elements fail to perform on a system because some elements of the FORTRAN language have not been implemented and the

test unit cannot be executed, it will be necessary to inspect the

test unit to determine what statements together with the corresponding

WRITE statements are affected. When a section of a test unit is

altered it is recommended that those statements which are changed

or deleted have appropriate comment cards inserted to identify the

change. This can be achieved by making the current statements into

comment lines with a character other than blank, *, or = as the

second digit and a comment card containing the number of lines which

follow in the replacement. If a statement which is deleted contains

a statement label, it will be necessary to repunch the card with the

four digit statement label right justified and replace column 1 with

a "C".

If a program test unit is too large for running as a single test unit

it may be separated into smaller units for testing. This may be

necessary for test segment 008, Formatted READ and WRITE, because

of its current size and the number of FORMAT statements included in

this test unit. The sample Result Output should be inspected. The

breaks in the program should conform to locations where a new page

indicator is detected at the beginning of a FORMAT statement. Data

cards are identified in the program listing and the card number is given

at the point of the appropriate READ statement.

E4. Deleting an Entire Test Unit

All test units are identified by segment numbers in columns 74-76.

Test units contain "C=" comment cards for specification statements

and I/O assignment statements with segment numbers 001 and 007,

respectively. STOP and END cards appear at the end of each test

unit as "C=" comment cards with the sequence number the same as the

test unit number. All cards related to a test unit may be removed

by inspection of the program listing. Any subprogram which is

associated with that program test unit will not be assoicated with any

other program test unit and may be removed. Distinctive comment cards

separate test units.

E5. Adding to a Test Unit

Any program test unit may be extended by appending statements after the

last executable statement in a program test unit. See Program conventions

for symbolic name and statement label use Section I-D. Result output

pages have been limited to 8 1/2 by 11 inch pages with a new page indicator

for each page. All variables must have their values initialized in the

test unit. Any new specifications must be introduced into "C=" cards within

the test unit and a check made of the specifications contained at the

beginning of the Part in Version 3. Array declarators used in the test

set are identified in Section I-D-3.

I-E-4
E6. Adding New Test Units

Be sure that the programming conventions used in this test set are followed. A segment number which has not been used less than 399

may be used for a main program test. Numbers 400-699 which

have not been used are available for subprograms. In general,

the number chosen should be high enough so that those elements of the

language which must be used in the test have already been tested.

Make sure that each new test is self contained. Initialize all values

within the new segment itself. Use the same comment line structure

to separate the new test unit, and intersperse comments to describe

the test. Update the directory, specification section and the comment

cards at the beginning of the Part in Version 3 to reflect any new program test units added. The listing of the program is supposed to

contain enough comments to permit the programs to be used if additional

documentation is not available.

I-E-5

F. DIFFICULTIES ENCOUNTERED DURING THE TEST PROGRAM DEVELOPMENT

During the implementation of the program design, a number of difficulties

other than the normal program debugging arose which required resolution.

These difficulties have been classified under the following five categories.

Fl. Interpreting the FORTRAN Standard

In interpreting the FORTRAN Standard document X3. 9-1966, there was a conscious effort to glean from the document only that which was stated,

and not to be Influenced by earlier implementations of the FORTRAN language.

This lead to a long list of questions which needed resolution. The ASA

FORTRAN technical committee, X3J3, reconvened to address these and other

questions of interpretation of the Standard. The committee published

two clarification reports [2, 3] concerning the Interpretation of the

standard. Those questions which could not be resolved without actually

revising the standard have been deferred and will be handled in the future

revision and extension to the FORTRAN standard. Some of the questions

did not arise until some initial test units were run on different processors

and the different interpretations of the standard could be asserted and

appeared to be justified by the wording in the standard.

F2. Precision, Conversion and Maximum Value of Numeric Data

The choice of the actual values used in arithmetic expressions presented

considerable dlfflcialty. The range of the exponent, which is not covered

by the FORTRAN standard was kept small so that the variation on different

processors would not be reflected in the test results. To overcome some

of the precision problems, small fractional powers of two were used in the

hope that the conversion of these values would be exact. Recognizing

that the FORTRAN standard defines a real constant to be an "approximation

to the digit string Interpreted as a decimal numeral" the equation

1.3+1.3=2.6 may not be true if the result were compared to the constant

2.6 because the constant when converted and when doubled may not have

the same internal representation as the constant 2.6. Rather than attempt

to apply an error tolerance to the results, it was decided to subtract

the expression result from the expected result and rely upon the rounding

under the Fw.d format field descriptor on output to compensate for a small difference in values. Because the Fw.d format field descriptor

cannot be applied to results derived from a double precision operation,

it was necessary to stipulate in the test results a reasonable error

factor to be applied to the value if the result was not zero.

F3. Meaningful Tests and Comprehensible Results

The development of meaningful test programs of the FORTRAN Standard

language cannot be separated from the presentation of the results of the

test. If it can be considered that any test result value printed from a specific application of the test programs on a FORTRAN processor could be in

error, the means to determine the statements involved in the test result

must be readily discernible. This lead to examining, on a case basis,

how to present the results. Where ever possible the results obtained from

I-F-1
arithmetic operations were subtracted from the expected result and

the expected value of zero printed, so that the user could quickly

scan a page of results and determine any errors. When this was not

possible, Hollerith information is printed directly above the expected

value so that the eye can quickly scan the results for discrepancies,

or some appropriate means such as the test number for the value in

error, so that reference back to the program listing could be made.

Various elements of the FORTRAN language presented some difficulties in

displaying the results.

The effect of the scale factor both on READ and WRITE is such an example.

If the FORTRAN processor does not perform this conversion properly, and

only the expected result is printed with the processor result, it is

tedious to determine from the program listing what actual data and format

field descriptor is associated with a value. Because of this, the

information which a user would need to determine the operation being

performed is presented in a tabular form with the expected result and the

actual result.

The Intrinsic Functions SNGL and DBLE presented the problem of storage

unit size and how can it be determined whether these functions are actually performed when the maximum real and double precision constant

length established for the programs is 7 and 14 digits respectively.

The FORTRAN Standard does not define these functions to operate under

the same rules as the corresponding assignment statement operation

identified in Table 1 of the FORTRAN Standard, The FORTRAN Standard

does not address the precision of a value, so that it cannot be determined

from the document if a standard conforming program may READ or WRITE

values which express a precision in excess of the processor capability.

Because of these factors, for FORTRAN processors which can express a REAL value of 14 or more digits in a single storage unit, the printed

results may not display the value to a precision large enough to encompass

the actual function result. Increasing the number of decimal digits expressed

in the format field descriptor should eliminate the difficulty.

The Basic External Functions presented a significant problem for devising

test programs because the units of the arguments are not specified in the

FORTRAN Standard and there was to be no attempt to address the unspecified

range of arguments, precision or accuracy of the function results. This

lead to using the "defacto standard" practice for the units of arguments

and to select arguments which reduced the probability of variation due

to conversion and for which there were also published table values. It

is hoped that the arguments selected with their expected results, although

not necessarily representative of normal usage, would constitute a basis

for the user determining whether the function referenced is, in fact, the

function obtained. Table values were not readily available for the

complex functions so that a different method had to be employed.

I-F-2
F4. FORTRAN Compilers With_Language Extensions

The difficulty of assuring that a FORTRAN program is confined to that

which is defined in the FORTRAN Standard X3.9-1966 is substantial.

Because a program produces the same correct results on many FORTRAN

processors does not in itself substantiate the program to be standard

conforming. Even though the test programs were desk checked, not all

non-standard usage was picked up by this method. Moving from one processor

to another brought to light the differences in the extensions or relaxations permitted on various FORTRAN processors. Those programming

errors which persisted undetected through many FORTRAN processors where

they were treated as extensions are:

- Missing type declarations for dummy arguments of statement functions

- Missing commas after an nH format field description in FORMAT statements

- Non agreement between format field description and the type of the list

element

- Missing decimal point in a real constant in a real expression

- Lack of agreement of type between actual and dummy arguments of a subprogram where the dummy argument is not referenced.

F5 . Per fo rnd ng th e Tests

The initial running of the completed test programs on various FORTRAN

processors was performed from punched cards. The punch card code used

was the BCD-H set which is identified in Appendix D of the FORTRAN

Standard X3. 9-1966. It was assumed that any computer installation would

have a conversion routine for this code to its own, if it were not an option of the compiler. For the most part the testing was performed on the consolidated test set which reduced the number of executable programs

from 116 to 14. This was done to minimize the number of control cards

needed to be inserted around the programs. In spite of assistance from

systems personnel at the test site in every initial running on a different

processor one or more programs had to be resubmitted to the computer

because of operating systems control card errors. The kinds of errors were

:

- Failure to identify the FORTRAN Programs as BCD card code producing

errors in scanning the FORTRAN statements.

- Failure to identify the data as BCD H set causing the execution to

be aborted on improper symbols on input cards.

- Missing or mispunched control cards.

- Inproper sequencing of control cards

.

At no time was the alloted time on the computer or the maximum number

of pages of printing exceeded. Because many of the test programs may

require the same set of control cards, special care must be taken for those

programs requiring data, an auxiliary tape unit and subprograms.

I-F-3
The differences in capability of operating systems did not present

a difficulty but the lack of standard terminology and definition of

functional capability presented barriers in human communications.

When a compiler had an option to check the programs for conformance

to the FORTRATJ standard and no diagnostic messages resulted, the

test program writers were lulled into the belief that the programs

met the standard, which later running on a different compiler proved

not to be the case. Not all non-standard usage even within a single

FORTRAl^I program unit were detected.

I-F-4
G. REFERENCES

1. American Standard FORTRAN X3. 9-1966 - since the original publication

of the FORTRAl^ Standard, the standardizing organization has changed

its name from American Standards Association to United States of America

Standards Institute and recently to American National Standards Institute.

Therefore, documents identified as ASA X3. 9-1966, USASI X3. 9-1966 and

ANS X3. 9-1966 all refer to the same document.

2. Clarification of FORTRAN Standards - Initial Report. Communications of

the ACM Vol. 12, No. 5, May 1969.

3. Clarification of FORTRAN Standards - Second Report. Communications of

the AQl Vol. 14, No. 10, October 1971.

4. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical

Tables. NBS. M. Abramowitz and Irene A. Stegun, editors. Applied

Mathematical Series 55, 1966.

I-G-1

SECTION II USERS MANUAL

OPERATING PROCEDURES

The NBS FORTRAI>I Test Programs are designed to test the acceptance of the

ASA F0RTRA^^1 Standard X3. 9-1966 language definition by a FORTRAN processor.

The Test Programs are comprised of 116 test units and approximately 14,500

card images

o

Al. Organization of Tests and Facilities Requirements

The FORTRAN Test Programs are presented in two forms, one for

execution on small FORTRAN processors identified as Version 1, and

the other for large PORTRAIT processors identified as Version 3o

The tests make use of a maximum of 3 I/O units. These I/O units are identified as integer variable names which are assigned values in the

first executable statements in each executable program and the statements

may be altered by the user. No subprogram directly references these

variable names or values.

The variable names and their current values are:

The test programs should be run in numeric order. Test sequences contained

in later test units may depend upon the successful execution of earlier

test units.

a) Program Order

The FORTRAN Standard does not define the order of presentation of

a main program, BLOCK DATA subprograms, FUNCTION or SUBROUTINE

subprograms to a FORTRAN processor. This order is prescribed by

the implementor and may vary from system to system. Systems also

vary on the need for systems control cards or special cards

preceding each subprogram. The test programs have been arranged

with no intervening control cards but contain the necessary STOP

and END cards as follows:

Main program

Subprograms (if required)

Data (if required)

Some systems may require a specific order for BLOCK DATA subprograms

distinct from FUNCTION or SUBROUTINE subprograms.

IRVI

NUVI

INVI

for input, usually a card reader, is defined as unit 5.

for test results, usually a line printer is defined as unit 6.

for intermediate input/output data, usually a magnetic tape,

is defined as unit 9.

II-A-1
The subprograms appear after the corresponding main program unit

and before the data in the order listed in Section II-A3 for

Version 1 and Section II-A4 for Version 3.

Each program is set up (except for the system control cards) for a FORTRAN compile- load- and- go execution.

The user is assumed to be familiar with the operating system control

requirements necessary to perform a FORTRAN compilation.

These steps should be followed:

- Choose the appropriate control cards for a FORTRAN compile.

- Check the format and ordering of control cards carefully.

- In particular, check if any control cards are necessary for

FUNCTION, BLOCK DATA, and SUBROUTINE subprograms.

- Check the particular FORTRAN system documentation for any

special requirements for ordering of subprograms which may

differ from the order of the test program.

- Check if the test program requires input data. Version 1 requires data for test segments 008, 009, 310 and 312; Version 3,

for all parts. Cards 1, 3 and 5 of segment 008 for Version 1 and

all parts for Version 3 may be prepared by the user and replace the

sample cards supplied with the programs. Section II-A2.

Sections II-A3 contains the list of test programs for Version 1. The

accompanying table identifies the I/O facilities requirements and

other related information.

Sections II-A4 contains the list of test programs for each of the

14 Parts for Version 3 and identifies the I/O facilities requirements

as well as a summary sheet related to all Parts.

b) Memory Requirements to Execute the Test Programs

During the development of the test systems ten different computing

systems were used and the current set of tests were run on five

major systems. Although no requirements for memory can be determined

without experimentation, the largest test unit in Version 1 required

less than 3,000 words of memory. When structured into 14 executable

programs as Version 3, the largest program required less than 6,000

words of memory.

c) Time

The time to compile and execute the test programs varies with the power

of the computer and the compiler. The test units, for the most part

are straight line programs. During the debugging of the test program

set of Version 3 on different large scale systems less than 30 seconds

was required to compile and execute any one of tlie 14 Parts excluding

card read and print time.

II-A-2

1
A2. Input Data Preparation

All data card images associated with the FORTRAN Test Programs are included with the program distribution. It is not essential to the

performance of the test programs to prepare any input data, however,

provisions have been made to facilitate the identification of the

test program results for a given FORTRAN processor.

In Version 1, test units 008, 009, 310, and 312 require input data

which is supplied with the programs. The first six (6) cards associated

with test unit 008 cause a heading page to be produced for the program

set.

In Version 3, all test Parts 1 to 14 include six (6) input cards as the

total input data to that part, except Parts 1 and 13 which include

additional input data cards supplied with the test programs.

Tliese six cards permit information to be introduced by the user to

identify: the computer, FORTRAN compiler identification, operating

system level, date, etc., which describe the environment in which

the test is performed. Cards 1, 3 und 5 must be replaced and prepared

to introduce three (3) lines of print which precedes test unit 008

in Version 1 or is appended to the initial output page of each test

part in Version 3.

The first 40 characters from each of three cards (cards 1, 3 and 5) are read and replace the Hollerith information supplied in each of

three FORMAT statements. The first character of each card must be blank

(for print carriage control) and the other 39 characters must be from

the FORTRAN character set. Cards 2, 4, and 6 must remain as prepunched.,

These six cards are part of the first test unit (00 8) in Part 1, testing

the replacement of Hollerith information in a FORMAT statement by a formatted READ, and the symmetry of interpretation of a terminal slash (/)

in a FORMAT statement used for READ and WRITE, causing cards 1, 3, and 5 to be read and written, and cards 2, 4 and 6 to be skipped on input and

blank lines to be produced on output.

These six cards are not part of the test in parts other than Part 1 but

are included for user output documentation only.

WARNING: The following four characters should be avoided in preparation

of the three cards, because these characters differ in the punch card

code for input preparation devices:

(

)

II-A-3
A3. List of Test Programs for Version 1

The I/O Unit numbers used in the Test Programs are:

Input (card reader) 5

Output (printer) 6

Intermediate 9

The following table identifies each of the 116 Test Programs for Version 1 and

the associated subprograms.

Codes Used to Describe the Information in the Table

Coliamn Column

1 M Main Program 4 X Intermediate Tape Required

F External Function

Seg. Name Test Table

000 Directory of Test Programs ------ 342

008 - FMTRW Formatted Input/Output M I 8 - - - 529

6 Identification Cards and 40 Data Cards ______ 46

009 - AFRMT A-Conversion Mil 115

3 Data Cards ______ 3

010 - DATA2 DATA Statement Use M-3 74

003 - DATAl Test Format of DATA Statement M D 84

011 - AASGN Real and Integer Arith Assignmt. Stmnts. M-3 268

013 - DASGN Simple D.P. Assignment Statements M - 8 420

015 - CASGN Simple Complex Assignment Statements M - 9 - - - 469

016 - LASGN Logical Assignment Statements M - 1 - - - 106

017 - INTRL Arithmetic Assignment Statements M - 4 - - - 185

020 - UGOTO Unconditional GO TO Statements M - 1 69

II-A-4
021 AGOTO GO TO Assignment Statements M 1 - 149

022 CGOTO Computed GO TO Statements M 1 mm mm - 146

030 ARBAD Basic Addition M 1 mm - 115

031 ARFAD Double Precision Addition M _ 1 - 57

032 ARBSB Basic Subtraction M _ 1 - 67

033 ARFSB Double Precision Subtraction M 1

-m — - 72

034 AREAS Basic Addition and Subtraction M 1

mm « - 79

035 ARFAS Addition and Subtraction of D.P. Values M 1 « — - 60

036 _ ARBMI Multiplication of Integer Values M 1 — — - 66

037 ARBMR Multiplication of Real Values M _ 1 - 64

038 ARFMD Multiplication of D.P. Values M 1 - 71

039 _ ARBDV Division of Integer and Real Values M _ 1 - 78

040 ARFDV Division of D.P. Values M 1 - 66

041 ARBEX Exponentiation of Integer and Real Values M mm 1 mm - 90

042 ARFEX Exponentiation of D.P. Values M _ 1 - 74

043 ARBHI Hierarchy of Operators and Parentheses M _ 1 _ _ - 177

050 _ SBB67 Subscripts of Integer, Real Arrays v, k M _ 1 _ — - 79

051 - SBB45 Subscripts of Int., Real Arrays v+k, v-k M - 1 - - - 87

052 SBB13 Subscripts of Int., Real Arrays c*v, c*v+k,

c*v-k

M 1 - 112

053 — SBF17 Subscripts of D.P. Arrays v, k, c*v, c*v+k,

c*v-k, v+k, v-k

M — 1 — — - 79

054 SIMIF Arith. IF, Logical IF followed by GO TO M 1 - 77

055 IFABS Intrinsic Functions ABS, lABS M 1 - 64

056 _ IFFLT Intrinsic Function FLOAT M 1 - 49

057 IFFIX Intrinsic Function IFIX M 1 _ _ - 59

yj DO Tn1"T*i J.liLi.±ll2JLi^ ncT Piin rLUH-LJ-OIlb f^l- •? r>r>c OiolN, QTPM TCTTM iOiolN 1 ~ oZ

059 IFDAB Intrinsic Function DABS M 1 - 65

II-A-5
060 - IFTRN Intrinsic Functions AINT, INT, IDINT M - 1 107

061 - IFMOD Intrinsic Functions AMOD, MOD M - 1 - - - 84

062 - IFMAX Intr. Funct. AMAXQ, AMAXl, MAXO, MAXl, DMAXl M - 2 248

063 - IFMIN Intr. Funct. AMINO, AMINl, MINO, MINI, DMINl M - 2 - - - 225

064 - IFDSG Intrinsic Function USIGN M - 1 - - - 58

065 - IFDIM Intrinsic Functions DIM, IDIM M - 1 - - - 69

066 - IFSGL Intrinsic Function SNGL M - 1 80

067 - IFREL Intrinsic Function REAL M - 1 - - - 102

068 - IFIMG Intrinsic Function AIMAG M - 1 - - - 129

069 - IFDBL Intrinsic Function DBLE M - 1 57

070 - IFCPX Intrinsic Function CMPLX M - 1 - - - 61

071 - IFCJG Intrinsic Function CONJG M - 1 - - - 66

072 - IFBMS Integer and Real Intrinsic Functions M - 1 - - - 129

073 - IFFMS Int., Real and D.P. Intrinsic Functions M - 2 - - - 181

080 - EXPON Basic External Function EXP M - 1 60

081 - DEXPO Basic External Function DEXP M - 1 68

082 - CEXPO Basic External Function CEXP M - 3 98

083 - LOGTM Basic External Function ALOG M-1 57

084 - DPLOG Basic External Function DLOG M-1 67

085 - CXLOG Basic External Function CLOG M - 3 106

086 - COLOG Basic External Function ALOG 10 M-1 - - - 56

087 - DCLOG Basic External Function DLOGIO M-1 66

088 - SINUS Basic External Function SIN M-1 - - - 81

089 - DPSIN Basic External Function DSIN M-1 82

090 - CSICO Basic External Functions CSIN, CCOS M-1 - - - 65

091 - COSNS Basic External Function COS M - 1 - - - 82

092 - DPCOS Basic External Function DCOS M-1 81

II-A-6
094 - TANGH Basic External Function TANH M 1 - 57

095 - SQROT Basic External Function SQRT M - 1 - - - 55

096 - DSQRO Basic External Function DSQRT M - 1 - - - 63

09 7 - CSQRO Basic External Function CSQRT M - 1 - - - 74

098 - ARCTG Basic External Function ATM-i M - 1 - - - 58

099 - DACTG Basic External Function DATAN M - 1 - - - 66

100 - ACTG2 Basic External Function ATAN2 M - 1 - - - 56

101 - DATN2 Basic External Function DATAN2 M - 1 - - - 66

102 - DMODA Basic External Function DMOD M 1 - 63

103 - CABSA Basic External Function CABS M 1 - 84

no - BSFTS Statement Functions - Integer and Real M - 1 - - - 74

005 •- BSFDF Statement Function Definition M - 35

111 - FSFTS Statement Funct. - D.P., Complex, Logical M 1 - 108

006 - FSFDF Statement Function Definitions M - 58

140 - CPXAD Addition and Subtraction of Complex M - 1 - - - 76

141 - CPXMU Multiplication of Complex Numbers M - 1 - - - 141

142 - CPXUV Division of Complex Numbers M - 1 - - - 83

143 - CPXEX Exponentiation of Complex Numbers M - 1 - - - 125

144 - CPXOP Arithmetic Operations on Complex M - 1 - - - 63

145 - CREAD Add and Subtract Complex and Real Numbers M - 1 - - - 67

146 - CREMU Multiply Complex by Real Numbers M - 1 - - - 62

147 - CREDV Divide Complex by Real and the Reverse M - 1 - - - 58

148 - CREOP Combined Operations on Complex and Real M 1 - 66

149 - MISC3 Blanks in, Cont. of Statement to Max Lines M 1 - 97

150 - MISC4 Special Characters for Continuations M 1 - 105

II-A-7
160 - BRFCP Real External Functions M - 1 - 82

400 - AFS Real Argument F 010

420 - BFS Real Arguments F 10

430 - CFS Integer Argument F _ _ _ _ _ iq

440 - DFS Integer Arguments F ----- 11

450 - EFS Array Name as Argument F _ _ _ _ _ n

460 - FFS Different Types of Arguments F 15

161 - BIFCP Integer External Functions M - 1 87

401 - lAFI Real Argument F 10

421 - IBFI Real Arguments F 10

431 - ICFI Integer Argument F _ _ _ _ _ iq

441 - IDFI Integer Arguments F - - - - D 13

451 - lEFI Array Name as Argument F - _ _ _ _ n

461 - IFFI Different Types of Arguments F - - - - - 15

162 - FRFCP Real External Functions M - 1 - C - 132

402 - GFS D.P. Argument F - 11

422 - HFS Complex Arguments F 12

432 - IRFS Logical Argument F 16

442 - JRFS External Procedure F 11

452 - RFS Different Types of Arguments F C - 29

163 - FIFCP Integer External Functions M - 1 - C - 123

403 - IFI D.P. Argument F 11

423 - JFI Complex Arguments F 12

433 - KFI Logical Argument F 16

443 - LFI External Procedure ^ " ; 453 - IWl Different Types of Argiiments F - ^ C - 29

164 - CFCCP Complex External Functions M - 1 - C - 132

404 - AFC Real Argument F 10

414 - BFC Integer Argument F 10

424 - CFC Array Name as Argument F - - - - - 11

434 - DFC D.P. Argument F 12

444 - EFC Complex Argument F - - - - - 11

454 - FFC Logical Argument F - - - - - 15

464 - HFC Different Types of Arguments F " C - 28

165 - DPFCP Double Precision External Functions M - 1 - C - 135

405 - AFD Real Argument F - - - 10

415 - BFD Integer Argument F - 10

425 - CFD D.P. Arguments F 11

435 - DFD Complex Argument F 12

445 - EFD Logical Argument F ----- 16

455 - FFD External Procedure F - - - - - 11

465 - GFD Array Name as Argument F - - - - - 12

475 - IIFD Different Types of Arguments F C - 32

I I-A8
IDD or L<l_.r bogicai cxuemai ruricuions MM 1i c 1 44

l\r AFRa KccLJ. rtl y LuUcIll, r mo Dro 1 "V^ /-»- /->v -v* A -v* /^l 1 yyy >^ inueger Argunicnu r lU

rcR u.r. Argument p1 1

1

X X

r\r? D urn Logical Argument r?r 1

1

446 _ EFB Complex Argument F 12

456 - FFB Array Name as Argument F 12

40D PCR Lir D External Procedure pr i 1

A 7A 4 /O nr t> Dif£erent Types o£ Arguments pr cL. ZD

167 _ SBRTN Subroutine Subprogram M _ 1 _ C _ 103

407 - AAQ Integer, Real Variables, Array Elements S 23

/I 1 "7 Array Elements cb lo

/I 9 7 4Z / No Argument List co9 1 / 1

168 _ FSBRT Subroutine Subprogram M _ 1 _ c _ 153

408 - ADQ Different Types of Arguments S 39

41o Array Names and Integer Arguments c 428 AFQ No Argument List S _ c 41

169 DT T/T^T* BLKDl BLOCK UAIA lest M 1 71

A HQ dLUkU dlulk UAIA ouDprogram t5 n oo

179 BLKDA BLOCK DATA Test M _ 1 _ _ 70

419 - BLAKD BLOCK DATA Subprogram B - - - - D 24

429 BLBKD BLOCK DATA Subprogram B D 17

439 - BLCKD BLOCK DATA Subprogram B - - - - D 20

180 - UNFRW Unformatted WRITE and READ M - 1 X - - 133

182 - BACUP BACKSPACE Tape M - 1 X - - 74

190 - DOTRM DO Loops - Terminal Statements M - 1 - - - 135

191 - DOLMT DO Loops - Parameters as Variable Names M - 1 - - - 62

192 - DONSC DO Loops - Completely Nested Nest M - 1 - - - 166

193 - DONSI DO Loops - Incomplete DO, Exit by GO TO M - 1 - - - 60

194 - DONSX DO Loops - Extended Range M - 1 - - - 130

195 - DOWIL DO Loops - Nested Nest M - 1 - - - 65

196 UUIN iU DO Loops - i/0 iermmal Statements M 1 X 9

1

197 MORDO DO Loops - I/O, StatmL. Ft., Intr Ft., CALL M - 1 X - - 143

005 - DorUr Statement Functions M 35

412 MDQ S^ nbl^L^ rmJ.V^U&l^-l.llVx it 1 n p SnbTTmpr^Tn ^ciL^LJXw^X cull

200 3UBR1 Subroutine - Operations Done at Sub Level M 1 X c 52

410 SUBRQ Subroutine Subprogram - No Arg. List S X c 101

II-A-9
300 - LOGIF Logical IF Statements M - 1 - ~ - 275

411 - SMCQ Subroutine Subprogram S - - - - - 12

301 - BARIF Arithmetic IF Statements - Integer, Real M - 1 - - - 175

302 - FARIF Arithmetic IF Statements - D.P. M - 1 - - - 99

310 - lOFMT Formatted READ/WRITE - Additional Features MIS 310

38 Data Cards 38

312 - RDFMT Formats in Arrays M I 1 - - D 201

462 - F^^^Q subroutine Subprogram S - - - - - 33

13 Data Cards - - 13

350 - MISC5 Specifications for Program Form M - 1 - - - 156

351 - FUNMX Basic External Functions - Trig Formulae M - 1 - - - 58

352 - NAf'lES Names Resemble FORTRAN Verbs, Functions M - i - - - 79

413 - MAQQ Subroutine (Intrinsic Function Names s - - - - - 15

463 - MBQQ Subroutine used as Variable Names in s - - - - - 15

473 - AMQQ Subroutine some Subrts. and as S----D21

483 - BMQQ Subroutine Functions in others) s - - - - - 16

360 - SPEC2 COMMON, DIMENSION, EQUIVALENCE M - 1 - / - 169

Total Cards 14360

II-A-10
A4o List of Test Units by Parts for Version 3

fortrainI test programs summary information for version 3

# of # of INPUT intermediate Pgs of

Part # TEST UNITS SUBPROGRAMS DATA* TAPE REQUIRED OUTPUT # of CARDS 14 X 16 1123

2

' 2 18 932

3 10 14 1076

4 13 14 1123

5 11 14 1153

.6 9 11 912

7 13 18 997

8 . 12 13 951

9 11 12 971

10 5 29 6 1031

11 ' 5 23 6 1090

12 12 5 X 13 1433

13 5 2 X 10 1190

14 4 4 5 579

TOTAL 116 63 170 14561

*Input data other than the 6 cards which are appended to each Part for user

output documentation

input unit #5 = card reader

output unit #6 = printer

intermediate unit #9

II-A-11
VERSION 3 PART 1 MAIN PROGRAM

Segment # and Name Test

1.

2.

3.

000

001 SPECS

003 DATAl

00 7 lODEF

008 FMTRW*

009 AFRMT*

010 DATA2*

011 AASGN*

Special Documentation

Specifications needed for Part 1 Test Format of DATA Statement

I/O Unit Assignment Statements

Formatted Input/Output

A- Conversion

DATA Statement Test

Real and Integer Arithmetic Assignment Statements

Input 49 cards - prepare 3 cards (cards 1, 3, and 5) Unit #5

Output - Print 16 pages Unit #6

*Produce Output

Note 1 The first 6 input cards (user prepared cards 1, 3, and 5) are associated

with seg. 007 program element, however, performing tests under segment

008. See Data Preparation Section II-A-2. These 6 cards are part of the

test for this part only. Inclusion of these cards in later Part tests

is for user output documentation only.

Note 2 40 input cards - for test of seg. 008

Note 3 03 input cards - for test of seg. 009

II-A-12
VERSION 3 PART 2 MAIN PROGRAM

Segment # and Name Test

1.

000

001 SPECS

007 lODEF

013 DASGN*

015 CASGN*

Special Documentation

Specifications needed for Part 2 I/O Unit Assignment Statements

Simple Double Precision Assignment Statements

Simple Complex Assignment Statements

Input 6 cards - prepare 3 cards (1, 3, and 5) Unit #5

Output Print 18 pages Unit #6

*Produce Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 2 are not part of the

test, but are included for user output documentation only.

II-A-13
VERSION 3 PART 3 MAIN PROGRAM

Segment # and Name Test

1.

uuu opt; dJ- UU L-LlIUcil L cl LX OH

O r C O OjJC ^J. X J. Cl L X Ul lo IICCUCU. XUX r ctX L O no 7 X / VJ UilX L rto o X ^IllUt/H U O LcLLdllwIl U J.O TLiU^X r^fTT r* 53 1 A c c "1 rmmf^Ti'f" ^"t* q 1" f^m^in "f" c UcLX rVo o X ^lliUt^i 1 L O C dL^illt^ii Li> 017 U i / XJN 1 I\Li /\X X LI 1 lUc UX C b X glllllt? 11 L o L d LC'lllCil Uo 020 UGOTO* Uncondi tional GO TO Statements

021 AGOTO* GO TO Assignment Statements

022 CGOTO* Computed GO TO Statements

0 30 ARBAD* Basic Addition- Integer and Real

031 ARFAD* Double Precision Addition

032 ARBSB* Basic Subtraction-Integer and Real

033 ARFSB* Double Precision Subtraction

0 34 ARBAS* Basic Addition and Subtraction-Integer

and Real

Input 6 cards

Output Print 14 pages

*Produce Output

Unit #5

Unit #6

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 3 are not part of the

test, but are included for user output documentation only.

II-A-14
VERSION 3 PART 4 MAIN PROGRAM

Segment# and Name Test

UUU Opc U± dJL UUCUlUfc; J I L d- L X UJl UU

1

or Euo opt? CX IX L-d LX Ullb HctJU-tJU. XUX rdi L H

UU / iUUcr X/U UkX C r\bbXgIlIilt?Il U D Ld-tcIIlcIl Lb

U OD APR AC* r\U.U.X uX UIl d-llU. O Liu U X dL- L X UJ 1 UX UULIUXC rXCL.XbXL»ll

V dX Ut?b u oo iMUXCXpXXCdLXUIl Ux XJl Lc^c; i V dX Ucb

V J / A R RMR * iUU. X U X U XX d L X L^J 1 iJ X IVC d X V dJ. Llw o 0 '^S Ml ^l^^n^^ r'^i't'i on 0"F Donh 1 PT'f^ r*i <^ i on V^i 1 1 IP

I^ILIX LXJJXXV^CtUX V/l 1 ^JL L/VJLIUXC rX^^^XOXWll Va-XUlC-O u oy rt.KDiJ V uxvxbxun UX xiiLc ^t; x diiu. rvt; dx vdxucb

U4U UXVXbXOn Ox UUllU Xc rXt^LXbXOTl VdXUtJb

041 ARBEX* F XT) on p111*1 at"! on of TntpppT and Real Values

042 ARFEX* Exponentiation of Double Precision Values

043 ARBHI* Hierarchy of Operations and Parentheses

050 SBB67* Subscripts of Integer and Real Arrays v, k

051 SBB45* Subscripts of Integer and Real Arrays v+k, v 052 SBB13* Subscripts of Integer and Real Arrays c+v. c*v+k, c*v-k

053 SBF17* Subscripts of Double Precision Arrays v,k, c c*v+k, c*v-k, v+k, v-k

Input 6 cards Unit #5

Output Print 14 pages Unit #6

*Produce Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 4 are not part of the

test, but are included for user output documentation only.

II-A-15
VERSION 3 PART 5 MAIN PROGRAM

(Intrinsic Function Tests)

Segment# and Name Test

uuu OlJCk^XclX l^U^ LUllC i 1 L CL U X Ui 1 nn 1 Or CLiD OptJ OX I J. d. L X UIl JlCCUcCt lUX r d.X L D UU / ±\j uLt r T /O 1 I'm "f" A Q c "1 fTTiTn^^n^ ^"t" Ql'^^mf^'n't'

c

X/W UJIXU r\o o X ^JlJUcJl L O L d. UCllldl L o STMTF* rVX X Li line LX U XT ^ XU^XCdX XF XUXXUWtJLl Uy OVJ 1 ij UOD rtuO J XADO \^AUbUXULc vclXUc rUlH-LXUllb J UDD TFFT T*

(T^ UO 7/ TFFT Y* i r r JL A XrXA l^LiUIlvcXL XX Ulll txcclX LU XJlLcgtJl J 058 IFSGN* SIGN ISIGN TTransfer o£ Sien^

059 IFDAB* DABS (Absolute Value)

060 IFTRN* AINT, INT, IDINT (Truncation)

061 IFMOD* AMOD, MOD (Remaindering)

062 IFMAX* A^^AXO, AMAXl, MAXO, MAXl, DMAXl (Choose

Largest Value)

063 IFMIN* AMINO, AMINl, MINO, MINI, DMINl (Choose

Smallest Value)

064 IFDSG* DSIGN (Transfer of Sign)

Input 6 cards Unit #5

Output Print 14 pages Unit #6

*Produce Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2, These cards in Part 5 are not part of the

test, but are included for user output documentation only.

II-A-16
VERSION 3 PART 6 MAIN PROGRAM

(Intrinsic Functions)

Segment # and Name

000

001 SPECS

007 lODEF

065 IFDIM*

066 IFSGL*

067 IFREL*

068 IFIMG*

069 IFDBL*

070 IFCPX'^

071 IFCJG*

072 IFBMS*

073 IFFMS*

Input 6 cards

Output Print 11 pages

*Produces Output

Test

Special Documentation

Specifications needed for Part 6

I/O Unit Assignment Statements

DIM, IDIM (Positive Differences)

SNGL (Obtain most Significant part)

REAL (Obtain Real Part of Complex Argument)

AIMAG (Obtain Imaginary Part of Complex Numbe

DBLE (Express Real Argument in D.P. Form)

CMPLX (Express Two Real Arg. in Complex Form)

CONJG (Obtain Conjugate of a Complex Niamber)

All Intrinsic Functions-Real and Integer

All Intrinsic Functions-Real , Integer and D.P

Unit #5

Unit #6

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section I I -A- 2, These cards in Part 6 are not part of the

test, but are included for user output documentation only.
VERSION 3 PART 7 MAIN PROGRAM

Segment # and Name Test

000 Special Documentation

001 SPECS Specifications needed for Part 7 007 lODEF I/O Unit Assignment Statements

080 EXPON* Basic External Function

081 DEXPO* Basic External Function DEXP

082 CEXPO* Basic External Function CEXP

r\ a ^7 083 LOGTM* Basic External Function ALOG

084 DPLOG* Basic External Function DLOG

085 CXLOG* Basic External Function CLOG

086 COLOG* Basic External Function ALOG 10

087 DCLOG* Basic External Function DLOG 10

088 SINUS* Basic External Function SIN

089 OPSIN* Basic External Function DSIN

090 CSICO* Basic External Function CSIN and CCSIN

091 COSNS* Basic External Function COS

092 DPCOS* Basic External Function DCOS

Input 6 cards Unit #5

Output Print 18 pages Unit #6

* Produces Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in

Data Preparation Section II-A-2. These cards in Part 7 are not part of

the test, but are included for user output documentation only.

II-A-18
VERSION 3 PART 8 MAIN PROGRAM

Segment # and Name Test

1.

000

001 SPECS

005 BSFDF

006 FSFDF

007 lODEF

094 TANGH*

095 SQROT*

096 DSQRO*

09 7 CSQRO*

09 8 ARCTG*

099 DACTG*

100 ACTG2*

101 DATN2*

102 DMODA*

103 CABSA*

110 BSFTS*

111 FSFTS*

for Segment 110

for Segment 111

Special Documentation

Specifications needed for Part

Statement Function Definitions

Statement Function Definitions

I/O Unit Assignment Statements

Basic External Function - TANH

Basic External Function - SQRT

Basic External Function - DSQRT

Basic External Function - CSQRT

Basic External Function - ATAN

Basic External Function - DATAN

Basic External Function - ATAN2

Basic External Function - DATAN2

Basic External Function - DMOD

Basic External Function - CABS

Statement Functions (Real and Integer)

Statement Functions (D.P., Logical and Complex)

Input 6 cards Unit #5

Output Print 13 pages Unit #6

* Produce Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 8 are not part of the test,

but are included for user output documentation only.

II-A-19
VERSION 3 PART 9 MAIN PROGRAM

Segment # and Name Test

r\ 000 Special Documentation

001 bPhCb Specifications needed by Part 9

0U7 iUuhr i/u uniT, Assignment oratements

140 CPXAD* Addition and Subtraction of Complex Numbers

141 CPaMU* Multiplication of Complex Numbers

142 CPXDV* Division of Complex Numbers

143 CPXEX* Exponentiation of Complex Numbers

144 PDYHD* Arxxnmet-ic upeidLiuiib oii \j(jiiip±cA iNuiiiueib

145 CREAD* Addition, Subtraction of Complex, Real Numbers

146 CREMU* Multiplication of Complex by Real Numbers

147 CREDV* Division of Real, Complex by Complex, Real

Numbers

148 CREOP* Combined Operations on Complex and Real Numbers

149 MISC3* Blanks in, and Continuation of Statements to

Maximum Lines

150 MISC4* Special Characters for Continuation Lines

Input 6 cards Unit #5

Output Print 12 pages Unit #6

*Produce Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 9 are not part of the

test, but are included for user output documentation only.

II-A-20
VERSION 3 PART 10 MAIN PROGRAM AND 29 SUBPROGRAMS

Segment # and Name Test

1.

000 Special Documentation

UU 1 Specifications needed for Part 10

UU / iUUcr i/u Unix Assignment oxai,ementb

160 BRFCP* External Function Test - Real

161 BIFCP* External Function Test - Integer

162 FRFCP* External Function Test - Real - All

Argument Types

163 FIFCP* External Function Test - Integer - All

Argument Types

164 CFCCP* External Function Test - Complex

Subprograms

400 AFS

420 BFS

430 CFS

440 DFS

450 EFS

460 FFS

Subprograms

401 lAFI

421 IBFI

431 ICFI

441 IDFI

451 lEFI

461 IFFI

Subprograms

402 GFS

422 HFS

432 IRFS

442 JRFS

452 RFS

Subprograms

403 IFI

423 JFI

433 KFI

443 LFI

453 MFI

Subprograms

404 AFC

414 BFC

424 CFC

434 DFC

444 EFC

454 FFC

464 HFC

Used with Segment 160 - Real Function

Real Argument

Real Arguments

Integer Argument

Integer Arguments

Array Name

Integer and Real Arguments

Used with Segment 161 - Integer Function

Real Argument

Real Arguments

Integer Argument

Integer Arguments

Array Name

Integer and Real Arguments

Used with Segment 162 - Real Function

Double Precision Arguments

Complex Arguments

Logical Argument

Argument - External Procedure

Different Types of Arguments

Used with Segment 163 - Integer Function

Double Precision Arguments

Complex Arguments

Logical Arguments

Argument - External Procedure

Different Types of Arguments

Used with Segment 164 - Complex Function

Real Argument

Integer Argument

Array Name

Double Precision Argument

Complex Argument

Logical Arguments

Different Types of Arguments

II-A-21
Input 6 cards Unit #5

Output Print 6 pages Unit #6

* Produces Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 10 are not part of the

test, but are included for user output documentation only.

II-A-22
VliRSION 3 PART 11 MAIN PROGRAM AND 23 SUBPROGRAMS

Segment # and Name Test

000

001 SPECS

1. 007 lODEF

165 DPFCP*

166 BFCCP*

16 7 SBRTN*

168 FSBRT*

169 BLKDT*

Subprograms

405 AFD

415 BFD

425 CFD

435 DFD

445 EFD

455 FFD

465 GFD

475 HFD

Subprograms

406 AFB

416 BFB

426 CFB

436 DFB

446 EFB

456 FFB

466 GFB

476 HFB

Subprograms

407 AAQ

417 ABQ

427 ACQ

Subprograms

408 ADQ

418 AEQ

428 AFQ

Subprogram

409 BLOKD

Special Documentation

Specifications needed for Part 11

I/O Unit Assignment Statements

External Function Test - Double Precision

External Function Test - Logical

Subroutine Subprogram Test

Subroutine Subprogram Test

Block Data Subprogram Test

Used with Segment 165 - D.P. Function

Real Argument

Integer Argument

Double Precision Argument

Complex Argument

Logical Argument

Argument - External Procedure

Array Name

Different Types of Arguments

Used with Segment 166 - Logical Function

Real Arguments

Integer Arguments

Double Precision Argument

Logical Argument

Complex Argument

Array Name

Argument - External Procedure

Different Types of Arguments

Used with Segment 167 - Subroutine Subprogram

Integer and Real variables and Array Elements

Array Elements

No Argument List - Arguments passed thru Common

Used with Segment 16 8 - Subroutine Subprogram

Different Types of Arguments

Array Names and Integer Arguments

No Argument List - Arguments Passed

through Common

Used with Segment 169 - Block Data Test

Block Data Subprogram

Input 6 cards

Output Print 6 pages

*Produces Output

Unit #5

Unit #6

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation II-A-2. These cards in Part 11 are not part of the list,

but are included for user output documentation only.

II-A-23
VERSION 3 PART 12 MAIN PROGRAM AND 5 SUBPROGRAMS

Segment # and Name Test

1.

\J\J\J O LJC di. L^Lilliwl 1 C dC X VJl 1 on 1 cpppc <j r L. k_) O UC J_X V^CtLX L/1 lo ilCC-ClCLl XVJX rdJ-L X^

\J\J o L><j r ur O UcLUC'lll^ 11 L rUJlCLXUll Ut:^XXIIX LXUllo UoUU, WXLil

^pcTTTip'nl" 1Q7

007 lODEF T /O IIttiI" A<=^ ^ 1 cttudptiI" >Sl"a1"pmPTi1"<^

179 BLKDA* U J_i IvLy jv Rlnrlc 1-3 l.\J\^S^ LyCLUCL Data Tp<;t X^Ol^

uiN n\rv UIIIUX llld. L L CU. txcclU cUlU rVlXLc

X o RAfllP*

DDTRM*

1 Q 1 UULIMI DoLoops - Parameters integer variable names

192 DONSC* DoLoops - Completely Nested Nest

19 3 DONS I* DoLoops - Incomplete Looping

194 DONSX* DoLoops - Extended Range

195 DONML* DoLoops - Nested Nests

196 DONIO* DoLoops - I/O Terminal Statements

197 MORDO* DoLoops - I/O, Intrinsic Functions, CALL included

200 SUBRl* Subroutine Called

Subprogram

410 SUBRQ

Subprogram

412 MDQ

Subprograms

419 BLAKD

429 BLBKD

439 BLCKD

Used with Segment 200

Used with Segment 197

Subroutine Subprogram

Used with Segment 179

Block Data Subprogram

Block Data Subprogram

Block Data Subprogram

- Block Data Test

Input 6 cards Unit #5

Output Print 13 pages Unit #6

Intermediate tape Unit #9

*Produces Output

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in Data

Preparation Section II-A-2. These cards in Part 12 are not part of the test,

but are included for user documentation only.

II-A-24
VERSION 3 PART 13 MAIN PROGRAM AND 2 SUBPROGRAMS

Segment # and Name Test

1.

2.

3.

000

001 SPECS

007 lODEF

300 LOGIF*

301 BARIF*

302 FARIF*

310 lOFMT*

312 RDFMT*

Subprogram

411 SMCQ

Subprogram

462 FMTQ

Special Documentation

Specifications needed for Part 13

I/O Unit Assignment Statements

Logical If Statements

Arithmetic If Statements (Integer and Real

Expressions)

Arithmetic If Statements

Formatted Read and Write, additional properties

of

Formats in Arrays

Used with Segment 300

Subroutine

Used with Segment 312

Subroutine

Input 57 cards - prepare 3 cards (cards 1, 3, and 5) Unit #5

Output Print 10 pages Unit #6

*Produce Output

Note 1 The first 6 input cards in Part 13 (user prepared cards 1, 3, and 5) are not part of the test, but are included for output documentation only. See

Data Preparation Section II-A-2.

Note 2 38 input cards - for test of seg. 310

Note 3 13 input cards - for test of seg, 312

II-A-25
VERSION 3 PART 14 MAIN PROGRAM AND 4 SUBPROGRAMS

Segment # and Name Test

1.

2.

000

001 SPECS

007 lODEF

350 MISC5*

351 FUNMX*

352 NAMES*

360 SPEC2*

Special Documentation

Specifications needed for Part 14

I/O Unit Assignment Statements

Specifications for Program Form (Test)

Basic External Functions using Trig Formula

Names resembling FORTRAN Verbs and Function Names

Common, Dimension and Equivalence

Subprogram

413 MAQQ

463 MBQQ

473 AMQQ

483 BMQQ

Used with Segment 352

Subroutine Called from NAMES

Subroutine Called from NAMES

Subroutine Called from NAMES

Subroutine Called from NAMES

Input 6 cards

Output Print 5 pages

*Produce Output

Unit #5

Unit #6

Note 1 Prepare replacement cards for cards 1, 3, and 5 as described in

Data Preparation Section II-A-2, These cards in Part 14 are not

part of the test, but are included for user output documentation only.

Note 2 This test may cause difficulties in some compilers and may have to

be run independently of other tests.

II-A-26
B. PROCEDURES FOR ISOLATING TEST UNIT FAILURES FROM VERSION 3

The following procedures assume the NBS FORTRAN Test Programs, Version 3, are being used with the programs on interpreted punch cards rather than

from magnetic tape.

31. Deleting a Test Unit

If any part fails to complete the execution of all the test units

within the part, the printed results will probably contain at least

the heading of the segment which failed and no test unit beyond this

point will have been completed. If the test which failed is not the last one in a part, remove the cards which define the particular test and

proceed with the test with this test unit deleted. Parts 10-14 contain

subprograms which may have to be removed if a test failure occurs in

these parts.

B2. Creating a Single Test from a Deleted Unit

Each test unit may be run independently by either of the following two

methods.

a) Append the FORTRAN specification statements which appear at the

beginning of the appropriate part to the beginning of the test

unit to be retested. Include the one (or two) Input-Output

assignment statements appearing as a segment 007 card within

the first test unit of the part. This statement should be

inserted into the test unit to be retested as the first executable

statement, which can be located by the corresponding statement

appearing in the test unit as a comment card with C = in the

first two locations. Supply a STOP statement and an END card

at the end of the test unit main program. Although specifications

not used within this test unit may cause diagnostics to appear as warning messages to non referenced data names, the program test unit

is still a standard conforming FORTRAN program.

b) Isolate the test unit. Check the initial comment lines in the listing

related to the part containing the test unit. If any additional

segments are required to run this test unit, they are identified.

For every card in the isolated test unit containing a "C =" in

columns 1 and 2, duplicate the cards with the "C =" changed to

blanks and omit punching columns 73-80 of the card. Return the

comment cards to their original locations in the deck with the

corresponding FORTRAN created statements immediately below the

comment card. These "C = " comment indicators have been appended

to what otherwise would be FORTRAN specification statements, I/O

assignment, STOP statements and END lines. Omitting the duplication

of columns 73-80 will make it easier to remove these cards when the

test unit is returned to its original state for reinsertion into its

appropriate location in the test part. ~~ Test units numbered 008, 009, 310 and 312 are the only units which

require input data cards to perform the test.

II-B-1

C. SAMPLE TEST RESULTS

CI. Interpreting the Test Results

An attempt was made in the design of these tests to produce test results

which were as much as possible self explanatory. Wherever a value of

zero could not be created by the addition or subtraction of a constant

from the calculated result, a Hollerith equivalent precedes the test result

for comparison purposes.

The effects of conversion, precision, and exponent range are minimized by the

use of values which are integer and fractional powers of 2 where the choice

of values affected the test results. Other results are truncated to

minimize the effects of differences in systems precision.,

The ASA FORTRAN Standard does not prescribe the external output form for a Real or Double Precision zero. Systems implementors have used a wide

variety of forms with and without + or - signs. Some implementations

employ a + or - sign with the Fw.d format field descriptor when the

printed value is zero to denote a truncated value whose sign correspondsto the sign of the original value. Expect variations in the form of zero.

The ASA FORTRAN Standard permits the implementor a choice of form for output,

A positive sign is not required.

A leading zero before the decimal point for E and D conversion is not

required.

The following exponent forms are equivalent and correct for E conversion:

E+02

. E 02

+002

The following exponent forms are equivalent and correct for D conversion:

D+13

D 13

E+13

E 13

+013

In the test program results where D conversion is used on output and the

expected output value is stipulated to be zero, any value containing a negative exponent of D-13 or mathematically less is considered to be zeroo The test units containing the Basic External Functions do not attempt

to test either the range or the precision of these functions. A selected

set of arguments to these functions is presented for the purpose of

determining only whether the function name referenced is actually the

function delivered.

II-C-1
The following limits have been set for constants in this test program set:

Integer 5 digits

Real 7 digits

Double Precision 14 digits

Complex 7 digits (each half)

Hollerith 2 characters except in segment 009 which tests A-conversion

for 1 to 4 characters and 26 characters for the

truncation test.

Where the precision of a FORTRAN processor for a REAL datum approaches

the limit established for a Double Precision datum (14 digits) it will

be necessary to increase the number of digits printed out for the

test of the intrinsic function SNGL (test unit 066) to obtain

meaningful test results,

C2. Test Results

The following test results were obtained from actual execution of Version 1 or Version 3 of the NBS FORTRAN Test Program set. These results are a composite set of output pages derived from five FORTRAN processors showing

various forms for zero and differences in exponent form.

II-C-2
F 0 H T « A N 1 £ S T—

W06 R AH8

P K 6 P A H E0 BY N ATIONAL BU R EAU Qf STANPA R 08

fOH USE ON FORTRAN H H 0 CE880 R 8

IN ACCORPAN C e WIT H A8A FORTRAN X3,9»1966

VERSIO N X

H«tPAKtO BT UStK

FRfe P AREP B Y U8E R

P RERARID BY US& R

FORTRAN TEST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS'

FOR USE ON LARGE FORTRAN PRO-CESSORS

IN ACCORDANCE WITH ASA FORTRAN X3.9-196a

VERSION 3 PART 1

SAMPLE COMPUTER, FORTRAN COMPILER LEVEL

OPERATING SYSTEM VERSION

DATE, INSTALLATION NAME

FMTRW - (008) FORMATTED I/O

ASA REFS - 7.1.3.2.2 7.1.3.2.3 7.2.3

RESULTS

10101 010 lOlQ 10101010 9 999999998688 6868

77777 7766666.655555i»W'* '333221

AAA

ODD

GGG

JJJ

MMM

PPP

SSSvvv

6B3

EEE

HHH

KKK

NNN

QQQ

TTT

WWW

ccc

FFF

III

LLL

000

RRR

UUU

KXX

YYY ZZZ

= -/(),.$

BEGIN VERTICAL SPACING

FORMATd'tH SKIP 1 LINE /)

FORMATdSH SKIP 2 LINES //)

F0RMAT(16H SKIP 3 LINES ///)

IMBEDDED SLASHES - SKIP 1 LINE

SKIP 2 LINES

SKIP 3 LINES

SKIP TO NEXT LINE

SKIP 1 LINE

TEST NO /IHf , 7HA0VANCE

SKIP TO NEW PAGE

II-C-5
END OF VERTICAL SPACING TEST

BEGIN I CONVERSION TEST

EACH PAIR OF LINES SHOULD BE IDENTICAL

LINE 1 OF EACH GROJP IS HOLLERITH INFORNATION

999

999

5555 kkkk

5555 i*i*kt*

666 777777

666 777777

3 333 5 3 1 1 1 1 1 2 2 2 2 2 2 2 2 55 5 5 5 <

3 333 3 3 1 1 1 1 1 2 2 2 2 2 2 2 2 5 5 5 5 5 4^ ««

BEGIN F CONVERSION TEST

EACH PAIR OF LINES SHOULD BE IDENTICAL

7.7123'»56.7

7.7123't56.7

8. 889.9997. 123i»56

8.889. 9997. i23<»56

5.<*<*i»(»6. 5555 533.133. 133.133. l<fit<».l

5.i»<»<»<»6. 5555 533. 133. 133. 133. 1 1 5555.15555.1 66666. 166666.1 <*<».22 5555.15555.1 6666S. 166666.1 ki*,22

2.12. 12.12.12.1666. 3 33<».333t». 333<». 333

2.12. 12.12.12.1666.3 33<t.333<f. 333<».333

BEGIff E CONVERSION TEST

EACH PAIR OF LINES SHOULD BE IDENTICAL

-O.lE+01 B.22E-01

-.lE+01 .22E-01

a.333E4^02 0.i»<»<»<»E + 03

.333E^02 .<*<i<fi»E>03 -0.55555E-03

-.55555E-03

0.98765<»3E1-12

.98765«»3E*12

0 .6&&666E4-00

.6&5 666E->-aO

BEGIN COMPLEX CONVERSION TEST

EACH GROUP SHOULD BE IDENTICAL

1.0

1.0

22.0

22.0

5.5

5.5

66.6

66.6

33.123<» 55.0789

33.123'i 53. 0789

123.00 i*56. 88

123.90 (»56.88

0.123E4^01 0.9d7Ei^01

.123E*-01 .987E+01

-0.23*»5E + 02 -0.6879E + 02

-.23*»5E + 02 -.6879E + 02

0.7£>03 0 .i»E4^03

.7E4^03 .<fE^03

0.98765«»3E-0^ 0. l357913E-0t»

.98765£»3E-0*t . 1 357913E-0

19.3t» Q.2(»68E4-02

19.3<» .2i*68Ei-02

0.7S5E4^a2 87.6

.765E+02 87.6

<»3.9& 0.5<»a7E4^02

43. 96 .5(»07E«02

<»3.9& .5<»07E^02

W3,3b .5<»ti7E4-02

BEGIN D CONVERSION TEST

EACH GROUP SHOULD BE IDENTICAL

0.10^06

.10^06

-0.33<»D-0'»

-.33<tD-0<>

-.334D-0'*

0.765765<i0*00

.765765t»0*00

II- C4
.123<»5&789010^10

0.98765<»321096760-91

.98765i»32109876O-01

.98765'»32l09876O-91

.98765(»321098760-31

0.5555555t*20+03

-.5555555«»2D+03

-.5555555<»2O+03

BEGIN L CONVERSION TEST

LINES BELOW SHOULD BE IDENTICAL

T F F T T FTF

T F FIT FTF

TEST UNSUBSCRIPTEO ARRAY NAMES

IN IfO LISTS. EACH GROUP OF LINES

SHOULD BE IDENTICAL.

9.91.19.92.2 9.93.39. 9<».<» 9.91.19.92.2 9.93.39. 9<f.<» 9.91. 19.92.2 9.93.39. 9<f.<t -9.9-9.9-9.9-9.9

-9.9-9.9-9.9-9.9

-0.99D+0 1-0. 990+01- 0 . 99D+0 1-0 . 990*01

-.990+01 -.990+01 -.990+01 -.990+01

-.990+01 -.990+01 -.990+31 -.990+01

9999999999

9999999999

0. 990+01 0. 990+01 0 . 990+01 0. 990+01

.990+01 .990+01 .990+01 .990+01

0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9

•9 .9 .9 .9 .9 .9 .9 .9 .9

.9 .9 .9 .9 .9 .9 .9 .9 .9

.9 .9 .9 .9 .9 .9 .9 .9 .9

TFTFTFTF

TFTFTFTF

99999999

99999999

0.99D+0t

.99*00 1

. 99+00

!

.99+00 1 .99+00 1 .99+00

1

9.95.59.96.69.97.79.98.8

9.95.59.96.69.97.79.98.8

9.95,59.96.69.97.79.98.8

9.95.59.96.69.97.79.98.8

9999999999999999

9999999999999999

TFFT

TFFT

9.99.99.99»99.9

9.99.99.99,99.9

LEADING BLANK INSERTION TEST

EACH PAIR OF LINES SHOULD BE IDENTICAL

8

8

22

22

22

22

22

22

22

22

7 . 7 7.7

8.88

6.88

II- C5
9.999

9.999

TEST LOGICAL FIELDS WITH BLANKS

LINES BELOW SHOULD BE IDENTICAL

5.

5.55555

6.55555

7.tZSk5b

0.21E+01

•ZlE^Ol

0.331E^32

• 331E4-a2

.'''lE + 03

0. 55551E + 0<»

. 55551E*0*»

0 .666661 E-i-05 .666661E4-05

0.123t»567E*06

.l23i»567£+06

0.10*00

.104-00

0. 10*00

.10*09

0.10*00

.10*00

0.10*00

. 10*00

1.0 5.5

1.0 5.5

9.9 5.5

9.9 5.5

9.9 5.5

9.9 5.5

1.0 5.5

1.0 5.5

TEST 0=0, W=0*1 (PAIRS OF LINES

BELOH SHOULD BE IDENTICAL)

1*1*1*1*,

.55555

.55555

BEGIN G CONVERSION

EACH PAIR OF LINES SHOULD BE IDENTICAL

.1235E*05 1235. 123.5

.1235E*05 1235. 123.5

12.35 1.235 .1235

12.35 1.235 .1235

II- C6

I
SCALE FACTOR ON READ

IN ORDER OF FORMAT OCCURRENCE

CARD 9876. 5** 98. 765'*E2 9876.5'*

OESC 2PF8.3 -2PE9.«» F9.

TO BE 98.7651* .98*77E+0«t 987651*. 00

IS 98.765<t .9877E+0«» 987651*. 00

CARD 987.65<» 86i»7860-'» 86.H786E2

OESC aPG9 09. i» — £rt9. •» TO BE 987. 651* .86<»80-02 .86<*8E^.0l* IS 987.65<» .a6<*6D-02 .86i*8E'^0<*

CARD 86.(»7d6 8637.8700 9876.51*

OESC F9.<» D9.<» 2P691.1* TO BE 86<*7.860 .8658D4-0<» 98.77

IS 86t»7.860 .86580>0'» 98.77

SCALE FACTOR ON WRITE

IN 0?DER OF FORMAT OCCURRENCE

CARD 9.87655 98. 765'»E2 9876.51*

OESC 2PF12 .2 -2PE12.i» F12.1+

TO BE 987.65 .0099E^06 98.7661*

IS 987.66 .ail99E+06 98.7651*

CARD 987.651*

OESC 1P612.2

TO BE' 9.88E+02

IS 9.88E>02

CARD 86.1*786

DESC 2PF12.2

TO BE 861*7. 86

IS 861*7.86

861*7860-3

012.1*

8.61*790*02

8.61*790+02

8657.8600

1PD12.1*

8.65790*03

8.65790*03

86.i*786E2

-2PE12. 1* .0086E*0&

.0086E*06

9876.51*

2PGi&. h

9877.

9877.

THE LAST TWO LINES OF EACH

SET SHOULD BE THE SAME

FORMAT RESCAN - THE SECOND GROUP OF

EACH SET SHOULD AGREE WITH THE FIRST

1 22 333

k 55 666

7 88 999

1 22 333

k 55 666

7 88 999

Z 1* %%

8 t%

2

»«^ 1* %%

8 $S

6 (f

6 (f

*FRMT m (009J A»CONVfcR8I0N

ASA RE F - 7 ,2,i.e

EACH PAIR OF LlNkS SHOULD BtT^UbNTICAL

FOR COMPUTERS STORING FOUR

OR MORb CMAHACTtHS PER WORD

ABCOEFGHIJKUMNOPQRSTUVWX YZ

"•WW7TJT775"

0123H56789*AB2S(C)

0123«56789 + A^2S fCj

TEST A CONVERSION • ADDING BLANKS

E A C H P AIR OF LINES SHOUtD^ ^r It

TES T A F IELD T RUNCA T ION

2ND LINE SHOULD PARTIALLY MATCH 1ST

VWXYZ

II- C-7
OATAii • (010} DATA STATEMENT USt •750,05

•750,05

AUA REPS, • 7,2,2 •750,05

•750,05

RESULTS •750,05

IIN6 I OF feACH OHOUK 18 HOLLEKifH

INFORMATION, TEST IS SUCCESSrUL IF U.l 22.22

EACH UHUUH DUNUINS IHb SAMt VALUfcS 11.1

11,

1

22,22

22.22

0

0 n.i

u.l

22,22

22,22

00

0 •34,50

•34,50

.6,76

• 6,78

to •34,50•34,50

•6.78

•6,78

10

10

•34,50 •6,78'

10

10 10.00 •20,00

10,00

10,00

•20,00

•20,00

2at»

2<16 10,00

10,00

•20,00

•20,00

246

246

246 •200,00

•200,00

4000,00

4000,00

• 750

-200,00

•200,00

4000,00

4000.00

• 7l»0 • 750

•200,00 4000,00

• 750

• 750 •0,2950*05

•0,29¥D*05

-0,2950*05

0,00

0,00

•0,2950*05

•0,2950*05

0,00

0,00

0,00 0.345S7»901D*05

0,3456789010*05

246,15

0,34b6/6V01U+05

0,3456789010*05

246,15

246.15

0,3456789010*05

246,15

246,15 0, U223350^02

0.

0,

11223i5U«02

11223350^02

3546,74

3546,74

0.

0,

11223350^02^

11223350^02

3546,74

3546,74

3546,74 J

II- C8
0, 340^13

0,34DtlS

0, 340^13

TT

T

TT

r

pF

F

F

su

AD

AO

' m

NO

BC

. -

BC

*•

' P

P

1

AASGN - (Oil) SIMPLE" REAL AND INTEGER

ARITHMETIC ASSIGNMENT STATEMENTS

ASA REF. - 7. I.

I

LINE 1 OF EACH PAIR IS HOLLERITH

INFORMATION

INTEGER RESULTS

I !23'45 0

1 123M5 0

2 -3 -8765

2 -3 -8765

6912 0 -23

6912 0 -23

HHMM M321 H5

M32I 'B

2*468 -3 1 23 0

2468 -3123 0

REAL RESULTS

1 .0 358. 672*4 -2.0

1.0 358.672M -2.0

3.0 -271*4. 250 29. 30542

3.0 -271*4.250 29.305'<2

86 . 27 1 03*4 . 2 0.0

86 . 27 1 03*4 . 2 .0

0. 0 3*45. 678 -2.5

.0 3*45 . 678 -2 .5

-5.66 1 . I 1 I 1 1 I 1.0

-5.66 1.111111 I.O

-2.0 3.0 M.O

-2.0 3.0 '.0

5.0 -6.0 0.0

5.0 -6.0 .0

0.23 -0.716 -0.7

.23 -.716 -.7

0.81 0.9

.81 .9

II- C9
0.105E+03 -0.76E + 02 0.332'tE + 03 0.7{igE+06 0 .818«t2E + 05 -0. 9E+06

• X U !> u -5 % 1 DC T u c • 0 Xo H(C t + U

n r A ft t

0.5132E+01 0.53'»E-02 -0. litigE + OG 0.627E+05 0 . 5 3E + 0 5 -0. itE+OS

• 5 X «5 tt T Ul c "11. F— n 9 • XHX^CtUU _ f cr X n c

-0.g9E+03 0.105210E+05 0. 't56E+02 0.1'»63E + 02 0.2E-02 -0.355E+02

•4 nc OA oc 4. n c: • X U!> ^ X Ut T UD *9 C— fl 0 ~» -3i>5E + DZ

0.6652E+03 -0.529E+03 0. 7856«tE + 0'» 0.29E+07 0.«»072E + 07 -0. 61835E+-07

• DODc t + Uo mO tT U 0 . ?qF + n 7 1, n7 op X n7 — • bloobfc + u f -0.3*t567E + 0tf 0.6162E + 0t» 0.23E+00 0.829E + 0't 0.3E+03 -0. lE + Otf -•3'»567E+0't . 616 2E Oh • 23E + 0 0 • oZ9Et 0 4 > 3E+ 03 lE + Oif

0.91+333E + 01 0.352'tE-02 -0. 7tt32E + 00 0.3«»0'«E+00 0 .55E-03 -0. 761E+02

• %3 O 3 t T U 1 • o Ht u c •

t;5 RF5t — nDo7

O.lE+01 0.123E+05 -0.11E*05

4 C A fl -4 • 1 1 UX 1 91 F + n R • 1 Co t T u 5 • xxC."U!3

0.14«fE*02 -0.12E+00 0.36«f5E + 01 I' " • X ct T u u • 0 OHT? t T U X

-0.200E+Otf o.ggE+otf O.OE+OO

-.200E+0if .99E + 0«» 0. -0.1512E+06 0.21ifE*06 0. SttE+Ol — • l5lZt + 06 7 fiC ^ n 4

-0.4E-01 0.5321*tE + 01 0.6E+0'»

-.'E-01 .5321itE+01 .6E + 0«f 0.72E+06 -0.813E + 0'* 0.23i»E + 00

• f c

t

tU b " • O Xo t T U H ^ 7L.C 4-0 0

-0.3E+02 CijifE + Ol O.lE+05 F 0 R T R A N TEST P R 0 6 R A M S -.3E+02 .ifitE + Ol . lE+05

PREPARED BY NATIONAL BUREAU OF STANDARDS

0.36E-03 0.9E-0<» -0. lOE-02

.36E-03 .9E- Qt* lOE-02 FOR USE ON LARGE FORTRAN PROCESSORS

0.777E+01 -0.29E+03 O.'tE+Ol In accordance with ASA FORTRAN X3. 9-1966

.777E+01 -.29E+03 .itE+01

Version 3 PART 2 0.90E+01 0.810E+00 -0.7E+03

.90E+01 .810E+00 7E+03

0.62E+03 0.531 OE+01 -0.«»«t2E + 02 Sample computer, Fortran COMPILER LEVEL

.62E+03 .5310E+01 -.'«»2E + 02

Of-ERATINC SYSTEM VERSIOT-' 0.3E-0t» 0.25E-03 -0.163E-02

.3E-0't .25E-03 -.163E-02 _ D/TE, INSTALLATION NAME

II-C-10
0A8GN . C015) SIMPLE D,P, ARITHMETIC 0 , ;ft96924H356924B0*12

ASA RtPS, • 7,1,1,1 ti,l.l«i 0,356924835692^80*12

REdUlTS 0,356924835692480*12

LINE 1 OF EACH CHOUP 18 ' 0,65498760-03

0,65498760»03

0,340*02 0,65498760-03

o,iao*02

A 1 /I n ^ /\ 9 0,780*10

0,780*10

0,12345678910110*08 0,780*10

0,12345678910110*08 0,00*00

0,00*00

0,00*00

0,00*00

0, 29876523401101 0,00*00

0,2987652340*01 -0,1726354450*11

-0,1726354450*11

iiO, 1726354450*11

-0,1726354450*11

0,345100005550*07

A 1 ii s 1 A A A A ec c n X n 9

-W , I 7ift354«50*X

1

0,345100005550+07

n n/is 1 n A n A(S(*sn

7

0,1987620*05

0,1987620*05

V ,eeejc*iC3WTW()

0, l'*O76ZU*09

0,1987620*05

0,222324250*08

0,^^2i24H50*08

Aw,eec3e>4c3U40O assisiiamn^Afl

-0,2543966210*03

•0,2543966210*03

A 3A41l3AnikAC

•«,g5«39bGZJD*03

•0.2543966210*03

0,28l42o0*0^»

0,2814200*05

»0,2!)43966210*03

0,2814200*05

0,2814200*05

0,i47H65i'»910234D-05

0,347865299102340-05

0,44556677880*16 0,347865299102340-05

0,445b667/880*16

0,44556677880*16

0,347865299102340-05

0,44556677880*16

0,44556677880*16

•0,4440-08

-0,4440*08

-0,4440-OB

-0,4440-06

1 -0,««4D-08

II-C-11
OD + 00

00*00

UD^OO

OD^OO

OD^OO

ISSD^-ZO

3<>9;246ti0«0l

3692tt6eD»01

3692466D«0]i

ia7'»378£a967D + 07

l«793782a9fe7D+07

m79 3 7 e2a 9 6 7 D*0 7 1479378249670*07

1479378249670+07

9277861749850+02

9277861749850+02

927/8617498^0+02

9277861749850+02

9277861749850+02

593549142256190+00

593549142236190+00

593549142256190+00

59J54914223619D+00

2236190+00

VFF63271D1.03

986632710-03

986632710-03

986 632710- 03

0.986632710-03"

10-15

ID-IS

lO-lS

lD-15

32612946750+22

32612946750+22

526129 4675 0 +22

32612946750+22

32612946750+22

-0,9694929090+13

-0,9694 929090+13

•0,9694929090+13

-0,9694929090+13

-0,9694929090+13

0,124608SO+01

0,12460850+01

0,12460850+01

0,1246 0850+01

0,12460850+01

-0,590+Tr

-0,590*02

•0,590+02

-0 ,590 +02

"inr,5W+52"

~0 , 7982813922530 + 12

0,7982813922530+12

0,7982813922530+12

0,7982813922530+12

nr, T9B2BT3922531> +T2

~D,42921D+1I

0,429210+11

0,429210+n

0,429210+1

1

0,429210+11

0,7936854430+05

0,7936854430+05 ~ 0,7936H5 9Tir+^05

0,7936654430+05

0,7936854430+05 '~

T> , 3y3fl 445556*Wn " 0,333444555660+13

~ U, 333444555660+13

0,333444555660+13

~r,333444S55B6 0 + 13

-r, 222T3T4 ir4T5 + T 0^

-0,2223334440*10

»0,2(!^ 2Ai3444U + 10

•0,2223334440+10

TTjitr+or

0,10+02

0,10+02

0,10+02

"0, ID+02

II- C- 12
20*03

20*03

20*03

20*03

333333333333330*11

333333333333330*11

i3ii3iii33J33iU + n

333333333333330 + U

333i33r3i3333i0*U

4aa444a44O*05

4444444440*05

340000000000000*02

340000000000000*02

34000000 0 000000*02

340000000000000*02

340000000000000*02

9a0000000000000*02

172635445000000*11

1 ;2b3b44bOOOUUO*n

172635445000000*11

I72635«45000000+ll

172635445000000*11

172635445000000*11

000000000000000*00

000000000000000*00

in^oooooooooooou+oo

000000000000000*00

000000000000000*00

000000000000000*00

172635445000000*11

1726354419000000*11

172635445000000*11

172635445000000*11

172655445000000*11

172635445000000*11

65aVB76000000OO.OT

634987600000000-03

65a'*8760000000O-03

654967600000000*03

654VHr6000000UO-03

654967600000000*03

0(0000 0000000 0000*00

0(000000000000000*00

0*000000000000000*00

0,00000 000000 00 00*00

0,000000000000000*00

0,000000000000000*00

0,296765234000000*0 1 0,<f ''0765234000000. 01

0, 296765234000000*01

57?^76 523400 0 00 0 . oT

0,2967652340000 00*01

0729 8 7 6 5 2 3 4 OT0 0 OU ^0 Y

•0,254396621000000*03

•0,254396621000000*03

^^tJ5MV96 62 1 0 0 O^O 0X5 0 3

*0, 25439662 1000000*03

"^F,^«3966^^owo"OT?*^^l

-0,254396621000000*03

II-C-13
EACH GRaUP~SHUUtO BE IDtNTICAL EXCEPT

FOK THE SIGNS OF THE FIRST TWO LINES

-0,444000 000 00060^-08

-0,44400000000 0000-08

0,3«78fe5299l023«0«05 0,4440000000dOOOD-08

0^^4440 00000000 000-08

•0 13478652991 02340-05

-O, 347865299102340-05

•0,347865299102340-05

0,44460006000 00 00^08

0. 444006 OOOOOOOOD»06

-0,347865299102340-05

•»0, 147937824967000 + 07

•0,147937824967000*07

— -

O,l47V3782aV6700O+07

0,147937824967000*07

0,147937824967000+07

0, 147937824967000*07

0,29876523400 0000-01

-

0,29876523400 0000-01

-0,2987652340000 00-01 —-•- —

-0,298765234000000-01

•0,2987652340 00 000-01

-t), 29876523400 0 0 0O»Tr

^,1479i/8249670T)tr^7

•0,147937824967 000*07

0,147937824967000*07

0,147937824967000*07

0,147937824967000*07

0,298765234000000-01

0,298765234000000-01

•0,2987652340 00 000-01

•tr , r>8TB5234^o ao~oirD -01^

•0,2987652340 00000-01

-0,2987 65^2IirO ffMOU^TJT

0,986632710000000-03

0,9866327100O000O»03

•0 ,^866327 i^otroxioD^^Tnr

-0,986632710000000-03

•D,9866r32TrD0U^O0D»U3

•0,986632710000000-03

0,123456789101100+08

B ,I2345678910110D+08

•0,123456789101100*08

•nj,I23fl56789l01lOD + (J8 •0,123456789101100+08

•0,123456789101100+08

II-C-14
CASGN - (015) COMPLEX ASSIGNMENT

STATEMENTS

ASA REFS. - 5,1,1,1* 7.1.1.1

RESULTS

LINE 1 OF EACH GROUP IS

HOLLERITH INFORMATION

VALUES IN A GROUP SHOULD BE THE SAME

0.222E+02

.222E+02

.222E+02

.222E+02

.222E+02

0.3956E+03

.3956E+03

.3956E+03

.3956E+03

.3956E+03

0.123t»567E + 05

-.123i»567E + 05

-.123tt567E + 05

-.123tt567E + 05

-.123tt567E + 05

0.89E+01

.89E+01

.89E+0i

. 89E +01

.89E+01

•0.263512E + 0't -.263512E + 0'* -.263512E + 0'+ -.263512E + 0't -.263512E + 0t»

O.lE+02

.lE+02

.lE+02

0.3E+03

.3E+03

.3E+03

-0.5E+02

-.5E+02

-.5E+02

0.71E+02

.71E+02

.71E+02

0.3333E+02

.3333E+02

. 3333E+02

. 3333E+02

. 3333E + 02

0. '1067E + 0'f

. '1067E + 0«f

.'1067E + 0'f

-0. 123tf567E + 0tf -.123'»567E + 0'* 123«»567E + 0«» -. 123't567E + 0'+ -. 123i»567E+0't

-0.91E + 01

~.91E+01

-.91E+01

-.91E+01

-.91E+01

0.i»621E + 02

,«»621E+02

.if621E + 02

.'»621E + 02

.i»621E + 02

0. 2E+02

.2E*02

.2E+02

0.'»E + 0'» .'E + O^f .'E + Oif

-0.6E+03

-.6E+03

-.6E+03

-0.92E+02

-.g2E+02

-.92E+02

-0.883E+03

-.883E+03

-.883E+03

O.lE+02

.lE+02

.lE+02

0. 20 0 2E + Oit .2002E + 0«t .2002E + 0«t

0.'t61E + 03

.'61E + 03

-0.21E+02

-.21E+02

-.21E+02

O.lE-02

.ie-02

.lE-02

0 . 562E+00

.552E+00

.562E+00

-0.3E+00

3E+00

-. 3E+00

O.tiE + GO .'E + 00

.^£+00

-0.95E4-00

-.95E+00

-.95E+00

0.16't239E-01

. 16tt239E-01

. 16'+239E-01

0.21E+00

.21E+00

.21E+00

0. 33g8E+00

.3398E+00

.3398E+00

-0 ,6E+00

.6E+00

,6E + 00

. l«tl«»E + 0'*

. I'+l'tE + O't 0.562E+03

.562E+03

.562E+03

-0. 983E+03

-.9ft3E+03

-.983E+03

-0.165E+03

-.165E+03

-. 165E+03

0. 122E + 03

.122E4-03

.122E+03

0.2E-02

. 2E-02

.2E-a2

0.562E+00

.562E+00

.562E+00

-0. 3333333E+00

-. 3333333E+00

-. 3333333E+00

-O.iftfSE+OO

-.^'5E+00

-.''5E+00

0.95E+00

.95F+00

.95E+00

0.36E+00

. 36E+00

. 36E + 0 0

-0. 3963E+00

-.3963E+00

-. 3963E + 00

0. 3398E+00

. 3398E+00

.3398E+00

0.6E+00

. 6E+00

.6E+00

II-C-15
O.OE+00

0.

0.t*562311E + 07

.«t562311E + 07

,t»'f9E + 06

0,22223E<-07

.22223E+07

0.3E+01

.3E+01

,3E+01

0.99765't3E + 05

.98765'+3E+05

.98765't3E + 05

0 , itZ+wuE + O't

0.6E-0't

.6E-0't

.6E-0'+

0.1'»2E + 03

.l't2E + 03

.1U2E+03

-0 . 36923E + 06

-.36923E+06

-.36923E+06

0.21E*-03

.21E+03

.21E +03

-0.5959E+03

-.5959E+03

-.5959E+03

O.lE+01

.lE+Ol

.lE+01

-0.2E+01

-.2E+01

-.2E+01

0.'492E + 0l

.'92E + 01

.tt92E + 01

0. lE+01

. lE+01

0. 789'»53Et06

.789'»53E + 06

0.25E+0'*

.25E*-0'»

0. 3332E+05

.3332E+05

0.3E+01

. 3E+01

. 3E+01

0. 8765'»32E + 0'4

. 8765't32E + 0'*

. 3765tf32E + 0'+ 0.55555E-02

.55555E-02

.55555E-02

0.77E+07

.77E+07

. 77E + 0 7

0. 2667E+02

.26fi7E+02

.2667E+02

-0.23'*E<-03

-.23UE+03

-. 23'+E+03

-0,21E+03

-.21Et03

-. 21E+0 3

0.'+967E + 03

.'+967E + 03

.t»967E + 03

0. lE+01

. lE+01

.lE+01

-0.2E+01

-.2E+G1

-.2E+01

-0. 6527E + 0't -,6527E+0't

-.6527E + 0'*

-0, 7371E+06

7371E+06

7371E+06

0 . it77i*^t7E + 07

,k77hk7E*-C7

•0.8't620 0E-02

-. 8(t6200E-C2

-.8it6200E-02

0 . 770 OOOE+09

. 770 OOOE + 09

. 770 OOOE + 09

r.l33ttOOE + C5

.133£»00E + C5

. 133U00E + 05

0.300000E+06

.30 00nOE+06

. 30 0 OOOE + 06

0.299E-01

.299E-01

.299E-01

0 . ltfl9E+06

. li+19E + 06

.l<+19E + 06

0. 76E-01

.76E-01

.76E-01

0.31E+02

.31E+C2

.31E+02

-0^

-0

.728E+05

,728E+05

,728E+05

,6E + 07

i6E+ 07

,6E + 07

, 791 i+E + 07

,791'«E + 07

,791£«E + 07

,lE + 02

,lE+02

,lE + 02

0.998E-01

.9g8E-01

.998E-01

-0.9362ttE + 00

-.9362'tE + OO

-. 9362t»Et00

0.13330E+03

. 13330E + 0 3 .13330E+03

0. 81625E + 08

. 81625E+08

. 81625E + G8

0 . 37900E + 06

. 37900E+06

. 37900E+06

0. 30000E+06

.30000E+06

. 30000E+06

0.299E+02

.299E+02

.299E+02

0.1'*19Et02

. lt*19E + 02

. 1U19E+02

0.987Et03

. 987E+0 3 .987E+03

0.it6F9E + 05

. '659E + 05

.'+659E +05

•0. 93296E+08

-.93296E+08

-.93296E+03

•0.6E + 07

-. 6E+07

-.6E+07

0.16E+07

. 16E+07

.16E+07

O.lE+02

. lE + 02

.lE+02

U- C-16
-0.2E-01

-.2E-01

-.2E-01

0.3E-02

.3E-02

.3E-02

-O.ttE+05

-.'E+05

-.«tE + 05

0.5E+06

.5E+06

.5E<-06

•0.6E-05

-.6E-05

-.6E-05

0. 39393E+01

.39393E+01

.39393E+01

0.9E+00

.9E+00

.9E>00

0.352E+09

.352E+09

.352E+09

0.1'+7626E + 00

.l't7626E + 00

.l'+7626E + 00

C.9E-07

.9E-07

.9E-07

0.13E-0't

.ISE-O**

.13E-0'*

0.77E+00

.77E+00

.77E+00

0.878E+01

.873E+01

.878E+01

-0.9797E+02

-.9797E+02

-.9797E+02

-0.2E-01

-.2E-01

-.2E-01

0.3E + 0'* -.3E*0'»

-.SE + Oif

0.'fE-03

.'E-03

.'fE-03

'0,5E-tik

-.5E-0t»

-.SE-O'f

0.6E+07

.6E+07

.6E+07

0.62E + 0'f .62E+0U

.62E + 0'* 0.765765E+03

. 765765E+03

.765765E+03

0.35E+03

. 35E*03

. 35E+03

0. 891E-l't

. 891E-l't

.891E-li»

0.9999E+08

.9999E+08

.9999E+08

0.13E-0<4

.13E-0«»

0.77E*00

. 77E + 0 0 .77E+00

0.878E+01

-. 878E+01

-.878E+01

0.9797E+02

.9797E+02

.9797E+02

-O.lOlOlE+15

-.lOlOlE+15

-.lOlOlE+15

0.68E+12

.68E+12

.68E+12

0.798E-03

.798E-03

.798E-03

-0 . 32it7E + 20

-.32't7E + 20

-.32't7E + 20

-0.'+3599E-19

-.i»3599E-19

-.tt3599E-19

-0.6E-09

-.6E-09

-.6E-09

•0.9119E+06

-.9119E+06

-.9119E+0 6

0 . 39't26E4-02

.39'+26E + 02

.39t»26E + 02

0.««5E-12

.'+5E-12

.i*5E-12

O.it793E + 06

.'t793E + 06

.'793E + 06

.i»793E + 06

0.3682E+01

.3682E+01

.3682E+01

.3682E+01

0.2571E + 09

-.2571E+09

-.2571E+09

-.2571E+09

C .l«»60E + 00

.li+eOE + OO

.li^SOE + OO

.l'+60E + 00

-0. lOlOlE+15

-. lOlOlE+15

-. lOlOlE+15

0.357628E+00

.357628Ef 00

.357628E+00

0. 76'*«»«fE + 00

-0. asgi+E + os -.259'tE + 05

-. 259'tE + 05

0,12E-Dk

-.12E-0'+

12E-0't

-0. 6E+09

-.6E+09

-.5E+09

0. 9119E-06

.9119E-06

.9119E-06

-0. 39'+26E-02

39it26E-02

-.39'»26E-02

0.'»5E + 12

.it5E+12

.i^SE + l?

0.3i»79E + Q6

. 3^79E + 06

. 3't79E + 06

. 3<t79E + G6

0.8236E+D2

. 8236E+02

. 3236E<-02

. 8236E+02

0. 1752E + 09

. i752E+09

. 1752E+09

.1752E+09

•0. 106itE + 05

-,i.QbkE*05

-.106i»E + 05

-.106'»E+05

II-C-17
0 .16«f2390E-01 0.3600000E+00

.16'*2390E-01 . 36000 OOE + 00

. 16 '2390 E- 01 . 3600000E+00

. 16't2390E-01 . 3600000E+00

.16't2390E-01 . 36000 OOE + 0 0

. 16it2390 E-0 1 .3600000E+00

0 .'562311E + 07 0. 789'+530E + 06

.£t562311E + G7 .789U530E+06

.'562311E + 07 . 789'*530E + 06

.'t562311E + 07 .789'«5 30E + 06

.'56 2311E + 0 7 . 789't530E + 06

.it552311E+07 . 789tt530E<-06

0 .60G0000E-05 0 . 6 0 0 0 0 0 0 E + 0 7 .60 0 OOOOE-05 .60000 OOE + 07

.600 OOOOE-05 .6000000E+07

.6000000E-05 . 50000 OOE + 07

.6000000E-05 . 60000 OOE + 07

.60Q0000E-05 . 60000 OOE + 07

0 .9119000E+06 0.9119000E-06

.9119000E+06 .9119000E-06

.9119000E+06 .91190 OOE-06

.9119000E+06 . 91190 OOE-06

.91 19000E + 06 . 91190 OOE-06

.9119000E+06 . 91190 OOE-06

EACH GROUP SHOULD BE IDENTICAL EXCEPT

FOR THE SIGN OF THE FIRST TWO LINES

0.3000000E+03 0.'t0 0 00 00E + 0'+ .3000000E+03 .£0 000 00E + 0'^ -.3000000E+03 -.'000000E + 0*^ -.300 OOOOE + 03 -. '0000 00E + Qf* -.300G000E+03 -.'+0OO0 0 0E + Qi* -.3000000E+03 -. '0 0 00 00E + Qk

0.5000000E+02 -0.6000000E+ 0 3 -•5000000E+02 -. 600000 0E+ 0 3 .5000000E+02 . 60 0 00 OCE + 0 3 .500U000E+02 .6000000E+ 0 3 .500 OOOOE + 02 . 60 0 00 0OE + 0 3 .5000000E+02 .6000000E+ 03

0.7700000E+00 0. 77000 00E + 00

.7700000E+00 . 770 00 00E + 00

-.7700000E+00 -. 77000 00E + 00

-.770 OOOOE + 00 -. 77000 00E + 00

-.7700000E+00 -. 77000 00E + 00

-.7700000E+00 -. 77000 00E + 00

0 .500 OOOOE+06 -0.500000nE- Qk

.500 OOOOE + 06 -.5000000E-

-.500 OOOOE + 06 . 50 0 00 OOE- QU

-.5000000E+06 .50 000 0PE- Ok

-.5Q0O0O0E+O6 .5000O0OE- Qi* -.5000000E+06 . 5000000E- Ok

'920000E + 01

'92 00 00 E + 01

'9200 0nE+01

'9200 00E + 01

'+92 00 0 QE + 01

'9 2 00 0 0E+01

-0. 55270 OOE + 0'4 -. 65270 00E + 0'+

. 65270 00E + 0'+

. 65270 00E + 0'+ .65270 00E + 0'+

, 65270 OOE + 0'^ -0.6000000E-05

-.60 0 OOQOE-05

.6000000E-05

.6000000E-05

.6000000E-05

. 60 0 OOOOE-05

0.6000000E+07

. 60 0 00 OOE + 07

-. 600 00 OOE + 07

-. 60 0 00 OOE + 07

-.5000000E+07

-.60C0000E+07

0 .''''QOOE + O'^ .£*£+itttOOOE + 0'+ -./'''O0 0E + 0'+ -.''''OOOE + O'^

0.5555500E-02

.5555500E-02

-.5555500E-02

-.5555500E-02

-.5555500E-02

-. 5555500E-02

U-C-18
-0.3692300F+06

-.3692300E4-0&

.3692300E+06

.3692300E+06

.3692300E+06

.3692300E+06

-0. 23'tOO OOE + 03

23it90 OOE + 03

.23'400 00E + 03

.ZS^OOOOEtOS

. 23'tOO OOE + 03

.23*»O0 00E + 03

rORTRAN TEST PROGRAMS

Prepared by national bureau of standards

For use on large Fortran processors

In accordance with ASA FORTRAN X3. 9-1966

VERSION 3 PART 3

SAMPLE COMPUTER, FOftTRf\N COMPILER LEVEL

OPERATING SYSTEM VERSION

DATE, INSTALLATION NAME

LASGN - (016) ASSIGflMENT OF

LOGICAL VARIABLES

ASA REFS. - 7.1.1.2

RESULTS

ALL ANSWERS BELOW MUST BE TRUE

T

T

TTT

T

T

T

TT

T

TT

TTT

T

T

T

TT

ALL ANSWERS BELOW MUST BE FALSE

n-G-19
INTRL - (017) ASSIGN INTEGER, REAL, AND

DOUBLE PRECISION VALUES

ASA REFS. - 7.1.1.1. 5.1.1.2

RESULTS

ASSIGN INTEGER VARIABLES

1 - TO REAL VARIABLES

111.3 * 111.0

-1111.3

-1111.0

-11111.0

-11111.9

1.0 • 1.0

2 - TO DOUBLE PRECISION VARIABLES

-O.lllllD 05

-. lllllD+05

O.ID 01

.10*01

3. HID 03 •

. ltlD+03

-O.llllD Qi* * -.11110+01*

ASSIGN INTEGER CONSTANTS

1 - TO REAL VARIABLES

-2222.0

-2222.0

222.0

222.0

-22222.0

-22222.0

2.0

2.0

2 - TO DOUBLE PRECISION VARIABLES

0. 20 01 *

. 20+01

' -0.22222D 05 * -.222220+05

-0. 22220 O** * -.2222D+0'*

0.222D 03 * .2220+03

ASSIGN BASIC REAL CONSTANTS

1 - TO INTEGER VARIABLES

3

3

3

3

-3

-3

2 - TO DOUBLE PRECISION VARIABLES

0. 333330 01

. 333330+01

0. 33333330 01 • .33333330+01

-0. 33333330 01 » -.33333330+01

-0.3333330 01 * -.3333330+01

ASSIGN REAL VARIABLES

1 - TO INTEGER VARIABLES

-1*1* *

'*'*

1*1*

U-C-20
2 - TO DOUBLE PRECISION VARIABLES

-O.<»'»'»0 02 *

'i.kkkkO 02 * ••i»t»<»'*0f02

a.<»4i»<f<»0 02 *

Q^kkktikO 02 *

ASSISN DOUBLE PRECISION VARIABLES

1 - TO INTEGER VARIABLES

5555

5555

5

-5

-5

-5

2 - TO REAL VARIABLES

-0.5555556E 01

-.5555556E+01

-0.5555556E 01

-.5555556E+01

0.5555556E 01

.5555556E+01

0. 555555E 0<» *

. 555555E + 0<»

ASSIGN DOUBLE PRECISION CONSTANTS

1 - TO INTEGER VARIABLES

6

6 -6

-6

-6

6666

6666

2 - TO REAL VARIABLES

0.&66&667E Ih * .6666667E4-li»

0.66666E 01 * .66666E4-01

'-0.&66&&66E 01 * -.&66666&E-I-01

-0.6666667E 01

-.6666667E+01

ALL TEST OUTPUT SHOULD BE CHECKED

AGAINST THE ASTERISKED () FIGURE

WHICH PRECEDES IT

n-c-21
U60T0 - (020 ) UNCOI^JD ITIONAL GO TO

STATEMENT

ASA REFS. - 7.1.2.1.

1

RESULTS

1

2

3

I*

5

6

7

8

THIS TEST IS SUCCESSFUL ONLY IF THE

NUMBERS LISTED ABOVE ARE SEQUENTIALLY

IN ORDER FROM 1 TO 8

AGOTO - (02L) ASSIGN AND ASSIGNED

GO TO

ASA REFS. - 7.1.1.3 AND 7.1.2.1

RESULTS

1

2

3

5

6

7

8

9

10

11

12

13

1<»

15

16

17

18

19

20

THIS TEST IS SUCCESSFUL ONLY IF THE

NUMBERS LISTED ABOVE ARE SEQUENTIALUY

IN ORDER FROM 1 TO 20

II-C-22
CGOTO - (022) COMPUTED GO TO

ASA REF. - 7.1.2.1.5

RESULTS

1

2

3

5

6

7

8

9

10

11

12

13

l<f

15

16

17

18

19

20

THIS TEST IS SUCCESSFUL ONLY IF THE

NUMBERS LISTED ABOVE ARE SEQUENTIALUY

IN ORDER FROM 1 TO 20

ARBAO - (03Q} BASIC ADDITION

ASA REF. - 6.1

RESULTS

INTEGER ADDITION

TESr 1 0 TEST 2 0 TEST 3 0 TEST t* 0 TEST 5 0 TEST 6 0

REAL ADDITION

TEST 7 3.0

TEST 8 0.0

TEST 9 0.0

TEST 10 0.0

TEST 11 0.0

TEST 12 0.0

ALL ABOVE ANSWERS SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

II-C-23
ARFAO - (0311 O.P. ADDITION AlfF5B" » CTJ33rD,P, SUBTRACTTUN

ASA REF. - 6.1 ' ASA RtF, • 6,1

RESULTS RESULTS

0. 0,OOOOOOOOOOD'fOO

0.

U,Q0O00O0OO0U*00

0,00000000000^00

0.

0. 0,00000000000^00

0.

0,OOOOOOOOOOU*00

0,000000000004^00

THE 9 ANSWERS AoOVc SHOULD 9c. 0 PLUV 0,000000000004>00

OR MINUS AN ERROR FACTOR OF 0. 10-13 1 - 0,00000000000*00

0,00000000000*00

THE ANSWERS ABOVE SHOULD BE 0 OR MINUS AN ERROR FACTOR OF 0,PLUS

10-13

ARBSB - <032) BASIC SUBTRACTION

ASA REFS. - 6.1

RESULTS

TEST! INTEGER SUBTRACTION

ARBA8 • (034) BASIC ADDITION AND

SUBTRACTION

a ASA REF, • 6,

a

0

0

0

0

RESULTS —Tr«Tt INTtUtR ADO ANU hUBF

TEST2 REAL SUBTRACTION

Q-0

(j.O

- - -

0 0.0

0.0

0.0 T£3T2 REAL ADO AND SUBTR

ALL ABOVE ANSWERS SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL 0,0

' i

oto—

0,0

-

i

I

i

1 AtX "ABOVr ANSWERS 8H0UU0 BE 0 THIS SEGMENT TO BE SUCCESSFUL

FORn-C-24
fortran test programs

prepared by national bureau of standards

for use on large fortran processors

in accordance with asa fortran x3t9-i966

version 3 part h

sample computer, fortran compiler level

operating system version

Date, installation name

ARFAS - (035) O.P. ADO AND SUBTR

ASA REF. - 6.1

RESULTS

0.

0.

0.

0.

-.2067951531D-2i»

THE ANSWERS ABOVE SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL.

VALUES WITH EXPONENTS LESS THAN

10»»(-l«f> ARE CONSIDERED ZERO

ARBMI - (036) INTEGER MULTIPLICATION

ASA REF . - 6,1

RESULTS

ALL ABOVE ANSWERS SHOULD 6E 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

ARBMR - C037) REAL MULTIPLICATION

ASA REF. - 6.1

RESULTS

0.0

O.Q

0.0

0. 0 0.0

0.0

0.0

ALL ABOVE ANSWERS SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

" ASA HtF, - 6,1

RESULTS

0,00000000000+00

0,00000000000*00

0,00000000000*00

0,00000000000*00

0,00000000000*00

0,00000000000*00

0,00000000000*00

THE ANSWERS ABOVE SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

n-C-25
(039) INTEGER AND HEAL

DIVISION

ASA KEF, " 6,1

RESULTS

TESTi iNTtUER DIVISIUN

TE8T2 REAL DIVISION

0,0

0,0 ova

0,0

ALL ABOVE ANSWERS SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

ARBEX - (.QU-iy 8A-S-IX- CXROisiEtil tAI lO-N. ASA ft£F-S. - 6.1

.a£SULI.S

INTEGER BY INTEGER

a0

0

00

HEAL BY INT^ REAL- BY RLAL

0,0

0.0

0.0

0.0

0,0

ALL ABUvL ANSWERS S>iOUL0- BE 0 fO«-

THIS SEGMENT TO BE SUCCESSFUL

ARFOV - (O'+O) O.P. DIVISION

ASA REF. - 6.1

RESULTS

0.

0.

0.

0.

C.

0.

THE ANSWERS ABOVE SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

arfEx - (0H2) Exponent I AT I ow

ASA REF . - b.l

Results

. 0000000000

. 0000000000

. oooooooooo

. oooooooooo

. ooocoooooo

thf amswers abovf should 5f 0 For

This segment to be succFSSFUt.

V/»lUES 1^!ITH EXPONENTS LESS THAN

10»«(-IH) ARE CONSIDERED ZERO

II- C-26-
IfltdHI • (043) HIERARCHY, PARENTHESES

ASA Ht¥S, m 6,1 AND 6,4

RESULTS

TEST I 0 TEST 2 0

TEST 3 0 TEST 4 0 TEST 5 0

TEST 7 0

00 TEST 8 0

TEST V 0

0

0 TEST xo 0

00 n 0

0

0 TEST 12 00

0

0

0

0

TEST 13 00 THE ANSMERS ABOVE SHOULD BE 0 FOR

THIS SEGMEN T TO BE SU C CESSFUL

S8B67 - (050) SUBSCRIPTS FOR INTEGER

AND REAL ARRAYS, V, K ASA REF. 5.1.3

RESULTS

0

0.0

0

0

0.0

0.0

THE ANSWERS ABOVE SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

S88't5 - <051) SUBSCRIPTS FOR INTEGER

AND REAL ARRAYS»V+K, V-K

ASA REF. 5.1.3.3

RESULTS

0

00

0.0

0.0

0.0

THE ANSWERS ABOVE SHOULD BE 0 FOR

THIS SEGMENT TO BE SUCCESSFUL

II-C-27
SB813 - (052) SUBSCRIPTS INTEGER AND

REAL« C»V, C*y-Kf C»V+K

FORTRAN TEST PROGRAMS

ASA REF, 5.1.3.3

PhEPARED BY NATIONAL BUREAU OF STANDARDS

RESULTS

FOR USE ON LARGE FORTRAN PROCESSORS

1\ ACCORDANCE WITH ASA FORTRAN X3. 9-1966

0

0 VERSION 3 PART 5

0.0

0.0 SAMPLE COMPUTER, FORTRAN COMPILER LEVEL

OPERATING SYSTEM VERSION

0

D DATE, INSTALLATION NAME

0.0

0.0

0 SIMIF - iOSH) SIMPLE ARITh, IF AND LOG 1 CAL IF 0.0

ASA REF, - 7. 1.2 •2

7,1.2.3

1 nc ANoHCKo AdUVc OrlUULU bt U rUK

THIS SEGMENT TO BE SUCCESSFUL Rfc 5ULT S

SBfl7 • C053) SUBSCRIPTS FOR O.P,

ARRAYS, ALL FORMS

ASA REF, • 5,1,3,3

RESULTS

0,000000*00

0,000000*00

0,000000*00

TMt ANSWERS ABOVE SHOULD BE 0 FOR

THIS StGHENT"TTr-BE: TOXF55FUI, " ' The TEN ANS/.ERS ABOVE MUST BE TRUE

II-C-28
IFABS - 1055) INTRINSIC FUNCTIONS—

ABS, lABS (ABSOLUTE VALUE)

ASA REFS. - 8.2

RESULTS

0.0

0.0

0.0

0 .0

0

0

0 THE ABOVE ANSWERS SHIOULO ALL BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

IFFLT - (056) INTRINSIC FUNCTION

FLOAT

ASA REF. - 8.2

RESULTS

0 .0

0.0

0.0

THE ABOVE ANSWERS SH^OULD ALL BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

I FF I X -

ASA REF,

RESULTS

(057) INTRINSIC FUNCTION-.

IF I X

- 8.2

THE ABOVE ANSWERS SHOULD ALL BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

IFSGN - (058) INTRINSIC FUNCTIONSSIGN, ISIGN (TRANSFER OF

ARGUMENT SIGN)

ASA REF. - 9.2

RESULTS

0 .0

0.0

0.0

0.0

0.0

0

0

0

0

0 THE ABOVE ANSWERS SHiOULO ALL BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

iFOAB - (059) Intrinsic fUNCriON--

DaBS (ABSOLUTE VALUE OF

A D.P, ARGUMENT)

ASA REF. - 8.2

RESULTS

.0000000000

. 0000000000

. OOOOOOOOOO

.0000000000

the above answers should all be 0 f'or This test segment to be successful

IIc

-29
I?TRN m C060) INTRINSIC FUNCTION-^

AINT, INT, IDINT (TRUNCATION)

ASA REF, • 8,2

RESULTS

0,0

0,0

0,0

0,0

END OF ATT^r TtST

0

0r

0 END OP INT TfcST

0

0

0

fNO OF lOINT TEST

All ABOVE ANSWERS SHOULD BE 0 FOR THIS

TEST SEGMENT TO BE SUCCESSFUL

IFMOD - (061) INTRINSIC FUNCTION

AMOD, MOO (REMAINDERING)

ASA REF. - 8.2

RESULTS

0.0

0.0

0.0

0.0

END OF AMOD TEST.

0

0

0

0

END OF MOD TEST.

ALL ABOVE ANSWERS SHtOULO BE 0 FOR THIS

TEST SEGMENT TO BE SUCCESSFUL.

II-C-30
IFMAX - (0A2) INTRINSIC FUNCTIOnS--

AMAXO.AMAX I ,MAXO, MAXl.OMAXi

ASA REF. - 8.2

RESULTS

TEST OF AMAXO--

.0

. 0 .0

.0

.0

Test of amaxi

.0

.0

.0

.0

>o

.0

.0

.G

END OF 2-AR6VJMENT TEST.

END OF 3-AR6UMENT TEST,

END OF OR 5-ArgUMEnT TEST,

END OF 2-ARGUMEnT TFST,

END OF 3-AR6UHENT TEST,

END OF «»- OR 5-AR6UMENT TEST.

TEST OF MAXO--

0

00

0

0

0

00

TEST OF MAXl

0

0

c

0

0

0

0

END OF 2-ARGUMEnt TEST,

END OF 3-ARGUMEnT TEST,

END OF H- OR 5-ARGUMFNT TEST

END OF 2-ARGUMFnT TEST.

END OF 3-ARGUMEnT TEST.

END OF s- OR 5-ARGUMENT TEST

TEST OF DMAX1--

,0000000000

,0000000000

, oooooooooo

,0000000000

END OF 2-ARGUMeNT TEST.

.OOOOOOOOOO

, OOOOCOOOOO

,0000000000

END OF 3-ARGUMEnT TEST.

,0000000000

.oooooooooo

END OF OR 5-ARGUMENT TFST

The ABOVE ANSWERS SHOULD ALL BE 0 FOR

This test segment to be successful.

II-C-31
IFMIN • (063) INTRINSIC FUNCTIONS-^

AMIN0,AMINI,MIN0,MINI,DMIN1

ASA REP. » 6,2

RESULTS

TEST OF AMINO

0,0

0,0

END OF 2»ARGUMENT TEST,

0,0

END OF S^ARGUMENT TEST.

0,0

0,0

END OF a OH 5-ARGUMENT TEST,

OF AMiNi

0,0

0,0

0,0

0,0

END OF 2.ARGUMENT TEST,

0,0

0,0

0,0

END OF 3»ARliUMENT TEST,

0,0

ITWT^ARGUMENT TtST,

TtST UK HINO

00

0 END OF 2.ARGUMENT TEST.

00

0 END Of- 3.ARGUMENT TEST.

0 END OF a OR 5-ARGUHENT TEST,

TTST OF MINI

00

0

1!

END OF 2-ARGUMENT TEST,

END OF 3-ARGUMENT TEST,

END OF a OR 5"ARGUMENT TEST,

TEST OF DMINl "

0 , 0000 00 00 OOD + 00

070 0 0 0 0 0 OWTHJ^UU

0,00000000000*00

END OF gt-ARGUMENT TEST.

0,00000000000+00

0.00000000000*00

END OF 3»ARGUMENT TEST.

"O-.tHJ&trotnjotJtr&^tra — 0,00000000000*00

END OF a OR 5»ARGUMENT TEST,

THE ABOVE ANSWERS SHOULD ALL BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL,

IFDSG • (063) INTRINSIC FUNCTION--

OSIGN (TRANSFER OF SIGN)

ASA REF,""S ^,"2

RESULTS

0 . 0000000000000000000*00

OTO in^UOOOOOOOOOOOOOOD + OO

0,OOOOOOOOOOOOOOOOOOD*00

0, 0000000000000000000*00

xct-STOVE:" aNgyrff'5~~SFuuL"Tr be o kur t his

TEST SEGMENT TO BE SUCCESSFUL,

U-C-32
FORTRAN TrST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS

FOR USE ON LARGE FORTRAN PROCESSORS

IN ACCORDANCE WITH ASA FORTRAN X5.9-196S

VERSION 3 PART f,

SAMPLE COMPUTER* FORTRAN COMPILER LEVEL

OPERATING SYSTEM VERSION

DATEr INSTALLATION MAME

IFDIM - (065) INTRINSIC FUNCTIONS - DIM

AND lOIM (POSITIVE DIFFERENCE)

ASA REF. - 8.2

RESULTS

0.00

0.00

0.00

0.00

0

0

0

0

0

ALL ABOVE ANSWERS SHOULD BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

IFSGL - (c66) Intrinsic function sngl--

OBTAIN MOST SIGMIFTCAMT PT OF CP, ARGUMFMT.

ASA REFS. - 8.2

RESULTS

Lime a LimF p Line a Lime b Line a Lime b Lime a Lime r Line a Line b Line a LINE 8 Line a Line b LIME A Lime b

. q87t87'49377973 + 003

.'4 67'4H749l60767 + 0O3

-,396fi95Hn23R76'4 + 00'^ -.39A89S<4nioro9p + o0 3 ,333 3'<9i^255eM3H + r)n0

.333 3 39624ir'A8p + noO

, 79379n«n'4775?e + f503

. 79379nan2(?r'i9s + oo3

. 1 339567 1 9 + prO

, 4^14145 1 3 39E,«4287 + noO

-.^.6^(S7 1P379eP67+O00

-.fA<,*7ifl3Mep/, 07 + 000

-.39(t,G9S39607Fi39 + on3

- .39609539337 1 58+003

.i487'487 '19377973 + 003

,'4874P7M91iSP7*7+00 3 LINE B Should agree with line a Only to the precision of a rfai datuh

RFMAINJNg digits RESULT FROH OUTPUT

CONVERSION When a real value is

ASSIGNED TO D.P. FOR PRINTING.

II-C-33
IFREL - (067) INTRINSIC FUNCTIONREAL

ASA PEP. - 8.2

RESULTS

0.000 0 0.0000

0.0000

0.0000

0.000 0 0.0000

0 0 0 0 0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0 cooo

0 0 0 0

0 0 0 0

0 0 0 0

ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS

TEST SEGMENT TO BE SUCCESSFUL.

IFIMG - (068) INTRINSIC FUNCTION - AIMAG

ASA PEF.-

RESULTS

(.2

OBTAIN IMAGINARY PT

OF COMPLEX ARGUMENT

0.0000 0 0.00000

0. COOOO

0.00000

0*00000

0.00000

0.00000

0 . 00 0 0 0

0.00000

0. oocoo 0.00000

0. COOOO

0.00000

0.00000

0.00000

0.00000

0. oocoo 0.00000

0.00000

0.0000 0

0. COOOO

0.00000

0.00000

0.00000

ALL ABOVE ANSWERS SHOULO BE 0 FOR THIS

TEST SEGMENT TO BE SUCCESSFUL.

II-C-34
IfOBl • (069J INTRINSIC FUNCTION • OBLE

S,P, ARGUMENT IN 0,P, FORM

ASA H ty,m B,^

RESULTS

UINt A 0,VT65625E-03

LINE B 0,976562500000000«03

LINE A -0,1953125E»02

LINE U •0,lVb3l2b000O0OOO»0a

UNt

LINE

AB 0,b8b937bt»02

0,58593750000000D«02

LINE

LINE

A • 0,lOa8576E4.07

^ •X),IOJf«57*DTrOOOOOD + 07

LINE

LINE

AB 0,lltfb880k+06

0, 1146880000000004-06

A COMPARISON OF LINE A AGAINST LINE B IS NEEDED TO CHECK THE VALIDITY

^

IFCJG - (071)

ASA REFS. - 8 RESULTS

INTRINSIC FUNCTION - CONJG

OBTAIN CONJUGATE OF

A COMPLEX NUMBER

2

0. 0000000 0.0000000

0. 0000000 0.0000000

0.0000000 0.0000000

O.CCOOOOO 0.0000000

0.0000000 0.00000 0 0 O.OOOCOOO 0.0000000

0.0 000000 0.0 00 0000

0.0000000 O.OOOOOOQ

ALL ABOVE ANSWERS MUST BE 0 FOR THIS

TEST SEGMENT TO BE SUCCESSFUL.

IFCPX - (070) INTRINSIC FUNCTION - CMPLX

EXPRESS TWO REAL ARGUMENTS

IN COMPLEX FORM

ASA REF.- 8.2

RESULTS

0.0000000

0.0000000

0. 0 000000

0.0 0000 00

0.0 0000 00

0.0000000

0.0000 000

0. OOQOOOG

G. OCOOOOO

0.0000 000

0.0000 000

0.0000000

THE ABOVE ANSWERS SHOULD ALL BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

II-C-3 5
IFBMS - (072) BASIC FORTRAN INTRINSIC

FUNCTIONS ACCEPT EXPRESSIONS

OF TYPE SPECIFIED IN I. F. TABLE

ASA REF.- 8.2

RESULTS

TEST OF ABS IN EXPRESSIONS - 0.0

0.0

0 . 0 0.0

TEST OF lABS IN EXPRESSIONS -

0

00

0 TEST OF FLOAT IN EXPRESSIONS -

0 .0

0 . 0 0 . 0 0.0

TEST OF IFIX IN EXPRESSIONS -

00

0

0 TEST OF SIGN IN EXPRESSIONS - 0.0

0.0

0.0

0.0

TEST OF ISIGN IN EXPRESSIONS -

0

0

0

0 COMBINATION OF ALL INTRINSIC FUNCTIONS

0.0

0.0

0

00.0

0.0

0

0

ALL ABOVE ANSWERS SHOULD BE 0 FOR

THIS TEST SEGMENT TO BE SUCCESSFUL.

IFFMS - (073) FORTRAN INTRINSIC FUNCTIONS

ACCEPT EXPRESSIONS OF TYPE

SPECIFIED IN I. F. TABLE

ASA REF.- 8.2/TABLE 3 RESULTS

TEST OF DABS IN EXPRESSIONS

0.

0.0.

0 . TEST OF AINT IN EXPRESSIONS

0.

0.

0.

0.

TEST OF INT IN EXPRESSIONS

TEST OF IDINT IN EXPRESSIONS

TEST OF AMOD, MOO IN EXPRESSIONS

0.

0.

TEST OF AMAX0,AMAX1,MAX0,MAX1 AND OMAX

0.

0.

00.

II-C-3 6
TEST OF AMINO jAMINl ,MIN0»MIN1 AND OMIN ' F 0 R T R AN TEST PROGRAMS

PREPARED BY NATIONAL 5UREAU OF STANDARDS

00 FOR USE ON large: FORTRAN PROCESSORS

0. IW ACCORDANCE WITH ASA FORTRAN X3. 9-1966

TFST DF DSTfiN AND D Rt F TN FXPRFSSTQNS

0 . VERSION 3 PART 7

0.

0.

0. SAMPLE COMPUTER' FORTRAN COMPILER LEVEL

OPCRATTNG SYSTEM VERSION

TEST OF DIM AND lOIM IN EXPRESSIONS

0.

0.

00

DATE' 1N5TALLATT0M NAME

j

EXPON - (080)

TEST OF SNGL,REAL,AIMAG,CMPLX AND

BASIC EXTERNAL FUNCTION -EXPCONJG IN EXPRESSIONS (EXPONENTIAL -TYPE REAL)

0.0.

ASA REF.- 8.3.3 (TABLE i*)

LINE 1 OF EACH PAIR IS

TEST OF SOME COMBINATIONS OF ABOVE HOLLERITH INFORMATION

INTRINSIC FUNCTIONS RESULTS

0.

0. X=-16.0 0 . 1125351 7£» 7192 59 ll'*5E- 06

. 1125352E-06

ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS

SEGMENT TO BE SUCCESSFUL.

X= -8.0 0 . 335 1+6 2627902511 8388E-03

.335't626E-03

X= -«4. 0 0 . 1831563888373tfl 8029E-01

.183156i+E-01

X= 0.0 O.lOOOOOOOOOOOOOOOOOOE+01

.lOOOOOOE+01

X= tf.O 0.5tf59815 00331tf'*239a8E + 02

.5it59815E + 02

X= 8. 0 0 .29809579870'tl728275E + 0'+

. 2 9 8 0 9 5 8 E + 0 if

X= 16.0 0.8886110520507872637E+07

.8886111E+07

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

II-C-37
DEXPO - (081)

BASIC EXTERNAL FUNCTION -DEXP-

(EXPONENTIAL -TYPE DOUBLE PRECISION)

ASA PEF.- 8.3.3 (TABLE k)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X = -16.0 O.11253517'»7192 5911't50-06

.11253517^719260-06

X= -8.0 0 .335^+6262790251133880-03

.335't6262790251D-03

X= -i*,Q 0 .1831563888373'tl8029D-01

.1831563883873'»D-01

X= 0.0 O.lOOOOOOOOOOOOOOOOOOD+01

.100000000000000+01

X= k,Q 0.5'+593 15 00331'+tt2 3908D + 02

.5i»5981500331«t 4+0 + 02

X= 8. 0 0 . 29809579870'+1723275D + 0£f .2980957g870£*17D + 0'+

X= 16.0 0,88861105205078726370+07

.888611052050790+07

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO Ik DIGITS

CrEXP0 -r ^0"827

BASIC rXTERTl AT. FU N C T 1 0 N -trtXFt. (EXPOMENTIAL •TYPE COMPLEX)

ASA R£F,- 8,3,3 (TABLE a)

"

rCtJMPiTy SRCU>fENTJ

EXPECTED RESULT

FUNCTION RESULT

" ~

'

(-0,1611810E + 02,»0,7350383E4.01)

" _ 0,5000000E"07 •0,8fe6025aE-07

(»0, ia50866E*02,-0,73303e3E*0n

0,2500000E-06 -0 , « 330 1 27E«06

0,2500000E«06 -0 , fl330 127E-06

I "C. 135 1 STTE • 0 . 52B31 85E a r

)

0, lOOOOOOE-Ob 0,00OOO00E*OO

0, 1000000E"»05 0,000O00OE*00

("0, 1220607E + 02,'<0,fe283185E*0l

)

O.SOOOOOOE-OS 0,00OOO0OE+OO

0,5000000E»0^ 0,^50BOO0Ot*5O

C»'0, 1 15l293E + 02,-0,5235988E*0n

0,5000000E-05 0 , 866025aE*05

0,5000000E-05 0 , 866025aE-05

(-o,^t)3^rr8E*tJl,w(r,-5^55^58et)^ J 0,2500000E-0i| 0,a330l27E-0a

0,2500000E-0« 0,a330127E-.oa

(•0,92l03a0E*0 W-0,ai88790E*01)

•0,5000000E»0« 0,866025aE-0a

(«0,760 0902E + 01 ^•0,«l88790E*0n

'0,2bOOO0OE-03 0,a330l27E-03

-0,2500000E»03 0 ,a330 127E-03

x-^ , 6^7755r*xri , »iT,3TzrT593r»(rr)

•0, lOOOOOOE-02 0,O000000E+00

-0, lOOOOOOE-02 0,OOOOOOOE+00

(-0, 529831 7E + 0 1 ,-»0,31«1593E*0U

•0,5000000E-02 0 , 00OOOO0E*0O

•o,5(nroo^ai>02 OT^^raiJiToxrEToa

n-c-38
CEX>'U • (082) -CtXP- CEXPU - C082) .CEXP"

(•0,«60Sl/0t*Ul,-0,2US'«i9bE+0U C 0,6V0//bbt*0l, 0,3l4lb93t+01)

4A/^AAAnP^I^/l a AAAAAAA&'o.AA "0 t 1 000000t + 0'« 0 t UOOOOvOt + 00

«0,!3000000t'>02 •O.Bb6025aEo02 »0, lOOOOOOE+oa OtOOOOOOOE+00

(•0,29V5732E*0l,-0,209«39bt + 0U

«0 . ZSOOnOOEnO 1 liO . Iil330 1 27E«0 1 ^ ( 0,85l7193E + OU 0,3l4l593E*0U

U ( 3 u u u u U U C T U H U t u u u u u u u t 0 u •Oe^boooooEwOi -Otaiiouft-gi -O.SOOOOOOtf 04 0,0000000E*00

t*0,2302585E*0l,-0,l0a7l98E + 0l J ( 0,'^2l0340E*0l, 0, 41887906 + 01)

mA C^AAAAAAF^A/I «>A AA>^A3Cyi£rxA/l

0,5000000fc"01 «0,86602y«t«0l -0,5000000E + 04 ••0 , 8660254E + 04

(•O,69il«72E + OO,«O,lO«7198E + 0n

A 2SnflA0nE«A0 <•() . 4330 i 27E*0Q

( 0,1081978E+02, 0,4l66790E+01)

" U f C3 U y U U U t T U J " U » J J U X 6 / u U 5 0,2500000E*00 -0 .'SSOUTE + OO •0,2b00O0OE+05 "fft^STO 127E+05

( 0,0OO0O00E^0Of O.OOOOOOOEtOO)

0. 1 000000E4-01 0 . 0000000E4>00

, ' ( 0,ll51293E+02, 0.^235986^+01)

UdOOOOOUEtUl O.OOOOOOOE + OO 0,SOOOOOOt + 05 '•0,8660254t + 05

C 0,l609il38E + 0l, O.OOOOOOOE + yO)

0,500000QEt01 0«O0O0OOOE^00

T 0,13l2236E + 02, ^7523b988E+Un

0,2500000E+Ofe •0,4330l27E+0b

0,B000000E+01 0,0000O0OE+00 0,2bOTin)T)E:+04 •^,4330127E:+06

( 0,2302Sbbk + Ol, 0 « I U« M VBE + U I

J

( 0,1381551E+02, O ,62831 85t+0

U

A IAAAAAAI^aAT a AAAAAAAt'xAA

( 0,3912023E*01, 0 . tOa? 198E*0 1)

0,2500000E+02 0 ,^330 1 276+02

T "07T5^r2495t+O2, 0^,6e83T85E:+0I)

0,5000000E + 07 0 , OOOOOOOE + 00

0,25000U0E+02 0,4330i27E+02

( 0,<»b05l70E + 0l, 0,2094395E + 0n

»0,5000000E*02 0 ,866025flE*02

»0,b000000t+02 0,86602baE+02

O,b0O00C0t + 07 0,0OT>T>O00E+00

"

C ^tr6U610E + 02, 0.7330383E + 01)

0,5000000E+07 0 ,8660254E+07

0,5000000E+07 0 .8660254E+07

C 0,b2l<l608fc + 0l, 0,209«395E4'0l)

'»0,2500000E + 03 0 .4330 127E + 03

C 0,i772753E+02, 0,7330383t+0l)

0,2500000E+08 0 , 4330 1 27E+08

••0,2b00000t + 0i 0,4330l27£ + 0i 0,2b0O0O0E + O8 0.4330 1 27E+08

U-C-39
LOGTM - (083)

BASIC EXTERNAL FUNCTION -ALOG-

<NATURAL LOG -TYPE REAL)

ASA REF.- 8.3.3 (TABLE i*)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X=0.125 -2.079i*'»l5<tl6798359

-2.li79't'»2

X=0.25 -1.38629<t3611198906

-1.3862*'t

X=0.5 -0.6931'f 7i805599't53

-.69311*72

X=1.0 0.03030000000^0000

G.0003Q00

X=1.5 0.<t05't65108108l6i»i»

X=2.0 0.6931'*71805599'»53

.o931i»72

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

0PL03 - (08t»)

BASIC EXTERNAL FUNCTION -DLOG-

(NATJRAL LOG -TYPE DOUBLE PRECISION)

ASA REF,- 8.3.3 (T4BLE k)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X=0.125

X=fl.25

X=0.5

X = 1.B

X=1.5

X = 2.0

-2.0 791* < 154167983 590 + uO

-2.0 79't'*15i»lfa798D+C0

-1.3862 3 i*36111 98 9 360+00

-1.38629<»3611199D*-0a

-0.69 31 '7 180 55 99 '5304- 00

-.693lf»7l80 559950 + 00

0.000330uuOOJOOG3

0.

ti.'*05'*&510 810 816i*'fD + Otl .(fG5(*6510810816O+3Q

0. 6 931 W 71 80 55 99 '530 + 0 0 .b93li»718055995D + aO

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO I'* DIGITS

U-C-40
CXLOG - (085J

BASIC EXTERNAL FUNCTION -CLOG"

(NATUHAL LU(i -TYPE COMPLEX)

ASA REF.- 8.3,3 ( TABLE a; (COMPLEX ARGUMENT)

EXPE C TE D RE SULT

FUNCTION RESULT

( 0.5000000E-07»-0.«6602!>4E-0?')

^^Wl-b^l l rt l O£-#^

^

,lO <4 n S' 8 E 01

-O.lbUHiOE 02 -0. l0471<ybE 01

( 0. 2500000E-0t)»-u. 43301 2rE-06)

-4^. iM^UXfe & t: if2 "^ lO '^ y i9 6 E 01

-0. 1 4bOttb6E u2 -ClO^riVBE 01

( 0. 1000UUOE-U5. O.OOOOOOOE 00)

1- J HI 5 ia 1 L 0 2 O.OOOOOOOL 00

-0.13bl5blL 02 O.OOOOOOOE 00

( 0.50000UOF-05, O.OOOOOOOE 00)

-*^4 2r?^4^y-? t- e-rOoooouoE oo -0,122U6U7t 0? O.OOOOOOOE 00

{ 0.5000000E-05. 0,8660?b4E-05)

-B-f l{j H 7l9He. 01

-U,U512V3E 02 O.lOa/lvbE Ol

C 0. 2500000E-0<» » 0 , 4330 1 2 / E-04 ) "U . W0J 4 O8E 01 0 . 1o 0 7 1'>bE 01

-0.9yoj«oHL 01 0.104/iybE. 01

(-0.5000U00E-04 , 0.6660254E-04)

-O. V2U) 3H 0 t 01 0 . 209 4 3V5E 01

-0.9210340E: 01 0.2094395E 01

(-0.250OO00E-03» 0 . 4 330 1 27 E-0 3

)

aLU-.Z^ 04>u2 |i: 01 0 « 209 4 3V5t; 01

-0,7600902E 01 0.2u943v5E 01

(-0. lOOOOuOE-02, O.OOOOOOOE OO)

"U .6 V0/' 7t) 5t 01 0 . 3i a i!3 V ^ E 01

•0.6V0/'735E 01 0.31415V3E 01

{-O.SOOOOOOE-02. O.OOOOOOOE 00)

"U . 529ta 3 iyF 0 1 0 . 3iaibv3E 01

'0.52Vb317E 01 0.3l4l5y3E 01

CXLuii (085) -CLOGCO. bOOOOUuE-Oi' , -0, «f)60?:i4t-02 )

„ -U . » a U-b 1 /-Ut- -jJ4r 5UJ . 241 y 4 3 V ;> E--a-U -O.^bUbl/OK 0 1 -u.2uV43ybE ol

(-0.2500 00 uF-0),-0.4J3 0l2<'t-0l)

-o.^yvb/i^'t -4)1 -•(),2oy4Js^5€ 01

-0.2yy5732f 01 -0.2u943y5F 01

( U,500()0U0E-OJ.-O.Hh602b4E-Ol)

-U.23u2505€ 01 -0.l04^1y8E 01

-0, ? JOilbobE ')1 -0,lo4/'lyttt 01

( 0.2500000F OU , -0 . 4 iiOl oO)

-ti,byjl4./:;4^. UO --so , 1 04-/ 1 yftf: 03- -u,6y31-4/2t 00 -0. 10471y8E 01

( O.lOooOOOE 01. O.OOOOOOUL 00)

O.OOOOOOOE iU) 0,OoaOOfeK>t OO

O.OOOOOOOE 00 O.OoOOOuOE OO

( O.bOOOOOOE 01. O.000t)000t 00)

U,loOV443t Ol O.OOOOOOOE 00

0.1oOy43dE 01 O.OOOOOOOE 00

( O.bOOOOOUE 01. U.^b60?54t Ol)

O.^JO^ba-H. 01 0. 104-/1 y^E-t^^

0,2j0^505k .;1 0.104/1vhk oi

( 0.250000oe 02. 0.4j3012/t u2)

0.3V1202 3E 0 1 0. 104/1 yrtE 01

0.3yi2023fc ul 0.l04/ly6t 01

(-0.500OOO0E Od* 0.8*560:^5 4 E 02)

- 0.460bl/OE 0) 0.2uy43v5E 01

O.aoubl/Ot 01 0.2o943vSE 01

(-0,2500000E OJ. 0.'^3iO)l7E o3)

_ o^h^laAUJfc -01 0.2-0^4X^5^-^1

U.62146W8L 01 0.2u943y5F 01

U-C-41
CXLUu - (085) -CLOG-

(-0. iOOOOlHlE U4» O.OOUOnUUt 00)

r^¥^A/ 3!>K iH- ^ r-31 4 1bvj t. 04-

0 , 6 y u / 7 :j ') h. 01 (-O.bOOOOOOE O-i, U.OOOOOUOL 00)

- -O.Hbl /tV3^—tft ^4 41!>y^ -01 O.rttJl/lvJE: 0 1 0.314 15,<3E 01

(-O.bOOOOOOE 04.-0.rt660?t)aE O'*)

O.VifluS^OL ni -0.2oV4J9bf. 01

(-0.2b0(>000t. Ob»-u.ajJ01^?('t: Ob)

t^rl-y-biVi'^-H^- -^T^?^-t-4^f^t—Ot- O.lohiv/rtt 0 2 -0.?u94i'vbE 01

( O.bOOOOOOE 03»-O.H6bO->b'+L Ob)

0.iHjl?'^3e t)2 -(t.Hl'*('lydt 01

o.libl^-yJE 02 -u. lo'^/'l VHE ol

{ 0.2bOOOUuE Ob,-0,<4J3ol <d7L 06)

• O.IJUVJOE 0? -I), 10'4?'lvaE 01

( O.lOOOOOOE Of, O.OOOOilUOt OU)

- - ^.-lr:*^i §^vl£- i>? OTtHHH>Ow)t-tH+ - O.lJhlbDlE 0<> O.OuOOOuOE 0 0

( O.bOOOOOOE 0/', u.OuOOOuob 00)

0. 1 Si^^^i VbE O.OOOOOuOE 00

( O.bOOOOOOE of, u.a6f>o?i'»E O'')

o.ioiiHiot f>i o.v-e^/^WHE Ol

o.ifiiinioE (I? u . 1 0*4 / 1 V'^E 01

( 0.2b()0o0uE 0'1» 0.a.jJ01^^L OH)

_. — . .^t^i/ fj^^^i^. ^-^— ot 1 o4/i-'^'<f: -oi - 0. i/'/'*?roJ£ 02 u.loaf'lvdE 01

COLOG - (086)

BASIC EXTERNAL FUNCFION -ALCTGIO-

(COMMON LOG -TYPE REAL)

ASA REF.- 8.3.3 (TABLE k)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X= 0.5 -0.3010299956639811952137

-.3010300

x= 1.0 0 .ooooatnooaooaoooooooooa

0.0000000

X= 2.0 0.3010299956639811952137

.3010300

X= 0 0 .602059991327g62390'»275

.6020600

X= 8.0 0.9030899869919'»35856'*12

.9030900

X=16.0 1.20'»11998265592«»780855(r

1.20<»1200

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

n-C-42
OCLOtf m (067)

BABIt tXTERNAL FUNCTION •DLOCIO»

(COMMON LOG "TYPE DOUBLE PRECISION)

ASA REF,* 8,3,3 (TABLE «) -

LINE I Of EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X» 0,5 -0,30102999566398119521370*00

.0,30102999566398D*00

X« 1,0 0,0000000000000000000000

0,000000000000000*00

X« 2,0 0,30102999566398119521370*00

0,30l02999b66i9HO+00

X» «,0 0,60«!05999l32796«Ji90fl275D+00

0,602059991327960*00

XB 8,0 0,90308998699194358564120*00

—

0,903089986991940*00

XPl6,0 l,20«U99826559247808550D*00

" 1,20<*1199826559D*00 -

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 14 0I6ITS s

SINUS - (088)

BASIC EXTERf^AL FUNCriON -SIN-

(TRIGONOMETRIC SINE -TYPE REAL)

ASA REF.- 8.3.3 (TABLE <*)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATIQiN

RESULTS

x= 0, 0 (i.oooaDooGoaQO

O.OOOOQOO

X= i.O +0.8i»lit7098<*808

X= 2.0 +C.909297'+26826

.909297^

X- 3.0 ^O.imi2G008Q&0

.l'+ll2Ua

X= (PI) b.OOOQOOOOaOQO

.0003000

X= '.O -0.756832495308

-.7568025

X= 5. 0 -0.95892'*27i»663

-.95892'»3

X= 6. 0 -0.279i»15<*98198

-. 279!* 1.55 X=(2PI} O.OOOOaOQGOOOQ

-.0003000

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

II-C-43
OPSIN - (089)

BASIC EXTERNAL FUNCTION -DSINCTRI50N0METRIC SINE -TYPE O.P.>

ASA REF.- 8.3.3 (TABLE k)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

x= 0.0 o.aocooaaaooGuooooooQOuuo

0.

X= 1.0 i).8i»l'»7098i*8i78965066525tjlD+aO

.8itl't7098i»80790O + 0£l

X= 2.0 0.909297«»26825681695396ti2D+30

.909297'+2b825680+00

X= 3.0 O.l'tll2OO08O598672221Od7'*D+dO

.l'»112000805987O + 00

X= (PI) O.OOOOOOOQOOQOOQOOOOOOOaO

.o't3383291778630-21

Xs t*,Q -0. 756802'»953079282513726'tD*aO

-.756802'+9530793D*00

X= 5.0 -a.95892't27t»663138'»6889315D + 00

95892 '27i*6631'*D + a0

X= 6. 0 -0.279i»l5't98198925872811560*00

-.279'+t5<*9819893D+00

X = (2PI) 0.3 oooooooooooooDoooaooao

-.12867 6658355730-20

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO It* DIGITS

CSICO - (090)

BASIC EXTERNAL FUNCTIONS -CSIN , CCOS-

(TRIG, SINE AND COSINE -TYPE COMPLEX)

ASA REF 8.3.3 (TABLE k)

FUNCTION RESULTS

TABLE VALUE

CSIN(1.,1.) =

TABLE VALUE

CCOS(l..i.) =

1.298ii576

1 .298'+576 .63tt9639

0.8337300 -0.9888977

.8337300 -.9888977

CSIN(X)»»2

ARGUMENT

(1 » 1/1 )

(2 , 1/2 )

(3 , 1/3 )

Ik , 1/k )

(5 , 1/5 )

(6 » 1/6 )

(7 t 1/7 )

(8 , 1/8 )

(9 , 1/9 )

(10, 1/10)

+ CCOS (X ) Z = 1, RESULTS SHOULD

1.0000000

1.0000000

l.OQOOOOG

1.0000000

1.0000000

1.0000000

1.0000000

1.0000000

1.0000000

1.0000000

0.0.0

BE 1.0,0.0

-.00 00000

0.0000000

.0000000

0.0000000

-.0000000

-.0000000

.00 00000

-.0000000

0.0000000

-.0000000

II-C-44
C08NS m (091) DHCOS • (092)

BA»IC tXTtKNAL FUNCTION aCUS* BASIC EXTERNAL FUf«iCTION •DCOS*

(TRIGONOMETRIC CO$InE •TYPE REAL) •(TRIGONOMETRIC COSINE .TYPE D,P,)

ASA REF,» d,3,3 (TABLE 4} ASA KEF,- 8,3,3 (TABLE 4)

LINE I OF EACH PAIR IS

HOLLERITH INFORMATION

LINE I OF EACH PAIR 18

HOLLERITH INFORMATION

RESULTS

Wn A A 1 AAaAAAAAAAAA A« OfO ! (000000000000 XB 0,0 0. lOOOOOOOOOOOOOOOOOOOOOOO^Ol

1,0000000 OflOOOOOOOOOOOOOD^Ol

Xp 1,0 0,540302306668

A e/imnsi X» 1,0 0,54030?T0^6BT3971740094D + OD

0,54 0302305668 140^00

Js» C,U »0 , 4 I 0 I 400 J03»J f Xs 2,0 •0,416l46a365«7l42386997570*00

"0,4161468

XP 3,0 •0,989992496600

•0,4l6l46836b4714D+00

X= 3,^ ^,9899^24^660 044545727 1 57D*0TJ

•0,96 9992 4 966 0 0 450+0 0 A* \r i J • 1 , 0 U Q U U w w U D U U

U

XP (PI) wOjlOOOOOOOOOOOOOOOOOOOOOOD+Ol

•1,0000000 •0, loooeoooooooooo+oi

Xp 4,0 •0,6!^3643620864

•0,6536436

r X= 4,0^ ifir,"6536i}36 2X^63611^1 4639170 + 00

0, 6536436208636 ID + OO

XB 5,0 0,283662185463 XP 5,0 0,283662ie546322626446664D+00

0,2836622 0,2836b2l8546i23[; + 00

X> 6,0 0,960170286650

0,9601703

XP 6,0 "W,^UI7TJ2¥66503660?054565D*00

0,96017028665037D+00

Xa(2PI} 1,000000000000 Xs(2PI) O.lOOOOOOOOOOOOOOOOOOOOOODl'Ol

1,0000000 0,100000000000000+01

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED 10 7 DIUIT8

' LINE 2 OF EACH PAIR IS THE FUNCTION

(TTOXULSTION PRINTED TO 14 DIGITS

n-C-45
FORTRAN TEST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS

FOR USE OH LARGE FORTRAN PROCESSORS

IN ACCORDANCE WITH ASA FORTRAN X3. 9-1966

VERSION 3 PART 6

SAMPLE COi^PUTER» FORTRAN COMPILER LEVEL

OPERATINJG SYSTEi^ VERSION

OATE» INSTALLATION MAME

BASIC tXTERNAL FUNCTION -TANH*

THTPERBOLIC TANGENT -TYPE REAL)

AS* REF,« 8,5,T CT*BLE a)

XTTJrT^Trr-EAi

HOLLERITH INFORMATION

RESULTS

X»0,0

Xs«,0

X»6, 0

X88,0

O.QOOOOO OOOO

0,9640275601

0,96a0276

0,98661*12982

0,W5«T«y

0,9993292997

0,9993293

0,9999877117

0,^9^877

0,9999997739

0,9999998

LINE 2 Of EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

SQROT - (095)

BASIC EXTERNAL FUNCTION -SQRT-

(SQUARE ROOT -TYPE REAL)

ASA REF.- 8.3.3 (TABLE i*)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X= 2. 0

X= 3. 0

X=17.

0

X=31.0

X=89.

l.i»l*f21356237310

l,'»l'f2136

1.73205080756888

1.7320508

£.12310562561766

'. 1231056

5.56776'^36283002

5.56776'^U

q. '3398113205660

9. '339811

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

IIC

-46
D5QR0 - (096)

BASIC EXTERNAL FUf^CTION -059RT-

(SQUARE ROOT -TYPE D.P.)

ASA REF.- R.3.3 (TABLE

LIME 1 OF EACH PAIR IS

HOLLERITH IMFORMATION

RESULTS

X= 2.0 l,t|lit21356?3730950'+880+00

l.'tli+21356?3731 + 00r)

X= 3.0 1.732050807568377?<?35D+00

1.732050807568^+0 on

X=17.0 (+.123in56256176605'+98D+00

(+.1231056256177+000

X=31.0 5.5677f>t+362B3002in??lD+00

5.567761+3628300 + 000

X=89.0 9.'+339B1132056603B113D+00

9.4339811320566+Ono

LINE 2 OF EACH PAIR IS THE FUNCTION)

CALCULATION PRINTED TO m DIGITS

CSQRO - (097)

BASIC EXTERNAL FUNCT<I0N -CSQRT-

(SQUftRE ROOT -TYPE COMPLEX)

ASA REF.- 8.3.3 (TABLE

LINE 1 OF EACH PAIR IS

THE EXPECTED VALUE

RESULT

.gSSOatjeE-OZ .99833<fOE-03

.99500'»2E-02 . 9983 3'tO E-0 3 .9800666E-01 .1986693E-01

.9800666E-01 .19B6693E-0i

.9553365E+0C .2955202E+00

.9553365E+00 .2955202E+00

.9210610E + 01 .ssaitiasE+oi

.9210610E+01 .389'tl83E+01

.8775826E+02 . 'f79 255E+02

.8775826E+02 . '79 4 255E+C2

.8253356E-02 . 56«» 6'»25E-'02

.8253356E-02 . 56«f 6't25E-i02

.76«*8«t22E-01 .6'»W'2177E-01

.76*»8i»22E-01 .6«tif2177E-01

.6967067E+00 .71f3561E+00

.6967067E+00 . 717.3561E+00

.5<f03023E + 01 .8'»l't710E+01

.5V03023E + 01 .8'fl'*710E+01

.'161i»68E+02 -.909297<tE+02

.'161't68E+0 2 90929 7itE+02

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCJLATION

n-C-47
ARCTG • (048) OACTU • (099)

BA^IC tXlEKNAt FUNCTION •A'(AN« BASK fcXTtHNAL FUNCTION -DATAN-.

(ARCTANGENT •TYPE REAL) (ARCTANGENT -TYPE 0,P,)

ASA REF,* 8 .5,3 (TABLE a) ASA REF,« T,y,3 (TABLE

UINI 1 OF

HOLLERITH

EACH PAIR IS

INFORMATION

LINE 1 OF

HOLLERITH

EACH PAIR IS

INFORMATION

RESULTS RESULTS

XB 0,125 0,l2«35a99a5a7 X» 0,125 0,12a35ia9o^5a70*00

0,l2aj550 0,l2a35i99<<5^7D + 00

X« 0,Z50 0,2fl4978663127

0,2a«9787

0,2fla97e663127D+00

0,2449786631270^00

X" 0,375 0,358770670271 X8 0,375 0,3587706702710*00

0,ibb7707

" 5^,5D1T

0,3587706702710*00

XB 0,500 0,a636-H760V001

0,a636«76

Or,«636r76090^10*00

0,«63647609001D*00

X»»0,750 •0,6a350ll08793 X«-0,750 • 0,643501108793D4>00

•0,6435011 -0,6435011087930+00

Xc 1,000 0,785398163397

0,7853982

Xfe TvaOTT (r,T85398163397D + 00

0,7853981633970*00

UNk I ON hAUH PAIR 18 THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

LINE i UF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 12 DIGITS

II- C- 48
ACTG2 - {100)

BASIC EXTERNAL FUNCTION -ATA1N2-

fARCTANGENT, 2 ARGUMENT -TYPE REAL)

ASA REF.- 8.3.3 (TABLE <»)

LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X= 0.125

X= 0.250

X= 0.375

X= 0.500

0.12«f3 5'»99U5*f7

.12<f3550

0.2**'978663127

.2<»i»9787

0.3587170670271

.3587 707

0. '636.<f76090 01

.'f63&%76

X=-0.750 -0.6'f3601108793

-.6'f35 0ll

X= 1.000 0. 785398163397

.7853982

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTED TO 7 DIGITS

DATN2 - (101)

BASIC EXTERMAL FUNCTIONJ -OATAN?-

(ARCTANGEMT» 2 ARGUMENT -TYPE D.P.)

ASA REF.- R.3.3 (TABLE ) LINE 1 OF EACH PAIR IS

HOLLERITH INFORMATION

RESULTS

X= 0.125

X= 0.250

X= 0.375

X= 0.500

0.1?'l35ti9945(+7n+nO

.12'+35t|P9'+5(+7+n00

0.2'+4978663127D+00

.21^978663127+000

0.35S770670271D+00

.35R770670271+non

O.'l636'+760900ir)<-nn

.46361+7609001 + 000

X=-0.750 -0.6435011087930+00

-.6'+3501108793+G0n

X= l.nOO 0.785398163397n+nn

.785398163397+000

LINE 2 OF EACH PAIR IS THE FUNCTION

CALCULATION PRINTEn TO 12 DIGITS

n-C-49
DMUDA • (102)

BAyiC tXTtHNAL FUNCTION -DMOD*

CRtMAINDtRING .TYPE DOUBLE PRECISION)

ASA REF,« 8,3,3 (TAeLE 4)

RESULTS

O.OOOOOOOOOOOOOODtOO

- W,UwUUuUUvvVUvUUwTUU

OtOOOOOOOOOOOOOOU^OO ,

- - END OF DMOD TEST

ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS

TEST StUMENT TU bt SUCCE88KUL,

-

CABSA - (103)

BASIC EXTERNAL FUNCTION -CflOS-

(MODULUS OF A COMPLEX NUMBER)

ASA REF.- 8.3.3 (TABLE ^f) RESULTS

SET 1 SET 2 .100000E-Q6 . 500000 E- 06

.lOOGOOE-05 . 500000 E- 05

.100 OOOE-OI+ . 500000E-0'f

.lODOOOE-03 .500000F-03

.100 OOOE-02 .500000E-02

. 100 OOOE-Gl .500003E-01

.lOOOOOE+00 .500000E+00

.lOOQOOE+Ol .5OQ000E+O1

.100 aOOE + 02 .500000E+02

. 100 OQGE + 03 .500000E+03

, 100 aooE + o«t .500000E + 0't

. 100 OOOE + 05 . 500000E-I-05

.lOOOOOE+06 ,500000E+06

. 100 OOOE + 07 .500000E+07

. 100 OOOE + 08 .500000Et08

VALUES IN EACH SET SHOULD BE POSITIVE

.1 FOR SET 1 (.5 FOR SET 2), EXPONENT

RANGE FROM -06 TO +08 IN SEQUENCE

n-C-50
B8FTS m (110) STATEMENT FUNCTION TEST

INTEGER AND REAL

ASA NtP I m e « 1 |g

REoUUTS

0,0000000000

0,0000000000

0

0

0,0000000000

-

0,0000000000

0

0

0 ,0000000000

0.0000000000

A0

0

0,0000000000

0,0000000000

0

0

ALL ABOVE ANSWERS SHOUUD BE 0 FOR t THIS TEST SEUMLNI TU BE SUlCbSSFUL,

FSKTS - (111) STATEMENT FUNCTION TEST

DUUBLt HRtCISIUN, CUHHLEX ANU LOUICAL

ASA REP, m 8,1,2

RESULTS

0,000000000000000000040 0 0,00000 000000000000 0 O »Q0

0,0000000000000000600+00

0,00 00000000000 000 00D»00

0,00000000000000000 00+00

0,0000000000000000000+00

0,OOOOOOOOOOOOOOOOOOD+U0

0,0000000000000000000+00

0,0000000 0,0000000

0,0000000 0,0000000

0,0000000 TT.OOOOOOO

0,0000000 0,0000000

ALL AHUVfc ANSWERS SHUULD Bt 0 }rW IHIS

TEST SEGMENT TO BE SUCCESSFUL, VALUES

WITH tXPONENTS XtSS THATT r0**(«'l«7

ARE CONSIDERED ZERO

THE FOW ABOVE ANSWERS^ 5K0ULT3 BE TRUE'

FOR THIS SEGMENT TO BE SUCCESSFUL

n- c- 51
r 0 R T RAtt TEST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS

FOR USE ON LAR6E FORTRAN PROfESSORS

IN ACCORDANCE WITH ASA FORTRAN X3, 9-1966

VERSION 3 PART 9

SAMPLE COMPUTERi FORTRAN COMPTLER LEVEL

OPERATING SYSTEM VERSION

DATE, INSTALLATION NAME

CPXAD - (IMOJ COMPLEX ADDITION AND

SUBTRACTION

ASA REF. -6,1

RESULTS

• 0000 • 0000

• 0000 ,0000

• 0000 • 0000

.0000 • 0000

,0000 • 0000

.0000 • 0000

• 0000 .0000

.0000 .0000

.0000 .0000

.0000 .0000

• 0000 .0000

TEST IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE 0.0,0,0

CPXMU - (UU COMPLEX MULTIPLICATION

ASA KtF, » 6,1

RESULTS

1,000 0,000

1,000

1,000

0,000

CjOOO

1,000

1,000

1,000

1,000

0,000

0,000

0,000

0,000

1,000

1,000

•0,000

0,000

^ 1,0 00

1,000

0,000

•0,000

1,000

«0,000

0,000

1,000

1,000

0,000

0,000

1,000

1,000

0,00(S

0,000

T,eoo

1,000

0,000

0,000

1,000 0,000

TEST IS POSITIVf If NWBtRS FRTJ^TEI?

ABOVE ARE l.OfO.O

- EKHUH SHUULTT-T " ,001

n- C- 52
CPXDV - (IHZ) DIVISION OF CPXEX - (^3) COMPLFX EXPONENTIATION

COMPLEX NUMBERS

ASA.RFF.6. 1 ASA REE.- 6,1

RESULTS BASED ON THE FUNCTION

RESULTS

1.0 = SIN«»2(X)+C0S»«2(X)

1 .0000 1 .0000

1 .0000 I .0000 1 .0000 . 0000

1 .0000 1 .0000 1 .0000 . 0000

1 .0000 1 .0000 1 .0000 .0000

1 .0000 1 .0000 1 . 0000 .0000

1 .0000 1 .0000 1 . 0000 . 0000

1 .0000 1 .0000 1 .0000 . 0000

1 .0000 I . 0000 1 .0000 . 0000

1 .0000 I .0000 I .0000 .0000

I .0000 1 .0000 I . 0000 -.0000

1 .0000 1 .0000 1 . 0000 - , 0000

1 .0000 I .0000 1 .0000 - .0000

1 .0000 1 .0000 1 . 0000 - .0000

I .0000 1 .0000 1 .0000 .0000

I .0000 1 . 0000 1 .0000 , 0000

1 .0000 1 .0000 1 .0000 .0000

1 .0000 1 . 0000 I . 0000 ,0000

! .0000 1 .0000 1 . 0000 ,0000

1 .0000 ! . 0000 1 .0000 ,0000

1 .OnoO 1 .0000 1 .0000 , 0000

1 . 0000 , 0000

1 .0000 . 0000

TEST IS POSITIVE IF NUMBERS PRINTFD . 0000 ,0000

ABOVE ARE 1.0,1.0 1 . 0000 . 0000

1 ,0000 . 0000

: 1 . 0000 . 0000

ERROR SHOULD NOT EXCEED + OR - .0001 1 .0000 .0000

1 . 0000 . 0000

1 .0000 .0000

1 .0000 .0000

1 .0000 .0000

1 .0000 ,0000

I ,0000 ,0000

1 , 0000 , 0000

1 , 0000 , 0000

1 , 0000 ,0000

1 , 0000 ,0000

1 , 0000 -,0000

1 .0000 -,0000

1 .0000 -,0000

1 . 0000 -,0000

TEST IS POSITIVE IF NUMBERS PRINTFD

ABOVE ARE CLOSE TO 1.0,0,0

ERROR SHOULD NOT EXCEED * OR - .0001

II-C-53
CPXOP • COMPLEX OPERATIONS CREMU - iikb) MULTIPLICATION OF COMPLEX

BY REAL

ASA RbF 6,1

ASA. REF, 6.1

RESULTS

RESULTS

1,0000 0,0000

1,0000 •0,0000 l.UOCu 2.0000

1.0000 •o.oooo l.OOCO 2.0000

1.0000 vOaOOOO l.OOCO 2.G0G0

l.COCO 2.0000

TEST IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE l,OfO,0

TEST IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE 1.0,2.0

ERROR SHOULD NOT EXCEED OR « ,0001

1.0000 1.0000

1.0000 l.COCO

l.OOCO l.OGGO

l.COCO l.QOOC

TEST IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE 1.0,1.0

CREAO w (IHS) ADDITION AND SUBTRACTION ' ERROR SHOULD NOT EXCEED + OR - .0001

OF COMPLEX AND REAL MUMBCRS

ASA REF, 6*1

RESULTS GREDV - (li«7) DIVISION OF COMPLEX

AND REAL NUMBERS

•0000 tOOOO ASA REF 6.1

•0000 (0000

•0000 *0000 RESULTS

•0000 (0000

•0000 •0000

•0000 •oooo l.OOOC l.OOQO

•0000 .0000 l.OOCO 1 . G D 0 0 •0000 (0000 l.OOCO 1.0000

•0000 .0000 1.0000 l.OOCO

1.0000 1.0000

Test is positive if numbers printed l.OOCO 1.0 0 00

ABOVE are O^O.O^O l.OOCO l.CCOO

LOO-^D l.DOCC

TEST IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE 1.0,1.0

1 ERROR SHOULD NOT EXCEED + OR - .0001

II-C-54
CREOP - (I'tS) OPERATIONS ON REAL AND

COMPLEX NUMBERS

FORTRAN TEST PROGRAMS

ASA REF. 6.1

PREPARED BY NATIONAL BUREAU OF STANDARDS

RESULTS

FOR USE ON LARGE FORTRAN PROCESSORS

IN ACCORDANCE *ITH ASA FORTRAN x3. 9-1966

2.0000 -1.0000 VERSION 3 PART 10

TEST IS POSITIVE IF NUMBERS PRIMTED

ABOVE ARE 2.0,-1.0

SAMPLE COMPUTER. FORTRAN COMPILER LEVEL

l.OOGO .0000 OPERATING SYSTEM VERSION

TEST IS POSITIVE IF NUMBERS PRIf^TEO

ABOVE ARE 1.0,0.0

DATE, INSTALLATION NAME

ERROR SHOULD NOT EXCEED + OR - .0001

M|SC3 * {IH9) EFFECT OF BLANKS WITHIN

STMNT AND CONTtNUATION

OF STMNT To 20 LlNgS

BRFCP - (160) REAL EXTERNAL FUNCTIONS

ASA REF, - 8.3.1

ASA REFS, • 3, I. M.I 3,2, M, 3,3 3«2«H RESULTS SHOui n RP" pn«;iTiuF

RESULTS

0

Test i is positive

• 0 TEST 2 IS positive

TEST IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE 0 test 3 IS POSITIVE

TEST H IS POSITIVE

niSCk - (150) EFFECT OF BLANKS WITHIN

STMNT AND CONTINUATION

OF STMNT TO 20 LINES

Test s is positive

ASA REFS. - 3.1.'t.l 3.2.^1.3.3 3.2.** TEST 6 IS positive

RESULTS

o.ooco o.oooo

.0000 .0000

TEST IS POSITIVE IF NUMBERS PRIMTED

ABOVE ARE 0.0, CO i

1

II-C-55
BIFCP - (161) INTEGER EXTERNAL FUNCTIONS

WITH INTEGER AND REAL ARGS

ASA REF. - 8.3.1

RESULTS SHOULD BE POSITIVE

TEST I IS POSITIVE

TEST 2 IS POSITIVE

TEST 3 IS POSITIVE

TEST S IS POSITIVE

TEST 5 IS POSITIVE

TEST 6 IS POSITIVE

FRFCP - (162) REAL FUNCTIONS WITH

LOGICAL! O.P.t AND COMPLEX ARGS

ASA REF. 8.3,1

Test 6 is positive.

TEST 7 IS POSITIVE.

FIFCP - (163) INTEGER FUNCTION IN FULL FORTRAN

ASA REF, 8,3,1

RESULTS SHOULD BE POSITIVE

Test i is positive

TEST 2 IS POSITIVE

TEST 3 IS POSITIVE

TEST H IS POSITIVE

TEST 5 IS POSITIVE

TEST 6 IS POSITIVE

TEST 7 IS POSITIVE

CFCCP - (161) COMPLEX FUNCTIONS

ASA REFS, 8.3, 1 ,8.3,2

RESULTS

RESULTS SHOULD BE POSITIVE

.0 .0 TEST 1 POS I T I VE IF 0.0,0,0

TEST 1 IS POSITIVE. .0 , a TEST 2 POSITIVE IF 0,0,0,0

.0 ,0 -- TEST 3 POS I T I VF IF 0.0,0.0

TEST 2 IS POSITIVE.

.0 ,Q TEST M POS I T I vr IF 0.0,0.0

Test 3 i s pos i t i ve . ,0 ,0 -- TEST 5 POS I T I VF IF 0.0,0*0

.0 • 0 TEST 6 POS I T I VF IF 0.0,0.0

TEST H IS POSITIVE.

.0 ,0 -- TEST 7 POS I T I VF I F 0.0,0,0

TEST 5 IS POSITIVE. .0 .0 TEST 8 POS I T I VF IF 0,0,0,0

TEST 9 1 S POS I T I VE

TEST 10 IS POS 1 T I VE

II-C-56
FORTRAN TEST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS

FOR USE ON LARGE FORTRAN PROCESSORS

IN ACCORDANCE WITH ASA FORTRAN X3. 9-1966

VERSION 3 PART 11

SAMPLE COMPUTER, FORTRAN COMPILER LEVEL

OPERATING SYSTEM VERSION

DATE, INSTALLATION NAME

DPFCP - (165) DOUBLE PRECISION

FUNCTIONS

ASA REFS. 8.3.1,8.3.2

RESULTS

TEST 1 IS POSITIVE

TEST 2 IS POSITIVE

TEST 3 IS POSITIVE

TEST *f IS POSITIVE

TEST 5 IS POSITIVE

TEST 6 IS POSITIVE

TEST 7 IS POSITIVE

TEST 8 IS POSITIVE

TEST 9 IS POSITIVE

TEST 10 IS POSITIVE

0.0 0.0

TEST 11 IS POSITIVE IF NUMBERS PRINTED

ABOVE ARE 0.0,0.0

TEST 12 IS POSITIVE

BFCCP - (166) LOGIC

ASA REF 8.3. 1 RESULTS

TEST 1 IS POSITIVE

TEST 2 IS POSITIVE

TEST 3 IS POSITIVE

TEST IS POSITIVE

TEST 5 IS POSITIVE

TEST 6 IS POSITIVE

TEST 7 IS POSITIVE

TEST 8 IS POSITIVE

TEST 9 IS POSITIVE

TEST 10 IS POSITIVE

0.0000 0.0000

TEST 11 IS POSITIVE

ABOVE ARE 0.0,0.0

END OF (166)

ASA Htf-, - B.I.I

RESUUTS

1.0

1

1

T7F

1 "IT

1.0

; TEST SUCCESSFUL IF ALL RESULTS EQUAL 1

U-C-57
FSBRT - (168) SUBROUTINE SUBPROSRftMS

ASA REF. - S.**.!

RESULTS

TEST IS SUCCESSFUL IF EACH

GROUP CONTAINS SAME VALUES

111

11

11

1

11

2. 0 2. 0 2. 0 2.0

2. 0 2.0

2. 0 2. 0 2. 0 2.0

if. OO + OQ

OD+0 0

it, OO + OO

tf. 00 + 00

OD+0 0

«+. OD+a 0 h, OO + OO

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

6.0

"BtKDT • TW5~HL0CK DATA SUBFRlTOIfAl^

ASA RtF, • 8,5

TESTIS SUCCESSFUL IF EACH

GROUP CONTAINS SAME VALUES

3,0

3,0

3.0

3,0

<,0Df 00

«, 00 + 00

a,OD+oo

a, 00+00

a,o

fl.O 4.0

5,0

5.0

5,0

5,0

AB

AB

AB

T

TT

TT

T

T

T

II-C-58
FORTRAN TEST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS

FOR USE ON LARGE FORTRAN PROCESSORS

IN ACCORDANCE *ITH ASA FORTRAN X3, 9-1966

VERSION 3 PART 12

SAMPLE COMPUTERf FORTRAN COMPILER LEVEL

OPERATING SYSTEM VERSION

DATE, INSTALLATION NAME

BLKOA". (179 J STVERTkL BLUCK TJUT*

SUBPROGRAMS

ASA WEF,~i~ff75^

RESULTS

TEST IS SUCCESSFUL IF EACH

6RUUP CONTAINS SAME VALUES

1

iI

2.0

2,0

2,0

2,0

4,00^00

ir,w*o«

tt, 00^00

4,0D4-00

?.o «.o

3,0

3.0 «.o

3,0 4.0

FF

F

F

MP

HP

n-C-59

UnFRW - U80) UNFORMATTED READ

AND WRITE STATEMENTS

ASA REFS - 7,l»i,2»H AND 7fl.3.2»5

RESULTS

.0000000000

*0000000000

0

Q

.0000000000

.0000000000

•0000000000

.0000000000

.0000000000

.0000000000

•0000000000

•0000000000

.0000000000

.0000000000

.0000000000

•0000000000

•0000000000

•0000000000

00

.0000000000

•0000000000

.0000000000

.0000000000

.0000000000

.0000000000

.0000000000

.0000000000

.0000000000

00

ALL ABOVE ANSWERS SHOULD BE ZERO IF THE READ AND WRITE RECORDS COMPARE.
BACUP •> (182) BACKSPACE TAPE

ASA PEF* 7* I •3«3t2

RESULTS

GROUP

»

7 1016

lOJ 9

2

5

8 1017

1020

1022 1022

3

6

9 1018

1021

102H

GROUP

s 10 15

20 25 30

35 HO MS

5080 5085 5090

5095 5100 9105

5110 5115 5120

GROUP

1H

7 1016

1019

1022

25

8 1017

1020

1023

3

6

9 1018

1021

102H

GROUPS 1 AND 3 SHOULD BE THE SAME

AND GROUP 2, 5 TIMES GROUP 1

OOTRM - (190) DO TERMINAL

ASA REF - 7tl.2.8

RESULTS

testi continue explicit

••test! successful**

test2 continue implied

•test2 successful**

test3 assign

••test3 successful**

OOLMT - (191) DO SET LIMITS

ASA REF. - 7.142.8

RESULTS

••TEST SUCCESSFUL*^

DONSC - (192) NESTED LOOPS

ASA REF. - 7.1.2.8

RESULTS

2 LEVELS OF NESTING

**TEST SUCCESSFUL**

3 LEVELS OF NESTING

••TEST SUCCESSFUL^*

H LEVELS OF NESTING

*»TEST SUCCESSFUL**

5 LEVELS OF NESTING

*»TEST SUCCESSFUL**

CONTROL VARIABLE USED IN SUBSCRIPT

**TEST SUCCESSFUL**

DONSI - (193) INCOMPLETE DO

ASA REF. - 7.1.2.8

RESULTS

••INCOMPLETE LOOP SUCCESSFUL**

TESTS LOGICAL IF

**TEST'4 SUCCESSFUL**

C-60
DONSX • (194) EXTENDED t>0 RANOt f OONIO • (196) DO LOOPS HITH I/O

TERMINAL STATEMENTS

ASA nif, m 7,1,2,8,2 ASA REP, • 7,1.2,8

RESULTS

RESULTS

EXTENDED RANGE FROM LEVEL I

I

I **TEST SUCCESSFUL**

i.o

1.0

0, 10^01

0,1D4'01

CXTCNoeo RAN6E FROM LEVEL 2 1.0 1.0

i.O 1,0

TEST SUCCESSFUL**

T EXTENDED RANGE CONTAINING A 00 STATEMENT

6

. ,

1 76

i 1.0 —s " a 1.0

0,1D^01 —3—

2

0,ID*01

1,0 1,0

I THE ABOVE 8 VALUES SHOULD BE

1.0 1,0

T IN OtSCENDlNC ORDER PROM 8 TO I T

1I 1.0

1.0

0,lDt01

0,1D*01

1,0 1,0

1.0 1,0

T

T

THIS TEST IS SUCCESSFUL IF 3

IDtNTICAL GROUPS OF OUTPUT HAVt BEEN

GENERATED.

OONML -i (195) MULT-LEVEL LOOPS

ASA REF, - 7.1. 2,8

RESULTS

••TEST SUCCESSFUL**

II-C-61
MORDO - (197) A MORE C0MPLIC4TED SEG,

OF 00 STATEMENTS

ASA REFS - 7.1.2.8 AND 7.1.2.8.1

RESULTS

THIS SEGMENT SUCCESSFULLY TE«;TED

IF NO ERROR MESSAGES

SUBRl - (200) SUBROUTINE SUBPROGRAM

WITHOUT AN ARGUMENT LIST

ASA REF. - 8,4*1

RESULTS

THIS SEGMENT SUCCESSFULLY TESTED

IF NO ERROR MESSAGES.

FORTRAN TEST PROG RAMS

PREPARED 8Y NATIONAL 8uREAU OF STANDARDS

FOR USE ON LARGE FORTRAN PROCESSORS

IN ACCORDANCE *ITH ASA FqRTRAN X3. 9-1966

VERSION 3 PART 1

3

SAMPLE COnIPUTeRi FORTRAN COMPILER LEVEL

OPERATING SYSTE^^ VERSION

DATE, INSTALLATION NAME

LOGIF - (300) LOGICAL IF STATEMENT

ASA REF. - 7.1.2.-5

RESULTS

TEST Eiei>t^ei-Ttir- #RITT€it"Si€hf€ft-?€^

+ 0 EQUALS -0 . - - +0.0 EQUALS -0.0

+0.0D0 EQUALS -O.OOO

TEST COMPUTflTIONAL ^I^H Qf ~ Ztf^O"

+ 0 EQUALS -0 • +0.0 EQUALS -0.0

+0.000 EQUALS -O.OOO . TEST -LOGICAL IF- FOLLOW-EtT BY " - OTFFERENT KINDS OF STATEMENTS

000

0ir0

0

000 THERE SHOULD 3E 10 VALUES A30VEt

IF ONLY 9, TEST 9 HAS FAILED.

00

0

00

0

0

0

ALL VALUES SHOULD BE ZERO.

A VALUE OTHER THAN ZERO HILL BE THE

NUMBER OF THE TEST WHICH FAILED.

n-C-62
BARIF - (301) BASIC FORTRAN

ARITHMETIC IF STATEMENT

ASA REF. - 7.1.2.2

RESULTS

TEST FOR SIGN OF ZERO - TYPE INTEGER

PATH FORM OF EXPRESSION • OF IF -0 • 0 * +0 ****************************

* * * * NEG. 0 0 0 » * * * * ZERO 11 11 11 • * * * * POS. • Q * 0 0

TEST FOR SIGN OF ZERO - TYPE REAL

PATH * FORM OF EXPRESSION * OF IF * -0.0 • 0.0 +0.0 * ****************************

* » * NEG. * 0 * 0 0 * * * * * ZERO * 11 * 11 11 * * * * POS. * 0 * 0 0 *

* * * *

ALL ENTRIES SHOULD BE 0 EXCEPT

THE ZERO PATH, WHICH SHOULD BE 11

IN EACH COLUMN. OTHER TESTS MAY

FAIL IF THESE RESULTS DIFFER.

TEST EXPRESSIONS IN IF STATEMENTS

TESTS SUCCESSFUL

FARIF - (3Q2) FULL FORTRAN

ARITHMETIC IF STATEMENTS

ASA REF. - 7.1.2.2

RESULTS

SEGMENT 302 TESTED SUCCESSFULLY.

lOFMT . C31T}~1SDDITI0NAL FORMATTEd^ T/0

ASA HtKS • 7,1,3,2,2 7,l.3,2,i T,"27T

TEST BLATJK INPUT

EACH ANSWER SHOULD BE ZERO

00

0

0,0

0,0

0,0£*00

0 , Ot*00

o,oe*oo

0,0D*00

0,00*00

0,0O«00

o,oo*inr

TEST DEC, PT, SPECIFIED 5V INPUT

3 LINES IN EACH GROUP SHOULD MATCH

* tlNE IS HOLLERITH DATA

* r,^i'*56 — 1,23456

* 987654,0

"*»7654,0

* O.lgJSE^-Ol

0,1234E4'01

a,l23«E*01

* "0 , V076!>4t*0<:

••0,987654E*02

•0,9B7654E+02

* 0,2345678910UD*06

0,23456789lOUO*06

* '!'0,109876T5«.04

"0,1098760*04

• 0,V0'r876D-O4

II-C-63
TE8T FOHHAT UESCRIPTOH HtPETlTlON

AIL LINES IN EACH GROUP SHOULD

B E ID E NTICAL '

1—12345

12345

12345

12345

12345

12345

1*1

TTT

111

* 0e339567E^02

0,33 ? S6 7 E*02

0,339567E^02

0(3i95b7E*02

0.339567E«02

* 0«962951342440«04

0,9629^1342440^04

0, 962951342440*04

0,9629513424404>04

0,962951342440+04

0,962951342440+04

T723 0.14E404 0,20402

3 1,23 0,14E404 0,20402 3

r7?3—0,14E404 0,20402

3 1,23 Q,14E»04 0,20402 —

• •0,13579E405

*0,13579E4g5

•0,13579E405

4444

4444

4444

4444

4444

4444

4444 —* •333

mTST

•333

5,555

5.555

5. 555

• 0.'*5i»5E-9'»

• '5'*5E-0<*

* -6.666

-6, 666

-6. 666

• 0.9989E+12

. 9989E+12

. 9989E+12

7.77

7. 77

7. 77

-Q.7<»7E-02

-.7'»7E-02

-.7«»7E-02

0.5<*9E+0I)

. 5<»9E«-0a

. 5<i9E>00

• 22

22

22

• 0.662E*0a

. 662E^00

.662E*00

• 0.«f68E-10

.«»68E-10

.'68E-10

11

11

11

0.595'*2D + 04

. 595i»2D*0'»

.595't2O*04

• -4«».6666

-'«». 6666

6666

-0. 123't567890D-03

123t»567890D-03

123'»567890D-03

U-C- 64
1—5a,9327

511,9587

* -0,1395b2453aDtOO

•0,139562a53aD400 —MO,l}9562a53aD*00

nft5WS2,i

65432.1

65432,1

*—0T««8E*03

0,e4SE«03

0,BttBE*03

0,e4Be»03

(* 0,1290*07

0,1290*0 7 0,1290*07

0,12 9 0*0 7 1—0,4120*21

0,4120*21

0,4120*21

* **0, 9 6 7 E*00

•0,987E*00 —•0(987E*00

•0,987E*00

0,60*00

0,60*00

0,60*00

0,60*00'

-*—0,36e0«05

0,36SO«05

0,36BD«0^

H 0,7776*01

0,7771*01

0,777E*0l

* -Aii 0,b9 S420*04

•333 0,595420*04

* >333 0,595420*04

-mm 0,b95420*04

SCALk K'ACIUH UN KEAO

JNOROEROF FORMAT OCCURRENCE

NO EXPONENT ON INPUT DATA

TTST^O 9B7654

PE8C IPEIO.3

TO Bt ,988E*02 ,6bH6t*0S

18 0.968E*02 0.8fe48E*05

8647,86

*IPE10,2

987,654

010.3

,98770*04

0.98770*04

RDFMT - (312) FORMATS IN ARRAYS

ASA REFS. - 7.2.3.10

EACH GROUP OF LINES SHOULD MATCH

4756 -867 Z2i* 39 -6

4756 -867 224 39 -6

4756 -867 224 39 -6

0.234 98. -77.27 547.18

.234 98. -77,27 547.18

.234 98. -77,27 547.18

-0.76E+09

-.76E+09

-.76E+09

0.893421E-12

.893421E-12

.893421E-12

.89342iE-12

.89342iE-12

-0,3579012460+00 0. 520-02

-.3579012460+00 .520-02

-.3579012460+00 .520-02

TIF

TIF

TIF

ABCDE+*=123

ABCDE+»=123

+.10E+01

•lOE+Ol

HOLLERITH CONSTANTS AS CALL ARGUMENTS

HOLLERITH CONSTANTS AS CALL ARGUMENTS

TEST EMPTY FORMAT STATEMENT

THE FOLLOWING LINE SHOULD BE BLANK _ END EMPTY FORMAT TEST

END SEGMENT 312 TEST

II-C-65
FORTRAN TEST PROGRAMS

PREPARED BY NATIONAL BUREAU OF STANDARDS

FOR USE ON LARGE FORTRAN PROCESSORS

IN ACCORDANCE WITH ASA FORTRAN X3. 9-1966

VERSION 3 PART Ik

SAMPLE COMPUTER, FORTRAN COMPILER LEVEL

OPERATING SYSTEM VERSION

DATE, INSTALLATION NAME

MISC5 - (350) SPECIFICATI0M5 FOR

PROGRAVI FOR^^

ASA REFS. - 3.2 3.2.1 3.1 3.5

TEST THAT COMMENTS ARE NOT EXECUTED

TEST SUCCESSFUL IF NO ERROR MFS5AGF

TEST 72 CHARACTER LINE

123tt5678910 11 1213141516171 819

123«f567891 01 112131iH 516171 819

TEST SUCCESSFUL IF 2 LINES ABOVE ARE

DIGITS 1 THROUGH 19

TEST l»2»3rU»5 CHARACTER STMNT. LABEL

1 CHARACTER LABEL ACCEPTED

2 CHARACTER LABEL ACCEPTED

3 CHARACTER LABEL ACCEPTED

<+ CHARACTER LABEL ACCEPTED

5 CHARACTER LABEL ACCEPTED

TEST 1»2»3»(|»5»6 CHARACTER VARIABLES

AMD ARRAY NAMES

**TE5T SUCCESSFUL-ALL NAMES ACCEPTED**

TEST PLACEMENT OF STATEMENT LABELS

AMD LABELS WITH LEADING ZEROS

12

3

5

6

7

8

9

TEST SUCCESSFUL IF 9 NUMBERS

IN SEQUENTIAL ORDER FROM 1 TO 9

ARE WRITTEN ABOVE

END OF SEGMENT 350

II-C-66
FUNMX - (351)

THIS SEGMENT FURTHER TESTS

SOME BASIC EXTERNAL FUNCTIONS

BY USING TRIGONOMETRIC FORMULAE

ASA REFS. - 8.3.3

RESULTS

0. OOOQO -.oooao

-.0009 0 .00000

-.caooo

-.00000

.00000

0.00000

.00000

C. 00000

-. 00000

ALL ABOVE ANSWERS SHOULD BE 0 PLUS OR

MINUS AN ERROR FACTOR OF NOT MORE THAN

10 (-*)

NAMES - (352)

TEST OF THE COMPILERS CAPABILITr OF

IDENTIFYING DATA NAMES THAT RESEMBLE

FORTRAN VERBS AND/OR PREDEFINED

FUNCTION NAMES

ASA REFS. - 10.1. Z/i*

RESULTS

SPtC2 • (360) COMMON AND EaUlVALENCe

ASA KEFS • 7, 2.1.2 7,2, 1, i 7, 2,1.

a

RESULTS

LINE I BELOW IS HOLLERITH

2 2,0

2 2,0

ANSWERS BELOW SHOULD BE 0 OR 0,0

0

0

00,0

00

0a.o

ARITHMETIC IF SUCCESSFUL

ATJSWFR BELOW SHOULD BE 13,0

T3,0

COMPUTED GO TO SUCCESSFUL

TEST EOUIVALEJJCE EXTENDS COMMON

TEST SUCCESSFUL

0.00000

O.OOOCO

0.00000

0. 00000

0. 00 000

0. oooco

0. 00000

0. 000 00

0. OOOQO

O.OOObO

0. OOOQO

O.OOOCO

ALL ABOVE ANSWERS SHOULD BE 0 FOR j THIS TEST SEGMENT TO BE SUCCESSFUL 1 U-C-67

SECTION III DISTRIBUTION TAPE ORGANIZATION

GENERAL DESCRIPTION

This section of the document describes the organization of the NBS FORTRAN

Test Programs and data as recorded on magnetic tape for distribution. When

the programs have been retrieved and stored in a form more appropriate to

utilization, this section of the manual is of no significance.

The distribution tape containing both Version 1 (116 executable test units)

and Version 3 (14 executable programs containing the 116 test units) is available

in 800 cpi recording density in the following forms:

7 track, even parity, BCD recorded from FORTRAN H set punch card code

(See Appendix D X3. 9-1966)

9 track, odd parity, EBCDIC recorded from the American National Standard

punch card code

9 track, odd parity, ASCII recorded from the American National Standard

punch card code

The distribution tape is an unlabeled, fixed block size recorded tape, terminating

with two tape mark records.

Version 1 Programs and its data precede Version 3 with its data. Each block

contains 720 characters comprised of nine 80- character card image records. Partial

blocks at the end of both Version 1 and Version 3 are filled with blank card images,

so that Version 1 begins in Block 1 record 1 and Version 3 begins with Block 1597

record 1.

The differences between the punch card code for the FORTRAN H Set and the American

National Standard are reflected in the following four characters:

H-Set Standard

( left parenthesis 0-4-8 12-5-8

) right parenthesis 12-4-8 11-5-8

= equal 3-8 6-8

+ plus 12 12-6-8

The programs and the data are in the same code.

For FORTRAN processors which contain an option on the coded character set for

conversion of the FORTRAN programs, but not for the data, or perform a logical

conversion only, causing the program listing to print a different character

representation for the four characters listed above should perform a character

conversion to the test programs and data before performing the tests, because

the program listing is considered part of the documentation.

The following tables identify each main program unit, subprogram and data in

two different forms:

The Block and Record number identifies the block number and the

record within the block of the start of each element of information.

The card image number is the record number for the location of the

start of each element of information.
For Version 3, one table lists the elements in relation to their position

on the tape with Version 1 preceding it, and the other table assumes that

the tape has been forward spaced over Version 1 (1596 blocks).

Each element of information in the tables is identified by the letter:

M = main program unit

F = function subprogram

S = subroutine subprogram

B = Block Data subprogram

WARNING - Version 1 and Version 3 each contain the same subprograms. If Version 1 and Version 3 are to be retained as a single file for use, one copy of the

subprograms (6 3 functions and subroutines) must be deleted otherwise duplicate

external procedure names will occur.

In Version 1, the Directory (segment 000) recorded as a set of comment lines is

included as part of the first test unit, segment 008. This causes this test unit

to contain 871 card images. The Directory of 342 card images may be removed and

by appending a STOP statement and an END line may be compiled to obtain a program

listing.

II I -A2
Al. VERSION 1 DISTRIBUTION TAPE ORGANIZATION

Block § Record Ji- ff Segment # Name

Lara

Image # blOCK Q Record # Segment ff Name

Card

Image #

1 1 000 1 ^ r o y A^ O 06o ir 1Mb M

C O o 00 0 rM 1 KW M 66 / 7i

A^^ n 069 T cn DT IrDBL M

r An "7 byy / 97 8 46 data cards O T O 872 ^7 7 673 z:6

A 'TA T c/^ nv Ir LFa M

A A C y1 60b4

102 9

r\c\c\ Ah KMl MA 1 O C OA 6o0 A4 U /

IrLJb M D i ib

115 7

•73 data cards 1 A 7 "7 10 33 z; o "7 687 •-7 7 A '7 O ir bMb A4M

A 1 0 1

C3 i Oi

116 1 010 DAI A2 M 10 36 "7 A O 702 1 A 7 ir rMb M

A 7 1 A 133 6 All oil M i 194 •7 0 0 1 12. 2 A OA n V Dr\M nArUlN M

A /t O 1 D4y i 163 4 013 r\ A C AT M 1462 7/8 oO

A 0 1 (Joi V Dn UcArU M A c: 1 bbb i 210 1 Air 0 15 LAbbN M 1882 736 A4

A O 1 082 C V DM LLaPO M 66 ly

262 2 016 T A C^XT LAbbN M 235

IM -7 3

A O 7 083 LOb 1

M 6 /i / 273 9 017 INTRL M 2457 753 6

A O ,1 084 DPLOb M

^ "7 ^7 /I 6 / /4

294 5 A O A 020 UbO ro M 2642 761 1 A o r 085 bXLOb M 6841

302 2 AO! 021 AbO 1M 2711 117. oO 086 LOLUb \AM

A A /I '7 oy 4 / 318 7 MOO Oz2 LbO 10 M

O O A 2860 •7 "7 A 779 i A O "7 Oo/ ULLUb M

7AA 7 /UU b 334 9

A "TA 1)30 A D o A r\ ARdAD M7 A A /I 3006 786 A4

A O O 08o C T MI 1

biNUb M

VAA O /uoy

347 7 U3i A r> A r\ AKrAD M 3121 •TA r" 795 4

A OA 0o9 nnc T M UrbiM M

"7 1 c n /ibU

354 1

A n n c D ARBbB M7 1 T O 3178 OA A 804 5 AAA 090 r* c T rr^ LbibU M 1 LSI

361 5

A Dec D ARbbB M 3245 oil oil / AA 1 09 1OC\ CM C LU bMb M

700 7 369 5 (J34 A D D A C AKBAb M

7 7 T *7 3317 O O A 820 O8 AA O UrbUb \AM

7770 / b / y 378 3 A 7 r 035 AREAS M

7 7A H. 3396 O O A 829 o8 AA /I (jy 4 1 AJNbn 7/1 /40UAn

384 9

A 7^ 036 ARBMl M 3456 QIC 836 Z AO C uy b 7Q 1 7 392 3 037 ARBMR M 3522 842 73 AA ^ 096 Ubl^KU M

7C 70 /b /

399 4

A T O Obo AKrMU M

7 r" o ^ 35 86 O ^ A 849 •7 3 AA 1 09 / Lbl^KU M

7A 7 C /6 3b

407 3 039 ADD r\\ J AKBDV M 3657 o r" "7 85 7 5 AA O 09 8

A n ARL 1 b M

7"7 AA 7709

415 9

A y1 A 040 ARrDV M 3735 OZT 7 863 9 AAA 099 DAL lb M

"7 "7 "7 7767

423 3 041 ARBEX M 3801 871 3

T AA 100 AC ib2 M 7833

433 3 042 ARFEX M 3891 877 5 101 DA1N2 M 7889

441 5 043 ARBHI K A M 3965 884 8

1 A O 102 DMODA M

^7 A r r 7955

461 2 ATA 050 SBB67 M 4142 891 8 103 O A n O A CABbA X A M 8018

469 9 ATI 05

bBB45 M 4221 AA 1 90

2

1 1 A 110 BSr 1 b MO 1 A O 8102

479 6

A r* o 052 SBB13 M 4308 A 1 7 913 3 111 111 r br 1 b M 8211

492 1 A r" 7 053 bBr 17 \AM

A A OA 4420 A 7 1 9 31 "77

1 /I A 140 /"> nv A A M

O 7 ^7 "7 8377

500 8 054 SIMIF M 4499 940 2

T /I 1 141 LPXMU M 8453

509 4 055 IFABS M 4576 955 8 142 CPXDV M 8594

516 5

AT/:: 056 IFFLT M 4640 965 11 y1 7 143 CPXhA M 8677

521 9 057 IFFIX M 4689 978 9 144 LPXOP \AM 8802

528 5 058 IFSGN M 4748 985 9 145 CREAD M 8865

537 6

A r A 059 IFDAB M 4830 993 4 146 LKbMU X4MO A 7 O 8932

544 8 A A 060 IFTRN M 4895 1000 3

1 ,1 ^7 147 LRhDV x^MOAA A 8994

bb6 7 061 irMUU M

r A A O b002 1 AA^ 1006 / 14o LKtUr M

n A c o 9Ub 2 DDO 1 062 IFMAX M 5086 1014 1

1 y1 A 149 MISC3 X if M 9118

by o 6 063 T TM irMilN M

C 7 7 /I bbb4 1 A O /I QO ibU ^y( T C P /I M y z ib

618 6 064 irUob M bbby 1 A It^ iU bo r- D iOU 1 An DKr b r y ozu 625 1 065 irU iM M bo i /

1 A C O

/inn 4UU ArACQO r Qy 4UZ /I m

632 7 066 IFSGL M 5686 1046 7 420 BFS F 9412

641 6 067 IFREL M 5766 1047 8 430 CFS F 9422

1048 9 440 DFS F 9432

*See preceding page. 1050 2 450 EFS F 9443

1051 4 460 FFS F 9454

M = Main Program

F = Function Subprogram

S = Subroutine Subprogram

B = BLOCK DATA Subprogram

III -AVERSION 1 DISTRIBUTION TAPE ORGANIZATION - continuation

Block § Record # Segment # Name

Card

Image # Block ^ Record # Segment # Name

Card

Image #

1053 1 161 BIFCP M 9469 1196 7 167 SBRTN M 10762

1062 7 401 I API F 9556 1208 2 407 AAQ s 10865

1063 8 421 IBFI F 9566 1210 7 417 ABQ s 10888

1064 9 431 ICFI F 9576 1212 2 427 ACQ s 10901

1066 1 441 IDFI F 9586 1214 5 168 FSBRT M 10922

1067 5 451 lEFI F 9599 1231 5 408 ADQ s 11075

1068 7 461 IFFI F 9610 1235 8 418 AEQ s 11114

1070 4 162 FRFCP M 9625 1238 4 428 AFQ s 11137

1085 1 402 GFS F 9 757 1242 9 169 BLKDT M 11178

1086 3 422 HFS F 9768 1250 8 409 BLOKD D 11249

1087 6 432 IRFS F 9780 1254 8 179 BLKDA M 11285

1089 4 442 JRFS F 9796 1262 6 419 BLAKD B 11355

1090 6 452 RFS F 9807 1265 3 429 BLBKD B 11379

1093 8 163 FIFCP M 9 836 1267 2 439 BLCKD B 11396

1107 5 403 IFI F 9959 1269 4 180 UNFRW M 11416

1108 7 423 JFI F 9970 1284 2 182 BACUP M 11549

1110 1 433 KFI F 99 82 1292 4 190 DOTRM M 11623

1111 8 443 LFI F 9998 1307 4 191 DOLMT M 11758

1113 1 453 MFI F 10009 1314 3 192 DONSC M 11820

1116 3 164 CFCCP M 10038 1332 7 193 DONS I M 11986

1130 9 404 AFC F 10170 1339 4 194 DONSX M 12046

1132 1 414 BFC F 10180 1353 8 195 DONML M 12176

1133 2 424 CFC F 10190 1361 1 196 DON 10 M 12241

1134 4 434 DFC F 10201 1371 2 197 MORDO M 12332

1135 7 444 EFC F 10213 1390 9 412 MDQ s 12510

1136 9 454 FFC F 10224 1392 4 200 SUBRl M 12523

1138 6 464 HFC F 10239 1398 2 410 SUBRQ S 12575

1141 7 165 DPFCP M 10267 1409 4 300 LOG IF M 12676

1156 7 405 AFD F 10402 1439 9 411 SMCQ S 12951

1157 8 415 BFD F 10412 1441 3 301 BAR IF M 12963

1158 9 425 CFD F 10422 1460 7 302 FAR IF M 13138

1160 2 435 DFD F 10433 1471 7 310 lOFMT M 13237

1161 5 445 EFD F 10445 1506 2 38 data cards 13547

1163 3 455 FFD F 10461 1510 4 312 RDFMT M 13585

1164 5 465 GFD F 10472 1532 7 462 FMTQ S 13786

1165 8 475 HFD F 10484 1536 4 13 data cards 13819

1169 4 166 BFCCP M 10516 1537 8 350 MISC5 M 13832

1185 4 406 AFB F 10660 1555 2 351 FUNMX M 13988

1186 5 416 BFB F 10670 1561 6 352 NAMES M 14046

1187 6 426 CFB F 10680 1570 4 413 MAQQ S 14125

1188 8 436 DFB F 10691 1572 1 463 MBQQ S 14140

1190 1 446 EFB F 10702 1573 7 473 AMQQ s 14155

1191 4 456 FFB F 10714 1576 1 483 BMQQ s 14176

1192 7 466 GFB F 10726 1577 8 360 SPEC2 M 14192

1193 9 476 HFB F 10737 1596 6 blank card 14361

1596 9 last blank card 14364

ni-A-4
A2. VERSION 3 DISTRIBUTION TAPE ORGANIZATION

Block § Record # Segment # Name

Card

Image # Block § Record # Segment # Name

Card

Image #

1597 1 008-011 PART 1 M 14365 2738 1 165-169 PART 11 M 24634

1716 4 49 data cards 15439 2812 7 405 AFD F 25306

1721 8 013-015 PART 2 M 15488 2813 8 415 BFD F 25316

1824 7 6 data cards 16414 2814 9 425 CFD F 25326

1825 4 016-034 PART 3 M 16420 2816 2 435 DFD F 25337

1944 3 6 data cards 17490 2817 5 445 EFD F 25349

1944 9 035-053 PART 4 M 17496 2819 3 455 FFD F 25365

2069 1 6 data cards 18613 2820 5 465 GFD F 25376

2069 7 054-064 PART 5 M 18619 2821 8 475 HFD F 25388

2197 2 6 data cards 19766 2825 4 406 AFB F 25420

2197 8 065-073 PART 6 M 19772 2826 5 416 BFB F 25430

2298 5 6 data cards 20678 2827 6 426 CFB F 25440

2299 2 080-092 PART 7 M 20684 2828 8 436 DFB F 25451

2409 3 6 data cards 21675 2830 1 446 EFB F 25462

2409 9 094-111 PART 8 M 21681 2831 4 456 FFB F 25474

2514 9 6 data cards 22626 2832 7 466 GFB F 25486

2515 6 140-150 PART 9 M 22632 2833 9 476 HFB F 25497

2622 8 6 data cards 23597 2836 7 407 AAQ S 25522

2623 5 160-164 PART 10 M 23603 2839 3 417 ABQ S 25545

2693 9 400 AFS F 24237 2840 7 427 ACQ S 25558

2695 1 420 BPS F 24247 2843 1 408 ADQ S 25579

2696 2 430 CPS F 24257 2847 4 418 AEQ S 25618

2697 3 440 DPS F 24267 2849 9 428 AFQ S 25641

2698 5 450 EPS F 24278 2854 5 409 BLOKD B 25682

2699 7 460 FFS F 24289 2858 5 6 data cards 25718

2701 4 401 I API F 24304 2859 2 179-200 PART 12 M 25724

2702 5 421 IBFI F 24314 299 8 3 410 SUBRQ S 26976

2703 6 431 ICFI F 24324 3009 5 412 MDQ S 27077

2704 7 441 IDFI F 24334 3010 9 419 BLAKD B 27090

2706 2 451 lEFI F 24347 3013 6 429 BLBKD B 27114

2707 4 461 IFFI F 24358 3015 5 439 BLCKD B 27131

2709 1 402 GFS F 24373 3017 7 6 data cards 27151

2710 3 422 HPS F 24384 3018 4 300-312 PART 13 M 27157

2711 6 432 IRFS F 24396 3139 3 411 MCQ S 28245

2713 4 442 JRFS F 24412 3140 6 462 FMTQ S 28257

2714 6 RFS F 24423 3144 3 57 data cards 28290

2717 8 403 IFI F 24452 3150 6 350-360 PART 14 M 28347

2719 1 423 JFI F 24463 3206 8 413 MAQQ S 28853

2720 4 433 KFI F 24475 3208 5 463 MBQQ S 28868

2722 2 443 LP I F 24491 3210 2 473 AMQQ s 28883

2723 4 453 MC T Fir L c

r 3212 5 483 BMQQ 28904

2726 6 404 AFC F 24531 3214 3 6 data cards 28920

2727 7 414 BFC F 24541 3214 8 last data card 28925

2728 8 424 CFC F 24551 3214 9 (blank filler card) 289 26

2730 1 434 DFC F 24562

2731 4 444 EFC F 24574 M = Main Program

2732 6 454 FFC F 24585 F = Function Subprogram

2734 3 - 464 HFC F 24600 S = Subroutine Subprogram

2737 4 6 data cards 24628 B = BLOCK DATA Subprogram

III-
VERSION 3 DISTRIBUTION TAPE ORGANIZATION

(Listed as if Version 1 (1596 blocks) had been deleted or forward spaced.)

Card

1iOCK. /->nl<- FQ Segment # MIN cUllc Q mo T TTIO fTCi 1 iiidy c

1

11 008-011 PART r 1 r\i\ Jt 1 M 11

1 9n A 49 LldLd Cdx Uo 1071; lU / D

QO 013-015 PART 9 M 11194 1 Z't 7 ft QdLd. L-d-xUb 90';0 99Q AH 016-034 PART M 90 A

O'f o

zo f. Qdtd cdxab Jl?1 ZD9A

9 03S-05 3 PART 4 M 31 "^9

1X A Ud L d d1 11 b A7AQ

473 7 OS4-064 rPART t\l\ 1 o^ M 49^^

601 2 ri ^1 u.dLd 1" p r*aT*Hc L-dX Vlo 601 8 065-073 \J\J %J \J 1 *J PART M ^40 8 702 A r1U.dLd Q 1" Q Q T*/-1 c L.dxU.O 703 2 080-092 W (J VJ ~ W *7 PART r rVi\ 1 7/ M '^90 813 3 6 U-dUd V^dX vXo 731 /oil1 813 9 094-111 PART 8 M 7317 /OX/

918 9 6 H 3 1" ?i C" q 919 140-150 PART 9 M 0 ^ VJ 0 1026 8 A ^ ^ ^ «j

J. u ^ / 1 60- 1 64 PART 10 M Q9 XQ

rvr o r y 0 / 0

11 A?0 H ^ u Dr o pr

1 1 no 9 A'^O *+ OkJ cr y oy 0

1 1 m % 4A0 pr

i.1 1xun?^

c c r o

cr QQ 1IH4

1 1 fl 1 IVJ o 7 H-DVJ PPQ r r o r zo

i. J-UO /I AO 1 TlArAPT1 rp QQ40

11 luO 1 nfi co *+Z X TRPT 1 D r 1 pr 110 7 o '4- J

TrPT 1 L#r 1 pr QQ AO

1 1 0 a 7 Ad 1 TOP T 1 ur 1 r QQyy 70/ u 1110 o

/ H-O X TPPT iCr 1 pr QQ 8 y y 00

1111 1111 T-VJ X TPPT 1 r r 1 pr QQQ4 yy y

11110 1 1 X 1 402 pr1 OOOQ

11114 1 1 H- t 47? nrHP^o pr 1

1 0090 u u zu

1 1 1 AVJ 432 TRPc; p 1 00 ^9 IV u oz

J.1117 X J. / A*-r 442 «jTRFS r\i o p 110048 U U H- 0 1118 (5, 452 RPS p 1 OO'^Q

1121 8 403 TPT Pr luu 1 008800

1123 1 423 JFI F 10099

1124 4 433 KFI F 10111

1126 2 443 LFI F 10127

1127 4 453 MP I F 10138

1130 6 404 AFC F 10167

1131 7 414 BFC F 10177

1132 8 424 CFC F 10187

1134 1 434 DFC F 10198

1135 4 444 EFC F 10210

1136 6 454 FFC F 10221

1138 3 464 HFC F 10236

1141 4 6 data cards 10264

Card

Block R f\C^VJX RppoT*rlVJ. II IN dJlLv? T m 0 (TO it lllld^C Tl

1X 1X 49*T X1 165-16Q X VJ 0 ~ X VJ fc/ PART 1M xu1 0970 z / u

X ^ 1 u 7 40^ APn rP 1 0Q49

1917 xZ X / Q0 41 DrU pr 1 0Qc:9

1

1 9Z 11 R0 Qzf pr 1luy0Qf^9 Dz

11 990 z zu 7 H-OO ur u pr

J.1991 Z Z X C 441; FFD p 1 OQR^

X ^ ^ «J XxJ 4^^ FFD p 1 1 001

X1 994 ^ ^ H- cD 4ft ^ nFn VJ TLJ Fr X11019 xu X ^

11 995 ^ ^o 80 47^^ HFD F X1 1XVJ094

1X ^7?Q^ ^ 4 406 AFB p 1X 1X 0^6 VJ fcJ \J

11 9 ou30 0 41

flu RPR FIT 11 lUVJU 1 066

1 9 '^1 1 z 0

A rpR Pr II I1 076 u / 0

1 9 ^^9 1 z oz a0 436 HOU npR r 11 1lu0870 /

1 ? 34 1X 446 EFB p 1X X1 098 VJ J 0 1235 4 456 FFB p 11110

1 7 36 7/ 466 GFB Fr 111^^ 11177

191 z 037/ Q 476 HPR 1 ir D pr 1 1 1 ^'^ 11100

11 9407 407 AAO c0 1 1

1 111001^8

1 94^^ 1 z 0 4.1 7 A RO c0 11181 11101

11 944

7 4.97 4Z / Aro c 111 1 1 lyQ44

1IZ^947/11 fUO Ann c

1 1 Z 1

11 z7'^0 11 *+ 41 8 AFO c0 1 1 9';4 1 1 Z04

1 9t; Q 4ZO rtr AFOv^ c II 1I 777 z / / 11 z

9c;0 80cD 40Q 4uy RT OkTl DD 11X18 1 1 0 1

IZO 1 9A 9Z

cD AD Qdi^d L-drab I 1 "iKA I I Oo 4

11 96Z.U 0 9 X1 79-700 / ^ ^ VJ VJ rPART rVIv 1 X19^ M1*1 1 1 "^60 1 1 OUVJ 1409 0 410 4XU Q 11 76 11 7^

1 4

1 *+ 1 0

C0 4141^9 c0 1^/10 1 771

1414 Qy 4.1RT A i^n RD 11 7776 z / zo 141/ 1417 AD 49Q 4zy RT RkTl D 11 77'^0 z / ou

1144 1lyQ c0 AZQ 4oy RT r kT> DLL. I\JJ RD 11 97A7 Z / D / 1421 7 6 data cards 12787

1422 4 300-312 PART 13 M 12793

1543 3 411 SMCQ S 13881

1544 6 462 FMTQ S 13893

1548 3 57 data cards 13926

1554 6 350-360 PART 14 M 13983

1610 8 413 MAQQ S 14489

1612 5 463 MBQQ S 14504

1614 2 473 AMQQ S 14519

1616 5 483 BMQQ s 14540

1618 3 6 data cards 14556

1618 8 last data card 14561

1618 9 (blank filler card) 14562

M = Main Program

F = Function Subprogram

S = Subroutine Subprogram

B = BLOCK DATA Subprogram
NBS-114A (REV. 7-73)

U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

SHEET

1. PUBLICATION OR REPORT NO.

NBS-SP399 Vol. 1

2. Gov't Accession

No.

3. Recipient's Accession No.

4. TITLE AND SUBTITLE

NBS FORTRAN TEST PROGRAMS

5. Publication Date October 1974

6. Performing Organization Code

7. AUTHOR(S)

Frances E. Holberton Elizabetii G. Parker

8. Performing Organ. Report No.

9. PERFORMING ORGANIZATION NAME AND ADDRESS

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

10. Project/Task/Work Unit No. 6401123

11. Contract/Grant No.

12. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP)

Same as 9

Library of Congress Catalog Card Number: 74-12314

13. Type of Report & Period

Covered

rlJial

14. Sponsoring Agency Code

15. SUPPLEMENTARY NOTES VolujTies 1, 2, and 3 contain the documentation, Version 1 program

listing. Version 3 program listing, respectively. The magnetic tape containing the NBS

FORTRAN Test Programs is available in 7-track BCD, 9-track ASCII or EBCDIC recording.

16. ABSTRACT (A 200-word or less factual summary of most si^ificant information. If document includes a significant

bibliograplty or literature survey, mention it here.)

The NBS FORTRAN test programs, written in Standard FORTRAN, are designed to test whether

a FORTRAN compiler accepts the forms and interpretations of the FORTRAN language as described in the American National Standard FORTRAN document X3. 9-19 66. The test programs,

coirprised of 116 test units, are structured into two versions, each containing approximately 14,500 punch card images. The test units may be used as separate executable

FORTRAN programs, or may be linked end to end with other test units, with a minimum of

user effort, to improve operating efficiency. Version 1 is structured into 115 executable FORTRAN programs, and Version 3, containing the same 116 test units, is structured

into 14 executable FORTR^ pregrams for use on large FORTRAN processors.

The test program design criteria was to

. Constrain all test pregrams to the FORTRAN Standard X3. 9-196 6.

. Reduce the effect of those areas in which the FORTRAN Standard does not prescribe

a method or solution, e.g., range, precision, size of computer, etc.

. Simplify the use of the FORTRAN test pregrams.

. Test FORTRAN language elements before they are used in support of other tests,

ffeintain an open ended system so that tests my be changed or added.

The test programs require the use of a card reader, printer and one intermediate tape

unit.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper name; separated by semicolons

)

Computer pregramming language; R)RTRA1n[: FORTRAN validation; language validation;

standard FORTRW; test pregram design.

18. AVAILABILITY |^ Unlimited

I

' For Official Distribution. Do Not Release to NTIS

[x_' Order From Sup. of Doc, U.S. Government Printing Office Washington, D.C. 20402, SD Cat. No. C13- 103 99 / V 1 .

I ! Order From National Technical Information Service (NTIS)

Springfield, Virginia 22151

19. SECURITY CLASS

(THIS REPORT)

UNCL ASSIFIED

20. SECURITY CLASS

(THIS PAGE)

UNCLASSIFIED

21. NO. OF PAGES

171

22. Price

$2.35

USCOMM-DC 29042-P74

NBS TECHNICAL PUBLICATIONS

PERIODICALS JOURNAL OF RESEARCH reports National Bureau

of Standards research and development in physics,

mathematics, and chemistry. Comprehensive scientific papers give complete details of the work, including

laboratory data, experimental procedures, and theoretical and mathematical analyses. Illustrated with photographs, drawings, and charts. Includes listings of other NBS papers as issued. , Published in two sections, available separately:

• Physics and Chemistry (Section A)

Papers of interest primarily to scientists working in these fields. This section covers a broad range of physical and chemical research, with major emphasis on

standards of physical measurement, fundamental constants, and properties of matter. Issued six times a

year. Annual subscription: Domestic, $17.00; Foreign,

$21.25. • Mathematical Sciences (Section B)

Studies and compilations designed mainly for the mathematician and theoretical physicist. Topics in mathematical statistics, theory of experiment design, numerical analysis, theoretical physics and chemistry, logical design and programming of computers and computer

systems. Short numerical tables. Issued quarterly. Annual subscription: Domestic, $9.00; Foreign, $11.25. DIMENSIONS/NBS (formerly Technical News Bulletin) —This monthly magazine is published to inform

scientists, engineers, businessmen, industry, teachers,

students, and consumers of the latest advances in science and technology, with primary emphasis on the work at NBS. DIMENSIONS/NBS highlights and reviews such

issues as energy research, fire protection, building

technology, metric conversion, pollution abatement,

health and safety, and consumer product performance.

In addition, DIMENSIONS/NBS reports the results of Bureau programs in measurement standards and techniques, properties of matter and materials, engineering standards and services, instrumentation, and automatic

data processing. Annual subscription: Domestic, $6.50; Foreign, $8.25.

NONPERIODICALS Monographs—M?jor contributions to the technical liter- ature on various subjects related to the Bureau's scientific and technical activities. Handbooks—Recommended codes of engineering and

industrial practice (including safety codes) developed

in cooperation with interested industries, professional

organizations, and regulatory bodies. Special Publications—Include proceedings of high-level national and international conferences sponsored by

NBS, precision measurement and calibration volumes,

NBS annual reports, and other special publications

appropriate to this grouping such as wall charts and

bibliographies.

Applied Mathematics Series—Mathematical tables, manuals, and studies of special interest to physicists,

engineers, chemists, biologists, mathematicians, computer programmers, and others engaged in scientific and technical work.

National Standard Reference Data Series—Provides

quantitative data on the physical and chemical properties of materials, compiled from the world's literature and critically evaluated. Developed under a world-wide program coordinated by NBS. Program under authority

of National Standard Data Act (Public Law 90-396). See also Section 1.2.3.

Building Science Series—Disseminates technical infor- mation developed at the Bureau on building materials, components, systems, and whole structures. The series presents research results, test methods, and performance criteria related to the structural and environmental functions and the durability and safety characteristics of building elements and systems.

Technical Notes—Studies or reports which are complete

in themselves but restrictive in their treatment of a

subject. Analogous to monographs but not so comprehensive in scope or definitive in treatment of the subject area. Often serve as a vehicle for final reports of work performed at NBS under the sponsorship of other government agencies.

Voluntary Product Standards—Developed under pro- cedures published by the Department of Commerce in Part 10, Title 15, of the Code of Federal Regulations. The purpose of the standards is to establish nationally

recognized requirements for products, and to provide

all concerned interests with a basis for common understanding of the characteristics of the products. The

National Bureau of Standards administers the Voluntary Product Standards program as a supplement to the activities of the private sector standardizing

organizations. Federal Information Processing Standards Publications (FIPS PUBS)—Publications in this series collectively constitute the Federal Information Processing Standards Register. The purpose of the Register is to serve

as the official source of information in the Federal Gov- ernment regarding standards issued by NBS pursuant

to the Federal Property and Administrative Services Act of 1949 as amended. Public Law 89-306 (79 Stat. 1127), and as implemented by Executive Order 11717

(38 FR 12315, dated May 11, 1973) and Part 6 of Title 15 CFR (Code of Federal Regulations). FIPS PUBS

will include approved Federal information processing standards information of general interest, and a complete index of relevant standards publications. Consumer Information Series—Practical information, based on NBS research and experience, covering areas

of interest to the consumer. Easily understandable language and illustrations provide useful background

knowledge for shopping in today's technological

marketplace.

NBS Interagency Reports—A special series of interim

or final reports on work performed by NBS for outside sponsors (both government and non-government). In

general, initial distribution is handled by the sponsor;

public distribution is by the National Technical Infor- mation Service (Springfield, Va. 22151) in paper copy

or microfiche form. Order NBS publications (except Bibliographic Subscription Services) fi-om: Superintendent of Documents, Government Printing Office, Washington, D.C. 20402. BIBLIOGRAPHIC SUBSCRIPTION SERVICES

The following current-awareness and literature-survey

bibliographies are issued periodically by the Bureau:

Cryogenic Data Center Current Awareness Service

(Publications and Reports of Interest in Cryogenics).

A literature survey issued weekly. Annual subscription: Domestic, $20.00; foreign, $25.00. Liquefied Natural Gas. A literature survey issued quarterly. Annual subscription: $20.00. Superconducting Devices and Materials. A literature survey issued quarterly. Annual subscription: $20.00. Send subscription orders and remittances for the preceding bibliographic services to the U.S. Department

of Commerce, National Technical Information Service, Springfield, Va. 22151. Electromagnetic Metrology Current Awareness Service (Abstracts of Selected Articles on Measurement

Techniques and Standards of Electromagnetic Quantities from D-C to Millimeter-Wave Frequencies).

Issued monthly. Annual subscription: $100.00 (Special rates for multi-subscriptions). Send subscription order and remittance to the Electromagnetic Metrol- ogy Information Center, Electromagnetics Division, National Bureau of Standards, Boulder, Colo. 80302.
1 1

V2f

U.S. DEPARTMENT OF COMMERCE

National Bureau of Standards

Washington. D.C. 20234

OFFICIAL BUSINESS

Penalty for Private Use. $300

POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE COM-2 1 5
NBS SPECIAL PUBLICATION 399

Volume 2

U.S. DEPARTMENT OF COMMERCE / National Bureau of Standards

NBS FORTRAN Test Programs

Volume 2-Listings for

Version 1
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards' was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology

and facilitate their effective application for public benefit. To this end, the Bureau conducts

research and provides: (I) a basis for the Nation's physical measurement system, (2) scientific and technological services for industry and government, (3 ) a technical basis for equity in trade, and (4) technical services to promote public safety. The Bureau consists of the Institute for Basic Standards, the Institute for Materials Research, the Institute for Applied Technology,

the Institute for Computer Sciences and Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United

States of a complete and consistent system of physical measurement; coordinates that system

with measurement systems of other nations; and furnishes essential services leading to accurate and uniform physical measurements throughout the Nation's scientific community, industry, and commerce. The Institute consists of a Center for Radiation Research, an Office of Measurement Services and the following divisions: Applied Mathematics — Electricity — Mechanics — Heat — Optical Physics — Nuclear

Sciences — Applied Radiation " — Quantum Electronics " — Electromagnetics ' — Time

and Frequency ' — Laboratory Astrophysics " — Cryogenics

THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to improved methods of measurement, standards, and data on the properties of well-characterized

materials needed by industry, commerce, educational institutions, and Government; provides

advisory and research services to other Government agencies; and develops, produces, and

distributes standard reference materials. The Institute consists of the Office of Standard

Reference Materials and the following divisions: Analytical Chemistry — Polymers — Metallurgy — Inorganic Materials — Reactor

Radiation — Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to promote

the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations leading to the development of

technological standards (including mandatory safety standards), codes and methods of test; and provides technical advice and services to Government agencies upon request. The Institute consists of a Center for Building Technology and the following divisions and offices: Engineering and Product Standards — Weights and Measures — Invention and Innovation — Product Evaluation Technology — Electronic Technology — Technical Analysis — Measurement Engineering — Structures, Materials, and Life Safety ' — Building

Environment * — Technical Evaluation and Application ' — Fire Technology.

THE INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research and provides technical services designed to aid Government agencies in improving cost effec- tiveness in the conduct of their programs through the selection, acquisition, and effective

utilization of automatic data processing equipment; and serves as the principal focus within

the executive branch for the development of Federal standards for automatic data processing

equipment, techniques, and computer languages. The Institute consists of the following

divisions: Computer Services — Systems and Software — Computer Systems Engineering — Information Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination and

accessibility of scientific information generated within NBS and other agencies of the Federal Government; promotes the development of the National Standard Reference Data System and

a system of information analysis centers dealing with the broader aspects of the National Measurement System; provides appropriate services to ensure that the NBS staff has optimum

accessibility to the scientific information of the world. The Office consists of the following

organizational units: Office of Standard Reference Data — Ofl^ce of Information Activities — Office of Technical

Publications — Library — Office of International Relations.

' Headquarters and Laboratories at Gaithersburg, Washington, D C. 20234.

^ Part of the Center for Radiation Research.

1 l ocated at Boulder, Colorado 80302.

« Part of the Center for Building Technology.

Maryland, unless otherwise noted; mailing address
NBS FORTRAN Test Programs

Volume 2-Listings for Version 1

Frances E. Holberton and

Elizabeth G. Parker

Institute for Computer Sciences and Technology

National Bureau of Standards

Washington, D.C. 20234

U.S. DEPARTMENT OF COMMERCE, Frederick B. Dent, Secrefary

NATIONAL BUREAU OF STANDARDS, Richard W. Roberts, Director

Issued October 1974
Library of Congress Cataloging in Publication Data

Holberton, Frances E

NBS FORTRAN test programs.

National Bureau of Standards Special Publications 399. CONTENTS: V. 1. Documentation for versions 1 and 3. —V. 2. Listings for version 1.—V. 3. Listings for version 3. Supt. of Docs. No.: C 13.10:399.

1. Computer programs—Testing. 2. FORTRAN (Computer

program language) I. Parker, Elizabeth G., joint author. IL

United States. National Bureau of Standards. 111. Title. IV. Series: United States. National Bureau of Standards. Special Publication

399. OC100.U57 no. 399 [0A76.6] 389'.08s [001.6'425] 74-12314

National Bureau of Standards Special Publication 399

Nat. Bur. Stand. (U.S.), Spec. Publ. 399,221 pages (Oct. 1974) CODEN: XNBSAV

U.S. GOVERNMENT PRINTING OFFICE

WASHINGTON: 1974

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C. 20402 (Order by SD Catalog No. C13.10:399/V.2). Price S2. 85
INTRODUCTION

This document , Volume 2 of three volumes , contains the program listings

and supporting input data for the NBS FORTRAN Test Programs, Version 1,

developed by the Institute for Computer Sciences and Technology, National

Bureau of Standards. The test programs are written in ASA Standard

FORTRAN and test the language elements described in the ASA Standard

FORTRAN docunent X3. 9-1966.

The NBS FORTRAN Test Programs, Version 1, contain 116 test units, each

structured as an executable FORTRAN program. Test units numbered 008,

009 , 310 , and 312 contain input data which is listed following the

respective test unit.

This listing is in the order described in Volume 1 Section III Distribution Tape Organization.

Volume 1, Section I describes the system design, the programming techniques and conventions used in the program development and should enable

the user to extend, alter or reorganize the test programs.

Volume 1, Section II defines the organization and operating procedure for

performing the tests and contains a set of representative results obtained from actual running of the test pipograms on several FORTRAN

processors

.

Volume l,Section III describes the order and location of each test unit

and data as recorded on magnetic tape for distribution.

Volume 2 contains the prxDgram listings for the NBS FORTRAN Test Programs, Version 1.

Volume 3 contains the program listings for the NBS FORTRAN Test Programs, Version 3.

iii
Listings of NBS FORTRAN Test Programs, Version 1

Table of Contents

Page

000 Directory of Test Programs 1

008 FMTRW Formatted Input/Output r0

6 Identification Cards and 40 Data Cards 13

009 AFRMT A-Conversion 14

3 Data Cards 16

010 DATAz DATA btatement Use 1 c lb

003 - DATAl Test Format of Data Statement Id

A A O /^"KT AASGN Real and Integer Arith Assignmt Stmnts 1 o 1(5

DASGN Simple D.P, Assignment Statements ooIL

CASGN Simple Complex Assignment Statements oo/o

(J±D LAbGN Logical Assignment Statements 35

m 7 INTRL Arithmetic Assignment Statements 0"7 51

n on UzU UGOTO Unconditional GO TO Statements 39

miUzi AGOTO GO TO Assignment Statements 40

n o 0 uzz CGOTO Computed GO TO Statements A 1 U JL) ARBAD Basic Addition 45

031 ARFAD Double Precision Addition 46

032 ARBSB Basic Subtraction 47

U J J ARFSB Double Precision Subtraction /. Q 4o

AO/ 034 ARBAS Basic Addition and Subtraction 49

035 ARFAS All".* li^l. /** T~v TT "1 Addition and Subtraction of D.P. Values 50

0 Jo ARBMI Multiplication of Integer Values 51

037 ARBI'IR Multiplication of Real Values 52

038 ARFMD Multiplication of D.P. Values 53

039 ARBDV Division of Integer and Real Values 54

040 ARFDV TX • • » TN T^ TT "1 Division of D.P. Values C C 041 ARBEX Exponentiation of Integer and Real Values 56

04z ARFEX Exponentiation of D.P. Values 58

043 ARBHI Hierarchy of Operators and Parentheses 59

050 SBB67 Subscripts of Integer, Real Arrays v, k 61

A 1 U_)± SBB45 Subscripts of Int., Real Arrays v-Hc, v-k 63

SBB13 Subscripts of Int., Real Arrays c*v, c*v+-k

c*v-k 64

A C O 053 SBF17 Subscripts of D.P. Arrays v, k, c*v, c*v+k.

c*v-k, v+k, v-k 66

054 SIMIF Arith IF, Logical IF followed by GO TO 67

055 IFABS Intrinsic Functions ABS, lABS £ o DO

056 IFFLT Intrinsic Function FLOAT 69

057 IFFIX Intrinsic Function IFIX 69

058 IFSGN Intrinsic Functions SIGN, ISIGN /yj

059 IFDAB Intrinsic Function DABS 72

060 IFTRN Intrinsic Functions AINT, INT, IDINT 73

061 IFMOD Intrinsic Functions AMOD, MOD 74

062 IFMAX Intr Funct AMAXO, AMAXl, MAXO, MAXl, DMAXl 75

063 IFMIN Intr Funct AMINO, AMINl, MINO, MINI, DMINl 79

064 IFDSG Intrinsic Function DSIGN 82

065 IFDIM Intrinsic Functions DIM, IDIM 83

066 IFSGL Intrinsic Function SNGL 84

067 IFREL Intrinsic Function REAL 85

iv
Listings of NBS FORTRAN Test Programs, Version 1

Table of Contents

rage

yjoo J. r XrHj xnunn&xc runcLXon axhaij 87o / uoy irDrSL Intrinsic Function DBLE oy

U/U ifCrA intrxnsxc runctxon L-jyirLA onyu

U/l IFCJCj intrxnsxc runctxon lujnjij onyu

U/Z ir Dilb Integer and Real Intrinsic Functions yx

Lr r no xnt J Keax ana u,c, xntrxnsxc runcLXons

\JO\J JJdQXC o o n T^vt" XjXtelTlaX Q >— 1^ o T T7i rUnCtXOn T /^T^ TT Y'P ijAir £>d.sj.c nxtcinax runcuxon ullax Q7

Ddsxc CjXtemax runcuxon L-ijAir y o Dasxc EjXLcxnax runcuxon ajjUvj

uof Dasxc ijXtemax runcuxon ulikjkj 1 nn

UOJ liasxc lixtemax runcuxon uliULj 1J. mv^x UOO L.UUJVJ Dasxc nxtemax runctxon axiULjXu

Uo/ Dasxc Jixtemai runctxon uluoxu

Uoo C TTJTTC Basic External Function SIN xut 1 n4

uoy TMD Ur ColIN T M Dasxc HiXternax runctxon jjoxin 1XUDHA

L.l5 1L.U Dasxc EiXtemax runctxons uoxin, xuin?/ Dcisxc rixuerndx runcuion VjVjo XVJO 1 08

Dasxc UiXuemax runcuxon uouo 1 HQ

i AJNUn basxc lixtemai runctxon iAWri XXU Tin

uy D rJasxc rijXtemax runctxon bi^Ki XXX 111

uyt) ncADA Dasxc Jixtemax runctxon ubi^Ki 119 xxz

no "7 uy / r'C AoA Dasxc nxtemax runctxon bbi^Ki 1

1

XX J uyo Basic External Function ATAN XX1 1 At uyy Basic External Function DATAN 1

1

XX J xuu 1 r\r\ A ATPO Basic External Function ATAN2 XX1 1 Ao 101 UAiNZ uasxc nxtemai runctxon uaiainz XX117/ 102 mufAT^ A Basic External Function DMOD XXo lift

103 A "D C A Dasxc hxtemai runctxon LAbb iio lift

110 "DC L*I'C Statement Functions — Integer and Real iZU 1 OA

005 -- uoCUr ouauement runcuxon uerxnxuxon X1 zu9n

111 r or i o Statement Funct — D.P., Complex, Logical xzx

006 " rorur OLaueTnenL runcuxon JjenniLions 1 99

140 Addition d.nd Sub tract ion o f Comp lex X^H 1 9A

141 PPYMTT L.Jr ArlU Multiplication of Complex Numbers 19"^ X Z J 142 PPYDV v-»jr Ajj V UXVJ_oiOIl UJ_ \_»OIIipXfc;X iNUXUDcITo X1 z,97/ 143 L> It AJiA rjxponenuxauxon or L.ompxex iNumDers xzo 1 9R

144 PPYAP Arithmetic Operations on Complex X-3U 1 "^n 145 PUT? A'n Add and Subtract Complex and Real Numbers X jX

146 Multiply Complex by Real Numbers 1 "^9 X jZ

147 CREDV Divide Complex by Real and the Reverse X J J

148 oomDxncu upc irau ions on L.ompxex ana xvccii X JH

149 DxanrCb xn^ uonu* ox DLauemenu no nax Xixnes X J J 150 opccxax L^iidxacuc ITS loj. Lion Lxnuauxons X JD

160 rvCdX i-j2\. Lc i. 11 cLX r tlllL. l. XLIllo X JO

400 •LVC-dX r\L guuicll L 1 "^Q X J 7 420 BFS T?p^l Lv^aJ- nAT'cynrnfint* i. ^uuic 11 u oG 1 "^Q j-^y

430 CFS Integer Argument 139

440 DFS Integer Arguments 139

450 EFS Array Name As Argument 139

460 FES Different Types of Arguments 140

V
Listings of NBS FORTRAN Test Programs, Version 1

Table of Contents

Page

161 BIFCP Integer External Functions 140

401 lAFI Real Argument 141

421 IBFI Real Arguments 141

4 Ji iCr' 1 Integer Argument 141

Integer Arguments 141

43l ihFi Array Name as Argument 142

TTJITT Different Types of Arguments 1 /. o loZ Real External Functions 14Z

Gi^ b D.P. Argument 144

rli:' b Complex Arguments

/. o o Logical Argument 144

442 JRFS External Procedure 145

/CO 432 RFS Different Types of Arguments 145

163 FIFCP Integer External Functions 145

/. m Lr i D.P. Argument 147

^2 J

TT7T J r 1 Complex Arguments 14/

/. T T 4 J J IVT 1 Logical Argument 1 AT ±4/

/. /. o 44 J LFI External Procedure 1 A Q 14o

Acq 4o J MFI Different Types of Arguments T A O 14o

Complex External Functions 1 AQ

/. n/. Real Argument ±5U

7 1/ 414 BFC Integer Argument 150

/. o / 424 CFG Array Name as Argument 130

434 DFC D.P. Argument TCI 151

/ / / 444 EFC Complex Argument 151

/. c/. Logical Argument 151

464 HFC Different Types of Arguments 151

165 DPFCP Double Precision External Functions 152

/. n c AFD Real Argument ICO 153

/. T C 41b BFD Integer Argument 1 C A 154

425 CFD D.P. Arguments 154

/. 1 c 435 uru Complex Argument 1 CA 154

/ / c 445 EFD Logical Argument 154

/ c c 455 FFD External Procedure 154

/. ^ c Array Name as Argument ICC 155

4 /_) HFD Different Types of Arguments ICC 155

io6 BFCCP Logical External Functions fee 155

406 AFB Real Argument 157

BFB Integer Argument 1 C "7 157

/.OA CrB D.P. Argument 1 CQ

/i Ur D Logical Argument 1 CQ

AAA Complex Argument i-JO

A c; A H JO r r D Array Name as Argument 1 CQ

AAA (jr D External Procedure 1 CQ i.JO H / D nr xS Different Types of Arguments 1 CQ

T A "7 16 / SBRTN Subroutine Subprogram 1 CQ 159

W/.r\~iJ

A A AAQ Integer, Real Variables, Array Elements 1 An

417 ABQ Array Elements 161

427 ACQ No Argument List 161

168 FSBRT Subroutine Subprogram 161

408 ADQ Different Types of Arguments 163

418 AEQ Array Names and Integer Arguments 164

428 AFQ No Argument List 164

vi
Listings of NBS FORTRAN Test Programs, Version 1

Table of Contents

Page

169 BLKDT BLOCK DATA Test 165

409 BLOKD BLOCK DATA Subprogram 166

179 BLKDA BLOCK DATA Test ' 166

419 BLAKD BLOCK DATA Subprogram 168

T)T T3T7'T\ dLUCK UAiA bubprogram loo

xJLLJsJJ dLULK. UAiA buDprogram

loU TTXT M'lJT T Unrormattea WKiib and KJiAJj loo

1 Q O DACUr DALKorACli iape

lyu DOiRM DU Loops — iermlnai statements 1/1

lyi DOLMT DO Loops - Parameters as Variable Names LI 6

192 DONSC DO Loops - Completely Nested Nest 174

193 iXJNbi DU Loops — incomplete DU, Lxit by GU iU ±11

194 DONSX T\/A T _ -1—1 . J J T» DO Loops - Extended Range 1 TO 178

195 DU Loops — Nested Nest

196 DONIO DO Loops - I/O Terminal Statements 181

197 DU Loops — i/U, btatmt, rt., intr rt., CALL

005 -- BSFDF Statement Functions 1 o o 182

412 MDQ Subroutine Subprogram to/ 184

200 SUBRl Subroutine - Operations Done at Sub Level •IOC 185

410 SUBRQ Subroutine Subprogram - No Arg. Lxst toe 185

300 LOGIF Logical IF Statements t 0"7 187

411 SMCQ Subroutine Subprogram 191

301 BARIF Arithmetic IF Statements - Integer, Real 191

302 FARIF Arithmetic IF Statements - D.P. t 194

310 lOFMT Formatted READ/WRITE - Additional Features 195

38 Data Cards 200

312 RDFMT Formats in Arrays 200

462 FMTQ Subroutine Subprogram , 203

13 Data Cards 204

350 MISC5 Specifications for Program Form 204

351 "CTTKTKXV rUNMA Basic External Functions - Trig Formulae 'inc. ZUo

352 NAMES Names Resemble FORTRAN Verbs, Functions 207

413 MAQQ Subroutine (Intrinsic Function Names 208

463 MBQQ Subroutine used as Variable Names in 208

473 AMQQ Subroutine some Subrts. and as 209

483 BMQQ Subroutine Functions in others) 209

360 SPEC2 COMMON, DIMENSION, EQUIVALENCE 209

vii

Cttttt«tttttttttt**tt*«t*t****t*«tt«ttt«*ttt«**tt***ttttttttttttttttt*ttP0000010

c» P0000020

c» ANSI FORTRAN (X3. 9-1966) TEST PROGRAMS P0000030

c* P0000040

c* PREPARED BY THE NATIONAL BUREAU OF STANDARDS VERSION 1 P0000050

c» P0000060

c» JUNE 1974 P0000070

c« P0000080

c« 116 EXECUTABLE TEST PROGRAMS P0000090

c* P00001 00

c* THE FOLLOWING NAMES AND SYMBOLS SHOULD AGREE P0000 1 1 0 c* P00001 20

c» EQUAL = PLUS + LEFT PARENTHESIS ( RIGHT PARENTHESIS ) P0000130

c* POOOOUO

c» CODES USED TO DESCRIBE THE INFORMATION IN THE TABLE P0000 1 5 0 c* POOOOUO

c* M MAIN PROGRAM P00001 70

c* F EXTERNAL FUNCTION POOOOUO

c* S SUBROUTINE P0000190

> B BLOCK DATA P0000200

> P0000210

> I INPUT REQUIRED P0000220

c» P0000230

> NO. OF PAGES OF OUTPUT P0000240

> P0000250

I* X INTERMEDIATE TAPE REQUIRED P0000260

I* P0000270

I* C BLANK COMMON P00002&0

c* / SPECIAL BLANK COMMON P0000290

I* P0000300

c* D DATA STATEMENTS DEFINED P0000310

> P0000320

NO. OF CARDS PER SEGMENT P0000330

P0000340

C* DIRECTORY OF TEST PROGRAMS - 342P0000350

P0000360

C* FMTRW - 008 FORMATTED INPUT/OUTPUT M I 8 - - - 529P0000370

6 SYSTEM IDENTIFICATION CARDS 6P0000380

40 DATA CARDS - 40P0000390

P0000400

C« AFRMT - 009 A-CONVERSION M I 1 - - - 115P0000410

3 DATA CARDS 3P0000420

P0000430

C* 0ATA2 - 010 DATA STATEMENT USE M - 3 - - - 74P0000440

C* DATA1 - 003 TEST FORMAT OF DATA STATEMENT M D 84P0000450

P0000460

C* AASGN - Oil REAL AND INTEGER ARITH ASSIGNMT. STMNTS. M - 3 - - - 268P0000470

P0000480

C* DASGN - 013 SIMPLE D.P. ASSIGNMENT STATEMENTS M - 8 - - - 420P0000490

P0000500

C* CASGN - 015 SIMPLE COMPLEX ASSIGNMENT STATEMENTS M - 9 - - - 469P0000510

P0000520

C* LASGN - 016 LOGICAL ASSIGNMENT STATEMENTS M - 1 - - - 106P0000530

P0000540

C* INTRL - 017 ARITHMETIC ASSIGNMENT STATEMENTS M - 4 - - - 185P0000550

P0000560

C* UGOTO - 020 UNCONDITIONAL GO TO STATEMENTS M - 69P0000570

P0000580

C* AGOTO - 021 GO TO ASSIGNMENT STATEMENTS M - 149P0000590

P0000600

C* CGOTO - 022 COMPUTED GO TO STATEMENTS M - 146P0000610

P0000620

C* ARBAD - 030 BASIC ADDITION M - 115P0000630

P0000640

C* ARFAD - 031 DOUBLE PRECISION ADDITION M - 57P0000650

P0000660

C* ARBSB - 032 BASIC SUBTRACTION M - 67P0000670

P0000680

NBS FORTRAN Test Programs Version 1 1
L * C»

A D C C D ARrbo A 7 7 0 5 3 AAMDI C DDCPTCTAU OIIDTDAPTTAM UUUdLc pRcLIblUN bUDlRALIlUN n

4

1 - - - 7ZP0000o90

P0000700

L * C*

A D 0 A C "^^ 7 A 0 3 H PACTP oAblL AUUIIIUN AmiTinU AND AWn CIIPTOAPTinU buDlRALIlUN u

n

- 4

1 - - - /9P0000/10

P0000720

L * C»

A D C A C AKrAb " A 7 9 U 3 J AUUlllUN AOnTTTAM AMn CIIDTDAPTTAM AC H D \/AlltCC AND bUoiRALIlUlM Ur U.r. VALUbb M

n

- 4

1 - - -

L AHAAAATTA 60P0000/30

P0000740

C * c«

A D D M T AR B n I

• A 7 A U 3 0

Mill TTDI TPATTAM AC TMTCPCO \/Al IICC n U L 1 1 r L I L A 1 1 U N UP INIbutR VALUtb u 4

1 - Z.inAAAA*?CA - - 66P0000750

P0000760

C * c»

A D D M D AR D H R

A 7 7

U 3 / MIIITTOITPATTAM AC DCAI WAIIICC nu L 1 1 r L 1 LA 1 1 U N UP RcAL VALUtb MPI 4

1 - - -

Z. / nAAAA^TA 64P000077Q

P0000780

L * c*

A D C M n AR r n UA 7 fi 0 3 6 MIIITTDITPATTAM AC A D \yAIIICC nUL 1 1 pL i LA 1 1 UN UP U.r. VALUtb M 4

1 - -

^ A nAAAATAA - 71P0000790

P0000800

C*

ARdUV A D D n \/ A 7 0 U 3 T UlVlbiUN UP INltutK AND KtAL VALUtb M _ n

4

1 /SrOOOOalO

P0000820

C* AR P U V

. AAA 0 •» U niuicinM UlVldlUn ncUP nu.r.o \/amicc VMLUto M - n

4

1 oorUuUUoju

P0000840

L * c* ARA D D C Y 0 t A

A Z 1 CYDAMCWTTATinm tArUNtnllAllUri ACUP THITCPCD INItbtR nfiU AM A DCAI RtAL UAMICC VALUtb Mn

4

I QADr»nAr\QPA

P0000860

L * C*

A D C C V AR PEA A Z 7 CVDAMCMTTATTAW AC A D \/AIMCC t aK U N t N 1 1 A 1 1 U N Ur U.r. VALUtb n

4

1 - /4P00L)08/0

P0000880

L * c* ARA D D U T 0 n 1

. A A 7 0 3 HIERARCHY OF OPERATORS AND PARENTHESES M _ n

4

1 _ 177DAA(^A0QA l//rUUUU6VU

P0000900

r * Lc*

C Q D A 7 . b O D 0 ^

. A ^ A U J 0 SUBSCRIPTS OF INTEGER, REAL ARRAYS V, K M - n

4

1 /VKUUUUVIU

P0000920

L * C»

b t] D H J

". A ? 1 SUBSCRIPTS OF INT. .REAL ARRAYS V+K. V-K M _ n

4

1 _ - ft7DAri(^/^07A 6/rUUUUV3U

P0000940

t • c*

b 0 D 1 J A ^ 7 SUBSCRIPTS OF INT. , REAL ARRAYS C* V,

C»V+K. C*V-K

n

4

1 P0000960

L * c* SBF1 7 • 053 SUBSCRIPTS OF D.P. ARRAYS V, K, C»V. M

- 1 DAAAAQ7A rUUUUV/U

- - - 79P0000980

L * c*

C*V+K. C*V-K. V+K. V-K rUUUUVVU

POOOl 000

L * C*

C T M T C b 1 n 1 p• A <; A ARITH. IF. LOGICAL IF FOLLOWED BY GO TO M _ n

4

1 //rUUUiUlU

P0001020

r * C*T C A P C .

1 P Ad b

. A ? ? U J J INTRINSIC FUNCTIONS ABS, lABS M — n

4

1 . - - AADAAA1A7A OHrUUUIUjU

POOOl 040

C*

1 P P L 1 A ? A U J 0 INTRINSIC FUNCTION FLOAT M -

PI 41 - hVKUUUIUjU

POOOl 060

L * Ct

T C C I V -

1 P P 1 A

"• A 7 0 3/ INTRINSIC FUNCTION IFIX M _ 4

1 _ _ _ Q0DAAA1A7A

POOOl 080

L t C*

T c e P M . 1 P b o N

A ^ 8 U J S INTRINSIC FUNCTIONS SIGN, ISIGN n

4

1 OtrUUUIUTU

POOOl 100

L t Ct

T c n A P 1 p

U

Ad ' A ? Q 0 J 7 INTRINSI C FUNCTION DABS M _ n

- 4

1 ~ ODrUUUillU

POOOl 120

L t C*

1 C T P M

I p 1 R N AAA 0 0 0 INTRINSIC FUNCTIONS AINT, INT. IDINT 4

1 _~ _"

_ 1A7DAn(^117A lU/rUUUIliU

POOOl 1 40

1

1

c*

T c M n n A A 1 • 0 0 1 INTRINSI

C

FUNCTIONS AHOD. MOO M _ n

- 4

1 POOOl 160

L t c*

T C M A V .

I P PIAa " A A 7 INTR. FUNCT. AMAXO . AMAX1 , HAXO , HAX1 . DMAX1 M _ n C

_ _ _ 7/8DAAA117A

POOOl 180

L t Ct

T C M T M 1 pn 1 NA A 7

0 0 3 INTR. FUNCT. AM I NO . AM I N 1 . H I NO . M I N 1 . DM I N 1 M _ n

9A_ _ _ ^^crnAAAiiOA

P0001200

L t C»

T c n c r 1 p Ubo A A / 0 0 H INTRINSIC FUNCTION DSIGN M _ n

4

1 — - _ ^SDAAA171A DSrUUUI^IU

P0001220

Ct

I p u I n

A A ? OO J INTRINSI C FUNCTIONS DIM. IDIM M _ 4

1 - - _ A0DAAA177A

P0001240

L * C*

t C C P 1 1 PbuL ' AAA INTRINSI C FUNCTION SNGL PI - 4

1 oUrUUUI^jU

P0001260

1.

1

Ct

T C P C 1 1 PRC L'.' A A 7 0 0/ INTRINSIC FUNCTION REAL M — PI 4

1 _ _ _ 1A7DAAA177A

P0001280

L t CtI r I n(] A A ft * 0 6 8 INTRINSI C FUNCTION AIMAG U — n

- 4

1 _ 17QDAAA170A

P0001300

r1 *

1

Ct

T r r\ p 1 " A A O 007 INTRINSIC FUNCTION DBLE PI ~ 4

1 _ _ _ ';7DAAA171A

P0001320

L t Ct

T c r D V 1 P Lr A

• A 7 A 0/0 INTRINSI C FUNCTION CMPLX n- 4

1 _- A1DAAA177A OlrUUU133U

P0001340

1

1

Ct

T c r 1 p

1 Pt JQ • A 7 4 0/1 INTRINSIC FUNCTION CONJG u

n

- 4

1 - - - OOrUUUIjjU

POOOl 360

2

1 NBS FORTRAN Test Programs Version 1
r * L « irons n 7 7 INTEGER AND REAL INTRINSIC FUNCTIONS Mn 1 - . - i?qpftnni77ft

Pr ftV 0V 0V 11 J X0 0V

I p p n a

n 7 T TNT Dr\ pC AA 1L AANDPi U D.P. INTRINSIC FUNCTIONS n

- ixiPftnni79ft l0 1rV/VVlJ7V

r y V w 1 H V V C A r U n n^ X0 0V RD AA^i3 T

1 rL pyTPRNAI Fr IIu Nll TTu 1 Ii nu N11 FXP c A r 1

1

• 1 - -

1 OVrvvV IH IV

Pr ft\l ft\J flU 11 U?(S n c V npypn - U u A r U 0 1 RO AA«!3 1

I rw pyTPRNAI Fr IIu N11 TTu 1 T1 nu N11 Dpyp u u A r M -

1

1

• 11 - uorvvw itjv

Pr ftU 0V ftU 1I 4^0 t *t V L C A r U n\J X0 7u RD AA«!3 T1 rU pyTPRNAI u A 1 C r\ i1 A L FUN r u 11 PTu 1 I

1 DNu 11 rpyp w c A r M -

1

1

. 7 _ . J 70rvvw I'tJV/ Pr ftV ftv fty 11 LhO t O V r L U u 1 M U 0 J RD AA^3 T

1 PL pyTPRNAI C A 1 c r\ ll A L FUN r u TTL 1 .1I DNu If AAlL flR U VJ M1

1

• 11 - . _ s7Pftnnii7ft

Pftftftl r \J \J V I LUCl *t 0 V U r L U U flV Jl0 ^H RD AA<?3 T1 rL pyTPRNAI C A > C r\ li A L Fr IIu Nll TTL 1 I1 nu N11 nu 1u nRu u M -

1

1

11 - - h7P0 o/rvuv00 ^i*t7v UQC\

r

»

Pftftftl r \J \J \J 1 SJ ftV 0V

r • p Y 1 n R -

L A L U U n s U 0 J RD AA<;3 I r 1 L pyTPRNAI c A 1 c rv ll A L FIIN r u 11 PTu 1 1

I ONu ll PI nr; M • n 7 - - - IftAPftftftlSlft

Pftftftl r u U U S 7 ft 1 J c U pni nr; -

L U L U U V 0 0 RD AA <;3 I

1 PL PYTPRNAI C A 1 c r\ ll A L PUN r u 11 PTL 1 i

I ONu ll AA 1L nU f;u 1 ft

1 V M -1

1

1 - -. _ 'iftPnnnis'^ft J \J r \J \J \J 1 J J \J r

«

Pftftftl Sift

r « n p 1 n R - U L L U u V 0 / RD AA 3 I

1 PL pyTPRNAI C A 1 C rV 11 A L

C 1 1 N P T T n N r U ll L 1 1 U ll n 1 n R 1 ft U L U U I u ri • 1 - -

1 - ^i^PftftftlSSft

r « U " Pftftftl S ^ ft C T M 1 1 Q - 0 1 n U 3

ft Jl » U o oR A Q I P O A 3 1 L P YTP B M A 1 C A 1 C r\ l\l A L

F II M P T I n M r U ll L 1 1 U IM <; I M 3 1 n Mn

- 1 - .

1 - - XIPftftftlSTft

Pftftftl S X ft r \j V \J 1 joy

n D Q T N - U r a i N U O 7 R A Q I P D A 3 1 U pyTPRNAI C2 A 1 c n ll A u

F II N P T I n M r U ll L 1 1 U ll u 3 1 ra Mri • 1 - 1 - - X7Pftftft1S0ft

P ft ft ft 1 ^ ft ft r \J V \J 1 U U U PC I pn _ ft 0 n \J 7 \J RD AA 3 I1 PL pyTPRNAI C A 1 C r\ 11 A L

C 1 1 M P T ! n M <; PQIN L3ini< PPflQ ULU3 ri

- 1 - -

1 - - ASPftftftlAin

PftftniA7n r \J \J yj \ \J L \J P * p n <? M Q -

L u 3 ra 3

ft 0 1 R A Q I r u A 3 i L pyTPRNAI C A 1 C r\ ll A L FUN r u 11 PTL 1 Ilull HN pL nU 3 Mn

- 1 - -

1 - JtPPftftftlAXft

P t PftftftlAift r u U U 1 0 H V

P t U r C U 3 ftV 0y 7L RD AA 3 I

1 PL pyTPRNAI C A 1 C r\ 11 A L Fr IIu N11 PTL 1 T

1 nu Ni« r> p n <; U U U 3 1

1

- 1 - .

1 . _ JllPftftftlASft

P * PftftftlAAft r V y V 1 U O u

P * T A N I-I - 1 n n u nft 0 A U 7 H RD AA <;3 T

1 PL pyTPRNAI C A 1 C r\ 11 A L Fr IIu llN PTL 1 Ilull n N TANH 1 A ll n Mn

- 1 - .

-

1

. _ ^7Pftftft1A7ft

p ft ft ft r

1 A e ft \J \J \J 1 O 0 U

p * e n D n T _ 3 U n U 1 ftV Q7 SJ RD AA<?3 1 rU pyTP C A R N A 1

1 C n (1 A u Fr IIu N11 PTL 1 I1 nu N11 3 nu Rr\ T1 Mri - 1 - -1 . _ SSPftftftlAQft

P t Pftftftl 7 ft ft P * n c n R n - U 3 U n U V 7 O Ru AA 3 I

1 PU pyTPRNAI C A 1 C r\ 11 A L Fr IIU Nll PTL 1 1

I nU Nll nu Q3 nu Rr\ T1 n 1 - •

1 - A'^PftftftWIft

P t Pftftftl r V V V 1 77ft / t V

P « L 3 U r\ U ftU 07 7/ RA<; D A 3 T1 PL pyTPRNAI u A 1 C r\ ll A u Fr IIu N11 PTu 1 I

1 nu llN p«;nRT L 3 u r\ 1 Mn

- 1 - -

1 - - 7iPftftft17'^ft

P « Pftftftl r y u 7i.ft u 1 / *t u

P t AD PTR - ftU Q7 X0 R AA<?3 T1 PU pyTPRNAI C A 1 C r\ 11 A L Fr IIu Nll PTi« 1 I

1 nu N11 AAT1 AA 11N Mn

- 1 - •

1 - - sjiPftnni7sn

P * rPftftftl y y y i 7An / o u

P t n A PTR - ftU Q7 Q7 RO AA<;3 i

? rU pyTPRNAI u A 1 C r\ ll A u Fr IIu Nll PTu 1 Ilull n N riATAN U A 1 A 11 nM - 1 - •

1 - AAPftftft177ft ODryyyi//y

r * Pftftftl r y y y i 7/Jlo 0v

p * 10ft Ru AA<;3 1I pL pyTPRNAI C A 1 C r\ 11 A L Fr IIu Nn PTL 1 I1 nu 11N AAT1 AA llN t7 1M

1

1 - 1 - - SAPftftftWQft jDryyy i / 7V

P * PftftftlSftft r y y y i o y y n ATM? - 1 ft 1 RD AA«53 Ti rU pyTPRNAI C A 1 C n IV A L Pr IIu Mn PTL 1 I

1 nu NPi nU AA T1 AA N11 H1

1

- - ^>APftnft1Jt1ft uuryyy lo ly

P t Pftnft1X7ft r y y y i o 6 y

P • n H n n A - u n u u A 1 ft 7 RD AA 3 T

1 rI. pyTPRNAI C A 1 C n ll A L FUNCTION OMOD Mn

- 1 - .

1 - - A7Pftftft1X7ft

p t Pftftftl r V y y X i ft

1 0 H y

p t PAR^A - L A D 3 A 1 ft BASI C EXTERNAL FUNCTION CABS M - n

- 1 - -

1 - - XiPftftftlXSft OHryyy iojv

r * Pftftftl r y y y X A ft

i o u y p * RC ETC _

D 3 r 1 0 11ft STATEMENT FUNCTIONS - INTEGER AND REAL n 1 - -1 - - 7iPftftft1)l7ft /tryyy lo/v

p « RD 3 rP nu pr

- ft ft s STATEMENT FUNCTION DEFINITION n J J r \J \J yj loou

Pftftftl r y y y i HQCt o ? u

p t r 3 r t 3 111 1 1 1 STATEMENT FUNCT•.- D.P., COMPLEX, LOGICAL n 1 - •

1 - - IftXPftftftlQftft

r

«

r 3 r u r \J \J u1 STATEMENT FUNCTION DEFINITIONS n joruyy 17 iv

r t Pftftni07n r y y y i 7 u y

p • PPVAD - L r A A U lift ADDITION AND SUBTRACTION OF COMPLEX M - n 1 - .

1 - - 7APftftft107ft

p t Pftftftl r y V y 1 OAft 7 f w

P t PPXHIl - L r A n U 1^1 MULTIPLICATION OF COMPLEX NUMBERS M - n

1 - -

1 . - 1A1Pftftft10Sft

P * PftftftlOAft r V y y 1 7 0 v

P « L r A U V DIVISION OF COMPLEX NUMBERS M • n

. - Jl7Dftftft107ft

r t PftftftlOXft r u y y 1 7 0 u

U r A C A 1 H 3 EXPONENTIATION OF COMPLEX NUMBERS M • n 1 - .

1 . . i7';pftftftiooft ltJryUUl77U

Pftftft7ftftft r t ppyfip - L r A U r 1 i A ARITHMETIC OPERATIONS ON COMPLEX M - n 1 . - A7Pftftft7ft1ft

r t Pftnft7ft7ft C* CREAD - 1 45 ADD AND SUBTRACT COMPLEX AND REAL NUMBERS M -• 1 - -

1 C» P0002040

N8S FORTRAN Test Programs Version 1 3
C* CREMU - 146 MULTIPLY COMPLEX BY REAL NUMBERS M - 1 - - - 62P0002050

C* P0002060

Ct CREOV - 147 biviOE COMPLEX BY REAL AND THE REVERSE M - 1 '-' - -' 'sPoodzdZO

C* P0002080

Ct CREOP - 148 COMBiNEO bPERAtlONS ON COMPLEX AND REAL M - 1 -

'- '- 66P06b2090

C» P0002100

C» MISC3 - 149 BLANKS IN. CONT. OF STATEMENT TO MAX LINES M - 1

^ - - 97P00021 1 0 C* P0002120

Ct filSU - 150 SPECIAL CHARACTERS FOR CONTINUATIONS M - 1 - - - 105P0002 1 3d

C* ' P0002140

C* BRFCP - 160 REAL EXTERNAL FUNCTIONS M - 1 - - - 82P00021 50

C» AFS - 400 REAL ARGUMENT F 010P0002 1 60

C* BFS - 420 REAL ARGUMENTS F - - - - - 1 0P0002 1 70

C» CFS - 430 INTEGER ARGUMENT F 10P0002 1 80

C»' DFS - 440 "INTEGER ARGUMENTS F - - 1 1 p 0 0 0 2 1 9

0

C« EFS - 45 0 ARRAY NAME AS ARGUMENT F 11P0002200

Ct FFS - 460 DI FFERENT TYPES OF ARGUMENTS ^ _

_• _

-

i 5P0 0022 1 0 Ct P0002220

Ct BIFCP - 161 INTEGER EXTERNAL FUNCTIONS M - 1 - - - 87P0002236

Ct lAFI - 401 REAL ARGUMENT F 10P0002240

Ct IBFl"- 421 REAL ARGUMENTS F - - - - - 1 0P00022 50

Ct ICFI - 431 INTEGER ARGUMENT F 10P0002260

C t IDF I -

' 4 4 f INTEGER ARGUMENTS F -" - -

- 0 1 3 P 0 0 0 2 2 70

Ct lEFI - 451 ARRAY NAME AS ARGUMENT F 11P0002280

Ct I F F I - 461 DIFFERENT TYPES OF ARGUMENTS F - - - - - 1 5P0002290

Ct P0002300

Ct FRF CP - 162 REAL EXTERNAL FUNCTIONS M - f

' -

C - 13 2 P 0 0 0 2 3 1 0 Ct GFS - 402 O.P. ARGUMENT F 11P0002320

Ct ' HFS - 422 COMPLEX ARGUMENTS F 12P0002330

Ct IRFS - 432 LOGICAL ARGUMENT F - - - - - 16P0002340

Ct JRFS - 442 EXTERNAL PROCEDURE ' F - - - - - 1 1 P0 0023 5 0 Ct RFS - 452 DIFFERENT TYPES OF ARGUMENTS F - - - C - 29P0002360

Ct P000237 0 Ct FIFCP - 163 INTEGER EXTERNAL FUNCTIONS M - 1 - C - 123P0002380

Ct IFI - 403 b.P. ARGUMENT F - - - - - 1 1 P0002390

Ct JFI - 423 COMPLEX ARGUMENTS F - - - - - 12P0002400

Ct KFI - 43 3 LOGICAL ARGUMENT F - - - - - 16P000241 0 Ct LFI - 443 EXTERNAL PROCEDURE F 11P0002 42 0 Ct M F I - 4 53 DIFFERENT TYPES 0 F ARG UMENTS F - -

-

C - 29P000 2 43 0 Ct P0002440

C't CFCCP - 164 COMPLEX EXTERNAL FUNCTION M - 1 - C - 132P0 002 4 50

Ct AFC - 404 REAL ARGUMENT F 10P0 0 02 460

Ct BFC - 414 INTEGER ARGUMENT F - - - - - 1 0P0002470

Ct CFC - 424 ARRAY NAME AS ARGUMENT F 11P00 02480

C t D FC

-"" 4 3 4 D . P A R GUMENT F - --'" - - 12P000249b

Ct EFC - 444 COMPLEX ARGUMENT F 11P00 02 5 00

c't FFC - 45 4 LOG I CAL A R GUMEN T

F - - - - - 1 5 P 0 0 0 2 5 1 6 Ct HFC - 464 DIFFERENT TYPES OF ARGUMENTS F - - - C - 28P0002520

Ct P0002530

Ct OPFCP - 165 DOUBLE PRECISION EXTERNAL FUNCTIONS M - 1 - C - 135P0002540

Ct AFD - 405 REAL ARGUMENT F 1 0P0 002 5 5 0 Ct BFD - 415 INTEGER ARGUMENT F 10P0002 560

Ct CFD - 425 D.P. ARGUMENTS F _ - - - - 1 1 P 0 0 0 2 5 7 0 Ct DFD - 435 COMPLEX ARGUMENT F - - - - - 12P0002580

Ct EFD - 445 LOGI CAL ARGUMENT F i 6 PC 0 02 5 90

Ct FFD - 455 EXTERNAL PROCEDURE F - - - - - 11P0002600

Ct GFD - 465 ARRAY NAME AS ARGUMENT F - - - - - 1 2P0 0 026 1 0 Ct HFD - 475 DIFFERENT TYPES OF ARGUMENTS F - - - C - 32P0002620

Ct P0002630

Ct BFCCP - 166 LOGICAL EXTERNAL FUNCTIONS M - 1 - C - 144P0002640

Ct AFB - 406 REAL ARGUMENT F 10P000265 0 Ct BFB - 416 INTEGER ARGUMENT F 10P0002660

Ct CFB - 426 D.P. ARGUMENT F - - - - - 1 1 P0 0026 70

Ct DFB - 436 LOGICAL ARGUMENT F - - - - - 11P0002680

Ct EFB - 446 COMPLEX ARGUMENT F - - 12P00 0 2690

Ct FFB - 456 ARRAY NAME AS ARGUMENT F 12P0002 700

Ct GFB - 466 EXTERNAL PROCEDURE F 1 1 P0002 7 1 0 Ct HFB - 476 DIFFERENT TYPES OF ARGUMENTS F - - - C - 25P0002720

4 NBS FORTRAN Test Programs Version 1
C* P0002730

C* SBRTN - 167 SUBROUTINE SUBPROGRAM M - 1 - C - 103P0002740

C* AAO - 40 7 INTEGER. REAL VAR I ABLES . ARRAY ELEHENTS S 23P0002750

C* ABQ - 417 ARRAY ELEMENTS S 13P0002760

C« ACQ - 427 NO ARGUMENT LIST S - - - C - 21P0002770

C* P0002780

C* FSBRT - 168 SUBROUTINE SUBPROGRAM M - 1 - C -1 53 P 0002790

C* ADO - 408 DIFFERENT TYPES OF ARGUMENTS S - - - - - 39P0002800

C» AEO - 418 ARRAY NAMES AND INTEGER ARGUMENTS S 1

' 23P000281 0 C* AFQ - 428 NO ARGUMENT LIST S - - - C - 41P0002820

C« P0 002 S30

C* BLKDT - 169 BLOCK DATA TEST M - 1 - - - 71P0002840

C* BLOKD - ^09 BLO CK DATA SUBPROGRAM B d

' 3

6

P 0 0 0 2 2 5 0 C t P 0 0 0 2 8 6 0

C * BLKDA - 179 BLOCK DATA TEST M -

1 - - - 7 0 P 0 0 0 2 8 7

0

C* BLAKD - 419 BLOCK DATA SUBPROGRAM B - - - - D 24P0002880

C« BL8KD -429 BLOCK DATA SUBPROGRAM B - - - - D 1 7P0002890

C* BLCKD - 439 BLOCK DATA SUBPROGRAM B - - - - D 20P0002900

C« P00 029 1 0 C* UNFRW - 180 UNFORMATTED WRITE AND READ M - 1 X - - 133P0002920

C* P0002930

C* BACUP - 182 BACKSPACE TAPE M - 1 X - - 74P0002940

C* P00 029 5 0 C* DOTRH - 190 DO LOOPS - TERMINAL STATEMENTS M - 1 - - - 135P0002960

C'« P0002970

C* DOLMT - 191 DO LOOPS - PARAMETERS AS VARIABLE NAMES M - 1 - - - 62P0002980

C * P 0002990

C* DONSC - 192 DO LOOPS - COMPLETELY NESTED NEST M - 1 - - - 166P0003000

C * P 0 0 0 3 0 1 0 C* OONSI - 193 DO LOOPS - INCOMPLETE DO, EXIT BY GO TO M - 1 - - - 60P0003020

C* P 0 0 0 3 0 3 0 C* DONSX - 194 DO LOOPS - EXTENDED RANGE M - 1 - - - 130P0003040

C*" P0003050

C* DONML - 195 DO LOOPS - NESTED NEST M - 1 - - - 65P0003060

C* P0 0 03 070

C* DONIO - 196 DO LOOPS - I/O TERMINAL STATEMENTS M - 1 X - -. 91P0003080

C * P0003090

C* MORDO - 197 DO LOOPS -I/O.STAtMT FT.,INTR FT. .CALL M - 1 X - - 143P0003100

Z* BSFDF - 00 5 STATEMENT FUNCTIONS M

- - - -

- 35P0 003 1 1 0 C* MDQ - 412 SUBROUTINE SUBPROGRAM S 13P0 003 1 20

C* P0003 1 30

C* SUBR1 - 200 SUBROUTINE - OPERATIONS DONE AT SUB LEVEL M - 1 X C - 52P0003140

C* SUBRO - 410 SUBROUTINE SUBPROGRAM - NO ARG. LIST S

-

'- X'C - 1 01 POO 031 50

C* P00031 60

C* LOGI F' -"360 LOGI CAL I F

' STATEMENtS M -

1 - - - 2 7 5 P0 0 03 1 70

C« SMCQ - 411 SUBROUTINE SUBPROGRAM S 12P00 03 1 8 0

C'k POO 03 190

C« BARIF - 301 ARITHMETIC IF STATEMENTS - INTEGER, REAL M - 1 - - - 175P0003200

C* P0003210

C* FARIF - 302 ARITHMETIC IF STATEMENTS - D.P. M - 1 - - - 99P0003220

C t P 0 0 0 3 2 3 0 C* lOFMT - 310 FORMATTED READ/WRITE -ADDITIONAL FEATURES M I 5 - - - 310P0003240

C* 38 DATA CARDS - - - -

- 38P0 0 0 32 5 0 C* P0003260

C* FtbFMT '- 312 FORMATS IN ARRAYS M j •: •_ jj' Z 0 1 P 0 0 0 3 2 7 0 C* FMTQ - 462 SUBROUTINE SUBPROGRAM S - - - - - 33P0003280

C* 13 DATA CARDS 13P0 0 03290

C* P0003300

C* MiSCS - 350 SPECiFICAtibNS FOR PROGRAM FORM M - 1 - - - i56P0003310

C* P0003320

C* FUNMX - 351 BASIC EXTERNAL FUNCTIONS - TRIG FORMULAE M"- 1 - 58P0 0 033 3 0 C* P0003340

C* NAMES - 352 NAMES RESEMBLE FORTRAN VERBS. FUNCfiONS M -

1 - - - 79P0 0 03 3 5 0 C* MAQQ - 413 SUBROUTINE (INTRINSIC FUNCTION NAMES S 15P0003360

C* M6QQ - 463 SUBROUTINE USED AS VARIABLE NAMES IN S

- - - - - 15P0 0 033 70

C* AMQQ - 473 SUBROUTINE SOME SUBRTS. AND AS S - - - - 0 21P0003380

C* BMQQ - 483 SUBROUTINE FUNCTIONS IN OTHERS) "S - 16P0003390

C* P0003400

NBS FORTRAN Test Programs Version 1 5
C* SPEC2 - 360 COMMON, DIMENSION. EQUIVALENCE M - 1 - / - 169P0003410

C « P 0 0.0 3 4 2 0

* * * t * t t * t t * t * t t t t * t * t t t * t t * t * t * * t t t t t t t t t t t * t t t t t t t t t * * * t t t * * * t t t * t * * * t P Q Q i Q Q ^ 0 C**»** P0080020

C* **'*

* FMTRW - ( 668 ) P0080030

C«,*,* * * POO 8 00 40

Q*******t****t*t****t***t<tt*t**t**t*t*)ri>*t**t*t*t*t****t*«tt**t*t****«**po0 8 005 0 C««**« GENERAL PURPOSE ASA REFSP0080060

C*«*** TO TEST SIMPLE FORMAT AND FORMATTED I/O STATEMENTS 7 . 1 . 3 . 2 . 2 P 0 0 8 0 0 7

0

C*t«»« SO THAT THESE FEATURES MAY BE USED IN OTHER TEST 7 . 1 . 3 . 2 . 3P0 08 0 08 0 C«'**V, PROGRAM SEGMENTS 7.2.3 P0 0 8 0 090

C«*t«« RESTRICTIONS OBSERVED P0080100

Z*"t"*T* t" ALL FORMAT STATEMENTS ARE LABELED ^.^^^^.^ /57P00 8 0 H0

Ct«t«* * H AND X DESCRIPTORS ARE NEVER REPEATED 7 . 2 . 3 . 3 / 5 4 P 0 0 8 0 1 2

0

C«'*««* t FOR W.D DESCRIPTORS. D IS ALWAYS SPECIFIED AND 7 . 2 . 3 . 1 / 3 1 P 0 0 8 0 1 3 0 C***** W IS EQUAL TO OR GREATER THAN D 7 . 2 . 3 . 1 / 3 3 P 0 0 8 0 U

0

C**'**'* * FIELD WIDTH IS NEVER ZERO 7 . 2 . 3 / 1 8 P 0 0 8 0 1 5 0 C**«** * IF THERE IS AN I/O LIST. THE FORMAT STATEMENT 7 . 2 . 3 . 4 / 2 2 P 0 0 8 0 1 6

0

C*««** CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER P0080170

C**t»« THAN H OR X) P0080180

C***«* « ITEMS IN I/O LIST CORRESPOND TO FORMAT D E S CR I PTORS 7 . 2 . 3 . 4 / 3 6 P 0 0 8 0 1 9

0

C*»**t « NEGATIVE OUTPUT VALUES ARE SIGNED 7 . 2 . 3 . 6 / 5 6 P 0 0 8 0 2 0

0

C*V»t« « FIELD WIDTH NEVER EXCEEDED BY OUTPUT 7 . 2 . 3 . 6 / 0 1 P 0 0 8 0 2 1 0 C***«* * FOR I CONVERSION. EXTERNAL INPUT FIELDS ARE 7 . 2 . 3 . 6 . 1 / 0 7 P 0 0 8 0 2 2 0 Z*"*"t*'t INTEGER CONSTANTS P0 08 023 0 C***«* GENERAL COMMENTS P0080240

Ctt'Vtt PLUS SIGNS FOR INPUT FIELDS ARE USUALLY OMITTED 2 . 376 / 4 4P 0 0 8 0 2 5 0

C * » * * * POO 80260

C * « * * * POO 8 02 70

C«»*** .P0080280

C

* « 1 1 FORM ATT ED WRITES WITHOUT AN I/O LIST (FORMAT ^ ^ ^ ^

. ^ ^ ^ ^ p 0 0 80290

C««««» STATEMENTS TEST H AND X DESCRIPTORS AND SLASH 7.2.3.2 /44P0080300

C * * * » * R ECOROOIVIDERS) 7 . 2 . 3.8 / 0 9 P 0 0 8 0 3 1 0 C**«»* 7.2.3.9 /31P0080320

C INPUT DATA TO THIS SEGMENT CONSISTS OF 40 CARD IMAGES IN COL. 1 - 80 P0080330

COL. 1 61 P0 0 803 40

CARD 1 999 P0080350

CARD 2 555554444 P0080360

CARD 3 666 771711 8 P0080370

CARD 4 333333111112222222255555444444444444 P0080380

CARD 5 7.7 1 23 4 5 6 . 7 POO 8 0396

CARD 6 8.889.9997.123456 P0080400

CARD 7 5 .44446,55 5 5533 . 1 3 3.1 33.1 33 ,1 444 . 1 P 0 080 4 1 0 CARD 8 5555.15555.1 66666.166666.1 44.22 P0080420

CARD 9 2 . 1 Z".\ ZAl :

1 '27 1 666.3334.3334.3334.333 P 0 0 8 0 4 3 0 CARD 10 -0.1E + 01+0.22E-0 1 0 . 333E + 02 0 . 4444E + 03 - 0 , 5 5 5 5 5 E-03 + 0 . 666666E+ P0 0 80 440

COL. P00 80 4 5 6 CARD 10 00+0.9876543E+12 P0080460

COL. i - ___._.__..-.z::zzz-zzz-:zzzzzzzz^^^^^ p o o 8 o 4 7 o CARD 11 1.05.522.066.633.123455.0789 P0080480

CARD 1 2 1 23 . 00456 . 88 0 . 1 23E + 0 1 +0.987 + 1 -6.2345 + 02 -0 . 6879E + 2 + 6 . 7E + 0 P0 080 496

COL 62 70 P00 80 5 00

CARD 12 3 6.4E+03 P0080510

COL. 1 61 P008 0 520

CARD 1 3 6 . 9876543E-04 + 6 . 1 35 79 1 3E-04 P0080 536

CARD 1 4 19 . 34 + 0.2468E + 02 +.765 + 287.643.96 0 . 5407E + 0243 . 96 + 0 . 5407E + 0 P0 080 5 40

COL. 62--^ P00 8 0 5 50

CARD 14 243.96 0.5407+2 P0080560

COL.

.^^.^.^.^.^.^.^.^^.^.^.^.^^^.^.^^^^^ ^.^.^.^.^.^..^.^.^.^.^.^^^.^.^.^ ^ P0080570

CARD 15 +0.10+06 P0080580

C A R D 16 -0.33 4 D - 0 4 -.334-4 +0 . 765 76 5 4D00 0 . 1 23 4 5 67890 ID* 10 P0 0 80 590

CARD 17 +0.98765432109876D-1+0.98765432109876D-01 .98765432109876 P0080600

COL. 62-66 P0080610

CARD 17 -1 P0080620

CO L"^ ^ P0080630

CARD 18 -.5555555420+03 -0.555555542+3 P0080640

CARD 19 TABC P0080650

CARD 20 FDEFFGHIT*+T1 FS)TF P0080660

NBS FORTRAN Test Programs Version 1
CARD

CARD

CARD

CARD

COL . CARD

COL.

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

COL.

CARD

COL.

CARD

COL . CARD

COL . CARD

COL.

CARD

COL.

CARD

COL . CARD

CARD

CARD

CARD

CARD

C * *

«

C « * c * «

c * * * c * «

c * «

«

c=

c=

c=

(:= c=

c=

c=

c=

c * t

«

21 9. 91. 19. 92. 29. 93. 39. 94. 49. 91. 19. 92. 29. 93. 39. 94.

4

22 9.95.59.96.69.97.79.98.89.95.59.96.69.97.79.98.8

"23

•

24 -0.99D + 01 -0. 990 + 01 -0. 99D + 01-0.99D + 01-0.99D + 01 -.990*01 -.99*

P0080670

P0080680

P0080690

P0080700

P0080716

P0080720

P0080730

P0080740

P008075b

P0080760

P0080770

P0080780

P0080796

P0080800

P008081

0

P0080820

P0080830

P0080840

P0080850

P0080860

P0080870

P0080880

P0080890

P0080900

P00809 1 0 P0080920

P0080930

P0080940

P0080950

P0080960

P0080976

P0080980

P008099b

P0081000

P0081010

P00 1 00 1 0 P00 1 00 1 5 P00 1 0020

P0010025

P0010030

POO 1 0035

P001 0040

POO 1 0045

P0010050

P001 0055

P001 0060

P001 0065

P0010070

P0 0 8A1

P008A2

P0 08A3

P008A4

P008A5

P008A6

P008A7

P008A8

POOS 1020

P0081030

P00700lb

P0070015

P007002b

P0070025

P0070036

P008B1

P008B2

P0070035

POO 70 040

P0070045

24

62-

01 --72

99 + 1

1 •61 25 9999999999

'26 +0.990+01 0.990+01 +.99001 +.9901

27 .9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9

'2

8 fFTFTFTFTF

29 99999999 + 0 . 99D + 01 0.990 + 01- 0 . 99D + 0 1 +0 . 990 + 01 .9901

30 9 . 95 . 59 . 96.69.97.79 .98. 8999999999999999 9 IFF T 9 .9 9 .9 9 .9 9 '9 9 31 T F T F 32

'33"

4444.55555

1123.45678E2

62-66

1 234 . 5678 1 23.45678 1 2.345678. 1 . 2345678

-61

123

33 45678

1 34 9876. 5498 . 7654E2 9876.54

62 80

•61 98 7. 6548647860- 486. 4786E286. 4786

34 8657.8600 9876.54

1 61

3 5 9. 8 765 598. 76 5 4E2 9876 . 54 987 . 65^647860-386 . 4786E2^

62 80

35 8657.8600 9876.54

1 3 6 1 2233354488861 1 222

37 455666233444966111

•61

38 788999377555899777

39 1 1 1 1 2 334 5 59 880 1 1 40 6 778 995 441 222 00

SPECIFICATIONS SEGMENT 008

WHEN EXECUTING ONLY SEGMENT 008, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED

DIMENSION A1S(5) ,A2S(2,2) . EP 1 S ( 33 ) . CMA1 S ( 5 ) , A3S ( 3 . 3 . 3

)

. I AC1 I ( 5 ) . IAC2 I (2 . 7) , AC1S(25 ) . AC2S( 5 , 6) , MCA1 I (5

)

INTEGER 121 (2, 2), 131 (2. 2. 2). MC A3 I (2, 3. 3)

LOGI CAL MCA1B(7) .A1B(2> .A2B(2,2) .A3B(2,2.2) .AVB.CVB.bVB .MCBVB

DOUBLE PRECISION DPA1 D ( 5 ) , MCA3D ( 1 , 4 , 2 ) . 220V0 ,A2D ( 2 , 2 ) A30 ( 2 , 2 2 ) .ACID(IO) .BC2D(7,4) .DPAVD.DPBVD

COMPLEX BVC.QAVC. CHAVC, CHBVC , CHCVC , CHDVC

, L L I C ( 32 ) , LM2 C (8.4 ) , A1 C ( 12 ) , A2 C ( 2 . 2 ) j. ( . B 1 C ( 8 )

C»t.

Ctt.

c***

C t « Ctt*

c=

c=

DIMENSION A1S(5).A2S(2.2) , EP 1 S ( 33 ) , CMA 1 S ( 5 ) , A3S ( 3 . 3 , 3

)

. IAC1I(5).IAC2I(2.7),AC1S(25),AC2S(5,6).MCA1I(5)

INTEGER 121(2,2) , 131 (2,2,2) .MCA3I (2,3,3)

LOGICAL MCA1B(7) .A1B(2) ,A2B(2.2) ,A3B(2.2,2) .AVB,CVB.DVB , MCBVB

DOUBLE PRECISION D P A 1 D ( 5 ) . M C A3 D ( 1 ,4,2) ,Z2DV0 . A20 ( 2 , 2 ) , A30 ( 2 , 2 , 2

)

,AC1D(10),BC2D(7,4) .DPAVD.DPBVD

COMPLEX BVCQAVC, CHAVC , CHBVC. CHCVC. CHDVC

.LL1C(32).LM2C(8.4).A1C(12).A2C(2,2),B3C(2,2,2).B1C(8)

I N P U T -OUT P U T TAPE ASSIGNMENT STATEMENTS

WHEN EXECUf INC; ONLY SEGMENT 008 , THE pQ LOSING 5 jXteME

NUVI=6 AND IRVI = 5 MUST HAVE THE C= IN COLUMNS 1 AND 2 I^EMOVED.

IRVI = 5 NUVI = 6 IRVI = 5 NUVI = 6

' IDENTIFY THE SOURCE OF THE TEST PROGRAMS

HRITE(NUVI . 6671 ) FORMAT (41H1 FORTRAN TEST PROGRAMS//

Ctt*

0071

NBS FORTRAN Test Programs Version 1 7
1 42H PREPARED BY NATIONAL BUREAU OF STANDARDS//

3 38H FOR USE ON FORTRAN PROCESSORS //

'4 42H IN ACCbRbANCE WITH ASA FORTRAN X3. '9-1966//

5 23H VERSION 1 ///)

P0070050

P0070055

P0070060

P0070065

C t * 1 1 * 3 OF 6 INPUT CARDS IDENTIFY THE USERS SYSTEH AND COMPILER P0070070

c PREPARED BY USER P0070075

c READ. NO LIST P0070080

c PREPARED BY USER P0070085

c READ, NO LIST P0070090

c PREPARED BY USER P0070095

c READ. NO LIST

READCIRVI .0070)

P0070 1 00

P0070105

READ( IRVI .5072)

READ( IRVl .0073)

P00701 10

P0070 1 1 5 0070 FORMAT(40H BASED ON ASA FORTRAN X3.9- 1966 /> P0070120

0072 FORMAT(40H TEST PROGRAMS /) P0070125

0073 F0RMAT(40H FORTRAN COMPILER

WRITE(NUVI . 0070)

/) P0070130

P0070135

WRITECNUVI .0072)

WRITE(NUVI .0073)

C t « t * » HEADER FORMAT STATEMENT

0080 FORMAT (1H1. 1X.27HFMTRW - (008) FORMATTED I/0//2X.

138HASA REFS - 7 . 1,3.2 . 2 7 . 1 . 3 . 2 . 3 7 . 2 . 3 / / 2X , 7HRESULtS

)

WRITE (NUVI,0080)

CT.Ttt FORMAT WITH DIG ITS 6-9 IN H FIELDS

0081 FORMAT (//22H 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 , 9H999999999 , 8 H8 8 8 8 8 8 8 8 / 2X,,

1 7H7777777, 6H666666,5H5 5 5 5 5 , 4H4444 , 3H333 , 2H22. 1 HI

)

WRITE (NUVI,0081)

C««*«t FORMAT CONTAiNiNG ALL LETTERS (A-Z) IN H FIELDS AND P0081120

C**«** A VARIABLE NUMBER OF BLANKS IN H AND X FIELDS P0081130

0082 F0RMAt(/2X.3HAAA.5X,5H , 3HBBB , 1 OX , 3HCCC/ 3H . 3H0bb . 9X . 3HEEE , P008 1 1 40' 19H ,3HFFF/4X.3HGGG.8X,3HHHH,8H ,3HIII/5H , 3H J J JPOO 8 1 1 5

0

P00701 40

P0070145

POOS 1040

P0081050

P0081060

P0081070

pbosiosb

P0081090

pbb8i ibb

P008 1 1 1 0

2. 7H .3HKKK,7X.3HLLL/6X.3HMMM,6X.3HNNN.6H ,3H000/7X. P0081 1 60

3 3HPPP , 5H f 3HQQQ, 5 X , 3 H RR R / 8 X . 3 HS S S . 4X , 3 HTTT . 4H ,.}MMJ.. 1P008 1 1 70

45H VVV , 3HWWW. 3X, 3HXXX/ 12X. 3HyYY , 3X, 3HZZZ) P00 8 1 1 80

WRITE (NUVI .0082) P00 8 1 1 90

CVt*«* FORMAT CONTAINING H FIELD WITH ALL POSSIBLE P0081200

C'*«*** SPECIAL CHARACTERS 3,.1/46P0081210

0083 F0RMAT(/21H =+-*/()..$) P0081220

WRITE (NUVI. 0083) P0081230

C***t* FORMAT TO TEST VERTICAL SPACING P0081240

C « 1 1 1 * 7.1,.3..4/04P0081250

7154 F0RMAT(/24H BEGIN VERTICAL SPACING//30H F0RMAT(14H SKIP 1 LINEP0081260

1 /) /) P0081270

WRITE (NUVI , 7154) P0081280

7155 F0RMAT(32H F0RMAT(15H SKIP 2 LINES //) //) P0081290

WRITE (NUVI , 7155) P0081300

7156 F0RMAT(33H F0RMAT(16H SKIP 3 LINES ///) ///) P0081310

P0081320

P0081330

P008134b

P0081350

P008136b

P0081370

WRITE (NUVI. 7156)

0084 F0RMAT( 32H IMBEDDED SLASHES - SKIP 1 LINE //

1 14H SKIP 2 LINES/// UH SKIP 3 LINES/ 3(/).

2 19H SKIP TO NEXT LINE/ 1H , 12H SKIP 1 LINE/ 1H0.

3 8 H T EST N 07i H + , 9 )( . 1 4 H / 1 H + , 7 H A D V A N C E / 1 9 H SKI P 1 0 N E W PAGE

7

4 1H1. /// 30H END OF VERTICAL SPACING TEST)

WRitE (NUVi.bb84) P0081380

C***t» FORMATTED READ AND WRITE STATEMENTS WITH INTEGER 7 . 1 . 3 . 2 . 1 / 2 5 PO 0 8 1 390

C*»«** VARIABLES AND ARRAY ELEMENTS IN A N I / 0 LIST. (THE 7 . 2 . 3 . 3 / 0 1 P 0 0 8 1 4 0

0

C*»*** NUMBER OF ITEMS IN THE LIST IS VARIABLE.) SOME P0081410

t***** FORMAT STATEMENTS CONTAIN REPEATED F I E LDS P008 1 420

C««t*« FORMATS CONTAINING I CONVERSION DESCRIPTORS. 7 . 2 . 3 . 6 . 1 / 03P008 1 430

C«**«* FIELDS WIDTH IS FROM 1 TO 5 DIGITS. SOME 7.2.3.3 /01P0081440

C«««** FIELDS ARE REPEATED P0081450

0085 FORMAT (//25H BEGIN I CONVERSION TEST/40H EACH PAIR OF LINES SHOP0081460

1UL0 BE lOENTI CAL/47H LINE 1 OF EACH GROUP IS HOLLERITH I N FORMAT I OPO 0 8 1 4 70

2 N ) P 0 0 8 1 4 8 0 WRITE (NUVI, 0085) P0081490

C:**«*t INPUT CARD 1 P008 1 500

0086 FORMAT (2X,I3) P0081510

S NBS FORTRAN Test Programs Version 1
READ (IRVI.0086) JACVI

C***** INPUT CARD 2 6687 FORMAT ( IX,. 15 , 1X.I4)

READ (IRVI,0087) KBCVI

P00S1 520

POOS 1 530

P0081550

p66si560

POOai 570

,3) POOS 15 SO

P00S1 590

p66sV600

P00S1 61 0 f;i)P00S1620

P0021630

POOS 1640

P00S1650

POOS 1660

P0081670

p6osT6'8d

P0081690

POO 81' 70 0 P0081710

2. 3) POOS 1720

P0081730

POOS 1 740

P00S1750

1 . 1 ) POOS 1 760

POOS I 770

l7'2 5P0 0ST780

2/UP0 08 1 790

/ O I PO 08 1 8 0 0 P00S1S10

POOS 1820

P0081S30

2/18P008 1 S40

/01P0081S50

POOS i 860

P0081 870

SHOP0081886

P0081 890

POO 8 1900

P0081910

POOS 1 920

P0081930

POOS 1940

P0081950

P0081966

P0081970

P068Y980

P00S1 990

pobszooo

P0082010

P6b82026

10) P0082030

P 0 0 8 2 0 4 b P0082050

POO'82060

P0082070

P0082080

P0082090

P 0 0 8 2 1 0 0 P00821 10

P 0 0 8 2 1 2 0 P0082130

P00821 40

P00S21 50

Pbb82166

P00821 70

PO 082 ISO

P0082190

lACIKD

C » * «

«

0088

' INPUT CARD 3 FORMAT <2X. I3,2X,3( 12) ,2X. n

)

READ (iRVi.6688) iAC2i(1.2). LCCVI

< INPUT CARD 4 IAC1I(5). IHDVI, MCA3I(1.2

C * 1 1 * 0 089 FORMAT (2X.2(I3)

READ (IRV1,0089)

1 IAC2I (2.3) . 2 ,rAC1I(2),

.1(15). 4(12), 5(11). 3(14))

MDCVI, IAC2I(2.2). IAC1I(4), NECVI, IAC1I(3),

iAC2r(2.1). MRRVI. IGDVI. KGVI. lEDVI. IAC2I(

IAC2I(2.7). MCA3I(2,1.3)

7086 FORMAT (/ 5H 999)

WRITE (NUVI.7086)

WRITE (NUVI.6686) JACVI

7087 FORMAT (/ 11H 5555 4444)

WRITE (NUVI,7087)

WRITE (NUVI,0087 ) KBCVI. lACIKD

FORMAT (/ 16H 666 111111 8)

WRITE (NUVI.7088)

WRITE (NUVI.OOSS) IAC2i(1.2). LCCVI. IAC1I(5). IHDVI

FORMAT (/ 38H 333 33 31111122222222 5 5 5 5 5 444444444444)

7088

MCA3I (

1

7089

WRITE (NUVI,7089)

WRITE (NUVI,0089) MDCVI. IAC2I(2,2)

"i IAC2I (2.3) . IAC2I (2. 1 ) . MRRVI , 2 .IAC1I(2). IAC2I(2,7). MCA3I(2

IAC1I(4). NECVI. IAC1I(3)

IGDVI. KGVI, lEDVI. IAC2I(

1.3)

0 * * * * C * * * * c * * * * c * * * * c * * * « c * « * « c * * * * c * * * * c * * * * c * * * * 7 0 80

* FORMATTED READ AND WRITE STATEMENTS WITH REAL 7.1.3.2,

* VARIABLES AND ARRAY ELEMENTS IN AN I/O LIST. (THE 7.2.3.6,

* NUMBER OF ITEMS IN THE LIST IS VARIABLE.) ONLY 7.2.3.3

* F CONVERSION IS USED IN THE FORMAT STATEMENTS.

SOME F FIELD DESCRIPTORS ARE REPEATED. FIELD

* WIDTH ALWAYS CONTAINS 1 POSITION FOR DECIMAL PT.

* FORMATS CONTAINING F CONVERSION DESCRIPTORS.

* FIELD WIDTH IS FROM 1 TO 7 DIGITS. PLACEMENT OF

7.2.3.6

7.2.3.3

* DECIMAL POINT IS VARIABLE. SOME F FIELDS ARE

* REPEATED

FORMAT (/ 25H BEC3IN F CONVERSION TESTMOH EACH PAIR OF LINES

1ULD BE IDENTICAL)

WRITE (NUVI.7080)

C*«*«* INPUT CARD 5 7081 FORMAT (2)(.F 3.1. F 8.1)

READ (IRVI.7081) ACVS. CMAVS

C « * * * 7082

* INPUT CARD 6 F0RMAT(2X.F4.2,F5.3.F8.6)

READ (IRVi.7b82) A1 S ( 2 ) . B CVS . CMBVS

C * * * * * INPUT CARD 7 7083 FORMAT (2X.F6.4.F7.5,4(F4.1).F5.1)

READ (IRVI.7083) HHCVS. CMCVS, GGCVS. FFCVS

i AC2S(4.1)

* INPUT CARD 8

AlSd). AC1S(25)

C « * « « 70 8 4 FORMAT (2X.2(F6.1),2X.2(F7.1).2X.F5.2)

READ (IRVI.7084) AC1S(18), AC1S(7), AC2S(4.4)

> INPUT CARD 9 FORMAT (2X.5(F3.1).F7.3.3(F5.3))

AC1S(8) . AC1S(

C * * * * 7085

READ (IRVI,7085) AC2S(3.3) . AC2S(5.1). CCVS. AC1S(12), OCVS,

1 AC1S(13). ACrS(5). A3S(1.1.2). AC2S(3.5)

FORMAT (/ i3H 7.7123456.7)

WRITE (NUVI.7091)

7091

7092

7093

WRITE (NUVI.7081) ACVS, CMAVS

FORMAT (/ 19H 8.889.9997.123456)

WRITE (NUVI , 7092)

WRITE (NUVI, 7082) A1S(2), BCVS, CMBVS

FORMAT ( / 36H 5.44446.5555533.133.133

WRITE (NUVI, 7093)

1 33 . 1 444 . 1 ) WRITE (NUVI. 7083 ) HHCVS, CMCVS, GGCVS, FFCVS, AlSd). AC1S(25)

1 ,AC2S(4,1)

7094 FORMAT ( / 37H 5 5 5 5 . 1 5555 . 1 66666 . 1 66666 . 1 44 . 22 ) WRITE (NUVI, 7094)

NBS FORTRAN Test Programs Version 1 9
7095

WRITE (NUVI. 7084) ACISdS). AC1S(7), ACZS(4.4) , AC1S(8)

FORMAT ( /39H Z . 1 2 . 1 2 . 1 2 . 1 2 . 1 666 . 3334 . 3334 . 3334 . 333 ) WRITE (NUVI,709 5)

WRITE (NUVI.7085) AC2S(3,3) , AC2S(5,1), CCVS, AC1S(12),

AC1S(10)P0082200

P008221

0

POO 82220

DCVS, P0082230

C « t « « C 1 1 1

1

C * t « * c * * *

C * t * t c « « * t C t « *

«

C t * « C t « « « c « « * 7110

7.2

7.2

OF LINES

C « « * * 711

1

7112

C t * 1

1

C t « t

«

C t * « * C t * » « 7118

C t * «

t

7119

C * 1 1

7120

C t * * * 7122

1 AC1S(13), AC1S(5), A3S(1,1,2), AC2S(3,5)

FORMATTED READ AND WRITE STATEMENTS WITH REAL

VARIABLES AND ARRAY ELEMENTS IN AN I/O LIST.

E CONVERSION IS USED IN THE FORMAT STATEMENTS

"SOME E FIELD DESCRIPTORS ARE REPEATED

* (FIELD WIDTH ALWAYS INCLUDES 6 EXTRA POSITIONS

« TO PROVIDE FOR SIGN, DECIMAL POINT AND EXPONENT

* PROVISION IS ALWAYS MADE FOR THE DIGIT ZERO

* BEFORE THE DECIMAL POINT)

« THE NUMBER OF DECIMAL PLACES VARIES FROM 1

* TO 7 DIGITS.

FORMAT (//25H BEGIN E CONVERSION TEST/40H EACH PAIR

iULD BE IDENTICAL)

WRITE (NUVI,7110)

* INPUT CARD 10

FORMAT (E8.1,E9.2.E10.3.E11.4,E12.5,E13.6,E14.7)

READ (IRVI,7ni) AVS, BVS, EP1S(5), AC2S(1,5), CVS, AC2S(5

1 A3S(2,1,2)

FORMAT (/ 21H -0.1E + 01 0 . 22 E

- 0 1 / 2X , E 8 . 1 , 2X , E9 . 2 / /

1 25H 0.333E + 02 0 . 44 4 4E + 03 / 2X , E 1 0 . 3 , 2X . E 11

2 29H - 0 . 5 5 5 5 5 E-03 0 . 666666E + 0 0 / 2X , E 1 2 . 5 , 2X

3 16H 0.9876543E+12/2X,E14.7)

"YRTfE (NUVr,7112) AVS, BVS, EP1S(5), AC2S(1,5), CVS,

1 A3S(2.1,2)

* FORMATTED READ AND WRITE STATEMENTS WITH COMPLEX

« VARIABLES AND ARRAY ELEMAENTS IN AN I/O LIST.

» E AND F CONVERSION ARE USED IN THE FORMAT

* STATEMENTS. SOME FORMAT DESCRIPTORS ARE REPEATED

FORMAT ( 31H1 BEGIN COMPLEX CONVERSION TEST/3ZH EACH

10 BE IDENTICAL)

WRITE (NUVI,7118)

« INPUT CARD 11

, 2(F4^1)'. 2(F7.4))

CHAVC. CHBVC, A1C(2)

13

2(E10.3), 2(E11.4), 2(E8.1)/ 2(E14.7))

A2C(1 .2) . B3C(2,2. 1 ) , CHCVC, A1C(1 ) , CHOVC

1 / 2/

/

4)

4/ / E13 6/ /

AC2S( 5 .4)

3.2

3 . 6

3 . 4 3.3

GROUP

FORMAT ( 2(F3.1)

READ ( IRVI , 71 19)

' INPUT CARDS 12 FORMAT ( 2(F6.2)

READ (IRVI. 7 120)

' INPUT CARD 14

LL1 C(2)

FORMAT (F5.2. Ell. 4, E10.3. F4.1. 3 ( F 5 . 2 , E 1 1 . 4 ) ) READ (IRVI. 7122) A2C(2,1), BVC, QAVC, LM2C(1,2).

FORMAT (/ 10H 1 .0 5.5/ 2X. F3.1.2X, F3.1 //

1 12H 22.0 66.6/ 2X. F4.1. 2X. F4.1 //

7123

P0082240

P0082250

PC 0 82260

P0082270

POO 822 8 0

1 /47P0082290

6/0iP0082300

1 /04P0 0 8 23 1 0 POO 8 2320

P0082330

P 0 0 8 2 3 4 0 SH0P0082350

P0082360

P0082370

P 0 0823 80

P0082390

POO 82 400

P0 0 82 4 1 0 PO 082 42 0 P0082430

P 0 0 8 2 4 4 0 P0082450

P 0 0 8 2 4 6 0 P0082470

. 1 /25P0082480

. 4/52P0 082 490

/39P0 0 82 5 00

/01P0082510

SHOULP0082520

P0082530

P 0 0 8 2 5 4 0 P0082550

P 0 0 8 2 5 6 0 P0082570

P 0 0 8 2 5 8 0 P0082590

P0082600

P0 0 826 1 0 P0082620

P0082630

P0 082640

P0082650

7124

2 18H 33.1234 55.0789/ 2X, F7.4, 2X. F7.4 ) WRITE (NUVI,7123) CHAVC, CHBVC. A1C(2)

FORMAT ( / 1 6H 1 23 . 00 456 . 88 / 2X , F6 . 2 . 2X

.

1 24H 0.123E+01 0.987E+01/ 2X, E10.3. 2X.

F6

E10

//

//

2 26H -0 . 2345E + 02 -0.6879E + 02/ 2X, Ell. 4, 2X, Ell. 4 //

3 20H 0.7E+03 0.4E+03/ 2X, E8.1, 2X. E8.1 //

4 32H 0 . 9876543E-04 0 . 1 35 791 3E-04/ 2X, E14.7, 2)<. E14.7)

WRITE (NUVI,7124) A2C(1,2), B3C(2,2.1), CHCVC. AlCd). CHDVC

FORMAT (/ 20H 1 9 . 34 0 . 2468E + 02/ 2X. F5.2. 2X. Ell. 4//

1 18H 0.765E+02 87.6/ 2X, E10.3, 2X.F4.1//

2 18H 43 . 96 0 . 5407E + 02/ 3 ( F 7 . 2 , E 1 1 . 4 / ) ) HRITF (NUVI.7126) A2C(2.1). BVC. QAVC, LM2C(1.2). LL1C(2)

7126

C * t • t P * • *

* C 1 1 1 * C * t • t C 1 1 « C 1 1

1

c * * t < c * * 1

1

7127

t P'MATTED READ AND WRITE STATEMENTS WITH

t BLE PRECISION VARIABLES IN AN I/O LIST.

D CONVERSION IS USED IN THE FORMAT STATEMENTS.

SOME D FORMAT DESCRIPTORS ARE REPEATED. (FIELD

WIDTH ALWAYS [NCLUDES 6 EXTRA POSITIONS TO 7. PROVIDE FOR SIGN. DECIMAL POINT AND EXPONENT 7.

* 'AND 1 POSITION FOR OPTIONAL DIGIT ZERO BEFORE 7.

• THE DECIMAL POINT)

F6rH/^T { /25H BEGIN D CONVERSION tESt/32H EACH GROUP

IDENTICAL)

P0082660

P0082670

P 0 0 8 2 6 8 0 P0082690

POO 8 2700

P008271

0

P 0 0 8 2 7 2 0 P0082730

P0 0 82 740

P0082750

P0 0 82 760

P0082770

1 / 25P00 82 780

3/41 P0082790

701 POO 82 8 0 0 P00 828 1 0 1/45P0 082820

/04P0082830

r/04P00 82840

P0082850

SHOULb BE IP0082860

P0082870

7.1.3

7.2.3

7.2.3

2.3

2.3

2.3

10 NBS FORTRAN Test Programs Version 1
c » * «

»

7128

WRITE (NUVI,7127) P0082880

' INPUT CARD 15 P0082890

FORMAT ( 2X, 08.1) P0082900

REAO (IRVI.7128) DPAVD P0082910

P0082920

P0082930

P0082940

P0082950

P0082960

P0082970

C * «

t

7129

* INPUT CAROS 16, 17. 18

FORMAT ( 2(010.3), 0 U . 7 018

REAO (rRVI,7129) MCASD (1.2.2)

11/ 3(021-,

ACib(2)

,

U)/ 2(016

BC2b(3, 1 )

.

9)

)

Acibn )

7130

1 ZZDVD. AC1D(3), DPBVO

FORMAT (/ 10H 0.10+06)

WRITE (NUVI.7130)

MCA3D( 1 , 2 . 1 ) . BC2D(1,2)

7131

WRITE (NUVI.7128) OPAVO

FORMAT (,/ 12H -0.3340-04/ 2X. 010.3 / 2X. 010.3 //

1 16H 0.76576540+00/ 2X, 014.7 //

2 20H1 0.123456789010+10/ 2X, 018.11 //

P0082980

P0082990

POO 83000

P0083010

C * « « * c * * * * c « « * * 7132

3 23H 0.987654321098760-01/ 2X. 021.14/ 2X. 021.14 / 2X. 021

4 18H -0.5555555420+03/ 2X. 016.9/ 2X. 016.9 ) WRItE (NUVl . 7131 ) MCA30(1 .2.2) , AC10(2). B C2 0 ( 3 , 1 ) , AC 1 0 ( f

)

1 ZZDVD. AC1D(3), DPBVO. M CA3 0 ( 1 . 2 . 1 ) . BC2D(1.2)

* FORMATTED READ AND WRITE STATEMENTS WITH LOGICAL f^f ^.T

* VARIABLES AND ARRAY ELEMENTS IN AN I/O LIST 7.2.3.7

14//P0083020

P0083030

P 0 0 8 3 0 4 0 P0083050

T/2 5P0083060

/56P0083070

* SOME L DESCRIPTORS ARE REPEATED.

F0RMAT(//25H BEGIN L CONVERSION TEST/33H LINES BELOW SHOULD BE IDENTI CAL)

L CONVERSION IS USED IN THE FORMAT STATEMENTS

P0083080

IP0083090

pO 0 83100

c * « « * « 7.2.3.3 /01P00831 10

C * * * * 7133'

WRITE (NUVl, 7132)

* INPUT CARD 19

FORMAT ( L4)

READ (IRVI.7133) A2B(2

* INPUT CARD 20

FORMAT ( 2(L4). L3. L2. L3

READ (IRVI.7134) MCAIB(I),

1 DVB. A3B(1.2.1)

P0083120

P0083130

P0083140

P00 83 1 5 0 P00 83160

P0083170

P 0 0 8 3 1 8 0 P0083190

1 ) C * * * « 7134 2(L1 ) ) MCBVB. A2B(1 1 ) . A3B( 1 . 1

. 1 ) . CVB

7135 FORMAT (//24H T F F T T FTF/ 2X, 3(L4). L3, L2, L3. P0083200

1 2(L1)) P0083210

WRITE (NUVl, 7135) A2B(2,r), MCAIB(i), MCBVB, A2B(1,1), A3B ( 1 , 1 , 1 ) , P0083220

1 CVB, DVB, A3B(1,2,1) P0083230

C * * 1

1

C t « t

«

c * « * « C t « t * 7097

* FORMATTED REAO AND WRITE STATEMENTS WITH ARRAY 7

« NAMES OF ALL TYPES IN AN I/O LIST. THE NUMBER OF 7

* ITEMS IN THE LIST IS VARIABLE. SOME FIELD 7

* DESCRIPTORS ARE REPEATED.

1 .3.2.1/26P0 0 83 2 40

.1 .3.2.1/39P0 0 832 5 0 .2.3.3 /01P0083260

P0083270

FORMAT (//32H TEST UNSUBSCR I PTED ARRAY NAMES/35H IN 1ACH GROUP OF LINES/22H SHOULD BE IDENTICAL.)

WRITE (NUVl, 7097)

* INPUT CAROS 21, 22

FORMAT ( 2X , 8 ( F3 . 1 ^ 8F3 . 1 / 8 ( 2 ( F3 . i ) )

)

REAO (IRVI.7098) B1C.B3C

I/O LISTS EP0083Z80

P0083290

P0083300

C * « * t P0083310

709 8

C * * * * 7099

C * * * t 7100

INPUT CAROS 23. 24. 25

FORMAT (2X.4(F4.1)/4(D9. 2). 409. 2/5(12))

RE/^0 (IRVI.7099) A2S. A30, MCA1 I INPUT CAROS 26, 27, 28

F0RMAT(2X,4(D9.2)/2 7(F2. 1 ) / 5 ( L 1 ) , 5 L 1

>

REAO (IRVI,7100) A2D, A3S, A1B, A3B

t INPUT CARDS 29, 30

FORMAT (2X, 4(12), 5(09. 2)/4(2(F3.1)).8( 12). 4(L1).5(F3

REAO (IRVI.7101) 121. DPA10. A2C. 131. A2B. CMA1S

FORMAT (/ 26H 9.91.19.92.29.93.39.94.4 / 2X . 8 ( F3 . 1 ) /2X . 8 ( F3 . 1 )

)

P0083320

P0083330

P0083340

P0083350

P0083360

P0083370

P 0 0 8 3 3 8 0 P0083390

C * * » « 7101 1)

)

7102

P0083400

P008341

0

P0083420

P0083430

P008 3 440

P0083450

.4(09.2)// P0083460

.990+01 0.9P0083470

0.9 ().9/Tx.P008348()

P0083490

P0083500

2X. 4(I2)//P0083510

.9072X, P0083520

,8(12)// P0083530

1)) P0083540

CMA1S P0083550

7103

WRITE (NUVl, 7102) B1C

FORMAT (/ 18H -9 . 9- 9 . 9- 9 . 9-9 . 9 / 2X

,

1 3 8 H - 0 . 9 90 + 01 -0.990 + 01 -0. 990 + 0 1 -0 . 2 12H 9999999999/ 2X, 5(12) //38H

390 + 01 / 2X, 4 (09.2) / / 37H 0 . 9 0 . 9

4 9(F4.1)/ 1X, 9(F4.1)/ 1X,9(F4.1)/

WRITE (NUVl ,7103) A2S, A30, MCA1I,

FORMAT (/ 10H TFTFTFTF/ 2X, 8(L1

1 1 1H 0.990 + 01 / 5 (01 1.2/) /26H

28(F3.1)/2X.8(F3.1)/2X,8(F3.1)//18H

3 6H TFFT/ 2X. 4(L1 ) / / 1 7H 9 . 99 . WRITE (NUVl. 7104) A3B, 121. 0PA1D.

4(F4. 1 ) //

9 90+01 /2X. 4(09. 2) 72X

0.990+01 0.990+01 0 0.9 0.9 0.9 0.9 0.9

4H1 TF/ 2X.2(L1 ))

A2D. A3S. A1B

7104 ) // 10H 99999999/

9.95.59.96.69.97.79

9999999999999999/2X

99.99.99 . 9/2X. 5 ( F3 . A2C. B3C. 131. A2B.

NBS FORTRAN Test Pr og r ams Ve r s i o n 1
C««ttt FORMATTED WRITES TO TEST THAT LEADING BLANKS 7 . 2 . 3 . 6 / 5 1 P 0 0 8 3 5 60

C»«»t« ARE INSERTED IN THE OUTPUT FIELD WHEN THE OUTPUT P0083570

t*t*tt PRODUCED IS SMALLER THAN THE FIELD WIDTH. (I, E, P0083 5 86

C***** F AND D DESCRIPTORS ARE TESTED) P0083590

7090

7096

FORMAT ( /30H LEADING

IS SHOULD BE IDENTICAL)

WRITE (NUVI.7090)

FORMAT (/ 3H 8/I3//4H

12

3

BLANK INSERTION TEST/40H EACH PAIR OF

22/I4//5H 22/I5//6H 22/16//

7H 22/17// 5H 7.7/F5.1// 7H 8.88/F7.2/ 9H1 9.999/

F9.3// 11H 5.4444 /F11 .4// 13H 6 . 5 5 5 5 5 / F 1 3 . 5 /

/

15H 7.123456/F15.6// 10H 0.21E+01/E10.2//

12H 0.331E + 02/E12.3// 14H 0 . 4 4 4 1 E + 0 3 / E 1 4 . 4 /

/

16H 0 . 5 5 5 5 1 E + 04/E16.5// 18H 0. 66 6 6 6 1 E + 0 5 / E 1 8 . 6 /

/

20H 0 . 1 234567E + 06/E20. 7)

WRITE (NUVI,7096) MCA3I(1.2.3)

1 IAC2I(2,3). ACVS, A1S(2),

7105

2 DCVS

FORMAT (/

1 11 H 0 2 1 0H 1.0

3 14H 9 WRITE (NUVI

1 Z2DVD.

AC1S(25) , AC2S(4, 1

)

9H 0 . 1 D + 00/D9 . 1 /

/

1 0 + 00/D1 1 . 1 / / 1 2H

5.5/ 2(F5.1) // 12H

9 5.5/ 2(F7. 1 ) //

7105) AC1D(3)

,

CHAVC. B3C(1,1

IAC1 1(3), NECVI , IAC1 I (3)

BCVS, HHCVS, CMCVS. CMBVS,

, AC1S(7) , AC1S(8)

10H 0.1D+00/D10.

0 . 1 D + 00/D1 2 . 1 / / 9.9 5.5/ 2(F6

1 6H 1.0 5 ZZDVD, ZZOVD,

1 ) , B3 C ( 1 , 1, 1 ) , CHAVC

, CMAVS

1 / /

1 ) 5/

/ / 2( F8 1 ) )

C*«««* FORMATTED READ AND WRITE STATEMENT TO TEST THAT 7 C*Ttt* OPTIONAL BLANKS MAY PRECEDE A LOGICAL INPUT FIELD 7 7138 FORMAT ( 33H1 TEST LOGICAL FIELDS WITH BLANKS/33H LINES

10ULD BE IDENTICAL)

WRITE (NUVI, 7138)

CViTt* INPUT CARD 31 7139 FORMAT ( L6, L4, L10, L5)

READ (IRVI,7139) AVB, MCA1B(2), A2B ( 1 , 2 ) , A3B ( 2 , 1 , 2

)

7140 FORMAT (//27H T F T F/ 2X, L6, L4

WRITE (NUVI, 7140) AVB, MCA1B(2), A2B(1,2), A3B(2,1,2)

C.«t.« FORMATTED READ AND WRITE TO TEST F DESCRIPTORS 7 WHERE D IS EQUAL TO ZERO AND WHERE W EQUALS D 7

LINEP0083600

P008361 0 P0083620

P0083630

POO 83640

P0083650

P 0 0 8 3 6 6 0 P0083670

P008368 0 P0083690

PO 083 700

P0 083 7 1 0 P008372d

P0083730

P 0 0 8 3 7 4 0 P0083750

P 0 0 8 3 7 6 O' P0083770

P0083780

7/03P0083790

7/06P0083800

L10, L5)

C**«** WHERE D IS EQUAL TO ZE C****« (2ND TEST APPLIES ONLY

7108 FORMAT ( / /36H TEST 0 = 0,

1LD BE IDENTICAL))

WRITE (NUVI, 7108)

C*«««* INPUT CARD 32

7141 FORMAT (2X, F5 . 0 , F5 . 5 ) READ (IRVI,7141) ACVS, BVS

7109 FORMAT (//7H 444 4. / 2X, F5 WRITE (NUVI, 7109) ACVS, BVS

C*»*** FOR.MATS WITH G CONVERSIONS

C«**** INPUT CARD 33

7142

TO READ STMNTS .

)

W=D+1 (PAIRS OF LINES/ 28H BELOW

0// 9H 55555/ 3X,F6.5)

7143

FORMAT( 3(G11.4), 3G11.4)

READ (IRVI,7142) AC1S(14), AC1S(15),

1 A C 1 S ( 2 1 ) , A C 1 S ( 2 2 ) FORMAT(/ 2X,23HBEGIN G CONVERSION

123 5E+0 5 12.35

AC1S(16) , AC1S(17)

/2X,

33H

10ULD BE IDENTI CAL//36H

2 G14.4.4X,2G1 1 .4///3X

3 G14.4,4X,2G11 .4)

WRITE(NUVI ,7143) AC1S(14), AC1S(15)

1 AC1S(21), AC1S(22)

C»«««« SCALE FACTOR APPLIED TO F,E,D,G

C«»«*» ON READ, BUT NOT ON WRITE

C«**«* INPUT CARD 34

7'144

38HEACH

1 2 3 5 . 1.235

AC1S(16) , AC1S(17)

DESCRIPTORS

7145

F0RMAT(2PF8.3.-2PE9.4.F9.4,0PG9.4,D9.4,-2PE9.4,F9.4,D9.4

READ(IRVI,7144)EP1S(16),EP1S(17),EP1S(18), EP1S(19),

1 BC2D(1 ,4) ,EP1S(20) ,EP1S(22) ,BC2D(2, 1 ) ,EP1S(23)

F0RMAT(22H1 SCALE FACTOR ON READ/31H IN ORDER OF FORMAT

BELOW SHP0083810

P0083820

P0083830

P0083840

P0083850

P0083860

P0083870

P0083880

1 /3 1 P0 0 83 890

4/40P0083900

P0 0 8 39 1 0 SHOUP0083920

P0083930

P0083940

P0083950

P0083960

P0083970

POO 8398 0' P0083990

P0084000

P008401

0

P0084020

P0084030

P008404 0 SHP0084050

P 0 0 8 4 0 6 0 P0084070

P0084080

P0084090

P 0 0 8 4 1 0 0 P0 0 8 4 1 1 0 P 0 0 8 4 1 2 0 P0 0 8 4 1 3 0 P00 8 4 1 4 0 P00841 50

P0084160

0CCURRENCP00841 70

PAIR OF LINES

123.5/

.1235/

2PG9 .4)

1 E / / 4 0 H CARD 9 8 76.54 98 . 76 5 4E2 9876.54/ P00841 80

2 40H DESC 2PF8 . 3 -2PE9 . 4 F9 . 4/ P0084 1 90

3 40H TO BE 98.7654 . 9877E+04 987654.00/ P0084200

4 4H IS, F12,.4. E12.4, F12.2// P0 0 8 42 1 0

5 40H CARD 987.654 864786D-4 8 6 . 4 7 86E2/ P0084220

6 40H DESC 0PG9.4 09 . 4 -2PE9 . 4/ P0084230

12 NBS FORTRAN Test Programs Version 1
7 4Un ID DC 7 0 / . 0 J 4 .004oU Ut . 0 0 H fi t * U 4

/

8 4H IS. F12.3.D12.4, ^M.KII

DAAJ/7/A

P0084250

9 4 0 rl LAKU 00 . 4/ 80 oOj/.o/UO V 5 / 0 . j h / A 40H DESC F9.4 D9.4 2PG9.4/ P0084270

D /AU Tn DC ftAA flA^ftPtx^/ Oft 77/ D hOH IU DC OOH/.OOU .OOJOU+Uh 70.///

C4H IS,F12.3, D12.4, G16.4) P0084290

WRITt(NUVl,/l4D) hH1bMo;,brib(l/;,brlbC18;,fcKl!5MV},

1 BC2D(1,4),EP1S(20),EP1S(22),BC20(2,1),EP1S(23) P008431

0

L***** oLALc rALlUK ArKLltU IU r, t, U , u utoLKlrlUKo

C»  ON WRITE, BUT, NOT ON READ

DADS/ 77A

P0C84330

[,** «** INPUI LAKU 5 J 7152 FORMAT(F8.2,E9.4,F9.2,G9.3,D9.0,E9.4,F9.4,D9.2,G9.4)

nAAO/7/A

P0084350

READ(lKVl,/lDd) ALib(l),ALlbC^J,ALibv3),ALlo(4),

1 AC1D(4).AC1S(20),AC1S(23),AC1D(5),AC1S(24)

DAAQ/ 7AA

P0084370

7153 F0RMAT(/23H SCALE FACTOR ON WRITE/31H IN ORDER OF FORMAT OCCURREP0084380

1NCE//40H CARD 9.87655 98.7654E2 9876.54/ P0084390

7 iflH nP<ir 7PF1? ? -?PF1? 4 F17 4/

3 40H TO BE 987.65 .0099E+06 98.7654/

Pf)f)X4400

P0084410

A T 7PF1? 7 -7PF17 4 F17 4//

5 40H CARD 987.654 864786D-3 86.4786E2/

P0084420

P0084430

A Ann nPQP 1P(^17 7 ni7 ^ -7PF17 4/

7 40H TO BE 9.88E+02 8.6479D+02 .0086E+06/

P0084440

P0084450

8 4H IS, 1PG12.2, D12.4, -2PE12.4//

9 40H CARD 86.4786 86 5 7. 86D0 98 76.5 4 / P0084460

P0084470

A 40H DESC 2PF12.2 1PD12.4 2PG16.4/

B 40H TO BE 8647.86 8.6579D+03 9877./

P0084480

P0084490

C 4H IS, 2PF12.2, 1PD12.4, 2PG16.4//

H28H THE LAST TWO LINES OF EACH/24H SET SHOULD BE THE SAME)

P0084500

P0084510

WRITE(NUVI ,7153) A CI S (1 ) , AC 1 S ( 2 ) , A C 1 S ( 3 ) , A C 1 S ( 4 )

.

1 AC1D(4),AC1S(20),AC1S(23),AC1D(5),AC1S(24)

P0084520

P0084530

C***t* I/O FORMAT RESCAN

C**«** INPUT CARDS 36, 37, 38

P0084540

P0084550

7146 FORMAT( 11,12,13)

READ( IRVI , 7146) I2I,IAC1I

P0084560

P0084570

7147 FORMAT(/ 37H FORMAT RESCAN - THE SECOND GROUP 0F/38H

10ULD AGREE WITH THE FIRST //15H 1 22 333/15H 4 EACH55

SET SHP0084580

, 666/P0084590

115H 7 88 999/1H ) WRITE(NUVI ,7147)

P0084600

P 0 0 8 46 1 0 7148 FORMAT( 14, 15, 16)

WRITE(NUVI,7148) 121(1,1), 121(2,1), 121(1, 2), 121(2, 2). IAC1I

P0084620

P0084630

C*«*t* INPUT CARDS 39, 40

71 49 FORMAT( 14, 2(11, IX, 12))

P0084640

P0084650

READ( IRVI, 7149) 121, IAC1I

7150 F0RMAT(/21H 2 ** 4 $$ 6 ((/7H 8 $$/1H ) P0084660

P0084670

WRITE( NUVI,7150)

7151 FORMAT (14, 3H **,1(I4,3H $$,(I4,3H (()))

P0084680

P0084690

WRITE( NUVI,7151) I 2 I ( 2 . 1 ) , I 2 I ( 2 , 2 ) , I AC 1 I ( 2 ) , I AC 1 I ( 4

)

C***t* END OF TEST SEGMENT 008

P0084700

P008471

0

C****« WHEN EXECUTING ONLY SEGMENT 008 , THE STOP AND END CARDS

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

P0084720

P0084730

C***** 1 AND 2 REMOVED

C= STOP

P0084740

P0084750

C= END

STOP

P0084760

P008C1

END

PREPARED BY USER

P008C2

DO NOT READ OR WRITE RECORD 2 . DOUBLE SPACE ON OUTPUT,

PREPARED BY USER

ID 2

DO NOT READ OR WRITE RECORD 4 . DOUBLE SPACE ON OUTPUT

PREPARED BY USER

ID 4

DO NOT READ OR WRITE RECORD 6 DOUBLE SPACE ON OUTPUT

999

ID 6 555554444

666 777777 8 3333331 1 1 1 12222222255555444444444444

7.7123456.7

8.889.9997.123456

5.44446.5 55 5 533.133.133.133.1444.1

NBS FORTRAN Test Programs Version 1 13
5555.15555.1 66666.166666.1 44.22

2.12.12.12.12.1666.333 4.333 4.333 4.333

- 0 . 1 E + 0 1 + 0 . 2 2 E

- 0 1 0 . 3 3 3 E 0 2 0 . 4 4 4 4 E 0 3 - 0 . 5 5 5 5 5 E- 0 3 6 . 6 6 6 6 6 ^ ^.^^ .^.^.^^^.^.^.^ 1.05.522.066.633.123455.0789

1 23.00456.88 0.i23E + 6l +6.987* 1 -6 . 2345*02 -6 . 6879E + 2 + 6 . 7E + 63 6.4E + 63

0.9876543E-04+0. 1357913E-04 - ; 0'

19. 3 4 + 0.2 468 E + 02 +.7 6 5 + 287.643.96 0.54 0 7E + 0243.96 + b.54 07E + 024 3.96 j-j-^^jij-^

+ 0. 10 + 06

-0.3340-04 -. 334-4 +0 . 765 7654000 0.1 234567890 1 0 + 1 0

• +0.987654321098760-1+0.987654321098760-01 .98765432109876-1

-.5555555420+03 -0.555555542+3

TABC

F0EFFGHlt«+T1 F$)TF

9.91.19.92.29.93.39.94.49.91.19.92.29.93.39.94.4

9 . 95 . 59 . 9 6.6 9.97.79.98. 8 9. 95.59.96.69 . 97 . 79.98.8

-9.9-9.9-9.9-9.9

- 0.9 9 0 + 0 1 - 0 . 9 9 0 + 0 1 - 0 . 9 9 0 + 0 1 - 0 . 9 9 D + 0 1 - 0 . 9 9 0 + 0 1 -.990 + 0 1 : ; 9 9 + q ^

-^ ^ ^ ^

-^ -^ 9999999999

+ 0.990 + 01 0.990 + 01 +. 9900 1 + .990

1

.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9

TFTFTFTFTF '

• 99999999+0.990+01 0.990+01 0.990+01+0.990+01 .9901

9 . 9 5 .59.96 .69. 97.79.98.89999999999999999TFFT9 .99.99.99.99.9

T F T F 44 4 4.5 55 55

123.45678E2 1234.5678 123.45678 12.345678 1.2345678 .12345678

9 8 76 . 5 49 8. 76 5 4E2 9 8 76.54 987 . 6548647860-486 . 4786E286 . 4786 865 7.8600 gg;^;'^';

9.8 76 5 598. 76 5 4E2 9876.54 9 8 7 . 6 5 4 86 4 7 8 60 - 3 8 6 . 4 7 86E 2 86 . 4 7 86 8657.8600 9876 . 54

122333544888611222

4556662334449661 11 7889993775 55899777

11112 334 559 880 11

6 778 995 441 222 00

Qttt*«**t**it t** ******t**it**t********1r t** tt*********************t*P0090010

c * * * t * C * t * * t AFRMT - (009)

P0090020

P0090030

C 1 1 « * « c * * « * t * * * t * * * * P0090040

****P0090050

Q * t * t * c * * t * * GENERAL PURPOSE

TO TEST SIMPLE FORMAT AND FORMATTED I/O STATEMENTS

ASA

7.1.3

REFSP0090060

.2 .2P0090070

C « 1 1 1

«

c * * * * * WHICH USE A-CONVERSION SO THAT THIS FEATURE MAYBE USED IN OTHER SEGMENTS

7.1.3

7.1.3

.2.2P0090080

.2.3P0090090

c « * * * t C t * 1 1

»

7.2.3

7.2.3

P00901 00

.8 P0090110

C 1 1 1 «

c * * t * * RESTRICTIONS OBSERVED

• ALL FORMAT STATEMENTS ARE LABELED 7 .2.3

P0090120

/57P0090130

c * * « « * C * 1 1 1

1

t H AND X DESCRIPTORS ARE NEVER REPEATED

* FIELD WIDTH IS NEVER ZERO

7

7 .2.3..2.3

3/54P00901 40

/ 1 8P0090 1 5 0 c * « * «

C « t « *

« IF THERE IS AN I/O LIST. THE FORMAT STATEMENT

CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER

7 .2.3. 4/22P0090160

P00901 70

C t » t «

t

C » 1 1 »

THAN H OR X)

t ITEMS IN I/O LIST CORRESPOND TO FORMAT DESCRIPTORS 7 .2.3.

P0090180

4/36P0090190

c » » « * t C * t » t

»

« FIELD WIDTH NEVER EXCEEDED BY OUTPUT 7 .2.3. 6/01 P0090200

P00902 1 0

c * * * « c * * 1 1 * READ AND WRITE STATEMENTS FOR ENTIRE SEGMENT FOLLOW P0090220

P0090230

C t * * * * c * * * 1

1

FORMATTED READ AND WRITE STATEMENTS WITH ALL 7 TYPES OF FIELDS. ONLY A (HOLLERITH) CONVERSION 7

. 1 .2 .3.2.

.3.8

1 /25P0090240

/ 1 6P0 0902 50

c * « * t * C 1 1 * t * IS USED IN THE FORMAT STATEMENTS. SOME A FORMAT 7 DESCRIPTORS ARE REPEATED

.2 .3.3 /01 P0090260

P0090270

C INPUT

COL . DATA TO THIS SEG. CONSISTS OF 3 DATA CARD IMAGES IN COLS. 1 - 5 5P0090280

P0090290

CARD 1 CARD 2 B=EF-* JKL/ ( )012TUVW+, .$X YZACOGH I P0RSMN06 78 ( C ) B2$9+

021 »A A345 P0090300

P0090310

CARD 3

c « * » «

»

ABCOEFGHI JKLMNOPQRSTUVWXYZ P0090320

P0090330

C 1 1 » « « c * * t » * SPECIFICATIONS SEGMENT 009 P0090340

P0010080

u NBS FORTRAN Test Programs Version 1
C***** WHEN EXECUTING ONLY SEGMENT 009, THE SPECIFICATION STATEMENTS P0010085

C«**«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0010090

C * * * * * IN COLUMNS i AND 2 R E M 0 V E 0 . P 0 0 1 0 0 9 5 C***** P0010100

C'= biMENSION ^^5(-5y-y^'35(-3-3-3y-g^ P00101 05

C= 1 ,MCA1 I (5) , CMA1S(5) P0010110

C= INTEGER BVI ,MAVi , LAVI ,MCA3I (2,3,3) P0010115-

C= REAL MVS.CVS.BCVS P0010120

C'r LOG i CAL M CA 1 B ( 7 ) , X| B ( 2 ) , a2 B ( 2 , 2 )V'A3 B ( 2,2,2)', AVB ,'EVB POO 10125

DIMENSION A1S(5),A3S(3,3,3),EP1S(33),IAC2I(2,7),AC2S(5,6) P00 9A1

1 ,MCA1 I (5)

,

CMA1S(5) P009A2

INTEGER BVI , MAVI , LAVI , MCA3 I (2 , 3 , 3 ) P0 09A3

REAL MVS, CVS, B CVS P0 09A4

LOGICAL MCA1B(7). A1B(2), A2 B ( 2 , 2 ) , A3 B ( 2 , 2 , 2 ), AVB . E VB P009A5

C*««** POO 101 30

C***** I N P U T - 0 U T P U T . T A P E ASSIGNMENT STATEMENTS P00903 5 0 C*"* *'* * P00 70 1 5 0 C***** WHEN EXECUTING ONLY SEGMENT 009, THE FOLLOWING TWO STATEMENTS P0070155

C**«*« NUVI = 6 AND IRVI = 5 MUST HAVE P0070160

C*«**« THE C= IN COL 1 AND 2 REMOVED. P0070165

C= NUVI = 6

'. POO 70 170

C= IRVI =5 P0070175

NUVI = 6 P0 09B1

IRVI = 5 P0 09B2

t**tt* Pq0 70180

WRITE (NUVI, 0090) P0090360

READ (IRVI. 0091) MVS, I AC2 I ( 2 , 2 ) , MAV I , AC2S ( 4 , 2 ) , MCA1 I ( 1 ) , LAVI . P0090370

1 A2B(1 ,2) ,A1B(2) , BCVS. MCA1B(2), BVI, CVS. E VB , A 1 S ( 2 ) , EP 1 S ( 9 ), P00903S0

2A3S( 1 . 1 , 1 ) ,A3B(2 ,2. 1 ) ,MCA3i ( 1 ,2.3) , M CA3 I ( 2 , 1 . 2 ) , MCA3I(1,i.3) P0090390

WRITE (NUVI, 0092 ) BVI, MVS, CVS, MAVI, EVB. MCAIKD, EP1S(9),- P0090 400

1 A1S(2), A1B(2), MCA1B(2), IAC2I(2,2), AC2S(4,2), P00904 1 0 2 LAVI, BCVS, A2B(1.2), M CA3 I ( 1 , 1 , 3 ) , A3S(1,1,1), P0090420 . 3 MCA3I (2. 1 ,2) , MCA3I (i ,2,3), A3B(2.2.1) P0090430

C***** FORMATTED READ AND WRITE TO TEST HOLLERITH FIELDS 7 . 2 . 3 . 8 / 22P0 0 9 0 4 40

C***** WHERE FIELD WIDTH IS LESS THAN THE WORD LENGTH 7'. 2 . 3 . 8/28P0 0904 5 0 C**«** CAPACITY OF THE MACHINE ' P0090460

WRITE (NUVI, 0093 ) F»0090470

READ (IRVI, 0094 ) CMA1S(2), CMAISd), LCCVI. AVB. BVI P0 090480

WRITE (NUVI, 009 5 ) BVI, AVB. CMA1S(2), LCCVI, CMAISd ) P0090490

C*«*«* FORMATTED READ AND WRITE TO TEST HOLLERITH FIELDS 7 . 2 . 3 . 8 / 2 0 P 0 0 9 0 5 0

0

C*«**« WHERE FIELD WIDTH IS GREATER THAN THE WORD LENGTH' ' 7 . 2 . 3 . 8 / 2 5 PO 09 0 5 1 0 C«**** CAPACITY OF THE MACHINE P0090520

W R I T E ( N U VT , 0 0 9 6 ) P 0 0 9 0 5 3 0 READ (IRVI, 0097) MRRVI P0090540

^ P J Y E ( N U V I , b 0 9 8 ) M R R VI P 0 0 9 0 5 5 0 C* »* «

* PP090 560

C *'>'** PO 09 0 5 70

C*«*«* FORMAT STATEMENTS FOR THE ENTRIRE SEGMENT FOLLOW P0090580

C * * * * * FORMATS TO T E ST A CONVERS I ON^ FIELD W I DTH I S

^.^..^..^..^.....^..^..^ ^ p ^ ^ ^ ^ ^ ^

C***** FROM 1 TO 4 CHARACTERS. SOME A DESCRIPTORS ARE 7 . 2 . 3 . 3 / 0 1 PO 0 90 60

0

C***** REPEATED. P00906l6

0090 FORMAT ( 1 H 1 , 1 X , 26HAF RMT - ( 009 ) A- CONVERS I ON / / 2X . P0090620

li7HASA REF - 7.2.3.8//40H EACH PAIR OF LINES SHOULD BE 1 DE NT I CAL / PO 0 9 063

0

28X,26HF0R COMPUTERS STORING F0UR/8X. 27H0R MORE CHARACTERS PER HOROP0090640

3) P009b65b

0091 FORMAT ( 2(A1), 2(A2), 3(A3), 3(A4), A1 , A2, A3, A4, 6(A3)) P0090660

0092 FORMAT (// 29H AB CDE FGH I J K LMNOPQRSTUVWX YZ/ ZX . 2(Ai), 2(A2), P009067(j

1 3(A3), 3(A4)//12H =-«/() + ,.$/ 2X, A1 . A2, A3, A4 // P0090680

' 2 2 OH 0123456789 + AB2$(C)/ 2X. 6 A3 ) P 0 0 9 0 6 9 0 C*t:«»* FORMATS TO TEST A CONVERSION WHERE FIELD WIDTH 7 . 2 . 3 . 8 / 22P0 090 70 0 CV**T* IS. LESS THAN THE WORD LENGTH CAPACITY OF MACHINE 7Tf. 3 8/^8 P 0 0 9 0 7 1 O' 0093 FORMAT (//35H TEST A CONVERSION - ADDING BLANKS/40H EACH PAIR 0FP0090720

1 LINES SHOULD BE IDENTICAL) P0090730

0094 FORMAT ( 5(A1)) P0090740

0095 FORMAT ( / /4H A / 3x; A3/ /4H *7 3X^ A3 / 74H 0/ 3X'; A377 P0090 75 b

1 4H 1/3X. A3 //4H 2/ 3X.A3) P0090760

C * ** » FOR M AT S T 0 t E S T A CO N VE R S I ON W H E R E F I ELD WIDTH ^^-^ ^ ^ ^ ^ ^ P009077b

Ct*««* IS GREATER THAN WORD LENGTH CAPACITY OF MACHINE 7 . 2 . 3 . 8 / 2 5 PO 0 9 0 7 8

0

NBS FORTRAN Test Programs Version 1 15
0096 F0RMAT(/25H TEST A FIELD TRUN CAT 1 ON / 3 7H 2ND LINE SHOULD PART I ALLP0090790

1Y MATCH 1ST) P0090800

00'9"7 FORMAT ( A2 6 ) P0b90ei6

0098 FORMAT (// 28H AB CDE FGH UK LMNOPQRSTUVWXYZ / 2X, A26) P0090820

C«***» END OF TEST SEGMENT 009

C»**«« WHEN EXECUTING ONLY SEGMENT 009 , THE STOP AND END CARDS

C«*tt* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS'

C»«*«t 1 AND 2 REMOVED

P0090830

P0090840

P0090850

P0090860

C= STOP P0090870

C= END P0090880

STOP P 0 09 CI END P009C2

B = EF-« JKL/ ( )012tUVW*. .$X YZACDGH I PQRSMN0678 ( C ) B2$9 + A3 4

5

QZ1 *A

AB CDE FGH I jk LMNOPQRSTUVWXYZ

ttt**«**t**t***« t** *t*t*t***t****t*ttt*t***t***ttttt*t*t**t*t*P0100010

DATA2 (010)

P01 00020

P0 1 00030

PO 1 00040

*t**t*t**t*********ttt***t**«*t*t***********t«4t**t«t**t******« P0100050

PO'l 0 0 0 6 0 P0 1 00070

PC 1 00080

P01 00090

GENERAL PURPOSE

TO TEST CONTENTS OF VARIABLES THAT WERE FORMED BY' DATA STATEMENTS IN SEG. DATA1 - (003)

t** *******ttt***»***«*tt*****t*********t***t******t*******t********P0030010

P0030020

DATA1 - (003)

COMPLETE WITH DATA2 - (010)

P0030030

P0030040

PC 0300 5 0 *t****«tt**ttt t** t***********tt********************it*t***«****P0030060

ASA REFSP0 03 0 0 70

7.2.2 P0030080

P0030090

7.2.2/27P0030100

8 . 4 . 1 . 1 / A 0 P 0 0 3 0 1 1 0 10.1 . 2/08P0 030 1 20

7!2 .2/39P0 030 1 30

10.2.4/47P0030140

1 OVi . 2/ 1 0P00301 50

7.2.2/28P0030160

P003 0170

GENERAL PURPOSE

TO TEST FORMAT OF DATA STATEMENT

RESTRICTIONS OBSERVED

NO DUMMY ARGUMENTS OR EXTERNAL FUNCTION NAMES

APPEAR IN DATA STATEMENTS

NO INITIALY DEFINED ITEMS APPEAR IN BLANK COMMON

STORAGE UNITS INITIALI2ED ONLY ONCE

SUBSCRIPTS ARE INTEGER CONSTANTS

EXPLICIT VARIABLES

AVI IS INTEGER

JVS is REAL

SPECIFICATIONS SEGMENTS 003 AND 010

P0030 1 80

P 0 0 3 0 1 9 0 P0030200

P0030210

P0030220

WHEN E)(ECUTING ONLY SEGMENTS 003 AND 0 1 0 . THE SPE C 1 fT CAT I ON P0010140

STATEMENTS WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0010145

IN COLUMNS 1 AND 2 REMOVED. P0010150

P0010155

P 0 0 1 0 1 6 0 P001 0165

P0010170

P001 01 75

POO 10180

P001 01 85

P 0 0 1 0 1 9 0 P0010195

P0 0 1 0200

= DIMENSION IAC2I(2,7), EP1S(33), AC2S(5,6)

= 1 ,AC3S( 1 , 1 .3)

= INTEGER AVI , M CA3 I ( 2 . 3 , 3 ) . 111(5)

= REAL JVS

= LOGICAL MAVB.MBVB.MCVB, M C A 1 B ( 7 ) , GH2 B ( 1 . 2 ) , G I 3 B ( 1 . 1 , 2 ) , GG 1 B ( 2

)

= DOUBLE PRECISION AVD , B VD , C VD , 0 VD

= 1 ,DPA2D(2,2),MCA3D(1,4,2),A1D(4)

= COMPLEX ApSyC . B ey e , CHE VC , D CVC . L L 1 C ( 32 ) , LM2 C ( 8 ^i^^.L.N3 C.( 9 . 2 , 2 ) * * t * * DIMENSION IAC2I(2,7). EP1S(33), AC2S(5.6) P003A1

1 ,AC3S( 1 , 1 .3) P003A2

INTEGER AVI . M CA3 I ( 2 , 3 , 3 ) . 111(5) P003A3

REAL JVS P003A4

LOGICAL MAVB.MBVB.MCVB, M CA 1 B ( 7 ) . GH2 B ( 1 . 2 ) . G I 3 B ( 1 . 1 . 2 ) . GG 1 B ( 2 ) P003A5

DOUBLE PRECISION AVD . B VD . C VD . DVD P003A6

1.DPA2D(2.2).MCA3D(1.4.2).A1D(4) P003A7

COMPLEX ADSVC, BCVC. CHE V C , D CV C , L L 1 C ( 32 ) . LM2 C ( 8 , 4 ) , L N3 C ( 9 . 2 , 2 ) P003A8

C«*««* TEST DATA INITIALIZATION OF INTEGER CONSTANTS TO 5.1.1.1 P0030230

16 NBS FORTRAN Test Programs Version 1
c * • t

C

1 1 * C t «

t

C « t

«

c * «

t

* t

'« INTEGER VARIABLES P0030240

DATA I1I(1),MCA3I(1 ,2,1),MCA3I(2,2,2), IAC2I(2,5>, IAC2I(2,6>, P0030250

AHCA3K2. 1 , 1 )/6.2*l6. 3*2 46/ P6b30266

t« TEST DATA INITIALIZATION OF REAL CONSTANTS TO 5.1.1.2 P0030270

-t REAL VARIABLES P0630280

DATA EP1S(8).EP1S(10).EP1S(12),AC2S(5,5),EP1S(11).AC2S(5,,3). P0030290

AAC2S(5.2)/2*6. ,2*-750.05. .24615E3.2.4615E2.3.54 67 4E+3/ P0030300

TEST DATA INITIALIZATION OF DP CONTANTS TO 5.1.1.3 P0030310

P0030320

P0030330

P0030340

P0030350

P0030360

P0030370

P0030380

P0030390

** DP VARIABLES

DATA BVD .DPA2D(2.1).CVD.DPA2D(1.2), DVD . DPA2D ( 2, 2 ) / +3 4 56 7890

A3. 345. 67890 1D+2. 11 2233. 5D-08. 11 .22335D-4. 3. 401 2,0.34013/

Ct*«t* TEST DATA INITIALIZATION OF COMPLEX CONSTANTS TO 5.1.1.4

C*"*"*Tt COMPLEX VARIABLES

DATA ADSVC.LN3C(9.1,2),LL1C(30).LN3C(8,2,2),LM2C(8,3),LN3C(9.1,

ALL1 C(32) . LN3C(8. 1 .2) /2* < 1 1 . 1 , 22 . 22 ) , (-3 .45E1 , - 67.8E-1 ) . B(-34.5E0.-6.78E0),(10.E0,-20.E0).(1.0E1.-2.0E1),(-20.0E1,+4.E3)

ID

C * * t C * «

«

C(-200.E0,+4000.E0)/ P0030400

** TEST DATA INITIALIZATION OF LOGICAL CONSTANTS TO 5.1.1.5 P0030410

* LOGICAL VARIABLES P0030420

DATA HAVB ,MCA1B(6), MBVB / 2 * . TRUE .

, . F AL SE . / P0030430

** TEST DATA INITIALIZATION OF HOLLERITH CONSTANTS --y-y--^ P0030440

DATA GI3B( 1 , 1 ,2) ,GG1 B( 1 ) ,EP1S( 1 5) /2HN0.2*2HAD/ P0030450

** TEST DATA INITIALIZATION OF A MIXTURE OF ALL TYPES 61= P0030460

** CONSTANTS AND VARIABLES IN ONE DATA STATEMENT P0030470

DATA I 1 I (2) , lACZi ( 1 , 5) . I AC2I ( 1 , 3) , I 1 I ( 5 ) , I AC2 I ( 2 , 4 ) . ' p6030486

AM C A3 1(1, 1,2), AVI.EP1S(13),AC2S(2,6),AC2S(1,6),AC3S(1,1,1). P0030490

BAC2S(3,6) , AC3S( 1 , i , 2) , AC2S(4.6) , AVD , A1 D ( 1 ) . DPA2D ( 1 , 1 ) . P603b5b0

CMCA3D(1,1,1),A1D(2),MCA3D(1.1,2),LL1C(29),LN3C(8,2.1),BCVC, P0030510

b L M 2 C ( 8 . 4 ) . G H 2 B ( 1 , 1 ) , G I 3 B ( 1 , 1 , 1 ) . M C V B / 3 * 0 . 4 * - 7 5 0 , 2 * 0 . , 2 * 2 4 6 ^15 '.' P 0 0 3 0 5 2 0 E354674.E-2,354.674E+ 1, 35467. 4E-01 . 3*-. 29505,-29.50 + 3, P0030530

F3456.78901D+01,0.3 4 5678901D+5.2*(1.11E1,+2 2 2.2E-1),(-34.5.-6.7 8). P003054 0 G(-. 345E2. -678. E-2), 2*. TRUE. , .FALSE./, 111(3), 111(4), P0030550

HMCA3 I ( 1 , 2 , 2 ) . AC2S( 5 , 6) , JVS , EP 1 S ( 1 4 )

, AC3S ( 1 . 1 , 3 ) . I AC2 I ( 1 . 4 ) , PO 03 0 5 60

ICHEVC.LL1C(31),DCVC,LM2C(8,2),A1D(3),MCA3D(1,3.1),A1D(4), POO 3 0 570

JMCA3D( 1,4,1), MCA1B(7),GH2B(1,2) / 2 * 1 0 , +2 46 , P 0 03 0 5 8

0

K-. 75 00 5E03 .- 7 . 5 00 5E + 02,2HBC.2H* = .2H P , 2 * ( 1 0 . . -20 . ) . P0030590

L(-20 0 .

, + 4000 .), (-2 00 0 .E- 1 , +400 .E 1 ), + 1 1 22 .3350-6 , O.bbbbl 1 223350 + 2. POO 3 0600

H3 4. 0011,0.034014. 2*. FALSE./ P0030610

C * * *

c * * * c * * *

* *

* * C t « « END OF SEGMENT 003

C * t * C**** * d U TP 11 t f J P E ASSIGNMENT SfATE WENT . NO I NPUt TAPE

Q * t * * * C * * * c * * * c=

P0030620

P0100100

P01001 10

P0100120

C * * * ;

100

WRITE (NUVI.100)

FORMAT (1H1.1X,

A /2X.17HASA REFS - 7.2

32HDATA2 - (010)

2//2X,7HRESULTS)

DATA STATEMENT USE/

101

** WHEN EXECUTING ONLY SEGMENTS 003 AND 010 THE FOLLOWING STATEHENTP00701 90

** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070195

NUVI = 6 P0070200

NUVI = 6 P010B1

P0070205

P0100130

P01 001 40

P0100150

PO 100 160

TP0100170

PO 100 180

P0100190

P 01002 00

P0100210

P01 00220

P0100230

P01 00240

P0 1 002 5 0 PO 100260

P0 1 0 02 70

P0100280

P0100290

PO 10 0300

P0100310

P 0 1 0 0 3 2 0 P0100330

WRITE (NUVI, 101)

F0RMAT(/35H LINE 1 OF EACH GROUP IS HO L LER I TH / 36H INFORMATION

AEST IS SUCCESSFUL IF/37H EACH GROUP CONTAINS THE SAME VALUES)

WRITE (NUVI. 102) 111(1), 111(2), IAC2!(1,5), IAC2I(1,3),

A MCA3I(1.2,1), MCA3I(2,2,2), II K3). 111(4),

B IAC2I(2,5), IAC2I(2.6). M CA3 I ( 2 . 1 , 1 ) , . C MCA3I (1 ,2.2) , 111(5), rAC2I(2.4). MCA3I(1.1.2)

D AVI

102 FORMAT ( /25X, 1H0/4( 126/)//

24X,2H10/4( 126/)//

23X,3H246/4( 126/)//

22X,,4H- 7 5 0 / 4 ( 1 26 /) ) WRITE (NUVI, 103) EP1S(8), EPlSdO), EP1S(13), AC2S(2,6).

A AC2S( 1 , 6) , AC3S( 1 , 1, 1 ) ,EP1S( 1 1

)

, AC2S( 5 ,3)

,

" B AC2S(3.6), AC2S(5.2), AC3S ( 1 . 1 , 2")

, ktZSUTbY

C EP1S(12), AC2S(5,5), AC2S(5,,6), JVS

103 FORMAT ( / 22X , 4Hb . 00 / 4 ( F26 . 2 / ) / / A 20X,6H246.15/4(F26.2/)//

NBS FORTRAN Test Programs Version 1 17
B 19X,7H3546 . 74/A(F26.2/) , P0 1 003 40

C 1H1,18X,7H-750.05/4(F26.2/)) P0100350

WRitE (NUVI . 104)A0SVC, LLiC(29). LN3C(9,1,2). LN3C(8, 2.1), PO 1 0 03 60

A BCVC,, LL1C(30), LM2C(8,4). LN3 C ( 8 , 2 , 2 ) P01 00370

B CHEVC. LL1C(31), LM2C(8,3), LN3C(9.1.1). P0100380

C DCVC, LL1C(32), LH2C(8,2). LN3C(8,1,2) P0100390

104 FORMAT ( /9X,17H 1 1 . 1 2 2 . 2 2 / 4 ( F 1 4 . 1 , F 1 2 . 2 / ) / / P0 1 00 400

A 8X,18H-34.50 -6.78/4(F14.2,F12.2/)// P0100410

B 8X.18H 1 0 . 00 -20.0 0 / 4 (F14.2,F12.2/)// P 0 1 0 04 2 0 C 5X,21H -20 0.00 40 0 0 . 0 0 / 4 ( F 1 4 . 2 , F 1 2 . 2 / ) ) P0 1 0 0 43 0 WRitE (NUVi.lOS) AVD, A1D(1), DPA2D(1,1), MCA3D(1,i,1), P0 1 00 4'i0 A BVD, A1D(2), DPA2D(2,1), MCA3D(1,1,2), P0100450

B CVD, A1D(3) ,DPA2D( 1 ,2) , MCA3D(1,3,1), P0 1 0 0 460

C DVD, A1D(4), DPA20(2,2), MCA3D(1,4,1) P0100470

iO'5 FOR MAT ( / 1 6X , 10H-0. 2950 + 05/4(026. 3/)//

"

P 0 1 0 0 4 8 0 A 11X,15H0. 3456789010 + 05/4(026. 9/)// P0100490

B 13 X ,1 3 HO. 11223350-02/4(026. 7/), P 0 1 0 0 5 0 0 C 1H1,17X,8H0. 340 + 1 3 / 4 ( 026. 2 /)) ' P0 1 0 0 5 1 0 WRITE (NUVI, 106) MAVB. MCA1B(6). GH2 Bd.l), GI3B(i,1,i), P0 1 0 0 5 2 0 A MBVB, MCVB. MCA1B(7), GH2B(1,2), GGIB(I). P0100530

B EP1S(15), G13B(1.1,2), P0 1 00 5 40

C EP1S(14). AC3S(1,1,3), IAC2I(1,4) P0100550

106 FORMAT (//20X.4H II UdZi,/)// P 0 1 0 0 560

A 20X,4H F/ 4(L24/)// P0100570

B 22X,2HA0 /2(22X,A2/)/ PO 1 0 0 5 8 0 C 22X,2HN0 / 22X.A2// P0100590

D 22X,2HBC / 22X,A2// ', P0 1 0 060 0 E 22X.2H*= / 22X,A2// P0100610

F 22X,2H P / 22X,A2) P0 1 0 062 0 C*«»«» END OF SEGMENT 010 P0100630

Ct**«t WHEN EXECUTING ONLY SEGMENTS 0 0 3 AND 010. THE STOP AND END P0 1 0 0640

C***«* CARDS WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0100650

Ctit** IN COLUMNS 1 AND 2 REMOVED P0 1 00660

C= STOP P0100670

C= END PO 1 0 06 80

' STOP P010C1

END P010C2

Ctttttt**tttt*t***t***t**t***t***t*t*********«*ttt**t**t*t***t**t*******P0110010

C

•'»'»"*

« P 0 1 1 0 0 2 0 C««»«» AASGN "(Oil) P01 10030

C***«« P0 1 1 0 040

C«t»«»t*«««««*t«tt«*tt«*««tt«**t*t*tttt*t«*ttt«««t«*««*«t««t*««*«»«t*t«*P0110050

C* *'* * » GENERAL PURPOSE ASA RE F PO 1 1 0.0 6 0 Ctttt* t TO TEST VERY SIMPLE ARITHMETIC ASSIGNMENT 7.1.1.1 P0110070

C»**«« STATEMENTS, SO THAT THIS STATEMENT MAY BE P0 1 1 0 0 8 0 Qt.ttt USED IN LATER SEGMENTS P0110090

Ct»««t t to TEST THAT ALL tYPES OF INTEGER AND REAL CONSTANTS 5 . 1 . 1 P0 1 1 0 1 00

Cttttt MAY BE FORMED 5 . 1 . 1 . 1 P 0 1 1 0 1 1 0 C* «'«Vt 5 .1.1.2P0110120

C***tt GENERAL COMMENTS P0110130

C:*»*'t* t ONLY REAL AND INTEGER TYPES ARE INCLUDED IN P01 10140

C*«*t* THIS SEGMENT - NO MIXING OF TYPES P0110150

C»«*«'* »' IN ORDER NOT TO EXCEED THE WORD LENGTH CAPACITY OF P0110160

Ctt««t SOME COMPUTERS, INTEGER CONSTANTS ARE LIMITED TO P0110170

C«««»* 5 DIGITS AND REAL CONSTANTS TO 7 DIGITS. P0110r80

C*tt«t P01 10190

C*'»»'tt S P E C i F I C

' A t 1 0 N S SEGMENT Oil P0 1 1 02 00

Ctttt* P0010210

t'ti'tt't WHEN EXECUfrNG^^'b^^^^^^ SEGMENT Oil. THE SPECIFICATION STATEMENT P0 0 1 02 1 5 C*t««» WHICH APPEARS AS A COMMENT MUST HAVE THE C= REMOVED P0010220

C= bTHENSION IAC1 I (5 ) . IAC2I (2 , 7) , AC1 S(25 ) ,AC2S(5,6).A2S(2,2) P0010225

DIMENSION IAC1I(5).IAC2I(2.7),AC1S(25),AC2S(5.6),A2S(2,2) P011A1

C *'«"t V t P 0 0 1 0 2 3 0 Ct.ttt OUTPUT TAPE ASSIGNMENT - NO INPUT DATA P0110210

C» 'tttt P 0 0 7 0 2 1 0 C«ttt» WHEN EXECUTING ONLY SEGMENT Oil. THE FOLLOWING STATEMENT P0070215

Ctttt. NUVI = 6 MUST HAVE tH E C = I N COLUMNS 1 AND 2 REMOVED. P 0 0 7 0 2 2 0 Ct«t«t P0070225

18 NBS FORTRAN Test Programs Version 1
C= NUVI = 6 NUVI = 6 P0070230

P01 1 B1

C 1 1 * 1

1

WRITE (NUVI, 110)

P0070235

P0110220

110 FORMAT (1H1.1X. 37HAASGN - (011) SIMPLE REAL AND

1ITHMETIC ASSIGNMENT STATEME NTS / 2X . 1 6HASA REF. - 7 INTEGER/10X,32HARP01 10230. 1 . 1 //34H LINE 1P01 10240

2 OF EACH PAIR IS HO L LER I TH / 1 3H I N FORMAT I 0 N / / 1 7H

C*tt** HEADER FOR SEGMENT Oil WRITTEN

INTEGER RESULTS)P01 10250

P0 1 1 0260

C««**t TEST ASSIGNMENT

Ct«t«t TO VARIABLES

OF UNSIGNED INTEGER CONSTANTS 7.

5 .

1 .

1 .

1

1

. 1 /40P0 1 1 02 70

. 1 / 1 5P0 1 1 02 8 0 HRRVI = 1 JACVI = 12345

P0 1 1 0290

P0 1 1 0300

KBCVI = 000

C*ttt* TEST ASSIGNMENT OF SIGNED INTEGER CONSTANTS TO 7. 1 . 1 P0110310

.1/40P0 1 1 0320

C*t«.t VARIABLES

MCAVI = +2

5. 1 .1/11P0110330

P0 1 1 0 3 40

LCCVI = -3

MDCVI = - 8765

P0 1 1 03 50

P0 1 1 0360

NECVI = +6912

C«t»*« TEST ASSIGNMENT OF UNSIGNED INTEGER CONSTANTS 7. 1 , 1 P0 1 1 03 70

. 1 /40P0 1 1 0380

C**«*« TO ARRAYS

IAC1 1(1) =0

5. 1 . 1 .1/15P0110390

P0 1 1 0 40 0 IAC2I (2. 1 ) = 02468

IAC2I (2.2) = 00

P01 1 041 0 P0 1 1 0420

IAC1 I (3 ) = 4444

C.tttt TEST ASSIGNMENT OF SIGNED INTEGER CONSTANTS 7. 1 . 1 P0 1 1 0 43 0

. 1 /40P0 1 1 0440

Ct*t«t TO ARRAYS

IAC2I ( 1,1) = +45

5. 1 , 1 /I 1P0 1 1 0450

P01 1 0460

IAC1 1(4) = + 4321

IAC1 1(2) = -23

P01 10470

P0 1 1 0480

IAC2I (1 .2) = - 3123

Ct»«t« TEST ASSIGNMENT OF UNSIGNED REAL CONSTANTS 7. 1 . 1 P0110490

. 1 /40P0 1 1 0 5 00

Cttt«« TO VARIABLES (BASIC REAL CONSTANTS)

ACVS = 1.0

5. 1 . 1 .2/18P0110510

P0110520

BCVS = 358.6724

C**t*« TEST ASSIGNMENT OF SIGNED REAL CONSTANTS 7. 1 . 1 P0 1 1 0 5 30

. 1 /40P0 1 1 0 5 40

C»t*tt TO VARIABLES (BASIC REAL CONSTANTS)

C t « * * * 5. 1 . 5.

1

1 .2/18P01 10550. 1 / 1 1 P01 1 0560

CCVS = -2.0

DCVS = +3.0

P01 10570

P0 1 1 0 5 80

ECVS = -2714.250

FCVS = +29.30542

P01 1 0590

P0 1 1 0600

C*»*«t TEST ASSIGNMENT

Cttttt TO ARRAYS (BASIC

OF UNSIGNED REAL CONSTANTS

REAL CONSTANTS)

7.

5.

1 .

1 .

1

1

. 1 /40P01 1 061

0

.2/18P01 10620

C t * t * * AC1S(2) = 86.27

5. 1 .1/11P0110630

P01 10640

AC2S(1 ,2) = 1034.2

ACISd ) =0.0

P0 1 1 0650

P01 1 0660

AC2S( 1 , 1 ) = 0.00000

C**itt TEST ASSIGNMENT OF SIGNED REAL CONSTANTS 7. 1

.

1 P01 1 0670

. 1 /40P0 1 1 0680

Ctt«t* TO ARRAYS (BASIC

C * « * 1

1

REAL CONSTANTS) 5. 1 . 5.1

1 .2/18P0110690

.1/11P0110700

AC2S(2.2) = +345.678

AC1S(3) = -2.5

P0110710

P0 1 1 0720

AC2S(2. 1 ) = -5 .66

AC1S(4) = +1.111111

P01 10730

P0110740

C«ttt« TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL

Ctttt* CONSTANTS WITH NO DECIMAL DIGITS TO BOTH

5. 1 . 1 .2/22P0110750

P0 1 1 0 760

Cttttt VARIABLES AND ARRAYS

GCVS = 1. P0 1 1 0770

P0 1 1 0780

HCVS = -2.

AADVS = +3.

P0 1 1 0790

P0 1 1 0 800

AC2S(3, 1 ) = 4. AC2S( 1 .3) = +5

.

P0110810

P0 1 1 0820

AC1S(5) = -6.

Cttttt TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5. 1 . 1 P01 1 0830

.2/22P01 10840

Cttttt CONSTANTS WITH NO INTEGER PART TO BOTH

Cttttt VARIABLES AND ARRAYS

P0 1 1 08 5 0 P0110860

NBS FORTRAN Test Prograiiis Vers ion 1 19
BBDVS = .0 P01 10870

CCDVS = +.23 P0 1 1 0880

DDOVS = -.716 P01 1 0890

AC1S(6) = -.7 P0 1 1 0900

AC2S(4. 1 ) = .81 P01 10910

AC1S(7) = +.9 P01 1 0920

Ct.*t» TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5.1.1 .2/25P01 1 0930

C**tt« CONSTANTS WITH UNSIGNED AND SIGNED DECIMAL 5.1 .1 .2/32P0 1 1 0940

C***t* EXPONENTS TO BOTH VARIABLES AND ARRAYS P01 1 0950

EEDVS = 1 .05E02 P01 10960

FFDVS = -7.6E1 P0110970

GGDVS = +332. 4E0 P0 1 1 0980

HHDVS = 51 .32E-1 " P0 1 1 0990

OODVS = +5.34E-3 P0111000

PPDVS = -14.19E-2 P01H010

QQDVS = -9.9E+2 P0111020

RRDVS = +10.5210E + 3 P0H1030

SSDVS = 4.56E+1 P0111040

AC2S( 1 . 4 ) = 66 5.2E0 P6hT050

ACISdl ) =-52.9E01 P0111060

AC1S( 9 ) = + 78.5 64E2 •" P0111070

AC2S(5,1) = -3.4567E+3 P0111080

AC2S(1 ,5) = 61 .62E + 2 P01H090

ACISdO) = + 0.023E + 1 P0111100

AC1S( 8 ) = 94 . 333E-1 POlUllO

AC1S(12) = +0.3524E-2 P0111120

AC2S( 3,2 ) = -743.2E-3 P0H1130

Ctt*** TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5 . 1 . 1 . 2 / 22P 0 1 1 1 1 4

0

CTt«T« CONSTANTS (NO DECIMAL PART) WITH DECIMAL ^ ^

.^...^^^^^^^^ C»*«t* EXPONENTS TO BOTH VARIABLES AND ARRAYS P0111160

TTDVS = 1 . EO POl'l 1 1 70

UUDVS = +123. E2 P0111180

VVDVS = -1 1 .E3 P01 11190

WWDVS = 1 44 . E-1 P01 1 1 200

XXDVS = -12.E-2 P01H210

YYDVS = +364 5. E-3 P0111220

22DVS = r.E + 4 P0111230

CMAVS = -200 . E + 1 P0111240

CMBVS = +99.E + 2 P0111250

AC1S(13) = +0.E00 P0111260

AC2S(2,5) = -1512.E2 " P0111270

AC2S(4.3) = 214.E3 P01 1 1280

AC1S(15) = 34. E-1 P 0 1 1 1 2 9 0 AC1S(14) : -4.E-2 P0111300

AC2S( 3,4 ) = + 5 3 2 1 4.E-4 P01 11310

AC2S(4, 4) = +6.E + 3 P01 1 1320

AC2S{2,3) = 72.E + 4 P0111330

AC1S(16) = -813. E + 1 P0111340

C*t*Tt TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5 . 1 . 1 . 2 / 22 PO 1 1 1 3 5

0

C«*«** CONSTANTS (NO INTEGER PART) WITH DECIMAL 5 . 1 . 1 . 2 / 2 6 P 0 1 1 1 3 6

0

C * *"*"*"* EXPONENTS TO B OT H V A R I A B L E S AND ARRAYS P 0 1 1 1 3 7 0 CMCVS : .234E0 P0111380

CMDVS - -.3E2 F>0111390

CMEVS = +.44E1 P0111400

CMFVS = .36E-3 " P01 1 1410

CMGVS = + . 9E-4 P01 1 1 420

CMHVS = - . 1 OE-2 P01 1 1430

CMOVS = .777E+1 P0111440

CMPVS = -729E + 3 P01 1 1 450

CMOVS = +.04E+2 P0111460

AC 1 S ( 1 7 ) = .90 El P 0 1 1 1 4 7 0 AC2S(4,2) = +.810E0 P0111480

AC1 S( 1 9) = - . 7E3 P0111490

AC2S(3,3) = .62E+3 P0111500

AC1S(21) = +.5310E + 'i P0111510

A2S( 1 , 2 ) = - . 442E + 2 P01 1 1520

AC1S(18) = .3E-4 P0111530

AC2S(2,4) = +.25E-03 P0111540

20 NBS FORTRAN Test Programs Version 1
A2S(2.1) = -.163E-2

Ct.t** TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL

C*»*«* CONSTANTS (FORMED BY PLACING DECIMAL EXPONENT"

C*«*** AFTER INTEGER CONSTANT) TO BOTH VARIABLES AND

P01 1 1550

5.1.1.2/34P0111560

P01 1 1570

P01 1 1 580

c * * « * * ARRAYS PO 1 1 1 590

AVS = 709E3 PC 1 1 1 600

BVS = +81842E0 PO 1 1 1 6 1

0

CVS = -9E5 PO 1 1 1 620

DVS = 627E+2 P01 1 1 630

EVS = +53E+3 PO 1 1 1 640

FVS = -4E+04 . P01 1 1650

GVS = 1463E-2 P01 1 1660

HVS = +2E-3 P01 1 1670

PVS = -355E-1 P01 1 1680

AC1S(24) = 29E5 P01 1 1690

AC1S(20) = +4072E3 P0111700

AC2S(5.4) = -61835E2 P01 1 1 71 0 AC2S(3.5) = 829E+1 P01 1 1 720

AC1S(22) = AC1S(25) = AC2S(4.5) : A2S(2,2) = AC1S(23) = VERIFY

+03E+2

-1E + 3 3404E-4

+55E-5

-761E-1

CORRECTNESS

P01 1 1 730

P01 1 1740

P01

P01

P01

P01

P01

P01

1 1750

1 1 760

117 7 0

1 1 780

1 1 790

11800

C * * * * * c * « * * * OF ASSIGNMENT BY WRITING

THE INFORMATION

WRITE (NUVI.III) MRRVI, JACVI, KBCVI, MCAVI. LCCVI, MDCVI. NECVI

( I AC1 i < ivn , I VI = 1 , 4) , ( ( iAC2i ( I VI , jvi ) . I VI = 1

,

2) -j\jf-Y;z) P01 1 1 81 0 WRITE

WRITE

( NUVI

(NUVI

112)

113) ACVS, BCVS, CCVS, DCVS. ECVS, FCVS. AC1S(2)

AC2S(1,2), ACISd), AC2S(1.1), AC2S(2,2).

AC1S(3), AC2S(2,r), AC1S(4), GCVS, HCVS,'

AADVS, AC2S(3,1)

P01

P01

P01

P01

P01

1 1820

1 1830

11840

il 850

1 1860

WRITE (NUVI. 114) AC2S(1,3). AC1S(5), BBDVS, CCDVS, DDDVS, AC1S(6),P01

A C 2 S (.4 , 1 ) , A C 1 S ( 7 ) , E E D VS , F F D V S , G G 0 V S , H H D V S , P 0 1 WRITE (NUVI. 115)

OODVS.

AC2S( 1 AC2S( 1 AC2S(3

YYDVS

CMAVS ,

PPDVS, QQDVS. RRDVS. SSDVS

4) . AC1 S( 1 1 ) . AC1S(9) . AC2S( 5 , 1 ) . 5) , ACISdO). AC1S(8). ACTS(12),

2), TTDVS, UUDVS, VVDVS. WWDVS, XXDVS

P01

P01

PO j P01

F-OI P01

11870

11880

1 1 8 9

0' 11900

11910

1 1920

119 3 0 WRITE (NUVI, 116) CMBVS, AC1S(13). AC2S(2,5), AC2S(4,3) 1 1940

AC1 S ( 1 5 ) . AC1 S( 1 4 )

,

AC2S(2.3) , AC1S( 16)

CMFVS', CMGVS , CMHVS , AC1 S( 1 7) , AC2S( 4 , 2

)

AC2S(3,4), AC2S(4,4)

CMCVS, CMDVS, CMEVS

CMOVS, CMPVS, CMQVS

AC1S(19), AC2S(3,3)

ZZDVS

P01

P01

p6i

P01

11950

1 1960

1 1970

11980

WRITE (NUVI, 117)

1 1

1

AC1S(21),A2S(1,2),AC1S(18). AC2S(2,4),A2S(2,1)

WRITE (NUVI. 118) AVS, BVS, CVS, DVS, EVS, FVS, GVS, HVS, PVS,

AC1S(24), AC1S(20), AC2S(5,4), AC2S(3,5).

AC1S(22),AC1S(25),AC2S(4,5),A2S(2,2) . AC1S(23)

FORMAT( /7X, 1H1 , 7X, 5H 1 23 4 5 , 1 3X, 1 H0/ IX, I 7. 5X, I 7, 7X, 17/

/

7X, 1H2, 10X. 2H-3,8X, 6H - 8 76 5 / 1 X, 1 7 , 5X, 1 7, 7^, Tf/'/

3X, 5H 6912, 11X, 1H0, 11X, 3H-23/ IX, 17, 5X. 17, 7X,I7//

4X, 4H4444 , 7X, 5H 432 1, IZX, 2H45/ IX, 17, 5X, 17, 7X. 17/7

4X, 4H2468. 6X. 6H -3123, 13X, 1H0/ IX, 17, 5X. 17, 7X, 17)

P01

P01

P01

P 0 1 PCI

P01

P01

P01

P01

11990

1 20 00

12 010

1 2020

1 2 030

1 2 0 40

1 2 0 5 0

1 2060

1 2070

1 2 0 8 0 112

113

FORMAT (/UH REAL RESULTS) P0 1 1 2090

F0RMAT(/3X,3H1 .0, 10X, 8H3 5 8.672 4, 6X, 4H-2 . 0 / 1 X , F 5 . 1 , 6X , F 1 2 . 4 , 2X , P 0 1 1 2 1 0

0

F8.1//3X,3H3.0,8X,9H-2714.250,7X,8H29.30 5 42/1X,F 5 .1 ,6 X . F ^

^

' ; 3 p q 1 1 2 1 i 0 F12.5//2X,5H86.27,8X,6H1034.2>10X,3H0.0/1X,F6.2,5X,F9.1,5X,F8.1//P0112120

114

3X, 3H0.0, 10X,7H3 4 5.6 78,7X, 4H- 2 . 5 / 1 X , F 5 . 1 , 6X , F 1 1 . 3 , 3X , F 8 . 1 /

/

2X,5H-5.66,11X,8H1.111111.5X,3H1.0/1X,F6.2,5X,F14.6,F8.1//

2X,4H-2.0,i2X,3H3.0,10X,3H4.0 /IX, F 5 . 1 , 6 X , F 9 . 1,5 X , F 8 . 1

)

FORMAT(/3X,3H5.0,11X,4H-6.O,10X,3H0.0/1X,F5.1,6X,F9.1,5X.F8.1//

3 X . 4 H 0 . 2 3 , 1 0 X , 6 H - 0 . 7 1 6 , 7 X , 4 H - 0 . 7 / 1 X , F 6 . 2 , 5 X , F 1 1 . 3 , 3 X , F 8 . 1 77 3X.4H0.81,11X,3H0.9/1X,F6.2,5X,F9.1/1H1,2X,9H0.105E+03,3X,

9H-6 . 76E + 02 , 5X, 1 0 H 0 . 3 3 2 4 E + 0 3 / E 1 2 . 3 , E 1 2 . 2 , E 1 5 . 4 /

7

3X.10H0.5132E+01,3X,9H0.534E-02,3X,11H-0.1419E+00/E13.4,E12.3.

E 1 4 . 4 / / 2 X , 9 H - 0 . 9 9 E + b 3 , 5 X , 1 2 H 0 . 1 0 5 2 1 0 E + 0 5 ,1 OH 0.4 5 6 E + 0 2 / E 1 1.2,

E17.6,E10.3)

P01

P01

P01

P01

P 0 1 P01

P01

P01

PoT

P01

12130

12140

12150

12160

12170

12180

1219 0

1 2200

12216

1 222 0 NBS FORTRAN Test Programs Version 1 21
1 1 5

116

FORMAT(/3X.10H0.6652E+03.2X,10H-0.529E+03.4X.11H0.78564E+04/E13.4.P0112230

1 E12.3.E15.5//2X.12H-0.34567E+04,2X,10H0.6162E+04,3X.8H0.23E+00/ P0112240

2 EU.5,E12.4,E11.2//3X,11H0.94333E + 01.2X,10H0.3524E-02,2X, PO 1 1 22 5 0

3 11H-0.7432E+00/E14.5.E12.4.E13.4//3X.7H0.1E+01.6X.9H0.123E+05, P0112260

4 3 X , 9 H - 0 . 1 1 E + 0 5 / E 1 0 . 1 . E 1 5 . 3 . E 1 2 . 2 / / 3 X . 9 H 0 . 1 4 4 E + 0 2 . 3 X . 9 H - 0 .1 2 E + 0 0 . P 0 1 1 2 2 7 0

5 5X.10H0.3645E+01/E12.3,E12.2,E15.4) P0112280

F 0 R M A T ( / 1 2 H - 0. 2 0 0 E + 0 4 , 4 X , 8 H 0 . 9 9 E + 0 4 , 5 X , 7 H 0 . 0 E + 0 0 / E 1 2 . 3 , e i 2 _ 2 ; p q 1 1 2 2 9 0

1 E12.1//2X,11H-0.1512E+06,3X,9H0.214E+06,4X,8H0.34E+01/E13.4, P0112300

2E12.3.E12.2//2X.8H-0.4E-01,6X,11H0.532UE + 01 , 2X , 7H0 . 6E + 0 4 / E 1 0 . 1 3 E17.5,E9.1//3X,8H0.72E+06,4X,10H-0.813E+04,4X,9H0.234E+00/E11.2

4' E14

117

3,E13,

5 E14.2,E12

FORMAK /3X,

118

El 4 E12

El 1 El 5 E1 4

2//3X

1 / /3X

1 //3X

4,E12

2,E14

3//2X

1 ) 8 HO . 3 6E-03

,

9H0 . 7 77E + 01 8H0.90E+01

,

8H0 . 62E+03

,

8H-0.3E+02,6X,8H0.44E+01,5X,7H0.1E+05/E10.1

5X,7H0.9E-04,5X,9H-0.10E-02/E11.2,E12.1,

,3X,9H-0.29E+03,5X,7H0.4E+01/E12.3,E12.2

5X,9H0.810E+00,3X,8H-0.7E+03/E11.2,E14.3

5X,10H0.5310E+01.2X,10H-0.442E+02/E11.2.

3//3X. 7H0 3E-04.6X,8H0.25E-03,4X,10H-0.163E-02/E10.1

3/1H1 ) FORMAT(3X.9H0.709E + 06.4X,11H0.81842E + 05,1X,8H-0.9E + 06/E12.3,E1 5.5

E9.1//3X,9H0.627E+05.4X,8H0.53E+05,4X,8H-0.4E+05/E12.3,E12.2,

E12.1//3X,10H0.1463E+02.3X,7H0.2E-02,5X.10H-0.355E+02/E13.4.

E15.3//3X,8H0.29E+07,5X,10H0.4072E+07,2X,12H-0.61835E+07/

E15.4.E14.5//3X.9H0.829E+04,4X,7H0.3E+03,5X,8H-0.1E+04/

E11.1,E13.1//3X,10H0.3404E+00.3X.8H0.55E-03,4X.10H-0.761E+0P0112460

.E11.2,EU.3) P0 1 1 2 4 70

OF TEST SEGMENT Oil P0112480

EXECUTING ONLY SEGMENT Oil, THE STOP AND END CARDS P0112490

APPEAR AS

El 0 Ell

El 2

1 , 2 , 3 , 62/E13.4

C* * t * * END

C»*t«» WHEN

C*«*« WHICH

P01 1 231 0 P0 1 1 2320

P 0 1 1 2 3 3 0 P0 1 1 2340

P 0 1 1 2 3 5 0 P0 1 1 2360

P0 1 1 2 3 70

P0 1 1 23 8 0 P0 1 1 2390

P01 1 2400

PO 112410

P0 1 1 242 0 POl 1 243 0 PO 1 1 2 440

POl 1 245 0

COMMENT CARDS MUST HAVE THE C=

C * * * » * IN C= STOP

C= END

STOP

END

COLUMNS 1 AND REMOVED

POl 1 2 5 00

POl 12510

POl 1 2 52 0 POl 1 2 5 30

POl 1 CI POU C2

Q**ii*ii*tt*t**t*****tt*tt**t*t*t*t*t*tt**ttt****t*tttttttt*t**tttttttttt*PQ]'iOO}0

C **'»'*'» POl 30 020

C****« DASGN - (013) P0130030

C***** P0 1 30040

C*ti<t*«*t***«**t t** ***«*t****«**t*t*t*ttfi*tt*****tt**t**t***t*tt*t*t*P0130050

c * « » * C

I « « * « c « « * »

«

c « « * «

c « * * * « c * * * «

«

c * * « «

»

c « * * *

«

c « * « * t c « * * t

«

c * t * « c « t « »

C * 1 1 «

GENERAL PURPOSE

* TO TEST ALL POSSIBLE METHODS OF FORMING DOUBLE

PRECISION CONSTANTS

4 TO TEST THAT D.P. VARIABLES AND ARRAY

ELEMENTS MAY BE REFERENCED

* TO TEST VERY SIMPLE ARITHMETIC ASSIGNMENT

THIS FEATURE CAN BE USED

N LATER SEGMENTS

0 N S SEGMENT 013

5 ASA

,1.1

STATEMENTS, SO THAT

FOR INITIALIZATION

P E C I F I C A T I

5.1.2

5.1.3

7.1.1

TABLE

REF P0130060

THRUP0130070

POl 3 00 80

/5 P0130090

1/16P0130100

WHEN EXECUTING ONLY SEGMENT 013, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

C * * * «

«

C= DOUBLE PRECISION MCAVD , MCBVD . M C CVD , M CDVD , H CE VD , M C F VD . M CGVD

,

C= 1MCHVD,MCIVD,EEDVD,ACVD, BCVD. CCVD,OCVD,DDDVD. CCOVD, FFDVD.GGDVD,

C= 2 HHDVD. EP1 D( 43 ) , AC1 D( 1 0 ) . BC2D( 7, 4 ) , CC3D( 7, 2 . 2) . FC2D( 5 . 5

)

C= DOUBLE PRECISION DPAVD , DPBVD , DPCVD , DPDVD , DPEVD , DPFVD , DPGVD . DPHVO

C= 1 DPIVD.DPJVD.DPKVD.DPLVD,DPMVD.DPNVD.DPOVD,DPPVD,

C= 2 AADVD.BBDVD,PPDVD,RRDVD.SSDVD.TTDVD,UUDVD, VVDVD,WWDVD,XXDVD,

C= 3 YYDVD.ZZDVD.ECVD, F C VD . G C VD . H C VD . R C 3 D ( 3 . 3 , 3 )

. M C J VD . M C K VD

C * « » *

«

DOUBLE PRECISION M CAVD . MCBVD . MCCVD , M CDVD , M CEVD , M C FVD , MCGVD.

1 MCHVO, MCI VD. EEDVD. ACVD . BCVD. CCVD . DCVD, DDDVD . CCDVD, FFDVD , GGDVD,

2 HHDVD. EP1 D(43 ) . AC1D( 10).BC2D(7.4).CC3D(7,2.2),FC2D(5.5)

DOUBLE PRECISION DPAVD , DPBVD , OP CVO . DPDVD , DPEVD . DP FVD . DPGVD . DPHVD

,

'

1 DPI VO. DP JVD. DPKVD , DPLVD . DPMVD . DPNVD . DPOVD. DPPVD.

2 AADVD.BBDVD.PPDVD.RRDVD.SSDVD.TTDVD.UUDVO.VVDVD.WWDVD.XXDVD,

3 YYDVD. Z2DVD. ECVD, FCVD . G CVD . H C VD . R C3D ( 3 . 3 . 3 )

. M C J VD . M CK VD

C*t«.. OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P01301 10

P0130120

P0130130

POl 30 140

P0010240

P001 0245

P00 1 02 5 0 P 0 0 1 0 2 5 5 P0010260

P 0 0 1 0 2 6 5 P0010270

P001 0275

P001 0280

P0010285

P001 0290

P0 0 1 0295

P001 0300

P013A1

P013A2

P013A3

POl 3A4

P013A5

P013A6

P013A7

P01301 50

22 NBS FORTRAN Test Programs Version 1
c * « * «

«

P0130160

C«**«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED • P007024!

c « * * * * P0070250

C= NUVI = 6 P0070255

NUVI = 6 P01 3B1

WRITE ,(NUVI ,130) P0130170

WRITE(NUVI , 131

)

P01 301 80

130 FORMAT( 1 HI , 1 X, 36HDASGN - (013) SIMPLE D.P, ARITHMETIC/ P01 301 90

1 1 6X , 1 8HASS I GNMENT STMNTS . / 2X , 2 8 HASA REFS. - 7.1,1.1 5. 1 ,, 1 .3// P0130200

2 2X , 7HRESULTS

)

P0130210

131 FORMAT( /2X, 23HL I NE 1 OF EACH GROUP IS/ P0130220

A 2X,21HH0LLERITH INFORMATION) P0130230

C*«*** HEADER FOR THIS SEGMENT WRITTEN P0130240

C***** TEST ASSIGNMENT OF UNSIGNED DP CONSTANTS WITH 7 ,, 1 . 1 ,. 1 /41P0 1 3 02 5 0 C»**** UNSIGNED EXPONENTS TO VARIABLES AND ARRAY ELEMENTS 5 ., 1 . 1 ,.3/40P0130260

c * * * «

5 ., 1 . 1 /14P0130270

c * * * * * 5 ,, 1 . 1 .3/36P0130280

c * * * * * 5 ,, 1 . 1 .2/26P0130290

MCAVD = 3.4D1 P0130300

MCBVD = 1 23456 . 789 1 0 1 1 D02 P0130310

ACID(I) =3.4D1 P0130320

AC1D( 2 ) = 1 23456 . 7891 0 1 1 D02 P0 1 3 0330

BC2D(1,1) = 3.4D1 P0130340

BC2D( 2,1 ) = 1 23456 . 7891 0 1 1 D02 P0130350

CC3D( 1,1,1) = 3 . 4D1 P0130360

CC3D( 2 , 1 , 1 ) = 1 23456 . 789 1 0 1 1 D2 P0130370

C***** ASSIGNMENT OF UNSIGNED DP CONSTANTS WITH 5 ,, 1 . 1 .3/36P0130380

C***** SIGNED EXPONENTS TO VARIABLES AND ARRAY ELEMENTS 5 ,. 1 . 1 .2/26P0130390

MCCVD = 29 . 8 76 5 2 34D-3 P0130400

MCDVD = 34 5 . 1 00 0 0 5 5 5 D + 4 P0130410

AC1D( 3 ) = 29 . 8765234D-3 P0130420

AC1D(4) = 345.10000555D+4 P0130430

BC2D(3,1) =29.87652340-3 P0130440

BC2D ( 4,1) = 345.10000555D+4 P0130450

CC3D( 3,1 , 1 ) = 29 . 8765234D-3 P0130460

CC3D( 4,1 , 1 ) = 34 5 . 1 000 0 5 5 5 D + 4 P0130470

C « ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO DECIMAL 5 ,. 1 . 1 .2/22P0130480

C** *** PART) WITH UNSIGNED EXPONENTS TO VARIABLES' P0 1 30490

C«**** AND ARRAY ELEMENTS P0 1 30 5 00

MCEVD = 2223242 5. DOO P0130510

AC1D( 5 ) = 22232 42 5 .DOO P0130520

BC2D ( 5 , 1 ) =22232425.000 P0130530

CC3D ( 5 , 1 , 1 ) = 22232425 . DOO P0130540

Ct*t*« ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO 5 ,. 1 . 1 .2/22P0130550

Z****t INTEGER PART) WITH UNSIGNED EXPONENTS TO P0130560

C*««t« VARIABLES AND ARRAY ELEMENTS P0130570

MCFVD = .28142005 P0130580

AC1D(6) = .281420D5 P0130590

BC2D(6,1) : .28142005 P0130600

CC3D(6, 1,1) = .28142005 P0130610

C**«*« ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO DECIMAL P0130620

C«**** PART) WITH SIGNED EXPONENTS TO VARIABLES AND P0130630

C**«*« ARRAY ELEMENTS P0130640

MCGVD = 4455667788 . D+6 P0130650

MCHVD = 35692483569248 . D-02 P0130660

AC1D( 7 )- = 445 5667788.0 + 6 P0130670

AC1D(8) = 35692483569248.0-02 P0130680

BC2D(7,1) = 4455667788.0+6 P0130690

BC2D(1,2) = 35692483569248 . D-02 P0130700

CC3D(7, 1 , 1 ) "= 445 5667788.0 + 6 P0130710

CC3D(1,2.1) = 35692483569248 . D-2 P0130720

Ct*««« ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO P0130730

C«t»*t INTEGER PART) WITH SIGNED EXPONENTS TO P0130740

C««««* VARIABLES AND ARRAY ELEMENTS P0130750

ACVD = .6549876D-3 P0130760

BCVD = .780+10 P0130770

AC1D(9) = .65498760-3 P0130780

NBS FORTRAN Test Programs Version 1 23
ACIDdO) = BC2D(2,.2) = BC2b(3.2) = CC3D(2.2.1) =

780*10

65^9»76D-3

78D+lb

6549876D-3

P0130790

P0130800

P0 1 308 1 0 P0130820

CC3D(3,2.1) = .780+10

ZitKit ASSIGNMENT OF SIGNED OP CONSTANTS WITH

CV»V«V UNSIGNED EXPONENTS TO VARIABLES AND ARRAY

C*«*** ELEMENTS

5.1.1

P0130830

/12P0130840

P 0 1 3 0 8 5 0 P01 30860

P 0 1 3 0 8 7 0 P0130880

P0130890

P0130900

P 0 1 3 0 9 1 0 P0130920

CCVO = DCVD =

E P 1 D ( 1)

EP1D(2)

+0.000

-17263544.503

= +0.000

= -17263544 503

BC2D(4

BC2D(5

CC3D(4

CC3D(

5

2)

2)

2.1)

2,1)

= +0.0000

= -17263544

= +0.000

= -17263544

503

503

C * « * «

«

c * * « * *

C « « (r <r ?:

ASSIGNMENT OF SIGNED OP CONSTANTS WITH

SIGNED EXPONENTS TO VARIABLES AND ARRAY

ELEMENTS

ECVD = FCVD = GCVD = HCVD

EP1D(3)

EP1D(4)

EP1D(5)

EPi D(6)

BC2D(6,

BC2D(7,

BC2D(1 . BC2D(2 , CC3D(6,

CC30( 7,

CC30( 1 , CC30(2 ,

+1987.62D+1

-2.54396621D+2

+34.7865299102340-7

-44.40-10

= +1987.62D+1

= -2.5 439662 1 0 + 2

= +34.7865299102340-

= -44.40-10

= +1987.620+1

= -2.5 439662 1 0 + 2

= +34.7865299102340-

= -44.4D-10

1 ) =

1 ) = 2) = 2) =

+ 1 987. 62D + 1 -2.5 439662 1 0 + 2 +34.7865299102340-

-44.40-10

07

C***** ASSIGNMENT OF SIGNED OP CONSTANTS (NO DECIMAL

C***** PART) WITH SIGNED E XPO N E N T TO VAR I AB L E S AND

C«*«*« ARRAY ELEMENTS

AADVD = +0.D+1

BBDVD = -123.0+17

CCDVD = +3692468.0-8

ODDVD = -147937824967. D-5

EP1D(7)

EP1D(8)

EPI 0(9)

EPI D( 1 0)

BC2D(3,3)

BC2D(4

BC2D(5

BC2D(6

CC3D(3

CC3D (

4

CC3D(

5

CC3D(6

0-5

C * * « * * c » « * * * c * * * * *

3)

3)

3) = 1,2) = 1,2) = 1,2) = 1,2) - ASSIGNMENT

PART) WITH

0-5

ARRAY

EEDVD = + FFDVO =

- GGDVD = + HHDVD =

- EP1D( n

)

E P 1 D ( 1 2 ) EP1D(13)

EPI 0(1 4)

BC2D(7.3)

BC2D( 1 , 4)

BC2D(2,4)

+ 0 . D + 1 -123.D+17

+3692468 .0-8

-147937824967,

+0.0+1

-123.0+17

+3692 468.0-8

-147937824967

+0.0+1

-123 .0 + 1 7

+ 3692 468. D-8

-147937824967.0-5

OF SIGNED D P CONSTANTS ( N 0 I N

j

e C3E

R

SIGNED EXPONENTS TO VARIABLES AND

ELEMENTS

9277861749850+2

593549 1 422361 9D + 0 98663271D-03

10-15

= +.9277861749850+2

- -. 5 93 5 49 1 422 36 1 90 + 0

= + .98 6632 7 1 0 - 03

= -. 10-15

= +.9277861749850+2

= - . 5 93 5 49 1 42236 1 9D + 0

= +.986632710-03

P0130930

P0130940

P0130950

P0130960

P0130970

P0 1 3 0980

P01 30990

P0131000

P0131010

P0131020

P0131030

P0131040

P0131050

P01 31 060

P0131 070

P01 31 080

P01 31090

P0131 100

P0131 110

P0131 120

P 013113 0 P0131 140

P01 31 1 5 0 P0131 160

P0131 1 70

P0131 180

P0131 190

P0131200

P0131210

P0131220

P0131230

P0131240

P0131250

P0131260

P 0 1 3 1 2 7 0 P0131280

P0131290

P0131300

P0131310

P0131320

P 0 1 3 1 3 3 0 P01 31 340

P0131350

P0131360

P0131370

P0131380

P 0 1 3 1 3 9 0 P01 31 400

P01 31 41 0 PC 1 3 1 420

PC 1 3 1 430

PCI 3 1 440

P0131450

P01 31460

24 NBS FORTRAN Test Programs Version 1
BC2D(3,A) = 1D-15

CC3D(7,1,2) = +.9277861749850+2

P0131470

P013U80

CC30(1.2.2> = -.593549142236190+0

CC30(2,2,2) = +.986632710-3

P0131490

P01 31 500

CC3D(3.2,2) = -.10-15

Ct**t* ASSIGNMENT OF SIGNEO OP CONSTANTS (NO OECIMAL

P0131510

P0131 520

C****« PART) WITH UNSIGNED EXPONENTS TO VARIABLES

C«***« AND ARRAY ELEMENTS

P0131 530

P0131 540

PPOVO = +3261294675.012

RRDVD = -969492909.04

P0131 550

P0131560

EP1D(15) = +3261294675.012

EP1D( 16) = -969492909.04

P0131570

P0131580

BC20 ( 4 . 4 ) = +326 1 2 946 7 5 .0 1 2 BC2D(5,4) = -969492909.04

P0131590

P0131600

CC3D(4,2.2) = +3261294675.012

CC3D(5,2.2) = -969492909.04

P0131610

P0131620

Ct«»«t ASSIGNMENT OF SIGNED DP CONSTANTS; (NO INTEGER

Ct  PART) WITH UNSIGNED EXPONENTS TO VARIABLES

P01 31 630

P0131640

C** *** AND ARRAY ELEMENTS

SSOVO = +.001246085D3

P01 31 650

P0131660

TTDVO = -.5902

EP 1 0 ( 1 7 ) = + .0 0 1 2 460 8 5 03

P0131670

P01 31 680

EP1 D( 1 8 ) = - . 59D2

BC2D(6,4) = +.001246085D3

P01 3 1690

P01 31 700

BC2D(7.4) = -.5902

CC3D(6,2.2) = +.00124608503

P01 31 71 0 P0131720

CC3D(7,2,2) = -.5902

C***** ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

P0131 730

5.1.1 .3/42P0131740

C***** UNSIGNED EXPONENTS TO UNSIGNED INTEGERS

UUDVO = 798281 392253D0

P0131750

P0131 760

EP10(19) - 79828 1 392253D0

FC20 ( 1.1 ) = 79 82 8 1 3 92 2 5 3 D0

P0131770

P0131 780

RC3D( 1,1,1 ) = 79 82 8 1 3 922 5 3 D0

C***** ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

P01 31 790

P0131800

C***** SIGNED EXPONENTS TO UNSIGNED INTEGERS

VVOVD = 429210+6

P01 31 81 0 P0131820

WWOVO = 793685443D-4

EP1D(20) = 429210+6

P0131830

P01 31 840

EP1D(21) =7936854430-4

FC2D( 2, 1 ) = 4292 1 D + 6 P01 31 850

P0131860

FC2D(3.1) = 7936854430-4

RC3D( 2 , 1,1 ) = 4292 1 D + 6 P0131870

P0131880

RC3D( 3 , 1,1 ) - 793 68 5 4 430-4

C«*«** ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

P0131 890

P0131900

C***** UNSIGNED EXPONENTS TO SIGNED INTEGERS

XXOVO = +33344455566D2

P0131910

P0131920

YYOVO = -22233344401

EP1D(22) = +3334445556602

P0131930

P0131940

EP1D(23) = -22233344401

FC2D(4,1) = +33344455566D2

P0131950

P0131960

FC2D( 5 . 1 ) = -222 3 33 4 440 1 RC3D( 1 . 2 . 1 ) = +333 4 4 4 5 5 5 66D2P0131970

P0131980

RC30 ( 2.2, 1 ) = -2 2 2 33 3 4 44D1

C***** ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

P0131990

P0132000

C***** SIGNED EXPONENTS TO SIGNED INTEGERS

ZZDVD = +10+1

P0132010

P0132020

MCIVD = -2D+2

MCJVO = +333333333333330-3

P0132030

P0 1 32 0 40

MCKVO = -4444444440-4

EP1D(24) = +10+1

P0 1 32 0 5 0 P0132060

EP1D(25) = -20+2

EP1D(26) = +333333333333330-3

P01 32070

P0132080

EP1D(27) = -4444444440-4

FC2D( 1 ,2) = +10 + 1 P0132090P0132100

FC2D(2,2) = -2D+2

FC2D(3,2) = +333333333333330-3

P01321 10

P0132120

FC2D(4,2) = -4444444440-4

RC3D(3,2, 1 ) = +10 + 1 P01 321 30P0132140

NBS FORTRAN Test Programs Version 1 25
RC3D( 1 .3.1) = -2D+2 P01321 50

RC3D(2.3.1) = +33333333333333D-3 P0132160

RC3D(3.3.1) = -i,i,i,i,i,t,i,i,i,\)-i, P0132T70

C**«** ASSIGNMENT OF UNSIGNED DP VARIABLES AND ARRAY 7 . 1 . 1 . 1 / 4 1 P 0 1 3 2 1 8

0

C*****' ELEMENTS TO DP VARIABLES AND ARRAY ELEMENTS P0132T90

C*t«*« (BOTH PLUS AND MINUS VALUES ARE ASSIGNED IN THIS P0132200

C«***« WAY) P0 1 322 l'0 DPAVD = MCAVD P0132220

DPBVD = DCVb PO 1 3 223 0' DPCVD = EPIDd ) P 0 1 322 40

DPDVD = EP1D(2') PO 1 322 5 6 DPEVD = BC2D(2.2) P0132260

DPFVD = BC2D('4,2) P0 1 322 70

DPGVD = CC3D(3, 1 . 1 ) P0132280

DPHVD = CC3D(7,2, 1 ) P0 1 3 2 290

EP1D(28) = DPAVD P0132300

EP1D(29) = DPBVD P0132310

EP1D(30) - EPIDd ) P0 1 3232 0 EP1D(31 ) = EP1D(2) P0 1 3 23 3 0 EP1D(32)-BC2D(2.2) P0132340

EP1D(33) = BC2D(4,2) P0132350

EP1D(34) = CC3D(3.1.1) P0132360

EP1D(35) = CC3D(7,2.i) P0132370

FC2D(5,2) = DPAVD P0132380

FC2D(1 ,3) = DPBVD P0132390

FC2D(2,3) = EPIDd ) P0 1 32 40 0 FC2D(3.3) = EP1D(2) P0 1 32 4 i0

FC2D(4,3) = BC2D(2.2) P0132420

FC2D(5.3) = BC2D(4.2) ' P0 1 3243 0 FC2Dd . 4) = CC3D(3, 1 . 1 ) P0 1 32 440

FC2D(2.4) = CC3D(7,2.1) PO 13245 0 RC3Dd .1.2) = MCAVD P0 1 32 460

RC3D(2. 1 .2) = DCVD P0132470

RC3D(3. 1 .2) = EPIDd ) P0 1 32 4 8 0 RC3Dd .2.2) = EP1D(2) P0 1 32490

RC3D(2.2.2) = BC2D(2,2) P0132500

RC3D(3.2,2) = BC2D(4,2) P0132510

RC3Dd.3.2) = CC3D(3.1.1) P0 1 32 5 2 0 RC3D(2.3.2)'= CC3D(7.2.1) PO 1 32 5 3 0 C«ttt« ASSIGNMENT OF SIGNED DP VARIABLES AND ARRAY P0132540

C*»t«» ELEMENTS TO DP VARIABLES AND ARRAY ELEMENTS P0132550

C*»*«* (UNARY MINUS USED TO REVERSE BOTH PLUS AND 6.4 /44P0132560

C**t«» MINUS VALUES) P0132570

DPIVD = -GCVD P0132580

DPJVD = -DDDVD P0 1 32 5 90

DPKVD = -AC1D(3) P0132600

DPLVD" = -EPIDdd) P0 1 326 1 0 DPMVD = -BC2D(3,1) P0132620

DPNVD = -BC2D(2,4) PO 1 32630

DPOVD = -CC3D(2. 1 . 1 ) P0132640

DP P V D = - C C 3 D ( 2 .1.2) P 0 1 3 2 6 5 0 EP1D(36) = -GCVD P0132660

EP1D(37) = -DDDVD P0 1 326 70

EP1D(38) = -AC1D(3) P0132680

E P 1 D ( 3 9 ) = - EPIDd 6 ) P 0 1 3 2 6 9 0 EP1D(40) = -BC2D(3.1) P0132700

EP1D(41 ) = -BC2D(2.'4) P0 1 3271 0 EP1D(42) = -CC3D(2.1,1) P0132720

EP1D(43) = -CC3D(2.1.2) P0 1 32 730

FC2D(3.4) = -GCVD P0132740

FC2D(4.4) = -DDDVD " P0 1 32 75 0 FC2D(5,4) = -AC1D(3) P0132760

F C 2 D ( 1.5) = - E P 1 D ( i 6 ) P 0 1 3 2 7 7 0 FC2D(2.5) = -BC2D(3.1) P0132780

FC2D(3,5) = -BC2D(2.4) P0 1 32790

FC2D(4.5) = -CC3D(2.1.1) P0132800

FC2D(5,5) = -CC3D(2. 1 .'2) P0 1 328 1 0 RC3D(3.3.2) = -GCVD P0132820

26 NBS FORTRAN Test Programs Version 1
RC3D( 1 .1,3) = -DDDVD P0132830

RC3D(2,,1,3) = -AC1D(3) P0 1 32 8 40

RC3D(3.1.3) = -EPiOdO) P0 1 32 8 5 0 RC3D(1,2,3) = -BC2D(3,1) P0132860

RC3D<2.2.3) = -BC2D(2.4) P0132870

RC3D(3,2,3) = -CC30(2,1,1) P0132880

RC3D( 1 , 3/3) =

" -CC3D(2. 1 ,2) P0 1 32 890

C**««* WRITE RESULTS FOR THIS SEGMENT P0132900

WRITE (NUVI,132) MCAVD, ACID(I), BC2D(1,1), CC3D(i,1,1), MCBVDV P0132910

A AC1D(2). BC2D(2,1), CC3D(2,1,1), MCCVD, AC1D<3), BC20(3,1), P0132920

B ^-^^^1^1^-^ MCDVD, AC1D(4), BC2D(4,1), CC3D(4,T,i)V MCEVD, P0 1 3 293 0 C AC10(5), BC2D(5,1), CC3D(5,1,1), MCFVD. AC1D(6), BC2D(6,1), P0132940

D CC3br6.1.i), MCGVD, AC1D(7). BC2D(7,1), CC30(7, 1,1), MCHVD, P0 1 329 5 0 E AC1D(8), BC2D(1,2), CC3D(1,2,1), ACVD, AC1D(9), BC2D(2,2), P0132960

F ^ ^^--^ ^ j-y- ^ BZyO, A C 1 D ( 1 0 ) , B C 2 D ( 3 , 2 )

,

' C C 3 D ( 3 , 2 , 1) ,' C C V D , F" 0 1 3 29 70

G EPID(I) . BC2D(4,2), CC30(4,2,1), DCVD, EP1D(2) , BC2D(5,2), P0132980

H CC3D(5,2,1), ECVD, EP1D(3) , BC2D(6,2). CC3D(6,2,1), FCVD, P0132990

I EP1D(4) , BC20(7,2), CC3D(7,2,1), GCVD, EP1D(5) , BC2D(1,3), P0133000

J CC3D(1 , l',2) , HCVD, EP1D(6) . BC2D(2,3) , CC3D(2, 1 ,2) , AADVD, P0 1 33 0 1 0 K EP1D(7) , BC2D(3,3),, CC3D(3J,2). BBDVO, EP10(8) , BC2D(4,3), P0 1 3 3 02 0

L CC3D(4.i.2), CCDVb, EPiD(9) , BC2b(5,3). CC3D(5.i,2), DDDVD, P0133030

M EPID(IO), BC2D(6,3), CC3D(6,1,2) P0133040

WRITE (NUVI,133) EEDVD, EPID(II), BC20(7,3), CC3D(7,1,2), FFDVO, P0133050

1 EP1D(12), BC2D(1,4), C C3D ( 1 , 2 , 2 ) , GGDVD , EP1D(13), BC2D(2,4), P0 1 33060

2 CC3D(2,2,2), HHDVD, EP1D(14), BC2D(3,4), CC3D(3,2,2), PPDVD. P0 1 33 0 70

3 EP1D(15), BC2D(4,4), CC3D(4,2,2), RRDVD, E P 1 D ( 1 6 ) , B C 2 D ( 5 , 4 ) , P 0 1 3 3 0 8 0

'4 CC3D(5,2.2) ,SSDVD, EP1D(17), BC2D(6,4), CC3D(6,2,2), TTDVD, P0 1 33 090

5 EP1D(18), BC2D(7,4), CC3D(7,2,2) P0133100

WRITE (NUVr,134) UUDVD, EP1D(19), FC2D(1,1), R C 3 D ( 1 , 1

, 1 ) , VVD VD , P 0 1 3 3 1 1

0

1 EP1D(20), FC2D(2,1). RC3D(2,1,1), WWDVD, EP1D(21), FC2D(3,1). P0133120

2 RC3D(3,1,T), XXDVD, EP1D(22). FC2D(4,1), RC3D(1,2,1), YYDVD, P0133130

3 EP10(23), FC2D(5,1). RC3D(2,2,1), ZZDVD, EP1D(24), FC2D(1.2), P0133140

4 RC3D(3,2,1), MCIVD. EP1D(25), FC2D(2,2), RC3D(1,3,1). MCJVD, P0133150

5 EP1D(26), FC2D(3.2), RC3D(2.3,1), MCKVD, EP1D(27), FC20(4.2). P0133160

6 RC3D(3.3,1) P0133170

WRITE (NUVI.135) -MCAVD. DPAVD, EP1D(28), FC2D(5,2), RC3D(1,1,2). P0133180

A DCVD, DPBVD, EP1D(29), FC2b(1,3), RC3D(2,1,2), EPID(I), P0133190

B DPCVD, EP1D(30), FC2D(2,3), RC3D(3,1,2), EP1D(2), DPDVD, P0133200

C EP1D(31), FC2D(3,3), RC3D(1,2.2), BC2D{2,2), DPEVD, EP1D(32), P0133210

D FC2D(4.3), RC3D(2.2.2), BC2D(4,2), DPFVD, EP1D(33),, F C2D ( 5 , 3 ) , P 0 1 3 3 2 2 0 E RC3D( 3,2.2), CC3D(3.1.i). DPGVD. EP1D(34), FC2b(1.4), PO 133230

F RC3D(1,3.2). CC3D(7,2,1), DPHVD, EP1D(35), FC2D(2,4), P0133240

G RC3D(2.3,2), GCVD, DPIVD, EP1D(36), FC2D(3,4), RC3D(3,3,2). P0 1 332 5 0 H DDDVD, DPJVD, EP1D(37), FC2D(4,4), RC3D(1,1,3), AC1D(3). P0133260

I DPKVD, EP1D(38), FC2D(5,4). RC3D(2,1,3), EP1D(10), DPLVO. P0 1 33 2 70

J EP1D(39), FC2D(1,5). RC3D(3,1,3), BC2D(3,1), DPMVD, EP1D(40), P0133280

k FC2D(2,5), RC3D(i.2.3). BC2D(2,4), OPNVD, EP1D(41), F C 2 D ( 3 , 5 ) , P 0 1 3 3 2 9 O' L RC3D(2.2,3), CC3D(2.1,1), DPOVD. EP1D(42), FC2D(4,5), P0133300

H RC3D(3.2,3), CC3D(2,1,2), DPPVD, EP1D(43), FC2D(5,5), P0 1 33 3 1 0

N RC3D(1.3,3) P0133320

1 3 2 FORMA T ( / 6 X , 8 H 0 . 3 4 D + 0 2 / 4 ( D 1 4 . 2 / ) / P 0 1 3 3 3 3 0 A 6X,19H0.1234567891011D+08/4(D25.13/)/ P0133340

B 6 X , 1 5 HO .2 9 8 7 6 5 2 3 4 D - 0 1 / 4 ( D 2 1 . 9 / ) / P 0 1 33 3 5 0

C 6X,17H0.34510000555D+07/4(D23.11/)/ P0133360

b 6X, 14H0.22232 42 5 D + 08/4(D20.8/)/ P0 1 333 70

E 6X, 12H0.2814200+05/4(D18.6/)/ P0133380

F 6 X , 16 H 0 . 4 4 5 5 6 6 7 7 8 8 D + 1 6 / 4 ( D 2 2 . 1 0 /

' ) T F» 0 1 3 3 3 9 0 G 1H1 ,5X.20H0.35692483569248D+12/4(D26.14/)/ P0133400

H 6X,13H0.6 5 498 76D-03/4(D19.7/)/ P0 1 33 4 1 0

I 6X.8H0.78D+10/4(D14.2/)/ P0133420

J 6X.7H0.0D + 00/4(D13.1/)/ P0 1 33 430

K 5X.16H-0.172635445D+11/4(D21 .9/)/ P0133440

L 6X . 1 2 H 0 . 1 9 8 7 6 2 D + 0 5 / 4 ( D 1 8 . 6 / ) / P 0 1 3 3 4 5 0 M 5X. 16H- 0.2 5 439662 1 D + 03/4(D21 .9/)/ P0 1 33460

N 6X. 20H0. 34 786 5 299 1 023 4D-05/4(D26. 14/)/ PO 1 33 4 70

0 5X. 10H-0.444D-08/4<D15.3/) . P0 1 33 480

P iHi;5X.7H0.bD + 00/4(D13. 1 /)/ PO 1 33 490

Q 5X. lOH-0 . 1 23D+20/4(D1 5 . 3/ ) / P0133500

NBS FORTRAN Test Programs Version 1 27
R

s 6X,13H0.3692468D-01/4(D19.7/)/

5X,19H-0.147937824967D+07/4(D24.12/),1H ) P0133510

P01 33520

133

T FORMAT ( 6X,18H0. 9277861749850+02/4(024. 12/)/

5X,21H-0. 593549142236190+00/4(026. 14/)/

P0133530

P0133540

UV 6X.14H0. 986632710-03/4(020. 8/)/

5X,8H-0. 10-15/4(013.1/)/

P0133550

PO 1 33560

MX 6X.16H0. 32612946750 + 22/4(022. 10/),

1H1 ,4X,16H-0. 9694929090 + 13/4(021 .9/)/

P0133570

POl 33 5 8 0 Y

z 6X,13H0. 12460850+01/4(019. 7/)/

5X , 9H-0 . 590+ 02 / 4 ( 0 1 4 . 2 / )

, 1 H ) P01 33590

PO 1 33600

134

1 FORMAT ( 6X, 18H0. 79 82 8 1 3922 5 30+ 1 2 / 4 ( 02 4. 1 2 /)/

6X,11H0. 429210+11/4(017. 5/)/

POl 336 1 0 PO 1 33620

2

3 6X,15H0. 7936854430 + 05/4(021. 9/)/

6X,17H0. 333444555660+13/4(023. 11/)/

P0133630

POl 33 640

4

5 5X,16H-0. 2223334440+10/4(021. 9/)/

6X,7H0. 10 + 02/4(013.1/),

P0133650

PO 1 33660

6

7 1H1 , 4X, 8H- 0 . 20 + 03 / 4 ( 0 1 3 . 1 / )

/

6X,20H0. 333333333333330+11/4(026. 14/)/

POl 33670

PO 1 33 68 0

1 3 5

8 5X,16H-0. 4444444440 + 05/4(021. 9/), IH ) FORMAT( 6X,20H0. 340000000000000+02/5(026. 14/)/POl 33690

PO 1 33700

12 5X,21H-0. 172635445000000+11/5(026. 14/)/

6X,20H0. 000000000000000 + 00/5(026. 14/)/

POl 33 7 1 0 POl 33 72 0 3

4 5X,21H-0. 172635445000000+11/5(026. 14/)/

6X,20H0. 654987600000000-03/5(026. 14/),

POl 3 3 73 0 PO 1 3 3 740

56 1H1,5X,20H0. 000000000000000 + 00/5(026. 14/)/

6X,20H0. 298765234000000-01/5(026. 14/)/

P 0 1 3 3 7 5 0 POl 33 760

7

8 5X,21H-0. 254396621000000+03/5(026. 14/),

39H1 EACH GROUP SHOULO BE lOENTICAL EXCEPT/

P 0 1 3 3 7 7 0 POl 33 78 0 9A 38H FOR THE SIGNS OF THE FIRST TWO LINES//

6X,20H0. 347865299102340-05/5(026. 14/)/

PO 1 33790

PO 1 3 3 8 0 0

B

c 5X,21H-0. 147937824967000+07/5(026. 14/)/

6X,20H0. 298765234000000-01/5(026. 14/)/

P0133810

PO 1 33820

D

E 5X,21H-0. 147937824967000 + 07/5(026. 14/)/

6X,20H0. 298765234000000-01/5(026. 14/)/

P0133830

POl 33840

FG 6X,20H0. 98663271 0000000-03/5(026. 14/)/

6X,20H0. 123456789101100+08/5(026. 14/),

POl 3 3 8 5 0 PO 1 33860

c * * H

* * 1H1,4X,21H-0. 444000000000000-08/5(026. 14/))

ENO OF SEGMENT 0 1

3

P0133870

PO 1 3 3 8 8 0

C t * * * c * * « * WHEN EXECUTING ONLY SEGMENT 013, THE STOP ANO END

WHICH APPEAR AS COMMENTS MUST HAVE THE C= CARDS POl 33890PO 1 3 390 0 c**

c=

1 1

1

IN COLUMNS 1 AND 2 REMOVED

STOP

POl 3 39 1 0 PO 1 33920

c = END -. STOP

POl 3 3930

PO 1 3 CI END

t * t * * * * * * * * * 1

1

P013C2

» PO 1 5 0 0 1 0 c*

c * * tut

t * * CASGN - (015)

POl 50020

PO 1 50030

c * * * * * c * * * * * 1 1 1 * * * « * t * * t * * POl 50040

*P0 1 5 0 0 5 0

c * * * *

c * « * * GENERAL PURPOSE

* TO TEST METHODS OF FORMING COMPLEX CONSTANTS 5 ASA

.1.1

REF POl 50060

PO 1 50070

c * * * * * c * * * * t

* TO TEST THAT COMPLEX VARIABLES AND ARRAY

ELEMENTS MAY BE REFERENCED.

5

5

. 1

. 1

. 2

. 3

/ 5

/ 1 6

P 0 1 5 0 0 8 0 PO 1 50090

c * *

c * *

t * *

* * «

* TO TEST SIMPLE ARITHMETIC ASSIGNMENT STATEMENTS

SO THAT THIS FEATURE CAN BE USED FOR INITIALIZATION

7.1.1.

TABLE

1

1

P 0 1 5 0 1 0 0 PO 1 5 0 1 1 0

c * * c * *

* * *

* * * IN LATER SEGMENTS SPECIFICATIONS SEGMENT 015

PO 1 501 20

PO 1 5 0 1 3 0

c * * * * * c * * * * * WHEN EXECUTING ONLY SEGMENT 015, THE SPECIFICATION STATEMENTS

POO 1 03 1 0 POO 1 03 1 5 c * * c * * Kit

« * * WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS

1 ANO 2 REMOVED.

P 0 0 1 0 3 2 0 POO 1 0 32 5 c

c

=

* t * COMPLEX QEVC,QFVC,QGVC,QHVC,QIVC,QJVC,QKVC,OLVC,OMVC,QNVC , QOVC

P 0 0 1 0 3 3 0 POO 1 0 33 5 c =

c =

12 QPVC,QRVC,QSVC,QTVC,QUVC,QVVC,KVC,LVC,MVC,NVC,OVC

MEVC,MFVC,MGVC,MHVC,MIVC,QQVC,MJVC,MKVC,MLVC,

, PVC , ovc , vvc

,

MNVC.MOVC,

P 0 0 1 0 3 4 0 P 0 0 1 0 3 4 5 c = c=

3 MPVC,MQVC,MRVC,MSVC,MTVC,MUVC,MVVC,BCVC,DCVC,DDVC

COMPLEX AVC,BVC,CVC,OVC,EVC,FVC,GVC,HVC,IVC, JVC,AAVC,

POO 1 03 5 0 POO 1 03 5 5

28 NBS FORTRAN Test Programs Version 1
C= 1 ABVC.BAVC.BBVC.CCVC.CDVC.CAVC.OAVC.ASVC.BSVC.CSVC. P0010360

C= 2 DSVC,AAAVC. ABAVC.ACAVC, ADAVC, CHCVC P0010365

C = COMPLEX N UMVC. GAVC.OBVC.QCVC.dDVC.RVC.SVC.tVC , U V C P 00 1 0370

C= 1 . MAVC.MBVC.MCVC,MDVC,B1C(8).B2C(4.2),B3C(2.2,2) P0010375

C= COMPLEX LL1 C< 32) . LM2 C ( 8 . 4 ) . L N3 C ( 9 . 2 . 2 ) . A1 C ( 1 2 ) , A2 C ( 2 , 2 ) . A3 C ( 2 , 2 . 1 ) PO 0 1 0 3 8

0

C**»** P0010385

^ ggy j;-Q^yj;'^ Q ] \/ 1 , QJ V C ', 0 K VC . Q L V C ; Q H V C /o N VC ^'o 0 V C PO 1 5 A1

1 OPVC , ORVC , QSVC , OTVC , QUVC , QVVC , KVC . LVC , MVC , NVC , OVC . PVC , OVC , VVC , P01 5A2

2 MEVC.MFVC,MGVC,MHVC.M1VC,QQVC,MJVC.MKVC,MLVC, MNVC.MOVC,

3 MPVC,MQVC.MRVC,MSVC.MTVC,MUVC,MVVC,BCVC.OCVC,DDVC

P01 5A3

P01 5A4

COMPLEX AVC.BVCCVCDVC.EVCFVCGVC.HVC. IVC, JVC.AAVC.

1 ABVC,BAVC.BBVC.CCVC,COVC,CAVC,DAVC.ASVC,BSVC,CSVC.

P015A5

P01 5A6

2 DSVC.AAAVC.ABAVC.ACAVCADAVC. CHCVC

COMPLEX NUMVC. Q AV C , 0 B V C . 0 C V C . Q D V C , R V C . S VC , TV C . UV

C

P01 5A7

P015A8

1 , MAVC,MBVC,MCVC,MDVC,B1C(8),B2C(4,2),B3C(2,2.2)

COMPLEX LL1 C(32 ) , LM2C( 8 , 4 ) . LN3C(9, 2 , 2 ) . A1 C( 1 2 )

, A2C(2 , 2 )

,

A3C(2,2,

P01 5A9

1 )P01 5AA

C*«t*« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT

c * * * t * TAPE . P01 501 40

P0070260

C***** WHEN EXECUTING ONLY SEGMENT 015, THE FOLLOWING STATEMENT

C««*«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P0070265

P0070270

C * * * * * C= NUVI = 6 P0070275

P0070280

c * * * * * NUVI = 6 P0070285

P01 5B1

1 WRITE (NOV I, 150)

WRITE (NUVI, 151)

P01 501 50

P0150160

150 FORMATdHI ,1X,32HCASGN - (015) COMPLEX ASSIGNMENT/

1 16X, 10HSTATEMENTS/2X,28HASA REFS. - 5.1.1.4 7.1.1.1//

P01 501 70

P01 501 80

2 2X, 7HRESULTS//2X,23HLINE 1 OF EACH GROUP IS/

3 2X,21HH0LLERITH INFORMATION/)

P01 50190

P0 1 5 020 0 151 F0RMAT(2X, 36HVALUES IN A GROUP SHOULD BE THE SAME)

C***** HEADER FOR SEGMENT 015 WRITTEN

P0 1 5 02 1 0 P0 1 5 0220

C***** BEGINNING OF TEST OF COMPLEX CONSTANT ASSIGNMENTS. IN C**«*« THE FOLLOWING 22 BLOCKS, BOTH PARTS OF THE CONSTANT

P0 1 5 0230

P0 1 5 0240

C****« HAVE THE SAME METHOD OF FORMATION

C«  TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

P0 1 5 02 5 0 P01 50260

C««** * UNSIGNED BASIC REAL CONSTANTS

QAVC = (22.2,33.33)

P01 50270

P0 1 5 02 80

LLICd ) = ( 22.2 , 33.33 ) LM2C(1,1) = (22.2,33.33)

P01 50290

P01 50300

L N 3 C ( 1 , 1 , 1 ) = ( 2 2 . 2 , 3 3 . 3 3 ) C**««* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

P0 1 5 03 1 0 P01 50320

C***** SIGNED BASIC REAL CONSTANTS

QBVC = ( + 39 5. 6, + 4 1 06. 7 ) P01 50330P01 50340

QCVC = (-12345.67,-1234.567)

QDVC = (+8.9,-9.1)

P0 1 5 03 5 0 P01 50360

QEVC = (-2635. 1 2, +46. 2 1 ) LL1C( 2 ) = (+395 .6, +4 1 06. 7 ) P01 50370

P0 1 5 03 80

LL1C(3) = (-12345.67,-1234.567)

LL1C(4) = (+8.9,-9.1)

P01 50390

P0 1 5 0 400

LL1C( 5 ) = (-263 5. 1 2, + 46 . 2 1 ) LM2C(2,1) = (+395. 6, +4106. 7)

P0 1 5 04 1 0 P0 1 5 0 42 0 LM2C(3,1) = (-12345.67,-1234.567)

LM2C(4, 1 ) = (+8.9,-9.1)

P0 1 5 0 43 0 P0 1 5 0 440

LM2C( 5 , 1 ) = ( -263 5 . 1 2 , +46 . 2 1 ) LN3C( 2,1 , 1 ) = (+395. 6 , +4 1 06. 7 ) P0 1 5 0 4 5 0 P0 1 5 0 460

LN3C(3,1,1) = (-12345.67,-1234.567)

LN3C(4, 1,1) = (+8.9,-9.1)

P0 1 5 0 4 70

P0 1 5 0 480

LN3C( 5,1 , 1 ) = (-2635 . 1 2 , +46. 2 1 ) C*«*** TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

P0 1 5 0 49 0 P0 1 5 0 5 0 0 C«»t** UNSIGNED AND SIGNED REAL CONSTANTS (INTEGER PART

C«»**« ONLY)

P0150510

P0 1 5 0 5 2 0 OFVC = ( 1 0 . , 20 . ) QGVC = (+30 0. ,+ 4000. ) P01 50530

P01 50540

QHVC = (- 5 0 . ,-600.)

QIVC = (+71 . ,-92. ) P01 50550

P01 50560

QJVC = (-8 83 . , + 1 4 1 4. ) QKVC = ( 1 0 . ,+562.)P01 50570

P01 50580

NBS FORTRAN Test Programs Version 1 29
OLVC = ( 2002 -983 . ) P0 1 50 5 90

QMVC = ( + 461 . ,-165. ) P0 1 50600

QNV'C = (-2i . . + 122 . ) P0 1 5 0 6l0

LL1 C(6) = ( 10 . ,20 . ) P0 1 5 0620

L M 2 C ( 6 , 1 ) = ( + 3 0 0 . , + 4 0 b 0 . ) p 0 1 5 06 3 0 LN3C( 6.1,1 ) = (- 5 0. ,-60 0.) P0 1 5 0640

LL1C(7) = ( + 71.,-9 2.) P 0 1 5 06 5 0 LM2C(7,1) = (-283. , + 1414. ) P 0 1 5 0660

LN3C(7,1,i) = ( 1 0., + 5 62.) PO 1 5 06 70

LL1C( 8 ) = ( 2 0 02 -9 83 . ) P0 1 5 0680

LM2C( 8,1 ) = ( + 46 1 .

, - 1 6 5 . ) P0i5 0690

LN3C(8,1,1) = (-21. , + 122.) P0 1 5 0 700

ZtTt'n TEST ASSIGNMENT OF COMPLEX 'CONSfANTS FORMEb FROM P0 1 5 0 7 1 0 C***** UNSIGNED AND SIGNED REAL CONSTANTS (DECIMAL PART P0150720

C*7«Vt 'ONLY P0 1 5 0 73 0 QOVC = ( .0 0 1 , .0 02 0 0 ) P0 1 5 0 7 40

QPVC = ( + . 5 62 , + . 5 62 ) PO 1 5 0 7 5 0 OQVC = (-. 3 ,-. 333 33 33 ) P0 1 5 0 760

QRVC = ( + . 4 , - . 44 5 ) P 0 1 5 0 7 70

QSVC = (- .95, + .95) P0150780

QTVC = ( . 0 1 64239 , + . 36 ) P 0 1 5 0 790

QUVC = (.21, -.3963) P0150800

owe = ( + . 3398 ,. 33 98 ) P0 1 5 0 8 1 0 NUMVC = (-.6, .6) P 0 1 5 0 82 0 LL1C(9) = (.001, .00200) PO 1 5 0 8 3 0 LM2C( 1 , 2 ) = ( + . 562 , + . 5 62 ) P 0 1 5 0 8 40

LN3C( 1,2,1 ) = (-. 3 ,-. 33 33 3 3 3 ) PO 1 5 0 8 5 0 LLICdO) = ( + .4, -.4 4 5 ) P0 1 5 0 860

LM2C (2,2) = (-.95, +.95) P0150870

LN3C( 2,2 , 1 ) = ( .0 1 64239, + .36 ) P0 1 5 0 8 8 0 LLICdl) = (.2 1, -.3963 ) P0 1 5 0 890

LM2C(3,2) = (+.3398, .3398) P0150900

L N 3 C ( 3 , 2 , 1 ) = ( - . 6 , . 6 ) P 0 1 5 0 9 1 O' C**««« TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0150920

C*»*t* UNSIGNED REAL CONSTANTS WITH UNSIGNED EXPONENTS P 0 1 5 093 0 AVC = ( 0 . OEO , 1 . OEO ) P 0 1 5 094 0 LLrC( 1 2 ) = ( 4 5 62 3 1 .1 El ,789.4 5 3E3) PO 1 5 09 5 0 LM2C(4,2) = ( 44 . 9E4 , 2 . 5E3 ) P0 1 5 0960

LN3C( 4 , 2 , 1 ) = ( 2222. 3E 3 , 3 3 3. 2E2) P0 1 5 0970

Ctt**« TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0150980

C***«t UNSIGNED REAL CONSTANTS WITH SIGNED EXPONENTS P0150990

BVC : (3 . OE + 0 . 3 . OE + 0 ) P01510C0

CVC = ( 98 76 5 4. 3E- 1 , 8 76 5 43. 2E-2) P0151010

DVC = (4.444E+3,55.555E-4) P0151020

EVC = (6.0E-5,7.7E + 6) P015103()

LL1C(13) = (3. OE + 0, 3. OE + 0) P0151040

LM2C( 5 , 2 ) = (987654.3E-1,8 76543.2E-2) P0151050

LN3C(5,2,1) = (4.444E+3,55.555E-4) P0151060-

LL1C(14) = (6.0E-5,7.7E+6) P0151070

C«»*** TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0151080

C***** SIGNED REAL CONSTANTS WITH UNSIGNED EXPONENTS P0 1 5 1 090' FVC = ( + 1 4 . 2E1 , +26 . 67E0 ) P0151100

GVC = (-'36 . 923E47-0 . 234E03 ) POI 5 1 1 1 6 HVC = ( +2 . 1 E2 , -2 . 1 E2 ) POI 51 1 20

I've = ( - 5 95 . 9E0 0 , + 4 . 96 7E2 ) POI 5 1 1 3() LM2C(6.2) = (+14.2E1 ,+26.67E0) P0151140

LN3C( 6 , 2,1 ) = ( -36 . 923E 4 , - 0 . 234E03) P0151150

LL1C(15) = ( +2 . 1 E2 , -2 . 1 E2 ) P0151160

LM2C( 7 , 2 ) = ( - 5 95 . 9E 0 0 , + 4 . 96 7E2 ) POI 51 170 . C»«*t* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0151180

Ctt.tt SIGNED REAL CONSTANTS WITH SIGNED EXPONENTS P015119b

JVC = ( + 1 .OE + 0, + 1 .OE + 0) P0151200

kVC = ( - 2 . OE-O , - 2 . OE-O ) POI 5 121 0 LVC = (+49.2E-1 ,-65.27E+2) P0151220

MVC' = (-737 . 1 E + 3

. +99 . 8E-3 ) POI 5 1230

NVC = (+4774. 47E+03, -9362. 4E-4) P0151240:

0 V C =

' ( - 8 4 6 . 2 E - 5 . + 1 3 . 3 3 E + 1 ) P 0 1 5 1 2 5 0 LN3C(7.2.1)=(+1.0E+0,+1.0E+0) P0151260

30 NBS FORTRAN Test Programs Version 1
LL1C(16) = ( -2 . OE-0 , -2 . OE-0

)

LM2C(1,3) = (+49.2E-1 ,-65.27E+2)

PO 1 5 1 270

P01 51280

LN3C( 1,1 , 2 ) = ( -737 . 1 E + 3

, +99 . 8E-3

)

LL1C(17) = (+4774. 47E+03, -9362. 4E-4)

PO 1 5 1 290

P01 51300

LM2C( 2 , 3 ) = ( -846 . 2E-5 , + 1 3 . 33E + 1

)

Ct**«* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

PO 1 5 1 3 1 0 P01 51320

C***** UNSIGNED REAL CONSTANTS (NO DECIMAL

C****t UNSIGNED EXPONENTS

PART) WITH PO 1 5 1 330

P01 51340

PVC = (77. E7, 81 6248. E2)

LL1C(18) = (77. E7, 8 1 6248. E2)

P01 51 350

P0151360

LM2C( 3,3 ) = ( 1 334 . EO 1 , 379 . E03

)

LN3C( 2, 1 , 2 ) = ( 1 334. E0 1 , 379.E03)

PO 1 5 1 370

P01 51380

C*t*** TEST ASSIGNMENT OF COMPLEX CONSTANTS

C****» UNSIGNED REAL CONSTANTS (NO DECIMAL

FORMED FROM

PART) WITH

PO 1 5 1 390

P0151400

C*t*«* SIGNED EXPONENTS

QVC = (3.E+5,3.E+05)

PO 1 5 1 4 1 0 P01 5 1 420

RVC = (299.E-4,299.E-1)

SVC = (1419. E + 2, 1419. E-2)

PO 1 5 1 430

P01 5 1440

TVC = (76.E-3,987.E+0)

LL1C(19) = (3.E+05.3.E+5)

P01 51 450

P01 51460

LM2C( 4,3 ) = ( 299 . E-4 , 299 . E- 1

)

LN3C(3,1,2) = (1419. E + 2, 1419. E-2)

P01 51 470

P01 51 480

LL1C(20) = (76.E-3, 987. E+0)

C****» TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

PO 1 5 1 490

P01 51 500

C***** SIGNED REAL CONSTANTS (NO DECIMAL PART) WITH

C***»* UNSIGNED EXPONENTS

PO 1 5 1 5 1 0 P01 51 520

UVC = (+31 .EO, +4659. El

)

VVC = ( - 728 . E2 , -93296 . E3 ) PO 1 5 1 530

P01 5 1 540

MAVC = (+6.E6,-6.E6)

MBVC = ( -7914 . E3 , + 1 6 . E5

)

P01 51 550

P0151560

LM2C(5,3) = ( + 31 .E0 ,+4659.E1

)

LN3C(4,1,2) = (-728. E2, -93296. E3)

PO 1 5 1 5 70

P01 51 580

LLI C(21 ) = ( + 6.E6,-6.E6)

LM2C(6,3) = (-7914.E3,+16.E5)

PO 1 5 1 590

P01 51600

C*«tt« TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

C«*«*« SIGNED REAL CONSTANTS (NO DECIMAL PART) WITH

PO 1 5 1 6 1 0 P0151620

C***«* SIGNED EXPONENTS

MCVC = ( + 1 .E + 1 , + 1 .E + 1 ) PO 1 5 1 630

P01 51640

MDVC = (-2. E-2, -2. E-2)

MEVC = ( +3 . E-3 , -3 . E + 3 ) P01 51650P0151660

MFVC : (-4.E+4, +4.E-4)

MGVC = (+5.E+5,-5.E-5)

PO 1 5 1 670

P01 51680

MHVC = (-6.E-6, +6.E+6)

LN3C(5,1 ,2) = ( + 1 .E + 1 , + 1 .E + 1)

PO 1 5 1 690

P0151700

LL1C(22) = (-2. E-2, -2. E-2)

LM2C(7,3) = ( + 3. E-3, -3. E + 3)

PO 1 5 1 7 1 0 P0151720

LN3C(6,1,2) = (-4.E+4,+4.E-4)

LL1C(23) = ( + 5 . E + 5

, -5 . E-5

)

PO 1 5 1 730

P01 51740

LM2C(1.4) = (-6.E-6.+6.E+6)

C*«t«t TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

PO 1 5 1 750

• P0151760

C***** UNSIGNED REAL CONSTANTS (NO INTEGER

C***t« UNSIGNED EXPONENTS

PART) WITH PO 1 5 1 770

P0151780

MIVC = ( .39393E01 , .62E04)

LL1C( 24 ) = ( .39393E01 , .62E04)

P01 5 1 790

P0151800

LM2C( 2,4 ) = ( .009E2 , . 765 76 5 E3)

LN3C( 7, 1,2 ) = ( .009E2, .765 76 5 E3)

P 0 1 5 1 8 1 0 P01 51820

C«*«t« TEST ASSIGNMENT OF COMPLEX CONSTANTS

C«**tt UNSIGNED REAL CONSTANTS (NO INTEGER

FORMED FROM

PART) WITH

P01 5 1 830

P01 51840

Ct*«*« SIGNED EXPONENTS

MJVC =( . 3 5 2E + 09, .3 5 2E + 3)

P01 51 850

P01 51 860

MKVC =( . 1 47626E + 0, . 891E-14)

MLVC =( .9E-7, .9999E + 8)

P01 51 870

P01 51 880

MNVC =( . 13E-04, . 13E-04)

LL1C( 2 5 ) =( .3 52E + 09, .352E + 3)

PO 1 5 1 890

P01 51900

LM2C( 3,4 ) =( . 1 47626E + 0, .891E-U)

^LN3C(1,2,2) =( .9E-7. .9999E + 8)

P01 51910

P01 51920

LN3C(2,2,2) =( .13E-4, .13E-4)

C«ttt* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

PO 1 5 1 930

P01 51940

NBS FORTRAN Test Programs Version 1 31
C**»*t SIGNED REAL CONSTANTS (NO INTEGER PART) WITH P0151950

Ct*«*t UNSIGNED EXPONENTS P0151960

HOVC =(*.77EbO.*.77E06) P0 15 19 7

6

MPVC =(*.878E1 ,-.878E1 ) P0151980

MQVC =(-.9797E2. + .9797E2) P6i51996

MRVC =(-. 10101E15.-. 10101E15) P0 1 52000

LL1C(26) =(+.77E00,+.77E0b) P0152010

LM2C(4,4) =(+.878E1 ,-.878E1 ) P0152020

LN3C(3V2 /2 ) =(-. 9 79 7E2, + .9797E2) PO 1 5 203 0 LN3C(4,2,2) =(-.10101E15,-.10101E15) P0152040

C*«*«t TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0 1 52 0 5 0 C*«**« SIGNED REAL CONSTANTS (NO INTEGER PART) WITH P0152060

C**t*« SIGNED EXPONENTS P 0 1 5 2 0 70

MSVC =( + .68E + 1 2, + .3 5 762 8E + 0) P0 1 5 2 080

MTVC =( + .798E-3, + .76444E-00) PO 1 5 2 090

MUVC =(-.3247E+20,-.2594E+5) P0152100

MVVC =(-.43599E-19,-.12E-4) P0152110

AAVC =(-.6E-9,-.6E+9) P0152120

ABVC = ( - . 91 1 9E + 6 , + . 91 1 9E-6 ) P015213()

BAVC = ( + . 3 9426E + 2

, - . 39426E-2 ) P0152140

BBVC = ( + . 45E- 1 2 . + . 45E + 1 2 ) P0152150

LL1C(27) =(+.68E+12,+.357628E+0) P0152160

LM2C( 5.4 ) =( + .798E- 3. + .764 4 4E-00) P0152170

LN3C( 5,2,2 ) =

( - . 32 4 7E + 2 0 , - . 2 594E + 5 ) P0152180

L L1C(28) =(-.43599E-19,-.12E-4) P 0 1 5 2 1 9 0 LM2C(6.4) =(-.6E-9,-.6E+9) P0152200

LN3C(6,2,2) =(-.91 1 9E + 6 , + . 9 1 1 9E -6 ) PO 1 5 22 1 0 LM2C(7,4) =(+.39426E+2,-.39426E-2) P0152220

LN3C(7,2.2) =( + .45E-12, + .45E + 12) PO 1 5 22 30

C***** ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM SIGNED AND UNSIGNED P0152240

««*** INTEGER CONSTANTS WITH SIGNED AND UNSIGNED EXPONENTS P0 1 5 22 5 0 BCVC = ( +4793E + 2 , 3 4 79E2 )

' P0 1 52260

DDVC - ( 3682E- 3 , 823 6E-2 ) P0 1 522 70

DCVC = (-2571E5,+1752E+5) P0152280

CHCVC = ( + 1 460E- 4,- 1 064E + 01 ) P0 1 52 290

A1C( 5 ) = ( 4793E 2 , 34 79E + 2 ) P0 1 5 2 3 0 0 A1C( 6 ) - ( 3682E-03 , + 8 23 6E-02) P0 1 5 2 3 1 0 A1C(7)=(-2571E+5,1752E+05) P0152320

A1C( 8 ) = (1460E-4,-1064E1) PO 1 5 2 3 3

0' LM2C(8,2) = ( 4793E+2 , +3479E+2 ) P0152340

LN3C(8,2,1) - (+3682E-3,8236E-02) P 0 1 5 2 3 5 0 LN3C( 8,2,2 ) = ( -2 5 7 1 E + 0 5 , 1 7 5 2E5 ) P0 1 5 2360

LN3C( 8.1,2 ) = ( 1 460E- 0 4 , - 1 064E + 1 ) P0 1 5 23 70

C**«** ASSIGNMENT OF COMPLEX VARIABLES AND ARRAY ELEMENTS P0152380

C*t«»* TO COMPLEX VARIABLES AND AR R A Y E L E ME NT S P0 1 5 2390

CCVC = QTVC P0152400

CDVC = LL1C(12) P0 1 5 24 1 0 CAVC = LM2C( 1 , 4) P01 52420

DAVC = LN3C(6,2,2)

"' P 0 1 5 2 43 0 AlCd) = CCVC P0 1 5 2 440

A1 C(2) = LL1 C( 12) P0 1 52 4 5 0 A1 C(3) = LM2C( 1

, 4) P0 1 5 2 460

A1 C(4) = LN3C(6,2,2) P0152470

A2C(1 , 1 ) = QTVC P01 52480

A2C ( 2,1) = LL 1 C( 1 2 ) P0 1 5 2 490

A2C(1 ,2) = LM2C(1 ,4) P0152500

A2C(2,2) = LN3C(6,2,2) PO 1 5 2 5 1 0 A3C( 1 , 1 , 1 ) = CCVC P0 1 5 2 520

A3C(2, 1,1) = LL1C(12) P0 1 52 5 30

A3C(1 ,2,1) = LM2C(1 ,4) P0 1 5 2 5 40

A3 C( 2, 2,1) = LN3C(6,2,2) PO 1 5 2 5 5 0 C***t* ASSIGNMENT OF COMPLEX VARIABLES AND ARRAY ELEMENTS P0152560

C**"*** TO COMPLEX VARIABLES AND ARRAY ELEMENTS (UNARY 6 . 4 / 4 4 P 0 1 5 2 5 7 0 C***** MINUS USED TO REVERSE BOTH PLUS AND MINUS VALUES) P0152580

ASVC : - QGVC P01 52590

BSVC : - QHVC P0152600

CSVC = - LL1 C(26) P0 1 5 26 1 0 DSVC = - LL1 C(23) P01 52620

32 NBS FORTRAN Test Programs Version 1
/^ A M V t • 1I. M71 I ^ r (\ 11 3 )

f J ' P 0

' SJ 7L ftV 3J f)u AAAVr = - L M2 C ( 1 3 ) P

0

5J 7c ftu 4*t 0w ARAVr = - p n

S 7 ft ^ 0

L N 3 C ( 5 2 1 ) P 0 i 7 ftft 0 ADAVr = - r> U V u LI<JU\Ufbf 1/ P 0 D 1 U V 1 / (J U V U P 0 SJ 7c. ftU flO 0V nu Hn vV rL P 0 S 7 ft Q 0

1 1 1 r ( 7 ft

)

p n "i 7 7 0 0 R 1 r ( 4 > = - 1 1 1 r ( 7 3

)

P 0 S 7 7 1 0

D 1 L V J / ~ 1U M1 1 £7 rU M\ 1 )

f J / P 0 S 7 7 7 0

D 1 L V U / — L 1 1 C U V 1 f H / P 0 S 7 7 ^ 0

B 1 C ( 7 ) =

- 1UlVJUVJfCf N 3 r ( S 7 11/) P 0 5 2 7 4 0

1 Lt V 0 / P 0 S 7 7 "i 0 R7 r M 1 ) = - QGVC P 0 S 7 7ft 0

»R 7 r ( 7 1 i = u n V u P 0 S 7 7 7 0 R7rM 1) = - 1 1 1 r ( 7 ft

)

P 0 5 2 7 8 0

R 7 r ( 4 1 ) = - 1 1 1 r ( 7 3

)

P Ci 1 S 7 7 Q 0 R 7 r ( 1 7 ) = - 1 M 7 r d 3 ) P 0 J t- O \J \1 R 7 r ( 7 7 5 = - 1L M1 1 7L. rU M\ 1 4 )

f t / p n SJ 7c. X0 11 0 R7 r ( 3 7 ) = - LL>1JU\JfL.f N 3 C ( 5 2 1>/) P 0 5 2 8 2 0 R7 r ( 4 7 ) = - 1 N 3 r ( ft 7 1 ) P 0 J 7C- XO 1J 0V R^ r M 1 1

)

= - QGVC P 0 5 7 8 4 0 R3 r ( 7 1 1

)

- - QHVC P 0 15J 7X50 L. o J y

R 3 r ( 1 7 1

)

DJU\l(C.f 1/ = - 1 1 1 C ( 7 ft ) P 0 5 2 8 6 0 R r ( 7 7 1 ) = - 1 1 1 r ( 7 3

)

P 0 1 S 7 X 7 0 R7 r ( 1 1 7

)

DJUV If IfC/ = - L M 7 C ( 1 3 ) •po 5 2 8 8 0 R 3 r f 7 1 7 ) = - 1 M 7 r d 4 ) P 0 SJ 7L- Xo Q7 0y

R 3 r ( 1 7 7 ) - - LN3C(5 2 1) PO 5 2 9 0 0 R 3 r ( 7 7 7 ) - - LN3C(6 2 1) P 0 5 2 9 1 0 C* 1 1 * * WRITE RESULTS FOR THIS TEST SEGMENT P 0 5 2 9 2 0 WRITE (NUVI, 152) QAVC. LLICd). LM2C(1,1), LN3C(1,1,1), OBVC, P 0 iJ t.7 97 J 0y

1 LL1C(2), LM2C(2,1), LN3C(2,1,1), QCVC. LL1C(3), LM2C(3.1), P 0 5 2 9 4 0 2 LN3C(3.1,1), QDVC. LL1C(4). LH2C(4,1), LN3C(4,1,1), QEVC, P 0 5 2 9 5 0 3 LL1C(5), LM2C(5.1), LN3C(5.1,1), OFVC, LL1C(6). QGVC. P 0 5 2 9 6 0 4 LM2C(6,1), QHVC, LN3C(6.1,1), QIVC, LL1C(7), OJVC, LM2C(7.1), PO 5 2 9 7 0

5 QKVC. LN3C(7,1,1), OLVC, LL1C(8), OMVC, LM2C(8,1), QNVC, PO 5 2 9 8 0 6 LN3C(8.1,1), OOVC, LL1C(9), QPVC, LM2C(1,2), QOVC, PO 5 2 990

7 LN3C(1 ,2,1), QRVC, LLICdO). QSVC, LM2C(2,2), QTVC, PO 5 3 0 0 0 8 LN3C(2,2, 1 ) P

0

5 3 0 1 0 WRITE (NUVI, 153) QUVC, LLIC(II), QVVC, LM2C(3,2), NUMVC. P

0

5 3 0 2 0

1 LN3C(3,2,1), AVC, LL1C(12), LM2C(4,2), LN3C(4,2,1), BVC, P

0

5 3 0 3 0 2 LL1C(13), CVC, LM2C(5,2), OVC, LN3C(5,2,1), EVC, LL1C(14), PO

5 3 0 40

3 FVC, LM2C(6,2), GVC. LN3C(6,2,1), HVC, LL1C(15), IVC, P

0

5J 3J 0V 5J 0V 4 LM2C(7,2), JVC, LN3C(7,2,1), KVC, LL1C(16), LVC, LM2C(1,3), P 0 1 5 3 0 6 0

5 MVC, LN3C(1,1,2), NVC, LL1C(17) P 0

' 5J 3J 0y 70/ y WRITE(NUVI ,8873) OVC, LM2C(2.3), PVC, P 0 1 5J 3J 0y 8o 0y

1 LLICd 8). LM2C(3,3), LN3C(2,1,2), OVC. LL1C(19) P 0 1 5J 3J 0y 97 0y WRITE (NUVI, 154) RVC, LM2C(4,3), SVC, LN3C(3,1,2), TVC, PO 5J 3J 10t y 0V

1 LL1C(20), UVC, LM2C(5,3), VVC, LN3C(4,1,2), MAVC, LL1C(21), P 0 1 2 MBVC, LM2C(6,3), MCVC, LN3C(5,1,2), MDVC, LL1C(22), MEVC, P 0 1 S 7 1 7 0 3 LM2C(7 ,3), MFVC, LN3C(6,1,2), MGVC, LL1C(23), MHVC, P 0

' 5 3 13 0 4 LM2C(1 ,4), MIVC, LL1C(24), LM2C(2,4), LN3C(7,1,2) P 0 1 S 3 1 4 n WRITE (NUVI, 8870) MJVC, LL1C(25), MKVC, LM2C(3,4), MLVC, p n 1 5 3 15 0 LN3C(1,2,2), MNVC, LN3C(2,2,2), MOVC, LL1C(26), P 0 5J 3J 11 ftu 0y + MPVC, LM2C(4,4), MOVC, LN3C(3,2,2), MRVC, PO 1 5 3 17 0 LN3C(4,2,2). MSVC, LL1C(27), MTVC, LM2C(5,4), Pr 0V 1 5 3 18 0 $ MUVC, LN3C(5,2,2), MVVC, LL1C(28), AAVC, P 0 1 S 7 10 0 LM2C(6,4), ABVC, LN3C(6,2,2), BAVC, LM2C(7,4), P 0 5J 3J 7c 0V 0y

+ BBVC, LN3C(7,2,2) P 0 1 S 7 7 1 0 WRITE(NUVI,8872) BCVC,A1C(5),LM2C(8,2),DDVC, A1C(6),LN3C(8,2,1). P 0 1 "13 J J 7L 7L 0\J

1 DCVC,A1C(7),LN3C(8,2,2),CHCVC,A1C(8),LN3C(8,1,2) P 0 1 SJ 7J 7L 7J 0V OWRITE (NUVI, 8 8 7 1 ) QTVC, CCVC, AlCd), A2C(1,1), A3C(1,1,1). P 0 1 5J 3J 7t. 4*T 0y

1 •LL1C(12), CDVC, A1C(2), A2C(2,1), A3C(2,1,1), LM2Cd,4), P 0 1 5J 3J 7L. 5J 0\J 2 CAVC, A1C(3), A2Cd,2), A3C(1,2,1), LN3C(6,2,2), DAVC, P 0 1 SJ 7J 7 ft L. o y 3 A1C(4) , A2C(2,2), A3C(2,2,1), QGVC, ASVC, BICd), B2Cd,1), P 0 1 SJ J L7 71 nyj 4 B3C(1 , 1,1), QHVC, BSVC, B1C(2), B2C(2,1), B3C(2,1,1), P 0 1 sJ 7J L.7 X0 ny

5 LL1C(26), CSVC, B1C(3), B2C(3,1), B3C(1,2,1), LL1C(23), PO 1 5 3 2 9 0 6 DSVC, B1C(4), B2C(4,1), B3C(2,2,1), LM2C(1,3), AAAVC, B1C(5), PO 1 5 3 3 0 0

NBS FORTRAN Test Programs Version 1 33
7 B2C(1.2), B3C(1,1,2), LM2C(1,4), ABAVC, B1C(6), B2C(2,2), P0153310

8 B3C(2.1,2),, LN3C(5,2,1), ACAVC, B1C(7), B2C(3,2), B3C(1,2,2), P0 1 5 332 0 9 LN3C(6,2,1), ADAVC, BiC(8), B2C(4,2), B3C(2,2.2) P0153330

C**tt* FORMAT STATEMENTS FOR THIS SEGMENT P0153340

1'52' FORMAT (/ 6X , 9H 0 . 22 2E + 0 2 , 9X . 1 0 HO . 3 3 33 E + 0 2 / 4 ( E 1 5 . 3 , E 1 9 . 4 /

)

'/ P0 1 5 33 5 0 A 6X,10H0.3956E + 03,8X,11H0.41067E + 04/4(E16.4,E19.5/)/ P01 53360

B 5X J 4H- 0 . 1 234 567E + 05 , 4X J 4H- 0 . 1 23 4 5 67E + 04/4(Ei9 . 7, El 8 . 7/ ) / P0 1 5 33 70

C 6X,8H0.89E+01 ,9X,9H-0.91E+01/4(E14.2,E18.2/)/ P0153380

D 5 X , 1 3 H - 0 .263512E + 04,6X,10H0.4621E + 02/4(E18.6, El ^ ; 4 / )

/ p 0 1 5 3 3 9 0 E 6X, 7H0 . 1 E + 02 , 1 IX, 7H0 . 2E + 02/2 (El 3 . 1 , El 8 . 1 / ) / P0 1 5 3 40 0

F 6X , 7 H 0 . 3 E + 0 3 , 1 1 X , 7H0 . 4E + 0 4 / 2 ( E 1 3 . 1 , E 1 8 . 1 / ) / P 0 1 5 3 4 1 O' G 5X, 8H-0 . 5E + 02, 1 OX, 8H-0.6E + 03/2(E13 . 1 , El 8 . 1 / ) / P0 1 5 3 420

H 6X,8H0.71E + 02,9X,9H-0.92E + 02/2(E14.2,E18.2/)/ P0 1 53 43 0 IIHI, 4X,10H-0.883E+03,9X,10H0.1414E+04/2(E15.3,E19.4/)/ P0453440

J 6X.7H0.1E+02,11X.9H0.562E+03/2(E13.1 ,E20.3/)/ P0153450

K 6X, 1 OHO . 2 0 02E + 04, 7X, 1 OH- 0 . 98 3 E + 03/2 ( El 6 . 4 , El 7 . 3/ ) / P0 1 5 3 460

L 6X, 9H0 . 461E + 03,8X,10H-0.165E + 03/2(E15.3,E18 . 3 / ) / PO 1 53470'

M 5X.9H-0.21E+02,10X,9H0.122E+03/2(E14.2,E19.3/)/ P0153480

N 6X, 7H0 . 1 E-02 , 1 IX, 7H0 . 2E-02/2 ( El 3 . 1 , E 1 8 . 1 / ) / P0 1 53 490'

0 6X,9H0.562E+00,9X,9H0.562E+00/2(E15.3,E18.3/)/ P0153500

P 5X,8H-0.3E + 00,10X,14H-0.3333333E + 00/2(E13.1 , E24 . 7 / )7 P0 1 5 3 5 1 0 Q 6X, 7H0 . 4E + 00 , 1 OX, 1 OH-0 . 44 5 E + 00/2 (El 3 . 1 , E20 . 3/ ) / P0 1 5 3 5 20

R' 5X. 9H-0 . 95E + 00 , 1 OX, 8H0 . 95E + 00/2 ( EU . 2 , El 8 . 2/ ) / P0 1 5 3 5 30

S 6X. 12H0 . 1 64239E-01 , 6X, 8H0 . 36E + 00/2 ( E 1 8 . 6 , El 4 . 2/ ) , 1H ) P0 1 5 3 5 40

15"3 FORMAT ( 6X . 8 H 0 . 2 1 E + 0 0 , 9X , 1 1 H - 0 . 3 96 3 E + 0 0 / 2 ( E 1 4 . 2 , E 2 0 . 4 / )7 P 0 1 5 3 5 5 0 A 6X, 1 OHO . 3 398E + 00 , 8X, 1 OHO . 3 3 98 E + 00/2 ( El 6 . 4 , El 8 . 4/ ) / P0 1 5 3 5 60

B 5X. 8H-0 . 6E + 00 , 11X,7H0.6E + 00/2(E13.1,E18.1/)/ P0 1 5 3 5 70

C1H1,5X.7H0.0E+00,11X,7H0.1E+01/E13.1,E18.1// P0153580

D 6X,13H0.4562311E + 07,5X,12H0.789453E + 06/E19.7,E17 . 6 / / P 0 1 5 3 5 90

E 6X.9H0.449E+06,9X,8H0.25E+04/E15.3,E17.2// P0153600

F 6X,11H0.22223E + 07,7X,10H0.3332E + 05/E17.5,E17.4/ / P 0 1 5 3 6 1 0 G 6X. 7H0 . 3E + 01 , 1 IX, 7H0 . 3E + 01 /2 ( El 3 . 1 , E1 8 . 1 / ) / P0 1 5 362 0 H 6X.13H0.98765 4-3E + 05,5X,13H0.8765432E + 04/2(E19.7, El 8 .7 / ) / P 0 1 5 3 6 3 0

1 6X. 1 OHO . 4444E + 04, 8X, 1 1 HO . 5 5 5 5 5 E-02/2 (El 6 . 4 , E 1 9 . 5/ ) / P0 1 5 3640

J 6X.7H0.6E-04,11X,8H0.77E + 07/2(E13.1,E19.2/)/ P0 1 5 365 0 K 6X.9H0.142E+03,9X,10H0.2667E+02/2(E15.3,E19.4/)/ P0153660

L 5X. 12H-0.36923E + 06.6X,10H-0.234E + 0 3/2(E17.5,E16 . 3 / ) / P0 1 5 36 70

M 6X.8H0.21E+03,9X,9H-0.21E+03/2(E14.2,E18.2/)/ P0153680

N 5X.11H-0.5959E + 03.8X,10H0.4967E + 03/2(E16.4,E18.4/) / P0 1 5 3690

0 6X, 7H0 . 1 E + 01 , 1 IX, 7H0 . 1 E + 01 /2 (El 3 . 1 , El 8 . 1 / ) / P0 1 5 3 700

P 5X,8H-0.2E + 01,10X,8H-0.2E + 01/2(E13.1.E18.1/)/ P0 1 5 3 7 1 0 Q 6X, 9H0 . 492E + 01 , 8X, 1 1 H- 0 . 6 5 2 7E + 04/2 ( El 5 . 3 , El 9 . 4/ )

, P0 1 5 3 72 0 R1H1 . 4X. 1 1H-0.7371E + 06,8X,9H0.998E-01/2(E16.4,E17.3/)/ PCI 5 3 73 0 S 6X,12H0.477447E+07,5X. 12H-0.93624E+00/2(E18.6,E17.5/),1H ) P0153740

8 8 73 FORMAT ( 5 X , 13H-0 .8 46200E-02,6X,11H0.13330E + 03/2(E18.6 , E 1 7 . 5 / ) / P 0 1 5 3 7 5 0 U 6X.12H0.770000E+09,6X,11H0.81625E+08/2(E18.6,E17.5/)/ P0153760

V 6X.12H0.133400E + 05,6X,11H0.37900E + 06/2(E18.6,E17.5/)/ ' P0153770

W 6X, 1 2H0 . 300000E + 06 , 6X, 1 1 HO . 30 000E + 06/2 (E 1 8 . 6 , El 7 . 5/ ) . 1H ) P0 1 5 378 0 i5"4 FORMAT ( 6X , 9H0 . 2 99E - 0 1 , 9X , 9H0 . 2 99E + 0 2 / 2 ( E 1 5 . 3 , E 1 8 . 3 / ) / P0 1 5 3 790

A 6X. 1 OHO . 141 9E + 06 , 8X, 1 OHO . 1 41 9E + 02/2 ( El 6 . 4 , E 1 8 . 4/ ) / P0 1 5 3800

B 6X. 8H0 . 76E-01 ,10X,9H0.987E + 03/2(E14.2,E19.3/)/ PO 1 5 38 1 0 C 6X. 8H0 . 31 E + 02 , 1 OX, 1 OHO . 46 5 9E + 05/2 ( E 1 4 . 2 , E20 . 4/ ) / P0 1 5 3 820

b 5X.10H-0.728E + 05,8X,12H-0.93296E + 08/2(E15.3,E20.5/)/ P0 1 5 3 8 3 0 E 6X,7H0.6E + 07,10X,8H-0.6E + 07/2(E13.1 ,E18.1/)/ P0 1 5 3 8 40

F 5 X .1 1 H - 0 . 791 4 E + 07, 8 X , 8 H 0 . 1 6 E + 0 7 / 2 ( E 1 6 . 4 , E 1 6 . 2 / ) 7 P 0 1 5 3 8 5 0 G 6X,7H0.1E+02,11X,7H0.1E+02/2(E13.1,E18.1/), P0153860

HiHi.4X.8H-0.2E-01,10X,8H-0.2E-01/2(E13.1,E18.1/)/ P0153870

1 6X,7H0.3E-02,10X.8H-0.3E+04/2(E13.1 ,E18.1/)/ P0153880

J 5 X . 8 H - 0 . 4 E + 0 5 . 1 1 X , 7 H 0 . 4 E - 0 3 / 2 ( E 1 3 . 1 , E 1 8 . 1 / ) / P 0 1 5 3 8 9 0 K 6X.7H0.5E+06,10X,8H-0.5E-04/2(E13.1 ,E18.1/)/ P0153900

L 5X.8H-0.6E-05, 11X,7H0.6E + 07/2(E13. 1 ,E18.1/)/ PO 1 539 1 0 M 6X, 1 1H0 .39393E + 01 , 7X, 8H0 . 62E + 04/2 (El 7 . 5 , El 5 . 2/ ) / P0 1 53920

N 6X.7H0.9E+00,11X,12H0.765765E+03/2(E13.1,E23.6/).1H ) P0153930

8870 FORMAT ( 6X , 9H0 . 3 52 E + 09 , 9X , 8H0 . 3 5 E + 0 3 / 2 ( E 1 5 . 3 , E 1 7 . 2 / ) / P0153940

( 6X.12H0.1 47626E + 00,6X,9H0.891E-14/2(E18.6,E15.3/)/ P0153950

* 6X.7H0.9E-07, 1 IX, 10H0.9999E + 08/2(E13. r,E21 .4/)/ P0 1 5 3960

) 6 X ,8 H0.13E-04,10X,8H0.13E-04/2(E14.2,E18.2/)/ P0153970

/ 6X,8H0.77E+00. 10X.8H0.77E+00/2(E14.2.E18.2/)/ P0153980

34 NBS FORTRAN Test Programs Version 1
/ 6X, 9H0 . 87aE + 01 . 8X, 1 OH-0 . 8 78E + 01 /2 (El 5 . 3 , El 8 . 3/ ) / P0 1 5 3 990

A 5X, 1 1 H-0 . 9797E + 02 , 8X, 1 OHO . 9797E + 02/2 (El 6 . 4 , El 8 . 4/ )

, P0 1 5 40 00

1HT.'4X,T2H-0 . 1 01 01E + 1 5 , 6X. 1 2H-0 . 1 01 01 E + 1 5/2(El 7 . 5 ^ -jyy / poi 5 40 1 0 6X,8H0.68E+12. 10X, 12H0.357628E+00/2(E14.2.E22.6/)/ P0154020

- 6XV9H0 . 798E-03 , 9X, 11 HO . 7 6 4 4 4 E + 0 0 / 2 ( E 1 5 . 3 , E 2 0 . 5 / ) / POI 5 403 0 + 5X.11H-0.3247E+20,7X,11H-0.2594E+05/2(E16.4,E18.4/)/ P0154040

1 5 X'.' 1 2 H - 0 . 4 3 5 9 9 E - 1 9 , 6 X , 9 H - 0 . 1 2 E - 0 4 / 2 ( E 1 7 . 5 , E 1 5 . 2 / y/ POI 5 4 0 5 0 2 5X. 8H-0 . 6E-09 , 1 OX. 8H-0 . 6E + 09/2 (El 3 . 1 , El 8 . 1 / ) / P0 1 5 4060

3 5X,'l 1 H-0 .9119E + 06,8X', 10H0.91 1 9 E - 0 6 / 2 ( E 1 6 74 7E 1 8 . 47T7 POI 5 4 0 70

4 6X,11H0.39426E+02,6X,12H-0.39426E-02/2(E17.5.E18.5/)/ P0154080

5 6X,8H0.45E-12,10X,8H0.45E + 12/2(E14.2,E18.2/),1H ) POI 5 4 0 90

8872 FORMAK P0154100

6 6X, 1 OHO . 4 793E + 06 , 8X, 1 OHO . 3 4 79E + 06/3 ( El 6 . 4 , El 8 . 4/ ) / P0154110

7 6X, 10H0.3682E+01 ,8X,10H0.8236E+02/3(E16.4,E18.4/)/ P0154120

8 5'X ,11H-O.L5 71E + 0 9.8X,10H0.1752E + 09/3(E16.4,E18. kf) I P 0 1 5 4 13 0 9 6X, 1 OHO . 1 460E + 00 , 7X, 1 1 H- 0 . 1 064E + 05/3 (El 6 . 4 , El 8 . 4/ ) ) P0154140

8 8 7"l p Qj^j^-^ Yi'^ -5 ^

- 13H0.1642390E-01,5X,13H0.3600000E + 00/5(E19.7,E1 8.7/) P 0 1 5 4 1 5 0

1 /6X,13H0.4562311E+07,5X,13H0.7894530E+06/5(E19.7,E18.7/)/ P0154160

2 5X.14H-0.60 0 0000E-05,5X,13H0.6000000E + 07/5(E19.7,E18 .71)1 POI 541 70

3 5X,14H-0.9119000E+06,5X,13H0.9119000E-06/5(E19.7,E18.7/), P0154180

4 3'9H1 EACH GROUP SHOULD BE IDENTICAL EXCEPT/ POI 54190

5 38H FOR THE SIGN OF THE FIRST TWO LINES// P0154200

6 6X.13H0.3000000E + 03,5X,13H0.4000000E + 04/5(E19.7,E18. 71)1 P 0 1 5 4 2 1 0

7 5X,14H-0.5000000E+02,4X,14H-0.6000000E+03/5(E19.7,E18.7/)/ P0154220

8 6X, 1 3H0 .7700000E + 00.5X,13H0.7700000E + 0 0/5(E19.7 , El 8 . 77y'/ POI 5 42 3 0 9 6X, 1 3H0 . 5 00 0 0 0 0 E + 06 , 4X, 1 4H- 0 . 5 0 0 0 0 0 0E-04/ 5 ( E19 . 7, El 8 . 7/ ) / P0 1 5 42 4 0 A 6 X , 1 3 H 0 . 4 9 2 0 0 0 0 E + 0 1 ; 4 X . 1 4 H - 0 . 6 5 2 7 0 0 0 E + 0 4 / 5 ( E 1 9 _ 7 j g -

7 y y ^ p q 1 5 4 2 5 0 B 5X,14H-0.6000000E-05,5X,13H0.6000000E+07/5(E19.7,E18.7/)/ P0154260

C 6 X 7l 3 HO .4 444000E + 04,5X,13H0.5555500E-02/5(E19.7,E 1 g ;77 ) / p 0 1 5 4 2 7 0 D 1H1.4X,14H-0.3692300E+06,4X,14H-0.2340000E+03/5(E19.7.E18.7/)) P0154280

C* *«*

t END OFTESTSEGMENT015 ~ POI 5 4290

C***** WHEN EXECUTING ONLY SEGMENT 015, THE STOP AND END CARDS P0154300

C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS - POI 54310

C««*** 1 AND 2 REMOVED. P0154320

C= STOP POI 5 433 0 C= END P0154340

STOP

'' P015C1

END P015C2

C**«*«t*««********«**»**«»*****t*****«***««***«******««*«**t«««*t«*«*«t*P0160010

C* * * * * PO 1 60020

C * *<* «"* L AS G N - ( 0 T 6 ) POI 6 0 030

C* * * * * POI 60 040

Z*****ttttt*tt*ttt***tttttttt*tt*ttttt***tttlitttttt*ttlit*tt****tttttttttPQ^kQQ^Q

Ztttt* GENERAL PURPOSE ASA REFP0160060

C***** TO TEST LOGICAL ASSIGNMENTS 7"

. 1 . 1 . 2 P 0 1 6 0 0 7 0 C***** CONSTANTS USED IN THIS SEGMENT P0160080

C*»*** S P E C I F I C A T I 0 N S SEGMENT 61 6 POI 60090

C***** PO 160100

C * » * « WHEN EXE CUT I N G 0 N L Y S EG ME NT 016, THE 5 p ^ j. j p j (-^y j ^.^^^.^.^.^.^.^.^ POO 1 0 3 90

C«*«** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0010395

C**««* IN COLUMNS 1 AND 2 REMOVED. P00 1 0 406

C***** P0010405

C = D I M E N S 10 N I A CI I ( 5 ) POO 1 04 10

C= LOGICAL MCAVB,MCBVB,MCCVB,MCDVB,MCEVB.MCFVB,MCGVB.MCHVB.MCIVB. P0010415

C= 1 MCJVB, MCKVB, MCLVB, MCMVB. MCNVB ,MCA1B(7) P00 1 0420

C= LOG! CAL A1 B( 2 ) , A2 B ( 2 , 2 ) , A3 B ( 2 , 2 , 2 ) , AVB , B VB . C VB POO 1 0 42 5 C***** POO 1 0430' DIMENSION IAC1I(5) P016A1

L 0 G I C A L M C A V B , M C B V B , M C C V B , M C D V B , M C E V B , M C F V B , M C G V B . M C H V B ; fi c vg ; P 0 1 6 A

2

1 MCJVB, MCKVB, MCLVB, MCMVB, MCNVB ,MCA1B(7) P016A3

LOG I CAL A1 B ( 2 ) . A2 B ( 2 , 2 ) , A3 B ( 2 , 2 , 2 ) , AVB , B VB , CVB PO 1 6A4

Zttttt OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0160110

C « WHEN EXECUTING ONLY SEGMENT 016, THE FOLLOWING STATEMENT P0 0 70296

C«tt**  NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070295

C*'* *'* * POO 7030 0 C= NUVI = 6 P0070305

-NUVI = 6 P016B1

C**t«t P0160120

NBS FORTRAN Test Programs Version 1 35
IAC1 I ( 1 ) = 25 P0160130

IAC1 I (2) = 10 P0160U0

IAC1I(3) = 15 p 016 015 0 IAC1 I (4) = 25 P0160160

C^tt't. WRITE HEADER FOR THIS SEGMENT P0 16 017 0 WRITE (NUVI,160) POUOiaO

no FORMAT ( iH1.28H LASGN - (016) ASSiGNMENT Oi='/ V6XVl 70g rCAL VARTaPO 160190

ALES/21H ASA REFS. - 7.1.1.2//9H RESULTS) P0160200

CT*««t TEST THE ASSIGNMENT OF RELATIONAL EXPRESSIONS 6.2 P0 1 602 1 0 C*««** TO LOGICAL VARIABLES AND ARRAYS P0160220

MCAVB = IAC1 I (2) ..LT. IAC1 I (3) P0 1 60230

MCBVB = IAC1I(3) ,LT. IAC1I(2) P0160240

MCCVB : I AC1 I ( 1 ) .EO . IAC1I(4) P0 1 602 5 0 MCDVB = IAT1I(2) .EO. lACIKD P0 1 60260

MCEVB = lACIKD .LE. IACri(4) P0 1 602 70

MCFVB = IAC1I(2) .LE. lACII(l) P0160280

MCGVB = lACIKI) .LE. IACil(2) P0 1 60290

MCHVB = IAC1 1(1) .EO. 25 P0160300

MCIVB = IAC1I(2) .EO. lACIKO P0 1 603 1 0 MCAIB(I) = IAC1I(2) .NE. IAC1I(3) P0160320

MCA1B(2) = lACIKD .NE. IAC1I(4) P0 1 6033 0 MCA1B(3) = lACIKD .GT. IAC1I(2) P0 1 603 40

MCA1B(4) = IACli(2) .GT. lACIKI) P0 1 603 5 C) MCA1B(5) = lACIKD .GE. IAC1I(2) P0 1 60360

A1B(1) = lACIKD .GE. IAC1I(4) P0 1 603 70

A1B(2) = IAC1I(2) .GE. lACIKI) P0 1 60380

C***«t TEST THE ASSIGNMENT OF A MIXTURE OF RELAtiONAL AND p6160390

C«*t«t LOGICAL EXPRESSIONS TO LOGICAL VARIABLES AND ARRAYS 6.3 P0160400

A2B(1,1) : .TRUE. P 0 1 60 4 1 0 A2B(1,2) = .FALSE. P0160420

AVB = A2B(1,2) .AND. .NOT. A2B(i,1) P0160430

BVB = A2B(1.2) .OR. .NOT. A2B(1,1) P0160440

CVB = I AC1 I (2) . LT . I AC1 I (3 ) . AND . (A2B( 1 J ) . OR. . NOT . A2B( i JT) .OR. A2B(P0160

A1,1).AND..N0T.A2B(1,2).AND.IAC1I(1).GT.IAC1I(4) P0160460

A2B(2,1) = .NOT. (CVB. AND. MCIVB) .AND. IAC1I(2) . NE . lAClKl) . AND . P 0 1 6 0 4 7 0

1 IAC1I(2) .LT. IAC1I(3) .AND. lACIKI) .EG. IAC1I(4) P0 1 60 48 0 A2B(2,2) = A2B(1,2) .AND. lACIKD .EO. IAC1I(4) P0 1 60490

A3B(1,1,1) : IAC1I(2) .LT. IAC1I(3) .AND. A2B(1,2) P0160500

A3B(1,1,2) = IAC1I(2) .GT. IAC1I(3) .AND. A2B(1,1) P0160510

A3B(1,2,1) = .NOT. MCA1B(5) .AND. P0160520

' l A2B( 1

, 1 ) . OR . I AC1 I ( 1 ) . EO . I AC1 I ( 4) PO 1 60 5 3 0 A3B(1,2,2) = .NOT. (A2B(1,2) .AND. lAClId) .EG. I AC 1 I ( 4 ) ) . OR . P0 1 60 5 40

1 A2B( 1 , 1 ) . OR . A2B( 1 , 2) PO 1 6 0 5 5 0 A3B(2,1,1) = A2B(1,2) .OR. lAClKI) .EQ. IAC1I(4) P0 1 60 560

A3 B ( 2 , 2,1 ) = .NOT. MCCVB. AND. MCHVB .OR. lACIKI) . N E . Cl I ( 4 ) 0 R . P 0 1 6 0 5 7 0

1 lACIKI) .LT. IAC1I(4) .OR. A2B(1,2) P0 1 60 5 80

A3B(2,1,2) = .NOT. A3B(1,1,2) .AND. P0 1 60 5 90

1 ( A2B(1,1) .AND. .NOT. A2B(1,2) ) P0160600

A3B(2,2,2) = lACIKI) .LT. IAC1I(4) .OR. . N OT . A2 B ( 1 , 2 ) P0 1 606 1 0 MCJVB=IAC1I(2).GT.IAC11(3).ANO.(A2B(1,1).OR..NOT.A2B(1.2)).OR.A2B(P0160620

Al .2) .AND. .N0T.A2B( 1 ,2) .AND. IAC1 I (1 ) .GT. IAC1 I (4) P0 1 6063 0 MCKV8 = IAC1 I (2) . LT. IAC1 I (3) .AND.A2B( 1 , 1 ) .0R.A2B( 1 ,2) P0 1 60640

MCLVB = (IAC1I(2) .LT. 1AC1I(3) .AND. A2B(1,2)) .OR. A2B(1.1) P0160650

MCMVB = A2B(1,2) .OR. IAC1I(2) .LT. IAC1I(3) .AND. A2B(1.1) P0160660

MCNVB = A2B(1,2) .OR. (IAC1I(2) .LT. IAC1I(3) .AND. A2B(1,1)) P0 1 606 70

C»ttt« WRITE VARIABLES THAT ARE TRUE P0160680

WRITE (NUVI,161) MCAVB, MCCVB, MCEVB, MCFVB, MCHVB, MCAIB(i), P0160690

A MCA1B(3), MCA1B(5), A1B(1), A2B(1,1), A2B(2,1), P0160700

r B A3 B( 1,2,1), A3 B( 1,2,2), A3 B( 2,1,1), A3 B( 2. 1,2), PO 1 60 7 1 0

C A3B(2,2,2), CVB, MCKVB, MCLVB, MCMVB, MCNVB P0160720

Ui FORMAT (//32H ALL ANSWERS BELOW MUST BE T R U E / / 2 1 ( L 1 6 / ) / / ) P0 1 6 0 730

C»*t«» WRITE VARIABLES THAT ARE FALSE P0160740

WRITE (NUVI,162) MCBVB, MCDVB, MCGVB, MCIVB, MCA1B(2), MCA1B(4), P0160750

A A1B(2), A2B(1,2), A2 B ( 2 , 2 )

, A3 B ( 1, 1

, 1 )

, A3 B ( 1

, 1 , 2 ), P 0 1 6 0 7 6

0

B A3B(2,2,1), AVB, BVB, MCJVB P0 1 60 770

162 FORMAT (33H ALL ANSWERS BELOW MUST BE F A L S E / / 1 5 ( L 1 6 / ) ) P0 1 60 78 0 C«*t*» END OF SEGMENT 016 P0160790

C**««* P0160800

36 NBS FORTRAN Test Programs Version 1
C***** WHEN EXECUTING ONLY SEGMENT 016, THE STOP AND END P0160810

C****« CARDS. WHICH APPEAR AS COMMENTS. MUST HAVE THE C= P0160820

C«*«** IN COi. 1 AND 2 RE MOVED. PO 1 6083 0 C*t«** P0160840

C= STOP P01 608 50

C= END P0160860

STOP P016C1

END P016C2

[;*******************t********«******t**«:*********************t***tt***t*P01700 l6

C***** P0170020

C * * » * I N T R L - (017) P 0 1 7 0 03 0

C * * * * * PO 1 7 0 0 40

C**««««**«**»*t*t«t******t«*«««»**«»«*««»«««*«*t«t«***t»*»**»»*«*«««*«»«poi70050

C***** GENERAL PURPOSE ASA REF P0170060

C****« TO TEST ARITHMETIC ASSIGNMENT STATEMENTS WHERE TABLE 1 , P G 1 3 P 0 1 7 0 0 7

0

C*«*** REAL CONSTANTS AND VARIABLES, INTEGER VARIABLES (LINES 2,3, P0170080

t*VtV* AND ARRAY ELEMENTS, AND DOUBLE PRECISION CON- 5,6, P0 1 70 090

C***** STANTS AND VARIABLES ARE ASSIGNED TO EACH OTHER 9 , 1 0 ) P 0 1 7 0 1 0

0

C"« *

*

'* * P 0 1 7 0 1 1 0 C****« SPECIFICATIONS SEGMENT 017 P0170120

C

*'*'*'*

* POO 10 440

C***** WHEN EXECUTING ONLY SEGMENT 017, THE SPECIFICATION STATEMENTS P0010445

C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN P0 0 1 0 4 5 0 C***** COL 1 AND 2 REMOVED P0010455

Ci DIMENSION A1S(5) ,A2S(2,2) ,A3S(3,3,3) , IAC1 I (5) , IAC2I (2,7) ' P0 0 1 0 460

C= INTEGER MCA3I(2,3,3) P0010465

C'= DOUBLE PRECISION A C 1 D ( 1 0 ) , B C 2 D ( 7 , 4 ) , C C 3 D ( 7 , 2 , 2 ) , D P AVD P0 0 1 0 470

C***** P0010475

D I M E N S I 0 N A 1 S ( 5 ) , A 2 S ( 2 , 2 ) , A 3 S ( 3 ,3,3 ) , I A C 1 I ( 5 ) , I A C 2 I ( 2 . 7 ) P 0 1 7 A

1

INTEGER MCA3I (2,3,3) P017A2

DOUBLE PRECISION A C 1 D ( 1 0 ) , B C 2 D ( 7 , 4 ) , C C 3 D ( 7 , 2 , 2 ) , D P AVD ' P017A3

C**««« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE, P0170130

C * * P 0 0 7 0 3 1 0 C***** WHEN EXECUTING ONLY SEGMENT 017, THE STATEMENT NUVI = 6 P0070315

C*'*"*«* MUST HAVE THE C= IN COL 1 AND 2 REMOVED. P00 70 3 20

C**«** P0070325

C'= NUVI = 6 POO 703 3 0 C«*»** P0070335

NUVI = 6 P01 7B1

WRITE (NUVI, 170) P0170140

170 FORMAT( 1H1 , 1X,39HINTRL - (017) ASSIGN INTEGER, REAL, AND/ P0170150

1 16X,23HD0UBLE PRECISION VA L UE S / 2 X , 2 9 H AS A REFS. - 7.1.1.1. 5 . 1 . 1 . P 0 1 7 0 1 6

0

22/2X, 7HRESULTS/ ) PO 1701 70

C*t*t* TEST ASSIGNMENT OF INTEGER VARIABLES TABLE 1/LN 5,9P0170180

JACVT = 1 P0170190

IAC1 1(3) = +111 P01 70200

I AC2 I (2,3) = -1 11 i P0 1 702 1() MCA3I(2,1 ,2) = -11111 P0170220

ACVS = IAC1 I (3) P0 1 7023 0 A1S(2) = IAC2I(2.3) P0170240

A2S(2 , 1 ) = MCA3 I (2 , l72) P0 1 702 5 0 A3S(2,1,2) = JACVI P0170260

DPAVD = MCA3I(2,1,2) P0 1 70270

AC1D(7) = JACVI P0170280

B C 2 D ( 7 , 4 ) = I A C l' r( 3 ) P 0 17 019 0 CC3D(5,1 ,2) = IAC2I(2,3) P0170300

WRITE (NUVI ,171) P01 7031

0

171 FORMAT ( /2X,24HASSIGN INTEGER VAR I AB LE S / / 3X , 21H1 - TO P 0 1 703 2 0

i" R E A L VARIABLES) P 0 1 7 0 3 3 0 WRITE (NUVI,172)ACVS,A1S(2),A2S(2,1),A3S(2,1,2). DPAVD , AC 1 D ( 7 ) .BC2DP0 1 70340

1(7,4),CC3D(5,1,2) P017035 0 172 FORMAT( /8X, 8H 111.0 »/F14.1// P0170360

1 7X,9H-1111.0 «/F14.i// P0 1 703 70

2 4X,12H -11111.0 WF14.1// P0 1 703 80

3 lTX,5H1.0 */F14.1//3X,33H2 - TO DOUBLE PRE C I S I ON VAR I AB L E SP 0 1 7 0 3 9

0

4 //4X,16H -0.11111D 05 */D18.5// P0170400

5 1 1X,9H0.1D 01 */D18.1// P 0 1 7 0 4 1 () 6 9X,11H0.111D 03 */D18.3// P0170420

NBS FORTRAN Test Programs Version 1 37
c « * * * * 7X. 13H-0. 1 1 1 ID OA */DU.4/)

TEST ASSIGNMENT OF INTEGER CONSTANTS

ACVS = -nil

A1S(2) = +222

•22222

: 2

173

174

A2S(2, 1 ) = A3S(2,1 ,2)

DPAVD = 2 AC1D(7) = -22222

BC20(7,4) = -2222

CC3D(5, 1,2) = +222

WRITE (NUVI,173)

FORMAT ( /2X,24HASSIGN

1EAL VARIABLES)

WRITE (NUVI , 1 74)ACVS,A1S(2)

5,1,2)

9H-2222.0 */F13.1//

7H222.0 WF13. 1//

12H -22222.0 */F13.1//

5H2.0 */F13.1/ 35H1 2 ,9H0.2D 01 •/D19. 1 //

INTEGER C0NSTANTS//3X.

1(7,4), CC3D(

FORMAT( /6X,

1 8 X , 2 3X,

3 10X,

4 / 1 2X

5 5X,16H -0.22222D 05 WD19.5//

6 8X, 1 3H- 0 . 2222D 04 • /D1 9 . 4/ / 7 10X, 1 1 HO . 2 22 D 0 3 WD19.3/ ) C*tt*« TEST ASSIGNMENT OF BASIC REAL CONSTANTS

JACVI = 3. IAC1 1(3) =

I A C2 I (2,3)

+333.3E-2

= .3333E+1

MCA3I (2.1.2) = 0033333E3

P01

P01

P01

P01

P01

P01

P01

21H1 - TO RP01

POl

A2S(2,1),A3S(2,1,2).DPAVD,AC1D(7),BC2DP01

POl

POl

POl

POl

VARIABLES /POl

POl

POl

POl

POl

1 /LN 2, 10P01

POl

POl

POl

POl

TO DOUBLE PRECISION

TABLE

7173

«/I10//3X,33H2 - TO DOUBLE

DPAVD = +3.3333

AC1D(7) = .3333333E1

BC2D(7,4) = -333.3333E-2

CC3D(5.1,2) = -.0333333E+2

WRITE (NUVI,7173)

FORMAT ( /2X, 27HASSIGN BASIC REAL C 0 N STANTS / / 3X

.

1T0 INTEGER VARIABLES)

WRITE(NUVI .7172) JACVI . IAC1 I (3) , IAC2I (2,3) ,MCA3I (2, 1 .2) ..DPAVD

1 7) , BC2D( 7, 4) , CC3D( 5 ,1,2)

7172 FORMAT( /9X, 3H3 * / 3 ( I 1 0 / ) / 8X , 4H-3

1 ION VARIABLES//

2 8X, 13H0.33333D 01 */D19.5//

3 6X, 1 5H0 . 33 333 33 D 01 WD 19. 7//

4 5X, 16H-0.3333333D 01 */D19.7//

5 6X,15H-0.3 33333D 01 */D19.6/)

C»*»«» TEST ASSIGNMENT OF REAL VARIABLES

ACVS = + . 0 044444E4

A1S( 2 ) = -4444 . E-2

A2S(2,1) = -44.4

A3S(2.1 .2) = 4.4444E+1

JACVI = A2S(2 , 1

)

IAC1 1(3) = A1S(2)

IAC2I (2.3) = A3S(2, 1 ,2)

MCA3I (2,1,2) = ACVS

DPAVD = A2S(2. 1

)

AC1D(7) = A1S(2)

BC2D(7,4) = A3 S( 2, 1,2)

CC3D(5, 1,2) = ACVS

WRITE (NUVI.175)

175 FORMAT (/23H ASSIGN REAL VARIABLES//

1ER VARIABLES)

WRITE (NUVI,176)JACVI,IAC1I(3).IAC2I(2

17) ,BC2D(7,4) , CC3D(5, 1 ,2)

176 FORMAT( /7X,5H-44 • /2 ( I 1 0 / ) / 8X , 4H44

IE PRECISION VARIABLES//

2 6X. 12H-0.44AD 02 */D16.3//

3 5X. 13H-0 . 4444D 02 */D16.4/7

4 5X. 13H0.44444D 02 »/D16. 5//

5 5 X .1 3 HO . 4444 4 D 0 2 » / D 1 6.5/)

C*tt*» TEST ASSIGNMENT OF D.P. VARIABLES TABLE

24H1

27H

3) ,MCA3I (2. 1,2) .DPAVD

t/2( I 10/) . 35H1 2

POl

POl

POl

POl

POl

POl

POl

,AC1D(P01

POl

PRECISP01

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

POl

I NTEGPO

1

POl

, AC1D(P01

POl

D0UBLP01

POl

POl

POl

POl

POl

1 /LN 3,6P01

TO

TO

P0170430

POl 70440

POl 7045 0 POl 70460

7 0 4 7 0 7048 0 70 490

70 5 0 0

7 0 5 1 0 70 5 2 0 70 5 3 0 70 5 40

70 5 5 0 70 560

70 5 70

70 5 80

70 5 90

70600

7 0 6 1 0 7062 0 70 63 0 706 40

706 5 0 70660

706 70

70680

70690

70 700

7 0 7 1 0 70 72 0 70 73 0 70 740

70 75 0 70 760

70 770

70 780

70790

70 8 00

7 0 8 1 0 70 82 0 70 83 0 70 8 40

70 8 5 0

7 0 860

70 8 70

70 8 80

70 890

70900

70 9 1 0 7092 0

7 0 93 0 70940

7 0 9 5 0 70960

70970

7098 0 70990

710 0 0 71010

71020

710 3 0 71040

710 50

71060

71070

71080

71090

71100

38 NBS FORTRAN Test Programs Vers ion 1
1 77

DPAVD = 5 5 5 5 . 5 5 AC1D( 7 ) = +5 5 5 5 5 5 5 5 5 5 55 5 5 .D-13

BC2D(7.4) = -.0000055555555506

CC3D(5,1,2) = -.055555555555550+2

' JACVI = DPAVb

IAC1 1(3) = AC1D(7)

IAC2I(2,3) = BC2D(7, 4)

MCA3 I (2 . 1 , 2) = CC3D( 5

,

1

A CVS = CC3D(5. 1 ,2)

A1S(2) = BC2D(7,4)

A2S(2, 1 ) = AClb(7)

A3S(2, 1,2) = DPAVD

WR ITE (NUVI ,177)

FORMAT ( /2X, 33HASS I GN

T/3X,24H1 - TO INTEGER

WRITE ( NUVI , 1 78 ) JACVI

2)

DOUBLE PRECISION

VARIABLES)

IAC1 I (3) , IAC2I(2

VARIABLES/

P01 71 1 1 0 P0171120

P0171 130

P01 71 140

P01 71 1 50' P01 71 1 60

P01 71170

P01 71 1 80

P01 71 190' P01 71200

P01 71210

P01 71220

P0171230

P01 71240

p 0 1712 5 0 3) .MCA3I(2

1 78

1 ,A2S(2, 1 ) ,A3S(2. 1 ,2)

FORMATC /3X, 9H 5 5 5 5 * / I 1 0 / / 9X , 3 H

5

*/I10//8X,4H-5

P01 71 270

«/2( I 1 0/ ) /3X,21HP01 71 280

12

2

- TO REAL VARIABLES//

3X,16H-0.5555556E 01 */E17,.711

P01 71 290

P0171300

3

4 3X, 16H-0.5555556E 01 */E17.

3X, 16H 0.5555556E 01 */E17,

.711

.711

P0171310

P0171320

c « * *

5

*

«

3X, 16H 0 . 5 5 5 5 5 5 E 04 */E1 7. TEST ASSIGNMENT OF DOUBLE PREC!

.bl)

ISION CONSTANTS

P01 71330

P0171340

179 CONSTANTS/

7170

7171

C « «

«

c « * * c * * t c * * * c * «

c * « c=

c=

JACVI : 66666. D-4

IAC1I( 3 ) = - . 00000066666666D7

I A C2 1 ( 2, 3 ) - -.06666666666666D + 2 MCA3I (2,1, 2)^66666.6666666660-1

ACVS= 66666666666666.00

A1S(2) = +66666.0-4

A2S(2,1) = -.0000000666666608

A3S( 2,1,2 ) = - . 06666666666666D + 2 'write (NUVI, 179)

FORMAT ( 35H1 ASSIGN DOUBLE PRECISION

1/3X,24H1 - TO INTEGER VARIABLES)

WRITE(NUVI,7170)JACVI,IAC1I(3).IAC2I(2.3)

1 ,A2S(2, 1 ) ,A3S;(2, 1,2)

FORMAT( / 9X,3H6 « / I 1 0 / / 8 X . 4 H - 6 * / 2 ( I 1 0 / ) / 3X , 9H

1 3X,21H2 - to REAL VARIABLES//

3X,16H 0.6666667E 14 */E17.7//

3X, 16H 0.66666E

3X, 1 6H-0 . 6666666E

3X.16H-0.6666667E

WRITE (NUVI ,7171)

F0RMAT(//34H ALL TEST OUTPUT

MCA3I (2

01

01

01

*/E17,

*/E17,

* / E 1 7 ,

5//

711

71)

END

SHOULD

34H AGAINST THE ASTERISKED

1 8H WHI CH PRECEDES IT)

OF TEST SEGMENT 017

BE CHECKED/

(O FIGURE/

P01 71350

P0171360

P 0 1 7 1 3 7 0 P0171380

P01 71 390

P01 71 400

P01 71 41 0 P01 71 420

P01 71 43 0 P01 71 440

P01 71 450

1 ,2),ACVS.A1S(2)P0171460

P01 71 470

6666 */I10// P0171480

P01 71 490

P01 71 500

P01 71 510

P01 71 520

P0171530

P01 71 540

P01 71550

P01 71 560

POI 71 570

P01 71 580

WHEN EXECUTING ONLY SEGMENT 017, THE STOP AND

CARDS WHICH APPEAR AS COMMENTS MUST HAVE THE C=

IN COL 1 AND 2 REMOVED.

END

STOP

END

STOP

END

POI 71 590

POI 71 600

POI 71 610

POI 71620

P0171636

POI 71 640

POI 71650

POI 7C1

P017C2

t*****»*tt**«tt*P0200010

P02 00 026

P0200030

P0200040

««««t«ttttttt«««P020005p

ASA REF P02 0 0 06()

7.1.2.1 . 1P02 00 0 70

P0200080

7.1.2 /54P0200090

P0200100

P0200 1 1 0

C t «

«

c * *

«

c « «

c * * * c * «

t

c * *

«

C t «

c * «

«

c * * c « *

* t UGOTO ( 020 ) * *

*"* GENERAL PURPOSE

*» TO TEST UNCONDITIONAL GO TO STATEMENTS

** RESTRICTION OBSERVED

** GO TO STATEMENTS CAUSE BRANCHES ONLY TO

** EXECUTABLE STATEMENTS

* GENERAL COMMENTS

NBS FORTRAN Test Programs Version 1 39
I^NHHHM UU I \J ^l/^IEIIwlilw nUwU luolEL/ ill wUUllulil ITJ r U t. U U 1 4 U

Q * * * * * P07oni7n

r**«»« n II TP 11 T TAPF AS<;if?NMFNT ^TATFMFNT Nfl I1 NPIIT 11 r U 1 TAPF 1 A r C • p 0 7 n ft 1 i. ft Q t t t t * M II V T -

li U V 1 A

0 r***** ^nnnnx MUST IIUwl HAVP ll/^Vt THP lilt r=0~ inill col UUL 11 AND nivU/ ?k RPMOVFn lAtllWVtU* Pftft7ft7S0 r yj \J / VJJU

Q If It t * * r \j \J f U J J J r= NUVI = 6 P0n707ftO r \J \J f \J J \j v

Q * * * * A P0n70'^AS

N11 11U VV Ti =~ AV Pr 0 7 ft R 1

\J L \J 0 1 WRITF (NUVI 200) P 0 7 ft 0 1 SO

200 £.Vv FORMAT rWiAllr^l (1H1 \\ll\^\/\fJJll\J\J^Jiv IX 33HLIG0T0 - (VvbV/ 020 ) UNCONDITIONAL UllwUIVL/lllwIlr^L GO\j \J TO1 U // 11 6XU A ^ P 0 7 0 0 1 ft 0 1PH<iTATFMFNT / / ?y P07ftft1 70

7 71HA<?A RFF<5 - 7 1 ? 1 \II7Y 7HRFSULT<;) Pr 0V t.7 0V ftu 11 no0 V rt***« HFAHFR FOR ^JFRMFNT 070 WRITTFN P ft 7 ft ft 1 <3 ft C***** TEST BRANCH FORWARD P0700700

fin Tfi 7 0 1 Pr ft\J C7 ft\J 0\J 7C 1\ 0\J 203 MRRVI = 3 P07fl0770

WRITF (NIIVI 7700 ) MRRVI r\JL\JvCJv

7200 FORMAT ( / 4X 11)

Rfl TO 7 0 ^ Pft7nn?Sft

707 ^ V f MRRVI Mr\r\vi = 7/ po? r \f C- no? \J \J hOu \J WRITF (NIIVI 7700 ) MRRVI r \J L \J \J C / w R n TO ? pn7nn7X0

707 MRRVI = 7 WRITF nr\i (t (NIIVI xinuvi 1 770 f c \/ 0V )/ MRRVI iir\r\vi r**«tt TF<?T RRANTH RArKWARD 0r 0u t.7 0y 0u 7J 101 V R n TO 7 0 P0700770

MRRVT = 1 P0700'^70

WRITF (NIIVI 7700 ) MRRVI

R n TD 7 0 7 pn7nft'^sft

208 MRRVI = & PO?00'^ftO

WRITF (NIIVI 7700 ) MRRVI P07nn'^70

R n TO 7 0 Q pn?nn7Xft

?0A MRRV I : ft P070n7Q0

WRITF (NUVI 7200) MRRVI po?oo^on

RO TO 70 7 p n 7 ft ft <i 1

0

r V L. u V *T 1 w 70A MRRVI iir\r\vi = •? P070fl470

WRITF inr\i iL- (NIIVI \i'iuvi(/t.vw/ 77 00 ) MRRVI Mr\r\vi pft?on^'^n

r****« TFST RRANTH TO <?TATFMFNT IMMFDIATFIY AFTFR

r«*t*t II N r n N n I T I n N A 1 ro to pft?nft4S0

RO TO 7 0S P07004ft0

70S Cm V J MRRVI iir\r\vi = SJ P0700470

UIRTTF nnilC fNIIVT \IiUVl(/L.vw/ 7700^ MRRVT lir\r\Vl Pft7nft^jtft

Pi n T n 7 0^ P0700490

209 WRITE (NUVI, 7201) P0700S00

72 0 1 FORMAT ( / / 2X . 3 5 HTH I S TEST IS SUCCESSFUL ONLY IF THE/ Pr ftu ?L 0u 0u SJ 11 0V 12X, 37HNUMBERS LISTED ABOVE ARE SEQUENTIALLY/ P0700S70

22X,20HIN ORDER FROM 1 TO 8) PO?flOS'?0

C*«««* END OF TEST SEGMENT 020 P0700S40

c * * « * * po7nosso

C««*** WHEN EXECUTING ONLY SEGMENT 020, THE STOP AND END pn7nftSftn

C***t* CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C = pft?ons70

C***** IN COL 1 AND 2 REMOVED. pn7nosxo

C= STOP

C= END P0200600

STOP P 0 2 0 C 1 END P020C2

C*lt**t*****il:******lt**ill*«*lt*******«r************«*«rli*****llr*«;****ilt«r*****«i**«P0210010

c « * * * * P021 0020

C« * * * AGOTO - (021) P02 1 0030

C * * * «

P02 1 0040 ******* ****** * * * *P02 1 0 0 5 0 C*«**« GENERAL PURPOSE ASA REF P0210060

C**t** TO TEST GO TO ASSIGNMENT STATEMENTS 7.1.1 .3 P0210070

C***«* AND ASSIGNED GO TO STATEMENTS 7.1.2 . 1 .2P0 2 1 0080

C***»* RESTRICTIONS OBSERVED P02 1 0090

C***** INTEGER VARIABLE USED IN ASSIGN STATEMENTS 7 . 1-1 - 3 /06P0210100

40 NBS FORTRAN Test Programs Version 1
C»*»»* IS NEVER REFERENCED ELSEWHERE IN THIS SEGMENT 10.2.3 /12P0210110

C«»t«. ASSIGNED GO TO STATEMENTS CAUSE BRANCHES ONLY 7.1.1.3 /03P0210120

CttTt* to EXECUTABLE STATEMENTS 7.1.2 /54P02lbl30

C*«*t« INTEGER VARIABLE ALWAYS CONTAINS STATEMENT 7 . 1 . 2 . 1 . 2 / 2 0P02 1 0 UO

C**t«« LABEL FROM THE ASSIGNED GO TO LIST

Ct«*tt GENERAL COMMENTS

P021 01 50

P0210160

Ct**«* IGVI AND KGVI ARE IMPLICITLY DEFINED 5. C*«t*« GTVI IS EXPLICITLY DEFINED 7.

32.1.6

/07P021 01 70

/55P0210180

C**«** ASSIGN AND ASSIGNED GO TO ALSO TESTED IN Ct«*«t SEGMENT 190

P021 01 90

P02 1 020 0 c « * * «

C****t SPECIFICATIONS SEGMENT 021

P0210210

P021 0220

C * t * « C«t«** WHEN EXECUTING ONLY SEGMENT 021. THE SPECIFICATION STATEMENTS

POOl 0 480

POOl 0 4 8 5 C*«*** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL

C«t*** 1 AND 2 REMOVED

P0010490

P0010495

C= INTEGER GTVI

c « * * * POOl 0500

POOl 0505

INTEGER GTVI

Ct«««t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE . P021 A1 P021 0230

c * * * t

«

C****« WHEN EXECUTING ONLY SEGMENT 021, THE STATEMENT NUVI = 6 P0070370

P0070375

C*««*» MUST HAVE THE C= IN COL 1 AND 2 REMOVED,

c * * * * * P0070380

P0070385

C= NUVI = 6

C * « * * * P0070390

P0070395

NUVI = 6 WRITE (NUVI, 210)

P021 B1 P021 0240

210 FORMAT ( 1 H 1 , 1 X , 33HAGC)tb - (021) ASSIGN AND ASS I GfJED / t6X , 15HG0 T0//2X,

P02 1 02 5 0 P021 0260

231HASA REFS. - 7.1.1.3 AND 7 . 1 . 2 . 1 / / 2X . 7HRE SU LTS

)

C««t«« HEADER FOR SEGMENT 021 WRITTEN

P021 0270

P021 0280

C***«* TEST FORWARD BRANCHING GO TO WITH ONLY ONE

C«*«»* LABEL IN THE BRANCH LIST

P021 0290

P02 1 030 0 ASSIGN 211 TO IGVI

GO TO IGVI , (211)

P 0 2 1 0 3 1 0 P 02 1 03 2 0 C***«* TEST FORWARD BRANCHING GO TO WHICH BRANCHES

C«*t*« TO IMMEDIATELY FOLLOWING STATEMENT

P021 0330

P02 1 03 4 0 212 MRRVI = 2 WRITE (NUVI, 8212) MRRVI

P02 1 0 3 5 0 P0 2 1 0 360

ASSIGN 213 TO GTVI

GO TO GTVI , (213)

P02 1 0370

P021 0380

C***** TEST FORWARD BRANCHING GO TO WHERE ALL BRANCHES

C**»** ARE IDENTICAL

P 0 2 1 0 3 9 0 P02 1 0 40 0 213 MRRVI = 3 WRITE (NUVI, 8212) MRRVI

P02 1 0 4 1 0

. P0210420

ASSIGN 214 TO GTVI

GO TO GTVI , (2U, 214,214)

P02 1 0 43 0 P021 0440

C***** TEST FORWARD BRANCHING GO TO WITH SEVERAL UNIQUE

Z****t BRANCHES IN THE LIST

P021 0450

P02 1 0 460

215 MRRVI = 5 WRITE (NUVI, 8212) MRRVIP021 0470

P021 0480

ASSIGN 217 TO KGVI

ASSIGN 216 TO IGVI

P02 1 0490

P02 1 0 5 0 0 GO TO IGVI , (217,218,216.219)

Ct*t*« TEST BACKWARD BRANCHING GO TO WHERE BRANCHES

P0210510

P021 0520

C**t*t ARE IDENTICAL

214 MRRVI = 4

P 0 2 1 0 5 3 0 P021 0540

WRITE (NUVI, 8212) MRRVI

ASSIGN 215 TO IGVI

P02 1 0 5 5 0 P021 0560

GO TO IGVI , (215,215)

C**««* TEST BACKWARD BRANCHING GO TO WITH ONLY ONE LABEL

P021 0570

P021 0580

C***** IN THE BRANCH LIST

211 MRRVI = 1 P021 0590

P02 1 0600

WRITE (NUVI, 8212) MRRVI

ASSIGN 212 TO GTVI

P02 1 06 1 0 P02 1 062 0 GO TO GTVI , (212)

C««*«* IN THE FIRST PART OF THIS TEST, ALL GO TO STATEMENTS

P02 1 063 0 P021 0640

NBS FORTRAN Test Programs Version 1 41
C * t

«

c * «

c « * * c « * * c « * * 216

8216

217

218

219

7210

721 1

7212

7213

72U

721 5

7216

7217

7218

7219

8210

WERE EXECUTED ONLY ONCE. IMMEDIATELY AFTER THE

INTEGER VARIABLE WAS DEFINED. ALL GO TO STATEMENTS

WHICH FOLLOW WILL BE EXECUTED MORE THAN ONCE.

VALUE OF IGVI IS ALWAYS 8216 IN THIS PART OF THE

TEST UNTIL FINAL MESSAGE IS TO BE WRITTEN

MRRVI = 6 WRITE (NUVI.8212) MRRVI

ASSIGN 8216 TO IGVI

8211

8212

C * * 1 1 *

GO TO KGVI

MRRVI = 7 ASSIGN 218

GO TO 8211

MRRVI = 8 ASSIGN 219

GO TO 8213

MRRVI = 9 ASSIGN 7210

GO TO 8213

MRRVI = 10

ASSIGN 7211

GO TO 8211

MRRVI : 11 ASSIGN 7212

GO TO 8211

MRRVI = 12 ASSIGN 7213

GO TO 8211

MRRVI = 13

ASSIGN 7214

GO TO 8213

MRRVI = U

ASSIGN 7215

GO TO 8211

MRRVI 1 5 ASSIGN 7216

GO TO 8211

MRRVI = 16

ASSIGN 7217

GO TO 8211

MRRVI = 17

ASSIGN 7218

GO TO 8211

MRRVI = 18

ASSIGN 7219

GO TO 8211

MRRVI = 19

ASSIGN 8210

GO TO 8213

MRRVI = 20

ASSIGN 8214

GO TO 8213

WRITE (NUVI,

FORMAT (/6X,

TEST GO

GO TO GTVI

.

(217,219,7210,7214,8210)

TO GTVI

TO KGVI

TO KGVI

TO GTVI

TO GTVI

TO GTVI

TO KGVI

TO GTVI

TO GTVI

TO GTVI

TO GTVI

TO GTVI

TO KGVI

TO IGVI

1

8212) MRRVI

12)

TO WITH CONTINUATION CARD

(218. 7211. 7212. 7213, 7215

7219)

7216. 7217. 7218

8213 WRITE (NUVI,8212) MRRVI

8214

8215

1?

t * * * * *

* « t

»

* t * t *

WRI IUVI.8215)

FO AT (1H0,2X.35HTHIS TEST IS SUCCESSFUL ONLY IF THE/

37HNUMBERS LISTED ABOVE ARE SEQUENTIALLY/

X.21HIN ORDER FROM 1 TO 20)

END OF TEST SEGMENT 021

WHEN EXECUTING ONLY SEGMENT 021, THE STOP AND END

* * 1 1 * IN COL

STOP

1 AND REMOVED.

P0210650

P021 0660

P 0 2 1 0 6 7 0 P02 1 0680

P02 10 690

P021 0700

P0 2 1 0 7 1 0 P021 0720

P021 0730

P0 2 1 0 740

P021 0750

P0 2 1 0 760

P0 2 1 0 7 70

P02 1 0 78 0 P02 1 0 790

P021 0800

P 02 1 0 8 1 0 P021 0820

P02 1 0 83 0 P021 0840

P02 1 0 8 5 0 P021 0860

P02 1 0870

P02 1 0 8 8 0 P0210890

P021 0900

P 0 2 1 0 9 1 0 P02 1 0 92 0 P 0 2 1 0 9 3 0 P02 1 09 4 0 P 0 2 1 0 9 5 0 P02 1 0 960

P02 1 0 9 70

P 02 1 09 8 0 P021 0990

P02 1 1 0 0 0 P021 1010

P02 1 1 02 0 P02 1 1 0 3 0 P02 1 1 0 40

P0 2 1 1 0 5 0 P021 1060

P021 1070

P02 1 1 0 8 0 P021

P021

P021

P021

P021

P021

P021

P02 1 P021

P021

P021

P021

P021

GO T IGVI, ( 821 6 . 82 1 4 ) P021

P021

P021

P021

P021

P021

P021

P021

CARDS, WHICH APPEAR AS COMMENTS. MUST HAVE THE C= P021

P021

P021

1090

1100

1110

1120

1130

1 140

1150

1 160

1 170

1 180

1 190

1200

1210

1220

1230

1240

1250

1260

1270

1280

1290

1300

1310

1320

42 NBS FORTRAN Test Programs Version 1
C= END P0211330

STOP P021C1

END P021C2

C*******lt***t*******t t** «:*********lr***t*lr«********«lr<r«**tr*4r«r**t*****P0Z20010

C * P 0 2 2 0 0 2 0 C***** CGOTO - (022) P0220030

C *'««** P022 0 0 40

C*****************««**t***«*«*il:*«**t******ttit**rt****lt«*itt***ttlt*«««**»«tP0220050

C * GENERAL PURPOSE AS A R E F P 0 2 20 0 60

C*««*« TO TEST COMPUTED GO TO STATEMENTS 7.1.2.1.3 P0220070

en*** RESTRICTIONS OBSERVED P0 2 2 0 0 20

C***** VALUE OF INTEGER VARIABLE IS NEVER LESS THAN 1 7 . 1 . 2 . 1 . 3 / 3 3 P 0 2 2 0 0 9

0

C'*;T«* AND NEVER LARGER THAN THE NUMBER OF BRANCHES P022 0 1 00

C****« INTEGER VARIABLES USED IN COMPUTED GO TO STMNTS. 10.2.8 /09P0220110

CViV** ARE NOT EQUATED TO AVOID SECOND LEVEL 10.3 /13P022 0 1 2 0 C*«**« DEFINITION PROBLEMS P0220130

C***** GENERAL COMMENTS P0220 U0

C***** IGVI AND KGVI ARE IMPLICITLY DEFINED 5.3 /07P0220150

C*«t** GTVI IS EXPLICITLY DEFINED 7.2.1.6 /55P0220160

C***«* COMPUTED GO TO ALSO TESTED IN SEGMENT 162 P0220170

C * * * * t P 0 2 2 0 1 8 0 C*t*** SPECIFICATIONS SEGMENT 022 P0220190

C**«** P0 0 1 0 5 1 0 C***«* WHEN EXECUTING ONLY SEGMENT 022, THE SPECIFICATION STATEMENTS P0010515

C «**'«'* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL PO 0 1 0 5 2 0 C***** 1 AND 2 REMOVED P0010525

Z*"*T** POO 1 0 53 0 C= INTEGER GTVI P0010535

C POO 10 540

INTEGER GTVI P022A1

C**«»« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.- P0220200

C«  P0070400

C** *** WHEN EXECUTING ONLY SEGMENT 022 , THE STATEMENT lUVI = 6 P0 0 70 40 5 C«*«»« MUST HAVE THE C= IN COL 1 AND 2 REMOVED. P0070410

C****« P0070415

C= NUVI = 6 P0070420

C*'* * * P0 0 70 42 5 NUVI = 6 P022B1

WRITE (NUVI. 220) P0220210

220 FORMAT ( 1 H 1 . 1 X . 2 8H CGOTO - (022) COMPUTED GO T0//2X, P0220220

120HASA REr - 7 . 1.2. 1 . 3/ /2X, 7HRESULTS ) P022 0230

C«***« HEADER FOR SEGMENT 022 WRITTEN P0220240

C**«T* TEST FORWARD BRANCHING GO TO WITH ONLY ONE P022 02 5 0 C*«*«t LABEL IN BRANCH LIST P0220260

IGVi = 1 P0220270

GO TO (221 ) , IGVI P022 02 80

C«T*T* TEST FORWARD BRANCHING GO TO WHICH BRANCHES P0220290

C»*t*« TO IMMEDIATELY FOLLOWING STATEMENT P0220300

222 MRRVI = 2 P02 2 03 1 0 WRITE (NUVI. 8222) MRRVI P0220320

GO TO (223). GTVI P0220330

C«**** P0220340

C*t»»* TEST FORWARD BRANCHING GO TO WHEFlE SOME BRANCHES' P022 03 5 0 C«t«*. ARE IDENTICAL P0220360

223 MRRVI = 3 P0220370

WRITE (NUVI. 8222) MRRVI P0220380

gYvi _ 2 P02203 90

GO TO (225.224.225). GTVI P0220400

C««**« TEST FORWARD BRANCHING GO TO WITH SEVERAL UNIQUE P0220410

Ct*t*« BRANCHES IN LIST P0220420

22 5 MRRVI = 5 PO 22 0 43 0 WRITE (NUVI. 8222) MRRVI P0220440

KGVI i 1 P02204 5 0 IGVI = 3 P0220460

GO TO (227.228.226.229), IGVI P0220470

Cttttt TEST BACKWARD BRANCHING GO TO WHERE .SOME P0220480

[:*«*«» BRANCHES ARE IDENTICAL P0220490

224 MRRVI = 4 P0220500

NBS FORTRAN Test Programs Version 1 43
U O T T C MK 1 1 c (NUVI .8222) M D D \/ T nA77AC4A

I u V 1 - 4 DA77AC7A

GO TO (226,226.226.225)

.

IGVI OA77AC7A

^ n It A ft 1 TEST BACKWARD BRANCHING GO T n1 u

U T T U W 1 1 nn M 1 V U N L T n M c U nl t DA77AC / A

Q t w H i LABEL IN BRANCH LIST OA77ACCA H0ZZ0550

c.c\ MRRVI = 1 DA77AQilA

WRITE (NUVI

.

8222 ) MRRVI DA77AC7A

GTVI : 1 DA97AC OA GO TO (222 ) . GTVI DA77ACOA

L * * * * " THE FIRST PART OF THIS TEST. ALL GO TO STATEMENTS

L * * * * " WERE EXECUTED ONLY ONCE, IMMEDIATELY AFTER THE DA77Ail.1A F U d d U 0 1 U L * * * * • INTEGER VARIABLE WAS DEFINED. ALL GO TO STATEMENTS DA77A/L7A

L * * * * * WHICH FOLLOW WILL BE EXECUTED MORE THAN ONCE . DA77AA7A

r * * * * * VALUE OF. IGVI IS ALWAYS 1 IN THIS PART OF THE TEST DA77Ai:. / A

L * * * * « UNTIL THE FINAL MESSAGE IS TO BE WRITTEN DA77A^^A

5 7 A CC.0 M R D U T n r\ R V 1 = 6 0A77AAAA

I ft V I

1 u V i 1 DA77AA7A

U D T T C n rv 1 1 t ( NUVI . 8222 ) MRRVI DA77AAffA

« ^ "5 iL 0 d ^ 0 GO TO (227,229,7220,7224,8220) , KGVI

"5 "5 7 Mn P D W T r\ ft V 1 - 7 DA^^ATAA

fl T U I O 1 V 1 1 DA77A71 A r n T n u u 1 u

» 7 7 1 o c 6 i P0220720

^ d 0 Mn P R U T

ft rv V 1 N U V 1

— 0

7L DA77A77A

DA77A7/

A

GO TO o C C J DA77A7QA

5 7 0 M D P V I n K n V 1 —

- 07 DA77A7AA

If ft \/ I N U V 1 3 DA77A77A

O U 1 u J<0 c7 c7 7J P0220780

7 9 9 A M P R U I n r\ n V 1 ftTV I - u 1 V 1 7C DA77A7QA

DA77ASAA

GO TO 0 L C 1 Dn77AS1A r \J i. C.\J 0 1 U 7 7 7 1 M P P \/ T n r\ n V i — 1 1 DA77A87A

ft T \/ T b 1 V 1 5 DA77A57A

ft n T n O U 1 u X0 L? 7L 1\ P0220S40

7 7 7 7 M R P V I n r\ r\ V 1 ftTV I - u 1 V i -

- 1 7 4 rUd^UooU

GO TO X0 7C 7 1 L. I 7 7 7 7 M R R V 1 1 1 lA rv V 1 - 1 KN r,u VV I

1 — 4 rUd^UoVU

R n T n X0 7L 7C J P0Z20900

7 7 7/ MH R R \/ 1 rv r\ V 1

fi TV T - u 1 V 1 —

- 14 DA77AQ1

A

r U L ll U 7 1 U DA77A07A

GO TO 822 1 DA77A07A

7 7 7 ? M R R U T

1 1 rv n V 1 = 15 DA97AQ/A

ftTV U 1 V I1 = 7 DA^TAQCA

ft n T n 822 1 P0220960

7 7 7 MRRVI

GTVI =

= 16

9 DA77A07A

GO TO 8221 Dn77A00A

7 7 7 7 MRRVI = 17 r \) L L 1 U U U GTVI = 8 DA771A1A

GO TO 822 1 P022 1 02 0 7 7 7 8 MRRVI

GTVI =

= 18

3 Dn771A7n r u L 6 1 U J U DA771A/A r \j L L. 1 U 't U GO TO 822 1 DA77in'^A r Ki L L 1 U J U 7 7 7 0 MRRVI = 19 DA771AAA r \J L L 1 U 0 U KGVI = 5 DA771A7A

GO TO 8223 P 02 2 1 0 8 0

9 7 7 A

0 L 6 U MRRVI

IGVI =

= 20

2

DA771 r K) C C 1 AQA U 7 U r \1 C C 1 1 U U GO TO 8223 r \1 C C \ \ 1 U

9 7 5 1 0 6 L 1 WRITE (NUVI , 8222 ) MRRVI DA771 r Ki C C \ 17n \ C\i

9 7 7 7 O C ^ d FORMAT( /6X, 12) r U £ t 1 1 J U

^ ft # If # 1 TEST GO TO STATEMENT WITH CONTINUATION LINE DA7711AA r U t <L 1 1 H U GO TO ( 228 , 722 1 , 7229, 7223, 7222. 7225. 7226, 7228. DA7711^f1 r \j C C \ 1 J U

1 7227 ) , GTVI P0221 160

* 7 7 7 0 C C J WRITE

GO TO

(NUVI ,8222 )

( 8226,8224 ) , MRPVIIGVI

p n 7 7 1 1 7 f) P02Z1 180

44 NBS FORTRAN Test Programs Version 1
8224 WRITE (NUVI.8225) P0221190

8225 FORMAT ( 1 HO , 2X , 3 5 HTH I S TEST IS SUCCESSFUL ONLY IF THE/ P022 1 200

12X.37HNUMBERS LISTED ABOVE ARE SEQUENTIALLY/ P0221210

22X,21HIN ORDER FROM 1 TO 20) P0221220

C«Tt»« END OF TEST SEGMENT 022 P0221230

Ct**«« P0221240

Ct*t«t WHEN EXECUTING ONLY SEGMENT 022, THE STOP AND END P0221250

C»***« CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C= P0221260

C'*'*»«* IN COL 1 AND 2 REMOVED. P022 1 2 70

C= STOP P0221220

C= END P0221290

STOP P022C1

END P022C2

Ct**t lt** *««**t**t**t**««**1kt*«r****t t** *********t*******t**t*tt*«P0300010

C *'*'*"*"* P03 0 0 02 0 C «..«*.* ARB AD - ( 030 ) P 0 3 0 00 30

C « « * * « P0300040

Q***t*******t***t«***1tlrlt***lt«i;«t**t**It*«***t*«********t*******tt*(»tit***P0300050

C * G E N E R A L P U R P 0 S E AS A R E F P 0 3 0 0 0 6 0 C««*«t TEST THAT EXPRESSIONS INVOLVING THE ADDITION 6.1 P0300070

C'*"**** OF INTEGER OR REAL VALUES MAY BE FORMED P03 0 0 d80

C*«*** GENERAL COMMENTS P0300090

C*'*'*** TYPES ARE NEVER MIXEOT' P03 0 0 1 00

C***«* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED P0300110

C*"***« IN A VARIETY OF COMBINATIONS. P 03 0 0 1 20

C***** P0300130

C'tTtVr S P E C I F I C A T I 0 N S SEGMENT 03 0 P03 0 0 1 4 0 C***** P0010550

C***'** WHEN EXECUTING ONLY SEGMENT 03 0 , THE S P E C IF I C/^t I 0 N staTEHENTS P00 1 0 5 5 5 C***** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL P0010560

C *'*** 1 AND 2 REMOVED PO 0 1 0 5 6 5 C***«* P0010570

C= DTMENSION A1S(5) ,A2S(2,2) , IAC1 1(5), IAC2r(2,7) P00 1 0 5 75

C***** P0010580

OTmENSION A1 S( 5 ) , A2S( 2 , 2 ) , I ACI I ( 5 ) , I AC2 I (2 . 7 ) P0 3 0A1

C *..*.*.*..*.. .0. U TPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P03 0 0 1 5 0

C '*"*"««"* P007043 0 C***«* WHEN EXECUTING ONLY SEGMENT 030, THE STATEMENT NUVI = 6 P0070435

C***«* MUST HAVE THE C:: IN COL 1 AND 2 REMOVED. P0 0 70 440

C***** P0070445

C = NUVI = 6 P 0 0 7 0 4 5 0 C***** P0070455

NUVI = 6 P 03 0 B1 WRITE (NUVI, 301) P0300160

30l FORMAT ( 1 H 1 , 1 X , 2 8 H AR B AD - ( 03 0 ) BASIC AD D I T I 0 N / / 2X , P03 0 0 1 70

-14HASA REF. - 6 . 1 / / 2 X , 7 H R E S U L T S ) P03 0 0 1 8 0 C:"*"»T*« HEADER FOR SEGMENT 0 3 0 WRITTEN P0 3 0 0 1 90

WRITE (NUVI, 302) P0300200

302 FORMAT ( / / 2 X , 1 6 H I N T E G E R ADDITION) P03 0 02 1 0 C***»* TEST 1 - ADO 2 INTEGER VARIABLES (ONE CONTAINS MINUS VALUE) P0300220

MRRVI = 1 P03 0 0230

JACVI=2 P0300240

KBCVI = -2 P 03 0 02 5 0 IHDVI=JACVI+KBCVI P0300260

WRITE (NUVI, 3 03 ) MRRVI, IHDVI P03 0 0 2 70

3:03 FORMAT (/6H TEST, 13, 16) P03 0 0 2 80

C*«»«« TEST 2 - REVERSE VARIABLES IN TEST 1 P03 0 0290

MRRVI = 2 P0300300

IGDVI=KBCVI+JACVI P0300310

WRITE (NUVI, 303) MRRVI, IGDVI P0300320

Z'tTtV* TEST 3 - ADD 2 CONSTANTS P03 0 0330

MRRVI = 3 P0300340

iACHd) = 2 + (-2) P0 3 0 03 5 0 WRITE (NUVI, 3 03 ) MRRVI, lACIKD P0 3 0 0360

CVVttV TEST 4 - ADD 2 ARRAY ELEMENTS (ONE CO N TA I N S H I N U S VALUE) P0300370

MRRVI = 4 PO 3 0 03 80

IAC1 1(3) = 3 P03 00390

I AC2 I ( 1 , 3 ) = - 3 P0300400

NBS FORTRAN Test Programs Version 1 A5
WRITE (NUVI,303) MRRVI, IAC2I(2.2)

P 0 3 0 0 4 1 0 P0300420

^^t»t*t Itol J AUU o INltbtn VAKlADLto

MRRVI = 5 DA7AA/ 7A K0300430

P0300440

L L L V i - - 0 . MDCVI =-2

DA7AA / CA P0300460

NECVI = +18

IFDVI = JACVI+KBCVI+LCCVI+MDCVI+MDCVI+LCCVI+KBCVI+NECVI

OATAA / 7A P0300480

WRITE (NUVI.303) MRRVI. IFDVI

Ct*t** TEST 6 - ADD COMBINATION OF VARIABLES. ARRAY ELEMENTS

nrVTAA / OA

P0300500

C***»» AND CONSTANTS

MRRVI = 6 nATAAC 1 A

r U i U 0 b 1 0 P0300520

IAC2I(2,2) = -2

IFDVI = I AC1 I( 3 ) + I AC2 I ( 1 , 3 ) + I AC2 I (2 , 2) + JACVI +KBCVI +LCCVI +7+1

nA'TAACTA

P0300540

WRITE (NUVI,303) MRRVI, IFDVI

C***t* TEST 7 - ADD 2 REAL VARIABLES

DATAA^ ^A

P0300560

WRITE ( NUV I , 3 04 ) 304 FORMAT (//15H REAL ADDITION) P0300580

MRRVI = 7 ACVS = -2.0

DA-JAACQA

P0300600

BCVS = 2.0E0

HHCVS = ACVS+BCVS

DA7AAA1A r U J U U 0 1 U P0300620

WRITE (NUVI,305) MRRVI, HHCVS

30 5 FORMAT (/6H T E S T . I 3 , F 7 . 1 )

DA7AAA7ri

P0300640

C*««*t TEST 8 - REVERSE ORDER OF VARIABLES IN TEST 7 MRRVI : 8 DAVAAA^n

P0300660

GGCVS = BCVS + ACVS

WRITE (NUVI,305) MRRVI, GGCVS

DA7AAA7A

P0300680

Z***t* TEST 9 - ADD 4 REAL VARIABLES

MRRVI = 9 DA7AAA0nP0300700

FFCVS = ACVS + BCVS + ACVS + BCVS

WRITE (NUVI,305) MRRVI, FFCVS

DA7AA71

A

r U 5 U u / 1 U P0300720

C**«t« TEST 10 - ADD 2 REAL CONSTANTS

MRRVI = 10

rUjUU / jU

P0300740

A2S(1,2> = 3.5 + (-3.5)

WRITE (NUVI,305) MRRVI. A2S(1,2)

DA7AA7qA

P0300760

C*«*** TEST 11 - ADD REAL ARRAY ELEMENTS

MRRVI = 11 nA7AA77AP0300780

A1S(1) = -25 E-1

ACVS = 2.5

rUjUU/7U

P0300800

A2S (1,1) = -7.0

FFCVS = A1S( 1 ) + A2S( 1 , 1 ) + 9.5

nA7AA9-|A r U J U U o 1 U P0300820

WRITE ( NUVI 305) MRRVI FFCVS

Ct*t** TEST 12 - ADD COMBINATION OF VARIABLES, ARRAY ELEMENTS

nA7AA07A rUjUUojU

P0300840

r*W « * « * AND l\ 11 U/ CONSTANTS %* W 11 W 1 / V 11 1 w MRRVI = 12 nA7AACCA rUjUUoju

P0300860

FFCVS = A1S(1) + ACVS + 7.0 + A2S(1,1)

WRITE (NUVI, 305) MRRVI, FFCVS

nA7AA57A

P0300880

WRITE (NUVI, 306)

306 FORMAT (//35H ALL ABOVE ANSWERS SHOULD BE 0 FOR/

DA7AA00A

P0300900

1 31H THIS SEGMENT TO BE SUCCESSFUL)

Z***tt END OF TEST SEGMENT 030

0 0 7 (\ 0 Q ^ (\ r U J U U 7 1 U P 0 3 0 0 9 2 0 C t « * * * C***«* WHEN EXECUTING ONLY SEGMENT 030, THE STOP AND END P0300940

C««**« CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE

C****» IN COL 1 AND 2 REMOVED.

C: P0300960

C= STOP

C= END

r \J J \J \J 7 / U P0300980

STOP

END

D n 7 n r 1 r U J U L. 1 P030C2

C * « 1 1

«

" r U J 1 U U 1 u P031 0020

C****» ARFAD - (031 ) C * * « «

t

D 0 7 1 (in 7 (1 r \J J 1 V U J U P031 0040

£tt**tiitiit*tt*tiitt*t*tii**ttiitt**t ttt** t*tt*t*t**tttt

C*««»« GENERAL PURPOSE ASA REF P0 3 1 0060

C»«»«t TEST THAT EXPRESSIONS INVOLVING THE ADDITION OF 6.

C*«*«« DOUBLE PRECISION VALUES MAY BE FORMED

1

1 r U J \ \J yj / \J P031 0080

46 NBS FORTRAN Test Programs Version 1
C«*«** GENERAL COMMENTS P0310090

C*»*** VARIABLES,. ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0310100

C*V«7« VARIETY OF •CbMBINAflONS P0310110

C***** P0310120

[;***«* S P E C i F I C A T

i:"'0 N S segment 031 P03 10130

C***** , P0010590

C when executing only segment 031. THE SPEC IF I CAT I ON STATE HE NTS POO 1 0 5 9 5 C***** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL P0010600

C*«'*** i AND 2 REMOVED P0 0 1 060 5 C***** P0010610

C= DOUBLE PRECISION A CVD^B CVDVF F CVDVGG C VD7hHC P 0 0 1 0 6 1 5 C = ,

, 1 , E P 1 D ( 4 3,1,,, B C,2 D,,(,,7,, ,4 ) , C C,3,D.(,,7,, 2 ,,,2;, ) P 0 0 1 0 6 2 0 C*«*** PO 0 1 062 5 DOUBLE PRECISION ACVD , B CVD , F F CVO . GG CVD . HH CVO P031A1

1 , EP1 D( 43 ) , BC2D( 7 , 4) , CC3D( 7 , 2 , 2 ) P031A2

C,*.*,,*,*,* p U T P U T T A P E ASS I GNMENT STATEMENT, NO INPUT TAPE . P03 10140

C *'*"«"*"* POO 70 460

C**,«** WHEN EXECUTING ONLY SEGMENT 031, THE STATEMENT NUVI = 6 P00 7 0 465

C*t'*T* MUST HAVE THE C= IN COL 1 AND 2 REMOVED. P0 0 70 4 70

C***«* P0070475

C = N U V I = 6

'. P 0 0 7 0 4 8 0 Z* ** * t P0 070485

' NUVI =6 P031B1

WRITE (NUVI, 310) P0310150

3'i'O FORMAT ( 1 H 1 , 1 X , 2 7 H AR F AD - (031) D.P. ADDITION// P0310160

-16H ASA REF. - 6.1//9H RESULTS) P0310170

C****« HEADER FOR SEGMENT 031 WRITTEN P0310180

ACVD = -.01414213562373095D2 P0310190

B C V D = 1 4.1 42 1 3 562 3 73 09 5 0- 1 P 0 3 1 0 2 0 0 EP1D(20) = -4. 12310562561766D0 P0310210

B C 2 D ( 6 , 3 ) = .2 06 1 5 52 8 1 2 80 8 830 1 ~ P 03 1 022 0 HHCVO=ACVD+BCVD P0310230

GGCVD=BCVD+ACVD P0310240

EP1D(34) = .003D3 + (-300.00-2) P0310250

FFCVD = BCVD+ACVD+ACVD+BCVD P0310260

CC3D(7,1.1)=EP1D(20) + BC2D(6, 3)+206. 1 552812808830-2 +41 . 231 0562561 7P03 1 0270

' 1660-1 + EP1 0(20) P03 1 02 8 0 WRITE (NUVI, 312) HHCVD, GGCVD. FFCVD, EP1D(34). CC3D(7,,1.1) P03 1 0290

3'i2 i=ORMAt (//5(D22.1 0 //)// 3 8H THE 5 ANSWERS ABOVE SHOULD BE 6 PLUS/ P03 1 0 30 0 T37H OR MINUS AN ERROR FACTOR OF 0.10-13) P0310310

C END OF TEST SEGMENT 031 P03 1 0 32 0 C***** P0310330

C* *'*** W H E N EXE CUT I N G 0 N L Y S EG ME NT 0 3 1 THE STOP END P 0 3 1 0 3 40

C**««« CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C= P0310350

C«'*'*'«* IN COL 1 AND 2 REMOVED. P03 1 0 360

C= END P0310370

C:= STOP P03 1 03 80

STOP P031C1

C*«:*******************«*tt«<rtt***************t**************tkt )t** *t*P0320010

C *''«'*

* P032 0 02 0 C*»*** ARBSB - (032) P0320030

C**'**'* PO 32 00 40

C*«*«**«*««**««*««****»**«««*«***«t*««****t*«*t**t***«***t«t*«*«****«»t*P0320050

C G E N E R A L PUR P OS E ASA R E F P 0 3 2 0 0 6 () C*««** TEST THAT EXPRESSIONS INVOLVING THE SUBTRACTION OF 6.1 P0320070

C*t*** INTEGER OR REAL VALUES MAY BE FORMED P032 0 08 0 C«t«** GENERAL COMMENTS P0320090

Ct«**t TYPES ARE NEVER MIXED P0320100

C « VARIABLES. ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0320110

C** «** VARIETY OF COMBINATIONS. " P032 0 1 20

C**«*« SPECIFICATIONS SEGMENT 032 P0320130

C

*'*"«'«

t P 0 0 1 0 6 3 0 C«**«* WHEN EXECUTING ONLY SEGMENT 032. THE SPECIFICATION STATEMENTS P0010635

C***** WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS PO0 1 0640

C**.** 1 AND 2 REMOVED P0 0 1 064 5 C* * * * * "-' POO 1 065 0 C= ; DIMENS I ON A1S ( 5 ) , A2S ( 2 , 2 )

, I.AC1I^^ POO 1 06 5 5

NBS FORTRAN Test Programs Version 1 47
1 1 * DIMENSION A1S(5),A2S(2,2),IAC1I(5),IAC2I(2,7)

P0010660

P032A1

Ct«t«t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT

C « « t «

«

TAPE . P0320140

P0070490

C»«t«» WHEN EXECUTING ONLY SEGMENT 032. THE STATEMENT NUVI = C«t**t MUST HAVE THE C= IN COL 1 AND 2 REMOVED.

6 P0070495

P0070500

c * * * * « C= NUVI = 6 P0070505

P0070510

C * * * * * NUVI = 6 P007051

5

P032B1

320

WRITE (NUVI. 320)

FORMAT (1H1 , IX. 31HARBSB - (032) BASIC SUBTRACTION//

P03201 50

P0320160

C»*

1 17H ASA RfFS. - 6 . 1 / / 2 X . 7 H R E S U L T S ) *** HEADER FOR SEGMENT 032 WRITTEN

P03201 70

P03201 80

MRRV! : 1 WRITE (NUVI ,321 )MRRVI

P03201 90

P0320200

321 FORMAT ( / /2X. 4HTEST. I 1 . IX. 1 9H I NTEGER SUBTRACTION)

JACVI =3

P0 32 02 1 0 P0320220

I AC1 I ( 1

) =3

I HDVI = JACVI - I AC1 1(1)

P0320230

P0320240

I GDVI : I AC1 I ( 1

) -JACVI

IFDVI:JACVI-IAC1I(1)-IAC1I(1)+JACVI

P0320250

P0320260

I AC2 I ( 2 , 3 ) = 3-2-1

IAC2I (1,1) = 6 - JACVI - IAC1I ( 1

)

P0320270

P0320280

323

WRITE (NUVI, 323) IHDVI,IGDVI, IFOVI, IAC2I(2,3), IAC2I(1

FORMAT ( / 5 ( I 1 1 / ) ) .1) P0320290

P0320300

328

MRRVI = 2 WRITE (NUVI . 329)MRRVI

P03 2 0 3 1 0 P0320320

329 FORMAT ( / /2X. 4HTEST, I 1 . IX. 1 6HREAL SUBTRACTION)

ACVS=5 . 1E1

P0320330

P0320340

BCVS= . 5 1 E2

HHCVS:ACVS-BCVS

P0320350

P0320360

GGCVS=BCVS-ACVS

FFCVS=ACVS-BCVS+BCVS-ACVS

P0320370

P0320380

A2S(1 ,2) = 2. 1E1

AlSd ) = ACVS - A2S(1 .2) - 30.0

P0320390

P0320400

324

WRITE (NUVI. 32 4 ) HHCVS. GGCVS. FFCVS, AlSd)

FORMAT ( /4( F11 . 1 / ) /34H ALL ABOVE ANSWERS SHOULD BE 0 FOR/

P032 0 4 1 0 P0320420

1 31H THIS SEGMENT TO BE SUCCESSFUL)

C***t* END OF TEST SEGMENT 032

P0320430

P0320440

c *

«

c *

* * * *** WHEN EXECUTING ONLY SEGMENT 032. THE STOP AND END

P0320450

P0320460

c «

«

c * * *»* CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C= *** IN COL 1 AND 2 REMOVED.

P0320470

P0320480

c=

c= STOP

END

P0320490

P0320500

STOP

END

P032C1

P032C2

c * « » *

«

«****«*«**P0330010

P0330020

c * * c*«

«* ARFSB - (033)

« * * P0330030

P0330040

C***«t GENERAL PURPOSE

 «** ««*P0330050

ASA REF P0330060

c *

«

c * * *** TEST THAT EXPRESSIONS INVOLVING THE SUBTRACTION OF *** DOUBLE PRECISION VALUES MAY BE FORMED

6 . 1 P0330070

P0330080

c *

«

c *

«

*** GENERAL COMMENTS

*** VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0330090

P0 3 30 1 0 0

c «

«

c *

«

VARIETY OF COMBINATIONS

1 1

1

P03 3 0 1 1 0 P0 33 0 1 2 0 C****» SPECIFICATIONS SEGMENT 033

c * * « «

t

P03301 30

P0 0 1 0670

c * * c «

**« WHEN EXECUTING ONLY SEGMENT 033, THE SPECIFICATION STATEMENTS

»** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

P0 0 1 06 7 5 POO 1 068 0 C«*««* 1 AND 2 REMOVED

c * * * *

«

PO 01 068 5 POOl 0690

c

=

c

= DOUBLE PRECISION A C VD . B C VD , C C VD , D C VD , G G C VD , H H C VD , D P C VD , F F C VD

1.AC1D(10).A2D(2.2).A3D(2,2.2)

POO 1 069 5 POO 1 0 70 0

48 NBS FORTRAN Test Programs Version 1
C t « * t

«

C * 1 1

«

c * * *

«

c * * * c « « * * c * * * * c=

c * * « «

DOUBLE PRECISION A C VO , B C VD , C CVD , D C VD , GG CVD . H H C VD . DP C VD , F F CVD

1 .AC1D( 10) ,A2D(2.2) .A3D(2,2,2)

* p y T P y T T A P E ASS I GNEE NT STATEME NT, NO I NPUT TAPE

*

* WHEN EXECUTING ONLY SEGMENT 033, THE STATEMENT NUVI = 6

* MUST HAVE THE C= IN COL 1 AND 2 REMOVED.

NUVI

330

C * * * *

NUVI = 6 WRITE (NUVI. 330)

FORMAT (1H1 . 1X,30HARFSB - ( 033 ) D.P

•16H ASA REF. - 6 . 1 / / 2X . 7HRESULTS

)

' HEADER FOR SEGMENT 033 WRITTEN

ACVD=1 .002

BCVD= .3D1

CCVD=15.D0

ACID(I) = 60.0-1

A2D( 1 , 1 ) = - .0202

SUBTRACTION//

C * * « * *

c * * *

«

A3D( 1 ,2,1 ) = 4 00 0. D-3

TWO TERM SUBTRACTION

HHCVD= /^CVD-BCVD

HHCVD= HHCVD-97.0D0

GGCVD=1 . 0D0-AC1D( 1

)

GGCVD=GGCVD+5 .000

' DCVD = 4.0D0 - A3D(1 ,2, 1)

WRITE (NUVI, 331) HHCVD, GGCVD, DCVD

* THREE TERM SUBTRACTION

HHCVD= ACVO-BCVD-97 . ODO

GGCVD = 1 6 . ODO - CCVD - 1 . ODO

DCVD = A3D(1 ,2, 1 )-A2D( 1

, 1 ) -6.000

WRITE (NUVI,331) HHCVD, G(3CVb. DCVD

FOUR TERM SUBTRACTION

DF-CVD = 6.8 5 5 6 5 460 0 40 1 0 400

FFCVD = ( + . 3 42 7 82 73 0 020 0 52D1

)

GGCVD = DPCVD - FFCVD - 42 . 78273002bb5'2D-2 - 3000-2

HHCVD=ACVD-AC1D(1)-AC1D(1)-8.8D1

DCVD = CCVD - A2D( 1 , 1 ) - 110.0-1 - AC 10(1)

WRITE (NUVI, 332) HHCVD, DCVD , GGCVD

"FORMAT ( / / 3 ( 02 2 . 1 0 / )

)

FORMAT (//3(D22.10/)//36H THE ANSWERS ABOVE SHOULD BE 0 PLUS/

137H OR MINUS AN ERROR FACTOR OF 0.1D-13)

* END OF TEST SEGMENT 033

C * « * *

«

331

332

C * * * * c * * * *

c * * * *

c « * * * c * * * * c=

c=

* WHEN EXECUTING ONLY SEGMENT 033, THE STOP AND END

* CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

* IN COL 1 AND 2 REMOVED.

STOP

END

STOP

END

C * * * * c * * * * c * * *

«

c * * * *

c * * * * c « * «

c « «

c * * *

«

c « « * c * * * * c « * * * c * * * c * * * * c * * «

c « * * * c * * «

* ARBAS - (034)

*

* GENERAL PURPOSE ASA REF

* TEST THAT EXPRESSIONS INVOLVING THE ADD ITION AND 6.1

» SUBTRACTION (COMBINED) OF INTEGER OR REAL VALUES MAY BE

* FORMED.

« GENERAL COMMENTS

* TYPES ARE NEVER MIXED.

* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN

* A VARIETY OF COMBINATIONS.

*

* S P E C I F I C A T 1 0 N S SEGMENT 03 4

P0010705

P033A1

P033A2

P03301 40

P 0 0 7 0 5 2 0 P0070525

P 0 0 7 0 5 3 0 P0070535

P 0 0 7 0 5 4 0 P0070545

P033B1

P03301 50

P03301 60

P03301 70

P03301 80

P03301 90

P0330200

P0 3 302 1 0 P0330220

P0330230

P0330240

P0330250

P0330260

P0330270

P0330280

P0330290

P0330300

P0330310

P0330320

P0330330

P0330340

P0330350

P0330360

P0330370

P0330380

P0330390

P0330400

P033041

0

P0330420

P0330430

P 0 3 3 0 4 4 0 P0330450

P0330460

P0330470

P0330480

P0330490

P0330500

P0 33 0 5 1 0 P0330520

P0330530

P033C1

P033C2

P034001

6

P0340020

P0340030

P0340040

P0340050

P0340060

P0340070

P0340080

P0340090

P03 40 1 0 0 P03 40 1 1 0 P0340120

P03 4 0 1 3 0 P0340 1 40

P0 3 4 0 1 5 0 POO 1 071 0

NBS FORTRAN Test Programs Version 1 49
c « « » t * c « « * * * WHEN EXECUTING ONLY SEGMENT 034, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

P00 1 071 5 P0 0 1 0 720

Q * * * t * c « * * «

1 AND 2 REMOVED P0010725

P001 0730

c=

C= 1 DIMENSION A2S(2,2) ,A3S(3,3,3). IAC1 1(5), IAC2I (2,7) ,AC1S(25)

P0 0 1 0 73 5 P001 0740

c=

c « * * *

«

INTEGER MCA3I (2,3,3) P00 1 0 74 5 P 0 0 1 0 7. 5 0

1 DIMENSION A2S(2,2) ,A3S(3,3,3)

, IAC1 I (5 ) , I AC2I (2 , 7) . AC1S(25 ) P034ArP034A2

c « * « * * INTEGER MCA3I (2,3,3) OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE . P034A3

P 0 3 4 0 1 6 0

c * * * *

«

c * * t «

«

WHEN EXECUTING ONLY SEGMENT 034, THE STATEMENT NUVI = 6 P0070550

P0070555

C * t * * « c * * « « t MUST HAVE THE C= IN COL 1 AND 2 REMOVED. P0070560

P0070565

c=

c * * « * * NUVI = 6 P0070570

P0070575

NUVI = 6 WRITE (NUVI, 340)

P034B1

P03401 70

340 FORMAT ( 1 H 1 . 1 X , 32HARBAS - ( 034 ) BASIC ADDITION AND/UX,

113H- SUBTRACTI0N//16H ASA REF. - 6.4//

P 0 3 4 0 1 8 0 P0340190

22X. 7HRESULTS)

C***«* HEADER FOR SEGMENT 034 WRITTEN

P0340200

P0340210

341

WRITE (NUVI, 341)

FORMAT (//2X.26HTEST1 INTEGER ADD AND SUBT)

P0340220

P0340230

JACVI = 5 KBCVI = 1 P0340240

P0340250

LCCVI = 10

MDCVI = -2

P0340260

P0340270

IAC1 I (2) = 3 IAC2I (2.2) = -3

P0340280

P 0 3 4 0 2 9 0 IHDVI = JACVI+KBCVI-LCCVI+MDCVI-IAC1 I (2)+9

IGDVI = ( JACVI+KBCVI ) - ( MD CV I - I AC 1 I ( 2 ) ) - 11 P0340300

P034031

0

IFDVI =(6 + (KBCVI - ( LCCVI +MDCVI )) ) + 1 HCA3I(1,1,1) = IAC21(2.2) - JACVI - MDCVI - KBCVI + 7 + 0 P0340320

P0340330

342

WRITE (NUVI, 342) IHDVI. IGDVI, IFDVI, MCA3I(1,1,1)

FORMAT ( /4( I 1 1 / )

)

P0340340

P0340350

C * * t * t HEADER FOR TEST2

WRITE (NUVI. 344)

P0340360

P0340370

344 FORMAT ( /2X, 24HTEST2 REAL ADD AND SUBTR)

ACVS = 5.0

P0340380

P0340390

BCVS = 1.0

CCVS =10.0

- P0340400

P 03 4 0 4 1 0 DCVS = -.2E+1

ACISd ) = 30.E-1

P0340420

P0340430

A2S (2. 1 ) = 6.0

HHDVS= ACVS BCVS - CCVS + DCVS +9.0-AC1S(1)

P0340440

P0340450

GGDVS= (ACVS + 1.0) -11.0 - ( 0 CVS - AC 1 S ( 1 )

)

FFDVS= (6.0 + (BCVS-(CCVS+DCVS) ) ) + 1.0

P0340460

P0340470

A3S(1,1,2) = A2S(2.1) - CCVS + 8.0 - 4.0

WRITE (NUVI. 343) HHDVS, GGDVS, FFDVS, A3S(1,1.2)

P0340480

P0340490

343

1 FORMAT (//4(F11 .1/)/35H ALL ABOVE ANSWERS SHOULD BE 0 31H THIS SEGMENT TO BE SUCCESSFUL)

FOR/ P03 40 5 00

P034051

0

C t « « t * C « t « 1

1

END OF TEST SEGMENT 034 P0340520

P0340530

C « t * t * C * t * * * WHEN EXECUTING ONLY SEGMENT 034, THE STOP AND END

CARDS WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0340540

P0340550

c « * t « * C = IN COLUMNS 1 AND 2 REMOVED.

STOP

P0340560

P0340570

c= END

STOP

P0340580

P034C1

C 1 1 1 1

«

END

t***ttttt*tttt*ttt*ttttttttttttttttttttiit*ttttttttttttt

P034C2

t***«t«**»«P0350010

c * * t * » c * « t * t ARFAS - (035)

P0350020

P0350030

c * * * t « tt*tttt*t

P0350040

**P0350050

50 NBS FORTRAN Test Programs Version 1
C««t*t GENERAL PURPOSE ASA REF P0350060

C««*** TEST THAT EXPRESSIONS INVOLVING THE ADDITION AND 6.1 P0350070

C*'***t SUBTRACtlbN ' (COMBINED)' OF DOUBLE PRECISION VALUES P0 3 5 0 0 80

C****t MAY BE FORMED P0350090

C * *

"* * * GENE R A L C 0 M M E N t S P 0 3 5 0 1 00

C*«*** VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0350110

C*'*"**'* VARIETY OF COMBINATIONS P0 3 5 0 1 2 6 C***** P0350130

C*'*'*** s 'P E C I" F I C A t I 0 N S SEGMENT 03 5 P0 3 5 0 U0

C***** P0010760

C«*'*T* WHEN EXE cut IN G ONLY SEGMENT 03 5 , THE SPEC IF I CAT I ON STATEMENTS POOl 0 76 5 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0010770

C**T** IN COLUMNS l' AND 2 REMOVED. POO 1 0 77 5 Z* **** P0010780

C = DO U B L E PRE C I S I ON A C VD , B C VD , C C VDV'D C VD , F F D VD , G G D VD , HH D VD P 0 0 1 0 7 8 5 C= 1 ,AC1D( 10) ,BC2D(7,4) , CC3D(7,2,2) P0010790

DOUBLE PRECISION A C VD , B C VD , C C VD , D C VD , F F D VD , G G D VD , H H D VD P03 5A1

' 1.AC1D(10),BC2D(7,4),CC3D(7,2,2) P035A2

C *'***

* POO 1 0 79 5 C*«t** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0350150

C * W HE N E XECUTING ONLY SEGMENT 035 , T H E F 0 L L 0 W I N G S TATE ME NT P 0 0 7 0 5 8 0

C *.* * *. * N y V I = 6 MUST HAVE THE C = I N COLUMN S

, 1 , A N D ,, 2 R E M 0 V E D

P 0 0 7 0 5 8 5 C***** P007059 0 C= NUVI = 6 P0070595

NUVI = 6 P03 5 B1 WRITE (NUVI, 350) P0350160

3 5 0 FORMAT ( 1 H 1 , 1 X , 32HARFAS - ( 03 5 ) D.P. ADD AND SUBTR//2X, P03 5 0 1 70

-UHASA REF. - 6 . 1 / / 2X , 7HRESULTS ) P03 5 0 1 8 0 C*t*** HEADER f=bR SEGMENT 03 5 WRITTEN P03 5 0 1 90

ACVD = 5.0D0 . P0350200

BCVb = 10.0D-1 P0350210

CCVD = 10.0D0 P0350220

DCVD = -0.2D1 P03 5 02 3 0 ACIDd )= 3 0 0.0D-2 P03 5 0240

B C 2 D ( 6 , 3 ) = 4 0 0 . D - 2 P 0 3 5 0 2 5 0 AC1D(2) = .24816326424816D5 P0350260

BC2D( 5,3 ) = -.1 2408 1 632 1 240805 P0 3 5 02 70

HHDVD = ACVD + BCVD - CCVD + DCVD + 9.0D0 - ACIDd) P03 5 02 80

GGDVD = (ACVD + 1.0E0) - II.OEO -(DCVD - AC1D(1)) P03 5 0290

FFDVD = (6.0D0+(BCVD-(CCVD+DCVD))) + 10.0D-1 P0350300

CC3D(6. 1 ,1 ) = CCVD-DCVD + BC2D(673y-ACVD-TI70^ P0 3 5 03 1 0 CC3D(5,1,2) = AC1D(2) + BC2D( 5 , 3 ) - 1 2 40 8 . 1 63 2 1 240 8D0 P0 3 5 0320

WRITE (NUVI. 351) HHDVD, GGDVD, FFDVD, CC3D(6,1,1). CC3D(5,1.2) P0350330

351 FORMAT ( / / 5 ( D2 2 . 1 0 / ) / / 3 5 H THE ANSWERS ABOVE SHOULD BE 0 FOR/ P03 5 03 40

1 32H THIS SEGMENT TO BE S U C C E S S F U L . / 3 6 H VALUES WITH EXP 0 N E NT S L E P 0 3 5 0 3 5 O' 2SS THAN /31H 10*«(-14) ARE CONSIDERED ZERO) P0350360

C«*T** END OF TEST SEGMENT' 03 5 P03 5 0 3 7d

C***** P0350380

Ct**«* WHEN EXECUTING ONLY SEGMENT 03 5, THE STOP AND END P03 5 03 90

C**»** CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C= P0350400

C *'*'**"* IN COL 1 AND 2 REMOVED. P0 3 5 0 4 1 0 C= STOP P0350420

C= E'ND P03 5 0 43 0 STOP P035C1

END F'03 5 C2

Zttttt1l**1lt*****t**tt1l*i*t*t1lt1^1l1l1ltt1l1ltttt^1l**itt*ttt*t1ltt1lt*ttttitttt**POZbOO^Q

C* * * * * - P 0360 02 0 C***** ARBMI - (036) P0360030

C'*'*'*'*"* P0360 0 40

C*«-*«t**«»«*t*t«*«*«*«*«*«4«t«»«««»*»*«tt*t***»t***t*««**«*t**«t»«»»*«ttP0360050

C ***'«

* GENE R A L F> U R PO S E AS A REF P 0 3 6 0 0 6 () C**«** TEST THAT EXPRESSIONS INVOLVING MULTIPLICATION OF 6.1 P0360070

Z*'t"*V* INTEGER VALUES MAY BE FORMED. P0 360 0 8 0 C*«*«* GENERAL COMMENTS P0360090

C*'**'** INTE(3ER SUBTRACTION ASSUMED WORKING P0360 1 0 0 C*t««t * VARIABLES. ARRAY ELEMENTS AND CONSTANTS ARE USED P0360110

C ; * » « « I N Y^R IET Y OF COMBINATIONS. F» 0 3 6 0 1 20

C***** P0360130

NBS FORTRAN Test Programs Version 1 51
C*t»t. SPECIFICATIONS SEGMENT 036

c * * * * * P0360U0P001 0800

C«***« WHEN EXECUTING ONLY SEGMENT 036. THE SPECIFICATION STATEMENTS

C***** WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS

P001 0805

POO 1 08 1 0 C*««*« 1 AND 2 REMOVED.

C * * t * * P00 1 08 1 5 POO 1 0820

C= DIMENSION IAC1I<5). IAC2I(2.7)

DIMENSION IAC1 1(5), IAC2I (2,7)

P001 0825

P036A1

c

* « * * C»t**« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P001 0830

P0360 1 5 0

c « * « * * C***** WHEN EXECUTING ONLY SEGMENT 036, THE FOLLOWING STATEMENT

PO O 70600

P0070605

Ct***« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2

c * * * « REMOVED

.

P 0 0706 1 0 P 0 0 7 0 6 1 5 C= NUVI = 6 NUVI : 6 P0070620

P036B

1

c * * * «

«

WRITE (NUVI. 360)

P0070625

P0360 1 60

360 FORMAT (IHl, 1X,36HARBMI - (036) INTEGER MULTIPLICATION//

116H ASA REF. - 6 . 1 / / 2 X , 7 H R E S U L TS

)

P03601 70

P0360 1 80

C****» HEADER FOR SEGMENT 036 WRITTEN

JACVI=1

P 0 3 6 0 1 9 0 P0360200

KBCVI=2

LCCVI=0

P 0 3 6 0 2 1 0 P0360220

MDCVI =-5

IAC1 I (2 ) = -10

P0360230

P0360240

IAC2I(1 ,2) = 3

I HDVI = JACVI 'KBCVI

P03 6 02 5 0 P0360260

IGDVI=KBCVI*MDCVI*LCCVI

I FDVI = MDCVI * JACVI I AC1 I ( 2 ) •3

P 03602 70

P0360280

IEDVI=-3*JACVI*( -MDCVI) *JACVI«KBCVI

IDDVI=KBCVI*KBCVI*KBCVI*KBCVI*KBCVI*JACVI

P036029 0 P0360300

ICDVI = ( - I AC1 I (2 )

) JACVI KBCVI JACVI *KBCVI * JACVI *1 IAC2I(1,1)=IAC2I(1,2)*MDCVI»IAC1I(2)*2

P 0 3 6 0 3 1 0 P0360320

IHDVI = IHDVI - 2 IFDVI = IFDVI - 150

P036033 0 P0360340

lEDVI = lEDVI + 30

IDDVI = IDDVI - 32

P0360350

P0360360

ICDVI = ICDVI - 40

IAC2I (1 , 1 ) = IAC2I (1,1) - 300

P0360370

P0360380

WRITE (NUVI, 361) IHDVI, IGDVI, IFDVI, lEDVI, IDDVI

1 I AC2 I ( 1

, 1

)

, ICDVI, P0360390

P0360400

361 FORMAT ( / / 7 ( I 1 0 / ) / / 3 5 H ALL ABOVE ANSWERS SHOULD BE 0 FOR/

1 31H THIS SEGMENT TO BE SUCCESSFUL)

P036041

0

P0360420

C*«*** END OF TEST SEGMENT 036

c * * * * * P0360430

P0360440

C*t**« WHEN EXECUTING ONLY SEGMENT 036, THE STOP AND

C*.*.t CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE

END

C = P0360450

P0360460

C***t* IN COL 1 AND 2 REMOVED.

C= STOP

P 0 3 6 0 4 7 0 P0360480

C= END

STOP

P 0 3 6 0 4 9 0 P036C1

END

* 1 1 * P0 36C2

*P03700 1

0

c * * * * * C***** ARBMR - (037)

P0370020

P0370030

c * « « * t C«**«*»*«««««*«*t**t*««**«***«*«t***t«******« «** «***

P0370040

t*««tP0370050

C*«**t GENERAL PURPOSE

C*«*«* TEST THAT EXPRESSIONS INVOLVING MULTIPLICATION

ASA

OF 6 REF

. 1 P0370060P0370070

C***** REAL VALUES MAY BE FORMED

C***tt GENERAL COMMENTS

P0370080

P0370090

Ct*«*« REAL SUBTRACTION ASSUMED WORKING

C***t* t VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P03 70 1 0 0 P03701 1

0

C«*«*« VARIETY OF COMBINATIONS.

C * * t «

«

P0370120

P03701 30

C**t«t SPECIFICATIONS SEGMENT 037

C * * t * *

P 0 3 70 1 40

P 0 0 1 0 8 4 0

52 NBS FORTRAN Test Programs Version 1
C***** WHEN EXECUTING ONLY SEGMENT 037, THE SPECIFICATION STATEMENTS P0010845

C***** WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS P0010850

C***** 1 AND 2 REMOVED. PO0 1085 5 C**««* P0010860

t'= D I ME N S j 0 N ^2 s (-272')7a CVslZ 5

)

" P 0 0 1 0 8 6 5 DIMENSION A2S(2,2) ,AC1S(25) P037A1

C***** P001087 0 C* * * * * p U, T P U T T A P E ASS I GNMENT STATEMENT . NO I NPUT TAPE , P0 3 70 1 5 0 C* * * * * POO 7 063 0 C***t* WHEN EXECUTING ONLY SEGMENT 037. THE FOLLOWING STATEMENT P0070635

C'tttV* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P00 70640

C***** P0070645

C = NUVI = 6 P 0 0 7 0 6 5 0 NUVI = 6 P037B1

C

*"* '*" t P 0 0 7 0 6 5 5 WRITE (NUVI. 370) P0370160

370 FORMAT ( 1 H 1

, 1 X , 3 3 H ARBMR - ( 03 7 ) REAL MULT I PL I CAT I ON / / 2X , P0 3 70 1 70

114HASA REF. - 6 . 1 / / 2X . 7HRESULTS ) P03 70 1 80

CT*T*T HEADER FOR SEGMENT 03 7 WRITTEN P0 3 70 1 90

ACVS =1.0 P0370200

BCVS = 0.2E2 P03 702 1 0 CCVS =-1.0 P0370220

DCVS = 0.0 F'03 70 23 () ACISd) = .5E + 1 P03 70 2 40

HHDVS = ACVS*BCVS P03 70 2 5 0 GGDVS=BCVS*BCVS*1 .0 P0370260

FFDVS=2 . 0*AC1 S( 1 ) tACVStACVS P0370270

EEDVS=ACVS*BCVS*CCVS*DCVS*AC1S(1) P0370280

DDDVS = AC1S(1 )* ACVS* BCVS* 1 . OE 1 * ACVS'*ACVS P03 70 29()

C COVS = C CVS * C CVS * CCVS*3 .EO* ACVS* ACVS* ACVS P03 703 0 0 A2S(1.1) = ACVS*CCVS*2. P0370310

HHDVS = HHDVS - 20.0 P0370320

GGDVS = GGDVS - 400.0 P0370330

FFDVS = FFDVS - 10.0 P0370340

DDDVS = DDDVS - 1000.0 P0370350

CCDVS = CCDVS + 3.0 P0370360

A2S( 1 , 1 ) = A2S( 1 , 1 ) + 2 . P03 703 70

WRITE (NUVI, 371) HHDVS, GGDVS. FFDVS. EEDVS. DDDVS. CCDVS. P0370380

1 A2S( 1 , 1 ) P03 70 3 90

371 FORMAT ( / / 7 ( F 1 1 . 1 / ) / / 3 5 H ALL ABOVE ANSWERS SHOULD BE 0 FOR/ P03 70 40 0

1 31H THIS SEGMENT TO BE SUCCESSFUL) P0370410

C*»*t* END OF TEST SEGMENT 037 P0370420

C *'^* « * WH E N EXE CUT I N G ONLY SEGMENT 0

3

'7. THE STOP AND" END CARDS P0370430

C**t«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0370440

C«iT*« 1 AND 2 REMOVED. P03 70 4 5 0 C= STOP P0370460

C= END P03 70 470

STOP P037C1

END P0 3 7 C2

C***t**t*****t«r**1r t** *************tt********t***t*******t**tt*t*t**tP0380010

C*'« *« * P0 3 8 0 02 0 C***** ARFMD - (038) P0380030

C

**"*"*"* P0380040

C********t*t*t*t*****«***t**ttiir*t********t*********t*********t********t*P0380050

t**"t't* G E N E R A L P U R P OS E ASA FIE F P 0 3 8 0 0 6 0 C****« TEST THAT EXPRESSIONS INVOLVING THE MULTIPLICATION 6.1 P0380070

C ***** OF DOUBLE P R E C I S I 0 N VA L U E S MAY BE FORMED P0 3 8 0 0 8 0 C***** GENERAL COMMENTS P0380090

C**«** » DP ADDITION AND SUBTRACTION ASSUMED WORKING. ' P03 8 0 1 0 0 C*t**t * VARIABLES. ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0380110

C * * * * * VAR I ET Y 0 F COMB I N AT I 0 NS P 0 3 8 0 1 2 0 C****« P0380130

C * **** S F> E C I F I C A T I 0 N S SEGMENT a3 8 P 0 3 8 0 1 4 0 C***** P0010880

C***T* WHEN EXECUTI NG ONLY SEGMENT 03 8 . THE SPEC IF I CAT I ON STATEMENTS POO 1 0 8 8 5 C***»* WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS P0010890

C **'***

1 AND 2 REMOVED. PO 0 1 0 89 5 C***** P0010900

NBS FORTRAN Test Programs Version 1 53
C= DOUBLE PRECISION ACVD , B CVD , C C VD , D CVD , E E D VO , DDDVD , C CD VO P0010905

C= I.FFDVD, GGDVD,HHDVD,AC1D(10) ,BC2D(7,4) , CC30(7,2,2) P00 1 091 0 DOUBLE PRECISION A CVD . B CVD , C CVD , D CVD , E EDVD , DDD VD , C CD VD P038A1

I.FFDVD,, GGDVD , HHDVD , AC1 D( 1 0 ) . BC2D( 7, A )

, CC3D(7,2,2) P038A2

t* P0 0 1 09i 5 C*.* * * * 0 U T P y T T A P E ASS I GNMENT STATEMENT, NO INPUT TAPE . P03 80 1 5 0 C***** , POO 70660

C***** WHEN EXECUTING ONLY SEGMENT 038, THE FOLLOWING STATEMENT P0070665

C*»*<r* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0 0 706 70

C* * * * * P0 0 706 75

C:'= NUVI ="6 POO 7068 0 NUVI = 6 P038B1

C *'»*** POO 7068 5 WRITE (NUVI, 380) P0380160

380 FORMAT ( 1 H 1 , 1 X , 33HARFMD - ( 03 8 ) D.P. MULTIPLICATION/'/ ^X.' P03 8 0 1 70

-15H ASA REF. - 6 . 1 / / 2 X , 7 H R E S U L TS ) P03 8 0 1 8 0 C**Vt* HEADER FOR SEGMENT 038 WRITTEN P0380190

ACVD=1.0D0 P0380200

BCVD = 2.0 P03 8 02 1 0 CCVD=-30.0D-1 P0380220

DCVD=1 .GDI P0380230

AC1 D ( 1 ) = 1 . 1 D1 P03 8 02 40

CC3D( 3 . 1,2 ) = .262 U4D6 P03 802 5 0 CC3D(6,1,2) = -2000.0-3 P0380260

CC3D( 3,2 , 2 ) = 409.6D1 P03 8 02 70

HHDVD=ACVD*BCVD P0380280

GGDVO = ACVD*0. ODO*CCVD P03 8 02 90

FFDVD = ACIOd )*ACVD*ACVD*ACVD P03 8 03 00

EEDVD = CCVD*CCVD*ACVD*1 . 0D0*BCVO P03 8 03 1 0

. DDDVD=ACVD*2.0D1*ACVD*DCVD«1 .OEO'CCVD P0380320

CCDVD = ACVD*BCVD*CCVD*CCVD*CCVD»BCVD*ACVD P03 8 03 3 0 BC2D(3,4) = DCVD*(400.D-2)*CC3D(6, 1 ,2) P0380340

BC2D(2,3) = CC3D(3,1,2) * CC3D(3,2.2) P03 8 03 5 0 HHDVD = HHDVD - 2.0D0 P0380360

FFDVD = FFDVD - 11.0D0 P038 0 3 70

EEDVD = EEDVD - 18.0D0 P0380380

DDDVD : DDDVD + 600. ODO ' P03 80390

CCDVD = CCDVD + 108. ODO P03 8 0 400

BC2D(3,4) = BC2D(3,4) -(-80. DO) P03 8 0 4 1 0 BC2D(2.3) = BC2D(2,3) - 1.07374182409 P0380420

WRITE (NUVI. 381) HHDVD, GGDVD, FFDVD, EEDVD. DDOVD, CCDVO, P03 8 0 43 0

1 BC2D(3.4) . BC2D(2.3) P0380440

38i FORMAT ( / / 8 ( D22 . 1 0 / ) / / 3 5 H THE ANSWERS ABOVE SHOULD BE 0 FOR/ P03 8 04 5 0

1 31H THIS SEGMENT TO BE SUCCESSFUL) P0380460

t*ttt* END OF TEST SEGMENT 03 8 P03 8 0 4 70

C««»tt WHEN EXECUTING ONLY SEGMENT 038. THE STOP AND END CARDS P0380480

C*«*«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0380490

C*»**t 1 AND 2 REMOVED. P0380500

C= STOP P0 38 0 5 1 0 C= END P0380520

STOP P03 8 C1 END P03 8 C2

C*t*****tt*t***tt************t***t***t***t***********tt*t**t*ttt*t*t****P0390010

C*«*** P0390020

C « *'* * * A R B D V - ( 0 3 9 ) P0390030

C »•..*.** P0390040

C******»«*»*«tt««*«*t«t**t***«»t*«»t*t««t*««tt««tt*«*t«*»**«t*»»«t*«*t»»P0390050

C***t* P0390060

C * * * * GENERAL PURPOSE ASA REF P 0390 0 70

C**«** TEST BASIC DIVISION. 6.1 P0390080

C

*'* ** * I N T E G E R AND REAL ( SP ) TYPES 0 N L Y P0390090

C***** P0390100

C i * *** S P E C I F i C A t 1 0 N S SEGMENT 0 3 9 P 0 390 1 1 0 C***** P0010920

C**'tT* WHEN E X E C Of I N G ONLY SEGMENT 039. THE SPEC IF I CAT I ON Sf AT E M E N T S POO 1 092 5 C***»* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS P0010930

C***** i AND 2 REMOVED. POOl 0935

C»**** P0010940

54 NBS FORTRAN Test Programs Version 1

i
DIMENSION

DIMENSION

A2S(2.2)

A2S(2,2)

IAC1 1(5)

IAC1 I ( 5 ) IAC2I (2, 7)

IAC2I (2, 7)

AC1S(25)

AC1S(25)

P0010945

P039A1

c * » * »

P001 0910

c « * * « * 0 u T P U T T A P E ASSIGNMENT STATEMENT. NO INPUT TAPE. P0390 1 20

c * * * * * P0070690

c * « * * * WHEN EXECUTING ONLY SEGMENT 039, THE FOLLOWING STATEMENT P0070695

c * « * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070700

c « * * * * P0070705

c= NUVI = NUVI = 6

6

P 0 0 70 7 1 0 P039B1

c « « « * * WRITE (NUVI , 390

)

P0 0 70 7 1 5 P03 9 0 1 3 0 390 FORMAT ( 1 H 1

, 1 X , 3 0 HAR BD V - (039) INTEGER AND REAL/15X.

-9H DIVISI0N//2X, 14HASA REF. - 6.1/ / 2X , 7HRESULTS

)

C***T* HEADER FOR SEGMENT 039 WRITTEN

WRITE (NUVI. 391)

39! FORMAT ( / / 2 X , 2 2 HTE ST 1 INTEGER DIVISION)

JACVI=1

' KBCVI=2

LCCVI=0

MDCVI = 10

IAC1 1(2) = 1 iAC2I ( 1 , 4) : -8

IHDVI=KBCVI / JACVI

IGDVI =MDCVI /KBCVI / JACVI

IFDVI=LCCVI/JACVI/JACVI/1

lEDVI = MDCVI /KBCVI / I AC1 I (2) / I AC1 I (2) / JACVI

I AC2I ( 1 , 2 ) = I AC2 I ( 1 , 4) /4/KBCVI

iHDVI = IHDVI - 2 IGDVI = IGDVI - 5 lEDVI = lEDVI - 5 'IAC2I(1,2)=IAC2I(1,2)+1

WRITE (NUVI, 392 ) IHDVI, IGDVI. IFDVI, I E DV I .

' I AC2 I ( 1 , 2

)

392 FORMAT (//SdIO/))

WRITE (NUVI , 3 9 3 ) 393 FORMAT ( / / 2X , 1 9HTEST2 REAL DIVISION)

ACVS=1.0

BCVS=0 .

0

CCVS=1.0E1

DCVS=20.0E-1

ACISd ) = 100.0E-2

A2S( 1 , 1 ) = -20 0 .E-2

HHDVS= ACVS/ACVS

GGDVS = CCVS/ACVS/ ( -ACVS)

FFDVS= BCVS/ CCVS/DCVS/ACVS

EEDVS= CCVS/ACISd )/DCVS/(-1 .0)/ACVS

A2S(1.2) = A2S(1 ,1 )7AnS(T)7ACVS/(-2.0E0)

HHDVS = HHDVS - 1.0

GGDVS' = GGDVS + 10 . 0 EEDVS = EEDVS + 5.0

A2S(1 ,2) = A2S(1 ,2) - 1. WRITE (NUVI, 394) HHDVS , GGDVS, FFDVS, EEDVS, A2S(1.2)

394 FORMAT ( / / 5 ( F 1 1 . 1 / ) / / 3 5 H ALL ABOVE ANSWERS SHOULD BE 6 FOR/

12X,29HTHIS SEGMENT TO BE SUCCESSFUL)

Cttttt END OF TEST SEGMENT 039

C****t WHEN EXECUTING ONLY SEGMENT 039, THE STOP AND END CARDS

C***«t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUHNS

C*t*** 1 AND 2 REMOVED.

C = STOP

C= END

STOP

END

ct*tt«********tt*********t t** t***t*****************t**t****tt*tttt**P04 0(}di6

C »,**** . P 0 4 0 0 0 2 0

C t « * t C « t « * c » * *

»

c * « * *

P0390 140

P03901 50

P 0 3 9 0 1 6 0 P03901 70

P0390180

P0390190

P0390200

P0 3902 1 0 P0390220

P0390230

P0390240

P0390250

P0390260

P0390270

P0390280

P0390290

P0390300

P03903 1 0 P0390320

P0390330

P0390340

P0390350

P0390360

P0390370

P03903 80

P0390390

P0390400

P039041

0

P0390420

P0390430

P 0 3 9 0 4 4 0 P0390450

P0390460

P0390470

'P0390 4 8 0 P0390490

P0390500

P0390510

P0390520

P0390530

P0390540

P0390550

P0390560

P0390570

P0390580

P0390590

P0390600

P039061

0

P639C1

P039C2

ARFDV - (040) P0400030

*--- po4ooo4o

tttttttt*t*t***t»***«**********tttt*t*t*******t*t«t**tttt«tt**tttttP0400050

* GENERAL PURPOSE ASA REFP0400060

NBS FORTRAN Test Programs Version 1 55
c * * t « * c * » * » « c * * * » * c * * * *

«

c * * * * * C t * * * * c * t * «

«

c * « * * * c * * * * t c * * * * * C * t * * t c « * *

«

c * * * * * c=

c=

TEST THAT EXPRESSIONS INVOLVING DIVISION OF DOUBLE

PRECISION VALUES MAY BE FORMED

GENERAL COMMENTS

* DP SUBTRACTION ASSUMED WORKING.

* VARIABLES. ARRAY ELEMENTS AND CONSTANTS ARE USED IN A VARIETY OF COMBINATIONS.

6 . 1

SPECIFICATIONS SEGMENT 040

WHEN EXECUTING ONLY SEGMENT 040, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

1 C * « * *

«

c * * * *

«

c * * « * * c * * « *

«

c « * * * * [)«*«**

DOUBLE PRECISION

,AC1D(10) ,eC2D(7,

DOUBLE PRECISION

, AC1 D( 1 0 ) , BC2D( 7,

ACVD.BCVD,

4) , CC3D( 7, ACVD , BCVD

,

4) , CC3D(7,

CCVD

2,2)

CCVD

2,2)

DCVD . EEDVD , FFDVD , GGDVD , HHDVD

DCVD,EEDVD,FFDVD,GGDVD,HHDVD

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 040, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C: NUVI = 6 NUVI = 6

C * * * t * WRITE (NUVI , 40 0)

400 FORMAT ( 1 H 1

, 1 X , 2 7H AR F D V - (040) D.P

-16H ASA REF. - 6 . 1 / / 2 X , 7 H R E S U L T S ) C***** HEADER FOR SEGMENT 040 WRITTEN

ACVD = 1 . ODO

BCVD = 20.0D-1

CCVD = .102

DCVD = -10.0

AC1 D( 1 )= 0.0

CC3D( 1 , 2

DIVISION//

2) = -.004D3

CC3D(1,1,2) = . 2441 40625D-3

HHDVD = BCVD/ACVD

CC3D(3,1,2) = .12500

GGDVD = DCVD/DCVD/ACVD

FFDVD = ACIDd )/eCVD/ACVD/i.D07l .DO

EEDVD = DCVD/BCVD/(-5.0E0)/ACVD/ACVD

BC2D(4,4) : CC3D(1 ,2,2)/BCVD/DCVD/.002D2

BC2D(4,3) = CC3D(1,1,2) / CC3D(3,1,2)

HHDVD = HHDVD - 2. ODO

GGDVD = GGDVD - 1 . ODO

EEDVD = EEDVD - 1 . ODO

BC2D(4,4) = BC2D(4,4)

BC2D(4,3) = BC2D(4, 3)

401

C

« * * *

«

C * * * * * c * * * * * c * « * * * c=c=

1 .ODO

195.3125D-5

WRITE (NUVI, 401) HHD VD , GGD VD , F F D VD , E E DVD , B C2 D ( 4 , 4 ) , BC2D(4,3)

FORMAT (//6(D22.10/)//35H THE ANSWERS ABOVE SHOULD BE 0 FOR/

31H THIS SEGMENT TO BE SUCCESSFUL)

END OF TEST SEGMENT 040

WHEN EXECUTING ONLY SEGMENT 040, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

STOP

END

STOP

END

c * * * * « C'*'*'*"«« ARBEX - (04 1 ) C * * * «

t

c * * * * * C * G E NEPAL P U R P 0 S E ASA REF

C***** TEST THAT EXPRESSIONS INVOLVING INTEGER AND REAL 6.1

P0400070

P04000&0

P0400090

P04001 00

P 0 4 0 0 1 1 0 P04001 20

P0400130

P0400 1 40

P001 0960

P001 0965

P001 0970

P001 0975

P001 0980

P001 0985

P001 0990

P040A1

P040A2

P001 0995

P0 40 0 1 5 0 P0070720

P0070725

P0070730

P0070735

P0070740

P040B1

P0070745

P0400 1 60

P04001 70

P04001 80

P0400 1 90

PO 40 02 00

P 0 40 02 1 0 P0400220

P0400230

P0400240

P0400250

P0400260

P0400270

P0400280

P0400290

P 0 4 0 0 3 0 0 P 0 40 03 1 0 P0400320

P0400330

P0400340

P0400350

P0400360

P0400370

P0400380

P0400390

P 0 4 0 0 4 0 0 P 0 4 0 0 4 1 0 P0400420

P0400430

P0400440

P0400450

P0400460

P0400470

P040C1

P040C2

P0 4 1 00 1 0 P041 0020

P041 0030

P0 4 1 0 0 40

P 0 4 1 0 0 5 0 P041 0060

P 0 4 1 0 0 7 0 P041 0080

56 NBS FORTRAN Test Programs Version 1
Z**tt* EXPONENTIATION HAY BE FORMED

C*t*** GENERAL COMMENTS

P041 0090

P041 01 00

C*t««* THE FOLLOWING TESTS ARE MADE - C***»* INTEGER BY INTEGER GIVING INTEGER 6.1

P04 1 0 1 1 0 P0410120

Ct«*«t REAL (SP) BY INTEGER GIVING REAL (SP)

C««*** REAL (SP) BY REAL (SP) GIVING REAL (SP)

P04 1 0 1 30

P04 1 0 1 40

C**»** RESTRICTIONS OBSERVED

c * * * * *

P 0 4 1 0 1 5 0 P0410160

C***«« SPECIFICATIONS SEGMENT 041

C t * « «

P041 01 70

P00 1 1 00 0 C«*«t. WHEN EXECUTING ONLY SEGMENT 041, THE SPECIFICATION STATEMENTS

C***** WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS

P001 1 005

P001 1 01 0 C* * * * * 1 AND 2 REMOVED . c * * « * *

P 0 0 1 1 0 1 5 P0 0 1 1 02 0 C= DIMENSION A2S(2 .2) . IAC1 I ( 5 ) . IAC2I (2. 7) , AC1S(25)

DIMENSION A2S(2,2),IAC1I(5),IAC2I(2,7).AC1S(25)

P001 1 025

P041 A1

c * * * * * C***** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P 0 0 1 1 03 0 P0410180

c * * * * * C***** WHEN EXECUTING ONLY SEGMENT 041, THE FOLLOWING STATEMENT

P0070750

P0070755

Ct**** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2

c * * * * * REMOVED. P0070760

P0070765

C= NUVI = 6 NUVI = 6 P0070770

P041 B1

c * * * * * WRITE (NUVI, 410)

P0070775

P041 01 90

410 FORMAT ( 1 H 1 , 1 X , 3 4HAR BEX - (041) BASIC EXPONENTIATION//

- 2X,15HASA REFS. - 6.1//2X, 7HRESULTS)

P041 0200

P0410210

C***** HEADER FOR SEGMENT 041 WRITTEN

WRITE (NUVI ,411)

P041 0220

P041 0230

411 FORMAT ( / /2X, 1 8HI NTEGER BY INTEGER)

JACVI =1 P041 0240P041 0250

KBCVI =0

LCCVI =2

P041 0260

P041 0270

MDCVI =-1

IAC1 1(2) = 3 P041 0280

P041 0290

IAC2I (1,4) = 3 IHDVI = LCCVI * I AC1 I (2

)

P041 0300

P041 031

0

IGDVI=KBCVI * JACVI

I FDVI = JACVI * *KBCVI

P04 1 0320

P0 4 1 0330

lEDVI = MDCVI * * IAC1 I (2)

IDDVI=(LCCVI**LCCVI)** (JACVI **MDCVI)

P 0 4 1 0 3 40

P041 0350

IAC2I(1.2) = (LCCVI**IAC2I(1 ,4))**JACVI

IHDVI = IHDVI - 8 P041 0360P041 0370

IFDVI = IFDVI - 1 lEDVI = lEDVI + 1 P0 4 1 0 3 8 0 P041 0390

IDDVI = IDDVI- 4 IAC2I (1 ,2) = IAC2I (1 ,2) - 8 P041 0400

P041 041

0

WRITE (NUVI, 412) IHDVI, IGDVI, IFDVI, lEDVI, IAC2I(1,2)

41Z FORMAT (//6(I10/))

P041 0420

P041 0430

WRITE (NUVI, 413)

413 FORMAT ( / / 2X , 2 5 HRE AL BY INT, REAL BY REAL)

P04 1 0440

P0 4 1 0 4 5 0 ACVS= 1 .

0

BCVS=0 .

0

P04 1 0460

P0 4 1 0 470

CCVS^O . 5E0

DCVS = 20.0E-1

P0 4 1 0 4 8 0 P041 0490

ACISd ) = 1 .21E0

A2S( 1 , 1 ) = 300.E-2

P0 4 1 0 5 0 0 P0410510

HHDVS = ACVS* * JACVI

GGDVS=BCVS** JACVI

P041 0520

P04 1 0 5 3 0 FFDVS = DCVS* * I AC1 1(2)

EEDVS = ACVS* *ACVS

P041 0540

P041 0550

DDDVS=AC1S(1 )**CCVS

CCDVS=(DCVS**1 )**(2.0**ACVS)

P04 1 0 5 60

P0 4 1 0 5 70

A2S(2,1) = (A2S(1 , 1 )**DCVS)**BCVS

HHDVS = HHDVS -1.0

P0 4 1 0 5 8 0 P0 4 1 0 5 90

FFDVS : FFDVS - 8.0

EEDVS = EEDVS -1.0

P041 0600

P041 061

0

NBS FORTRAN Test Programs Version 1 57
DDDVS = DDDVS - 1.1 PO^I 0620

CCDVS = CCDVS - 4.0 P0410630

A2S(2,1) = A2S(2,1) - 1.0 P0 4 1 0640

WRITE (NUVI,414) HHOVS, GGDVS, FFOVS, EEDVS, DDDVS, C CDVS , A2S ( 2

, 1 ) P 0 4 1 0 6 5 0 4U FORMAT ( / / 7 ( F 1 1 . 1 / ) / / 3 5 H ALL ABOVE ANSWERS SHOULD BE 0 FOR/ P04 1 0660

12X, 29HTHIS SEGMENT TO BE SUCCESSFUL) P0410670

C**«*« END OF TEST SEGMENT 041 P0410680

C***** WHEN EXECUTING ONLY SEGMENT 041, THE STOP AND END CARDS P0410690

C*T*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0 4 1 0 700

C***** 1 AND 2 REMOVED. P0410710

C= STOP P0 4 1 0 72 0 C= END P0410730

STOP P041C1

END P0.41 C2; C*************t*********t*******t ilr** ********************ik*******»***P0420010

C**t** P0420020

C* * *'*"* ARFEX - ( 0 42 ) P0 42 0 03 0 CVV*,V* P0 42 0 0 4 0 C*****it**«**it«*t*tttt**t******««:**t******t*t*t*t*t**tt***«*«**4;«*****t«««P0420050

C***** GENERAL PURPOSE ASA REFP0420060

C*'**T* TEST EXPONENTIATION OF DOUBLE PRECISION ITEMS 6.'l P 0 42 0 0 70

C**«** THE FOLLOWING TYPES OF DP EXPONENTIATION ARE TESTED - P0420080

C***** DP BY REAL GIVING DP P0 42 0 0 90

C*t*** REAL BY DP GIVING DP P0420100

C*'«*** DP BY DP GIVING DP P0 42 0 1 1 0 C***** GENERAL COMMENTS P0420120

C»«*** * DP ADDITION AND SUBTRACTION ASSUMED WORKING. P0 42 0 1 3 0 Ct«**« » VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0420140

C***** VARIETY OF COMBINATIONS. P0420150

C***** RESTRICTION OBSERVED P0420160

C***** NEGATIVE VALUED ITEMS ARE NEVER RAISED TO A REAL OR 6', 4 / 1 2 P 0 4 2 0 1 7 0 C*t««* DP EXPONENT P0420180

C * * P 0 4 2 0 1 9 0 C*t*t« SPECIFICATIONS SEGMENT 042 P0420200

C **'*** POO 1 1 040

C**t.« WHEN EXECUTING ONLY SEGMENT 042, THE SPECIFICATION STATEMENTS P0011045

C***«* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS P0011050

C***** 1 AND . 2 REMOVED. P 0 0 1 1 0 5 5 C* * * * * POO 1 1060

C= DOUBLE PRECISION A C VD , B C VD , C CVD , E E DVD , F F D VD , GGD VD , HHDVD P0011065

C= DOUBLE PRECISION AC 1 D ( 1 0 ) , B C2D ( 7 , 4 ) , C C3D ( 7 , 2 , 2 ) P0 0 1 1 0 70

DOUBLE PRECISION A C VD , B C VD , C C VD , E E D VD , F F D VD , G G D VD , H HD VD P042A1

DOUBLE PRECI S ION AC1 D( 1 0 ) , BC2D( 7 , 4) , CC3D( 7, 2 , 2 ) P0 42A2

C***** P0011075

C**»»« 0 U T PUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0420210

C « P0070780

C** *** WHEN EXECUTING ONLY SEGMENT 042, THE FOLLOWING STATEMENT P0070785

C**«** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070790

C**«»« POO 70 79 5 C= NUVI = 6 P0070800

C***t* P0070805

WRITE (NUVI . 420 ) P0420220

420 FORMAT ( 1 H 1 , 1 X , 2 8H AR FEX - (042) EXPONENTIATION// P0420230

-i6H ASA REF . - 6 . 1 / /2X , 7HRESULTS ) P0 42 02 40

C**»t« HEADER FOR SEGMENT 042 WRITTEN P0420250

CVtVt* DEFINE VARIABLES AND ARRAY ELEMENTS P0 42 0 260

ACVS=1.0 P0420270

B CVS = 0.0 PO 42 02 8 0 CCVS=0.5 P0420290

OCVS = 20.0E-1 P042 03 0 0 ACVD = 1 . ODD P0 42 0 3 1 0 BCVD = 80 . OD-'l P0420320

CCVD = 0.0 P0420330

AC1D( 1) = f. b P0 42 0 3 4 0 BC2D( 2,4 ) = 3000. D-3 P0 42 03 5 0 HHDVD = ACVD**BCVS P0420360

GGDVD = ACVS**ACVD P0420370

58 NBS FORTRAN Test Programs Version 1
FFOVO = AC 1 D ( 1

) * * B CVD P0420380

EEDVD = ( D CVS » * ACVD ) * * ( 2 . ODO * * ACvS

)

P0420390

CC3D(5,1,2) = B C2D ( 2 , 4 ) « * ( D CVS * * B CVS

)

P0420400

HHDVD = HHDVD -1.000 ^^A/^A / "IA P 0 4 2 0 4 1 0 GGDVD = GGDVD - 1.000 P0420420

F FDVD = F FDVD - 1.000 P0420430

EEDVD = EEOVD - 4 . ODO f~iA/"lA / / A P0420440

CC3D(5,1,2) = CC3D(5,1,2) - 3. ODO HA / "lA / CA P0420450

WRITE (NUVI,421) HHDVD, GGDVD, FFDVD, EEDVD, CC3D(5,i,Z) nA / TA / Z.A P0420460

4Z 1 FORMAT (//5(D22.10/)//35H THE ANSWERS ABOVE SHOULD BE 0 FOR/ P0420470

1 32H THIS SEGMENT TO BE S U C C E S S F U L . / 3 6 H VALUES WITH EXPONENTS LEP0 42 0 4 80

2SS THAN /31H 10**(-U) ARE CONS I DERED ZERO) P0420490

Q Ik if Jr if END OF TEST SEGMENT 042 P0420500

Q A if A t Ik WHEN EXECUTING ONLY SEGMENT 042, THE STOP AND END CARDS P04205 1

0

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0420520

P * * * * * ^ 11 W W K iT 1 AND 2 REMOVED. P0420530

r - STOP P0420540

L - END P0420550

STOP P042C1

END P042C2

Ik # ****«**ll;***tit**«**t*t**ir*il;<tlt**«r ir** *tt*****««: «:** *«*********P0430010

r^ 4H *H *W *K *K P1 *X *w *K *K *11 ADDUI _ (043)

Q * * A * Ik Q * t * ft * ftftft*ftft*****ft*ftft*ftft*ftft*ftftftftftftft*ft**ft*ftftftftft**ft*ft**ft*ft*****ft*ftftftftft ftftftftPflA^OOSO

Q * * * Ik t RFF 9 0 L^O 0 hO

Q * * * t * TCCTC THAT HIPRARPHY OF nPFRATflR^^ AND PARFNTHF^F^ f\ i / n 7 P Ci 0 0 7 C\ ^ * * * * * ARE HANDLED CORRECTLY. OPERATORS SHOULD FOLLOW P0430080

Q Ik Ik ft t t THIS ORDER - ** (EXPONENTIATION) 6. 4/41P0430090

Q ft ft ft ft ft * AND / (MULTIPLICATION, DIVISION) P0 43 0 1 00

^ ft ft ft ft ft + AND - (ADDITION, SUBTRACTION) P0 43 0 1 1 0

^ ft ft ft ft ft GENERAL COMMENTS P0430120

Q ft ft ft ft ft * ONLY INTEGER EXPRESSIONS ARE USED SINCE THIS TEST IS P0430130

Q ft ft ft ft ft CONCENTRATING ON OPERATORS AND PARENTHESES P04301 40

r ft ft * ft * * ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION. 6. 4/49P04301 50

r^ *X *X *X *X *X EXPONENTIATION ASSUMED TO FOLLOW LAWS OF P0430160

^ x X K X X ASSOCIATION AND COMMUTATION UNLESS PARENTHESES P04301 70

r^ *X *X *X *X *X REGROUP EXPRESSIONS P04301 80

Q ft ft ft ft ft » INTEGER DIVISION MUST BE EVALUATED FROM LEFT TO 6. 4/56P0430190

Q ft ft ft ft ft RIGHT P0430200

Q ft ft ft ft ft RESTRICTIONS OBSERVED P0430210

^ X X X X x * ALL ELEMENTS EVALUATED ARE MATHEMATICALLY DEFINED 6. 4/16P0430220

p * * * * * ^ X if X K « * NO NEGATIVE VALUES ARE RAISED TO A REAL 6. 4/ 1 2P0 43 023 0

Q ft ft ft ft ft EXPONENT P0430240

^ X X X X X * NO ZERO VALUED PRIMARY IS RAISED TO A ZERO 6. 4/ 1 4P0430250

X X X X X VALUED EXPONENT P0430260

Q ft ft ft ft ft P0430270

P * * * * * ^ X X X X X SPECIFICATIONS SEGMENT 043 P0430280

Q ft ft ft ft ft P 0 0 1 1 08 0

Q ft ft ft ft ft WHEN EXECUTING ONLY SEGMENT 043, THE SPECIFICATION STATEMENTS P0011085

Q ft ft ft ft ft WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS P0 0 1 1 090

c ft ft ft ft ft 1 AND 2 REMOVED. P001 1095

C ft ft ft ft ft P0011100

C- DIMENSION I AC1 I ( 5 ) , I AC2I (2 , 7) P001 1 105

DIMENSION I AC1 I ( 5) , IAC2I (2 , 7) P043A1

c * * * * * P001 1 1 1

0

c « * * *

«

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0430290

c * « * »P007081

0

c * « * «

«

WHEN EXECUTING ONLY SEGMENT 043, THE FOLLOWING STATEMENT P0 0 70 8 1 5 c « * * «

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070820

c * * * * * P0070825

c= NUVI = 6 P0070830

NUVI = 6 P043B1

c « « «

P0070835

WRITE (NUVI, 430 ) P0430300

430 FORMAT ( 1 HI , IX, 36HARBHI - ( 043 ) HIERARCHY. PARE NTHE SE S / / 2X

,

P0430310

1 23HASA REFS . - 6.1 AND 6.4// P0430320

2 2X. 7HRESULTS) P0430330

NBS FORTRAN Test Programs Version 1 59
JACVI = 1 KBCVI = 2 P0430340

P0430350

L C CV I = - 5 MDCVI = 0 P0430360

P0430370

NE CV I = 36

IAC1 1(2) = 10

P0430380

P0430390

Ct*tt* TEST THAT ADDITION IS COMMUTATIVE (TEST 1)

MRRVI = 1 P0430400

P043041

0

IHDVI = JACVI KBCVI

IGDVI = KBCVI + JACVI

P0430420

P0430430

IFDVI = IHDVI - IGDVI

WRITE (NUVI,431) MRRVI. IFDVI

P0430440

P0430450

C*««** TEST THAT MULTIPLICATION IS COMMUTATIVE (TEST 2)

MRRVI = 2 P0430460

P0430470

IHDVI = JACVI * KBCVI

IGDVI = KBCVI * JACVI

P0430480

P0430490

IFDVI = IHDVI - IGDVI

WRITE (NUVI,431) MRRVI, IFDVI

P0430500

P043051

0

C** *** TEST THAT SUBTRACTION IS COMMUTATIVE (TEST 3)

MRRVI = 3 P0430520P0430530

IHDVI = KBCVI - JACVI

IGDVI = -JACVI + KBCVI

P0430540

P0430550

IFDVI = IHDVI - IGDVI

WRITE (NUVI,431) MRRVI, IFDVI

P0430560

P0430570

C** *»* TEST THAT ADDITION IS ASSOCIATIVE (TEST 4)

MRRVI = 4 P0430580

P0430590

IHDVI : (lACIKZ) + JACVI) + KBCVI

IGDVI = IAC1 1(2) + (JACVI + KBCVI

)

P0430600

P043061

0

IFDVI = IHDVI - IGDVI

WRITE (NUVI,431) MRRVI, IFDVI

P0430620

P0430630

C«***» TEST THAT MULTIPLICATION IS ASSOCIATIVE (TEST 5)

MRRVI = 5 P0430640P0430650

IHDVI : (IAC1I(2) * LCCVI) • KBCVI

IGDVI = IAC1 1(2) • (LCCVI t KBCVI ) P0430660P0430670

IFDVI = IHDVI - IGDVI

WRITE (NUVI,431) MRRVI, IFDVI

P0430680

P0430690

c * * c**

*** TEST THAT MULTIPLICATION IS DONE BEFORE ADDITION

*** OR SUBTRACTION (TEST 6). ANSWER SHOULD BE ZERO

P0430700

P0 43 0 7 1 0 MRRVI = 6 IHDVI = JACVI + KBCVI « LCCVI - 1 + lACIKZ)

OA / 7ATTA P0430720

P0430730

WRITE (NUVI,431) MRRVI, IHDVI

C***** REGROUP TEST 6 EXPRESSION (SLIGHTLY CHANGED) WITH

OA/7AT/A P0430740

P0430750

C * * *** PARENTHESES. ANSWERS SHOULD BE NON-ZERO (TEST7).

MRRVI = 7 P0430/60P0430770

IGDVI = (JACVI + KBCVI) t LCCVI + 9 IFDVI = JACVI * KBCVI * (LCCVI + 9)

P0430780

P0430790

lEDVI : (JACVI + KBCVI) * (LCCVI + 9)

IAC1I ( 1 ) = IGDVI + 6

OA/7A0AA P0430800

P0 43 0 8 1 0 IAC1 1(3) = IFDVI - 9 IAC1 1(4) = lEDVI - 12

P04308Z0

P0430830

c*»

WRITE (NUVI,432 ) MRRVI, lACIKD, IAC1I(3), IAC1I(4)

*** TEST THAT DIVISION IS DONE BEFORE ADDITION

P0430840

P0430850

c * * *** AND SUBTRACTION (TEST 8). ANSWER SHOULD BE ZERO.

MRRVI = 8

OA / 7A0^A P0430860

P0430870

LCCVI : - 6 IAC1 1(2) = 12

OA / 7A00A P0430880

P0430890

IHDVI = LCCVI + IAC1I(2) / KBCVI - LCCVI - 6 WRITE (NUVI.431) MRRVI, IHDVI

OA / 7AOAA P0430900

P0 43 09 1 0 C***** REGROUP TEST I EXPRESSION WITH PARENTHESES (TEST 9),

C***t* ANSWER SHOULD BE ZERO, OTHERS NON-ZERO.

. SECOND OA / 7AOTA P0430920

P0430930

MRRVI = 9 IGDVI (LCCVI + IAC1I(2)) / KBCVI - LCCVI - 6

OA / 7AO / A P0430940

P0430950

IFDVI = LCCVI + lACIKZ) / (KBCVI - LCCVI - 6)

lEDVI = (LCCVI + lACIKZ)) / (KBCVI - LCCVI - 6)

P0430960

P0430970

I AC1 I ( 1 ) = I GDVI - 3 IAC1 1(4) = lEDVI - 3

OA/7AO0A P0430980

P0430990

C**

WRITE (NUVI,432 ) MRRVI, lACIKD. IAC1I(3), IAC1I(4)

*** TEST THAT EXPONENTIATION IS DONE BEFORE

OA/T1AAA P 0 4 3 1 0 0 0 P0431010

60 NBS FORTRAN Test Programs Version 1
C*t»*t ANY OTHER OPERATION (TEST 10). ANSWERS SHOULD P0431020

C***** BE ZERO. P0431030

MRRVI = 10 '. P043 1 04b

IHDVI = KBCVI 3 ** 2 - 11 P0431050

IGDVI = IAC1I(2) * KBCVI ** 3 - 96 P0431060

IFDVI = NECVI / LCCVI * KBCVI - 1 P0431070

WRITE (NUVI,432) MRRVI, IHDVI. IGDVI. IFDVI P0431080

C*t«t* REGROUP TEST 10 EXPRESSIONS WITH PARENTHESES (TEST 11) P0431090

C*'«'*«* ANSWERS SHOULD BE NON-ZERO ' P043 1 1 0 0 MRRVI = 11 P0431110

IHDVi = (KBCVI + 3) ** 2 - ii P0431120

IGDVI = (lACIKZ) * KBCVI) ** 3 - 80 P0 43 1 1 3 0 IFDVI = (NECVi / LCCVI) * KBCVI - i P0 431140

IAC1 1(1) = IHDVI - 1 4 P0 43 1 1 5 0

'"" lACI 1(3) '= IGDVI - 1 3744 P043 1 1 6() IAC1 1(4) = IFDVI - 35 P0431170

WRITE (NUVI,432 ) MRRVI, lACIKI), IACH(3). IAC1I(4) ' P043 1 U0

C*t*«t THE FOLLOWING STATEMENTS INCLUDE AN ADDITIONAL TEST P0431190

C**Tt«' OF OPERATOR HIERARCHY. A VARIETY OF OPERATORS IS USED P0431200

C*«*** BOTH VARIABLES AND ARRAY ELEMENTS ARE USED. ALL P0431210

C***** ANSWERS SHOULD BE ZERO (TEST 12). P043 1 226

MRRVI = 12 P0431230

LCCVI = -5 P0431240

IAC1 I (2) = 10 P0431250 —^^^^

- y;^zyuKB^y\*^ttyl-\kt^llz)/z-lAtVliz)'/^/'i*'i^ P043126O

IDDVI = KBCVI**3*4 + 1 62 / ( 3 * * ( KB CV I * 2 ) ) + MDCVI-34 P0 43 1 2 70

IHDVI = KBCVI ( JACVI + KBCVI * ( I AC1 I (2 ) - KBCVI ) ) - 34 P0 43 1 2 8 0 IGDVI = I AC1 I (2 ) /KBCVI + 70/ ( LCCVI * (KBCVI • *2 + 3 ) )-3 P0 43 1 290

IFDVI = K B CV I * ( K B C V I + I A C 11 ( 2 ) * ( K B CV I + 3 * ( J A CV I + K B CV I ) ) ) -2'2 4 PO 4 3 1 3 0 0 lACIKD = KBCVI*(KBCVI+KBCVI*(KBCVI+KBCVI*(KBCVI+KBCVI* P043 1 3 1 0 •'-(KBCVI +KBCVI ))) ) - 92 P0 43 1 320

IAC2I(1,4) = lACl I (2)+LCCVI+JACVI+KBCVI+KBCVI-JACVI-9 P0431330

IAC2 I (1,2) = I AC1 1(2) / ( LCCVI + JACVI + KBCVI ) (KBCVI * * PO 43 1 340

1 (KBCVI -JACVl ) )+1 0 P0431350

WRITE (NUVI, 433 ) MRRVI, lEDVI, IDDVI, IHDVI, IGDVI, IFDVI. P0 43 1 360

1 I AC1 I ( 1) , I AC2 I ( 1

, 4) . I AC2 I ( 1 . 2 ) P0431370

t'ttiTi EVArUAtlON MA'Y PROCEED ACCORDING TO ANY VALID FORMAT I ON SEQUENCE P 0 43 1 3 8 0 C*t*t* EVALUATION OF INTEGER TERM CONTAINING DIVISION P0431390

MRRVI = 13 P0 43 1 400

NECVI = 7 P0431410

KBCVI "=" 2 P0 43 1 42 0 LCCVI = 4 P0431 430

IGDVi = NECVi /KBCVI * LCCVI P0431440

IFDVI = LCCVI * NECVI / KBCVI P0431450

lACIKI) = IGDVI - 12 . , .

.

' P0 43 1 460

IAC1I(2) = IFDVI - 14 - P0 43 U70

WRITE (NUVI,43 4 ) M R R V I , I A C 1 K 1 ) , IACir('2) P0 43 1 486

Ct**** FORMAT STATEMENTS FOR THIS SEGMENT P0431490

431 FORMAT ( /2X,4HTEST, 14, 16) P0 43 1 5 00

432 F0RMAT(/2X, 4HTEST, 14, 16/ 116/ 116) P0431510

433

""' FORMAT ( /2X. 4HTE ST , I 4 . I 6 / 6 ( I 1 6 / ) , I 1 6 ) P0 43 1 5 2 0 434 F0RMAT(/2X.4HTEST, 14, I6/I16/2X.35H THE ANSWERS ABOVE SHOULD BE 0 P0431530

iF0R/31H THIS SEGMENT TO BE SUCCESSFUL) P0 43 1 5 40

C*««** END OF TEST SEGMENT 043 P0431550

t**t*t WHEN EXECUTING ONLY SEGMENT 043, THE StOP A^ND 'END ' CARDS P043 1 5 60

Ct«»«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0431570

C**'**'* 1 AND 2 REMOVED. P0 43 1 5 8 0 C= STOP P0431590

C= END PO 43 1 60 0 STOP P043C1

END P0 43 C2

C***************t*t******«******t********t*******t tt«** itt*«t**t*t***tP0500010

Ci *'*'« t * PO 5 0 0 02 0 C****** SBB67 - (050) P0500030

C * *

'» '* "* '* P 0 5 0 0 0 4 () C*t**********««« «** «*«***« ««** *«*****«**t*t««*******«**«««»«t«t«P0500050

C * * « * » * G E N E R A L PL) R P 0 S E ASA RE F P 0 5 0 0 0 6

0

C«*«*«* TEST FORMATION OF SUBSCRIPTS FOR INTEGER 5 . 1 . 3 . 3 P 0 5 0 0 0 70

NBS FORTRAN Test Programs Version 1 61
c * * c « «

c * «

«

c * «

c * «

«

c * * * c « * * c * * * c=

c=

c=

* *

* t

t *

* *

* *

AND SINGLE PRECISION ARRAYS IN FORM V.K FORMS

S P E C i F I C A t I 0 N S SEGMENT 0 5 0 WHEN EXECUTING ONLY SEGMENT 050, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

DIMENSION A3S(3,3,3)

DIMENSION IAC1I(5),IAC2I(2,7),AC1S(25),AC2S(5,6)

INTEGER MCA3I (2.3,3)

DIMENSION A3S(3.3.3)

DIMENSION I AC1 I ( 5) , IAC2I(2. 7) , AC1 S(25 )

, AC2S( 5 , 6)

INTEGER MCA3I (2,3,3)

C * «

C t «

t

c * * *

c * * *

c * *

c * * c=

* *

* «

* *

* t

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

WHEN EXECUTING ONLY SEGMENT 050, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 NUVI = 6

C * * « * *

501

WRITE (NUVI, 501)

FORMAT ( 1 HI , IX, 36HSBB67

16X,21HAND REAL ARRAYS,

•7HRESULTS)

I AC1 I ( 5 ) = 3

I A C 2 I ( 1 , 3 ) = 4 MCA3I (2,2,1) = -7

AC1S(20)=1 .0 AC2S(4, 1 )=-2. 1E1

(050) SUBSCRIPTS FOR INTEGER/

K/ /2X, 1 4HASA REF . 5 . 1 . 3/ /2X,

502

504

A3S(1 .2.2) = -22.0

JACVI = IAC1I(5) + IAC2I(1.3)

HHCVS = AC1S(20) - AC2S( 4.1)

WRITE (NUVI, 502) JACVI, HHCVS

FORMAT (// I9//F11.1)

JACVI =1 ACVS=1 .

0

IAC1 I (JACVI )=10

IAC2I (JACVI ,3)::12

IAC2I (2, JACVI )=-6

MCA3 I (JACVI , JACVI , 3) = -1 MCA3I (2, JACVI , JACVI ) = -1 MCA3 I (JACVI . 3 , JACVI ) = -2

AC1S( JACVI )=ACVS

AC2S( JACVI ,2) = 3.0

AC2S(5, JACVI )=60.0E-1

A3S( JACVI , JACVI .3)

A3S(2 , JACVI , JACVI

)

A3S( JACVI , 3 , JACVI

)

NECVI = lACIKD - MCA3I (2,

1

MCA3I (2

A3S( 1 , 2 2,1)2)

1 ) + MCA3 I ( 1 , 1 , 3) +

MDCVI =

HHCVS =

508

C t «

»

C t «

C t t c * »

= +1.0

: +1.0

= +0.0

IAC2I(1.3) - IAC2I(2

1) + MC A3 I (1.3.1)

lACIKJACVI) - I AC2 I ( JACVI , 3 ) - I AC2 I ( 2 , JACV I ) + MCA3 I ( JACVI , JACVI , 3) + M C A3 I ( 2 , J A C V I , J A C V I ) + MCA3 I ( JACVI , 3 , JACVI

)

ACIS(l) + AC2S(1.2) - AC2S(5.1) + A3S(1,1,3) + A3S(2.

A3S( 1 , 3 , 1 ) ACIS(JACVI) + AC2S( JACVI .2) - AC2S ( 5 , J ACV 1 ) + A3S( JACVI , JACVI ,3) + A3 S ( 2 . J A C V I , J A C V I ) + A3S( JACVI , 3 , JACVI

)

WRITE (NUVI, 508) NECVI. MDCVI. HHCVS, GGDVS

FORMAT (// 2(19/) / 2(F11.1/) / 35H THE ANSWERS ABOVE SHOULD

F0R/31H THIS SEGMENT TO BE SUCCESSFUL)

END OF TEST SEGMENT 050

WHEN EXECUTING ONLY SEGMENT 050, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

1,1)

GGDVS

BE

P0500080

P0500090

P0500100

P001 1 120

P001 1 1 25

P001 1130

P 0 0 1 1 1 3 5 P001 1 140

POOH 145

POO 1 1 1 50

P 0 0 1 1 1 5 5 P050A1

P 0 5 0A2

P050A3

POO 1 1 1 60

P 0 5 0 0 1 1 0 P0070240

P0070845

P0070850

P0070855

P0070860

P050B1

P 0 0 7 0 8 6 5 P0 5 0 0 1 2 0 P0500130

P 0 5 0 0 U0

P 0 5 0 0 1 5 0 P0500 1 60

P0500 1 70

P05001 80

P05001 90

P0500200

P0500210

P0500220

P0500230

P0500240

P0500250

P0500260

P0500270

P0500280

P 0 5 0 0 2 9 0 P0500300

P0 5 0 0 3 1 0 P0500320

P0500330

P0500340

P0500350

P0500360

P0500370

P0500380

PO 5 0 03 90

P0500400

P 0 5 0 0 4 1 0 P0500420

P0500430

P0500440

P 0 5 0 0 4 5 0 P0500460

P0500470

P0500480

P0500490

P0500500

0P0 5 0 0 5 1 0 P0500520

P0500530

P0500540

P0500550

P0500560

62 NBS FORTRAN Test Programs Version 1
C= STOP P0500570

C= END PO500580

STOP P0 5 0 C1 END P0 5 0 C2

Q*******««:**<[**t*«t«;******t*t***t*tt*t*t*****t*****lrtlrt«****t*>***«r«r**tt*P0510010

C****** P0510020

C** i* * * S B B 4 5 - (o' '5 lT P 0 5 1 0 0 3 0

C ***** * PO 5 1 0 0 40

C****«*****«*****************«***t************«**t*«r******t t«;** t«i**«P0510050

C****** GENERAL PURPOSE ASA REFP0510060

CV » TEST FORMATION OF SUBSCRIPTS FOR INTEGER 5 . 1 . 3 . 3 P 0 5 1 0 0 7

0

C ** *** « AND SINGLE PRECISION ARRAYS I ,N FORM V +.K AN D.,,V,-,K P 0 5 1 0 0 8 0

C * * * * * P 0 5 1 0 0 9 0 C***«* SPECIFICATIONS SEGMENT 051 P0510100

C***** ' P001 1 1 70

C***** WHEN EXECUTING ONLY SEGMENT 051, THE SPECIFICATION STATEMENTS P0011175

C***** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS P0011180

C***«* 1 AND 2 REMOVED. P0011185

C***** ' P0011190

C= DIMENSION IAC1 I( 5 ) , IAC2I (2, 7) , AC1S(25) , AC2S(5 ,6) .A3S(3.3,3) P0011195

C= INTEGER MCA3I(2,3,3) PO0 11200

DIMENSION IAC1I(5),IAC2I{2.7),AC1S(25),AC2S(5,,6),A3S(3.3,3) P051A1

INTEGER MCA3I (2,3,3) "

' P051A2

C***** P001 1205

C * * * *« 0 U T P U T T A P E AS S ^G N ME N f g jATE ME nT! NO I'N PUT TAPE '! P 0 51 0110

C* * * * « P0 0 70 8 70

t'*"*"**'* WHEN EXECUTI NG ONLY SEGMENT 05 l'. THE FOLLdwrNG STATEMENT P00 70 8 7 5 C * « * * N u V I = 6 M y S T Ji, Ay E THE C = I N C 0 L U M N S 1 AND 2 R E H 0 V E D , P 0 0 70 8 80, C * *'*'*'* P0070 8 8 5 C= NUVI = 6 P0070890

NUVI = 6 P051B1

C* * * * * P00 70 89 5 WR I TE (,,,uvi;5fi-) PO 51012 0 511 FORMAT (1H1 ,1X,36HSBB4 5 - ( 05 1 ) SUBSCRIPTS FOR INTEGER/ P0510130

-16X,24HAND REAL ARR A Y S . V + K . V- K / / 2X . 1 6HAS A REF. 5.1 .3.3/72X, P0510140

-7HRESULTS) P0510150

JACVI=4 P0510166

IAC1 I( JACVI+1 )=1 P0510170

IAC1 I ( JACVI-1 )=2 P0510180

IAC2I( JACVI-2,1 )=3 P0510190

IAC2I ( JACVI-2,2)=4 P0510200

IAC2 I (2 , JACVI + 3 )=5 P0510210

IAC2I(1 , JACVI-0)=-3 P0510220

AC1S( JACVI+1 )=1 .0 P0510230

AC1S( JACVI-1 )=2.0 P0510240

AC2S( JACVI+0, 1 )=3.0 P0510250

AC2S ( JACVI - 2 , 2 ) = 4 . 0 PO 5 1 0260

AC2S(2 , JACVI + 2 ):5.0 P0510270

AC2S( 1 , JACVI-0) = -3.0E0 P0510280

NECVI=IAC1I(5)+IAC1I(3)+IAC2I(2.1)+IAC2I(2.2) P0510290

-+IAC2I(2.7)+IAC2I(1 ,4)-12 P0 5 10300

KBCVI = IAC1 I (JACVI+1 ) + IAC1 I ( JACVI -1 ) I AC2 I( JACV I -2 , 1) + P0510310

1 IAC2I ( JACVI-2,2) + IAC2I(1,JACVr-b) + I AC2 I ( 2 , J ACV I +3 ) - 12 PO 5 1 0 32

0

HHCVS = AC1S(5) + AC1S(3) + AC2S(4.1) + AC2S(2.2) + AC2S(2,6) P0510330

1 AC2S( 1 , 4) - 12.0 " P0 5 1 03 40

GGDVS = AC1S( JACVI + I ) + AC 1 S ( J ACV I - 1 ) * AC2S ( JACVI +0 . 1 ) P0 5 1 03 5 0

1 A C 2 S ( J A C V I - 2 , 2 ) + A C 2 S ( 2 , J A C V I + 2 ) + A C 2 S ( 1 . J A C V j -0 ) - 1 2 . 0 P 0 5 1 0 3 6 0 JACVI = 2 P0510370

MCA3 I ( JACVI , JACVI + 1 , 1 ) = 1 2 . P0 5 1 03 80

MCA3I (1 , JACVI+1 ,3) = -4 P0510390

MCA3I (1 ,2, JACVI+0) = +2 P0510406

MCA3 I ( JACVI -1 , 1 , JACVI -1 ) = -6 P0510410

MCA3I (JACVI , JACVI-0, 2) = 15 P0510420

MCA3 I ( 2 , JACVI -1 . JACVI -1 ) = -11 P0510430

MCA3 I ( JACVI - 0 , JACVI + 1 , JACVI + 0) = -8 P0 5 1 0440

- MCA3 I ( JACVI , JACVI + 1 , JACVI +1 ) = M CA3 I ( JACV I , J ACV I + 1 , 1 ) + P0510450

1 MCA3 I( 1 . JACVI + 1 . 3 ) + MCA3 I ( 1 . 2 , JACVI +0 ) + P0 5 1 0460'

2 MCA3 I ( JACVI -1 , 1 , JACVI -1 ) + M CA3 I ( J A C V I , J A C V I - 0 . 2 ) P0 5 1 0 4 70

NBS FORTRAN Test Programs Version 1 63
3 MCA3I (2. JACVI-1 . JACVI-1 ) HCA3 I ( JACVI -0 . JACVI + 1 . JACVI +0 ) P0510480

A3S( JACVI +1 , 1

, 1 ) = 12.0 P0510490

A3S ( 1 . JACVI + 1 , 3 ) = -4.0

A3S(1 ,2. JACVI+0) = +2.0

P0510500

P0510510

A3S( JACVI -1 . 1 , JACVI-1 > = -6.0

A3S( JACVI+1 . JACVI-0.2) = 15.0

P0510520

P0510530

A3S( 2 , JACVI -1 , JACVI -1 ) = -11.0

A3S(JACVI-0. JACVI+1 ,JACVI+0) = -8.0

P0 5 1 0 5 40

P0 5 1 0 5 5 0 A3S( JACVI + 1 , JACVI + 1 , JACVI + 1 ) = A3S ( JACV I + 1 , 1 , 1 )

1 A3S( 1 . JACVI + 1 ,3) + A3S( 1 , 2 . JACVI +0 ) + P05 1 0560P05 1 0570

2 A3S( JACVI - 1 , 1 , JACVI -1 ) + A3 S ( J A C V I + 1 , J A C V I - 0 , 2 ) + 3 A3S( 2 , JACVI -1 , JACVI -1 ) + A3 S ( J A C V I - 0 , J A C V I + 1 , J A C V I + 0 ) P0 5 1 0 5 80

P05 1 0590

WRITE (NUVI, 515) N E C V I , K B C V I , M C A3 I ( 2 , 3 , 3 )

, H H C VS , G G D VS , A3 S ( 3 . 3 515 FORMAT ( / / 3 ( I 9 / ) / 3 ( F 1 1 . 1 / ) / 3 5 H THE ANSWERS ABOVE SHOULD BE 0 ,3) P0 5 10600

F0R/P0 5 1 06 1 0

1 31H THIS SEGMENT TO BE SUCCESSFUL)

C*t*t* END OF TEST SEGMENT 051

P0 5 1 062 0 P0 5 1 063 0 C*««*« WHEN EXECUTING ONLY SEGMENT 051, THE STOP AND END CARDS

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

P0 5 1 0640

P0 5 1 06 5 0 C***** 1 AND 2 REMOVED.

C= STOP

P 0 5 1 0 6 6 0 P051 0670

C= END

STOP

P0510680

P051 CI END P051C2

Ct*«t******t«**t******«*******«*t**«********t********«*«***t tt** *****P0520010

c * * * * * C****« SBB13 - (052)

P0520020

P0520030

c * * « * *

* * * P0520040

* *P0 5 20 0 5 0 C»**** GENERAL PURPOSE ASA

C*«*»» TEST FORMATION OF SUBSCRIPTS FOR INTEGER 5. REFSP0520060

1 . 3 . 3P0 5 2 0 0 70

C***«» AND SINGLE PRECISION ARRAYS

C***** FORM C*V, C*V-K, C*V+K

FObdOOaO

P0520090

c * * * * C«*»*« SPECIFICATIONS SEGMENT 052

n f\ c r\ ^ AA r U J £ U 1 0 0

P 0 5 2 0 1 1 0

c * * * t * C**t*« WHEN EXECUTING ONLY SEGMENT 052, THE SPECIFICATION STATEMENTS

OAA1 191A r U U 1 1 d 1 0 P001 121 5 C****« WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

C***»* 1 AND 2 REMOVED.

P 0 0 1 1 Z Z 0 P001 1 225

c « * * *

«

C= DIMENSION I AC1 I ( 5 ) . I AC2 I ( 2 , 7) , AC1 S( 25 )

, A3S (3 , 3 , 3 ), AC2S( 5 , 6)

DAAI 1 97A r U U 1 \ L i \J P0 0 1 1 23 5 C= INTEGER MCA3I(2,3,3)

DIMENSION IAC1I(5),IAC2I(2,7),AC1S(25),A3S(3,3,3),AC2S(5,6)

POO 1 1 240

P052A1

INTEGER MCA3I (2,3,3)

c * * * * * P052A2

P001 1245

C***** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE,

c * * « * * P0520120

P0070900

C**t*« WHEN EXECUTING ONLY SEGMENT 052, THE FOLLOWING STATEMENT

C***** NUVI = 6 MUST HAVE THE C: IN COLUMNS 1 AND 2 REMOVED.

P0070905

P0070910

c * * «

C= NUVI = 6 P007091

5

P0070920

NUVI = 6

C * * * «

P05ZB1

P0070925

WRITE (NUVI, 520)

520 FORMAT ( 1 H 1 , 1 X , 3 6 H S B B 1 3 - ( 052 ) SUBSCRIPTS INTEGER AND/

P0520130

P05201 40

-16X,23HREAL, C*V, C*V-K, C • V+ K / / 2X , 1 6 H AS A REF. 5,1.3.3//2X,

-7HRESULTS)

P05201 50

P05201 60

JACVI =2

KACVI= 1 P05201 70

P05201 80

LCCVI = -2

IAC1 I (2* JACVI )=1

P05201 90

P0520200

IAC2 I ( 1 'JACVI . 1 )=2

IAC2I(1.3*KACVI)=3

PO 52 02 10

P0520220

AC1S(2* JACVI )=1 .0 AC2S( 1 * JACVI . 1 ) = 2 .

0

P0520230

P0520240

AC2S(3, 3*KACVI )=30.E-1

MDCVI = IAC1 I (2* JACV! ) + I AC2 I (

1 • JACV I

, 1 ) + I AC2 I ( 1 , 3 * KACV I )

•- 6 P0520250

P0520260

NECVI=IAC1 I (4) +IAC2I(2,1) +IAC2I(1,3) - 6 GGDVS - AC1S(2* JACVI ) + A C 2 S ( 1 J A C V I , 1 ) + AC2S ( 3 , 3 KACV I ) - 6 . 0 P0520270

P0520280

64 NBS FORTRAN Test Programs Version 1
HHCVS = AC1S(4) AC2S(2,1) + AC2S(3,3) - 6.0 P0520290

WRITE (NUVI,524) HDCVI, NECVI, GGDVS, HHCVS P0520300

524 FORMAT ( / / 2 ( I 9 / ) / 2 ( F 1 1 . 1 / ) ) P0 5 203 1 0 IAC1 I (2* JACVI+1 ) = -6 P0520320

IAC1 I ( 1 * JACVI-1 ) = -4 P0 520330

I AC2 I ( 1 * JACVI -1 . 2)=3 P0 5203 40

IAC2I (2* JACVI-3. 1)=4 PO 5 2 03 5 0 IAC2I (2, 1 JACVI+4)=2 P0520360

IAC2I ( 1 ,3*JACVI-2) = 1 P0 5 2 0 3 70

AC1S(2*LCCVl+9)=-6.0 P0520380

AC1S(1*LCCVI+3) = -4.0 PO 520390

AC2S( 1 •LCCVI+3,2) = 3.0 P0 5 2 0 4 0 0 A C2 S ( 2 * J A C V I + 0 , 3 ) = 4 . 6 PO 5 2 0 4 1 0 AC2S(3, 1 *JACVI+3)=2.0 P0520420

AC2S(3,3* JACVI-2) = 1 .0 PO 5 2 0 43 0 MOCVI = IAC1 I (2* JACVI + 1 ) + I AC 1 I ( 1 * J ACV I - 1 ) + I A C2 I( 1 * J ACV I - 1 , 2 ) +P0 5 2 0 4 4 0

1 IAC2I(1*KACVI+0,1) + IAC2I (2,2*JACVI+2) + P0 5 2 0 4 5 0 2 IAC2I (1 ,3*JACVI-2) P0520460

NECVT = I AC1 I ( 5 ) + lACIKI) + IAC2I(1,2) P0 5 2 0 4 70 -+ IAC2I(1,1) + IAC2I(2,6) + IAC2I(1,4) P0520480

GGDVS = ACiS(2*JACVI + 1) + AC 1 S (1 * J ACV I - 1 ) * AC2S (1 * JACVI - 1 . iZ ) + P0 5 2 0 490

1 AC2S(2*JACVI+0,3) + A C2 S ( 3 , 1 * J AC V I + 3 ) + AC2S ( 3 , 3 * J A CV I -2 ) . P 0 5 2 0 5 0 0 HHCVS = AC1S(5) + AC1S(1) + AC2S(1,2) P0 5 2 0 5 1 0 -+ AC2S(4,3) + AC2S(3,5) + AC2S(3,4) P0520520

WRITE (NUVI,5 2 4 ) MDCVI, NECVI, GGDVS, HHCVS P0 5 2 0 5 3 0 MCA3I (2*KACVI .1,1) = -1 P0520540

MCA3I (2.2*KACVI ,2) = -2 P 0 5 2 0 5 5 0 MCA3 I( 1 , 1 . 1 'KACVI ) = -3 P 0 5 2 0 5 60

11CA3I (1 *KACVr+1 ,2,3) = 1 P0 5 2 0 5 70

MCA3 I (2 . 1 *KACVI +2 , 2 ) = 2 P0520580

MCA3 I ( 1 . 2 . 3*KACVI +0 ) = 3

' PO 520 5 90

MCA3 I ( 4*KACVI -2 , 1 , 3 ) = 40 P 0 5 2 060 0 MCA3I(1 ,6«KACVI-3,2) = 5 PO 5 2 0 6 1 0 MCA3I (2,3, 10*KACVI-9) = -40 P0520620

MCA3I(2*KACVI ,5*KACVI-4,2*KACVI+0)= -5 P0520630

MCA3 I ( 1 KACV! -0 , 3 , 2*KACVI + 1 ) = M CA3 I( 2 * KACV I . 1 , 1) + P0 5 2 06 4 0

1 MCA3I(2,2*KACVI,2) + M CA3 I d', 1 , 1 * K ACV I ) * M C A3 Tu * KACVI + ^7273 ) P 0 5 2 0 6 5 0 2 + HCA3 I ( 2 , 1 *KACVI + 2 , 2 ) + M C A3 I ( 1 , 2 , 3 * K A CV I + 0 ) P0 5 2 0 660

3 + MCA3 I (4*KACVr-2 , 1 , 3) + MCA3 I (i, 6 * K A CV I - 3 , 2) PO 5 2 06 70

4 + MCA3I(2,3, 10*KACVI-9) + M C A3 I ( 2 • K A C V I , 5 « K ACV I - 4 , 2 * KACV I + 0) P0 5 2 06 8 0 A3S(3*KACVI , 1 , 1 ) = -1.0 P0 5 2 0690

A3S(2. 2tKACVI , 2 ) = -2.0 P0 5 2 0 7 0 0 A3S(1 , 1 , 1 *KACVI ) = -3.0 P0520710

A3S(2*KACVI+1 ,2,3) = 1.0 P0520720

A3S(3, 1 *KACVI+2,2) = 2.0 P0520730

A3S(1 ,2,3*KACVI+0) = 3.0 P0520740

A3S(4*KACVI-2, 1 ,3) = 40.0 P0 5 2 0 7 5 0 A3S(1 ,6*KACVI-3,2) =5.0 ' ' P0520760

A3S(2.3, 10*KACVI-8) = -40.0 P0 5 2 0 770

A3S(3*KACVI ,5*KACVI-4.2*KACVI+0) = -5.0 P0520780

A3S(T»KACVI-0,3,2*KACVI + 1 ) = A3S ( 3 * KACV I . 1 , 1 ) + A3S ( 2 , 2 » K A CV I , 2 ) + P 0 5 2 0 7 9 0

1 A3S(1 , 1 , 1 *KACVI ) + A3S(2»KACVI + 1 ,2,3) + A3S ( 3 , 1 * K A CV I + 2 . 2 ) + P0 5 2 0 8 0 0 t A3S(1 ,2,3*KACVI+0) + A3 S ( 4 * K A C V I - 2 , 1 , 3 ) + A3 S ( 1 , 6 * K A C V I -3 , 2 ) +P0 5 2 0 8 1 0 3 A3S(2,3, 10*KACVI-8) + A3 S ( 3 * K ACV I , 5 * K ACV I - 4 , 2 * K A C V I + 0 ) P0 5 2 0 8 2 0 WRITE (NUVI, 5 2 5 ) M C A3 I( 1 , 3 , 3 ) . A3 S ( 1 . 3 . 3 ) P0 5 2 0 8 3 0 525 FORMAT (//I9 // F11.1 ) P0520840

WRITE (NUVI, 5 2 7 ) P0 5 2 0 8 5 0 527 FORMAT (// 35H THE ANSWERS ABOVE SHOULD BE 0 FOR/ P0520860

1 31H THIS SEGMENT TO BE SUCCESSFUL) P0 5 2 0 8 70

C***** END OF TEST SEGMENT 052 P0520880

C « WHEN EXECUTING ONLY SEGMENT 0 5 2, THE STOP AND END CARDS P0 5 2 0 8 90

C«** *« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0520900

ZV'tTi* 1 AND 2 REMOVED. P0 5 2 09 1 0 C= STOP P0520920

C= END PO 5 2 0 93 0 ~ STOP P052C1

END P0 5 2 C2

C*t****it**ii*****ik*ik*t************«t******«*«****************************P0530010 ~

NBS FORTRAN Test Programs Version 1 65
c « * * «

P0530020

c » * *

«

SBF17 - (053) P0530030

C t » » « P0530040

t**ttt*t*tt*tttt*t*t**t*t**tttttttt*tttt*t*t*tt*t***t* * * * * * * * * •P0530050

c « « * * * P0530060

c * « * *

«

GENERAL PURPOSE ASA REF P0530070

c « « « «

TEST FORMATION OF SUBSCRIPTS FOR DOUBLE PRECISION 5.1. 3 . 3 P0530080

c « * * * * ARRAYS P0530090

c « * « «

FORMS V, K, C*V, C*V-K, C»V+K, V+K, V-K P0 5 3 0 1 0 0

c « « * * « P0 5 3 0 1 1 0

c * * « * * s PECIFICATIONS SEGMENT 053 P0530120

c « * * * * P0 0 1 1 2 5 0 C****t WHEN EXECUT I NG ONLY SEGMENT 0 5 3 , THE SPECIFICATION S T AT E M E N T S P 0 0 1 1 2 5 5 C***** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS P0011260

C t « «

»

c * * *

«

* 1 AND 2 REMOVED.

* POO 1 1 265

P0 0 1 1 2 70

c=

c= DOUBLE PRECISION A C 1 D ( 1 0 ) , B C 2 D ( 7 , 4 ) , C C 3 D ( 7 , 2 , 2 ) , E P 1 D ( 4 3 ) ,

1 VTAVD, WTAVD, AADVD

POO 1 1 275

P001 1280

DOUBLE PRECISION A C 1 D (1 0 ) , B C 2 D ( 7 . 4 ) , C C 3 D ( 7 , 2 , 2 ) , E P 1 D ( 4 3 ) .

1 VTAVD, WTAVD, AADVD

P053A1

P053A2

C t « «

t

C t * * *

*

t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

POO 1 1 285

P05301 30

C t * « «

t

C»**** WHEN EXECUTING ONLY SEGMENT 053, THE FOLLOWING STATEMENT

P0070930

P0070935

C««««* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C t « « «

«

P0070940

P0070945

c= NUVI = 6 NUVI = 6

P 0 0 7 0 9 5 0 P053B1

c * « * * * WRITE (NUVI .530)

P0070955

P 0 5 3 0 1 40

530 FORMAT (1H1 . 1X.33HSBF1 7 - (053) SUBSCRIPTS FOR D.P./

-16X. 17HARRAYS. ALL FORMS // 2X , 1 8HASA REF. - 5 . 1 . 3 . 3 / / 2X , 7HRESULTS

)

P 0 5 3 0 1 5 0 P0530160

NACVI = 10

JACVI =1

P 0 5 3 0 1 7 0 P05301 80

KACVI =+2

LCCVI = -1 P05301 90

P0530200

EP1D(10)=1 .00

BC2D(6.3)=4.0D0

P0 5 3 02 1 0 P0530220

CC3D(4, 1 , 1 )=-60.0D-1

AC1D( JACVI )=30.0D-1

P0530230

P0530240

BC2D( JACVI ,3)=1 .000

CC3D(JACVI,1,1)=2.0D0

P0530250

P0530260

BC2D ( 3 , JACVI ) =5 . ODO

CC3D(2 , JACVI . 1 ) = -2 . ODO

P0530270

P0530280

CC3D(3,2, JACVI )=.4D1

VTAVD = EPID(IO) + BC2D(6.3) * CC3D(4.1,1) + ACID(I)

P0530290

P0530300

-+BC2D(1,3) + CC3D(1,1,1) + BC2D(3,1) + CC3D(2,1,1)

-+CC3D(3,2, 1 ) - 12. ODO

P0 5 3 0 3 1 0 P0530320

AADVD = EPID(IO) + ACID(JACVI) + B C 2 D ( J A C V I , 3 ) + BC2D(6,3) +

1 CC3D(4,1,1) + CC3D( JACVI , 1 , 1 ) + B C2D ( 3 , J A C V I ) + P0530330

P0530340

2 CC3D(2, JACVI , 1) + CC3D ( 3 , 2 , JACV I ) - 12. ODO

AC1D(3*JACVI )=-0.6D+1

P0530350

P0530360

AC1D(3» JACVI-2)=70.0D-1

AC1D(5* JACVI+3) = 1.0D0

P0530370

P0530380

ACID (JACVI+3) = 1.0D0

ACID (NACVI-3) = -1.0D0

P0bj0390

P0530400

BC2D(6* JACVI ,2*KACVI-1 ) =2.000

BC2D(8* JACVI-2. 1 tLCCVI+S) = 10.000

P0 5 30 4 1 0 P0530420

CC3D (3* JACVI ,2.4*KACVI-6) = -8.000

CC3D( 1 0* JACVI -3 , 1 , 1 *LCCVI +3) = -6. ODO

P0530430

P0530440

WTAVD = AC1D(3) + ACID(I) + AC1D(8) + BC2D(6,3) + -BC2D(6,4) CC3D(3,2.2) + CC3D(7.1,2) + AC1D(4) + AC1D(7)

P0530450

P0530460

CC3D(2«KACVI + 1 ,NACVI-8,2«JACVI ) = AC 1 D ( 3 • J A CV I ) +

1 AC1D(3* JACVI-2) + AC1D(5* JACVI+3) + AC 1 D ( JACV I +3 ) + P0530470

P0530480

2 AC1D(NACVI-3) + B C2 D ( 6 • J ACV I , 2 * K ACV I - 1) + 3 BC2D(8» JACVI-2. 1 *JACVI+3) + CC3D ( 3 * JACVI , 2 . 4*KACVI -6 ) + P0530490

P0530500

4 CC3D(10*JACVI-3,1 .1*JACVI+1)

WRITE (NUVI. 531) VTAVD. WTAVD. AADVD. CC3D(5.2.2)

P0530510

P0530520

66 NBS FORTRAN Test Programs Version 1
531 FORMAT ( / / 4 ( D 1 8 . 5 / ) / 35H THE ANSWERS ABOVE SHOULD BE 0 FOR/

1 31H THIS SEGMENT TO BE SUCCESSFUL)

C*»*** END OF TEST SEGMENT 0 53

C***«* WHEN EXECUTING ONLY SEGMENT 053, THE STOP AND END CARDS

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C***** 1 AND 2 REMOVED.

C= STOP

C= END

IN COLUMNS

P0530530

P0530540

P0530550

P0530560

P0530570

P0530580

P 0 5 3 0 5 9 0 P0530600

STOP P053C1

END P0 5 3 C2

C*«***«t*»******t**t*«t«*«*****«««***«*****««**t**««*«««*****««««t«t««»*P0540010

C***** P0540020

C * * *

-^ j^- - -

( 0 5 4 ) p 0 5 4 0 0 3 0

C * * * * * P 0 5 4 0 0 4 0 C*****t*«*«*«**«t «** *«*****«**«***««*««*«*«*«*«t*****t*«*«tt*«**««*»P0540050

C***** GENERAL PURPOSE ASA REFSP0540060

C * * * * * c « t * *

«

c * * « «

c * * * * * c * * * * * c « » « * *

c * * * * *

c « « * * * t* * * * * c * * * * t c * * * * * c * * * * *

TO TEST ARITHMETIC IF STATEMENT

AND LOGICAL IF FOLLOWED BY GO TO

SO THAT THESE STATEMENTS MAY BE USED

IN SUBSEQUENT TEST SEGMENTS.

ARITHMETIC EXPRESSIONS ARE - INTEGER VARIABLE

INTEGER VARIABLE + OR - A CONSTANT

LOGICAL EXPRESSIONS ARE - LOGICAL VARIABLE

.NOT. LOGICAL VARIABLE

C***«* SPECIFICATIONS SEGMENT 054

C * * * * * C'***'** WHEN EXECUTING ONLY SEGMENT 0 5 4, THE spgYiFTcAffo^^^^ C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= STATEMENTS

IN COLUMNS 1 AND REMOVED

LNVB

LNVB

C t * * «

«

C * * * *

«

C= LOGICAL LVB, LIB(IO)

LOGICAL LVB. L1B( 10)

C * * « *

«

C***«* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

C *'** *« WHEN EXECUTING ONLY SEGMENT 0 5 4 , THE FOLLOWING STATEMENT

C*«*«« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.,

C * « * «

«

C= NUVI = 6

2 P0540070

3 P0540080

P0 5 40 090

P0 5 40 1 0 0 P 0 5 4 0 1 1 0 P05401 20

P05401 30

P05401 40

P0 5 40 1 5 0 P05401 60

P0540170

P0540180

PO 5 401 90

P001 1290

P001 129 5 P00 1 1 3 0 0 P0 0 1 1 3 0 5 P001 1310

P 0 0 1 1 3 1 5 P054A1

P001 1320

P0540200

P0070960

P0070965

P0070970

P0070975

NUVI = 6 WRITE(NUVI

IVI = -8

JVI = 0

7 5 40 ) P054B1P0540210

P0540226

P0540230

P0540240

P 0 5 4 0 2 5 0 P 0 5 4 0 2 6 0 P0540270

P 0 5 4 0 2 8 0 P0540290

P 0 5 4 0 3 0 0 P054031

0

P 0 5 4 0 3 2 0 P0 5 40330-

P0540340

P0540350

P0540360

P0540370

PO 5 403 8 0 P0540390

P 0 5 4 0 4 0 0 P054041

0

PO 5 40 42 0 P0540430

P0540440

P0540450

KVI = 2 MVI = -4

LVB = .true'. LNVB = .FALSE.

C:«tt*» LOGICAL ARRAY LIB SHOULD CONTAIN ALL .TRUE. IF TEST IS CORRECT'

NVI = 1

I F ( I VI ) 5 4 1 , 5 42 , 5 42

544 IF (JVI) 542, 541, 542

545 IF (KVI) 542.542. 541

C«**** ZERO IS NEITHER POSITIVE NOR NEGATIVE

546 NAVI = iVI * JVI

IF (NAVI) 542, 541. 542

5 47" NAVI = JVI MVI

IF (NAVI) 542. 541, 542

548 NAVI : JVI / MVI

IF (NAVI) 542. 541, 542

5 49 IF (MVI + 4) 5 42. 541 . 5 42

7543 IF (KVI - 2) 542. 541 . 542

C*»««« LOGICAL IF FOLLOWED BY GO

7544 IF (LVB) GO TO 541

GO TO 542

7545 IF (.NOT. LNVB) GO TO 541

TO

NBS FORTRAN Test Programs Version 1 67
542 LIB(NVI) = .FALSE.

GO TO 5 43

P0540460

P0540470

541 LIB(NVI) = .TRUE.

543 NVI = NVI 1 P0540480

P0540490

GO TO (544,544.545.546.547.548.549.7543.7544.7545.7546). NVI

7546 WRITE (NUVI , 7541 ) LIB

P0540500

P0540510

WRITE (NUVI.7542)

7540 FORMAT (2H1 ,30HSIMIF - (054) SIMPLE ARITH. I F / 1 9X . 1 4HAND LOGICAL

-IF//20H ASA REF. - 7.1.2.2/ 13X, 7H7.1.2.3 //9H RESULTS)

7541 FORMAT (/L4)

P0540520

P0540530

P0540540

P0540550

7542 FORMAT (/36H THE TEN ANSWERS ABOVE MUST BE TRUE)

C»***« END OF TEST SEGMENT 054

P0540560

P0540570

C«*«** WHEN EXECUTING ONLY SEGMENT 054, THE STOP AND END CARDS

Ct*««. WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0540580

P0540590

C««t«» IN COLUMNS 1 AND 2 REMOVED.

C= STOP

P0540600

P0 5 406 1 0 C= END

STOP

P0540620

P054C1

END

* 1

1

P054C2

* P 0 5 5 0 0 1 0

c * * * * * C»**** IFABS - (055)

P0550020

P0550030

c * « * *

«

t * i P0550040

*P0550050

C*«*** GENERAL PURPOSE ASA

C***«. TEST INTRINSIC FUNCTION ABS.IABS (ABSOLUTE VALUE) 8. REF

2 P0550060

P0550070

^ * * * * * Ct»«»« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P0550080

P0550090

C t « « *

«

C*««*« WHEN EXECUTING ONLY SEGMENT 055, THE FOLLOWING STATEMENT

P0070980

P0070985

C**»t» NUVI = 6 MUST HAVE THE C: IN COLUMNS 1 AND 2 REMOVED,

c * « * «

P 0 0 7 0 9 9 0 P0070995

C= NUVI = 6 NUVI = 6 P0 0 7 1 0 0 0 P055B1

c * * «

t

WRITE(NUVI , 0 5 5 0 ) P0071 005P05501 00

0 5 5 0 F0RMAT(37H1 IFABS - ( 0 5 5 ) INTRINSIC F U N CT I 0 N S - - / 1 OX , 2 6H ABS . lABS

1ABS0LUTE VALUE)//17H ASA REFS. - 8.2//9H RESULTS)

(P0 5 5 0 1 1 0 P0550120

C***«* HEADER FOR SEGMENT 055 WRITTEN

C****« SINGLE PRECISION REAL ARGUMENT

P0550130

P0 5 5 0 U0

MCGVI = 1 CMAVS = 1.000789P 0 5 5 0 1 5 0 P05501 60

CMBVS = -0.2E2

CMCVS = -2.0

P05501 70

P0 5 5 0 1 8 0 CMDVS = 2.0

CMFVS = -4.0

P0550190

P0550200

CMEVS = ABS(CMAVS)

CMEVS = CMEVS - 1 .000789

P0550210

P0550220

WRITE (NUVI, 0557) CMEVS

CMBVS = ABS(CMBVS)

P0550230

P0550240

CMEVS = CMBVS - 0.2E2

WRITE (NUVI, 0557) CMEVS

P0550250

P0550260

CMEVS = 2.0*CMCVS+ABS(2.0*CMFVS+ABS(CMCVS*CMDVS**MCGVI))

WRITE (NUVI, 0557) CMEVS

P 0 5 5 0 2 7 0 P0550280

CMEVS = CMFVS+CMDVS+ABS(CMCVS+ABS(CMFVS)-ABS(CMDVS-CMCVS))

WRITE (NUVI, 0557) CMEVS

P0550290

P0550300

0557 FORMAT (/2X,F15.1)

0558 FORMAT (/2X,37HTHE ABOVE ANSWERS SHOULD ALL BE 0 F0R/2X,

P 0 5 5 0 3 1 O' P0550320

1 35HTHIS TEST SEGMENT TO BE SUCCESSFUL.)

C«***» INTEGER ARGUMENT

P0550330

P0550340

MCAVI = 25

MCBVI = 4 P0550350

P0550360

MCCVI = -129

MCDVI = -2

P0550370

P0550380

MCEVI = 2 MCFVI = lABS(MCAVI)

P0550390

P0550400

MCFVI = MCFVI -25

WRITE (NUVI, 0551) MCFVI

P0550410

PC 5 5 0 420

68 NBS FORTRAN Test Programs Version 1
MCFVI = IASS(MCDVI+IABS(MCBVI/MCDVI)

WRITE (NUVI.0551) MCFVI

HCCVI = lABS(MCCVI)

MCFVI = MCCVI - 129

IABS(MCEV1 *»2) )-MCBVI P0550430

P0550440

P0550450

P0550460

WRITE (NUVI,0551> MCFVI P0550470

0 5 51, F 0 R M AT ( / 1 0 X , I 5 .) P 0 5 5 0 4 2 0 WRITE <NUVI,0558)

C****« END OF TEST SEGMENT 055

C***** WHEN EXECUTING ONLY SEGMENT 055, THE STOP

C****« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C*«T«* IN COLUMNS 1 AND 2 REMOVED.

C= STOP

i:= END

V STOP

END

AND

C = END CARDS

P0550490

P0550500

P055O51O

P0550520

P0550530

P0550540

P05505 50

P055C1

P0 5 5 C2

C**«***«***t***««**t«««*«««*»»*««t»«*«***««»**««t«t*t«*it«t«*«*«t**«t«»«P0560010

c « * * * c * * t * c * « * * c « * * * c « « «

«

c

* « «

c * * * * c * * *

«

c * * * * c « * * * c « * * * c * * «

C t * * * c=

* IFFLT - (056)

*

» GENERAL PURPOSE

« TEST INTRINSIC FUNCTION FLOAT (CONVERSION FROM

* INTEGER TO REAL)

t

« 0 U T P U t f A P E ASSIGNMENT S T A T E M E N T . NO I N P U T TAP E

.

ASA REF

8.2

(TABLE 3

* WHEN EXECUTING ONLY SEGMENT 056. THE FOLLOWING STATEMENT

* N U V I = 6 MUST HAVE THE C = IN CO L U M N S 1 AN D 2 REMOVED,

* NUVI = 6 NUVI = 6

C * * * *

0 5 60

WRITE (NUVI, 0560)

FORMAT (1H1 ,1X,34HIFFLT ( 056 ) INTRINSIC FU N CT I ON - - / 1 6X

15HFL0AT/ 2X,14HASA REF. - 8 . 2 / 2 X , 7 H R E S U L T S

)

C***** HEADER FOR SEGMENT 056

C*'**** ARGUMENT IS INTEGER, FUNCTION IS REAL

MCAVI = 64

MCBVI

MCCVI

MCDVI

MCEVI

CMAVS

CMBVS

WRITE

CMAVS

CMBVS

WRITE

CMBVS:

= -512

= 2

= 4

0561

0 5 62

0563

C * * * * C * * * * C t * * « c * * * * c=

c=

c « * * c « t * * c * *

«

c * * * t

= FLOAT(MCAVI)

= CMAVS - 64.0

(NUVI ,0561 ) CMBVS

= FLOAT(MCBVI)

= CMAVS + 512.0

(NUVI, 0561) CMBVS

F LOAT ( - 2 * M CE V I ) + F LOAT ( M C CV I * MCDV I ) » F LOAT ( M CEV I / M COVf) -

- FLOAT(MCDVI * 'MCCVI ) + 16.0

' write (NUVI ,0 5 6 1 ) CMBVS

WRITE (NUVI, 0562)

'write (NUVI, 056 3

")

" "' FORMAT (/2X,F15.1)

FORMAT ( / 2X,37HTHE ABOVE ANSWERS SHOULD ALL BE 0 FOR)

FORMAT (2X,35HTHIS TEST SEGMENT TO BE SUCCESSFUL.)

* END OF TEST SEGMENT 056

* WHEN EXECUTING ONLY SEGMENT 056, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

t**t*t**t*****t**tttttt*t**t**ttt*tt*ttt*t*t*ttt**t*tt*ttt*ttttttt

IFFIX - (057)

P0560020

P0560030

P0560040

P0560050

P0560060

P0560070

)P0560080

P0560090

PC5601 00

P0 0 7 1 0 1 0 P0071 01

5

P0 0 7 1 0 2 0 P0 0 7 1 0 2 5 P00 7 1 03 0 P056B1

P0 0 7 1 03 5 P 0 5 6 0 1 1 0 P05601 20

P05601 30

P05601 40

P 0 5 60 1 5 0 P0560 1 60

P05601 70

P 0 5 60 1 8 0 P 0 5 6 0 1 9 0 P0560200

P0 5 6 02 1 0 P0560220

P0560230

P0560240

P0560250

P0560260

P0560270

P0560280

P0560290

P0560300

P0 5 60 3 1 0 P0560320

' PO 5 60330

P0560340

P0560350

P0560360

P0560370

P0560380

P0560390

P0560400

P056C1

P056C2

* P 0 5 7 0 0 1 0 P0570020

P0570030

P0570040

NBS FORTRAN Test Programs Version 1 69
C«******t«**tt»**«*****«*«***«**«tt******««*«*«*«*«t***«*«««**«****»tt*tP0570050

Z*t*** GENERAL PURPOSE ASA REF P0570060

C**«»t TEST INTRINSIC FUNCTION - IFIX - (CONVERSION FROM 8.2 P0570070

C.*.*. *. «. * REAL TO INTEGER) (TABLE3)P0570080

C***«* PO 5 70090

C**«** OUT P U T T A P E AS S I G N ME N T S T ATE ME N T . NO INPUT TAPE. P0 5 70 1 0 0

C « * * * « P 0 0 7 1 0 4 0 C**«tt WHEN EXECUTING ONLY SEGMENT 057, THE FOLLOWING STATEMENT P0071045

C***«t NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.' P0 0 7 1 0 5 0 C**«** P0071055

C= NUVI =6 P0 0 7 1 060' NUVI = 6 P057B1

C***** POO 7 1065

WRITE (NUVI, 0570) P0570110

0 5 70 FORMAT ( 1 H 1

, 1 X , 3 4 H I F F I X - ( 0 5 7 ) INTRINSIC F U N C T I 0

N - - / 1 6X , 4P0 5 70 1 2 0 1HIFIX//2X, UHASA REF. - 8 . 2 / / 2 X , 7 H R E S U L TS ) P0 5 70 1 3 0 C«««»« HEADER FOR SEGMENT 057 P0570140

C**t«* SINGLE PRECISION ARGUMENT, INTEGER FUNCTION P0570150

CMAVS : 2.4 5 6 7 P 0 5 7 0 1 60

CMBVS = -0.2001E2 P0570170

CMCVS = +5.61E-1 P0 5 70 1 8 0 CMDVS = -123.456E0 . P0570190

CMEVS = 789.9876E-2 P0570200

CMFVS =2.0 P0570210

CMGVS =-0.5 P0570220

MCAVI = IFIX(CMAVS) P0570230

MCBVI = MCAVI -2 P0570240

WRITE (NUVI. 0571) MCBVI P0570250

MCAVI = IFIX(CMBVS) P0 5 70260

MCBVI = MCAVI +20 P0570270

WRITE (NUVI, 0 5 7 1 ) MCBVI P0 5 702 80

MCAVI = IFIX(CMCVS) P0570290

WRITE (NUVI. 0 5 7 1 ) MCAVI P0 5 703 00

MCAVI = IFIX(CMDVS) P0570310

MCBVI' = "MCAVI + 123 P0 5 703 20

WRITE (NUVI. 0571) MCBVI P0570330

MCAVI = IFIX(CMEVS) P0 5 70 3 40

MCBVI = MCAVI - 7 P0570350

WRITE ' (NUVI . 0 5 7 1 ) MCBVI P0 5 70 360

MCBVI = IFIX(CMBVS*CMGVS)tIFIX(CMDVS/CMFVS)- P0570370

-"I FrX( CMBVS* * I F IX( CMFVS) ) + 1 010 PO 5 70 3 8 0 WRITE(NUVI .0571 ) MCBVI P0570390

WRITE (NUVI ,0572) P0570400

WRITE (NUVI, 0573) P0570410

()571 FORMAT (/10X.I6) P0 5 70 420

0572 FORMAT (/2X,37HTHE ABOVE ANSWERS SHOULD ALL BE 0 FOR) P0570430

0'5'i73 FORMAT (2X,35HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0 5 70 440

C«*«»« END OF TEST SEGMENT 057 P0570450

C'*'**'«* WHEN EXECUTING ONLY SEGMENT 0 5 7 . THE STOP AND END CARDS P0 5 70 460

C*«*«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0570470

C:*t**« IN COLUMNS 1 AND 2 REMOVED. P0 5 70 48 0 C= STOP P0570490

C'= END PO 5 70 5 00

STOP P057C1

Ct***«*«*t***t«***«***«*«*t*«««**tt*«t«««««*««*««»«***t*««t«t«**«»«tt«««P0580010

C'*'* *"'* PO 5 8 0 020

C«*«»t IFSGN-(058) P058003 0

C * "««'«* P0580040

Ct*t««*««tt**t»«*tt*«««««*«»«««t«**««t««««*«**t***«t«««*««***«**«*t««*««P0580050

C»«»** GENERAL PURPOSE ASA REF P0580060

C***»* TEST INTRINSIC FUNCTION - SIGN. ISIGN - (TRANSFER 8 . 2 / 3 1 - 3 2 P 0 5 8 0 0 7

0

C*»*** OF SIGN - SIGN OF A2 TIMES ABS(AI) ) (TABLE 3)P0580080

C**«»* P0580090

C'i *'*"*'« b U t P U T T 'A P E ASS I GNMENT STATEMENT . NO I NPUT TAPE . PO 5 8 0 1 00

C****t P0071070

t't t 'ti * W HEN EXE cut I N G ONLY S E G M E N T 0 5 8 , T H E F 0 L L 0 W I N G STAT E M E N T P 00 7 1 0 75

C*«tt» NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071080

70 NBS FORTRAN Test Programs Version 1
C***tt P0071085

C= NUVI : 6 P0071090

NUVI = 6 P0 5 8 B1 C***»* P0071095

WRITE ( NUVI 70 5 8 O') P 0 5 8 0 1 1 0 0580 FORMAT (1H1 ,1X,35HIFSGN - (058) INTRINSIC FUN CT I ONS-- / 1 6X , 24 P05801Z0

1 HSIGN, ISIGN (TRANSFER 0 F / 1 6X , UHARGUME NT S I GN ) / / 2X , UHASA FtEF. P0 5 8 0 1 3 0 2- 8.2//2X,7HRESULTS) P0 5 8 0 U0

C*t*«* HEADER FOR SEGMENT 058 P0580156

C***** ARGUMENTS AND FUNCTION ARE ALL REAL-TYPE (SIGN) P0580160

CMAVS = 1 . 0 78 P0 5 8 0 1 70

CMBVS = -23.0E1 P0580180

CMCVS = - 5.4 5 67 P 0 5 8 0 1 90

' CMDVS = 7.567E-1 P0580200

CMGVS = +2.0 PC 5 8 0 2 1 () CMHVS = -4.0 P0580220

CMIVS = +8.6 P0580230

CMEVS = SIGN(CMAVS, CMBVS) P0580240

CMFVS = CMEVS +1.078 ... pQ5gQ250

WRITE (NUVI, 0581) CMFVS P0580260

CMEVS = SIGN( CMAVS, CMDVS) P0580270

CMFVS = CMEVS - 1.078 P0580280

WRITE (NUVI, 0581) CMFVS '

'

' P0580290

CMEVS = SIGN( CMBVS, CMCVS) P0580300

CMFVS = CMEVS + 23.0E1 P0 5 8 03 1 0 WRITE (NUVI, 0581) CMFVS P0580320

CMEVS = SIGN( CMBVS, CMDVS) P0 5 8 033 6 CMFVS = CMEVS - 23.0E1 P0580340

WRITE (NUVI, 0581) CMFVS P0580350

CMFVS = SIGN(CMGVS,CMHVS)*SIGN(CMHVS,CMIVS)+ P0580360

- S I G N ( S IG N ( C M I V S , C M B V S ) , S I G N ( C M H V S , C M G V SY) P 0 5 8 0 3 7 0 WRITE(NUVI ,0581 ) CMFVS P0580380

C «*«;

« ARGUMENTS AND FUNCTION" ARE ALL I N t E G E R - TYPE (' ! S I G N ) P 0 5 8 0 3 9 0 MCAVI = 24 P0580400

MCBVI = +167 P0 5 8 0 4 1 0 MCCVI = -5980 P0580420

MCDVI = -12345 P0580430

MCGVI = 2 P0580440

MCHVI = -4 PO 5 80450

MCIVI = 8 P0580460

MCEVI = ISIGN(MCAVi , MCBVI ) P0580470

MCFVI = MCEVI - 24 P0580480

WRIT E ( N U V I , 0 5 8 2 ) MCFVI ' P 0 5 8 0 490

MCEVI = ISIGN(MCBVI , MCCVI ) P0 5 8 0 5 00

MCFVI = MCEVI + 167 P0 5 8 0 5 1 0 WRITE (NUVI, 0582) MCFVI P0580520

MCEVI = I S I GN ( MCCVI , MCDVI ) P0 5 8 0 5 36

MCFVI = MCEVI + 5980 P0580540

WRITE (NUVI ,0 5 82 ) MCFVI PO 5 8 0 5 5

0' MCEVI = ISIGN(MCDVI , MCAVI) P0580560

MCFVI = MCEVI - 1 2 3 4 5 P0 5 8 0 5 70

WRITE (NUVI, 0582) MCFVI P0580580

MCFVI = ISIGN( ISIGN(MCGVI «MCHVI + (2*MCIVn .MCiVI/MC^ P0 5 8 0 5 90

1 ISIGN(+8,MCHVI/MCGVI+MCCVI). MCIVI) - MCHVI **2 P0580600

WRITECNUVI , 0582)MCFVI P0580610

WRITE (NUVI, 0583) P0580620

WRITE(NUVI ,0584) P0580630

0581 FORMAT (/2X,F15.1) P0580640

6'5 8 2 F 0 R M A T ( / 1 0 X , I 5 ) p 0 5 8 0 6 5 () 0583 FORMAT (/2X,37HTHE ABOVE ANSWERS SHOULD ALL BE 0 FOR) P0580660

0584 FORMAT (2X,35HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0580670

C***** END OF TEST SEGMENT 058 P0580680

C****» WHEN EXECUTING ONLY SEGMENT 058, THE STOP AND END CARDS P0580690

C*tt«t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0580700

C***t* IN COLUMNS 1 AND 2 REMOVED. P0 5 8 0 7 1 0 C= STOP P0580720

C= END P0580730

STOP P058C1

NBS FORTRAN Test Programs Version 1 71
END

Z*t****iiii**t*t*tt***ttt**tt**tt*t*t*t*tiiii*ttt**ttt*tttttt**t****t*ii* 1

1

P058C2

* «P05900 1 0

Q * * * * * C***** IFDAB - (059)

P0590020

P0590030

C***** P0590040

C**t*«i)***«*******t« t** tt*t«t****t****tttt*tt**t**t*itt********t*«*t*P0590050

C***** GENERAL PURPOSE ASA

C*«*«* TEST INTRINSIC FUNCTION DABS (ABSOLUTE VALUE OF 8. REF P0590060

2 P0590070

Ct«t** A DOUBLE PRECISION ARGUMENT) (TABLE

c * * « * 3)P0590080P0590090

C*t**« SPECIFICATIONS SEGMENT 059

c * « * t * P05901 00P00 1 1 33 0 C***** WHEN EXECUTING ONLY SEGMENT 059. THE SPECIFICATION STATEMENTS

C***** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

P 0 0 1 1 3 3 5 P0 0 1 1 3 40

L*t«** IN LULUnNb 1 AIMU C KbnUVbU.

C t * « * « P 0 0 1 1 3 4 5 P0 0 1 1 3 5 0 p- nnnDic DDcricTOM riDA\/n noDv/n norv/n riDnv/n nocv/n nocv/n nDr\/n

DOUBLE PRECISION DPAVD , DPBVD , DP CVD , DPDVD , DPEVD , DPFVD , DPGVD

DAA1 17CC P 0 0 1 1 3 D D P059A1

C«.«»* OUTPUTTAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

nAA1 17iA P 0 0 11 3 0 0 P0 5 90 1 1 0

Q A It # t It C»«.*» WHEN EXECUTING ONLY SEGMENT 059, THE FOLLOWING STATEMENT

nAA71 1AA P U 0 / 1 TOO

P0 0 7 1 1 0 5 r***** NUVl Mii\/T -- A MiiCT uA\/c Tuc r- tm poiiimmc i ampi 7 dcmov/ch 0 nUOl nAVt Int L- IN LULUnlMo 1 AlMU L KtnUVtU.

c * * * * * DAA71 1 1A P U U / 1 1 1 U

P 0 0 7 1 1 1 5 L - NUVl - 0 NUVI : 6

r U U / 1 \ L\J P059B1

WRITE (NUVI. 0590)

r U U / 1 \ LJ P05901 20

/\ Q Ci CnOMAT /"ILII IV T/UTCHAD - f f\ ^ Q \ TMTDTMCir CMMPTTriM /1AV UjVU rUKHAI Mnl,lA,j4nlrUAD \ \) jy ) INlKlNolL rUniLIlUN — /lOA,

123HDABS (ABSOLUTE VALUE 0F/16X,16HA D.P. ARGUMENT)/ 2X.

P U J 7 U 1 5 U P05901 40 71/UACADCC-07//

32X, 7HRESULTS)

P U J V U 1 J U P0590160

L***** HtAUbK rUK btbnbNI U5V WKlllbN

C***** ARGUMENT AND FUNCTION ARE DOUBLE PRECISION

DACOA1 7A P U D V 0 1 / U P05901 80

UPAVU - 1 . d 5 4 D 0 / 5 V U 1 d 5 A U

U

DPBVD = -2.0D0

nACQA I OA

P0590200

UrLVL) - -JV.'toaUiC'tOflljj/U-l

DPDVD = 2.0D0

P U 3 V U d 10 P0590220

UrbVU - H.UUU

DPEVD = 1 . ODO

DA^OA77A PU3VU<:5U

P0590240

nDc\/n UrtVU - hADC/'piDAV/n^ - UADOvUrAVU^

DPFVD = DPEVD - 1 . 2 3 4 5 6 7 8 9 0 1 2 3 4 D

0

P0590260

IIDTTC WKlIb /Klll\/T AQQ1\ riDC\/n vIMUVI.UjVi; UrrvU

DPEVD = 2.0D0*DPBVD+DABS(DPDVD*DPGVD+DABS(DPGVD/(2.0D0*DPDVD) P0590280

- UrUvU**^:;)

WRITE (NUVI, 0591) DPEVD P0590300

DPEVD - 3. ODO

DPEVD = DABS(DPCVD)

nAcnA7iA P U J V U 0 1 U P0590320

DPFVD - DPEVD - 3 9 . 4 6 8 0 2 4 6 8 1 3 5 7 D -

l

WRITE (NUVI, 0591) DPFVD

KUjVUjjU

P0590340

DPEVD = 4. ODO

DPEVD = DPGVD +DPDVD+DABS ( DPBVD+DABS ( DPGVD ) -DABS ( DPDVD-DPBVD )

)

PUjVUjDU

P0590360

WRITE (NUVI, 0591) DPEVD

WRITE (NUVI, 0592)

nACnA77A P05903/0

P0590380

WRITE (NUVI, 0593)

0591 FORMAT (/ D22.10)

nA cnA70A P0590390

P0590400

0592 FORMAT (/ 39H THE ABOVE ANSWERS SHOULD ALL BE 0 FOR)

0593 FORMAT (36H THIS TEST SEGMENT TO BE SUCCESSFUL)

P 0 5 9 0 4 1 0 P0590420

C».»** END OF TEST SEGMENT 059

C*«*** WHEN EXECUTING ONLY SEGMENT 059, THE STOP AND END CARDS

P0590430

PO 5 90440

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C***»« IN COLUMNS 1 AND 2 REMOVED.

OACQA / CA P0590460

C= STOP

C= END

P0590470

P0590480

STOP

END

P059C1

P059C2

c * » * «

**P0600010

P0600020

72 NBS FORTRAN Test Programs Version 1
Ct*«»« IFTRN - (060) P0600030

C * * * * * P0.600,0 A0

^***********t*»***t*******t********************************fi:******(**t*«P0600050

C***** GENERAL PURPOSE ASA REF P0600060

C**««« TEST INTFtlNSIC FUNCTIONS A INT, INT. AND IDINT -- 8.2 P060 0 070

C* « « « « TRUN CAT I ON ( S I.GN OF A * LARGEST I NTEGER LE .A.BS ,(,A) ) (.lABLE 3 ) P060 00 8 P

C

*'«'**"* p 0 6 0 0 0 9 0 C***«* SPECIFICATIONS SEGMENT 060 P0600100

C *«*** POO 11370

C***** WHEN EXECUTING ONLY SEGMENT 060. THE SPECIFICATION STATEMENTS P0011375

C7**T« WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= PO0 11380

C«*«*« IN COLUMNS 1 AND 2 REMOVED. P0011385

C* *'**

* POO 11390

C= DOUBLE PRECISION DPAVD , DPBVD . DPCVD , DPDVD P0011395

D 0 U B L E PRECISION DPAVD, DPBVD. DPCVD, DPDVD P 0 6 0 A

1

C****« P0011400

C * 0 U T P U t t A P E AS SI GNMENT STATEMENT. NO INPU T TAPE. P 0 600 1 1 0 C***** P0071130

C«**** WHEN EXECUTING ONLY SEGMENT 060, THE FOLLOWING STATEMENT P0 0 7 1 1 3 5 C*«*** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0 0 7 1 U0

C«  POO 711 45

C= NUVI = 6 P0071150

NUVI = 6 P060B1

C** *** P0071155

WRITE (NUVI, 0600) ' P0600120

0600 FORMAT (1H1, 1X.34HIFTRN - ( 060 ) INTRINSIC F U N CT I 0

N -

- / 1 OX , 29HA I NT , P 0 6 0 0 1 3 0

1 INT. IDINT (TRUNCATI0N)//16H ASA REF. - 8 . 2 / / 2X , 7HRE SU LTS ) P06 0 0 1 4() C***** HEADER FDR SEGMENT 060 WRITTEN P0600150

C* * * * * TEST OF AI NT - REAL ARGUMENT AND REAL FUNCTION P060 0 1 60

CMAVS = 1 . 999 P06001 70

CMBVS' = 999.00 1 P06 0 0 1 8 0 CMCVS = -0.45678 P0600190

CMDVS = -9876.0 P0600200

CMEVS =1.0 P060021 0 . CMEVS = AINt(CMAVS) P0600220

CMFVS = CMEVS - 1.0 P0600230

WRITE ( NUVI . 060 I)' CMFVS P060 02 40

CMEVS = 2.0 P0600250

CMEVS '= AINt( CMBVS) P0 600260

CMFVS = CMEVS - 999.0 P0600270

WR I T E ( N U V I , 0 6 0 1 ) CMFVS P060028{)

CMEVS = 3.0 P0600290

CM E V S = A I N t ( C M C V S ) P 0 6 0 0 3 0 0 CMFVS = CMEVS P0600310

write' ( NUVI , 060i) CMFVS PO 60 032 0 CMEVS = 4.0 P0600330

CMEVS = AINT(CMDVS) P060 03 40

CMFVS = CMEVS + 9876.0 P0600350

W RITE (NUVI . 0 6 0 i ) CMFVS P 0 6 0 0 3 6 0 WRITE (NUVI. 0603) P0600370

C * *"*"*

» T E S T 0 F I N T - REAL AR G U M E N t B U'f INTEGER" FUNCTION P 0 6 0 0 3 8 0 MCAVI = 5 P0600390

MCAVI = I NT (CMAVS) P06 0 0 400

MCBVI = MCAVI - 1 P0600410

WRITE (NUVI ,0604 ) MCBVI P0600 42 0' MCAVI = 6 P0600430

M C A V I = I N t' ( C M B V S ) P 6 6 0 0 4 4 0 MCBVI = MCAVI - 999 P0600450

W R I T E ( N U Vi, 0 6 0 4 ) M C B V I P 0 6 0 0 460

MCAVI = 7 P0600470

MCAVI = I NT( CMCVS) P060 0 48 0 WRITE (NUVI. 0604) MCAVI P0600490

MCAVI = 8 P06 0 0 5 00' MCAVI = INT(CMDVS) P06C0510

MCBVi = MCAVi + 9876 P0600520

WRITE (NUVI. 0604) MCBVI P0600530

WRITE (NUVI. 060 5 ) P0 60 0 5 4 0 C***** TEST OF IDINT - DOUBLE PRECISION ARGUMENT AND FUNCTION P0600550

NBS FORTRAN Test Programs Version 1 73
DPAVD = 1.999999999999901 - P0600560

DPBVD = +99.000500189123D0 P0600570

DPCVD = - 0.98 76 5 432 1 0 1 98D0 P060 0 5 80

DPOVD = -456 . 789098 765 UD1 P0 60 0 590

MCAVI =9 P060 060d

MCAVI = IDINT(DPAVD) P0600610

MCBVr = "MCAVI - 19 P0 60 0 62 0 WRITE (NUVI,0606) MCBVI P0600630

MCAVI : 10 PO 60 0 640

MCAVI = IDINT(DPBVD) P0600650

MCBVI = MCAVI - 99 P060 0660

WRITE (NUV1,0606) MCBVI P0600670

MCAVI = 11 P 060 0680

MCAVI = IDINT(DPCVD) P0600690

WRITE (NUV I, 0606 ) MCAVI P 060 0 70 0 MCAVI = 12 P0600710

MCAVI : IDINT(DPDVD) P0600720

MCBVI : MCAVI + 4567 P0600730

WRITE (NUV I ,0606) MCBVI P0600 740

WRITE (NUVI,0607) P0600750

WRITE (NUV I ,0608 ) P 060 0 760

060 1 FORMAT ( /F1 1 . 1 ) P 060 0 770

0 603 FORMAT ( 2X, 1 6HEND OF AI NT TEST) P06 0 0 78 0 0604 FORMAT (/I10) P0600790

060 5 FORMAT ( 2X,15HEND OF INT TEST) P06 0 0 8 0 0 0606 FORMAT (/I10) P0600810

0607 FORMAT ( 2X,17HEND OF IDINT TEST) P0 6 0 0 8 2 0 0608 FORMAT ( 40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/ P0600830

1 31H TEST SEGMENT TO BE SUCCESSFUL) P0 6 0 0 8 40

C**»*« END OF TEST SEGMENT 060 P0600850

C»*«** WHEN EXECUTING ONLY SEGMENT 060, THE STOP AND END CARDS P0600860

C»**«« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0600870

C*t**« IN COLUMNS 1 AND 2 REMOVED. P0600880

C= STOP P0600890

0= END P060 090 0 STOP P060C1

END P 0 6 0 C 2 r*t**t**t*«>ttitt**t*t*««<**t*t«t»*«t***«*ttitt*****t**«**«***t******«t*«*po6iooio

C**««* P06 10020

C***** IFMOD - (061 ) P0 6 1 0 03 0 C «* *«

t P 0 6 1 0 0 4 0 C**tt «** ***t*t***ttt*********tt*ri*t***tt*itt*«*t*t**t**t**t*t««***tt*P0610050

C***** GENERAL PURPOSE AS A RE F P 0 6 1 0 0 6

0

C«*«t« TEST INTRINSIC FUNCTION AMOD AND MOD - REMAINDERING, 8.2 P0610070

C * « » » WHICH IS DEFINED AS A1-(A1/A2)A2 WHERE (X) IS AN (TABLE 3)P06 1 0 0 8 0 C**tt* INTEGER WHOSE MAGNITUDE IS LE ABS(X) AND WHOSE SIGN P0610090

C**«t« IS THE SAME AS X. P0610100

C**«** P0610110

C'**t*« 0 U T PUT T APE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0610120

C***** P0071 160

C»T«T* WHEN EXECUTING ONLY SEGMENT 061, THE FOLLOWING STATEMENT P0 0 7 1 1 6 5 C*tt** NUVI : 6 MUST HAVE THE C= IN COLUMNS 1 AND 2-REMOVED. P0071170

C* * « * * P0 0 7 1 1 75

C= NUVI = 6 P0071180

NUVI = 6 P 0 6 1 B 1 C***t* P0071185

WRITE (NUVI ,0610) P0610130

0610 FORMAT (1H1. 1X.34HIFM0D - (061) INTRINSIC F U N C T I 0

N -

- / 1 6X , 2 4 H AMO D , P 0 6 1 0 1 4

0

1 MO' '":MAINDERING)//16H ASA REF. - 8.2//2X, P0610150

2 7' lTS) P0610160

C*'*t«* HlADER for SEGMENT 06T WRITTEN P0610170

C«ttt. TEST OF AMOD - REAL ARGUMENTS AND REAL FUNCTION P0610180

CMAVS = 16.0625 P0610190

CMBVS = -4.0 P0610200

CM CVS - _ j ; i2 5 P06 1 02 1 0 CMDVS =2.5 \ . P061 0220

C M E V S = - 1 . 0

'

" " ""

""' P 0 6 1 0 2 3 0 CMFVS = 1.0 P061 0240

74 NBS FORTRAN Test P r og r am s Ve r s i o n 1
CMFVS = AMOD(CMAVS, CMBVS)

CMGVS = CMFVS - 0.0625

WRITE (NUVI .0611 ) CMGVS

CMFVS = 2.0

P0610250

P061 0260

PO 61 02 70

P061 0280

P06 1 0290

P061 0300

P 0 6 1 0 3 1 0 P061 0320

P 0 6 1 0 3 3 0 P061 0340

P061 0350

P061 0360

PO 6103 70

P0610380

p06 1 03 90

P061 0400

P 0 6 1 0 4 1 0 P061 0420

P06 1 0 43 0 P06 1 0 440

P06i04 5 0 P061 0460

P061 0 470

P06 1 048 0 P061 0490

P061 0500

P0610510

P06 1 0 5 2 0 P06 1 0 53 0 P061 0540

P 0 6 1 0 5 5 0

P 06 1 0 5 60

P06 1 0 5 70

P061 0580

P061 0590

P061 0600

P06 1 06 1 0 P061 0620

P061 0630

P061 0640

P 0 6 1 0 6 5 0 P061 0660

P061 0670

P06 1 0680

P061 0690

P06 1 0 70 0 P 0 6 1 0 7 1 0 P061 0720

P061 0730

P061 0740

PO 61 075 0 P061 CI

CMFVS = AMOD(CMCVS,CMDVS)

CMGVS = CMFVS + 0.625

write (NUVI. 0611) CMGVS

CMFVS = 3.0

CMFVS = AMOD( CMBVS. CMEVS)

CMGVS = CMFVS + 0.0

WRITE (NUVI. 0611) CMGVS

CMFVS - 4.0

CMFVS = AMOD(CMBVS, CMAVS)

CMGVS = CMFVS + 4.0

WRITE ( NUVI . 061 1 ) CMGVS

WRITE (NUVI. 0612)

C « * * «

«

TEST OF MOD - INTEGER ARGUMENTS AND INTEGER FUNCTION

MCAVI = 35

MCBVI = -5

MCCVI = -998

MCDVI = 9 MCEVI = 10

MCFVI = 1 MCFVI = MOD(MCAVI .MCBVI

)

MCGVI = MCFVI + 0 WRITE (NUVI. 0613) MCGVI

MCFVI : 2 MCFVI = MOD(MCCVI .MCDVI

)

MCGVI = MCFVI + 8 WRITE (NUVI. 0613) MCGVI

MCi=Vi = 3 MCFVI = MOD(MCAVI .MCDVI)

MCGVI = MCFVI - 8 WRITE (NUVI. 0613) MCGVI

MCFVI = 4 MCFVI = MOD(MCBVI .MCEVI

)

MCGVI = MCFVI + 5 WRITE (NUVI. 0613) MCGVI

0611

0612

0613

0614

WRITE (NUVI. 0614)

FORMAT ( /F1 1 . 1 ) FORMAT ( y/ 2 X , i 7 H E N D OF AMO 0 j ^ s f :)

FORMAT (/I10)

FORMAT ( / /2X. 16HEND OF MOD f^^j yy-^y^^

138HALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/2X.

230HTEST SEGMENT TO BE SUCCESSFUL.)

** END OF TEST SEGMENT 061

** WHEN EXECUTING ONLY SEGMENT 061. THE STOP AND END CARDS'

** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

** IN COLUMNS 1 AND 2 REMOVED.

STOP

C « «

«

c * * c « «

c * * * c=

c = END

STOP

END

C*

C*

C»

c*

c*

c«

c*

c*

c*

c*

c*

c»

c*

c*c*

P061 C2

*P062001

0

P0620020

P0620030

P 0 6 2 0 0 4 0 *P0620050

P 0 6 2 0 0 6 0 P0620070

)P0620080

P0620090

P06201 00

P001 1410

IFHAX - (062)

*t**ttttttttttttttttt***ii**t*t*t*t**tt*tt**t*tttt**ttt***t*tttt*t

GENERAL PURPOSE ASA REF

TEST OF INTRINSIC FUNCTION AMAXO . AMAX 1 . MAXO . MAX 1 AND 8.2

DMAX1 -- CHOOSING LARGEST VALUE (TABLE

3

SPECIFICATIONS SEGMENT 062

WHEN EXECUTING ONLY SEGMENT 062. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

P001 1 41

5

P001 1 420

POO 11425

P00 1 1 430

NBS FORTRAN Test Programs Version 1 75
C = - DOUBLE PRECISION M CAVD . H CBVD . M C CVD . H CDVD . M CE VO . H C F VD P001U35

DOUBLE PRECISION M CAVD , H CBVD , H C CVD . M CDVD . M CEVD , M C FVD P062A1

C»'*'*'V * P00 1 1 440

C»**«* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0620110

c

*'*'*"*"» P007H96

C««»** WHEN EXECUTING ONLY SEGMENT 062, THE FOLLOWING STATEMENT P0071195

C«»««* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P00 7 1 200

C***** P0071205

C= NUVi = 6 P0071 2 1 0 NUVI = 6 P062B1

C * * * * * P 0 0 7 1 2 1 5 WRITE (NUVI, 0620) P0620120

0620 FORMAT (1H1, 1X,35HIFMAX - ( 062 ) INTRINSIC F U N CT I 0 N S - - / 1 3X , 2 8 H AM AXP 0 6 2 0 1 3

0

10.AMAX1 ,M-AX0. MAX1,DMAX1 / 2X.UHASA REF. - 8 . 2 / / 2X . 7HRESULTS ) P062 0 1 40

C***** TEST OF AMAXO - INTEGER ARGUMENTS, REAL FUNCTION 8 . 2 / 19 P 0 6 2 0 1 5 0 C«**t« TWO ARGUMENTS FOR AMAXO P0620160

WRITE (NUVI ,0625) P0620170

MCAVI = 128 P0620180

MCBVI =64 P 062 01 90

MCCVI : -8 P0620200

MCDVI = -4096 P062 02 1 0 CMEVS =1.0 P0620220

CMEVS = AMAXO(MCAVI , MCBVI ) P062 0 23 0 CMFVS = CMEVS - 128.0 P0620240

WRITE (NUVI, 062 1 ) CMFVS P062 0 2 5 0 CMEVS = 2.0 P0620260

CMEVS = AMAX0(MCCVI .MCCVI) P0620270

CMFVS = CMEVS + 8.0 P0620280

WRITE (NUVI, 062 1 ) CMFVS P0 62 0 2 9() CMEVS =3.0 P0620300

CMEVS = AMAXO ( MCAVI , MCCVI ) P0620310

CMFVS = CMEVS - 128.0 P0620320

WRITE (NUVI, 062 1 ) CMFVS P062 033 0 CMEVS = 4.0 P0620340

CMEVS = AMAX0(MCCVI , MCDVI) P062 0 3 5 0 CMFVS = CMEVS + 8.0 P0620360

WRITE (NUVI, 0621) CMFVS P0620370

CMEVS = 5.0 P0620380

CMEVS = AMAX0(MCDVI , MCBVI ) P062 0 3 90

CMFVS = CMEVS - 64.0 P0620400

WRITE (NUVI, 062 1 ) CMFVS P062 0 4 1 0 MCGVI = 2 P0620420

WRITE (NUVI, 0622 ) MCGVI P062 0 430

C«t»*» THREE ARGUMENTS FOR AMAXO P0620440

CMEVS = 6.0 P062 0 4 5 0 CMEVS = AMAXO(MCCVI , MCBVI .MCAVI ) P0620460

CMFVS = CMEVS - 128.0 P062 0 4 70

WRITE (NUVI, 0621) CMFVS P0620480

CMEVS = 7.0 P062 0 490

CMEVS = AMAX0(MCDVI , MCBVI , MCCVI ) P0620500

CMFVS = CMEVS -64.0 P062 0 5 1 0 WRITE (NUVI. 0621) CMFVS P0620520

CMEVS = 8.0 P062 0 5 3 0 CMEVS = AMAXO ( MCDVI , MCCVI , MCCVI ) P062 0 5 40

CMFVS = CMEVS + 8.0 P062 0 5 5 0 WRITE (NUVI, 0621) CMFVS P0620560

MCGVI' = 3

' P0 62 0 5 70

WRITE (NUVI. 0622) MCGVI P0620580

C*V*V* FOUR OR FIVE ARGUMENTS FOR AMAXO P062 0 5 90

CMEVS = 9.0 P0620600

CMEVS = AMAXO (MCAVI , MCBVI , MCCVI , MCDVI) P 062 06 1 0 CMFVS = CMEVS - 128.0 P0620620

WRITE (NUVI, 062 1 ) CMFVS P062 063 0 CMEVS = 10.0 P0620640

C M E V S = A M AX 0 ( M C A V I . M C B V I , M C C V I , M C D V I , M C A V I ) P 0 6 2 0 6 5 0 CMFVS = CMEVS - 128.0 P0620660

WRITE (NUVI. 062 1 ) CMFVS P06206 70

WRITE (NUVI. 0623 ) P062 068 0

76 NBS FORTRAN Test Programs Version 1
Ctt.tt TEST OF AHAXl - REAL ARGUMENTS AND FUNCTION « . 2/20P0620690

Cj».» *,.*..* TWO A R G U M E N T S FOR A M AX.1 P 0 620700

WRITE ( NUVI ,0624) P062071

0

CMAVS = 102. OEO P0620720

CMBVS = +76.12 P0620730

CMCVS = -85 . 43E1 P0620740

'• CMDVS = -0.986 P0620750

CMEVS = AMAX1 ( CMAVS , CMBVS ) P0620760

CMFVS = CMEVS - 102. OEO P0620770

WRITE (NUVI, 0621) CMFVS P0620780

CMEVS = AMAX1 ( CMBVS , CMCVS) P0620790

CMFVS = CMEVS - 76.12 P0620800

WRITE (NUVI, 0621) CMFVS P062 08 1 0 CMEVS = AMAX1 ( CMDVS . CMCVS

)

P0620820

CMFVS = CMEVS + 0.986 P0620830

WRITE (NUVI, 0621) CMFVS P0620840

MCGVI = 2 P0620850

WRITE (NUVI, 0622) MCGVI P0620860

C*t*t« THREE ARGUMENTS FOR AMAX1 P0620870

CMEVS = AMAX1 ( CMCVS, CMBVS, CMAVS) P0620880

CMFVS = CMEVS - 102. OEO P0620890

WRITE (NUVI, 0621) CMFVS P0620900

CMEVS = AMAX1 ( CMDVS , CMBVS , CMCVS) P062091

0

CMFVS = CMEVS - 76.12 P0620920

WRITE (NUVI, 0621) CMFVS P0620930

CMEVS = AMAX1 ( CMCVS , CMCVS , CMCVS) P0620940

CMFVS = CMEVS - CMCVS P0620950

WRITE (NUVI, 0621) CMFVS P0620960

MCGVI = 3 P0620970

WRITE (NUVI, 0622) MCGVI P0620980

C«t«** FOUR OR FIVE ARGUMENTS FOR AMAX1 P0620990

CMEVS = AMAX1 ( CMAVS , CMBVS , CMCVS , CMDVS) P062 1 00 0 CMFVS = CMEVS - 102. OEO P0621010

WRITE (NUVI, 062 1 ) CMFVS P0621020

CMEVS = AMAX1 ( CMAVS , CMCVS , CMDVS , CMBVS. CMAVS) P0621 030

CMFVS = CMEVS - 102. OEO P062 1 0 40

WRITE (NUVI, 0621) CMFVS P062 1 0 5 0 WRITE (NUVI , 062 3 ) P062 1 060

C***** TEST OF MAXO - INTEGER ARGUMENTS AND FUNCTION 8.2/21P0621070

C«»*** TWO ARGUMENTS FOR MAXO P062 1 0 8 0 WRITE (NUVI ,062 8 ) P0621 090

MCEVI = MAXO ( MCAVI , MCBVI ) P0621 1 00

MCFVI = MCEVI - 128 P062 1 1 1 0 WRITE (NUVI, 0626) MCFVI P0621 1 20

MCEVI = MAXO ( MCCVI , MCDVI

)

P062 1 1 30

MCFVI = MCEVI + 8 P062 1 140

WRITE (NUVI, 0626) MCFVI P062 1 1 5 0 MCEVI = MAXO ( MCBVI , MCCVI ) P062 1 1 60

MCFVI : MCEVI - 64 P0621 170

WRITE (NUVI, 0626) MCFVI P062 1 1 8 0 MCEVI = MAX0(MCCVI , MCCVI) P0621 190

MCFVI = MCEVI - MCCVI P0621 200

WRITE (NUVI, 0626) MCFVI P062 1 2 1 0 MCGVI = 2 P0621220

WRITE (NUVI, 0622 ) MCGVI P062 1 23 0 C***«* THREE ARGUMENTS FOR MAXO P0621240

MCEVI = MAXO (MCCVI , MCBVI , MCAVI

)

P0621250

MCFVI = MCEVI - 128 P0621260

WRITE (NUVI, 0626) MCFVI P0621 270

MCEVI = MAXO(MCDVI , MCDVI , MCCVI ) P0621 280

MCFVI = MCEVI + 8 P062 1 290

WRITE (NUVI, 0626) MCFVI P0621300

MCGVI = 3 P0621310

WRITE (NUVI, 0622) MCGVI P0621320

Ct«««« FOUR OR FIVE ARGUMENTS FOR MAXO P0621 330

MCEVI = MAXO(MCDVI , MCCVI .MCBVI , MCAVI

)

P0621 340

MCFVI = MCEVI - 128 P0621350

WRITE (NUVI, 0626) MCFVI P0621360

NBS FORTRAN Test Programs Version 1 77
MCEVI = MAXO(MCAVI .MCCVI .MCBVI .MCDVI . MCBVI

)

P0621370

MCFVI : MCEVI - 128 P0621380

WRITE (NUVI.0626) MCFVI P0621 390

WRITE ( NUVI . 0623 ) P0621 400

C**«** TEST OF MAX1 - REAL ARGUMENTS AND I NTEGER FUNCTION 1J.2/22P0621410

c « * * * * TWO ARGUMENTS FOR MAX1 P0621 420

WRITE ( NUVI , 0 629 ) P0621 430

MCEVI = MAX1 ( CMAVS, CMBVS) P062 1 440

MCFVI = MCEVI - 102 P0621 450

WRITE (NUVI, 0 62 6 ) MCFVI P0621460

MCEVI : MAX1 ( CMBVS, CMCVS) P0 62 1 470

MCFVI - MCEVI - 76 P0621 480

WRITE (NUVI, 0626) MCFVI P0621 490

MCEVI = MAX1 ( CMDVS, CMCVS) P062 1 5 00

MCFVI = MCEVI + 0 P062 1 5 1 0 WRITE (NUVI, 0626) MCFVI P0621 520

MCGVI = 2 P0621 530

WRITE (NUVI, 0622) MCGVI P0621 540

C * * 1

1

* THREE ARGUMENTS FOR MAX1 P0 62 1 5 5 0 MCEVI = MAX1 ( CMCVS, CMBVS, CMAVS) P0621 560

MCFVI = MCEVI - 102 P0621570

WRITE (NUVI, 0626) MCFVI P0621580

MCEVI : MAX1 (CMDVS , CMCVS , CMBVS) P062 1 590

MCFVI = MCEVI - 76 P062 1 60 0 WRITE (NUVI, 0626) MCFVI P0621610

MCGVI = 3 P0621620

WRITE (NUVI, 0622) MCGVI P0621630

c « « * * « FOUR OR FIVE ARGUMENTS FOR MAX1 P 062 1 64 0 MCEVI = MAX1 ( CMAVS, CMBVS, CMCVS, CMDVS) P0621650

MCFVI = MCEVI - 102 P0621660

WRITE (NUVI, 0626) MCFVI P0621670

MCEVI = MAX1 ( CMAVS, CMCVS, CMBVS. CMAVS, CMDVS) P0621680

MCFVI = MCEVI - 102 P0621690

WRITE (NUVI, 0626) MCFVI P0621 700

WRITE (NUVI , 0623 ) P062 1 7 1 0

c * * * * * TEST OF DMAX1 - DOUBLE PRECISION ARGUMENTS AND FUNCTION J5 . 2/23P062 1 72 0

c * « t

«

* TWO ARGUMENTS FOR DMAX1 P0621 730

WRITE (NUVI , 9999 ) P0621 740

MCAVD = 23 . OD- 1 P0621 750

MCBVD = 111. 789789D0 P0621 760

MCCVD = -99.66D-1 P0621 770

MCDVD = -456 . 1 23D0 P0621780

MCEVD : DMAX1 (MCAVD, MCBVD) P0621 790

MCFVD = MCEVD - 1 1 1 . 789789D0 P0621 800

WRITE (NUVI, 0627) MCFVD P0621810

MCEVD = DMAX1( MCAVD. MCCVD) P0621820

MCFVD = MCEVD - 23.0D-1 P0621 830

WRITE (NUVI. 0627) MCFVD P062 1 840

MCEVD = 0MAX1 (MCDVD. MCCVD) P0621850

MCFVD = MCEVD + 99.66D-1 P0621 860

WRITE (NUVI, 0627) MCFVD P0621870

MCEVD = DMAX1 (MCDVD. MCDVD) P062 1 8 8 0 MCFVD = MCEVD - MCDVD P062 1 890

WRITE (NUVI, 0627) MCFVD P0621900

MCGVI = 2 P0621910

WRITE (NUVI, 0622) MCGVI P0621920

c * t *

«

* THREE ARGUMENTS FOR 0MAX1 P0621930

MCEVD = DMAX1 (MCAVD. MCCVD. MCBVD) P062 1 940

MCFVD = MCEVD - 111 . 78 9 789D0 P0621950

WRITE (NUVI, 0627) MCFVD P0621960

MCEVD = DMAX1 (MCCVD. MCDVD, MCAVD) P0621970

MCFVD = MCEVD - 23.0D-1 P0621980

WRITE (NUVI, 0627) MCFVD P062 1 990

MCEVD = DMAX1 (MCCVD, MCCVD. MCDVD) P0622000

MCFVD = MCEVD + 99.66D-1 P0622 0 1 0 WRITE (NUVI. 0627) MCFVD P0622020

MCGVI = 3 P0622030

WRITE (NUVI, 0622) MCGVI P0622040

78 NBS FORTRAN Test Programs Version 1
C«t«tt FOUR OR FIVE ARGUMENTS FOR DMAX1 P062Z050

MCEVD = DMAX1(MCAVD,MCCVD,MCBVD,MCDVD) P0622060

M C F V D = M C E V b - 1 1 1.78 9 78900 P 0 6 2 2 0 7 0 WRITE (NUVI.0627) MCFVD P0622080

MCEVD = DMAX1 (MCCVD, MCCVD, HCbvb.MCBVb.MCAVD) PO 62 2 09 0 MCFVD = MCEVD - 111.78978900 P0622100

W R ! T E ( N U V I , 0 6 2 7 ) M C F V D P 0 6 2 2 1 1 0 WRITE (NUVI.0623) P0622120

WRITE (NUVi,9998 ) P 0622 1 3 0 0621 FORMAT ( F1 1 . 1 ) P0622 U0

0622 FORMAT ( 15X , 9H END OF . I 2 , 1 5H-ARGUMENf TEST T) P0622 1 5 0 0623 FORMAT ( 15X.31H END OF 4-. OR 5-ARGUMENT TEST.) P0622 1 60

0'62'4 FORMAT ( /2X,15HTEST OF AMAX1--) P0622 1 70

0625 FORMAT ( /2X,15HTEST OF AMAXO--) P0622180

0626 FORMAT ( 110) P0622 1 96

0627 FORMAT ( D22.10) P0622200

0628 FORMAT (2H1 ,14HTESt OF MA)<0--) P0622 2 1 0 0629 FORMAT ( /2X,14HTEST OF MAX1--) P0622220

9998 FORMAT (/ 39H THE ABOVE ANSWERS SHOULD ALL BE 0 FbR/'2X'. P0622 230

135HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0622240

999'9 FORMAT ( / 2X , 1 5 HTE ST 0 F DMAX1--) P0622 2 5 0 C*«*t« END OF TEST SEGMENT 062 P0622260

CV«T*« WHEN EXECUTING ONLY SEGMENT 062 , THE STOP AND " END " CARDS P06222 70

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0622280

t'*"*"**'* IN COLUMNS 1 AND 2 REMOVED. P0622290

C= STOP P0622300

C: = "" END P06223 1 0 STOP P062C1

END P062C2

C***********t*t*«t«*«***«***************«**t***«»**«**tt«««t**«tt*t«*t*«P0630010

C* * * * * P063 0 020' C**-**,* IFMIN - ( 063) P063 0 0 3 0

C * *'*'*

* PO 63 0 0 40

C****«**t t** tt***tttt*tt********<r**«t*t**t**»«*******«*««ttt**«**«**P0630050

C * * GENERAL PURPOSE ASA RE F P 0 6 3 0 0 6 0 C**»** TEST INTRINSIC FUNCTIONS AM I N 0 . AM I N 1 , M I N 0 . M I N 1 AND 8.2 P063 0 0 70

C***** DMIN1 -- CHOOSING SMALLESTVALUE. (TABLE 3)P0 63 0 0 8 0 C***** P0630090

C **« * « s P E C I F I C A T 10 N S SEGMENT 0 63 P 063 0 1 0 0 C***** P001 1 450

C * * * » * WH E N E XE C U T I N G O N L Y S E G M E N T 0 6 3 , THE S P E C I F I C AT I ON 3 j-;^ j-^j^-^-f,Ys p 0 0 1 1 4 5 5 C*««** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0011460

C ** * * * I N C 0 L U M N S 1 AN D 2 REMOVED. P 0 0 1 1 4 6 5 C«**** P001 1470

C= DOUBLE PRE C I S I ON MCAVD ,MCBVO . MCCVD , MCDVD . MCEVD . HCFVb POO 11 475

C* * * * * P0 0 1 1 480

DOUBLE PRE C I S I ON M CAVD , M C BVD,M C CVD , MCDVD , MCE VD , MCFVD P063A1

C«t«*« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0630110

C * * * P 0 0 7 1 2 2 6 C***** WHEN EXECUTING ONLY SEGMENT 063, THE FOLLOWING STATEMENT P0071225

C***tt NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P00 7 1 23 0' C***** P0071235

C= NUVI = 6 POO 7 1240

NUVI = 6 P063B1

C *'*** POO 7 1245

WRITE (NUVI, 0630) P0630120

0630 FORMAT ( 1 H 1, 1 X , 3 5 H I FM I N - ( 063 ) INTRINSIC FUN CT I ONS- - / 1 3X, 2 7HAH I NOP 063 0 1 3

0

1 ,AMIN1 ,MIN0,MIN1 ,DMIN1 / 2X,14HASA REF. - 8 . 2 / / 2X , 7HRESU LTS ) P0630140

C»*«t, TEST OF AMINO - INTEGER ARGUMENTS, REAL FUNCTION 8 . 2 / 2 4P 0 6 3 0 1 5 0 C***«« TWO ARGUMENTS FOR AMINO P0630160

WRITE ( NUVI , 063 5 ) P0630 1 70

MCAVI = 128 P0630180

MCBVI = 64 P0630 1 90

MCCVI = -8 P0630200

MCbVI = -4096 P063 0210

CMEVS = AMINO(MCAVI , MCBVI ) P0630220

CMFVS = CMEVS - 64. () P0630230

WRITE (NUVI, 0631) CMFVS P0630240

NBS FORTRAN Test Programs Version 1 79
CMEVS = AHINO(MCDVI .MCCVI ) P0630250

CMFVS = CMEVS 4096.0 P0630Z60

WRITE (NUVI.0631 ) CMFVS P06302 76

CMEVS = AMINO(MCBVI, MCCVI) P0630280

CMFVS = CMEVS +8.0

WRITE (NUVI.0631) CMFVS

MCGVI =2

WRITE (NUVI,0632) MCGVI

C«;«tt THREE-ARGUMENT TEST FOR AMINO

CMEVS = AMI NO (MCAVI . MCCVI . MCBVI

)

CMFVS = CMEVS + 8.0

WRITE (NUVI,0631) CMFVS

CMEVS = AMINO(MCBVI , MCBVI .MCDVI)

CMFVS = CMEVS + 4096.0

WRITE (NUVI,0631) CMFVS

MCGVI = 3 WRITE (NUVI,0632) MCGVI

C««tt« FOUR OR FIVE ARGUMENTS FOR AMINO

CMEVS = AM I NO ( MCAVI , MCCVI , MCDVI .MCBVI)

= CMEVS + 4096.0

(NUVI,0631) CMFVS

= AMIN0(MCCVI, MCBVI. MCCVI. MCAVI. MCDVI)

= CMEVS + 4096 .0 (NUVI.0631) CMFVS

CMFVS

WRITE

CMEVS

CMFVS

WRITE

WRITE

C * * * « t c * * * t

«

( NUVI , 063 3 ) TEST OF AMIN1

TWO ARGUMENTS

WRITE (NUVI, 063 4 )

- REAL ARGUMENTS

TEST FOR AMIN1

REAL FUNCTION

P0630290

P0630300

P 0 6 3 0 3 1 0 P0630320

P0630330

P0630340

P0630350

P0630360

P 0 6 3 0 3 7 0 P0630380

P 0 6 3 0 3 9 0 P0630400

P 0 6 3 0 4 1 0 P0630420

P0630430

P0630440

P0630450

P0630460

P0630470

P0630480

P0630490

2/25P0630500

P063 0 5 1 0 P0630520

CMAVS = 26.5 P0630530

CMBVS = 9.6666 P0630540

CMCVS : -1 . 65 P0630550

CMDVS = -10.001 P0630560

CMEVS = AMI N1 ( CMBVS , CMDVS) P0630570

CMFVS : CMEVS + 10.001 P0630580

WRITE (NUVI.0631) CMFVS P0630590

CMEVS = AMIN1 (CMAVS, CMBVS) P0630600

CMFVS = CMEVS - 9.6666 P063061

0

WRITE (NUVI, 0631) CMFVS P0630620

CMEVS = AMIN1 (CMCVS, CMDVS) P0630630

CMFVS = CMEVS + 10.001 P0630640

WRITE (NUVI, 0631) CMFVS P0630650

CMEVS = AMI N1 ( CMCVS , CMCVS) P0630660

CMFVS = CMEVS + 1.65 P0630670

WRITE (NUVI, 0631) CMFVS P0630680

MCGVI = 2 P0630690

WRITE (NUVI, 0632) MCGVI P0630700

C*«*** THREE-ARGUMENT TEST FOR AMIN1 P063071

0

CMEVS = AMIN1 (CMBVS, CMCVS, CMDVS) P0630720

CMFVS = CMEVS + 10.001 P0630730

WRITE (NUVI, 0631) CMFVS P0630740

CMEVS = AMI N1 ( CMBVS , CMBVS. CMBVS) P0630750

CMFVS = CMEVS - 9.6666 P0630760

WRITE (NUVI, 0631) CMFVS P0630770

CMEVS = AMIN1 ( CMAVS, CMBVS. CMCVS) P0630780

CMFVS : CMEVS + 1.65 P0630790

WRITE (NUVI.0631) CMFVS P0630800

MCGVI = 3 P0630 8 1 0 WRITE (NUVI. 0632) MCGVI P0630820

Ct»«*« FOUR OR FIVE-ARGUMENT TEST FOR AMIN1 P0630830

CMEVS = AMIN1 ( CMAVS. CMBVS. CMCVS. CMDVS) P0630840

CMFVS : CMEVS * 10.001 P0630850

WRITE (NUVI.0631) CMFVS P0630860

CMEVS = AMI N1 ( CMAVS . CMCVS . CMBVS . CMCVS. CMDVS) P0630870

CMFVS = CMEVS + 10.001 P0630880

WRITE (NUVI.0631) CMFVS P0630890

WRITE (NUVI .0633 ) P0630900

C t « « «

c * * * *

«

TEST OF MINO

TWO-ARGUMENT

- INTEGER ARGUMENTS

TEST FOR MINO

INTEGER FUNCTION 2/26P0 63 09 1 0 P0630920

80 NBS FORTRAN Test Programs Version 1
WRITE (NUVI,0636) P0630930

MCEVI = MINOCMCBVI .MCAVI ) P0630940

H C F V I = M C E V I - 6 4 P 0 6 3 0 9 5 0 WRITE <NUVI.0639) MCFVI P0630960

MCEVI = MINO(MCBVI ,MCCVI ) P0630976

MCFVI = MCEVI + 8 P0630980

WRITE (NUVI, 0639) MCFVI P0630990

MCEVI = MINOCMCCVI ,MCDVI) P0631000

MCFVI = MCEVI + 4096 P0 63 1 0 1 0 WRITE (NUVI, 0639) MCFVI P0631020

MCEVI = MINO(MCAVI ,0) P0631030

WRITE (NUVI, 0639) MCEVI P0631040

MCGVT = 2 ' P0631050

WRITE (NUVI. 0632) MCGVI P0631060

CiTiT* THREE-ARGUMENT TEST FOR MINO P063 1 0 70

MCEVI = M I NO ( MCAVI , MCCVI . MCBVI ) P0 63 1 0 2 0 MCFVI = MCEVI + 8 P063 1 090

WRITE (NUVI, 0639) MCFVI P0631100

MCEVI = MIN0(MCCVI , MCAVI .MCbVI ) P063 1 1 1 0 MCFVI = MCEVI + 4096 P0631120

WRITE (NUVI. 0639 ) MCFVI P063 1 1 30

MCGVI = 3 P0631140

WRITE (NUVi. 0632 ) MCGVI P063 1 1 5 0 C***** FOUR OR FIVE-ARGUMENT TEST FOR MINO P0631160

MCEVI = MINO(MCBVI , MCAVI , MCCVI .MCDVI ) P063 n70

MCFVI = MCEVI + 4096 P0631180

WRITE (NUVI, 0639 ) MCFVI P063 1 1 90

MCEVI = MIN0(MCAVI , MCBVI , MCAVI , MCCVI , MCDVI) P0631200

MCFVI = MCEVI + 4096 P063 1 2 1 0 WRITE (NUVI, 0639) MCFVI P0631220

WRITE (NUVI. 0633) P0631230

C*«*** TEST OF MINI - REAL ARGUMENTS. INTEGER FUNCTION 8 . 2 / 2 7P 0 6 3 1 2 4

0

C«T*T* TWO-ARGUMENT TEST FOR MINI P0631250

WRITE (NUVI. 0637) P0631260

MCEVI = MI N1 ( CMAVS , CMBVS) P063 1 2 70

MCFVI = MCEVI - 9 P0631280

WRITE (NUVI, 0639 ) MCFVI P063 1 290

MCEVI = MINI (CMCVS. CMDVS) P0631300

MCFVI - MCEVI + 10 F'063 1 3 ld

WRITE (NUVI, 0639) MCFVI P0631320

MCEVI = MINI (CMAVS. CMCVS) P063 1 33 0 MCFVI = MCEVI + 1 P0631340

WRITE (NUVI , 0639 ) MCFVI P063 1 3 5 () MCGVI = 2 P0631360

WRITE (NUVI, 0632 ) MCGVI P063 1 3 70

Ct*«** THREE-ARGUMENT TEST FOR MINI P0631380

MCEVI = MINI ( CMAVS , CMCVS . CMBVS) P063 1 396

MCFVI = MCEVI + 1 P0631400

WRitE (NUVI. 0639) MCFVI P0631410

MCEVI = MINI (CMAVS. CMCVS, CMDVS) P0631420

MCFVi = MCEVI + iO P063 1 43 0 WRITE (NUVI, 0639) MCFVI P0631440

MCGVI =3 P0631 450

WRITE (NUVI, 0632) MCGVI P0631460

C***«* FOUR OR FIVE-ARGUMENT TEST FOR MINI P0631476

MCEVI = M I N1 ( CMAVS , CMBVS , CMDVS , CMCVS) P063 1 4 8 0 MCFVI = MCEVI + 1 0 P063 1 490' WRITE (NUVI. 0639) MCFVI P0631500

MCEVI = MI N1 ( CMAVS . CMBVS , CMCVS. CMCVS, CMDVS) P0631510

MCFVI = MCEVI + 10 P063 1 520

WRITE (NUVI,063 9 ) MCFVI P063 1 5 3 0 WRITE (NUVI, 0633) P0631540

C*«t»« TEST OF DMIN1 - DOUBLE PRECISION ARGUMENTS, FUNCtiON 8 .2 / 2 8 P 0 6 3 1 5 5 0 C***«* TWO-ARGUMENT TEST FOR DMIN1 P0631560

WRITE (NUVI , 0 63 8 ) P 063 1 5 70

MCAVD = 6 1 . 1 2 3 4D0 P 063 1 5 8 0 MCBVD = 2.0D1 P0631590

MCCVD = -999.009D-1 P0631600

NBS FORTRAN Test Programs Version 1 81
HCOVD = -1 .900 P0631610

MCEVD = DHIN1 (MCAVO,,MCBVD) P063 1 620

MCFVb = MCEVD - 2.001 P063 f630

WRITE <NUVI,9996) MCFVO P0631640

MCEVO = OM I N 1 ( M C CvD , M CD vO

)

MCFVD = MCEVD + 999.0090-1

P0631 650

P063 1 660

WRITE (NUVI,9996) MCFVD

MCEVO = 0MIN1 (MCAVD.MCDVD)

P063 1 670

P063 1 680

MCFVD = MCEVD + 1.900

WRITE (NUVI,9996) MCFVO

P0631 690

P0631 700

MCGVI = 2 WRITE (NUVI,0632) MCGVI

P063 1 7 1 0 P063 1 72 0 C t * » t * THREE-ARGUMENT TEST FOR DMIN1

MCEVO = 0MIN1(MCAVD,MCBVD,MCDVD)

P063 1 73 0 P0631 740

MCFVD = MCEVD + 1 .900

WRITE (NUVI,9996) MCFVD

P0631 750

P0631 760

MCEVD = DM I N 1 ( MCAVD , MC CVD . MCBVD

)

MCFVD = MCEVD + 999.0090-1

P063 1 770

P0631 780

WRITE (NUVI,9996) MCFVD

MCGVI = 3

P 063 1 790

P0631 800

C t « * * t WRITE (NUVI,0632) MCGVI

FOUR OR FIVE-ARGUMENT TEST FOR 0MIN1

P 063 1 8 1 0 P 063 1 82 0 MCEVD = DM I N 1 ( M CAVD , M C CVD , M CBVO , M CDVD ) MCFVD = MCEVD + 999.0090-1

P063 1 830

P0631 840

WRITE (NUVI,9996) MCFVD

MCEVO = 0MIN1 (MCBVD. MCAVD, MCBVD, MCDVD.MCCVD)

P0 63 1 8 5 0 P0631 860

MCFVD = MCEVO + 999.0090-1

WRITE (NUVI,9996) MCFVD

P063 1 870

P0631 880

WRITE (NUVI, 0633)

WRITE (NUVI, 9997)

P063 1 890

P0631900

0631

0632

FORMAT ( F 1 1 . 1 ) F0RMAT( 15X. SH END OF , I 2 , 1 5H-ARGUMENT TEST.)

P0631 91

0

P0631920

0633

0634

FORMAT ( 15X, 30H END OF 4 OR 5-ARGUMENT TEST.)

FORMAT ( /16H TEST OF AMIN1 ) P0 63 1 93 0 P0631940

0635

0636

FORMAT ( /16H TEST OF AMINO ) FORMAT ( /16H TEST OF MINO ) P063 1 950

P0631 960

0637

063«

FORMAT ( 16H1 TEST OF MINI ) FORMAT ( /16H TEST OF 0MIN1 ) P0631 970

P0631980

0639

9996

FORMAT ( 110)

FORMAT ( 022.10)

P063 1 990

P0632000

9997

1 FORMAT ( /39H THE ABOVE ANSWERS SHOULD ALL BE 0 F0R/1X,36H THIS TEST SEGMENT TO BE SUCCESSFUL.)

P06320 1

0

P0632020

C t * 1 1 * c * * * t * END OF TEST SEGMENT 063

WHEN EXECUTING ONLY SEGMENT 063, THE STOP AND END CARDS

P0632030

P0632040

c « * t «

«

c » * » »

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

P0632050

P0632060

c=

c= STOP

END

P0632070

P0632080

STOP

END

P063C1

P063C2

C * t * «

t

C * t « 1

1

*t«ttt«t«*«*«****««t«ttt«**«»«tt«t*tt«***«****«*«tt«titt«****«*««*p0640010

P0640020

c * « * * * c * « * * * IFDSG - (064) P0640030

P0640040

c * « * * t c * « t «

t

tttttttttttttttttttttttttttttttttttttttttttttttttttttttt

GENERAL PURPOSE

**t*t***«*P0640050

ASA REF P0640060

C t * * 1

1

c « * « * * TEST INTRINSIC FUNCTION OSIGN (TRANSFER OF SIGN WITH

DOUBLE PRECISION ARGUMENTS AND FUNCTION)

8 . 2/33P0 640 0 70

(TABLE 3)P0640080

C t * * * c * * * * * SPECIFICATIONS SEGMENT 064

P0640090

P06401 00

c * * * * t c * * « *

«

WHEN EXECUTING ONLY SEGMENT 064, THE SPECIFICATION STATEMENTS

P001 1 490

P001 1 495

c * « * « « C t * * t * WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

P00 1 1 5 00

P001 1 505

c * « 1 1

«

c= DOUBLE PRECISION MCAVO . MCBVD . MCCVD . MCOVD . MCEVO , MCFVO

P001 1 51 0 P001 1 51 5

c * « * * t DOUBLE PRECISION MCAVO . MCBVD . MCCVD , MCOVD , MCEVO , MCFVO P064A1

P0 0 1 1 520

82 NBS FORTRAN Test Programs Version 1
C*«*** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P06';0110

C***** P0071250

C«**"** WHEN EXECUTING ONLY SEGMENT 064 . THE FOLLOWING STATEMENT P 0 0 7 1 2 5 5 C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071260

C'*'*'*"*"« P0 0 7 1 26 5 C= NUVI = 6 P0071270

NUVI = 6 P064B1

C***** P0071275

WRITE (NUVI , '0 640 ) P 0 6 4 0 1 2 0 0640 FORMAT ( 1 H 1 . 1 X . 3 4 H I F D S G - ( 064 ) INTRINSIC F U N C T I 0

N - - / 1 6X , 2 4 H D S I G N P06 4 0 1 3 0 KTRANSFER OF SIGN)/ 2X.14HASA R E F . - 8 . 2 / / 2X . 7HRESULTS ) P06 4 0 U0

C*«*** HEADER FOR SEGMENT 064 WRITTEN P0640150

MCAVD = +9 . 5D0 P0640 1 60

MCBVO = 123.4567D1 P0640170

MCCVD = -5.66 5 01 P 06 4 0 1 8 0 MCDVD = -75.57D-0 P0640190

- MCEVD = DSIGN(MCAVD,MCBVD) P 064 0 2 0 0 MCFVD = MCEVD - 9.5D0 P0640210

WRITE (NUVI, 064 1 ) MCFVD P0 6402 2 0 MCEVD = DSIGN(MCBVD, MCCVD) P0640230

MCFVD = MCEVD + 1 2 3.4 5 67D1 P0 6 402 40

WRITE (NUVI, 0641) MCFVD P0640250

MCEVD = DS I GN( MCCVD, MCDVD) P 06 4 0 26 0 MCFVD = MCEVD + 5.665D1 P0640270

WRTTE (NUVI , 064 1 ) MCFVD P06 40 2 8 0 MCEVD = DSIGN(MCDVD, MCDVD) P0640290

MCFVD = MCEVD + 7 5.5 700 P064 0 3 00

WRITE (NUVI, 0641) MCFVD P0640310

WRITE (NUVI , 0642 ) P064 03 2(3 0641 FORMAT (1H0,D30.18) P0640330

0642 FORMAT (1H0,1X,38HALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/ " PO 64 03 4 0 12X,30HTEST SEGMENT TO BE SUCCESSFUL.) P0640350

C**«** END OF TEST SEGMENT 064 P0640360

C***** WHEN EXECUTING ONLY SEGMENT 064, THE STOP AND END CARDS P0640370

t*'*"*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P06 4 0 3 8 0 C***** IN COLUMNS 1 AND 2 REMOVED. P0640390

C= STOP P0640 4 0 0 C= END P0640410

STOP P064C1

EN DP 0 6 4 C

2

C**********<t**iit**«:*******««: t** it«t*****t «** *ttt*******t*******trt«P0650010

C***** P0650020

C*'* * * * I FD I M -

'( 065 ) P06 5 003()

C « *

* « * P 0 6 5 0 0 4 0 C******«******«t**«t*t<t*«*»t*******t*****tt****ii*«;»t****«*******t*t*ttt*P0650050

C««*«« GENERAL PURPOSE ASA REF P0650060

C***** TEST INTRINSIC FUNCTION DIM AN D I D I M

-

- PO S I T I VE 8.2 P0 6 5 0 0 70

C***** DIFFERENCE. WHICH IS DEFINED AS A1 - MIN(A1,A2) (TABLE 3)P0650080

C ***** ' P 0 6 5 0 090

C***** NO SPECIFICATIONS SEGMENT 065 P0650100

C « OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0650110

C** *** WHEN EXECUTING ONLY SEGMENT 065, THE FOLLOWING STATEMENT P0071280

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0 0 7 1 2 8 5 C***** P0071290

C= Niivi = 6 P007 1 295

NUVI = 6 P065B1

WRITE (NUVI, 0650) P0650120

0650 FORMAT ( 1 H 1 . 1 X , 3 9H I F D I M - ( 065 ) INTRINSIC FUNCTIONS - DIM/12X, P06 5 0 1 3 0 130HAND IDIM (POSITIVE DIFFERENCE)/ 2X,14HASA REF. - 8.2/ P06 5 0i40

2/2X, 7HRESULTS) P0650150

C***«« HEADER FOR SEGMENT 06 5 WRITTEN P06 5 0 1 60

C**«** TEST OF DIM - -EAL ARGUMENTS, REAL FUNCT+ON C2 / 3 4P 0 6 5 0 1 7

0

CMAVS = -4.6 P0650180

CMBVS = 4.0 P0650190

CMCVS = 16.25 P06 5 02 0 6 CMDVS = -64.25 P0650210

CMEVS = DIM(CMAVS, CMBVS) P06 5 0220

CMFVS = CMEVS + 0.0 P0650230

NBS FORTRAN Test Programs Version 1 83
WRITE (NUVI.0651) CMFVS P0650240

CMEVS = OIM< CMCVS, CMDVS) P0650250

CMFVS = CM EVS - 8 0.5 P0'6 5 0Z60

WRITE (NUVI.0651) CMFVS P0650270

CMEVS = DIM( CMCVS, CMBVS) " P06 5 02 8 0 CMFVS = CMEVS - 12.25 P0650290

WRITE (NUVI,0651) CMFVS " P0650300

CMEVS = DIM(CMOVS, CMAVS) P0650310

CMFVS = CMEVS - 0.0 P 06 5 03 2 0 WRITE (NUVI,0651) CMFVS P0650330

C**t«» TEST OF IDIM - INTEGER ARGUMENTS, INTEGER FUNCTION 8'. 27 3 5 PC 6 5 0 3 4 0 MCAVI = 02468 P0650350

MCBVI = +36 P06 5 0 360

MCCVI = -3 P0650370

MCDVI = -23 PC 6 5 03 8 0 MCEVI = IDIM(MCAVI .MCBVI ) P0650390

MCFVI = MCEVI - 2432 P06 5 0 40 0 WRITE (NUVI,0652) MCFVI P0650410

MCEVI : IDIM(MCBVI , MCCVI) P0650420

MCFVI = MCEVI - 39 P0650430

WRITE (NUVI,06 5 2 ) MCFVI P 06 5 0 440

MCEVI = IDIM(MCDVI .MCCVI) P0650450

MCFVI : MCEVI + 0 P 06 5 0 460

WRITE (NUVI.0652) MCFVI P0650470

MCEVI = IDIM(MCCVI , MCCVI ) P0 6 5 0 4 8 0 WRITE (NUVI,0652) MCEVI P0650490

MCEVI = IDIMCMCCVI , MCBVI ) P0650500

WRITE (NUVI,0652) MCEVI P0650510

WRITE (NUVI ,065 3 ) ' P0 6 5 0 5 2 0 0651 FORMAT (1H0,F17.2) P0650530

06 5 2 FORMAT ( 1 H 0 , 1 0 X , I 5 ) P06 5 0 5 40

0653 FORMAT (1H0.1X.34H ALL ABOVE ANSWERS SHOULD BE 0 F0R/2X, P0650550

135HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0 6 5 0 5 60

C***tt END OF TEST SEGMENT 065 P0650570

C***** WHEN EXECUTING ONLY SEGMENT 065 THE STOP AND END CARDS P0650580

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0650590

C**T** IN COLUMNS 1 AND 2 REMOVED. P 06 5 0 60 0 C= STOP P0650610

C = END P 0 6 5 0 6 2 0 STOP P065C1

END P06 5 C2

£,ttiitii*t*ttiit*iitti[ttti[tiittt*tiiii**tii*ttiit**tt*ttt*t*t*t*iittt*ttttii*t*ttt*pObbOO^O

C* * * * *

'. 7'"' P 0660 02 6 C**.*.** IFSGL - ( 066 ) P0 660 03 0 C***** P0660040

Q*****tt*tirtt*t*t***t*ttt*ttt**<ttt*t**t*«*t*ttttt«««**««tt*t**********itP0660050

C***** GENERAL PURPOSE AS A R E F P 0 6 6 0 0 6

0

C**t*« TEST INTRINSIC FUNCTION SNGL - OBTAIN MOST SIGNIFICANT 8 . 2 / 3 6 P 0 6 6 0 0 7 0 C**.*« PART OF DOUBLE PRECISION ARGUMENT. (TABLE 3)P0660080

C****» GENERAL COMMENTS P0660090

C***»» ASSIGNED GO TO STATEMENT ASSUMED WORKING. P 0 660 1 0 0 C***** P0660110

C***** S PEC I F I C A T I 0 N S SEGMENT 0 66 P 0660 1 20

C***** POOl 1530

C * **** W H E N EXE CUT I N G 0 N L Y S E G M E N T 0 6 6 , T H E SPEC I F I CAT I ON S T A,T E M E N t S P 0 0 1 1 5 3 5 C*»««* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0011540

C**t** IN COLUMNS 1 AND 2 REMOVED. P00 1 1 5 4 5 C***** POOl 1 550

C = DOUBLE P R E C I S I 0 N M C A V D , M C B V D , M C C V D , M C D V D , M C E V D , M C F V 0 , POOl 1 5 5 5 C= 1 CMAVD, CMBVD.CMCVD P0011560

DOUBLE PRECISION M CAVD , M C B VD , M C C VD , M CD VD , M CE VD , M C F VD P 066A1

1 CMAVD, CMBVD,CMCVD P066A2

C**'*"** POOl 1565

C****t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0660130

" « * *'* * P 0 0 7 1 3 0 0 C**»*« WHEN EXECUTING ONLY SEGMENT 066, THE FOLLOWING STATEMENT P0071305

L*»»«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071310

C= NUVI = 6 P0071315

84 NBS FORTRAN Test Programs Version 1
NUVI = 6

C t « t «

t

0660

WRITE (NUVI. 0660)

FORMAT (1H1 . 1X,39HIFSGL - i26H0BTAIN MOST SIGNIFICANT

218H OF D.P. ARGUMENT. //2X

C * * * * *

(066) INTRINSIC

PT/16X,

, 1 5HASA REFS . - HEADER for SEGMENT 066 WRITTEN

MCAVD = .4874874874874803+. 57D-5+ . 56046450

MCBVD =-39. 6895396095390 1 -.57D-5-.5604645D

MCCVD = . 3 3 33 3 3 3 3 3 3 3 3 3 300 + . 5 70- 5 + . 560 464 5 0 MCOVD =-.6666666666666600-. 5 7D-5+. 56046450

MCEVD = . 4 8 748 7 4 8 7 4 8 74 803 + . 5 70- 5 + . 5 60 464 5 0 MCFVD = -39.6895396095390+1

AVS =0.0

P066B1

P0071320

P06601 40

FUNCTION SNGL--/16X,, P0660 1 50

P0660160

8.2//2X,7HRESULTS) P0660170

P06601 80

317865095470-7 P0660190

317865095470-7 P0660200

317865095470-7 P0660210

317865095470-7 P 0 6 6 0 2 2 0 31 786509547D-7 P0660230

P0660240

P0660250

-6 + -6-

-6 + -6-

-6 +

BVS = 0.0

CVS =0.0

ivi =2

C*«*«* EXPRESSION RESULTS ASSIGNED TO O.P. RESULT FOR VISUAL

CitTt* ARGUMENTS OF SNGL - VARIABLE, SIMPLE EXPRESSION

CMAVO = AVS + SNGL(MCAVO) - BVS

WRITE (NUVI, 661) MCAVO, CMAVO

CMAVO = CVS + SNGL(MCBVO) + AVS

WRITE (NUVI, 661) MCBVO, CMAVO

CMAVO = SNGL(MCCVD)

WRITE (NUVI, 661) MCCVO, CMAVO

CMBVD = -MCBVO

CMAVO = -SNGL(MCBVO - CMBVO)

CMCVO = - (MCBVO + MCBVO)

WRITE (NUVr,661) CMCVO, CMAVO

CMCVO = MCDVO * MCDVD

CMAVO = BVS + SNGL (MCOVO** IVI) + cVS

WRITE (NUVI, 661) CMCVO, CMAVO

C*;T** ARGUMENT OF SNGL - I N T R I N S I C F U N CT I 0 N W I T

H

CMAVO = -(CVS + SNGL(OABS(MCDVD) ) + BVS)

WRITE (NUVI, 661) MCOVO, CMAVO

CMAVO = AVS - BVS + S NG L ( DM I N 1 ( M CE VD , M C F VD )

)

WRITE (nUVI/661 ) MCFVD, CMAVO

CMAVO = CVS + BVS + S NG L ( DMAX I ( M C CVD . M CE VO , M C F VD )

)

WRITE (NUVI ,661 ) MCEVD, CMAVO

WRITE (NUVI, 662)

66l FORMATdHO, 1X,6HLINE A , 02 5 . 1 4 / 2)( ,'6HL INE' B, 02 5 .'u')

662 FORMAT(33H0 LINE B SHOULD AGREE WITH LINE A /40H ONLY TO

AISION OF A REAL DATUM. /37H REMAINING DIGITS RESULT FROM

B 33H CONVERSION WHEN A REAL VALUE IS / 32H ASSIGNED TO 0 CPRINTING. ) C«***« END OF SEGMENT 066

C*V*** WHEN EXECUTING ONLY SEGMENT 066, THE STOP AND END CARDS

DIFFERENT NO. OF ARG

P0660260

P0660270

P0660280

COMPARI SONP0660290

P0660300

P0 66 0 3 1 0 P0660320

P0660330

P0660340

P0660350

P0660360

P0660370

P0660380

P0660390

P0660400

P066041

0

P0660420

P0660430

P 0660 44 0 P0660450

P 0 6 6 0 4 6 0 P0660470

P 0 6 6 0 4 8 0 P0660490

P0660500

P0660 5 1 0 P 0 6 6 0 5 2 0 THE PRECP0660530

OUTPUT /P0660540

.P. FOR P0660550

P0660560

P0660570

P 0 6 6 0 5 8 0 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

£*"*Tn 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

C= IN COLUMNS P0660590

P0660600

P066061

0

P0660620

P066C1

P066C2

C****t*«*******4r****«:*i;*********«******«**«************«it*****tt******ttP0670010

C*

**'*'*

' P0670020

C * * t * * I F R E L : ( . 0 ,6 7 ) P 0 6 7 0 0 3 0

C * '*'*«'* P0670040

C*«*«***t«***««*****tt*««*«******«******««*«***«******t*****«**«*******»P0670050

C*t*** GENERAL PURPOSE

C***t* TEST INTRINSIC FUNCTION REAL (OBTAIN REAL PART OF

ASA REF P0670060

8.2/39P0670070

COMPLEX ARGUMENT )

.

S P E C I F I C A T I 0 N S SEGMENT 067

C * * « * * c * * * * * c * * * * * c * * * *

«

C * *** * WHEN E )( E C U 1 1 N G 0 N L Y SEGMENT 06 7 , THE S P E C I F I CAT I ON S fA T E M E N fS' C«**** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C**"*'** IN COLUMNS 1 AND 2 REMOVED.

C * * * «

(TABLE 3)P0670080

P0670090

P0670100

P001 1 570

P0011575

POO 1 1 580

P 0 0 1 1 5 8 5 POO 1 1 590

NBS FORTRAN Test Programs Version 1 85
C= COMPLEX CHAVC. CHBVC, CHCVC, CHDVC, CHEVC, CHFVC

COMPLEX CHAVC, CHBVC, CHCVC. CHDVC, CHEVC, CHFVC

P0 0 1 1 595

P067A1

C t « * «

«

C***t« 0 u TPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P0 0 1 1 60 0 P06701 10

c * t «

C***»* WHEN EXECUTING ONLY SEGMENT 067, THE FOLLOWING STATEMENT

P0071330

P0071 335

C* * * * * NUVI

C= NUVI =

= 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

6 P0071 340P0071 345

NUVI =

c « * * * * 6 P067B1

P0071 350

WRITE

0670 FORMAT

(NUVI. 0670) P0670120

(1H1 .1X,34HIFREL - (067) INTRINSIC FUNCTION--/ 16X, 4 H RE AL / P 0 6 7 0 1 3

0

1 2X, UHASA REF. - 8.2//

2 2X, 7HRESULTS)

P06701 40

P06701 50

C**«** HEADER FOR SEGMENT 067 WRITTEN

CHAVC = (3.2, 1 .86)

P0670160

P06701 70

CHBVC

CHCVC

= (2.1 ,0.0)

= (3.7,-1 .2)

P06701 80

P0670190

CH.DVC CHEVC

= (+45.1 ,+2.2)

= (-16.0. 0.0)

P0670200

P 06 7 0 2 1 0 CHFVC

CMAVS

- (-32.0, -1.1)

= REAL(CHAVC)

P0670220

P0670230

CMBVS

CMAVS

= CMAVS - 3.2

: REAL(CHBVC)

P0670240

P0670250

CMCVS

CMAVS

= CMAVS - 2.1

= REAL(CHCVC)

P0670260

P0670270

CMDVS

CMAVS

= CMAVS - 3.7

= REAL(CHDVC)

P0670280

P0670290

CMEVS

CMAVS

= CMAVS - 45.1

= ABS(REAL( CHEVC) + REAL(CHFVC))

P0670300

P06703 1

0

CMFVS

CMAVS

= CMAVS - 48.0

= AMAX 1 ( REAL ( CHAVC ). REAL ( CHBVC ) , REAL ( CHEVC- CHFVC ) ) P0670320

P0670330

CMGVS

WRITE

= CMAVS - 16.0

(NUVI, 0671) CMBVS. CMCVS. CMDVS. CMEVS, CMFVS, CMGVS

P0670340

P0670350

C***** REAL CONSTANTS HAVING ONLY FRACTIONAL PARTSCNO EXPONENT)

CHAVC - ( . 789 , . 1 2 ) P0670360P0670370

CHBVC

CHCVC

= (.13,1.2)

= ( .507,-2.2)

P0670380

P0670390

CHDVC

CHEVC

= ( + .5 40 1 , + .5 ) = (-.5,0.25)

P0670400

P 06 70 4 1 0 CHFVC

CMAVS

= ( - . 062 5 , 1 . 1 ) = REAL(CHAVC)

P0670420

P0670430

CMBVS

CMAVS

: CMAVS - .789

= REAL(CHBVC)

P0670440

P0670450

CMCVS

CMAVS

= CMAVS -0.13

= REAL(CHCVC)

P0670460

P0670470

CMDVS

CMAVS

: CMAVS -0.507

= REAL(CHDVC)

P0670480

P0670490

CMEVS

CMAVS

: CMAVS -0.5401

= REAL( CHEVC+CHFVC)

P0670500

P06705 1

0

CMFVS

CMAVS

= CMAVS + 0.5625

= REAL(CHEVC) - REAL(CHFVC)

P0670520

P0670530

CMGVS

WRITE

= CMAVS + 0.4375

( NUVI , 0671 ) CMBVS. CMCVS . CMDVS. CMEVS , CMFVS , CMGVS

P0670540

P0670550

C«««** REAL CONSTANTS HAVING ONLY INTEGRAL PARTS(NO EXPONENT) P0670560

C**«** 5 . 1 . 1 .2/22P0670570

CHAVC

CHBVC

= ( 23 . , 0 . 1 ) = ( 1 2 . , + 1 . 2 ) P0670580

P0670590

CHCVC

CHDVC

= ( 1 . , -2 . 3 ) = ( + 45 . . + . 6 ) P0670600

P067061

0

CHEVC

CHFVC

= (19.0. 1.0)

= (-32.0. 2.0)

P0670620

P0670630

CMAVS

CMBVS

= REAL(CHAVC)

= CMAVS - 23.0

P0670640

P0670650

CMAVS

CMCVG

= REAL(CHBVC)

: CMAVS - 12.0

P0670660

P0670670

CMAVS

CMDVS

= REAL(CHCVC)

= CMAVS - 1.0

P0670680

P0670690

S6 NBS FORTRAN Test Programs Version 1
CMAVS = REAL(CHOVC) P0670700

CMEVS = CMAVS - 45.0 P0670 7 U

CMAVS = S I GN ( D I M ( REAL < CHEVC ) . REAL ( CHFVC > ) . REAL ( CHFVC ) ) P0670 7<: CMFVS = CMAVS + 51.0 P0670730

CMAVS = REAL(('l'6.0,1 .0) + CHEVC + CHFVC) P06 70 740

CMGVS = CMAVS - 3.0 P0670750

WRITE (NUVI,0671) CMBVS , CMCVS . CMDVS , CMEVS , CMFVS . CMGVS P0670760

WRITE (NUVI,0672) P0670770

6671 FORMAT (/6(F20.4/)) P06 70 780

0672 FORMAT ( /40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS / P0670790

i32H TEST SEGMENT TO BE SUCCESSFUL.) P0 6 70 8 0 0 C***«* END OF TEST SEGMENT 067 P0670810

C*''**** WHEN EXECUTING ONLY SEGMENT 06 7, THE STOP AND END CARDS P06 7 0 8 2 0 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0670830

C"*"**"** IN COLUMNS 1 AND 2 REMOVED. P06 70 8 4 0 C= STOP P0670850

C

= END P 0 6 7 0 8 6 0 STOP P067C1

END P0 67 C2

Ct*lt************il:**<rilr«:ilr********«il;******t*«;«**it******t**t*********t*t****P0680010

C***** P0680020

C***** IF IMG - ( 068 ) PO 68 0 03 0 C«***« P0680040

C***«*«***« «** **********«***********»««**»********»*«****«***»***»*«P0680050

C***"*'* GENERAL PURPOSE ASA REF P0 6 8 0 060

C***«* TEST INTRINSIC FUNCTION AIMAG (OBTAIN IMAGINARY PART 8 . 2 / 4 1 P 0 6 8 0 0 7

0

C*T*T* OF COMPLEX ARGUMENT ) (TABLE 3)P06 8 0 0 8 0 C«**** P0680090

C«*«** S P E C I F I C A T I 0 N S SEGMENT 068 P068 0 1 00

C*»*** P0011610

C***** WHEN EXECUTING ONLY SEGMENT 068, T H E S P E C I F I C AT I 0 N STATEMENfS P0011615

C****» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0011620

C«*«** IN COLUMNS 1 AND 2 REMOVED. P0011625

C***** P0011630

C= COMPLEX CHAVC , CHBVC , CHCVC , CHDVC , CHEVC , CHFVC , CHGVCV'C^^^^ POO 1 1 63 5 C= 1 CHJVC, CHKVC, CHLVC P0011640

COMPLEX CHAVC, CHBVC, CHCVCVCHDVC, CHEVC /CHFVC, CHGVC, CHHVC. CHI VC, P068A1

1 CHJVC, CHKVC, CHLVC P068A2

C* * * « * P00 1 1 645

C * * * * * p U T P U T T A P E ASSIGNMENT STATEMENT, NO INPUT TAPE, P 0680 1 1 0

C * * * * * P 0 0 7 1 3 6 0 C****« WHEN EXECUTING ONLY SEGMENT 068, THE FOLLOWING STATEMENT P0071365

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0 0 7 1 3 70

C= NUVI = 6 P0071375

NUVI : 6 P068 B1 C****« P0071380

WRITE (NUVI ,068 0 ) P0680 1 2 0 0680 FORMAT ( 1 H 1

, 1 X , 4 0 H I F I MG - ( 068 ) INTRINSIC FUNCTION - AIMAG/16X, P068 0 1 30

119H0BTAIN IMAGINARY PT/16X,19H0F COMPLEX ARGUMENT/ 2X, P0680140

213HASA REF.- 8 . 2 / / 2 X , 7 H R E S U L T S ) P068 0 1 5 0 C««*t« HEADER FOR SEGMENT 0 68 WRITTEN P0680 1 60

Ct«*«« IMAGINARY PARTS OF COMPLEX NUMBERS HAVING BOTH INTEGRAL P0680170

C*«*** AND FRACTIONAL P ART S . ( N 0 E XP 0 N E N T ) P0680 1 80

CHAVC =(3.2,1.86) P0680190

'CHBVC = (2.1,6.0) P068 020 0 CHCVC = (37.0.-1.2) P0680210

CHDVC = ( + 45.1 ,+2.2) P0680220

CMAVS = AIMAG(CHAVC) P0680230

CMBVS = CMAVS - 1.86 P0680240

CMAVS = AIMAG(CHBVC) - P0680250

CMCVS = CMAVS - 0 . 0 P068 0260

CMAVS = AIMAG(CHCVC) P0680270

CHDVS = CMAVS + 1.2 P068 02 8 0 CMAVS = AIMAG(CHDVC) P0680290

CMEVS = CMAVS -2.2 P068 0 30 0 WRITE (NUVI, 0681) CMBVS , CMCVS , CMDVS . CMEVS P0680310-

Ct.tt* IMAGINARY PARTS OF COMPLEX NUMBERS H AV I N G 0 N L Y F RAWrb m P0 68 0320

C«**«* PARTS (NO EXPONENT) P0680330

NBS FORTRAN Test Programs Version 1 87
CHAVC = ( . 789 , .00) P0680340

CHBVC = ( 1 .2, . 789 ) P0680350

CHCVC =" (+4.56.-.456) P0680360

CHDVC = (-12. 3,, + . 001 ) P068 03 70

CMAVS = AIMAGC CHAVC) P0680380

CMBVS = CMAVS - 0.0 P0680390

CMAVS = AI MA G ("C H B V C) P 0 6 8 0 4 0 C) CMCVS = CMAVS - .789 P0680410

CMAVS = A I MAG (CHCVC) P068 0 4Z0

CMDVS = CMAVS + .456 P0680430

CMAVS = AIMAG(CHDVC) P0680440

CMEVS = CMAVS - 0.001 P0680450

WRITE (NUVI, 068 1 ) CMBVS . CM CVS . CMDVS , CMEVS ' P06 8 0 46()

C*«*** IMAGINARY PARTS OF COMPLEX NUMBERS HAVING ONLY INTEGRAL P0680470

CVttT* PARTS (NO EXPONENT) ' P068 0 48 0 CHAVC = ( - 1 2 . , 1 2 . ) P068 0 490

CHBVC =(+1.23.0.) P06805C0

CHCVC = (0.0. -16.0) P0680510

CHDVC = (-1 . 1 , -32.0) P 0 6 8 0 5 2 0 CMAVS = AIMAG(CHAVC) P0680530

CMBVS '=' CMAVS - 12.0 P068 0 5 40

CMAVS = AIMAG(CHBVC) P0680550

CMCVS = CMAVS + 0.0 P 06 8 0 5 60

CMAVS = ABS(AIMAG(CHCVC)+AIMAG(CHDVC)) P0680570

CMDVS = CMAVS - 48.0 P06 8 0 5 8 () CMAVS = AMAX1(AIMAG( CHAVC) , A I MAG ( CHBVC ) . A I MAG ( CH CVC- CHDV C ) ) P0 6 8 0 5 90

CMEVS = CMAVS - 16.0 P0680600

WRITE (NUVI.0681) C M B VS . C M C VS , C M D VS , C M E VS P0680610

C***T* IMAGINARY PARTS OF COMPLEX NUMBERS HAVING A DECIMAL EXPONENT. P0680620

CHAVC = (2.3E0. 1 .2E0) P06 8 0 63 0 CHBVC = ( 1 . 2 , . 56E2) PO 68 0 6 40

CHCVC = ( .24, 1 .El ) P068 06 5 0 CHDVC = (1 . ,+7.8E + 1 ) P068 0660

CHEVC =(1.5,16.0) P0680670

CHFVC = (1.0 , -32 . 0 ) P 06 8 06 8 0 CHGVC = ( 1 .E0.-7.99E-1 ) P06 8 0 690

CHHVC = ( 2 7.00, .5 5E-1) P0 6 8 0 7 0 0 CHIVC = (1 .E0.2.E-0) P0 6 8 0 7 1 0 CH JVC = (1.2,1.E+1) P0680720

CHKVC = (1 .E-1 ,+7.E0) P0 68 0 73 0 CHLVC = ( 1 . 7 , -99 . E- 1 ) "' P0 6 8 0 740

CMAVS = AIMAG(CHAVC) P0680750

CMBVS = CMAVS - 1.2E6 P0 68 0 760

CMAVS = AIMAG(CHBVC) P0680770

CMCVS = CMAVS - .56E2 ' P0 68 0 78 0 CMAVS = AIMAG(CHCVC) P0680790

CMDVS = CMAVS - 1.E1 P068 0 8 00

CMAVS = AIMAG(CHDVC) P0680810

CMEVS = CMAVS - 7.8E + 1 P068 0 82 O WRITE (NUVI.0681) CMBVS , CMCVS . CMDVS . CMEVS P0680830

CMAVS = SIGN(DIM(AIMAG( CHEVC) .AIMAG( CHFVC) ) . A I MAG ( CH FVC ) ) P0 68 0 8 40

CMBVS = CMAVS + 48.0 P068 0 8 5 0^ CMAVS = AIMAG((1.0, 16.0) + CHEVC + CHFVC) " P0680860

CMCVS = CMAVS + 0.0 P0680870

CMAVS = AIMAG(CHGVC) P0 68 0 8 8 0 CMDVS = CMAVS + 7.99E-1 P0680890

CMAVS = AIMAG(CHHVC) P068 0 90 0 CMEVS = CMAVS - .55E-1 P0680910

WRITE (NUVI , 068 1 ) CMBVS, CMCVS. CMDVS. CMEVS P06 8 0 92 0 CMAVS = AIMAG(CHIVC) P0680930

CMBVS = CMAVS - 2.E-0 P0 68 0 940:

CMAVS = AIMAG(CHJVC) P0680950i

CMCVS = CMAVS 1 .E + 'l P06 8 0 960

CMAVS = AIMAG(CHKVC) P0680970

CMDVS = CMAVS - 7.Eb P06 8 09 8 0 CMAVS = AIMAG(CHLVC) P0680990

CMEVS = CMAVS + 99. E-1 P 0 6 8 1 0 0 0 WRITE (NUVI, 068 1 ) CMBVS , CM CVS , CMDVS . CMEVS P0 6 8 1 0 1 0

88 NBS FORTRAN Test Programs Version 1
WRITE (NUVI,0682) P068 1 020

068 1 FORMAT ( / 4(F20.5 / )) P068 1 03 0 0682 FORMAT ( /40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS / P0681 040

132H TEST SEGMENT TO BE SUCCESSFUL.) P068 1 0 5 0

c * » * * * END OF TEST SEGMENT 068 P068 1 060

c * « » « WHEN EXECUTING ONLY SEGMENT 068, THE STOP AND END CARDS P06 8 1 0 7 0

Q A t * t t IIUTru ADDCAD AC THMMCMT PADHC MIICT UAV/C TUC r — WHILH ArPbAK Ab L U rl n b N 1 LAKUo nubl HAvc Inh L- P 0 6 8 1 0 8 0 c * * * «

IN COLUMNS 1 AND 2 REMOVED. P068 1 090

c= STOP P068 1 1 00

c = END P 0 6 8 1 1 1 0 STOP P 0 6 8 C 1 END P068C2

C**«*««««««*«******«t«««***t«»t*«**«***t«*«*t*«**««t«*iir*t*«t**« tt««tP0690010

C** *** P0690020

C I f'D B L - ( 069 ) P 0 6 9 0 0 3 0 C * * « * * P 0 6 9 0 0 4 0 C*t******t**«***«*«**«!tlt**«***i*****«:**«*«lrt4:**t********<t«lr***t*t**t P0690050

ARGUMENT

C** t*« GENERAL PURPOSE

C***** TEST INTRINSI C FUNCTION DBLE (EXPRESS S.P

C*«*«« IN DOUBLE PRECISION FORM ) CT*T** INTRINSIC FUNCTIONS DABS , DS I GN , DM I N 1 , DMAX 1

, AMAX

1

C«*«»* ASSUMED WORKING.

C * « * * * c * * * * * c * * * *

«

C***»* WHEN EXECUTING ONLY SEGMENT 069, THE SPECIFICATION

C**"*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C^

SPECIFICATIONS SEGMENT 069

ASA REF P0690060

8 . 2 / 4 3 P 0 6 9 0 0 7 0 (TABLE 3)P0690080

P0690090

STATEMENTS

IN COLUMNS 1 AND REMOVED

PRECISION

PRECISION

MCAVD

MCAVD

MCBVD,MCCVD,MCDVD,MCEVD,MCFVD.MCGVD

MCBVD,MCCVD,MCDVD,MCEVD,MCFVD.MCGVD

UTPUT TAPE ASSIGNMENT STATEMENT

EXECUTI NG

= 6 MUST

6

6

ONLY

HAVE

SEGMENT 06 , THE FOLLOW+NG STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

C « « * t * C « * « *

«

C= DOUBLE

DOUBLE

C * * * *

«

C t * * * 0

c * * * * * C *'»*'*

* w H E N C***** NUVI

C= N U V I = NUVI =

c * * * * WRITE (NUVI, 0690)

6l£)9 0 FORMAT ( 1 H 1 , 1 X , 3 9 H I F D B L - ( 0 6 9 ) IN T R I N S I C 126HS.P. ARGUMENT IN D.P. FORM / 2X.13HASA

C***** HEADER FOR SEGMENT 069 WRITTEN

CMAVS = 0.9765625E-3

CMBVS = -. 1953125E-2

CMCVS = .5859375E-2

- . 1 048576E+7

+114688.0

0 . 0 D 0 MCAVD * DBLE(CMAVS)

DMI N1 ( DBLE ( CMAVS) , D B L E ( CME VS )

)

MCAVD * MCBVD - D AB S ( D B L E ( C M B VS )

)

MCAVD - DSIGN(DBLE( CMCVS) , D B L E ( CMBVS ))

- DABS(DBLE( CMDVS) ) + MCAVD

DMAX1(DBLE(AMAX1(CMDVS,CMEVS)), MCBVD)

NO INPUT TAPE.

CMDVS = CMEVS = MCAVD = MCBVD = MCCVD = MCDVD = MCEVD : MCFVD = MCGVD =

P06901 00

P 0690 1 1 0 P0690 1 20

POO 1 1 650

P0 0 1 1 6 5 5 P001 1660

pool 1665

P001 1670

P001 1675

P069A1

P001 1680

P0690 1 30

P0071 390

P 0 0 7 1 3 9 5 P0071 400

P0071 405

P069B1

P0071410

P06901 40

FUNCTION - DBLE/ 1 6 X , P 0 6 9 0 1 5 0 REF.- 8.2//2X,7HRESULTS)P0690160

P 0 6 9 0 1 7 0 P06901 80

P0690190

P0690200

P 0 6 9 0 2 1 0 P0690220

P069023 0

MCCVD, CMBVS, MCDVD,

MCEVD, CMDVS, MCFVD, CMEVS,

E18.7/ 8H LINE B, D25. 14)

OF LINE A AGAINST

VALIDITY OF TEST)

WR I TE ( NUVI , 691 ) CMAVS,

1 CMCVS,

691 FORMAT (1H0,1X,6HLINE A WRITE(NUVI, 692)

692 F0RMAT(1H0,38H A COMPARISON

1 40H IS NEEDED TO CHECK THE

C»«*«* END OF TEST SEGMENT 069

C***t* WHEN EXECUTING ONLY SEGMENT 069, THE STOP AND END

C«***« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C'VTtT* IN COLUMNS 1 AND 2 REMOVED.

C= ^ STOP

C= END

STOP

MCGVD

LINE B /IX,

CARDS

P0690240

P 0 6 9 0 2 5 0 P0690260

P 0 6 9 0 2 7 0 P0690280

P 0 6 9 0 2 9 0 P0690300

P 0 6 9 0 3 1 0 P0690320

P 0 6 9 0 3 3 0 P0690340

P 0 6 9 0 3 5 0 P0690360

P 0 6 9 0 3 7 0 P0690380

P 0 6 9 0 3 9 0 P0690400

P 0 6 9 0 4 1 0 P069C1

NBS FORTRAN Test Programs Version 1 89
END P069C2

Ct«««t««*«««»«*««t««»«»«*«»«*«»t«***»«***«***t*«t««***«t««*»tt*»»»***»**P0700010

C***** P070002 0

C *.*.*..*.* I.f. C P X - (, 0 7 0 ) P0700030

C***** P 0 70 0 0 40

C*««*«********t«*t*t*tt*«***««t«*«t«*«««<t«*«««*«*«t*«****t**«**«**««**««P0700050

C*'**'** GENERAL PURPOSE ASA REF P0 70 0 060

Z*t*** TEST INTRINSIC FUNCTION CMPLX (EXPRESS TWO REAL 8 . 2 / 4 5 P 0 7 0 0 0 7

0

C*«*t» 'ARGUMENTS IN COMPLEX FORM) (TABLE 3)P0 70 0 0 8 0 C***** GENERAL COMMENTS

C'***t'* SUBTRACTION OF COMPLEX NUMBERS ASSUMED WORKING

C * * * * * C* * S P E C I F I C A t I O N S SEGMENT 0 70

C * t * «

C* » * « * WHEN EXE CUTI NG ONL Y SEGMENT 0 70 , THE SPE C I F I CAT I ON

C*«*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C***** IN COLUMNS 1 AND 2 REMOVED.

C * * * *

STATEMENTS

COMPLEX

COMPLEX

CHAVC

CHAVC

CHBVC

CHBVC

CHCVC, CHDVC

CHCVC, CHDVC

CHEVC, CHFVC

CHEVC, CHFVC

CHGVC

CHGVC

C « * »

c * * c * * * c * «

APE ASSIGNMENT STATEMENT. NO INPUT TAPE

ONLY SEGMENT 070, THE FOLLOWING STATEMENT

HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

OUTPUT T WHEN EXECUTING

' NUVI = 6 MUST

NUVI = 6 NUVI = 6 WRITE (NUVI, 0 7 00)

FORMAT (1H1, 1X,40HIFCPX - (070) INTRINSIC FUNCTION - CMPLX/16X,

126HEXPRESS TWO REAL AR G U M E N T S / 1 6X , 1 5 H I N COMPLEX F0RM/15H ASA REF

2- 8.2//2X,7HRESULTS)

C*«*** HEADER FOR SEGMENT 070 WRITTEN

CMAVS = 23.123

0700

CMBVS

CMCVS

CMDVS

CMEVS

CMFVS

CHAVC

CHBVC

CHAVC

CHCVC

CHAVC

CHDVC

CHAVC

CHEVC

CHAVC

CHFVC

CHAVC

CHGVC

WRITE

- . 78

+ 17.

1 57 . E-1

- . 985E1

+88.E+0

CMPLX( CMAVS

CHAVC - (23

CMPLX( CMBVS

CHAVC - (-.

, CMBVS)

. 1 23, -.78 ) ,15.0)

78,15.0)

E + 0

)

= CMPLX(CMDVS, CMFVS)

= CHAVC - ( 1 57. E- 1

, +88

= CMPLX(0.0,O.EO)

= CHAVC

: CMPLX(CMEVS, CMFVS)

= CHAVC - (-. 98 5E1 ,+88. E + 0)

= CMPLX( CMCVS , -0 . OE-1 ) = CHAVC - (+17.0.0.0)

(NUVI. 0702) CHBVC, CHCVC. CHDVC. CHEVC, CHFVC, CHGVC

WRITE (NUVI. 0701)

0701 FORMAT (//2X.37HTHE ABOVE ANSWERS SHOULD ALL BE 0 F0R/1X.

l36H THIS TEST SEGMENT TO BE SUCCESSFUL.)

0702 FORMAT ( 6 ( / F 1 7 . 7 , F 1 7 . 7 )

)

C **** t END OF TEST SEGMENT 0 70

Ct«t*« WHEN EXECUTING ONLY SEGMENT 070, THE STOP AND END CARDS

C*«**» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C*«**« IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

ttii*tit*ii****ii****tttiiiit*tttt*tt**ttttttttt*t*t*tttt*t*t*ttt***ttt**

c * * t c * «

c * « C«**** GENERAL PURPOSE

* * I FCJG (071 ) *****t*t*ttttttttt*tt*ttt*tt*t1ittttttt1it1it*ttttttttttt*ttt*t*ttt**ii

ASA REF

P0700090

P 0 7 0 0 1 0 0 P0 70 0 1 1 0^ P 0 7 0 0 1 2 0 POO 11 690

POO 11695

P0 0 1 1 70 0 P 0 0 1 1 7 0 5 P001 1 71

0

P 0 0 1 1 7 1 5 P070A1

POO 1 1 720.

P07001 30

P0071 420

P0071 425

P0071 430

P070B1

P07001 40

P07001 50

. P C 7 0 0 1 6 0 P07001 70

P 0 7 0 0 1 8 0 P0700190

PO 700200

P0700210

P 0 7 0 0 2 2 0 P0700230

P0700240

P0700250

P0700260

P0700270

P0700280

P0700290

PO 700300

P0 7 0 0 3 1 0 P0700320

P0700330

P0700340

P0700350

P0700360

P0700370

P0700380

P0700390

P0700400

P 0 70 0 4 1 0 P0700420

P0700430

P0700440

P0700450

P0700460

P0700470

P070C1

P070C2

* P 0 7 1 0 0 1 0 P0 7 1 0 020

P0 7 1 0 030

P071 0040

*P071 0050

P0 7 1 0060

90 NBS FORTRAN Test Programs Version 1
C***t* TEST INTRINSIC FUNCTION CONJG (OBTAIN CONJUGATE OF A 8 . 2 / 4 7P 0 7 1 0 0 7

0

C***** COMPLEX ARGUMENT) (TABLE 3)P0710080

C'*'*"*** GENERAL COMMENTS PO 7 1 0090'

C**t»* SUBTRACTION OF COMPLEX NUMBERS ASSUMED WORKING P0710100

C*

**"*«

p 0 710110

C***** SPECIFICATIONS SEGMENT 071 P0710120

C **'**

* PO 0 1 1 7 3

0' C***** WHEN EXECUTING ONLY SEGMENT 071. THE SPECIFICATION STATEMENTS P0011735

C*'«*** IN COLUMNS 1 AND 2 REMOVED. P0 0 1 1 740' C***** P0011745

C= COMP LEX CH AVC , CH B V C , CH C V C CHD VC , CHE V C P 0 0 1 1 7 5 0 COMPLEX CHAVC, CHBVC, CHCVC.CHDVC ,CHEVC P071A1

C*'*"*T* P001l'7'5 5 C*t««« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0710130

C'*'*'*"* * P 0 0 7 1 4 4 0 C***** WHEN EXECUTING ONLY SEGMENT 071, THE FOLLOWING STATEMENT P0071445

C***«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071450

C= NUVI = 6 P 0 0 7 U55

NUVI = 6 P071 B1 C*** ** P0071460

WRITE ( NUVI ,07 To ) P 0 7 1 0 1 4 0 0710 FORMAT (1H1, 1X,40HIFCJG - (071) INTRINSIC FUNCTION - C0NJG/16X, P0710150

H9H0BTAIN C 0 N J U G AT E 0 F / 1 6 X , 1 6 H A COMPLEX NUMBER/ P0710160

217H ASA REFS. - 8 . 2 / / 2 X , 7 H R E S U L TS ) P0710170

C*«*»* HEADER FOR SEGMENT 071 WRITTEN P0710180

CHAVC = ( 1 . 1 , +2 . 1 ) P071 01 90

CHBVC = CONJG(CHAVC) P 0 7 1 02 00

CHCVC = CHBVC - (1.1,-2.1) P0710210

CHEVC = (-2.E0, -3.E-1) P0 7 1 0 220

CHBVC = CONJG(CHEVC) P0710230

CHDVC = CHBVC - ( -2 . EO , 3 . E-1 ) P0 7 1 02 40

WRITE (NUVI, 0711) CHCVC. CHDVC P0710250

CHAVC = (-.2, + .3) P 0 7 1 0260

CHBVC = CONJG(CHAVC) P0710270

CHCVC = CHBVC - (-.2, -.3) P 0 7 1 02 8 0

' CHAVC = (23. 1E-1 , 1 .E-2) P 0 7 1 0 290

CHBVC = CONJG(CHAVC) P0 7 1 03 00

CHDVC = CHBVC - ( 2 3 . 1 E - 1 , - 1 . E - 2 ) P 0 7 1 0 3 1 0 WRITE (NUVI, 0711) CHCVC.CHDVC P0710320

CHBVC = CONJG( ( 1 .2,2.2) ) P0 7 1 033 0 CHCVC = CHBVC - (1.2,-2.2) P0 7 1 03 4() CHBVC = CON JG (

( - 1 . 0 , 2 . OE-1 ) ) P0 7 1 03 5 0 CHDVC = CHBVC - ( - 1 . 0 , - 2 . 0 E - 1) P0 7 1 03 60

WRITE (NUVI, 0711) CHCVC, CHDVC P0710370

CHBVC = CON JG ( ( . 1 , . 2E0 ) ) P0 7 1 03 8 0

: CHCVC = CHBVC - (.1,-.2E0) P0710390

CHDVC = CON JG ( ( . 0 , -0 . EO ) ) PO 7 1 0 400

WRITE (NUVI, 0711) CHCVC, CHDVC P0 7 1 0 4 1 0 WRITE (NUVI ,0712) P0 7 1 0 42 0 0711 FORMAT (4(/ F17.7, F10.7)) P0710430

0 712 FORMAT ( / / 3 8 H A L L A B 0 V E A N S W E R S MUST B E 6 FOR f h i s / j x P 0 7 1 0 4 4

0

131H TEST SEGMENT TO BE SUCCESSFUL.) P0710450

C«**** END OF TEST SEGMENT 071 P0710460

C***** WHEN EXECUTING ONLY SEGMENT 071. THE STOP AND END CARDS P0710470

ttt't'i* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 7 1 04 8 0 C*«*** IN COLUMNS 1 AND 2 REMOVED. P0710490

C:= STOP P 0 7 1 0 5 0 0 C= END P0710510

STOP P071C1

END P0 71 C2

C***t «<r** ****t*«;*****ir***t*t«**x***********t******************t*t*«*P0 7 200 10

C««*** P0720020

C IFBMS - ( 072 ) P 0 72 0 0 3 0 C«   PO 72 0 0 40

C** **«***«***t*t*t«******«**********tt***»*****«**«**«*«*»***t*t»«**»*«*P0720050

C***«* GENERAL PURPOSE ASA REF P0720060

C**«V* TEST THAT ALL INTRINSIC FUNCTIONS WOULD ACCEPT 8 .2/ 32 P 0 7 2 0 0 7

0

C»*«*t ANY EXPRESSION OF THE TYPE SPECIFIED IN THE (TABLE 3)P0720080

NBS FORTRAN Test Programs Version 1 91
C**«*» INTRINSIC FUNCTION TABLE - ASA REFS

C***** GENERAL COMMENTS

8.2/01-47 P0720090

P0720 1 00

C****« SEGMENTS 055 TO 071 ASSUMED WORKING

C « t * * * C* * * * * 0 U T P U T t A P E ASS I GNMENT g j^y^^g jjjC t « « «

«

C * * * * « WHEN EXE CUT I N G ONLY S E G M E N T 0 72 , T H E FOLLOW! N G S T AT E ME NT C*«»*« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C= NUVI = 6 NUVI - 6

C * * * *

«

WRITE (NUVI, 0720)

0720 FORMAT ( 1 K 1 . 1 X , 3 7 H I F B MS . J^ff) BASIC FORTRAN 1 N TR I N S I C / 1 OX

.

128HFUNCTI0NS ACCEPT E XP R E S S I 0 N S / 1 0 X , 3 0 HO F TYPE SPECIFIED IN I 2BLE//15H ASA REF.- 8 . 2 / / 2 X , 7 H R E S U L T S

)

C*»*»* HEADER FOR SEGMENT 072 WRITTEN

Ctt*** TEST ABS - ABSOLUTE VALUE OF REAL ARGUMENT

8

= 0

P072011

0

P0720120

P0720130

P0 72 0 UO

P 0 0 7 1 4 7 0 P0 0 7 1 47 5 P0071480

P072B1

P 0 0 7 1 4 8 5 P07201 50

P 0 7 2 0 1 6 0

F .TAP07201 70

P 0 7 2 0 1 8 0 P0720190

2 / 1 1 P 0 7 2 0 2 0 0 P07202 1

0

P0720220

P0720230

P0720240

P0720250

P0720260

P0720270

P0720280

P0720290

P0720300

P0720310

P0720320

P0720330

2/ 12P0 72 03 4 0 P0720350

P 0 7 2 0 3 6 0 P0720370

P0720380

P0720390

P0720400

10 P0720410

P0 72 0 42 0' P0720430

P0720440

P0720450

P 0 72 0 460

2/29P0720470

P0720480

P0720490

PC 72 0 5 0 0

P 0 72 0 5 1 0 PC 72 0 5 2 0 P0720530

P0720540

P0720550

P 0 7 2 0 5 6 0 2/30P0720570

P 0 7 2 0 5 8 0 P0720590

P 0 7 2 0 6 0 0 P072061

0

P0720620

P0720630

P0720640

P0720650

P0720660

2/31 P0 72 0 6 70

P0720680

P0720690

P 0 72 0 70 0

P 0 72 0 7 1 0

NO INPUT TAPE

C t « t * *

CMAVS

CMBVS

CMCVS

CMDVS

CMEVS

CMFVS

CMEVS

CMGVS

CMEVS

CMHVS

CMEVS

CMIVS

WRITE

TEST

MCAVI = MCBVI = MCCVI = MCDVI = MCCVI = MCEVI = MCCVI =

1 + 10 + MCFVI = MCCVI = MCGVI = WRITE

CMDVS) )

50)8.0)

5 = -.25

= 16.0

= -4.0

= ABS(CMAVS + CMBVS) + 1.0

: CMEVS - (0.5 - .25) - 1 .0

= ABS(0.0 -ABS(CMAVS - CMCVS+

= CMEVS + (0.5 - 16.0 - 4.0)

= ABS(CMAVS + 1.0 - (CMCVS + CMDVS)

= CMEVS + (0.5 + 1.0 - (16.0 - 4.0)

= ABSd .OEO + (1.0 * 1.0 / 1.0) **2)

= CMEVS' - 2.0

(NUVI, 0721) CMFVS , CMGVS . CMHVS , CMIVS

OF lABS - ABSOLUTE VALUE OF INTEGER ARGUMENT

= 2

= 10

= lABS (MCAVI

= MCCVI - 12

= IABS(MCAVI

= MCCVI - 10

= IABS(-MCBVI /(-2)

+ MCBVI / MCAVI - 5)

= MCCVI - 5 = IABS(0 - iABS(-5 * i / 5 - 5

if^Q^^.Y))')

= MCCVI - 6 (NUVI, 0722) MCDVI , MCEVI , MCFVI , MCGVI

MCBVI

)

MCBVI / 2) +1

MCBVI *t 1 + (1 3 / 2 3)

C*«**t TEST OF FLOAT - CMEVS = FLOAT (MCAVI

CONVERSION

+ MCBVI)

FROM INTEGER TO REAL

CMFVS

CMEVS

CMGVS

CMEVS

CMHVS

CMEVS

CMIVS

WRITE

= CMEVS - 12.0

= FLOAT(MCAVI

= CMEVS - 11.0

= FL0AT((23 + = CMEVS - 3

= (76.5 * 1 = CMEVS - 2 (NUVI ,072 3)

2 /4 MCBVI 1 )

1 0 MCBVI) t2.0 1 . 5 FLOAT (76 1 ) ) 4.0

C t * t «

TEST

MCCVI

MCDVI

MCCVI

MCEVI

MCCVI

MCFVI

MCCVI

MCGVI

WRITE

OF IFIX -

= IFIX(CMAVS

= MCCVI

= IFIX(CMAVS

= MCCVI + 18

= 1 + IFIX(2

= MCCVI - 1 = 2 + IFIX(2

= MCCVI - 18 (NUVI ,0724)

46) /69

50

0CMFVS. CMGVS, CMHVS, CMIVS

CONVERSION FROM REAL TO INTEGER

- CMBVS)

* 1 . 0 + CMBVS/ CMBVS - ( CMCVS CMDVS) )

5 * 2.0) IFIXdO.O /2.0)

5 * 1.0 + (10.65 + 3.45))

MCDVI, MCEVI MCFVI, MCGVI

C****t TEST OF SIGN - TRANSFER OF SIGN WITH REAL

CMEVS = SIGN( CMAVS+CMDVS, CMDVS-CMBVS)

CMFVS = CMEVS - (CMAVS + CMDVS)

CMEVS = SIGN( 2 5.0 + 0.0 * 4.0,-24.4 / 67l * TT'O)

CMGVS = CMEVS + 25.0

ARGUMENTS

92 NBS FORTRAN Test Programs Version 1
CHEVS = SIGN(10.5.SIGN(2.0.-4.5)) P0720720

CMHVS = CHEVS + 10.5 P0720730

CMEVS = SIGNd .O.SIGN(-2.0.SIGN(2.6.-1 .6))) P0 72 0 740

CMIVS = CMEVS + 1.0 P0720750

WRITE (NUVI, 0725 ) CMFVS, CHGVS, CMHVS, CMIVS P0 72 0 760

C«*t*« TEST OF ISIGN - TRANSFER OF SIGN WITH INTEGER ARGUMENT 8 . 2 / 32 P 0 72 0 7 7

0

MCCVI = ISIGNCMCAVI .MCAVI + MCBVI - 13) P0720780

MCDVI = MCCVI + 2 P0720790

MCCVI = ISIGN(10.-5 - 10/2 + 1**2) PO 72 08 00

MCEVI = MCCVI + 10 P0720810

MCCVI = ISIGN( 1 + 2 + 3 . iSIGN(-2.7 +5)) P0720820

MCFVI = MCCVI - 6 P0720830

MCCVI = ISIGN(i, ISIGN(-1 . ISIGN( + 1 ,-1 ))) P0 72 0 8 40

MCGVI = MCCVI + 1 P0720850

WRITE (NUVI, 0726 ) MCDVI, MCEVI, MCFVI, MCGVI P0 72 0 860

C**«** TEST OF COMBINATION OF AB S , I AB S . F L 0 AT , I F I X , S I G N , I S I G N P0 72 0 8 70

CMEVS = FL0AT( lABSC rFIX(ABS(-5 .0 + S I G N ( - 1 . 0 , 2 . 0 ) ) ) ) ) P0 72 0 8 8 0 CMFVS = CMEVS - 4.0 P0720890

MCCVI = IFIX(FL0AT(ISrGN(1+2,IABS(1 + I S I G N ( 1 , - 1 ) ) ) ) ) P0 72 0900

MCDVI = MCCVI - 3 P0720910

CMEVS = SIGN(ABS( i . 6 + FL0At(-20) ) , FLbAt( I F IX( 1 . 0) )') P0 72 092 0 CMGVS = CMEVS - 19.0 P0720930

MCCVr = ISIGN(IABS(IFIX(1 .0) - 2) , -((1 + I F I X ( - 1 . OVrTlT) P0 72 0 940

MCEVI = HCCVI + 1 P0720950

WRifE' (NUVI ,0727 ) CMFVS, CMGVS, MCDVI, MCEVI P0720960

CMEVS = ABS(SIGN(1.0 + 2.0, F LOAT ( 1 ABS ( -2 ) ) ) ) P0720970

CMFVS = CMEVS - 3.0 . P0720980

MCCVI = IABS(IFIX(SIGN(-2. 0,2.0))) " P0 72 0990

MCDVI = MCCVI - 2 P0 72 1 0 00

CMEVS = 1.2 + FLOATd + 5 - ISIGN(-1,6)) P0 72 1 0 1 0 CMGVS = CMEVS - 6.2 P0721020

HCCVI = 25 - ISIGN(IFIX(2.0),-IABS(-5)) P0721030

MCEVI = MCCVI - 27 P0721040

/ WRITE (NUVI, 0728) CMFVS, CMGVS, MCDVI, MCEVI P0721050

Z***"*'* END OF TEST STATEMENTS P 0 72 1 06 0 0721 FORHAT ( / 30H TEST OF ABS IN EXPRESSIONS -/ 4(F17.1/)) P0721070

0722 FORMAT ( 3 1 H TEST OF I ABS IN EXPRESSIONS -/ 4(115/')') P0 72 1 0 8 0 0723 FORMAT ( 32H TEST OF FLOAT IN EXPRESSIONS -/ 4(F17.1/)) P0721090

0 7 2 4 FORMAT ( 31H TEST OF IFIX IN EXPRESSIONS -/ 4(115/)) P0 72 1 1 0 0 0725 FORMAT ( 31H TEST OF SIGN IN EXPRESSIONS -/ 4(F17.1/)) P07Z1110

0'7'2'6 FORMAT ( 32H TEST OF ISIGN IN EXPRESS I ONS - / 4 ( 11 5 / ) ) P0 72 1 1 2 0 0727 FORMAT ( 40H COMBINATION OF ALL INTRINSIC FUNCTIONS, P0721130

1 2 ( / F 1 7 . 1 ) , 2 ( / I i 5 ) ) P 0 7 2 1 1 4 0 0728 FORMAT ( 2 ( F 1 7 . 1 / ) , 2 ( I 1 5 / ) / 35H ALL ABOVE ANSWERS SHOULD BE 0 FOP0 72 1 1 5 0 1R/2X,35HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0 72 1 1 60

C***** END OF TEST SEGMENT 0 72 P0 72 n70

C***** WHEN EXECUTING ONLY SEGMENT 0 72, THE STOP AND END URDS P0 72 1 1 8 0 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0721190

C***«* IN COLUMNS 1 AND 2 REMOVED. P0721200

C= STOP P07Z1210

C'= END P0 72 1 22 0 STOP P07ZC1

END P0 72 C2

\^tttt*1t***ttttttttt*tt*iitttt*tii*tt*t*ttt**tttt-ktttttt*tttt*t*tttttttt*t*Pf)7'if)Q'\()

C *'*'*'*"* P 0 7 3 0 0 2 0

C * *.* *..* I.F F MS - (, 0

.7 3 ) P 0 7 3 0 0 3 g C* * * * * PO 73 0 0 40

C**********t*t****t**t*********ilt«**«t*ilr*«**t*ilr***tt*t***il:*t**************P0730050

C'*' *'*"*"* GENERAL PURPOSE ASA RE F P 0 7 3 0 0 60

C**«** TEST THAT ALL INTRINSIC FUNCTIONS IN FORTRAN WOULD 8 . 2 / 0 7P 0 7 3 0 0 7

0

C***** ACCEPT ANY EXPRESSION OF THE TYPE SPECIFIED IN THE (PG 24)P0 73 0 0 8

0' Ct**t* INTRINSIC FUNCTION TABLE - ASA REFS - 8.2/TABLE 3 P0730090

C***** SEGMENTS 0 5 5 - 0 7 1 ASSUMED WORKING. P0 73 0 1 0 0 C***** P0730110

C***** S P 'E I C A t I 0 N S SEGMENT 073 P0 73 0 1 2 0 C***** P0011760

C * * * * WHEN EXECUTING ONLY S EG HE NT 0 73, THE S P E C I F I C /\t I 0 N g j AT E'M E N fS P 0 0 1 1 76 5 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0011770

NBS FORTRAN Test Programs Version 1 93
C***** IN COLUMNS 1 AND 2 REMOVED. P0011775

C***** P0011780

t= DIMENSION MCA1 1(5) .AC2S(5.6) P0011785

C= INTEGER MCA3I(2,3.3) P0011790

C= DOUBLE PRECISION DPAVD , DPBVD , DPCVD , DPDVD , DPEVD , DPFVD . DPGVD , P0011795

C= 1DPA1D(5) ,FC2D(5,5) P0011800

DIMENSION MCA1 I ( 5 ) , AC2S( 5 , 6) P 0 73A1

INTEGER MCA3I (2,3,3) P073A2

DO U B L E PRECISION 0 P A V D . D P B V D , D P C V D , D P D V D , D P E V D , DP F V D , D P G

V

D', P 0 7 3 A

3

1DPA1D(5),FC2D(5,5) P073A4

C *'*'«** POO 11 805

C**«.» OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0730130

C * P 0 0 7 1 4 9 0 C***** WHEN EXECUTING ONLY SEGMENT 0 73 , THE FOLLOWING STATEMENT P0 0 7 U95

C*T*T* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P00 7 1 5 0 0 C= NUVI = 6 P0071505

NUVI = 6 P0 73 B1 C***** P0071510

WRITE (NUVI ,0 730 ) P 0 73 0 U0

0 73 0 FORMAT ( 1 H 1 , 1 X , 4 1 H I F F M S - ( 0 73 ) FORTRAN INTRINSIC F U N C T I 0 N S / 1 6X , P 0 73 0 1 5 0 126HACCEPT EXPRESSIONS OF T Y P E / 1 6X , 2 2 H S P E C I F I E D IN I. F. TABLE/ P 0 73 0 1 60

223H ASA REF.- 8.2/TABLE 3 / / 2 X , 7 HR E S U L T S ) P0 73 0 1 70

C « HEADER FOR SEGMENT 073 WRITTEN P0730180

C** «** TEST OF DABS IN EXPRESSIONS 8 . 2 / 1 3 P 0 7 3 0 1 9

0

DPAVD = 1 . 25D0 P0 73 0 2 0 0 DPBVD = - 1 0 . ODO P 0 73 0 2 1 0 DPCVD = DABS(DPAVD + DPBVD) P 0 73 02 2 0 DPDVD = DPCVD - 10. ODO + 1.25D0 P0 73 02 3 0 DPCVD '= DABSd .ODO + 2. DO - 3. ODO * 50.0-1) P 0 73 02 40

DPEVD = DPCVD - 12. DO P0 73 02 5 0 DPCVD = DABS( DPAVD * 1.D0 - 1.25D0 + DPBVD/2.D0) + 1.D0 P0 73 0 260

DPFVD = DPCVD - 6. ODO P0 73 0 2 70

DPGVD = 1.0D0 + DABS(2.5D0 - 1.5D0 • 1.0D0) - 2. DO P0 73 0 2 8

0' WRITE (NUVI, 0731) DPDVD, DPEVD, DPFVD, DPGVD P0730290

t***t* TEST OF AINT IN EXPRESSIONS 8 . 2 / 1 4P 0 7 3 0 3 0 0 CMAVS =1.23 P073031

0

CMBVS = 27.998 P0730320

CMCVS = -9.007E0 P0730330

CMDVS = AINT(CMAVS + CMBVS - CMCVS) P0730340

CMEVS = CMDVS - 38.0 P0730350

CMDVS = A I NT (1.0 + 2.0 /1.0 - 3.0 2.E0) PO 73 0 3 60

CMFVS = CMDVS + 3.0 P0730370

CMDVS = AINT(4. + AINT(2.E0 + CMCVST) P0 73 03 8 () CMGVS = CMDVS + 3.0 P0730390

CMDVS = AINT(AINT(AINT( 1.4-2.7))) P0730400

CMHVS = CMDVS +1.0 P073041

0

WRITE (NUVI ,0732 ) CMEVS', CMFVS', CMGVS', CMHVS PO 73 0 42 0 C*»*** TEST OF INT IN EXPRESSIONS 8 . 2 / 1 5 P 0 7 3 0 4 3 0 MCAVI = I NT (1.0 + 2.1 + 3.2 - 8.4 / 2.5 * 2.6) PO 73 0 44 0 MCBVI = MCAVI + 2 P0730450

MCAVr= INt(100.0/6.0 - (2_0 *t4.0) * ( ( ( 2 . 0-3 . 0 ) + 4 . 0 ) * 2.0)) P0 73 0 460

MCCVI = MCAVI - 6 P0730470

MCAVI = INt((i66.2/6.1/5.0+4.10) / 2.0) P0730480

MCDVI = MCAVI - 3 P0730490

M C A V r = IN T ( 9 . 0 / 2 .0 ) + I N T ( 5 .1/4 7 0 ) P 0 7 3 0 5 0 0 MCEVI = MCAVI - 5 P0730510

WRITE (NUVI , 0 733 ) MCBVI , MCCVI , MCDVI , MCEVI P 0 73 0 5 2 0 C***** TEST OF IDINT IN EXPRESSIONS 8 . 2 / 1 6P 0 73 0 5 3 0 [)PATD( 1 ) = 2 . 501 P0 73 0 5 40

MCAVI = IDINT(DPBVD / 2. ODO + 1.5D0) P0730550

MCBVI : MCAVI + 3 P0 730 5 60

MCAVI = IDINT( 1.0D1 + 5. DO * 2.D1 / 49. D1) + 1 PO/3 0 5 70

MCCVI = MCAVI - 11 P0 73 0 5 8 0 MCAVI = IDINT(DPA1D(1 ) ) P0730590

HCbvr ="' M CAV I - 2 5 PO 7 3 060 0 MCAVI = IDINT(DPA1D(1 ) + DPA1 D ( 1 ) / 4 . ODO ) P0 7306 1 0 MCEVI = MCAVI - 31 P0 730620

WRITE (NUVI, 0734) MCBVI. MCCVI, MCDVI, MCEVI P0730630

94 NBS FORTRAN Test Programs Version 1
C*tt** TEST OF AMOD. MOD IN EXPRESSIONS 8 . 2 / 1 7- 1 8 P 0 73 06 4

0

AC2S( 1 . 1 ) = 27.0 P0730650

CMDVS =AMOD(25.0 + AC2S(i.1). 1.6 * 5.6) P0730660

CMEVS = CMDVS - 2.0 P0730670

CMDVS =AM0D(99.0,AMdb(25.6+ 27.6. 5.6)) P0730686

CMFVS = CMDVS - 1.0 P0730690

MC A3 1(1. 2, 3) = 5 PO 73 0 700

MCAVI = M0D(98 + 1. M0D(25 + 27,5)) P0730710

MCBVI - MCAVI - 1 PO 73 0 72 0 MCAVI = MOD (MCA3I (1,2,3). 2) P0730730

MCCVI = MCAVI - 1 PO 73 0 740

WRITE (NUVI,0735) CMEVS, CMFVS, MCBVI, MCCVI P0730750

C*T«** TEST OF AMAXO, AMAX1.. MAXO. MAX1 AND DMAX1 I N EXPFtESS I ONS ''P0 73 0 760

C***** 8.2/19-23P0730770

FC2D(1,1)=27.0D0 P073078 6 CMDVS = AMAX0(5 + 9. MAXO(U * Z, MAXK 2.0 /1. 0,1.0))) P0 73 0 790

CMEVS = CMDVS - 28.0 P0 73 0 8 0 0 CMDVS = AMAX1 ( ( AMAXO ( (MAX0 ( 29 , - 1 00 ) ) , 5 + 1 0 )), 2.0 * 2 . 0 ) P0 73 0 8 1 0 "'" CMFVS = CMDVS - 29.0 P0 73 0 8 2 0 MCAVI = MAX1 ( ( AMAX0(25 , -(1 « 5))), 100.0) PC 73 0 83 0 MCBVI : MCAVI - 100 P0 73 0 8 40

DPCVD = DMAX1 ( FC2D( 1 , 1) , DMAX1 ( 1 . ODO . O.DO * FC2D(1,1))) P0730850

DPDVD' = DPCVD - 27. ODO P0 73 0 860

WRITE (NUVI,0736) CMEVS, CMFVS, MCBVI, DPDVD P0730870

CT;';T» TEST of amino, AMINI, MINO, MINI AND D M I N 1 7N

'

' E X F-R PO 73 0 8 80

C***t« 8 . 2 /24-27P0 73 0 8 90

CMDVS = AMIN1(2.5 + AC2S(1,1), AMIN0(-5, MINO(0,i))) P0 73 0906

CMEVS = CMDVS + 5.0 P0730910

MCAVI : MIN0((MIN 1 ( -99., 1 00.0 - 1.0 * 99.)), 2 ) P0 73 092 6 MCBVI = MCAVI + 99 P0730930

MCAVI = MIN1( 2.0,AMIN1( 5. * 3.0. - 9 . 0 / ( - 9 . 0 ) ) ) P0 73 0940

MCCVI = MCAVI - 1 P0730950

DPCVD = DMI Nl ( FC2D( 1 . 1 ) DMI N 1 ( 2.00- 1.0 . 000 ) ) PO 730966

DPDVD = DPCVD - 0.000 P0730970

WRITE (NUVI , 0 73 7 ) CMEVS , MCBV I , MCCVI, DPDVD P0 73 09 8 6 C,«**** TEST OF OSIGN.AND OBLE IN EXPRESSIONS 8 . 2 / 33 , 8 . 2 / 4 3 P 0 7 3 0 9 9 0 DPCVD=DSIGN(FC2D(1,1)* 1.001,-1.000) P0731000

DPDVD = DPCVD + 27.001 P0731010

DPCVD = DSIGN((DSIGN(2.0D0, _i7o[)0 ) V 0 .006), :6d6) PO 73 1 026

OPEVD = DPCVD - 2.000 P0731030

DPCVD = DBLE( 2.0 * 4.0 + AC2S(1,r)) P0 73 1 0 40

DPFVD = DPCVD - 35.000 P0731050

DPCVD = 0BLE(-32.00 / 8.0 ) * DBLE(-2.6) P0 73 1 066

DPGVD = DPCVD - 8. ODO P0 73 1 0 70

WRITE (NUVI, 0738 ) DPDVD, OPEVD, DPFVD, DPGVD P0 73 1 0 86

Ct«t** TEST OF DIM AND IDIM IN EXPRESSIONS 8 . 2 / 3 4 - 3 5 P 0 7 3 1 0 9

0

CMDVS = DIM( 2.0 •3.5 /7.0, AC2S(1,1)) P0 73 1 1 06

CMEVS = CMDVS - 0.0 P0731110

CMDVS = 0IM(DIM(9.0,-5.5), 0 I M ( 6 . 0 , 0 . 0 ) ) P 0 73 1 1 20

CMFVS = CMDVS - 8.5 P0731130

MCA1I(1)=8 P0 731140

MCCVI = IDIM(MCA1 I ( 1 ) * 1, - (IDIh(0. -3))) P0731150

MCDVI = MCCVI - 11 P0 73 1 1 60

MCCVI = IDIM(((4 + 2 + 3)/3), - 2) P0731170

MCE VI = MCCVI - 5 P0 73 1 1 8 6 WRITE (NUVI, 9995) CMEVS, CMFVS, MCDVI, MCEVI P0731190

t'tTt'n TEST OF SNGL, REAL , AIMAG, CMPLX AND CONJG IN EXPRESSI()NS P0 73 1 206

C***** 8.2/36-47P0731210

CMEVS = SNGL ( 1.000 • 2.01 + AC2S(1,1)) P0 73 1 226

CMFVS = CMEVS - 47.0 P0731230

CMEVS = REAL( CONJG((1.0, -2.0)))* AIMAG((99.0, -7.6)) P0731240

CMGVS = CMEVS + 6.0 P0731250

CMEVS = AIMAG(CMPLX(REAL((2.0,1 .0)), SNGL (1.0b6))) P073 1 266

CMHVS = CMEVS - 1 .ODO P0731270

WRITE (NUVI, 0739 ) CMFVS, CMGVS, CMHVS P0 73 1 2 8 6 C**t*t SOME COMBINATIONS OF ABOVE INTRINSIC FUNCTIONS P0731290

CMEVS = AMI Nl ( ( FLOAT( IDIM( 1 +2 , 0) ) ) , ( A I M AG ( CMP LX ( 1 q;276) ) ) ) PO 73 1 3 00

CMFVS = CMEVS - 2.0 P0731310

NBS FORTRAN Test Programs Version 1 95
CMEVS = REAL(CMPLX(SNGL(DABS(-DSIGN(DBLE(2.0).1 .ODO>)),CMAVS)) P0731320

CMGVS = CMEVS - 2.0 P0731330

WRITE (NUVI,9994) CMFVS. CMGVS P073 1 340

Cttt«« END OF TEST STATEMENTS FOR SEGMENT 073 P0731350

0731 FORMAT (/ 30H TEST OF DABS IN EXPRESSIONS / / 4 ( 023 /j/T) P073 1 360

0732 FORMAT ( 30H TEST OF AINT IN EXPRESSIONS //4(E19.6/)) P0731370

0733 FORMAT ( 30H TEST OF INT IN EXPRESSIONS //4(I10/)) P0731380

0734 FORMAT ( 30H TEST OF IDINT IN E XPRE S S I 0 N S / / 4 ( I 1 0 / ) ) P0 73 1 390

0 73 5 FORMAT ( 35H TEST OF AMOD, MOD IN EXPRESSIONS // P0 73 U00

12(E19.6/),2(I10/)) P0 73 U10

0736 FORMAT ( 40H TEST OF AMAXO , AMAX1 , MAXO , MAX1 AND DMAX/ / P0 73 1 420

1 2(E19.6/) , 110/ D23.8) P0731430

0737 FORMAT ( 40H1 TEST OF AM I NO , AM I N 1 , M I NO , M I N 1 AND DMIN// P0 73T440

1 E19.6/ 2(L10/), D23.8) P0731450

0 73 8 FORMAT (/ 39H TEST OF DSIGN AND DBLE IN EXPRESS I ONS / / 4 ( 023 . 8 / ) ) P0 73 1 460

0 739 FORMAT ( 35H TEST OF S N G L , R E A L , A I M AG , C M P LX AND / P0 73 1 4 70

123H CONJG IN EXPRESSIONS //3(E19.6/)) P0 73 U80

9994 FORMAT ( 36H TEST OF SOME COMBINATIONS OF ABOVE/ P0 73 U90

122H INTRINSIC FUNCTIONS //2(E19.6/) /40H ALL ABOVE /ANSWERS S HOU L P 0 7 3 1 5 0 0 2D BE 0 FOR THIS/27H SEGMENT TO BE SUCCESSFUL.) P0731510

9995 FORMAT ( /37H TEST OF DIM AND IDIM IN E XP R E S S I 0 N S / 2 ( E 1 9 . 6 / ) , P0 73 1 5 2 0 12(110/)) P0 73 1 5 3 0 C***«* END OF TEST SEGMENT 073 PO 73 1 5 40

C***** WHEN EXECUTING ONLY SEGMENT 073, THE STOP AND END CARDS P0731550

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 73 1 560

C*»*** IN COLUMNS 1 AND 2 REMOVED. P0731570

C= STOP P 0 73 1 5 80

C= END P0731590

STOP P0 73 C1 END P0 73 C2

C«;t**t***«t« t** *it*««;***t**t i** ******ilr*«*********t******tt*«rt*t*tP080 0 010

C*«*** P0800020

C*«*** EXPON - 0 8 0 P0 8 0 0 030

C«  P0800040

C** **«r t** *t*tt***ttt*«t**t*t**t**ilr t** *«*****t« tikt«** ***t P0800050

Ct** ** GENERAL PURPOSE ASA REFP0800060

C***** .TO TEST BASIC EXTERNAL FUNCTION - EXP - EXPONENTIAL 8.3.3 P0800070

C**«t* .USED IN SIMPLE ARITHMETIC EXPRESSIONS TABLE 4P0800080

C****« .INTRINSIC FUNCTIONS ABS AND SIGN ASSUMED WORKING P0800090

C**vt* ARGUMENTS ARE POWERS OF 2 P08 0 0 1 0 0 C***** P0 8 0 0 1 1 0 C***** NO SPECIFICATIONS SEGMENT 080 P0800120

C«  P0 8 0 0 1 3 0 C** *** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0800140

C*»*»* WHEN EXECUTING ONLY SEGMENT 080, THE FOLLOWING STATEMENT P0071520

C»**tt NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED, P0071525

C* * * * P00 7 1 5 3 0 C= NUVI = 6 P0071535

NUVI = 6 P0 8 0 B1 WRITE(NUVI ,800) P0800150

800 F0RMAT(15H1 EXPON - (d80)//31H BASIC EXTERNAL FUN CT I ON -EXP- P0 8 0 0 1 60

1//26H (EXPONENTIAL -TYPE REAL) P0800170

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0 8 0 0 1 8 0 3 HOLLERITH I N F ORM AT I 0 N / / 9H RESULTS) P0 8 00 1 90

C»«tV* HEADER FOR SEGMENT 0 8 0 WRITTEN P0 8 0 02 0 0 Ct«*** ARGUMENT RANGE FROM -16.0 TO +16.0 P0800210

AVS = -16.0 P0800220

CVS = 4.0 P0800230

BVS = EXP (AVS ) PO 8 0 02 40

WRITE (NUVI, 801) BVS P0800250

BVS = EXP(2. CVS + AVS) P0 8 0 0 260

WRITE (NUVI, 802) BVS P0800270

' BVS = EXP ( AVS + ( 3 . * CVS)) PO 8 0 0 2 8 0 WRITE (NUVI, 803) BVS P0800290

BVS : EXP(ABS(AVS) + AVS) P 0 8 0 03 0 0 WRITE (NUVI, 804) BVS P0800310

BVS = EXP(-AVS / CVS) P0 8 0 03 2 0 WRITE (NUVI, 805) BVS P0800330

96 NBS FORTRAN Test Programs Version 1
p\/c - cvD/CTriu^A\/c * rue * 9 ft ^\yc^^ BVo - t A r V 0 1 u N (, n V 0 + LVo " L . \l , LWa/l

WRITE (NUVI, 806) BVS

rUoUUSHU

P0800350

WRITE(NUVI. 807) BVS P0800370

iiDTTc WKlIb /MiiwT ^NUVl, oUo;

801 FORMAT( 9H0 X = - 1 6 . 0 , 5 X . 2 5 H 0 . 1 1 2 5 3 5 1 7 4 7 1 9 2 5 9 1 1 4 5 E

- 0 6 / E 2

7

.7)

rU6UU5oU

P0800390

803 FORMAT( 9H0 X= - 4 . 0 . 5 X , 2 5 H 0 . 1 8 3 1 5 6 3 8 8 8 8 7 3 4 1 8 0 2 9

E

- 0 1 / E 2

7

.7)

rUoUU'tUU

P0 8 0 0 4 1 0 oUh rUKrlnl^ VMU A- U.U,JA,tJnU.iUUUUUUUUUUUUUUUUUUt*UI/tc/

80 5 FORMAT( 9H0 X= 4 . 0 , 5 X , 2 5 H 0 . 5 4 5 9 8 1 5 0 0 3 3 1 4 4 2 3 9 0 8 E + 0 2 / E 2

7

.7) P0800430

oUO ruKrlAlt VnU a- o.U,DA,(ijnU.d70U7j/76/UHl/^ad/jt + UH/t<:/

807 FORMAT( 9H0 X= 1 6. 0 , 5 X , 2 5 H 0 . 8 8 8 6 1 1 0 5 2 0 5 0 7 8 7 2 6 3 7 E + 0 7 / E 2

7

7 \ .7) P 0 8 0 0 4 5 0

i n i CnDMATC//77U IIMC 7 nC CATU DATD TQ TUC CIIM^TInM/7'^l-l oUo rUr\nAlw/j/n LlNc C Ur CAUn rAln lo inc rulHtllUlM/tjn

1 PRINTED TO ,8H7 DIGITS)

CALCULATIONP0800460

P0800470

tIMU Ur Itol otuntlMl UOU

C***** WHEN EXECUTING ONLY SEGMENT 080. THE STOP AND END CARDS

P0800480

P0800490

r***** LIUirU Wnltn ArrtAK ADDCAD AOAC TOMMCMT LUnntl'll TADnC LARUo MIICT nUOl UA\/C nAVt TUC Int f-L- C***** IN COLUMNS 1 AND 2 REMOVED.

P0800500

P0800510

r — 0 T r\ D

L - 0 1 U F C= END

P0800520

P0800530

C T n D 0 1 U r END

P080C1

P080C2

C*******«;*****«****************«:***<r*******«r***ilr**********************ttP0810010

C***** P0810020

C***** DEXPO - 081

c * * * *

«

P0 8 1 0 0 3 0 P08 1 0040

Ct*»*« GENERAL PURPOSE

********** P0 8 1 0 0 5 0 P0 8 1 0 060

C***** TO TEST BASIC EXTERNAL FUNCTION - DEXP - EXPONENTIAL ASA REFP0810070

C*«*** USED IN SIMPLE ARITHMETIC EXPRESSIONS -SAME AS 8.3.3 P0810080

C***** SEGMENT 080 EXCEPT DOUBLE PRECISION

C*«tt* INTRINSIC FUNCTIONS DABS AND DSIGN ASSUMED WORKING

TABLE 4P08 1 0090

P081 01 00

C***** ARGUMENTS RANGE FROM -16.0D0 TO +16.0D0, POWERS OF 2

c * * * «

P08 1 0 1 1 0 P0810120

C***«* SPECIFICATIONS SEGMENT 081

c * * * * * P081 01 30

P001 1810

C****« WHEN EXECUTING ONLY SEGMENT 081, THE SPECIFICATION STATEMENTS

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= POO 1 1 8 1 5 P0 0 1 1 820

C***«* IN COLUMNS 1 AND 2 REMOVED,

c « * * * * P0 0 1 1 82 5 P001 1 830

C= DOUBLE PRECISION AVD, BVD, CVD

DOUBLE PRECISION AVD, BVD, CVD

P0 0 1 1 83 5 P08 1 A1

c * * * *

«

C««*** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE . P001 1840

P081 01 40

c * * « *

«

C***«* WHEN EXECUTING ONLY SEGMENT 081, THE FOLLOWING STATEMENT

P0071 540

P0071 545

C*««** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

C= NUVI = 6 P0071 550

P0 0 7 1 5 5 5 NUVI = 6

c * « * «

P08 1 B1 P0071 560

810 F0RMAT(15H1 DEXPO - (081)//32H BASIC EXTERNAL FUNCTION

1//38H (EXPONENTIAL -TYPE DOUBLE PRECISION)

-DEXP- P08101 50

P08 1 0 1 60

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H

3 HOLLERITH I N F 0 R M AT I 0 N / / 9 H RESULTS)

P08101 70

P08 1 0 1 80

WRITE (NUVI, 810)

C***** HEADER FOR SEGMENT 081 WRITTEN

P0810190

P0 8 1 0 2 0 0 AVD = -16.0D0

CVD = 4.0D0

P 0 8 1 0 2 1 0 P0 8 1 022 0 BVD = DEXP(AVD)

WRITE (NUVI, 811) BVD

P 0 8 1 0 2 3 0 P 0 8 1 02 4 0 BVD = DEXP(2. * CVD + AVD)

WRITE (NUVI, 812) BVD

P 0 8 1 02 5 0 P 0 8 1 026 0 BVD = DEXP(AVD + (3. » CVD))

WRITE (NUVI, 813) BVD

P0 8 1 02 70

P081 0280

BVD = DEXP(DABS(AVD) + AVD)

WRITE( NUVI, 814) BVD

P 0 8 1 0 2 9 0

P 0 8 1 0 3 0 0 BVD = DEXP(-AVD / CVD)

WRITE (NUVI, 815) BVD

P0 8 1 0 3 1 0

P 0 8 1 0 3 2 0

NBS FORTRAN Test Programs Version 1 97
BVD = DEXP(DSIGN(AVD CVD * 2.0D0. CVD)) P0810330

WRITE (NUVI. 816) BVD P0810340

BVD = DEXP(CVD + DABS(AVD) - 4.0) P0 8 1 03 5 0 WRITE (NUVI, 817) BVD P0810360

WRITE (NUVI , 818) P08i 03 70

811 FORMAT( 9H0 X = -16.0,5X,25H0 . 1 1 2 5 3 5 1 74 7 1 92 5 9 1 1 4 50- 06 / 03 4. 1 4 ) P0 8 1 03 80

812 FORMAT( 9H0 >(= - 8 . 0, 5 X , 2 5 H 0 . 3 3 5 46 2 62 7 9 0 2 5 1 1 8 3 8 8 D - 0 3 / D3 4 . 1 4

)

' P 0 8 1 0390-

813 FORMAT( 9H0 X= - 4 . 0 , 5X , 2 5 HO . 1 8 3 1 5 63 8 8 8 8 7 3 4 1 8 0 2 9

D

- 0 1 / 03 4 . 1 4 ) P0 8 1 0 4 00

814 FORMAT( 9H0 X= 0 . 0 , 5 X , 2 5 H 0 . 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 D + 0 1 / D 3 4 . 14 ) •P0 8 1 0 4 1 0' 815 FORMAT( 9H0 X^ 4 . 0 , 5 X . 2 5 H 0 . 5 4 5 9 8 1 5 0 0 3 3 1 4 4 2 3 9 0 8 D + 0 2 / D 3 4 . 1 4 ) P0 8 1 0 42 0 816 FORMAT( 9H0 X= 8 . 0, 5 X , 2 5 H 0 . 2 9 8 0 9 5 7 9 8 7 0 4 1 7 2 8 2 7 5 D + 0 4 / D 3 4 . 1 4 ) P0 8 1 0 43 0 817 FORMAT( 9H0 X= 1 6 . 0 , 5 X , 2 5 H 0 . 8 8 8 6 1 1 0 5 2 0 5 0 7 8 7 2 6 3 7 D + 0 7 / D 3 4 . 14 ) P0 8 1 0 4 40

818 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H C A L C U L AT I 0 N P 0 8 1 0 4 5 0 A PRINTED TO ,9H14 DIGITS) P0810460

C**t*« END OF TEST SEGMENT 081 P0 8 1 0 4 70

C*«*** WHEN EXECUTING ONLY SEGMENT 081, THE STOP AND END CARDS P0810480

C*tV*t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 8 1 0 490

C****« IN COLUMNS 1 AND 2 REMOVED. P0810500

C= STOP P0 8 1 0 5 1 0 C= END P0810520

STOP P 0 8 1 C 1 END P081 C2 C*t******« «** *t«t*ttt********««r*t**tttt**t**«********i*****tt***t**t*P0820010

C****** P0820020

C* * *"*"* CEXPO - ( 0 8 2 ) P0 8 2 0 03 0 C* * * * * * P0820040

C********«««««t«««t«*««*»**«**t*****«*t««*«t**t«« ««** »*«*«*t«*«*****p0820050

C***** GENERAL PURPOSE ASA REF.P0820060

C*»**« .TO TEST THE BASIC EXTERNAL FUNCTION- CEXP 8.3.3 P0820070

C*«*** .TESTING RANGE EXTENDS FROM 0 TO 16 FOR MODULUS (TABLE 4)P0820080

C'*«*** AND ARGUMENT, VARIES BY STEPS OF PI/3 MAGNITUDE P0 82 0 090

C«t«»« .INTRINSIC FUNCTIONS CMPLX, SNGL, MOD ASSUMED WORKING P0820100

C***** P0 82 0 1 1 0 C«**«« SPECIFICATIONS SEGMENT082 P082012 0 CV*««* POO 1 1850

C«»«t* WHEN EXECUTING ONLY SEGMENT 082, THE SPECIFICATION STATEMENTS P0011855

C*»«** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0011860

C**«** IN COLUMNS 1 AND 2 REMOVED. P0011865

C* * * * * POO 1 1 870

C= COMPLEX EP1C(30), AVC, BVC- P0011875

C= DOUBLE PRECISION AVD, BVD P0 0 1 1 8

80' COMPLEX EP1C(30), AVC, BVC P082A1

DOUBLE PRECISION AVD, BVD P0 82A2

C»«**» P0011885

C«**»« 0 U TPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0820130

C**«*« P0071570

C'*'*T«* WHEN EXECUTING ONLY SEGMENT 0 82, THE FOLLOWING STATEMENT P0 0 7 1 5 75 C*«*tt NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071580

C= NUVI ="6 POO 7 158 5 NUVI = 6 P082B1

C***** P0071590

WRITE(NUVI .820) P0820140

820 F0RMAT(15H1 CEXPO - ( 082 )//32H BASIC EXTERNAL FUNCTION -CEXP- P0 82 0 1 5 0 1// 29H (EXPONENTIAL -TYPE C 0 M P L E X ) / / 2 7 H ASA REF.- 8.3.3 (TABLE 4P0 82 0 1 60

2jJ/20H (COMPLEX ARGUMENT )/ 8X , 1 5HEXPE CTED RESULT / 8X . 1 5HFUN CT I ON RP0 82 0 1 70

3ESULT) P0820180

C'»»*** LOG OF 10 P082 0 1 90

BVD = 2 . 302 5850929940D0 P0 8 2 020 0 C «**"*"* SINE OF 60 DEGREES PO 8 2 02 1 0 AVD = . 86602 5 403 78 444D0 P0 8 20220

t'*"*"t*'t rNITIALI2E EPIC (EXPECTED VALUES) P0 8 2 023 0 EPICd) = CMPLX(0.5E-7.SNGL(-AVD*1 .0-7)) P0 82 02 40

EP1C(2) = CMPLX(2.5E-7,SNGL(-AVD*5.D-7)) P0 82 02 5 0 EP1C(3) = (1 .E-6,0.0) P082 0 260

EP1C(4) = (5.E-6.0.0) PO 82 02 70

EP1C(5) = CMPLX(0.5E-5,SNGL(AVD*1 .D-5)) P0820280

EP1 C(6) = CMPLX (2 . 5E-5 .SNGL(AVD*5 .D-5) ) PO 82 0290

EP1C(7) = CMPLX(-.5E-4,SNGL(AVD * 1.D-4)) P0820300

98 NBS FORTRAN Test Programs Version 1
EP1C(8) = CMPLX(-2.5E-4.SNGL(AVD*5.D-4)) P0820310

EP1C(9) = (-1.E-3.0.0) P0820320

EPIC(IO) = (-5.E-3,0.0) P0820330

EPICdl) = CMPLX(-0.5E-2,SNGL(-AVD*1 .D-2)> P0 82 0 3 40

EP1C(12) = CMPLX(-2.5E-2,SNGL(-AVD * 5.D-2)) P0 8 2 0 3 5 0 EP1C(13) = CMPLXCO . 5E-1 , SNGL ( -AVD* 1 . D-1 ) ) P0820360

EP^ ^^U) = CMPLX(2 . 5E-1 , SNGL ( -AVD*5 . D-1 ) ) P0 8 2 0 3 70

EP1C(15)=(1. 0,0.0) P0820380

EP I C ('16 ) = (5.0,0.0) P0 8 2 0 390

EP1C(17) = CMPLX( 0 . 5E1 , SNGL ( AVD * I.DD) P 0 8 2 0 40 0 EPICdS) = CMPLX(2.5E1,SNGL(AVD * 5.D1)) P0 8 2 0 4 1 0 EP1C(19) = CMPLX( -0 . 5E2 , SNGL (AVD » 1.D2)) P0820420

EPTC(20) = CMPLX( -2 . 5E2 , SNGL (AVD * 5.D2)) P0 8 2 0 43 0 EP1 C(21 ) = (-1 .E3,0.0) P 0 8 2 0 4 4 0 E Pi C (2 2 ) : ( - 5 . E 3 , 0. 0) P 0 8 2 0 4 5 0 EP1C(23) = CMPLX( -0 . 5E4 , SNGL ( -AVD * 1.D4)) P 0 8 2 0 460

EP1C(24) = CMPLX( -2 . 5E4 , SNGL ( -AVD • 5.D4)) P 0 8 2 0 4 70

EP1C(25) = CMPLX(0.5E5,SNGL(-AVD 1.D5)) P0820480

EP1C(26) = CMPLX(2.5E5,SNGL(-AVD * 5.D5)) P0 8 2 0 490

EPU(27) - (1 .E6,0.0) P0 8 2 0 5 0 0 E pi C (28) = ( 5 . E 6 , 0 .0 ) P 0 8 2 0 5 1 0 EP1C(29) = CMPLX( 0 . 5E7 , SNGL (AVD * 1.D7)) P0 8 2 0 5 2 0 EP1C(30) CMPLX(2. 5E7,SNGL(AVD * 5.D7)) P0 8 2 0 5 3 0 IVI = 0 P0820540

821 IVI = IVI + 1 P0 8 2 0 5 5 0 IF ( MOD( IVI ,2) .EQ.O) GO TO 822 P0820560

X I V S = ( ( I V I + 1 ) / 2 ) - 8 P 0 8 2 0 5 7 0 AVS = BVD * XIVS ' P0820580

GO TO 823 PO 820 5 90

C«***« 1.609 IS LOG OF 5 P0820600

822 XIVS = (IVI / 2) - 8 P0 8 2 06 1 0 AVS = BVD * XIVS + 1 .6094379124341D0 P0820620

C«««*« 1.047 IS PI/3 P0820630

823 AVC = CMPLX(AVS.SNGL(1 .0471975511966D0 * XIVS)) P0820640

BVC = CEXP(AVC) P0820650

WRITE(NUVI, 824) AVC, EPIC(IVI), BVC P0820660

IF'dVI - 1 0 ) 82 5 , 82 7, 82 5 P0 82 06 70

825 IF (IVI - 20) 826, 827, 826 P0820680

826 IF (IVI - 30 ) 82 1, 828, 82 8 P0 82 069()

827 WRITE(NUVI, 829) P0820700

GO TO 821 P0820710

828 CONTINUE P0820720

829 F0RMAT(22H1 CEXPO - ( 082 ) -CEXP-i P0 82 0 730' 824 FORMAT(3H0 ( , E 1 4 . 7 , 1 H , , E 14 . 7 , 1 H ) , 2 ( / 8X , 2E 1 6 . 7 ) ) P 0 8 2 0 740

C***«* END OF TEST SEGMENT 0 82 P0 82 0 7 5 0 C***»* WHEN EXECUTING ONLY SEGMENT 082, THE STOP AND END CARDS P0820760

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 8 2 0 770

C*«**« IN COLUMNS 1 AND 2 REMOVED. P0820780

C= STOP PO 82 0 790

C= END P0820800

STOP P0 82 C1 END P0 8 2 C2

C***********t«tt***t*******«*««ii***«*«««*«««**t»t« t** t«**«t******t*«P08300 l6

C***** P0830020

C » * » * * L 0(3TM - 0 83 P 0 8 30 03 0 C* * * * « P083004P

C*««««*«»«*«*«»****»»«**«*«**«*««««««««t««t««««*«««t««ttttt«««»««t*«tt«tP0830056

C***** GENERAL PURPOSE P0830060

C***** .TO TEST BASIC EXTERNAL FUNCTION - ALOG - ASA REF PO 83 0 0 70

C*«««« NATURAL LOG -USED IN SIMPLE ARITHMETIC EXPRESSIONS 8.3.3 P0830080

C***** INTRINSIC FUNCTIONS A B S , AM I N 1 , I N T , M I N 0 , F L 0 AT , TABLE 4 P083 0 090

C«««*« SIGN ASSUMED WORKING P0830100

C**««* ARGUMENTS ARE POWERS(OR SUMS) OF 2 P0 8 3 0 1 1 0 C***** P0830120

t*ttt* OUTPUT TAPE ASSIGN ME NT STATEMENT. NO INPUT TAPE. P0 8 3 0 1 3 0 C* * * * * P0 0 7 1 60 0 C***** WHEN EXECUTING ONLY SEGMENT 083, THE FOL LOW I NG STATEMENT POO 7 160

5

Ct«««« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071610

NBS FORTRAN Test Programs Version 1 99
C= NUVI = 6 P0071615

NUVI =6 P083B1

C»«**» P007162b

830 F0RMAT(15H1 LOGTH - (083)//32H BASIC EXTERNAL FUNCTION -ALOG- P0830 U0

1//26H (NATURAL LOG -TYPE REAL) P0830 1 50

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0830160

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P083 0 1 70

WRITE (NUVI. 830) P0830180

Ct*t«« HEADER FOR SEGMENT 083 WRITTEN P0 83 0 1 90

AVS = .25 P0830200

CVS = 2.0 PO 8302 1 0 MVI = -2 P0830220

BVS = ALbG(AVS / 2.6) P0830230

WRITE (NUVI, 831) BVS P0830240

BVS = ALOG(AVS) P0830250

WRITE (NUVI. 832) BVS P0830260

BVS = ALOG(AVS * CVS) P0830270

WRITE (NUVI. 833) BVS P0830280

BVS = ALOG(AVS * CVS ** 2) P083 0296

WRITE (NUVI. 834) BVS P0830300

BVS = ALOG(AMI N1 (AVS * 2.0 + ABS ( F LOAT ( MVI ) 7 TvS ) . CVS P08303 1 0 WRITE (NUVI, 835) BVS P0830320

BVS = ALOG ( S I GN ( FLOAT( M I NO ( MVI . I NT ( CVS ) ) ) , AVS ) ) P083 0330

WRITE (NUVI. 836) BVS P0830340

STi FORMAT( 9H0 X = 0 . 1 2 5 , 5 X . 1 9 H - 2 . 0 7 9 4 4 1 5 4 1 6 7 9 8 3 5 9 / 1 4X . F 9 . 6 ) P0 8303 5 0 832 FORMAT( 9H0 X:0.25 , 5X . 1 9H- 1 . 38629436 1 1 1 98906 / 1 4X . F 9.6) P0830360

833 FORMAT( 9H0 X = 0.5 . 5X , 1 9H - 0 . 69 3 1 4 7 1 8 0 5 5 99 4 5 3 / 1 4X . F 1 0 . 7 ) P083 03 70

834 FORMAT( 9H0 X=1.0 .5X.19H 0 . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / 1 4X . F 1 0 . 7 ) P0 83 03 80

STS FORMAT( 9H0 X=1.5 .5X.19H 0 . 4 0 5 46 5 1 0 8 1 0 8 1 6 4 4 / 1 4X . F 1 0 . 7 ) P0 83 0390

836 FORMAT( 9H0 X = 2.0 .5X,19H 0 . 6 9 3 1 4 7 1 8 0 5 5 994 5 3 / 1 4X . F 1 0 . 7 ) P0 83 0 400

WRITE (NUVI. 83 7 ) P083 0 4 l6

837 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H CAL CU L AT I 0 N P 0 8 3 0 4 2 0

1 PRINTED TO .8H7 DIGITS) P0 83 043 0' C*«*** END OF TEST SEGMENT 083 P0830440

C***** WHEN EXECUTING ONLY SEGMENT 083. THE STOP AND END CARDS P0830456

Ct**t» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0830460

C«*«t* IN COLUMNS 1 AND 2 REMOVED. P083 0 4 70

C= STOP P0830480

C= END P0830496

STOP P083C1

END P083C2

C*t*t*****«t***<t*t*t**t«**t*****t***t***t*t****t***********t************P0840010

C * *'« *"« P08 4002()

C***«* DPLOG - 084 P0840030

C«**** [ P084004()

Q**»t*********t***t***«°***tt***it****t*«*«*ttt**««*****tt*t****it******t**P0840050

C*«**» GENERAL PURPOSE P0 8 40 06()

C***** TO TEST BASIC EXTERNAL FUNCTION - DLOG - ASA REF P0840070

C***** NATURAL LOG -TYPE DOUBLE PRECISION 8.3.3 P08 400 80

C « USED IN SIMPLE ARITHMETIC EXPRESSIONS TABLE 4 P0840090

C **  V * ; INTRINSIC F U N C T I 0 N S D M I N 1 . D A B S . D B L g ^ p ^ q ^yy ^ g j q P 0 8 4 0 1 0 () C«**** MINO.DINT, ASSUMED WORKING P0840110

Ct**«* ARGUMENTS ARE POWERS OF 2 Pb84012b

C«**** P0840130

C*«'* « * S P E

C'

i F I C A t 1 0 N S SEGMENT 084 P 0 8 4 0 1 40

C***** P0011890

C***** WHEN EXECUTING ONLY SEGMENT 0 8 4 . THE gp^ j. j p j j STATE ME NTS POOH 895

C***«« WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C= P0011900

C***«'« IN COLUMNS 1 AND 2 REMOVED. P00 1 1 90 5 C***«* P0011910

C = DOUBLE PR E C I S 10 N A VD B Vt) , C V D P 0 Oil 915

DOUBLE PRECISION AVD. BVD. CVD P084A1

C***** P0011920

C«*«»« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0840150

C»***« P0 0 7 1 63 0 C«*tt« WHEN EXECUTING ONLY SEGMENT 084. THE FOLLOWING STATEMENT P0071635

C«««** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071640

C= NUVI = 6 P0071645

100 NBS FORTRAN Test Programs Version 1
NUVI = 6 P084B1

C«  P0071650

84 0 F OR MA T (1 5 HI OP LOG (b84)//32H' BASIC'EXTERNA L F U N C tlO N - DLO G - P 0 2 4 0 1 6 0 1//38H (NATURAL LOG -TYPE DOUBLE PRECISION) P0840170

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR iS/23H P0840180

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P08 40 1 90

WRITE (NUVI. 840) P0840200

C** *** HEADER FOR SEGMENT 084 WRITTEN P0840210

AVD = . 25D0 P0 8 40 220

CVD = 2.0D0 P0840230

MVI=-2 P0840240

BVD = DLOG(AVD / 2.0D0) P0840250

write' (NUVI . 841 ) BVD P0 8 4 0 2 60

BVD = DLOG(AVD) P0840270

WRITE( NUVI, 842 ) BVD P0 8 4 0 2 8 0 BVD = DLOG(AVD * CVD) P0840290

WRITE(NUVI, 843) BVD P0840300

BVD = DLOG(AVD • CVD ** 2) P0840310

WRITE " (NUVI , 8 44 ) BVD P0 8 403 20

BVD = DLOG(DMI N1 (AVD * 2.0D0 +DABS ( DBL E ( F L OAT ( MV I ) ) / CVD ) . CVD)) P0840330

WRITE (NUVI, 8 4 5 ) BVD " P0 8 403 40

BVD = DLOG (DS I GN( DBLE( FLOAT(MINO(MVI , IDI NT( CVD) ) ) ) AVD) ) P0 8 403 5 0 WRITE (NUVI, 846 ) BVD P 0 8 403 60

WRITE (NUVI ,847) P0840370

8 4"i' FORMAT ( 9H0 X = 0 . 1 2 5 . 5 X , 2 3 H - 2 . 6 7 9 4 4 1 5 4 1 6 79 8 3 5 90 + 0 0 / i P 03 4 .T3 ^ PO 8 403 8 0 842 FORMAT( 9H0 X = 0.2 5 , 5 X , 2 3 H

- 1 . 3 8 6 2 9 4 3 6 1 1 1 9 8 9 0 6 D + 0 0 / 1 P D 3 4 . 1 3 ) P0 8 4 0 3 90

843 FORMAT( 9H0 X = 0.5 , 5 X , 2 3 H

- 0 . 693 1 4 7 1 8 0 5 5 99 4 5 3 0 + 0 0 / 035.14) P0 8 4 0 4 0 0 844 FORMAT( 9H0 X=1.0 ,5X,23H 0.000000000000000 / D35.14) P0840410

8 4 5 F 0 R MAT ( 9 HO X= 1 . 5 , 5 X . 2 3 H 0 . 4 0 5 4 6 5 1 0 8 1 0 8 1 6 4 4 D + 00/ D 3 5 . 14) P 0 8 4 0 4 2

0

846 FORMAT( 9H0 X = 2.0 ,5X.23H 0 . 6 9 3 1 4 7 1 8 0 5 5 9 9 4 5 3 D + 0 0 / D35.14) P 0 8 40 43 0

8"4"7 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H C A L CU L AT I 0 N P 0 8 4 0 4 4 0 A PRINTED TO ,9H14 DIGITS) P0840450

CV*;*T END OF TEST SEGMENT 0 8 4 PO 8 4 0 460

C***** WHEN EXECUTING ONLY SEGMENT 084, THE STOP AND END CARDS P0840470

C t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 8 4 0 4 8 0 C** *** IN COLUMNS 1 AND 2 REMOVED. P0840490

C= STOP P 0 8 4 0 5 00

C= END P0840510

STOP P0 8 4 C1 END P0 8 4 C2

£**t********tttt**t*t*t****tt*t*tt***t**t***t***t**tt t** li*t*t*t*t*ttPOi'iQO'\Q

C***** P0850020

C CXLOG - ( 08 5 ) P0 8 5 0 03 0 C* * * * * P0 8 5 0 0 40

C***«***t*<;****t***t**t*******«t****«*«***rt***«*it********ttt**********«t*P0850050

GENERAL PURPOSE ASA REF P0850060

C***** .TO TEST BASIC E XTE R N A L F U N CT I 0 N - CLOG - ASA REF P0 8 5 0 0 70

C***** (COMPLEX LOG) 8.3.3 P0850080

C*V*** TESTING RANGE EXTENDS FROM 0 TO 5.E7 FOFt M(jburUS TABLE 4 P0 8 5 0 090

C**««* AND ARGUMENT VARIES BY STEPS OF PI/3 MAGNITUDE P0850100

C* » * «* I NTRI NSI C FUNCTIONS CMPL)(, SNGL , MOD ASSUMED WORKI NG P0 8 5 0 1 1 0 C***** P0850120

C***** S P E C I F I CAT I 0 N S SEGMENT 085 P0850130

C***** P0011930

C V * * * * W H EN E)(ECUTING ONLYS EG ME NT 0 8 5 . THE g p ^ j p j j^^j I (DN STATEMENTS P 0 0 1 1 9 3 5 C*««** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0011940

Z*T*t* IN COLUMNS 1 AND 2 REMOVED. P 0 0 1 1 94 5 C***** P001 1950

C=' COMPLEX EPiC(30)V AVC, BVC P0011955

C= DOUBLE PRECISION AVD, BVD P0011960

COMPLEX EP1C(30). AVC, BVC P0 8 5A1

DOUBLE PRECISION AVD, BVD P085A2

C« * * * * POO 1 1 9 65

C**«*« OUTPUT-TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P 0 8 5 0 U0

C * * * * * P 0 0 7 1 660

C««**t WHEN EXECUTING ONLY SEGMENT 085, THE FOLLOWING STATEMENT P0071665

C«*«*« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AN D 2 REMOVE D. P00 7 1 6 70 C= NUVI = 6

tti P0071675

NBS FORTRAN Test Programs Version 1 101
NUVI = 6

C « * * »

«

WR I TE "( NUV'l', 8 SO ) 850 FORMAK 15H1 CXLOG - (085) //32H BASIC EXTERNAL FUNCTION -CLOG1// 29H (NATURAL LOG -TYPE C 0 M P L E X ) / / 2 7 H ASA REF.- 8.3.3 (TABLE

2)//20H (COMPLEX ARGUMENT)/ 8X . 1 5 HEXPE CTED RESULT / 8X , 1 5 H F U N CT I 0

N

3 R E S U L T ) Ct**«« LOG OF 10

BVD = 2 . 3 02 5 8 5 0929940D0

C***** SINE OF 60 DEGREES

AVD =.8660254037844400

C***** INITIALIZE EPIC (EXPECTED VALUES)

EP1 C( 1

)

EP1 C(2).

EP1 C(3)

EP1 C(4)

EPI C( 5 ) EP1 C(6)

EPI C(7)

EPI C(8)

E P 1 C ( 9 ) EPI C(10)

EPiC( 1 1

)

EPI C( 12)

E P 1 C ( 1 3 ) EPI C( 1 4)

EPI C( 1 5 ) EPI C( 16) EPI C( 1 7)

EPI C( 1 8 ) EPI C( 19)

EPI C(20)

EPI C(21 ) EPI C(22)

EPI C(23)

EPI C(24)

EPI C(25)

EPI C(26)

EPI C(27)

EP1C(28)

EPI C(29)

EPI C(30)

CMPLX( 0 . 5E-7

CMPLX(2 . 5E-7

( 1 .E-6,0.0)

( 5 . E-6 , 0 . 0 ) CMPLX( 0 . 5E-5

CMPLX(2 . 5E-5

CMPLX( - . 5E-4

SNGL ( -AVD*

1

SNGL ( -AVD* 5 D-7) ) D-7) )

5E-4

. 0 ) 0.0)

. 5E-

. 5E5E-1

5E-1

CMPLX( -2 . (-1 .E-3,0

(-5.E-3,

CMPLX( -0

CMPLX( -2

CMPLX( 0 . CMPLX( 2 . (1.0,0.0)

(5.0,0.0)

CMPLX(0.5E1

CMPLX( 2 . CMPLX( -0

CMPLX(-2

( - 1 . E 3 , 0

( -5 . E3 , 0 CMPLX( -0

CHPLX( -2

CMPLX( 0 . CMPLX(2 .

( 1 . E6, 0 . (5.E6,0.

CMPLX(0

.

CHPLX( 2 .

SNGL ( AVD» 1 . D- SNGL (AVD* 5 . D- SNGL (AVD 1

, SNGL ( AVD* 5 . [

5 ) ) 5 ) ) D - 4 ) )' -4 ) )

2 , SNGL ( -AVD* 1 .0-2))

2,SNGL(-AVD * 5.0-2))

,SNGL(-AVD*1 .D-D)

,SNGL(-AVD*5.D-1 ))

SNGL(AVD * 5E1,SNGL(AVD *

. 5E2, SNGL(AVD

. 5E2 , SNGL (AVD

.0)

. 0 )

. 5E4,SNGL(-AVD

. 5E4 , SNGL ( -AVD

5E5,SNGL(-AVD

SNGL ( -AVD

01 ) ) 01 ) ) .02) )

. 02 ) )

Ct«»*« YVS

C« * * * t FOR

YVS = IVI = 8 5"i IVI =

COMPENSATES

. 5E5

.0)

.0)

. 5E7

. 5E7

FOR

.04))

.04) ) 05 ) )

* 5.05))

1

SNGL(AVD * 1 SNGL(AVD » 5 2PI AND +2PI07) ) D7) ) GENERATED

EXPECTED

6 . 0IVI +1 2)

IMAGINARY VALUES, TAKES VALUES

BY USE OF XIVS«PI /3

+6,0,-6 DURING

IF (MOD( IVI , 2) .EQ. 0) GO TO 852

XI VS = ( ( I VI + 1 ) /2 ) - 8 AVS = BVD * XIVS

GO TO 853

Ctt*tt 1 . 609 I S LOG OF 5 852 XIVS = (IVI / 2) - 8 AVS = (BVD « XIVS) + 1 .6094379 1 2434 1 D0

C ***« 1 . 0 47 IS Pr/3

853 AVC = CMPLX (AVS, SNG L ( 1 . 0 4 7 1 9 7 5 5 1 1 9660

0

BVC = CLOG (EPI C( IVI )

)

WRITE (NUVI, 854) EPI C( IVI ) , AVC, BVC

IF( IVI - 1 0 ) 8 5 5 . 8 5 8 . 8 5 5 855 IF ( IVI - 20) 856, 859, 856

856 IF (IVI - 22 ) 8 5 7, 78 50, 8 5 7

8 5 7 IF (IVI - 30 ) 8 5 1 , 78 5 1 . 78 5 1

* (XIVS + YVS)))

P085B1

P0071 680

P08501 50

P0850160

4P08501 70

P08501 80

P0850190

P0850200

P0 8 5 02 1 0 P0850220

P0850230

P0850Z40

P0250250

P0850260

P0850270

P0250280

P0850290

P0850300

P085031

0

P0850320

P 0 8 5 0 3 3 0 P0850340

P 0 8 5 0 3 5 0 P0850360

P0850370

P0850380

P 0 8 5 0 3 9 0 P0850400

P 0 8 5 0 4 1 0 P0850420

P 0 8 5 0 4 3 0 P0850440

P0850450

P0850460

P0850470

P0850480

P0850490

P0850500

P 0 8 5 0 5 1 0 P0850520

P0850530

P0850540

P0850550

RANGEP0850560

P0850570

P0850580

P0850590

P0850600

P 0 8 5 0 6 1 0 P0850620

P 0 8 5 0 6 3 0 P0850640

P0850650

P0850660

P0850670

P0850680

P08 5 0690

P0850700

P0850710

P0850720

P0850730

P0850740

858 YVS = 0.0 P0850750

859 WRITE (NUVI. 7852) P0850760

GO to 851 P0 8 5 0 7 70

7850 YVS = -6.0 P0850780

GO to 851 P0 8 5 0 790

7851 CONTINUE P0850800

102 NBS FORTRAN Test Programs Version 1
CARDS

P0850810

P0850820

P0850830

P0850840

P0850850

P0850860

P0850870

P0850880

P08 5C1

P085C2

8 5 4 F0RMAT(3H0 ( . E U . 7 . 1 H , . E U . 7 . 1 H ) , 2 ( / 8X , 2E 1 6 . 7 )

)

7852 F0RMAT(22H1 CXLOG - (085) -CLOG-)

C*'**** END OF TEST SEGMENT 085

C***** WHEN EXECUTING ONLY SEGMENT 085. THE STOP AND END

C*V*"*» WHICH APPEAR AS COMMENT CARDS MUST havE THE'C:

Ct***« IN COLUMNS 1 AND 2 REMOVED.

C'= STOP

C= END

STOP

END

C*******<[t*t***t***t******************t*«*t**************************t**P0860010

C***** P0860020

C **'««* CO LOG - 086 P 0 8 6 0 0 3 0

C * * « * P0860 0 40

C**«** GENERAL PURPOSE P0860060

C***** TO TEST BASIC EXTERNAL FUNCTION - AL0G10 - ASA FIEF P0 8 6 0 0 70

C***** COMMON LOG - TYPE REAL 8.3.3 P0860080

C*»*V* USED IN SIMPLE ARITHMETIC EXPRESSIONS TABLE 4P 0 8 60 09 0 C**«** INTRINSIC FUNCTIONS A B S , A I N T , AM AX 1 , S I G N , AS SUM E D WORKING P0 860 1 00

C**«** ARGUMENT RANGE 0.5 TO 16.0 .POWERS OF 2

C * * * *

«

C ***** 0 U T p u J T A P E ASS I GNMENT STATEME NT .

'

C * « *

«

C*«»** WHEN EXECUTING ONLY

C**«** NUVI = 6 MUST HAVE

NO INPUT TAPE

SEGMENT 086. THE FOLLOWING STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = NUVI =

C « « * *

«

860

12

3

F0RMAT(15H1 COLOG - ( 086 )// 34H BASIC EXTERNAL FUNCTION -AL0G1.0-

//25H (COMMON LOG -TYPE REAL)

//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H

HOLLERITH I N FORMAT I ON / / 9H RESULTS)

WRITE (NUVI, 860)

P 0 860 1 1 0 P08601 20

P08601 30

P0071690

P0071 695

P0071 700

POO 7170

5

P086B1

P0071 71

0

P08601 40

P 0 8 6 0 1 5 0 P0860160

P 0 8 6 0 1 7 0 P08601 80

C * * * * * HEADER

AVS = -2.0

FOR SEGMENT 086 WRITTEN

+ 1.0))

-4 . 0 ALOG10(AVS / CVS)

(NUVI, 861) BVS

AL0G10(ABS(AVS

(NUVI , 862) BVS

AL0G10( -AVS)

( NUVI , 863 ) BVS

AL0G10(AINT(AVS

(NUVI, 864) BVS

AL0G10(AMAX1 (AVS

(NUVI, 865) BVS

AL0G1 0(SIGN( CVS. (-AVS) ) (NUVI, 866 ) BVS

(NUVI, 867)

2.0 - CVS) )

« CVS, CVS * 2.0))

«*2)

861

862

863

864

86 5 866

867

C * 1 1 *

«

Z* * * * * C * t « t * c « « * « c=c=

CVS = BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

WRITE

FORMAT(

FORMAT(

FORMAT(

FORMAT

(

FORMAT(

FORMAT(

FORMAT( / /37H

PRINTED TO

END OF TEST SEGMENT 086

WHEN EXECUTING ONLY SEGMENT 086. THE STOP

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

8H0

8H0

8H0

8H0

8H0

8H0 1 6

5X, 25H-0. 301029995663981 1952137/8X, F15.7)

P08601 90

P0860200

P0 86 02 1 0 P0860220

P0860230

P0860240

P0860250

P0860260

P 0 8 6 0 2 7 0 P0860280

P0860290

P0860300

P0 8603 1 0 P0860320

P0860330

P0860340

P0860350

5 X ,2 5 H 0 . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / 8 X , F 1 5,7) P 0 860360

5X

5X

5X

5X

LINE 2 OF EACH

8H7 DIGITS)

25H

25H

25H

25H

3010299956639811952137/8X, F15

6020599913279623904275/8X, F15

903089986991943585 6 412/8X, F15

204 1 1 998265 5 92 478 08 5 5 0 / 8X. F15

PAIR IS THE FUNCTI0N/25H

7)

7)

7)

7)

P0860370

P0860380

P0860390

P0860400

AND

C = END CARDS

CALCULATIONP0 86 0 4 1 0 P0860420

P0860430

P0860440

P0860450

P0860460

P0860470

P0860480

P086C1

P086C2

Ctt*t*t*****t***********t t** *********t********t**t*t*****tttttttt*«*P0870010

C««««« P0870020

NBS FORTRAN Test Programs Version 1 103
C«»«** OCLOG - 087 P0870030

C * * « * * PO 8 700 40

C*****«*t*«*t*«««*tt««*«»««*t*ttt«»*t«»«»«t«*»««*t«tt»**«««*«»t«»t«»*t««P0870050

C***«* GENERAL PURPOSE P0870060

C*«*** TO TEST BASIC EXTERNAL FUNCTION - DLOGIO - ASA REFP0 8 700 70

C«**** COMMON LOG - TYPE DOUBLE PRECISION 8.3.3 P0870080

C«*V*« SAME AS SEGMENT 086 EXCEPT FOR TYPE TABLE 4P0 8 70090'

C*««** INTRINSIC FUNCTIONS D AB S , I D I N T , F L 0 AT , D B L E , P0 8 70 1 0 0 C***'»« DMAXI.DSIGN ASSUMED WORKING PO 8 70 1 1 0 Cvv*** ARGUMENT RANGE 0.5 TO 16.0 POWERS OF 2 P0 8 7 0 1 2 0 C***«* P08 70130

C**t«* SPECIFICATIONS SEGMENT 087 P0870140

C***** POO 11 970

C**«»* WHEN EXECUTING ONLY SEGMENT 087, THE SPECIFICATION STATEMENTS P0011975

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C: P0011980

C*»t** IN COLUMNS 1 AND 2 REMOVED. P0011985

C»**«* POOl 1990

C= DOUBLE PRECISION AVD. BVD, CVD P0011995

DOUBLE PRECISION AVD. BVD. CVD P0 8 7A1

C* * * * * POO 1 2 00 0 C»**»* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0870150

C***** P0071720

C*»*«* WHEN EXECUTING ONLY SEGMENT 087, THE FOLLOWING STATEMENT P0071725

C*«*t* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071730

C= NUVI = 6 P0 0 7 1 73 5 NUVI = 6 P087B1

C * * * « P 0 0 7 1 7 4 0 870 F0RMAT(15H1 DCLOG - (087)//34H BASIC EXTERNAL FUNCTION -DLOGIO- P0870160

1//37H (COMMON LOG -TYPE DOUBLE PRECISION) P0 8 70 1 70

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0870180

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P0 8 70 1 9 0 WRITE (NUVI, 870) P0870200

C**«** HEADER FOR SEGMENT 087 WRITTEN P0870210

AVD - -2.0D0 ^ P0870220

CVD = -4.0D0 P 0 8 7023 0 BVD = DL0G10(AVD / CVD) P0870240

WRITE (NUVI , 871 ) BVD P0 8 70 2 5 0 BVD = DL0G10(DABS(AVD + 1.0D0)) P0870260

WRITE (NUVI , 8 72 ) BVD P 0 8 702 70

BVD = DL0G10( -AVD) P0870280

WRITE (NUVI, 873) BVD P0870290

BVD = DL0G10(DBLE(FL0AT( IDINT(AVD + 2.0D0 - CVD)))) P0 8 70 3 0 0 WRITE (NUVI, 874) BVD P0870310

BVD = DLOG10(DMAX1 (AVD * CVD, CVD * 2.0D0)) P0870320

WRITE (NUVI, 875) BVD P0870330

BVD - DLOG10(DSIGN(CVD, (-AVD)) **2) P0870340

WRITE (NUVI , 8 76 ) BVD P0 8 70 3 5 0 WRITE (NUVI, 877) P0870360

871 FORMAT( 8H0 X= 0 . 5 , 5 X , 2 9H- 0 . 3 0 1 0 2 999 5 6 63 9 8 n 9 5 2 1 3 7D + 0 0/ 03 4 ^T; ) P 0 8 7 0 3 7 0 872 F0RMAT( 8H0 X= 1.0,5X,29H 0.0000000000000000000000 /D34.14) P0870380

873 FORMAT( 8H0 X= 2.0,5X,29H 0 . 3 0 1 0 2 9 99 5 6 6 3 9 8 1 1 9 5 2 1 3 7 D + 0 0 / D 3 4 . 1 4 ) P 0 8 70390

874 FORMAT( 8H0 X= 4.0,5X,29H 0 . 6 0 2 0 5 9 99 1 3 2 79 62 3 9 0 4 2 7 5 D + 0 0 / D 3 4 . 1 4 ) P0 8 70 4 0 0

8 75 FORMAT( 8H0 X= 8.0,5X,29H 0.9 0 3 0 899 8699 1 943 5 8 5 6 4 1 20 + 0 0 / 03 4.14) P0 8 70 4 1 0' 876 F0RMAT( 8H0 X = 1 6 . 0 , 5 X , 2 9 H 1 . 2 0 4 1 1 9 9 8 2 6 5 5 9 2 4 7 8 0 8 5 5 0 D + 0 0 / 1 P D 3 3 . 1 3 ) P0 8 70 42 0 877 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H C A L C U L AT I 0 N P 0 8 7 0 4 3 0 A PRINTED TO ,9H14 DIGITS) P0870440

C***«t END OF TEST SEGMENT 0 8

7

' PO 8 70 4 5 0 C***** WHEN EXECUTING ONLY SEGMENT 087, THE STOP AND END CARDS P0870460

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0870470

C***** IN COLUMNS 1 AND 2 REMOVED. P0870480

C= STOP P0 8 7 0 490

C= END P0870500

STOP P0 8 7 C1 END P 0 8 7 C2

C*t*****««***«t*****«*********«t***t***«t**«***« «** *«*******«*******P0880010

C***** P0880020

C* **« SINUS - 0 8 8 P0 8 8 0 03 0 C* * * * * P0 8 8 0 0 40

104 NBS FORTRAN Test Programs Version 1
C***)tt*t*******«*******t********t**********t*******t*t*t*******t t** *P0SS0050

C«**t« GENERAL PURPOSE ASA REFP08S0060

C***t* TO TEST BASIC EXTERNAL FUNCTION - SIN - 8.3.3 P02 80 0 70

C*«*t» TRIGONOMETRIC SINE - TYPE REAL TABLE 4P0880080

C***** INTRINSIC FUNCTION SNGL ASSUMED WORKING P0880090

C**«** ARGUMENTS FROM 0 TO 2 PI P088 0 1 00

C* « * * « P0880 1 1 0 C***** SPECIFICATIONS SEGMENT 088 P0880120

C * * * * * C***** WHEN EXECUTING ONLY SEGMENT 088, THE SPECIFICATION STATEMENTS

C « WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C** *** IN COLUMNS AND 2 REMOVED.

C « « * «

«

AVD, BVD, CVD, DVD, EVD, PIVD

AVD, BVD, CVD, DVD, EVD, PIVD

C = PRECISION

PRECISION

UTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

EXECUTI NG

= 6 MUST

6

6

ONLY

HAVE

SEGMENT

THE C = 088, THE FOLLOWN COLUMNS 1 AND

NG STATEMENT

2 REMOVED.

FUNCTION -SINDOUBLE

DOUBLE

C * * * «

«

c * * t * « 0

c * * * «

C * *

' *

"« * w HEN

C*«*** NUVI

C= NUVI = NUVI =

c * * « * « WRITE (NUVI, 880)

880 F0RMAT(15H1 SINUS - (088)//31H BASIC EXTERNAL

1//33H (TRIGONOMETRIC SINE -TYPE REAL)

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF

3 HOLLERITH I N F 0 R M AT I 0 N / / 9 H RESULTS)

C7**** HEADER FOR SEGMENT 088 WRITTEN

AVD = 3 . U062 5 D + 0 BVD = 0.9613037109375D-3

0 . 57220458984375D-5

0.5 9 6046447753906D-6

0 .3 1 78 6 5 09 5 4 70 5 6D-7

SUM OF AVD TO EVD, PARTS ARE EXPRESSED IN SUMS OF

PERMIT A POSSIBLE 20 DECIMAL DIGIT ARGUMENT TO BE

: EVD + DVD + CVD + BVD + AVD

1.0

EACH PAIR IS/23H

CVD = DVD = EVD = C«*«**PI IS C*«*t«2, TO

PIVD : AVS =

POWERS OF

CREATED

P00 1 20 1 0 P0 0 1 2 0 1 5 P 0 0 1 2 0 2 0 P0012025

P 0 0 1 2 0 3 0 P0 0 1 203 5 P088A1

P0012040

P0880130

P0071 750

P 0 0 7 1 7 5 5 P0071 760

P 0 0 7 1 7 6 5 P088B1

P 0 0 7 1 7 7 0 P08801 40

P08 801 50

P0880160

P 0 8 8 0 1 7 0 P08801 80

P08 80190

P0880200

P 0 8 8 0 2 1 0 P0880220

P02 80230

P0880240

P08802 50

P0880260

P 0 8 8 0 2 7 0 P0880280

P 0 8 8 0 2 9 0 P0880300

P 0 8 8 0 3 1 0 P0880320

P 0 8 8 0 3 3 0 P0880340

P0880350

P0880360

P 0 8 8 0 3 7 0 P0880380

P0880396

P0880400

P0 8 8 0 4 1 O' P0880420

P0880430

P0880440

P 0 8 8 0 4 5 0 P0880460

P 0 8 8 0 4 7 0 P 0 8 8 0 4 8 0 P 0 8 8 0 4 9 0 P0880500

P 0 8 8 0 5 1 0 P0880520

P0880530

P0880540

P 0 8 8 0 5 5 0 P0880560

P0880570

SS1

882

883

884

88 5 886

887

888

889

CVS = BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

WRITE

FORMAT(

FORMAT(

FORMAT(

FORMAT(

FORMAT(

FORMAT(

FORMAT(

FORMAT(

FORMAT(

AVS)

2 . 0 S I N ( CVS - 2.0 * (NUVI, 881) BVS

SIN(AVS)

( NUVI , 882 ) BVS

SIN (CVS)

(NUVI , 883) BVS

SIN(AVS + CVS)

(NUVI, 884) BVS

SIN(SNGL(PIVD)

)

(NUVI, 885) BVS" SIN(2. CVS)

(NUVI, 886) BVS

SIN(2.0 + CVS + (NUVI, 887) BVS

SIN(CVS * (AVS + CVS))

( NUVI , 888 ) BVS

SIN(SNGL(2.0D0

AVS)

* PIVD) )

( NUVI ,

( NUVI

,

9H0

9H0

9H0

9H0

9H0

9H0

9H0

9H0

9H0

889) BVS

7 8 8 0 ) 0.0 ,5X,15H 0.000000000000 /14X, F10.7)

1.0 , 5X, 1 5H+0 . 841 470984808 /14X, F10.7>

2.0 , 5X, 1 5H + 0 .90929 74268 26 / 1 4X, FICT)'

3.0 , 5X, 1 5H+0 . 1 41 1 20008060 /14X, F10.7)

( P I ) , 5 X , 1 5 H 0 . 0 0 00 0 0 0 0 0 0 0 0 / 1 4 X , F 1 0 . 7 ) 4.0 , 5X, 1 5H- 0 . 7 568 02 49 5 3 0 8 / 1 4X, F10.7)

5.0 , 5X, 1 5H-0 . 958924274663 /14X, F10.7)

6.0 , 5X, 1 5H-0 . 27941 54981 98 /14X, F10.7)

(2PI),5X,15H 0.000000000000 /14X, F10.7)

7880 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H C AL CU L AT I 0 N P 0 8 8 0 5 8

0

NBS FORTRAN Test Programs Version 1 105
1 PRINTED TO ,8H7 DIGITS) P0880590

Ct««*» END OF TEST SEGMENT 088 P0880600

C***** WHEN EXECUTING ONLY SEGMENT 08 8 , THE STOP AND END CARDS P088 06 1 0 C«**«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0880620

CVn*'* IN COLUMNS 1 AND 2 REMOVED'^ P0 8 8063 0 C= STOP P0880640

i:= END P0 8 8 06 5 0 STOP P088C1

END P0 8 8 C2

C**t**t***********************t***t« ti** rtt**********«*«*«4;t*******tiltP0890010

Z*t**t P0 8 90 02 0

C *,*„* * * P. P S.I N - 0 8 9 P 0 8 9 0 0 3 0 C***«'* P0 8 9 0 0 40

C***************«t**tt*********tt*************t «** «**tt*<r«*-*««*«*ilr**P0890050

C * * * * * C * * * * * C * * * * C * * «

«

C * t * * * C * * t * *

C t * « «

C « * * * * c « t « «

c « « « *

»

c » « * «

«

GENERAL PURPOSE

TO TEST BASIC EXTERNAL FUNCTION - OSIN - TRIGONOMETRIC SINE - TYPE DOUBLE PRECISION

SAME AS SEGMENT 088 EXCEPT D.P.

INTRINSIC FUNCTION DSIGN ASSUMED WORKING

ARGUMENTS FROM 0 TO 2 PI SPECIFICATIONS SEGMENT 089

WHEN EXECUTING ONLY SEGMENT 089, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

c* 2 REMOVED.

«

* IN COLUMNS 1 AND

c

«

»

« * * c= DOUBLE PRECISION AVD , DOUBLE PRECISION AVD , c * * * * * c * * * * « OUTPUT T APE

c * * * * * c*» * * « WHEN EXECUTING ONLY

c «

«

* * « NUVI = 6 MUST HAVE

c = NUVI = 6 NUVI = 6

BVD

BVD

CVD

CVD

DVD

DVD

EVD

EVD

PIVD

PIVD

XVD

XVD

FVD

FVD

GVD

GVD

ASSIGNMENT STATEMENT NO INPUT TAPE

SEGMENT 089, THE FOLLOWING STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

C » * * *

«

890

12

3

C » * 1 1

«

F0RMAT(15H1 OPSIN - (089)//32H BASIC EXTERNAL FUNCTION -DSIN-

//33H (TRIGONOMETRIC SINE -TYPE D.P.)

//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H

HOLLERITH I N FORMAT I ON / / 9H RESULTS)

WRITE (NUVI, 890)

HEADER FOR SEGMENT 089 WRITTEN

C t * * t * C t * « «

AVD = 3.140625D+0

BVD = 0.9613037109375D-3

CVD = 0 . 5 722 0 4 5 898 43 7 5 D-5

DVD = 0.5960464477539060-6

EVD = 0 . 3 1 786 5 09 5 4 70 5 6D-7

PI IS SUM OF AVD TO EVD, PARTS ARE

2, TO PERMIT A POSSIBLE 20 DECIMAL

PIVD = EVD + DVD + CVD + BVD + AVD

FVD = 1 . ODO

GVD = 2. ODO

XVD = DSIN(GVD - 2. ODO • FVD)

WTitE (NUVI, 891) XVD

XVD = DSIN(FVD)

WRITE (NUVI, 892) XVD

XVD = OSIN(GVD)

WRr ' UVI, 893 ) XVD

XVn - .IN(GVD + FVD)

V E iNUVI, 894) XVD

> .0 - DSIN(PIVD)

^RITE (NUVI , 895 ) XVD

XVD = DSIN(2. « GVD)

WRITE (NUVI, 896) XVD

XVD = DSIN(2.0 +FVD + GVD)

WRITE (NUVI, 897) XVD

XVD = OSIN(GVD * (FVD + GVD))

EXPRESSED IN SUMS OF DIGIT ARGUMENT TO BE

ASA REFP0890060

8.3.3 P0890070

TABLE 4P0890080

P0890090

P0 89 0 1 0 0 P 0 8 9 0 1 1 0 P0890120

P0890130

POO 1 2 0 5 0 P0 0 1 2 0 5 5 P 0 0 1 2 0 6 0 P0012065

P0 0 1 2 0 70

P0012075

P089A1

POOl 2 0 8 0 P0890 140

P0 0 7 1 78 0 P0071 785

P0071 790

P 0 0 7 1 7 9 5 P089B1

P 0 0 7 1 8 0 0 P08901 50

P0890 1 60

P08901 70

P 0 8 9 0 1 8 0 P08901 90

P 0 8 9 0 2 0 0

P 0 8902 1 0 P 0 8 9 0 2 2 0 P0890230

P0890240

P0890250

P0890260

P0890270

P0890280

P0890290

P0890300

P 0 89 03 1 0

P 0 8 9 0 3 2 0 P0890330

P0890340

P0890350

P0890360

P0890370

P0890380

P0890390

P0890400

P0 8 90 4 1 0 P0890420

P0890430

P0890440

P0890450

POWERS OF

CREATED

106 NBS FORTRAN Test Programs Version 1
891

892

893

894

895

896

897

898

899

7890

WRITE (NUVI. 898) XVD

XVD = DSIN(DSIGN(2.0D0

WRITE (NUVI , 899) XVD

WRITE (NUVI. 7890)

F0RMAt (9H0 X= 'O . 6 ' 3 1

H

X= 1 . 0 , 31H

X= y. O' . 31 H X= 3.0. , 31H

X= (PI ) . 31

H

X= 4.0 , 31H

X= 5.0 31 H -0

X= 6.0 . 31H -0

X=(2PI), 31 H 0

* PIVD. GVD))

F0RMAT(9H0

FORMAT (9H0

F0RMAT(9H0

F0RMAT(9H0

FORMAT( 9H0

FORMAT( 9H0

F0RMAT(9H0

0

+ 0

+ 0

+ 0

0 -0

00000000000000000000000

84147098480789650665250D+00

90929742682 5681 69 5 39602D+00

1411 20008059867222 10074D+00

00000000000000000000000

75680249530792825 137264D+00

9 5 8 9 2 4 2 7 4 6 6 3 1 3 8 4 6 8 8 9 3 1 5 D + 0 0 2 794 1 5 498 1 9 892 5 8 72 8 1 1 5 6D + 00

00000000000000000000000

PAIR IS THE FUNCTI0N/25H

P0890460

P0890470

PO 89048 0 P0890490 /

[)3 i ;Y4 ) PO 890 5 00

/D31.14) P0890510

75 31'. i 4) P0890 5 20

/D31.14) P0890530

/ D31 . 1 4) P0 890 5 40

Q * « *

C * * *

c * * *

c * *

c

= c=

FORMAT( 9H0

F0RMAT(//37H LINE 2 OF EACH

A PRINTED TO /9H14 DIGITS)

» END OF TEST SEGMENT 089

* WHEN EXECUTING ONLY SEGMENT 0

8'9 , THE ' STOP

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

* IN COLUMNS 1 AND 2 REMOVED.

STOP

P0890550

P0890560

P0890570

P 0 8 9 0 5 8 0

AND

C

=

END

STOP

END

/D31 . U)

/ D31 . 1 4)

/ 031.14)

/ 031.14)

CALCULATI0NP0890590

P0890600

P0 8906 1 0 P0890620

P0890630

P08906 40

P0890650

P0890660

P089C1

P0 89 C2

END CARDS

C * «

c * * * c * «

c * * c « *

«

c * * * c « * * c « * * C t * * c « * * c « «

c * « c « *

«

c * * * c » *

«

c * * * c=

c =

***t*ii***t****t*t*tt*ii**iit**t*ii*****iiii*i(tt*ii****iitii******t******t*t P0900010

P090 0 020

P0900030

P0900040

**« ir** *«****«t ««** «***«**«*«**«*«******«*****tt«******««**« P0900050

* * CSI CO ( 090 )

CSIN- AND -CCDSASA REF

8.5.3

TABLE

C « «

C * * c « * * c « « c « * t c=

** GENERAL PURPOSE

«* TO TEST BASIC EXTERNAL FUNCTIONS

«* COMPLEX SINE AND COSINE

«

*

I NJR I NS I C FUNCTION CMPLX ASSUMEp WORK I..NG

* * «* S P E C,,,! F I C A T I O N S SEGMENT 090

* t ** WHEN EXECUTING ONLY SEGMENT 090, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C =

* » IN COLUMNS 1 AND 2 REMOVED.

* « DIMENSION LI I (10)

COMPLEX AVC, eve DIMENSION LI I ( 10)

COMPLEX AVC, BVC

** OUTPUT-TAPE ASSIGNMENT STATEMENT NO INPUT TAPE.

* * «* WHEN EXECUTING ONLY SEGMENT 090, THE FOLLOWING STATEMENT

** NUVI = 6 MUST HAVE THE C: IN COLUMNS 1 AND 2 REMOVED.

NUVI =6

NUVI = 6

P0900060

P0900070

4P0900080

P0900090

P09001 00

P090 0 1 1 0 P 0 0 1 2 0 9 0 P0012095

P001 21 00

P001 21 05

P 0 0 1 2 1 1 0 P001 21 1 5 P 0 0 1 2 1 2 0 P090A1

P 090A2

P0012125

P 0 9 0 0 1 2 0 P00 7 1 8 1 0 P0071 81

5

P0071 820

P 0 0 7 1 8 2 5 P090B1

C * «

900

*« P0071830

WRITE (NUVI, 900) P0900130

F0RMAT(15H1 CSICO - (090)//40H BASIC EXTERNAL FUNCTIONS -CSIN . CP0900140

1C0S- //39H (TRIG. SINE AND COSINE -TYPE C 0 M P L E X ) / / 2 6 H ASA REF 8.P0900150

23.3 (TABLE 4) //10H FUNCTION, 1 0 X , 7 H RE S U L T S //) P0900 1 60

DATA LAZVI,LBZVI, L CZ V I , L D Z V I / 2 H 0 ( ,2H, ,2H1/,1H)/ P0900 1 70

DATA L1I(1),L1I(2),L1I(3).L1I(4),L1I(5)/ P090 0 1 8 0 2H1 , 2H2 , 2H3 , 2H4 , 2H5 /, P0900190

-

' LI I (6) , LI I ( 7) , LI 1 ( 8 ) , LI I (9) , LI I ( 1 0) / P090 02 00

2H6 , 2H7 . 2H8 , 2H9 , 2H10 / P0900210

AVC' = '('l . O'.'l . 0 ) P0900220

905

BVC = CSIN (AVC)

WRITE (NUVI, 901)

BVC = CCOS(AVC)

WRITE (NUVI, 902)

IV! = 0 ivi = ivi + i AVS = IVI

BVC

BVC

P0900230

P0900240

P0900250

P0900260

P0900270

'P090 028 0 P0900290

NBS FORTRAN Test Programs Version 1
BVS = 1 . / AVS P0900300

AVC = CHPLX (AVS,BVS) P0900310

BVC = CSIN(AVC) * 2 + CCbSCAVC) »* 2 P090 032 0 WRITE(NUVI, 904 ) LAZVI, L 1 I ( I V I )

, L BZV I

, L CZV I . L 1 I ( I V I ) . LOZV I , BVC P0900330

904 FORMAK A2.A2, A2 , A2 , A2 , A 1 . 4X . 2 F 1 2 . 7 > P09003 40

IFCIVI - 1 0 ) 905 , 906 ,, 906 P09003 5 0 CONTINUE PO 90 0 36 0 F0RMAT(/13H TABLE VALUE, 4X,22H 1.2984576 0.6349639 /17H CS I N ( 1 PO 9 0 0 3 7

0

'l . . 1 . ) = , F1 0 . 7 , F1 2 . 7) P090038 0 F0RMAT(/13H TABLE VALUE, 4X,22H 0.8337300 -0.9888977 / 1 7H C COS ( 1 P 0 9 0 0 39

0

1.,1.) = ,F10.7,F12.7 ///35H CSIN(X)»«2 + CC0S(X)«*2 = 1.6,0.0 / P0900400

2 40H0 ARGUMENT RESULTS SHOULD BE 1.0.0.0 ) P0900410

C*i*V* END OF TEST SEGMENT 090 P090 0 420

Cttttt WHEN EXECUTING ONLY SEGMENT 090, THE STOP AND END CARDS P0900430

C:*t«»t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P090 0 440

C«**«« IN COLUMNS 1 AND 2 REMOVED. P0900450

C= ' STOP PC 90 0 46 0 C= END P0900470

906

901.

902

STOP

END

P090C1

P090C2

C 1 1

1

C t «

«

c * * * C t * * C t «

c « * * C t «

t

c « «

c « * * c « «

t

C t * t

c

* «

t

c « * * C t * * c « «

»

c » « * c « * * c * *

«

c=

tt*»««««**«t»«t*«t«*«****«*««****««t«t t** ****«**»«*t«t«««*****««P0910010

* * P 0 9 1 0 0 2 0

* * COSNS - 091 P091 0030

P09 1 00 40

**«tt*tt********t******************«t*t**********tt***t**«**t**t*«***P0910050

*

«

t * t

GENERAL PURPOSE

TO TEST BASIC EXTERNAL FUNCTION - COS - TRIGONOMETRIC COSINE - TYPE REAL

SAME AS SEGMENT EXCEPT FOR COSINE

INTRINSIC FUNCTION SNGL ASSUMED WORKING

ARGUMENTS FROM 0 TO 2 PI

t * * *

*

1

1

SPECIFICATIONS SEGMENT 091

WHEN EXECUTING ONLY SEGMENT 091, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

DOUBLE PRECISION AVD, BVD, CVD, DVD, EVO, PIVD

DOUBLE PRECISION AVD, BVD, CVD, DVD, EVD, PIVD

C**»

C « *

«

c » * * C t * * c * «

«

C =

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

C t

«

910

WHEN EXECUTING ONLY SEGMENT 091, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 NUVI = b F0RMAT(15H1 COSNS - (091)//31H BASIC EXTERNAL FUNCTION -COS1//35H (TRIGONOMETRIC COSINE -TYPE REAL)

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H

3 HOLLERITH I N F ORMAT I ON / / 9H RESULTS)

ASA REFP0910060

8. 3. '3 P09 1 00 70

TABLE 4P0910080

P091 0090

P0910100

P091 01 10

P0910120

P091 01 30

P001 2130

P0012135

P001 21 40

P001 2i4

5

P0012150

P00121 5 P091 A1

P0012160

P091 01 40

P0071 840

P0071 845

P 0 0 7 1 8 5 0 P00 7 1 8 5 5 P 0 9 1 B 1 P0071860

P091 01 50

P0910160

P091 01 70

P091 01 80

P0910190

P091 0200

P091 0210

P091 0220

P0910230

P09 1 02 40

P091 0250

P09 1 0260

P 0 9 1 0 2 7 0 P091 0280

P0910290

P091 0300

P09 1 03 1 0 P091 0320

P0910330

P091 0340

C * * * * * WRITE (NUVI, 910)

HEADER FOR SEGMENT 091 WRITTEN

AVD = 3.140625D+0

BVD = 0.9613037109375D-3

C » t

«

C « t

CVD = 0.57220458984375D-5

DVD = 0 . 596046447753906D-6

E Vb = 0 .3 1 7 8 6 5 0 9 5 4 7 0 5 6 D - 7 PI IS SUM OF AVD TO EVD, PARTS ARE EXPRESSED IN SUMS OF POWERS OF

2, to PERMIT A POSSIBLE 20 DECTmAL DIG IT ARGUMENT TO BE CREATED

PIVD = EVD + DVD + CVD * BVD AVD

AVS =1.0

CVS = 2.0

BVS = COS (CVS - 2.6 AVS)

WRITE (NUVI. 911) BVS

BVS = COS (AVS)

WRITE (NUVI. 912) BVS

108 NBS FORTRAN Test Programs Version 1
BVS = COS(CVS)

WRITE (NUVI, 913) BVS

BVS = COS(AVS + CVS)

WRITE (NUVI, 914) BVS

P091 0350

P0 9 1 0 36 0 P091 0370

P091 0320

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

WRITE

COS(SNGL<PIVD)

)

(NUVI, 915) BVS

C0S(2. * CVS)

(NUVI, 916) BVS

C0S(2 . 0 + CVS + AVS)

(NUVI, 917) BVS

COS ( CVS * (AVS + CVS))

(NUVI, 918) BVS

C0S(SNGL( 2 .000 T piW)T

(NUVI, 919) BVS

(NUVI, 7910)

P091

P091

P091

P091

P091

P091

P091

P091

P09 1 P091

P091

911

912

913

914

915

91 6 917

918

919

7910

FORMAT(

FORMAT

(

FORMAT(

FORMAT(

FORMAT(

9H0 X= 0,, 0 , 5,X, ,1,5,H+J,,.,00000 0 00.00 00 /,1„4X,, F10,,,,7 ) P0 91 9H0

9H0

9H0

9H0

X= 1.0

X= 2.0

X= 3.0

X= (PI)

5X. 1 5H + 0 5X, 1 5H-0

5 X , 1 5 H - 0 5X, 1 5H-1

540302305868

416146836547

989992 49660 0 000000000000

F0RMAT(9H0 X= 4.0 , FORMAT( 9H0 X^ 5.0

FORMAT( 9H0 X= 6.0

FORMAT( 9H0 X=(2PI ) F0RMAT(//37H LINE

5X, 1 5H-0 . 653643620864

, 5X, 1 5H+0 . 2836621 85463

960170286650

000000000000

PAIR IS THE

/14X,

/ 1 4X,

/ 1 4X,

/ 1 4X ,

/ 1 4X,

/ 1 4X,

/ 1 4X,

/ 1 4X,

F10

F1 0

F 1 0

F 1 0

7)

7)

7)

7)

, 5X, 1 5H + 0

, 5X, 1 5H+1

2 OF EACH

1 PRINTED TO ,8H7 DIGITS)

C***t* END OF TEST SEGMENT 091

C***«* WHEN EXECUTING ONLY SEGMENT 091, THE STOP

C*»*** WHI CH APPEAR AS COMMENT CARDS MUST HAVE THE

C«  IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

F10.7)

F1 0 . 7)

F 1 0 . 7 ) F1 0 . 7)

FUNCTI0N/25H

AND

C:

P091

P091

P09 1 P09 1 P091

P091

P091

P091

CALCULATIONP091

P091

P091

P091

P0 91 P091

P091

P091

P091

P091

END CARDS

0 3 90

0 4 0 0 0410

0 42 0

0 4 3 0

0 4 4 0

0 4 5 0

0 4 6 0

0 4 7 0 0 4 8 0

0 4 90

0 5 0 0 05 10

0 5 2 0

0 5 3 0

0 5 4 0

0 5 5 0

0 5 6 0

0 5 7 0

0 5 8 0

0 5 9 0 060 0 0610

062 0 063 0

0 6 4 0 06 5 0

0 660

CIC2

^** t**t***t**1l******t1l*tt*tt1l***t1lt*1l***k*t*t**t1lt1l**1l*tttt*t1lttttt*t*1l*PQ<)zoQ^o

C**«** P0920020

t't itV* DP COS

(0 92 ) P 0 9 2 0 0 3 0

C * * * *,* P0920040

C*t*«*****«*****«*««t««****«*******«t********«*«««**«*****************««P0920050

C***** GENERAL PURPOSE ASA REFP0920060

TO TEST BASIC EXTERNAL FUNCTION - DCOS - TRIGONOMETRIC COSINE -TYPE DOUBLE PRECISION

SAME AS SEGMENT 091 EXCEPT D.P.

INTRINSIC FUNCTION DMAXl ASSUMED WORKING

ARGUMENTS FROM 0 TO 2 P

I

C * * * * * c * * * «

c * * * * * c * * * * * c « * * *

»

c * * * * c * * t * * c * * * * * C**'*V« WHEN EXECUTING ONLY SEGMENT 092, THE SPECIFICATION

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

8.3.3

TABLE

SPECIFICATIONS SEGMENT 092

STATEMENTS

IN COLUMNS 1 AND REMOVED

.

PRECISION

PRECISION

AVD , AVD , BVD , BVD , CVD , CVD , DVD,

DVD,

EVD , EVD,FVD , FVD , PUT TAPE ASSIGNMENT STATEMENT

C * * * * * C * * * * C= DOUBLE

DOUBLE

Q * « * * * C««*»« 0 U T

c * « * * * C***«* WHEN EXECUTING

C*'**** NUVI = 6 MUST

C= NUVI = 6 NUVI = 6

C « * * * 9'2 0 FORMAT ( T5 H1 DP COS - (Q92y / / 3 2 H BASIC EXTE R N AL 1//35H (TRIGONOMETRIC COSINE -TYPE D.P.)

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

WRITE (NUVI, 920)

AVD = 3.140625D+0

GVD,

GVD,

XVD

XVD

ONLY

HAVE

SEGMENT 092, THE FOLLOWING STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

P0920070

4P0920080

P0920090

P 092 0 1 0 0 P 0 92 0 1 1 0 P 092 0 1 2 0 P 092 0 1 3 0 POO 1 2 1 70

POO 1 2 1 75

P0012180

P 0 0 1 2 1 8 5 P001 21 90

POO 1 2 1 95

P092A1

POO 1 2 2 0 0 P09201 40

P0071 870

P0071 875

P0071 880

P0071 885

P092B1

P0071 890

P09201 50

P0920 1 60

EACH PAIR I S/23H P0 92 0 1 70

P 0 92 0 1 8 0 P09201 90

P0920200

PIVD,

PIVD,

NO INPUT TAPE

FUNCTION -DCOSNBSFORTRANTestProgramsVersionl 109
c « * * c * *

«

BVD = CVD- = DVD = EVD = PI IS

2, TO

PIVD : FVD = GVD = XVD = WRITE

XVD = WRITE

XVD = WR I TE XVD - WR I TE XVD = WR I TE XVD - WRITE

XVD = WRITE

XVD - WRITE

XVD = WRITE

WRITE

0 . 961 30371 09375D-3 P0920210

0 . 5 72 2 0 4 5 898 43 7 5 D-5 P0920220

0.596046447753906D-6 p 0 9 2 0 2 3

6

0 . 31 786509547056D-7 P0920240

SUM OF AVO TO EVD. PARTS ARE EXPRESSED IN SUMS OF POWERS OF P 092 02 5 0 PERMIT A POSSIBLE 20 DECIMAL DIGIT ARGUMENT TO BE CREATED P0920260

EVD + DVD + CVD + BVD + AVO

1 . ODO

2. ODD

DCOSCGVD - 2. ODO FVD)

(NUVI, 921) XVD

DCOS ( FVD ) (NUVI , 922 ) XVD

DCOS(GVD)

(NUVI , 92 3 ) XVD

DCOS(GVD + FVD)

(NUVI , 92 4 ) XVD

DCOS(PIVD)

(NUVI, 92 5 ) XVD

DC0S(2. GVD)

( NUVI , 926 ) XVD

DC0S(2.0 + FVD + GVD)

(NUVI, 927) XVD

DCOS(GVD * (FVD + GVD))

(NUVI, 92 8 ) XVD

' DC0S(DMAX1 (2 . ODO » PIVD, GVD) ) (NUVI

(NUVI

929) XVD

7992 ) 921

922

923

924

925

926

927

928

929

7992

C * * *

C * * *

c * * *

c * * *

C:: C =

FORMAT ( 9H0

FORMAT(9H0

F0RMAT(9H0

F0RMAT(9H0

FORMAT ( 9H0

FORMAT ( 9H0

FORMAT ( 9H0

FORMAT ( 9H0

FORMAT ( 9H0

FORMAT( / /37H

PRINTED TO

X: 0 . 0 , 31H + 0 X: 1 . 0 , 3 1 H + 0 X = 2 . 0 ,31H -0 X: 3 . 0 , 3 1 H -0 X: (PI) , 3 1 H -0

X = 4 . 0 , 3 1 H -0

X = 5 . 0 , 31 H + 0 X = 6 . 0 , 3 1 H + 0 X= (: 2P I ) , 3 1 H + 0

1 OOOOOOOOOOOOOOOOOOOOOOD+01

5403023058681 3971 740094D+00

4161 468365471 4238699757D+00

9 8 9992 49660 0 4 4 5 4 5 72 7 1 5 7D + 00

1 OOOOOOOOOOOOOOOOOOOOOOD + 01

6 5 3 6 43 62 0 8 636 1 1 9 1 4 63 9 1 7D + 00

2836621 8546322626446664D + 00

960 17028665036602054565D+00

100000000000000000000000+01

PAIR IS THE FUNCTI0N/25H

/ D31 . 1 4)

/ D 3 1 . I 4 )

/

/

/

/

/

/

/

D31

D31

D31

D31

D31

D3 1 D31

U)

14)

1 4 )

1 4 )

1 4 ) 14)

1 4 )

P0920270

P0920280

P0920290

P0920300

P092 03 1 0 P0920320

P092033 0 P0920340

P0920350

P0920360

P0920370

P0920380

P0920390

P0920400

P092 0 4 1 0 P0920420

P0920430

P0920440

P0920450

P0920460

P0920470

P0920480

p 0 9 2 0 4 9 0 P0920500

P0920510

P0920520

P0920530

P0920540

P0920550

P0920560

P0920570

LINE 2 OF EACH

9H 1 4 DIGITS)

END OF SEGMENT 092

WHEN EXECUTING ONLY SEGMENT 092, THE STOP

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

IN COLUMNS 1 AND 2 REMOVED.

AND

C

= END CARDS

CALCULATI0NP0920580

P0920590

P0920600

P092 06 1 0 P0920620

P0920630

P0920640

P 0 9 2 0 6 5 0 P092C1

P092C2

C * * *

c * * c * * *

c « *

c * *

c * * *

c * * *

c * * *

c «

*

c * * *

c * «

c *

c * *

c * * *

c * * *

c * * *

c * * * c=

9 40

STOP

E N D STOP

END

*«*»***«**««*t«********«*««******»*»«**«**«t*«»*«*«***««*«**««***»P0940010

PO 94 0 02 0 TANGH - 094 P0940030

P 094 0 0 40

*»**«»t**«***«**»*«******»«**t*****»«***«****«««*«*««*«««*****«««»P0940050

GENERAL PURPOSE ASA REFP0940060

TO TEST BASIC EXTERNAL FUNCTION - TANK - 8.3.3 P0940070

HYPERBOLIC TANGENT -TYPE REAL P0940080

USED IN SIMPLE ARITHMETIC EXPRESSIONS P0940090

INTRINSIC FUNCTIONS A B S , F L 0 AT , AM I N 0 , AM AX 0 . I N T P09 40 1 0 0 ASSUMED WORKING P0940110

ARGUMENTS FROM 0.0 TO 8.0 P 094 0 1 2 0 P 0940 1 3 0 OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0940140

WHEN EXECUTING ONLY SEGMENT 094, THE FOLLOWING STATEMENT P0071900

NUVI - 6 MUST HAVE THE IN COLUMNS 1 AND 2 REMOVED. P0071905

P0071910

NUVI = 6 P 0 0 7 1 9 1 5 NUVI - 6 P094B1

FORMAT( 1 5H1 TANGH - ( 094 ) / / 3'2H B AS IC EXTERNAL FUNCTION -f ANH- P0 9 4 0 1 5 0 //33H (HYPERBOLIC TANGENT -TYPE REAL) P0940160

NBS FORTRAN Test Programs Version 1
2//27H ASA REF.- 8.3.3 (TABLE ^)//Zi*H

3 HOLLERITH I N F ORMAT I 0 N / / 9H RESULTS)

"write (NUVI, 940)

HEADER FOR SEGMENT 094 WRITTEN

LINE 1 OF EACH PAIR IS/23H P09401 70

P09401 80

P 0 9 4 0 1 9 0 P0940200

AVS = 2 . 0 P09 4 02 1 0 CVS = -0 . 5 P0940220

IVI = 6 P0940230

BVS = TANH(FLOAT( IVI ) - 3.0 * AVS) P0940240

WRITE (NUVI, 941) BVS P0940250

BVS = TANH(AVS) P0940260

WRITE (NUVI, 942) BVS P0940270

BVS = TANH(AVS + ABS(CVS)) P0940280

WRITE (NUVI, 943) BVS P0940290

BVS = TANH( AMI N0( IVI , 8 ) - AVS) P0940300

WRITE (NUVI, 944) BVS P 0 9 4 0 3 1 0 BVS = TANH(AMAXO( IVI , INT(AVS) )

)

P0940320

WRITE (NUVI, 945) BVS P0940330

BVS = TANH(AVS ** 4 / AVS) P0940340

WRITE (NUVI, 946) BVS P0940350

WRITE (NUVI, 947) P0940360

941 F0RMAT(7H0 X= 0 .0,5X, 12H0 .0000000000 /F21 ,.7) P0940370

942 F0RMAT(7H0 X= 2 .0,5X, 12H0 .9640275801 /F21 ,.7) P0940380

943 F0RMAT(7H0 X= 2 .5,5X, 12H0 .9866142982 /F21 ,.7) P0940390

944 FORMAT(7H0 X= 4 .0,5X,12H0 . 9993292997 /F21 ,.7) P0940400

945 F0RMAT(7H0 X= 6 .0, 5X, 12H0 . 9999 8 7 7 1 1 7 /F21 ,.7) P 0 9 4 0 4 1 0 946 FORMAT(7H0 X= 8 .0, 5X, 12H0 .9999997749 / F21 ,.7) P0940420

947 FORMAT( / /37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H CALCULATI0NP0940430

1 PRINTED TO . 8H7 DIGITS ) P0940440

P0940450

P0940460

P 0 9 4 0 4 7 0 P0940480

P0940490

P0940500

P094C1

P094C2

G*«»«« END OF TEST SEGMENT 094

C*«t«« WHEN EXECUTING ONLY SEGMENT 094, THE STOP AND END CARDS

Z'tTt'*'* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C

= C*«*** IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END ; ; C*t*******t********tirtt*******itt «** **ir*«*)t*t*t*******tlt*t***<rlt4:*****P0950010

C***** P0950020

t'*"*'*'*'* so ROT - ( 095 ) P0 9 5 0 0 3 0 C« * * » « P 0 9 5 0 0 4 0 C««****«*****»*t*t««»*««*«t«****«*«********tt«*««««**t«*******««*««««««»P0950050

C**«** GENERAL PURPOSE ASA REFP0950060

Ct*««* TO TEST BASI C EXTERNAL FUNCTION - SORT - 8.3.3 P0950070

Ztttt* (SQUARE ROOT - TYPE REAL) TABLE 4P0950080

C**«** USED IN SIMPLE ARITHMETIC EXPRESSIONS P 0 9 5 0 0 90

C*tt** INTRINSIC FUNCTIONS F L 0 AT , I NT , AM I N 0 , MAXO P 0 9 5 0 1 0 0 t***tt " ASSUMED WORKING P0950110

C***«« ARGUMENTS ARE ALL PRIME NUMBERS P0950120

C***** P0950130

C.«***t p y T P y T T A P E ASSIGNMENT STATEMENT. NO INPUT TAPE. P09 5 0 1 40

C **'«*"* P0071920

C**««t WHEN EXECUTING ONLY SEGMENT 095, THE FOLLOWING STATEMENT P0071925

C**»*» NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071930

C= NUVI = 6 P0071935

NUVI = 6 P095B1

C***** P0071940

9 5 0 p Qj^i^-^'^iY'^'i^-^ SO ROT - (Q 9 5 y-/ /32 H g aS IC EXTERNAL F U N C 1 1 0 N .sqrf. P 0 9 5 0 1 5 0 1//26H (SQUARE ROOT -TYPE REAL) P0950160

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0950170

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P09 5 0 1 8 0 WRITE (NUVI, 950) P0950190

C*»»*» HEADER FOR SEGMENT 095 WRITTEN P0950200

AVS = 2.0 P 09 5 0 2 1 0 IVI = 3 P0950220

CVS = 17.0 P0950230

BVS = SGRT(FLOAT(( IVI + INT(AVS)) / 2)) P0950240

WRITE (NUVI. 951) BVS P0950250

BVS = SQRT(AMIN0(MAX0( IVI .2). INT(CVS))) P09 5 0260

NBS FORTRAN Test Programs Version 1
WRITE (NUVI, 952) BVS P0950270

BVS = SQRT(CVS) _ P09502S0

WRITE (NUVI, 953 ) BVS ~'P0950290

BVS = SQRT(2.0 * CVS - FLOAT(IVI)) P0950300

WRITE (NUVI, 954 ) BVS P09503T0

BVS = SORT( FLOAT( I VI + 1) + 5.0 * CVS) P0950320

WRITE (NUVI, 9 5 5 ) BVS P0950330

WRITE (NUVI, 956) P0950340

951 FORMAT ( 8H0 X= 2 . 0 , 4>( , 1 6H 1 . 4 1 42 1 3 562373 1 0 / fjTT) P69 5 03 50

952 FORMAT ( 8H0 X= 3 . 0 , 4X , 1 6 H 1 . 7 3 2 0 5 0 8 0 7 5 6 8 8 8 / F21.7) P09 5 0360

9 5 3 FORMAT "( 8H0 X = 1 7 . 0 , 4X , 1 6 H 4 . 1 2 3 1 0 5 6 2 5 6 1 7 6 6 / F21.7) Pb9 5 03 70

9 5 4 FORMAT ( 8H0 X = 3 1 . 0 , 4X , 1 6 H 5 . 5 6 7 7 6 4 3 6 2 8 3 0 0 2 / F21.7) P09 5 03 80

9 5 5 FORMAT ( 8H0 X = 8 9 . 0 , 4 X , 1 6 H 9 . 4 3 3 9 8 1 1 3 2 0 5 6 6 0 / F21.7) P095 0390

956 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H CAL CU L AT I 0 N P 0 9 5 0 4 0

0

1 PRINTED TO , 8H7 DIGITS ) P095 0 4 1 0 Ztttt* END OF TEST SEGMENT 095 P0950420

C««*«* WHEN EXECUTING ONLY SEGMENT 095, THE STOP AND END CARDS P0950430

C««tt» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0950440

C**«*« IN COLUMNS 1 AND 2 REMOVED. P095 0 4 5 0 C= STOP P0950460

C'= END P095 0 4 70

STOP P095C1

END P095 C2

Q***«**t***t*tt*t<t««rt**t*«*(*«t«ttt«t«***t*«t*t***t**tt***t**trl*tr«ttt«tP0960010

C****« P0960020

C*««t« DSQRO - (096) P0960030

C***** PO 9 600 40

C«*«««**t»»i«««»t«»«»t«t«««««»««t»«*t*«»»«««*«*«t«t****»«t«*»«««t«ttt*»tP0960050

C*«**« GENERAL PURPOSE ASA RE FPO 960 0 60

C***** TO TEST BASIC EXTERNAL FUNCTION - DSORT - 8.3.3 P0960070

C»«*** (SQUARE ROOT - TYPE D.P.) TABLE 4P09600 80

C»*««* USED IN SIMPLE EXPRESSIONS P0960090

C***** INTRINSIC FUNCTIONS D B L E , I A B S , F L 0 AT ASSUMED WORKING P0960 1 0 0 C*«**« ARGUMENTS ARE ALL PRIME NUMBERS P0960110

C * * * * P 0 9 6 0 1 2 0 C»*««* SPECIFICATIONS SEGMENT 096 P0960130

C***** P0012210

C«t*«» WHEN EXECUTING ONLY SEGMENT 096, THE SPECIFICATION STATEMENTS P0012215

C**«** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0012220

C«»»*« IN COLUMNS 1 AND 2 REMOVED. P0012225

C****« P00 1 2230

C= DOUBLE PRECISION BVD P0012235

DOUBLE PRECISION BVD P096A1

C»»««» P0012240

C«.«t. OUTPUT TAP E ASSIGNMENT STATEMENT. NO INPUT fApT, P0960 1 40

C»«»** P0071950

C««*«. WHEN EXECUTING ONLY SEGMENT 096, THE FOLLOWING STATEMENT P0 0 7 1 9 5 5 C*»«*« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071960

C= NUVI = 6 P0071 965

NUVI = 6 P096B1

C»»«»« P0071970

960 F0RMAT(15H1 DSQRO - (096)//33H BASIC EXTERNAL FUNCTION -DSQRT- P0960150

1//26H (SQUARE ROOT -TYPE D.P.) P0960166

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0960170

3 HOLLERITH I N F 0 R M ATIO N / / 9 H RESULTS) P0960 1 80

WRITE (NUVI, 960) P0960190

Ctt.t* HEADER FOR SEGMENT 096 WRITTEN P0960200

AVS : 3.0 P0960210

IVI : -2 P0960226

CVS = 17.0 P0960230

BVD = DSQRT(DBLE ( FLOAT( I ABS( IVI ) ) + AVS - f^Q)) P096024d

WRITE (NUVI, 961) BVD P0960250

BVD = DSQRT(0.0D0 •^ AVS) P0960266

WRITE (NUVI, 962) BVD P0960270

BVD = OSQRT(CVS - AVS + 3.0D0) P0960286

WRITE (NUVI, 963) BVD P0960290

BVD = DSQRT(2.0D0 * CVS - DBLE(AVS)) P0960306

WRITE (NUVI, 964) BVD P0960310

112 NBS FORTRAN Test Programs Version 1
8V0 = OSQRT(DBLE(FLOAT(-IVI )+ AVS) CVS + FLOATdVI ** 2))

WRITE (NUVI, 965) BVD

WRITE (NUVI. 966)

961 FORMAT ( 8H0 X= 2 . 0 , 5X , 2 5 H 1 . 4 142 1 3 5623 73 09 5 0 4 8 8D+ 0 0 / 8X

,

962 FORMAT ( 8 H 0 "X= 3 . 6 , 5 X . 2 5 H 1 . 7 3 2 0 5 0 8 0 7 5 6 8 8 7 7 2 9 3 5 D + 0 0 / 8 X

.

963 FORMAT ( 8H0 X= 1 7 . 0 , 5X , 2 5 H4 . 1 2 3 1 0 5 62 5 6 1 766 0 5 49 8 D + 0 0 / 8X

,

964 FORMAT ( 8 HO X = 3 T. 0 , 5 X , 2 5 H 5 . 5 6 7 7 6 4 3 6 2 8 3 0 0 2 1 9 2 2 1 D + 0 0 / 8 X , 965 FORMAT ( 8H0 X= 8 9 . 0 , 5 X , 2 5 H9 . 43 3 98 1 1 3 2 0 5 6 6 0 3 8 1 1 3 0 + 0 0 / 8 X

,

966 F0RMAt(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H

A PRINTED TO ,9H14 DIGITS)

CT'*tT* END OF TEST SEGMENT 096

C***** WHEN EXECUTING ONLY SEGMENT 096, THE STOP AND END

CT*'*T* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = C**«** IN COLUMNS 1 AND 2 REMOVED.

P0960320

P0960330

P0960340

1PD24.13) P0960350

1PD24.13) P0960360

1PD24.13) P0960370

1PD2 4.13) P09603 80

1PD24.13) P0960390

CALCULATIONP0960400

P 0 960 4 1 0

CARDS

C =

C = STOP

END

STOP

END

P0960420

P0960430

P0960440

P0960450

P0960460

P0960470

P096C1

P0 96C2

C***tt«*«***«*t****«t***t t** **********«*********t***t*****t***»*****P0970010

C***t* P0970020

C * *'«*

* C S 0 R 0 - ( 09 7 ) P 0 9 7 0 0 3 0 Z***** P0970040

C*******t***********t«*****t*«««***t***«**t******«*****************«***«P0970C50

C***** GENERAL PURPOSE ASA REFP0970060

C

i'« «* * P0970070

C***** TO TEST BASIC EXTERNAL FUNCTION -CSORT- 8.3.3 P0970080

CT*"*T, (SQUARE ROOT OF A COMPLEX NUMBER ) TABLE 4P09 7 0 090

C«*«** ARGUMENTS ARE EPICdl) TO EP1C(20) P 09 70 1 0 0 C**T** EXPECTED RESULTS ARE EP1C(1) TO EPICdO) P 09 70 n0

C«t*** SPECIFICATIONS SEGMENT 097 P0970120

C * * * *

«

C****« WHEN EXECUTING ONLY SEGMENT 097 THE SPECIFICATION STATEMENTS

C*iT** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = C* * * * * I N COLUMNS 1 AND 2 REMOVED

t* * * t * C= COMPLEX EP1C(30), AVC, BVC

COMPLEX EP1C(30), AVC, BVC

OUTPUT TAPE ASSIGNMENT STATEMENT

P0012250

P0 0 1 22 5 5 P0 0 1 2 26 0 P0012265

P0 0 1 22 70

P001 2275

P097A1

P0012280

P0970130

P0071 980

P0071 985

P0071 990

C= NUVI = 6 POO 7 1995

NUVI = 6 P097B1

C

*'*"*'*

* P0072000

WRITE (NUVI. 970) P0970140

FORMAT( 1 5H1 CSQRO - ( 097 ) / / 33H BASI C EXTERNAL FUNCTION -CSOFtf- P 09 7 0 1 5 0 1//29H (SQUARE ROOT -TYPE CO MP L E X ) / / 2 7H ASA REF.- 8.3.3 (TABLE 4)P 09 70 1 60

2//24H LINE 1 OF EACH PAIR IS / 2 0 H T H E E X P E CT E D VA L U E //9H R E S U L P 0 9 7 0 1 7 0 3T ) P0970180

C * * * * c « « « * * c « * * * * c * * « »

«

c * « * «

WHEN EXECUTING

NUVI = 6 MUST

ONLY

HAVE

SEGMENT

THE C = 097. THE FOLLOWINGIN COLUMNS 1 AND 2

NO INPUT TAPE

STATEMENT

REMOVED .

970

C * * * «

INITIALI2E EPIC (EXACT VALUES)

EP1 C( 1 ) = EP1C(2) = EP1 C(3) = EP1C(4) = EP1C(5) =

E P 1 C ( 6 ) = EP1 C(7) : EP1 C(8) - EP1C(9) - EP1 C( 10)

EPICdl)

EPI C( 12)

EP1Cd3)

EPI Cd 4) EPI Cd 5 ) E P 1 C (1 6 ) EPI Cd 7)

(0.9950042.

(0.9800666.

(0.9553365.

(0.9210610.

(0.8775826.

(0 . 8253356,

( 0 . 7648422 , (0.6967067,

( 0 . 5 403023 , = (0.416146 8

= (0.9800666

= (0.9210610

= (0.8253356

= (0.6967067

= (0.5403023

= (0.3623577

= (0.1699671

. 0998334)

.19 8 6 6 9 3)

.2955202)

.3894183)

. 4 7942 5 5 )

. 564642 5 ) .64421 77)

.7 1 73 5 6 1 ) .8414710)

- 0 .90929 74 ) 0 . 1986693)

3 8 9 418 3)

5 6 4642 5 ) 717 3 5 61)

8414710)

93 2 0 39 1 ) 9854497)

P09701 90

P0970200

P 0 9 70 2 1 0 P0970220

P0970230

P0970240

P0970250

P0970260

P0970270

P0970280

P0970290

P0970300

P0 9 70 3 1 0 P0970320

P0970330

P0970340

P 0 9 7 0 3 5 0 P0970360

NBS FORTRAN Test Programs Version 1 113
EP1C(18) = (-0.0291995,0.9995736) P0970370

EP1C(19) = (-0.416U68. 0.9092974 ) P0970380

EP1C( 2 0 ) = (- 0.65 36436.- 0.7 5 6802 5 ) P09 7039() IVI = 0 P0970400

971 jVI = 1 P09 7 0 41 0 972 IVI = IVI + 1 P0970420

JVI = JVI + 1 P0970430

AVC = CSQRKEPI C( IVI * 10) * (10. t« ((2 * JVI) - 8))) P0970440

BVC = EP1 C( I VI ) * 1 6 . * « ( JVI - 4) P097045 0 WRITE (NUVI, 973) BVC, AVC P0970460

973 FORMAK 2H0 2 E 1 4 . 7 / 2 X , 2 E 1 4 . 7 ) P0970470

IF (JVI - 6) 972, 974, 974 P0970480

974 IF (IVI - 10) 971. 975, 975 P09 7 0 49()

975 WRITE (NUVI, 976) P0970500

976 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUN CT I ON / 1 3H CAL CULAT TONpog

1) P0970520

C***** END OF TEST SEGMENT 09 7 P09 70 5 3

0' C**t*t WHEN EXECUTING ONLY SEGMENT 097 THE STOP AND END CARDS P0970540

C*«*«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P09 70 5 5 0 C**»*. IN COLUMNS 1 AND 2 REMOVED. P0970560

C= STOP P0970 5 70' C= END P0970580 • STOP P0 97 C1 END P0 97 C2

Ct*t**tt******t*t**ft«t*«**tti***t**t**t*t****t*«*«t*t***t>***«*t****t**tP0980010

C***** P0980020

C* * * * * ARCTG - ( 0 9 8 ) P098 0 030

C**V** P0 98 0 0 4() []**«***»*tt*t*«*tttttt<t*ttitttt<tt*t***«!t*****««*************tt***tt**tP0980050

C*»«** GENERAL PURPOSE ASA REFP0980060

C»t**» TO TEST BASIC EXTERNAL FUNCTION - ATAN - 8.3.3 P0 98 0 0 70' C***** (TRIGONOMETRIC ARCTANGENT, SINGLE ARGUMENT -TYPE READTABLE 4P098 0 080

C***** USED IN SIMPLE ARITHMETIC EXPRESSIONS P0980090

C***** INTRINSIC FUNCTION AB S , F L 0 AT , AM AX 1 , I N T P0980 1 00

C » ASSUMED WORKING P098 0 1 1 0 C** *«« ARGUMENTS ARE POWERS (OR SUMS) OF 2 P0980120

C***** P0980 1 3 0 C*.**« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0980140

C* « * * « POO 720 1 0 C*«*** WHEN EXECUTING ONLY SEGMENT 098, THE FOLLOWING STATEMENT P0072015

C«***« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072020

C= NUVI = 6 P0072025

NUVI = 6 P098B1

C**«** P0072030

WRITE (NUVI, 980) P0980150

980 F0RMAT(15H1 ARCTG - (098)//32H BASIC EXTERNAL FUNCTION -ATAN- P0980160

1//25H (ARCTANGENT -TYPE REAL) P0980170

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0980180

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P0980 1 90

C*«««* HEADER FOR SEGMENT 098 WRITTEN P0980200

AVS = .125 P0980210

CVS = -.25 P0980220

IVI=2 P 0 980230

BVS = ATAN(AMAX1 (AVS, CVS) ) P098 02 40

WRITE (NUVI. 981) BVS P098 02 5 6 BVS = ATAN(AVS 2.0) P0980260

WRITE(NUVI, 9 82 ) BVS

' P098 02 70' BVS = ATAN (ABS(CVS) + AVS) P0980280

WRltE(NUVI, 983) BVS P0980290

BVS = ATAN(-CVS * AMAXO(IVI, INT(AVS))) P0980300

WRITE(NUVI, 9 8 4 ) BVS P098 03 1 0 BVS = ATAN (FLOAT(IVI) * CVS - (2.0 * AVS)) P0980320

WRITE (NUVI, 98 5 ) BVS P098 0 33 0 BVS = ATAN (1.0) P0980340

W RITE ( N U VT , 9 86 ) BVS P 0 9 8 0 3 5 0 WRITE (NUVI, 987) P0980360

981 FORMAT( 1 OHO X= 0 . 1 2 5 , 5X , 1

5

h

' 0 .1 2 4 3 5 499 4 5 4 7 . /TOX P098 03 70

982 FORMATdOHO X= 0 . 2 5 0 , 5X, 1 5 H 0 . 2 4 4 9 7 8 663 1 2 7 , / 1 OX , F 1 5 . 7 ) P098 0 3 80

NBS FORTRAN Test Programs Version 1
983 FORMATCIOHO X= 0.3 75 . 5X. 1 5H 0 . 3 5 8 7 70 6 7 02 7 1 , / 1 OX , F 1 5 . 7

)

984 FORMATdOHO X= 0.5 00 ,5X,15H 0 . 4 6 3 6 4 7 6 0 9 0 0 1 , / 1 0 X , F 1 5 . 7 ) 98 5 FORMAK 1 OHO X = -0 . 75 0 , 5 X , 1 5 H - 0 . 6 4 3 5 0 1 1 0 8 7 9 3 , / 1 0 X , F 1 5 . 7 ) 986 FORMATdOHO X= 1.000,5X, 1 5H 0 . 7 8 5 3 9 8 1 6 3 3 9 7 , / 1 0 X , F 1 5 . 7 ) 987 F0RMAT(//37H

1 PRINTED TO , LINE 2 OF8H7 DIGITS

EACH

) PAIR IS THE FUNCTI0N/25H

C****« END OF TEST SEGMENT 098

C***** WHEN EXECUTING ONLY SEGMENT 098, THE STOP AND END

C*'*"*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = C « IN COLUMNS 1 AND 2 REMOVED.

CARDS

C = c= STOP

END

STOP

END

P0980390

P0980400

P0980410

P0980420

CALCULATIONP0980430

P0980440

P0980450

P09&0460

P0980470

P0980480

P0980490

P0980500

P098C1

P098C2

C** *****it*t***********«****1lt*««:**t******ilr*lltilr*t1lr*«*«*««;*<rili«r1l[4r«t*«:ili**t**««P0990010

C***** P0990020

c * * * * * c * « * * * DACTG ( 099 ) P0990030

P 0 990 0 4 0 Clt******«tt**<t lt** t«:*****«ii***«*t*ilr*ili*«;«*i***« ili** «r*<r«ll;**«;**)ii**t«yrP0990050

C***«* GENERAL PURPOSE

C * * * * * c * * * * * c * * * * * C * * t «

c * * * * c * * » * *

TO TEST BASIC EXTERNAL FUNCTION - OATAN - (TRIGONOMETRIC ARCTANGENT , S I NGLE ARGUMENT -TYPE D.P.)

USED IN SIMPLE ARITHMETIC EXPRESSIONS

INTRINSIC FUNCTIONS DS I G N , F L 0 AT , D B L E ASSUMED WORKING

ARGUMENTS ARE POWERS (OR SUMS) OF 2

8.3.3

TABLE

C * * * C « *

«

* * SPECIFICATIONS SEGMENT 099

C * * * C * * * c * * * c * * * c=

* *

* t

WHEN EXECUTING ONLY SEGMENT 099, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

DOUBLE PRECISION AVD, BVD, CVD

DOUBLE PRECISION AVD. BVD, CVD

C * t

«

C * «

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE.

C * * * C * «

«

c « * * C =

C * t

«

c * « *

990

WHEN EXECUTING ONLY SEGMENT 099, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE thlE (:= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 "NUVI =

6

HEADER FOR SEGMENT 099 WRITTEN

WRITE(NUVI, 990)

FORMAT( 1 5Hi DACtG - ( 099 ) / /33H BASI C EXTERNAL FUNCTION -DATAN-

//25H (ARCTANGENT -TYPE D.P.)

://27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR rS/23H

1 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

AVD = - . 125D0

CVD = .25D0

IVI = 2 BVD = DATAN(DSIGN(AVD, CVD) ) WRITE (NUVI, 991) BVD

BVD = DATAN(2.0 « (-AVO))

991

992

993

994

WRITE(NUVI. 992) BVD

BVD = DATAN(CVD - AVD)

WRitE(NUVI , 993) BVD

BVD = DATAN(DBLE(FLOAT( IVI ) / 4.0))

WRITE (NUVI, 994) BVD

BVD = DATAN (DSIGNd.ODO - CVD, AVD))

wRitE(NUVI, 995) BVD

BVD = DATAN(DBLE(FLOAT( IVI ** 2))

"write (NUVI . 996) BVD

WRITE (NUVI, 997)

FORMATdOHO X = 6. |2 5 , 5 ><; i 9 h 0 71 2 4 3 5 4 9 9 4 5 4 7 D + 0 0 / ! 0 X , D 2 4 .12 ) FORMATdOHO X= 0 . 250 , 5X, 1 9H 0 . 2 4 4 9 7 8 6 6 3 1 2 7D + 0 0 /10X,D24.12)

FORMATdOHO X= 0.3 75,5X, 1 9H 0 . 3 5 8 7 70 6 7 0 2 7 1 D + 0 0 7 1 OX , D 2 4 . 1 2 ) FORMATdOHO X= 0 . 5 00 , 5X, 1 9H 0 . 46364760900 1 D + 00 /10X,D24.12)

CVD)

ASA REFP0990060

PC 990 0 70

4P0990080

P0990090

P0 99 0 1 0 0

P 0 9 9 0 1 1 0 P0 99 0 1 2 0

P 0 99 0 1 3 0 POO 1 2 290

P0012295

P0 0 1 2 3 0 0 POOl 23 0 5 P0012310

P0 0 1 23 1 5 P099A1

POOl 23 2 0 P09901 40

P0072040

P0072045

P 0 0 7 2 0 5 0 P0072055

P099B1

P0072060

P 0990 1 5 0 P0990 1 60

P0990 1 70

P0990 1 8 0 P 0 9 9 0 1 9 0 P0990200

P 0 9 9 0 2 1 0 P0990220

P0990230

P0990240

P 0 9 9 0 2 5 0 P0990260

P0990270

P0990280

P0990290

P0990300

P 0 9 9 0 3 1 0 P0990320

P0990330

P0990340

P0990350

P0990360

P0990370

P0990380

P0990390

P0990400

NBS FORTRAN Test Programs Version 1
995 FORMATdOHO X = - 0 . 75 0 , 5X , 1 9H- 0 . 643 5 0 1 1 0 8 793D + 0 0 /10X.D24.12) P099041 0 996 FORMATdOHO X= 1 . 000 , 5X, 1 9H 0 . 7 8 5 3 9 8 1 6 3 3 9 70 + 0 0 / 1 0X,D24.12) P0990420

997 F0RMAT(//37H LINE 2 OF EACH PAIR IS TH E F U N CT I 0 N / 2 5 H CAL CULAfrONP0 9m

1 PRINTED TO ,9H12 DIGITS ) P0990440

C*«*** END OF TEST SEGMENT 099 PO99O45O

C***** WHEN EXECUTING ONLY SEGMENT 099, THE STOP AND END CARDS P0990460

C * * * * * WHICH APPEAR AS COMMENT CARDS MUST HA V E THE C = P 0 9 9 0 4 7 0 C***** IN COLUMNS 1 AND 2 REMOVED. P0990480

C= STOP p 0 99 0 490

C= END P0990500

STOP P699C1

END P0.99,C2

Z t * t t t i t i t t * * t t t t * i t * t t t * t t t * * t t t * t t t * t t t * t t * t t t t t t t t * * * * t t * * * t t t t t t t * t t p Yq Q Q Q \ Q C***** P1000020

C***** ACtG2 - (idO) " P 1 000030

C« * * * * PI 000040

C*t**«t******tt**t**tt***«***t «** **t*«****tt******««**«t«**»«*****««pi()0005b

C*t*** GENERAL PURPOSE ASA REFP1000060

C***** TO TEST BASIC EXTERNAL FUNCTION - AT AN 2 - ^ ^y^-^ p 1 0 000 70

C***** (TRIGONOMETRIC ARCTANGENT, TWO ARGUMENTS -TYPE REAL) TABLE 4P1000080

C»**«* USED IN SIMPLE ARITHMETIC EXPRESSIONS PTooboVO

C**.** INTRINSIC FUNCTIONS AM I N 1

, F LOAT . AMAXO ASSUMED WORKING P1 000 1 00

C*«*«* ARGUMENTS ARE POWERS (OR SUMS) OF 2 pToOOlTO

C***** P1000120

C«***« output TAPE ASSIGNMENT STATEMENtS. NO INPUt TAPET P 1 0 00 1 3b

C***** P0072070

C***** WHEN EXECUTING ONLY SEGMENT 100, THE FOLLOWING STATEMENT P0072075

C***«t NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072080

C='NUVI=6 POO 720 8 5 NUVI = 6 , , P100B1

C * * * * * ' POO 72 090

WRITE(NUVI, 1000) P1000140

1 000 F0RMAT(15H1 ACTG2 - ( 1 00 )//33H BASIC EXTERNAL FUNCTION -AtAN'2- PlbOOTsb

1//37H (ARCTANGENT, 2 ARGUMENT -TYPE REAL) P1000160

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/T3H P1000176

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P 1 000 1 80

AVS = .125 PI 000 1 90

CVS = -.25 P1000200

ivi =2 PI 0002 Tb

BVS = ATAN2(ABS(AMIN1 (AVS, CVS) ) , FLOAT( IVI ) ) P1000220

WRITE (NUVI, 1001) BVS pTob023b

BVS = ATAN2(CVS ** 2, AVS * 2.0) P1000240

WRitE (NUVI, 1 002 ) BVS P10b02 5 b BVS = ATAN2 (AVS - CVS, -(4.0 * CVS)) P1000260

WRITE (NUVI, 1 003 ) BVS P1 00027b

BVS = ATAN2 ( -CVS/AVS , AMAXO ( I V I , 4 ) ) P1 00 0280

WRITE (NUVI, 1 00 4 ) BVS PT00029b

BVS = ATAN2(-. 09375, AVS) P1000300

WRITE (NUVI, 1 00 5 ) BVS PIOOOSTO

BVS = ATAN2(FL0AT( IVI ) , 2.0) P1000320

WRITE (NUVI, 1 006 ) BVS PI 000330

WRITE (NUVI, 1007) P1000340

1001 FORMATdOHO X= 0.125.5X,15H 0 . 1 2 43 5 4994 5 47 , / 1 OX , F 1 5 . 7 ) Plb003 5b

1 002 FORMATdOHO X= 0.2 50 , 5X, 1 5H 0 . 24 4978663 1 2 7 , / 1 OX , F 1 5 . 7 ) P1 000360

1003 FORMATdOHO X= 0.375,5X,15H 0.358 7 706702 7 1 , / 1 0 X , F 1 5 . 7 j PI 0 0 0 3 7 0

1 004 FORMATdOHO X= 0 . 500,5X, 1 5H 0 . 46364760900 1 ./ 1 OX , F 1 5 . 7 ) P1 000380

1 00 5 FORMAT (1 OHO X = - 0 . 7 5 0 , 5 X , 1 5 H-0 . 64350 1 1 0 8 793 , / 1 OX , Fi5 . 7 ) P 1 0 0 0 390

1 006 FORMATdOHO X: 1 . 00 0 , 5X, 1 5 H 0 . 7 8 5 3 9 8 1 6 3 3 9 7 , / 1 OX , F 1 5 . 7 ) P1 000400

1007 F0RMAT(//37H LINE 2 OF EACH PAIR I S THE FUN CT I ON /25H CALCULAtH^^^^

1 PRINTED TO .8H7 DIGITS ) P1000420

Ct*«*t END OF TEST SEGMENT 100 P1 00043b

C**t** WHEN EXECUTING ONLY SEGMENT 100, THE STOP AND END CARDS P1000440

C**««* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1 000450

Ct*«t* IN COLUMNS 1 AND 2 REMOVED. P1000460

STOP PI 000470

C= END P1000480

STOP piooci

END P100C2

16 NBS FORTRAN Test Programs Version 1
C***«««*««****«**« «** *«***««***«*«**t**t**«**t***tt**«t*»**t**» «P1010010

C** *** P1010020

C ***»'* D ATN 2

" - ( 1 0 1) P 1 0 1 0 0 3 0 C * * * * * P 1 0 1 0 0 4 0 C********4r**********t*4nt«t*t**************«i*r«r****ilr***********«*****t*<t<r**P1010050

C**««* GENERAL PURPOSE ASA REFP1010060

TO TEST BASIC EXTERNAL FUNCTION - DAtAN2 - 8.3.3

(TRIGONOMETRIC ARCTANGENT, TWO ARGUMENT -TYPE D.P.) TABLE

USED IN SIMPLE ARITHMETIC EXPRESSIONS

INTRINSIC FUNCTIONS D M I N 1 , D M AX 1 , D S I G N , D B L E , F L 0 AT

ASSUMED WORKING

ARGUMENTS ARE POWERS (OR SUMS) OF 2

C t * * «

c « * * *

«

c * * « * * c * « * * * c * * « * t

c * * * * * C t * * «

t

c

« * « * * c * « * «

c * * * «

c * * « «

c * * * «

c « * * «

c=

SPECIFICATIONS SEGMENT 101

WHEN EXECUTING ONLY SEGMENT 101, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

DOUBLE

DOUBLE

PRECISION

PRECISION

AVD

AVD

BVD

BVD

CVD

CVD

C * « * * *

c « * * * * c * * *

«

c * * * * *

c * * * * * c=

OUTPUT-TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING

NUVI = 6 MUST

ONLY SEGMENT 101, THE FOLLOWING STATEMENT

HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

1010

NUVI = 6 NUVI = 6

C * * * * * WRITE (NUVI, 1010)

F0RMAT(15H1 DATN2 - (101)//36H BASIC EXTERNAL

1//37H (ARCTANGENT, 2 ARGUMENT -TYPE D.P.)

2//27H ASA REF.- 8.3.3 (TABLE 4)//24H LINE 1 OF

3 HOLLERITH I N F ORM AT I 0 N / / 9 H RESULTS)

AVD = .125

CVD = -.25

FUNCTION -DATAN2'

EACH PAIR IS/23H

IVI = BVD = WRITE

BVD = WRITE

BVD = WRITE

BVD = WRITE

BVD = WRITE

DATAN2

(

(NUVI

,

DATAN2

(

(NUVI , DATAN2

( NUVI ,

(-CVD)

)

DMIN1 ( AVD, -CVD)

,

1011 ) BVD

AVD, FLOAT( IVI)

1012) BVD

(DSIGN(2.0D0 * CVD

1013) BVD

DATAN2(DMIN1(AVD,.0625D0),DMAX1(AVD

( NUVI , 1 01 4) BVD

DATAN2(DABS( CVD) * DSIGN(AVD, CVD)

(NUVI , 1015) BVD

(DBLE(FLOAT( IVI )

)

1016) BVD

2 . ODO/ .DBLE ( FLOAT( IVI ) ) )

+ AVD, AVD) , DMAX1 (AVD, CVD

CVD ) )

* 6. DO 25D0)

AVD * FLOATdVI «*4))

1017)

1011

1012

1013

1014

1015

1016

1017

x = 0 .. 1 25 , 5X, 1 9H

x= 0 ,. 2 5 0 , 5X, 1 9H

x = 0 ,, 3 7 5 , 5X, 1 9H

x = 0 ,, 500 , 5X, 1 9H

x = -0 ,750,5X,19Hx = 1 ..00 0, 5X, 1 9H

LINE 2 OF EACH

1 24354994547D+00

2449786631270+00

358770670271 D+00

46364760900 1 D+00

643501 1 08793D+00

7853981 63397D+00

/ 1 OX

/ 1 OX

/ 1 OX

/ 1 OX

/ 1 OX

/ 1 OX

C * t * * * c * * « * * c * * * * * c * * * * * c=

c=

BVD = DATAN2

WRITE (NUVI,

WRITE (NUVI,

FORMAT( 1 OHO

FORMAT( 1 OHO

FORMAT ( 1 OHO

FORMAT( 1 OHO

FORMAT( 1 OHO

FORMAT( 1 OHO

FORMAT( / /37H

PRINTED TO ,9H12 DIGITS ) END OF TEST SEGMENT 101

WHEN EXECUTING ONLY SEGMENT 101 THE STOP AND END

'WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP ' ;

F M n

D24

D24

D24

D24

D24

D24

PI

PIPI

P1

PI

1 .ODO) )P1

PI

PI

P 1 PI

PI

PI

PI

PIPI

PI

PI

PI

PIPI PAIR IS THE FUNCTI0N/25H

CARDS

.12)

.12)

.12)

.12)

.12)

.12)

CALCULATI0NP1

PI

PI

PI

PI

PI

PI

PIPI

PI

C t « t «

«

PI

PI 0 1 0 0 70

4P1 01 0080

PI 0 1 0 0 90

PI 01 01 00

PI 01 01 1 0

P 1 0 1 0 1 20

P1010130

PI 01 01 40

P001 2330

P0012335

POO 1 2 3 40

POO 1 2 3 4 5 P 0 0 1 2 3 5 0 P0012355

PI 01 A1 POO 1 2360

P 1 0 1 0 1 5 O' P0072100

P0072105

P00721 10

P 0 0 72 1 1 5 P101B1

POO 72 1 2 0 P1010160

P 1 0 1 0 1 7 0 P1010180

P 1 0 1 0 1 9 0 P1010200

P 1 0 1 0 2 1 0 PI 0 1 0 220

010230

010240

010250

010260

010270

010280

0 10290

010300

010310

010320

010330

010340

010350

0 10360

0103 70

010380

010 3 9 0 010400

010410

010420

010430

010440

010 4 5 0

0 10460

010470

010480

0 10490

010500

01 CI 01 C2

020010

020020

NBS FORTRAN Test Programs Version 1 117
c * *

«

c * »

* *

t «• DMODA - (102) P1020030

PI 020040

c * *

c

« *

«

* GENERAL PURPOSE

ttntttttttttttt

ASA

• * *P 1 02 0 0 5 0 REFP1 020060

c * *

«

c *

«

« * TO TEST BASIC EXTERNAL FUNCTION - OMOD - (REMAINDERING -TYPE DOUBLE PRECISION)

8.3.3

TABLE

PI 02 00 70

4P1 020080

c * c *

»

INTRINSIC FUNCTIONS D B L E , F L 0 AT , I D I N T , ASSUMED WORKING PI 02 0 090

PI 0 2 0 1 0 0

c * «

c » * *

* S P

*

E C I F I C A T I 0 N S SEGMENT 1 02 P 1 0 2 0 1 1 0 P001 2370

c * *

c * * * WHEN EXECUTING ONLY SEGMENT 102, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 0 1 23 75 POO 1 2 3 8 0

c *

c « * *

* IN

* COLUMNS 1 AND 2 REMOVED. P0012385

P0012390

c = DOUBLE PRECISION AVD , BVD , CVD , DVD , E VD , F VD , GVO

DOUBLE PRECISION AVD , BVD , CVD , DVD , E VD , FVD , GVD

P001 2395

PI 02A1

c *

c * * *

*

* • 0 u TPUT-TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P 0 0 1 2 4 0 0 PI 0 2 0 1 2 0

c

*

c * * *

« * * WHEN EXECUTING ONLY SEGMENT 102 THE FOLLOWING STATEMENT

P00721 30

P00721 35

c * * »

c = * NUVI : 6 MUST HAVE THE C= IN COLUMNS 1 AND

NUVI = 6

2 REMOVED. P0072 1 40

P0072 1 45

c * * * NUVI

t *

= 6 P102B1

P0072 1 50

1020

WRITE (NUVI, 1020)

F0RMAT(15H1 DMODA - (102)//32H BASIC EXTERNAL FUNCTION -DMODPI 02 0 1 3 0 PI 02 0 1 40

1//39H (REMAINDERING -TYPE DOUBLE P R E C 1 S I 0 N ) / / 2 7 H ASA REF.- 8 2 (TABLE 4)// 9H RESULTS)

.3 . 3P1 0201 50

PI 0 2 0 1 60

AVD - BVD =

1 6 .062 5 0 0 -4 . ODO

PI 0 2 0 1 70

PI 0 2 0 1 8 0 CVD = DVD = -8 . 1 25D0

2 . 500

P1020190

PI 02 02 0 0 EVD = FVD =

- 1 . ODO

1 . ODO

PI 0 2 0 2 1 0 PI 0 2 0 2 2 0 FVD = GVD = DMOD(AVD, BVD)

FVD - 0.062500

PI 02 0 23 0 PI 0 2 02 40 WR I TE FVD = (NUVI, 1021) GVD

2 . ODO

PI 02 0 2 5 0 PI 02 0 2 60

FVD = GVD = DMOD(CVD, DVD)

FVD + 0.625D0

PI 02 0 2 70

PI 02 0 2 8 0 WRITE

FVD = (NUVI, 1021) GVD

3 . ODO

PI 02 0 2 90

PI 0 2 0 3 0 0 FVD = GVD = DMOD(BVD, EVD)

FVD + O.ODO

P1020310

PI 0 2 0 3 2 0 WRITE

FVD = (NUVI, 1021) GVD4 . ODO

PI 0 2 03 3 0 PI 02 03 4 0 FVD = GVD = DMOD(BVD, AVD)

FVD - (BVD-(DBLE(FLOAT( IDINT(BVD/AVD) ) ) ) » AVD)

PI 02 03 5 0 PI 0 2 0 3 60

WRITE

• WRITE

(NUVI, 1021) GVD

(NUVI, 1022)

PI 0 2 0 3 70

PI 02 0 3 8 0 1021

1022

FORMAT ( / /D25 . 14

)

F0RMAT(//18H END OF DMOD TEST//40H ALL ABOVE ANSWERS SHOULD BE

PI 02 0 3 90

0P1 020400

c * * *

1 FOR THIS/32H TEST SEGMENT TO BE SUCCESSFUL.)

* END OF TEST SEGMENT 102

PI 0 2 0 4 1 0 PI 02 0 42 0

c * *

c * * * *» WHEN EXECUTING ONLY SEGMENT 102 THE STOP AND

** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

END CARDS

C = PI 02 0 43 0 PI 02 0 4 4 0

c

* *

c

=

* * IN STOP

COLUMNS 1 AND 2 REMOVED. P1020450

PI 02 0 460

c = END

STOP

PI 02 0 4 70

PI 02C1

c * * END *«« * t * PI 02C2*P 1 0 3 0 0 1 0

c * * *

c * *

* *

t t CABSA - (103)

PI 0 3 0 0 2 0 PI 0 3 0 030

c * *

c * *

»

t *

» t t t i * * PI 0 3 0 0 40

• • • *P 1 0 3 0 0 5 0

c * * *

c * * * ** GENERAL PURPOSE

*

.TO TEST BASIC EXTERNAL FUNCTION -CABSASA

8.3

R E F P 1 0 3 0 0 6 0 .3 P1030070

1 1 8 NBS FORTRAN Test Programs Version 1
c « * * * * c « « * *

«

c « * * t * c * * * * *

c « * * * *

c * * * * * c * * * * t c * * * * c * * * * *

c * * * «

c « * t *

«

c « * « * *

c * * * *

«

c=

c * * * * * c * « * «

c * * * * *

c * * * * *

c « * « *

«

c =

(MODULUS OF A COMPLEX NUMBER)

ARGUMENTS ARE ARRAY EP1C(30), FUNCTIONS FROM

ODD NUMBERED ARGUMENTS PRINTED AS SET 1 AND

FROM EVEN NUMBERED ARGUMENTS

SET

SET

RESULTS

RESULTS

SHOULD

SHOULD

BE

BE TO

TO

E + 8

E + 8 SPECIFICATIONS SEGMENT 103

WHEN EXECUTING ONLY SEGMENT 103 THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C^

IN COLUMNS 1 AND 2 REMOVED.

COMPLEX

COMPLEX

EP1 C(30)

E P K ( 3 0 ) OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

103 THE FOLLOWING STATEMENT

N COLUMNS 1 AND 2 REMOVED.

WHEN EXECUTING ONLY SEGMENT

NUVI = 6 MUST HAVE THE C= NUVI = 6 NUVI = 6

C * « * *

«

WRITE (NUVI, 1030)

1030 F0RMAT(15H1 CABSA - (103)//32H BASIC EXTERNAL FUNCTION -CABS1//31H (MODULUS OF A COMPLEX NUMBER)//27H ASA REF.- 8.3.3 (TABLE

24)//9H RESULTS/ / 1 OX, 5HSET 1,15X,5HSET 2 ) C*****INITIALIZE EP1C(EXACT VALUES)

(0.5E- 7 ,- 0.866 0 2 5 E-7)

(2.5E-7,-4.330125E-7)

E-6 , 0 . 0

)

E-6 , 0 . 0

)

5E-5,0.866025E-5)

5E-5,4.330125E-5)

0 . 5E-4, 0 . 8660 2 5 E-4)

2.5E-4,4.330125E-4)

= (-1 .E-3,0.0)

= (-5. E-3,0.0)

= (-0.5E-2,-0.866025E-2)

-4.330125E-2)

0 . 8 66 0 2 5 E- 1 ) 3 3 0 1 2 5 E-1 )

1031

EP1 C( 1 ) EP1 C(2)

EP1 C(3)

EP1 C(4)

E P 1 C ( 5

)

EP1 C(6)

E P 1 C ( 7 ) EP1 C(8)

EP1 C(9)

EPICdO)

E P 1 C ( 1 1 ) EP1 C(12)

EP1C(13)

EP1 C( 1 4)

"E P 1 C ( 1 5 ) EP1 C( 16)

E P 1 C ( 1 7 ) EP1 C( 1 8 ) E P 1 C ( 1 9 ) EP1 C(20)

EP1 C(21 ) EP1 C(22)

EP1 C(23)

EP1 C(24)

EP1 C(25

)

EP1 C(26)

EP1 C(27)

EP1 C(28 ) EP1 C(29)

EP1 C(30)

IVI = IVI = AVS = BVS = WRITE

( 1

( 5

( 0 (2

(

(

(-2 . 5E-2

( 0 . 5E- 1 ,

• (2 . 5E-1 , -4

(1.0,0.0)

(5.0,0.0)

(0.5E 1 , 0.8 66 0 2 5 E1 ) (2.5E 1 , 4.3 3 0 1 2 5 E1 )

( -0 . 5E 2 , 0 . 866 02 5 E2 ) (-2.5E2,4.330125E2)

( - 1 . E3 , 0 . 0 )

( -5 . E3 , 0 . 0 ) (-0.5E4,-0.866025E4)

(-2.5E4,-4.330125E4)

(0.5E5,-0.866025E5)

(2.5E5,-4.330125E5)

( 1 . E6 , 0 . 0

)

(5 .E6.0.0)

(0.5E7,0.866025E7)

(2.5E7,4.330125E7)

1032

1033

103 4

- 1 IVI + CABS

CABS

(NUVI

FORMAT( 1 HO , IF (IVI - 2 9) 1031,

WRITE (NUVI, 1034)

FORMAT( / /39H VALUES

1 ET 1 ( . 5 FOR SET 2 ) ,

(EP1 C( IVI ) ) (EP1 C( IVI + 1 ) )

, 1032) AVS, BVS

E17.6, 2X, E17.6)

1033, 1033

IN EACH SET SHOULD BE POSITIVE /39H

EXPONENT /35H RANGE FROM -06 TO +08

TABLE 4P1030080

PI 0 3 0 090

P1030100

PI 03 0 1 1 0 P 1 0 3 0 1 2 0 PI 0 3 0 1 3 0 P1030140

PI 0 3 0 1 5 0 P0 0 1 2 4 1 0 P0012415

P001 2420

P0 0 1 2 42 5 P0 0 1 2 43 0 P0 0 1 2 43 5 PI 03A1

POO 1 2 4 4 0

P 1 0 3 0 1 6 0 P0072160

P00721 65

P00721 70

P00721 75

PI 03B1

P00721 80

PI 0 3 0 1 7 0 PI 0 3 0 1 8 0 P 1 0 3 0 1 90

P1030200

P1030210

P1030220

PI 0 3 0 2 3 0 PI 0 3 0 2 40

PI 0 3 0 2 5 0 PI 03 02 6 0 P 1 030270

P1030280

PI 0 3 0 2 9 0 P 1 0 3 0 3 0 0 PI 0 3 0 3 1 0 P1030320

PI 0 3 0 3 3 0 P1030340

P1030350

P1030360

PI 0 3 0 3 7 0 P1030380

PI 0 3 0 3 9 0 P1030400

P1030410

P1030420

PI 0 3 0 43 0 P1030440

PI 0 3 0 4 5 0 PI 0 3 0 46 0

P 1 0 3 0 4 7 0 P1030480

PI 0 3 0 490

P1030500

P1030510

P1030520

PI 0 3 0 5 3 0 P1030540

PI 0 3 0 5 5 0 P1030560

PI 0 3 0 5 7 0 PI 0 3 0 5 8 0 PI 0 3 0 5 9 0

. 1 FOR SP1 030600

IN SEQUEP 1 0 3 0 6 1 0

NBS FORTRAN Test Programs Version 1
2NCE ) Ci.**«« END OF TEST SEGMENT 103

C*«*«* WHEN EXECUTING ONLY SEGMENT 103 THE STOP AND END

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C««**« IN COLUMNS 1 AND 2 REMOVED.

C= STOP

CARDS

C= END

STOP

END

C * *

c * *

C ' * *

c * * *

c * » *

c

» « *

c * * «

c * * *

c * * *

c * * *

c * * *

c * * *

c * *

c * * *

c » * *

r * *

C * * *

C * * *

C * * *

c =

c =

BSFTS - (110)

* * GENERAL PURPOSE ASA REF

** TEST OF ALL STATEMENT FUNCTIONS THAT HAVE BEEN DEFINED

** IN TEST SEGMENT 005 8 .i.

** GENERAL COMMENTS

* INTRINSIC AND EXTERNAL F U N C T I 0 N S AS S U M E D W 0 RK I N

G

*« INTRINSIC AND BASIC EXTERNAL FUNCTIONS DECLARED IN A 10.1.7

* TYPE STATEMENT OF SAME TYPE AS TABLES 3 AND 4 5.3

** SPECIFICATIONS SEGMENT 1 1 0

WHEN EXECUTING ONLY SEGMENT 110, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

INTEGER IFIX

REAL ABS, SORT

INTEGER IFIX

REAL ABS, SORT

C * * *

C * » *

c * *

«

c * * *

c * * * c» * •

c * *

c * *

c * « *

c « * *

c * * *

c * * «

c * * c * « *

WHEN EXECUTING ONLY SEGMENT 110, THE SEGMENT 005, WHICH

CONTAINS THE STATEMENT FUNCTIONS BEING TESTED HERE MUST BE INSERTED AFTER THE SPECIFICATION STATEMENTS OF SEGMENT 110.

BSFDF ( 0 0 5 )

ASA REF

8 . 1

C * *

C *

c » * * c * » »

c « « c * * *

c * * *

GENERAL PURPOSE

DEFINING STATEMENT FUNCTIONS THAT ARE TO BE TESTED

IN SEGMENT 110 (BASIC FORTRAN) AND 111 (FULL FORTRAN)

HEADER FOR SEGMENT 005

DEFINING EXPRESSION CONTAINS CONSTANTS AND VARIABLES

CMAFS ( CAWVS , CBWVS ) = CAWVS » 2. + CBWVS

CMBFS(MAWVI ,MBWVI ,MCWVI ) ^(MAWVI + MBWVI + MCWVI)/3

MCAF I (MAWVI , MBWVI ) = MAWVI »• MBWVI

MCBF I ( CAWVS , CBWVS , C CWVS ) = (CAWVS + CBWVS + CCWVS) * 2.0

DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES AND

INTRINSIC FUNCTIONS

CMCFS ( CAWVS , CBWVS , CCWVS ) = ABS(CAWVS*«2 - ( C BWVS + C CWVS ) * * 2

)

CMDFS(MAWVI , MBWVI ) = I S I G N ( ( M A W V I + M B W V I ), ( M A W V I - M B W V I )

)

MCCFI (MAWVI , MBWVI , CAWVS) = MAWVI**2 + MBWVI«*2 + 1 F I X ( C AW VS ) * * 2 MCDF I ( CAWVS , CBWVS , CCWVS , CDWVS , CEWVS ) = (CAWVS + CBWVS + CCWVS + CDWVS +CEWVS) (ABS(CAWVS))

DEFINING EXPRESSION CONTAINS PREVIOUSLY DEFINED STATEMENT

FUNCTIONS AND/OR EXTERNAL FUNCTION REFERENCES

CMEFS ( CAWVS , CBWVS ) = CMBFS(1,2,3) + SORT((CAWVS * CBWVS))

CMFFS(MAWVI , MBWVI , MCWVI ) = M C C F I ( MAWV I

, MBWV I

, 3 . 0 ) + MCWVI »*2

MCEF I ( MAWV I , MBWVI ) = M CAF I ( MAWV I

, MBWV I ) M CAF I ( MAWV I

, MBWV I

)

MCFFI ( CAWVS, CBWVS, CCWVS) SQRT(CAWVS) + SQRT(CBWVS) + EXP(CCWVS)

DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES, INTRINSIC

OR EXTERNAL FUNCTION REFERENCES AND PREVIOUSLY DEFINED

STATEMENT FUNCTIONS.

CMGFS ( MAWV I , MBWV I

, CAWVS , CBWVS ) = FLOAT(MAWVI *• 2) - CMAFS(CAWVS,

CBWVS) + SQRT( ( FLOAT(MAWVI + MBWVI)))

PI 030620

PI 030630

P 1 0 3 0 6 4 0 PI 0306 5 0 PI 03 0660

PI 0 3 06 70

PI 0 3 0680'

PI 03C1

PI 03C2

*P 1 1 0 00 1 0 PI 1 0 002 0 PI 1 0 00 30

P 1 1 0 0 0 4 0 *P1 1 00050

P 1 1 0 0 0 6 0 P 1 1 00070

2 P 1 1 0 0 0 8 0 PI 1 00090

P 1 1 0 0 1 0 0 PI 1 001 1 0 PI 1 0 0 1 20' PI 1 001 30

P 1 1 0 0 1 4 0 P0012450

P0012455

P0012460

POO 1 2 46 5 P0012470

P 0 0 1 2 4 7 5 P 0 0 1 2 480

P110A1

PI 1 0A2

P0012485

PI 1 001 50

P 1 1 0 0 1 6 0 PI 1 001 70

*P0 0 5 0 0 1 0 P0050020

P 0 0 5 0 0 3 0 P0050040

«P0050050

P0050060

P0050070

1 P0 0 5 0 0 8 0 P0050090

P0 0 5 0 1 0 0 P00501 10

P0050120

P0050130

P00501 40

P0 0 5 0 1 5 0 P0050160

P00501 70

P00 5 0 1 8 0 P0050 1 90

P0050200

P0 0 5 02 1 0 P0050220

P 0 0 5 0 2 3 0 P0050240

POO 5 02 5 0 P0050260

P0050270

P0050280

P0050290

P0050300

P 0 0 5 0 3 1 0 P0050320

120 NBS FORTRAN Test Programs Version 1
c * t »

«

c « « «

c * * *

«

c * * * * c * * * * c « * * *

MCGFI (MAWVI .MBWVI .MCWVI , CAWVS)

MCWVI) + IFIX(EXP(CAWVS)

)

END OF' TEST SEGMENT 00 5

MCEFKMAWVI .MBWVI ) - MCEFHMAWVI

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 110, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 NUVI = 6

C * * * *

i 100

c * * *

«

WRITE (NUVI, 1100)

F0RMAT(39H1 BSFTS - (110) STATEMENT

NO REAL//UH ASA REF. - 8.1.2// 9H

HEADER FOR SEGMENT 110 WRITTEN

CMAVS = 9.0 - CMAFS(2.0, 3.0 + 2.0)

FUNCTION TEST/23X

RESULTS )

1 6H I NTEGER

CMBVS

MCAVI

MCBVI

WRITE

"CMAVS

CMBVS

MCAVI

MCBVI

WRITE

CMAVS

MCAVI

CMBVS

MCAVI

MCBVI

WRITE

CMAVS

CMBVS

= CMBFS(2/2. 1+1

,

= MCAF I ( I F IX( 5 . 0

)

= MCBFI(1.0,2.0,3

(NUVI, 1108) CMAVS

- C M C F S ( 4 . 0 , 2 . 0 , 2

= CMDFS(-1 ,-4) -

1*3) -2.0

5) - (5 ** 5)

0 ) - MCAF I ( 6 , 2 ) +

'2 4' CMBVS, MCAVI, MCBVI

0 )

. 0

= MCCFI (9*2/18, (4**2)/8

= MCDF I ( 1 .

, 2 . 1 , 3 . , 4 . , 5 .

)

(NUVI, 1108) CMAVS, CMBVS

= CMEFS(2

- 3

= CMFFSd

= MCEFI(2

- MCFFI (9

( NUVI , 1 1 08 ) = CMGFS(3, 13

0,1.0 * 2.0) -

3.0)

- 1 5 MCAVI

4 . 0

1 4

MCBVI

2 , 2 ) 0 ,

MCAVI ) - 23

.

- (4 * 4 ) 4.0, CMBVS * CMBVS * CMAVS, CMBVS, MCAVI

,2.0,5.0) - 4.0

0.0) - MCBVI

0 , 0

= CMGFS( IFIX(SQRT(CMAFS(2. ,

1 CMBFS ( 1 , 2 , 3 ) , CMDFS( -1 , -4 ) ) - 4

.

MCAVI = MCGF I ( 2 , 2 , 2 , 0 . 0 ) - 1 MCBVI = MCGFI (MCAFI (2,1), MCBFI ( 1 1'2 . 0 , 5 . 0 ) ) ) , EXP ( 0 . 0 ) - 1.0)-1

WRITE (NUVI, 1108) CMAVS, CMBVS, MCAVI,

WRI'TE (NUVI ,1109)

1108 FORMAT ( /2( F20 . 1 0 / ) , 2 ( I 19/ ) ) ri"0'9' FORMAT ( /36H ALL ABOVE ANSWERS SHOULD

137H THIS TEST SEGMENT TO BE SUCCESSFUL

* END OF TEST SEGMENT 1 1

0

* WHEN EXECUTING ONLY SEGMENT 110, THE

) ) ) , I F IX( CMFFS( 1

, 2 , 3 ) -10.)

0), IFIX(SQRT(CMGFS(3, 13

MCBVI

BE

)

0 FOR /

C « * «

«

c « * * * c « * * * c * * * *

STOP

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

AND

C

= END CARDS

IN COLUMNS 1 AND REMOVED

STOP

END

STOP

END

C * * * * c * * * * c * * * * c * * «

c * * * * c * * * * c * * * * c * * * * c * * * * c * * * * c * * * * c * » t * c « * * * c * * * * c * * * * c * * * * C * * *

«

c * * * *

FSFTS (111)

general purpose

test statement functions that h ave b e e n d e f i n e d in segment 006 (for full fortran test only)

"general comments

intrinsic and external functions assumed working

intrinsic and basic external f u n c t i 0 n s d e c l ar e d in a type statement of same type as tables 3 and 4

ASA REF

8.1.

10.1.7

5 . 3 SPECIFICATIONS SEGMENT 1 11 WHEN EXECUTING ONLY SEGMENT 111, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

, P0050330

P0050340

P0050350

P 1 1 00 1 80

PI 1 001 90

P00721 90

P00721 95

P0072200

P0072205

PI 1 OBI

P 0 0 72 2 1 0 PI 1 0 0 2 0 0 API 1 0 0 2 1 0 PI 1 0 0 2 2 0

P 1 1 0 0 2 3 0 PI 1 0 0 2 40

P 1 1 0 0 2 5 0 PI 1 0 0 2 60

PI 1 0 02 70

PI 1 0 0 2 8 0 PI 1 0 0 290

PI 1 0 03 0 0 P 1 1 0 0 3 1 0 PI 1 0 03 2 0 PI 1 0 03 3 0 PI 1 0 0 3 4 0 P 1 1 0 0 3 5 0 P 1 1 0 03 60

P 1 1 0 0 3 70

PI 1 0 0 3 8 0 PI 1 0 03 90

PI 1 0 0 4 0 0 P 1 1 0 0 4 1 0 PI 1 0 0 42 0 PI 1 0 0 43 0 P1 100440

P 1 1 0 0 4 5 0 PI 1 0 0 460

PI 1 0 0 4 70

PI 1 0 0 4 8 0 PI 1 0 0 49 0' PI 1 0 0 5 0 0 P 1 1 0 0 5 1 0 P 1 1 0 0 5 2 0 P 1 1 0 0 5 3 0 PI 1 0 0 5 40

PI 1 0 0 5 5 0 PI 1 0 0 5 60

P 1 1 0 C 1 P11 0C2

* P 111 0 0 1 0 P1 1 1 0020

P 1 1 1 0 0 3 0 PI 1 1 0 0 40

*P1 1 10050

PI 1 1 0 0 60

2P 1 1 1 0 0 7 0 PI 1 1 0 0 8 0 P 1 1 1 0 0 9 0 PI 1 1 01 00

P 1 1 1 0 1 1 0 PI 110120

P 1 1 1 0 1 3 0 P 1 1 1 0 1 4 0 POO 1 2 49 0 POO 1 2 49 5 POO 1 2 5 0 0 POO 1 2 5 0 5 NBS FORTRAN Test Programs Version 1 121
DOUBLE PRECISION DPAFO,OPBFD,DPCFD,DPDFD,DPFFD,DPGFO,DPEFD,DPHFO

DOUBLE PRECISION DPAVD. DPBVD, DPCVD, DPDVD , D AW VD , D B W VD , D C W VD

DOUBLE PRECISION DPA1 D ( 5 )

, F C2D ( 5 . 5

)

DOUBLE PRECISION DBLE, DEXP

COMPLEX CMPLX, CEXP

COMPLEX CHAVC , CHBVC , CHCVC , C H D V C , C HE V C , C H F V

C

COMPLEX CHAFC, CHBFC, CHCFC, CHDFC.CAWVC, CBWVC

LOGICAL A3B(2,2,2)

LOGICAL MCFVB, MCHVB, ABFB, BCFB, lEFB, KLFB

,MCEVB,MCIVB,MCKVB,ATVB, AW V B , B W V B , C W V B , D W V B , E W VB , S W VB , T W VB

DOUBLE PRECISION DPAVD, DPBVD, DPCVD, DPDVD , D AW VD , D B W VD , D C WVD

DOUBLE PRECISION DPAFD, D P B F D , D P C F D , D P D F D , D P F F D , D P G F D , D P E F D , D P H F

D

DOUBLE PRECISION DPA1D(5), FC2D(5,5)

COMPLEX CHAVC, CHBVC, CHCVC, CHDVC, CHEVC, CHFVC

COMPLEX CHAFC, CHBFC,

LOGICAL A3B ( 2 , 2 , 2 ) LOGICAL MCFVB, MCHVB,

,MCEVB,MCIVB,MCKVB,

COMPLEX CMPLX, CEXP

DOUBLE PRECISION DBLE

CHCFC, CHDFCCAWVC, CBWVC

ABFB

ATVB ,

, DEXP

BCFB, lEFB, KLFB

AWVB , BWVB , CWVB , DWVB EWVB , SWVB , TWVB

WHEN EXECUTING ONLY SEGMENT 111, THE SEGMENT 006, WHICH

CONTAINS THE STATEMENT FUNCTIONS BEING TESTED HERE MUST BE INSERTED AFTER THE SPECIFICATION STATEMENTS OF SEGMENT 111

P0012510

P00 1 2 5 1 5 POO 1 2 5 2 0 P0012525

POO 1 2 530

P0012535

P001 2540

POOl 2545

POO 1 2 5 5 0 POOl 2555

POOl 2560

PI 1 1 A1

PI 1 1A2

PI 1 1 A3

PI 1 1 A4

PI 1 1 A5

pil i A6

PI 1 1 A7

PI 1 1 A8

PI 1 1 A9

PI 1 1 AA

P0012565

P 1 1 1 0 1 5 0 PI 110160

P 1 1 1 0 1 7 O' ************t «** t*«»**««*«*«******»**«»*t**t*t*««**»(r*tt*«t:*«t*P0060010

» P 0 0 6 0 0 2 0

* FSFDF - (006) P0060030

* POO 60 0 40

*««*****«*»***««*««»««t«*»t»»*****»*****»*«****t««*«»»«*«*»«»*t»«t*P0060050

ASA REF

. 1 GENERAL PURPOSE

DEFINING STATEMENT FUNCTIONS THAT ARE TO BE TESTED

IN SEGMENT 111 (FULL FORTRAN STATEMENT FUNCTION TEST)

HEADER FOR SEGMENT 006

D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS AND VARIABLES

DPAFD ( DAWVD , DBWVD ) = (DAWVD + DBWVD) »* 2 DPBFD(DAWVD,DBWVD,DCWVD) - (DAWVD + DBWVD - DCWVD) 3 DPCFD ( DAWVD , DBWVD , DCWVD ) - 3.0D0 » (DAWVD + DBWVD + DCWVD)/2.D0

D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS, VARIABLES

AND INTRINSIC FUNCTION REFERENCES

DPDFD ( DAWVD , DBWVD ) - DSIGN(DAWVD, -(DBWVD))

DPEFD(DAWVD, DBWVD, CAWVC, CAWVS) DBLE(CAWVS + A I MAG ( CAWVC ) ) + DMAXl (DAWVD , DBWVD + 1 . DO

)

D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS, VARIABLES,

INTRINSIC FUNCTION AND PREVIOUSLY DEFINED STATEMENT FUNCTION

REFERENCES

DPFFD ( DAWVD , DBWVD , CAWVS ) - D P A F D ( D A W VD , D B W VD ) -(2. DO * DAWVD * DBWVD) + (DBLE(CAWVS) * 2. DO ) DPGFD ( DAWVD , DBWVD , CAWVS , CAWVC ) = D P B F D ( D AW VD , D B W VD , D B L E ( C A W VS )

)

- DBLE( AI MAG ( CAWVC ) ) + 5 . ODO

D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS, VARIABLES,

INTRINSIC FUNCTION, PREVIOUSLY DEFINED STATEMENT FUNCTION

AND EXTERNAL FUNCTION REFERENCES

DPHFD(DAWVD, DBWVD, CAWVS) - D P F F D ( D A W VD , D B W VD +1.0D0, CAWVS) * 2.

+ DEXP(DAWVD) - (DBLE(CAWVS) * 2 . D 0

) - D E X P ( D A W VD ) COMPLEX STATEMENT FUNCTIONS CONTAINING CONSTANTS AND

CHAF C ( CAWVC , CBWVC ) = CAWVC * (2.0,2.0) + CBWVC + (2.0,2.0)

COMPLEX STATEMENT FUNCTION CONTAINING CONSTANTS, VARIABLES,

AND INTRINSIC FUNCTION REFERENCES

CHBF C ( CAWVC , CBWVC , CAWVS ) = CAWVC - CBWVC + C M P L X ( C A W VS , C A W VS

)

COMPLEX STATEMENT FUNCTION CONTAINING CONSTANTS,

VARIABLES, INTRINSIC AND EXTERNAL FUNCTION REFERENCES

CHCFC( CAWVC, CBWVC, CAWVS, CBWVS) = (CAWVC - CBWVC) + CEXP (CMPLX

( CAWVS , CBWVS ) ) - CMPLX ( CAWVS , CBWVS ) COMPLEX STATEMENT FUNCTION CONTAINING CONSTANTS, VARIABLES,

INTRINSIC, EXTERNAL AND PREVIOUSLY DEFINED STATEMENT FUNCTION

REFERENCES

CHDF C ( CAWVC , CBWVC , CAWVS , CBWVS ) = CH C F C ( CAWVC , CBWVC , CAWVS +CAWVS,

P0060060

1 P0 0 60 0 70

P 0 0 6 0 0 8 0 P0060090

P 0 0 6 0 1 0 O' P0 060 1 1 0 P 0 06fl120' P0 060 1 3 0 P 0 0 6 0 1 4 O' P00601 50

P 0 0 6 0 1 6 O' P00601 70

PC 06 0 1 8 0 P00601 90

P0060200

P 0 0 6 0 2 1 0 P 0 06 02 20

P0060230

PO 0602 40

P0060250

P0060260

P0060270

P0060280

D0P0060290

P0060300

VAR I ABLESP00603 1

0

P0060320

P0060330

P0060340

P0060350

P 0 0 6 0 3 6 0 P0060370

P 0 0 6 0 3 8 0 P0060390

P0060400

P006041

0

P0060420

P0060430

NBS FORTRAN Test Programs Version 1
1 2.0 * CBWVS) + CMPLXd .0,2.0)

C***«« STATEMENT FUNCTION CONTAINING LOGICAL VARIABLES

ABFB(AWVB, BWVB, DWVB) = AWVB .AND. BWVB .OR. .FALSE.

C***** STATEMENT FUNCTION CONTAINING CONSTANTS, VARIABLES

AND

AND

DWVB

C***»» INTRINSIC FUNCTIONS

BCFB ( EWVB , CWVB , BAWVS , BCWVS ) = EWVB .ANO.(BAWVS * ABS<BCWVS) .GT.

1 0. 5 ) .AND. . NOT. CWVB

C»««*« STATEMENT FUNCTION CONTAINING PREVIOUSLY DEFINED STATEMENT

C***'**' FUNCTION AND AN INTRINSIC FUNCTION REFERENCE

IEFB(EWVB,ATVB, CWVB, BAWVS, BCWVS) = ATVB .AND. EWVB .AND. CWVB .OR.

1AMAX1(BAWVS, BCWVS) .GT. 60 0. .OR. BCFB ( EWVB , CWVB , BAWVS , B CWVS ) C***** STATEMENT FUNCTION CONTAINING BASIC EXTERNAL FUNCTION REFERENCE

KLFB ( SWVB , TWVB , ATVB , BAWVS ) = SWVB .AND. .NOT. TWVB . OR .( SORT ( BAWVS )

1 .GT. 9.0) .OR. ATVB

CV;;*'* END OF TEST SEGMENT 0 0 6

C * * * * * C***** OUT PUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

C * * * t * C***** WHEN EXECUTING

C***** NUVI - 6 MUST

C= NUVI = 6 NUVI = 6

ONLY SEGMENT 111, THE FOLLOWING STATEMENT

HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

FUNCTION TEST//

LOGICAL//

)

C t * « *

«

WRITE ( NUVI , 1 1 1 0 ) iTiO FORMAT (39H1 FSFTS -

' ( 1 1 D STATEMENT

1 39H DOUBLE PRECISION, COMPLEX AND

^ISH ASA REF. - 8.1.2//10H RESULTS

C***** HEADER FOR SEGMENT 111 WRITTEN

C* CONSTANTS USED IN THIS SEGMENT

CHAVC = (1.0,2.0)

CHBVC = (-2.0,3.0)

DPA1D(2) = 3.5D0

ATVB FALSE . PPDVS = 18.

RRDVS =21.0

ATVS =18.0

M C F V B = .TRUE'. FC2D(2,2) = 1 .7500

Ct«*t« TEST OF D.P. STATEMENT FUNCTIONS

DPAVD = DPAFD(3.5D0,DPA1D(2)) - 49.0D0

DPBVD = DPBFD( 1 . DO , DPA1 D (2 ) - 2 . 5D0 , DBLE ( 1 . 0 ) ) - 1 DPCVD = DPCFD(0.D0, 1 .0D0,DPA1D(2)+ 0.5D0) - 7.5D0

DPDVD = DPDFD( DBLE ( AI MAG ( CHAVC) )

, FC2D ( 2 , 2 ) ) + 2.0D0

(NUVI, 1118) DPAVD, DPBVD, DPCVD, DPDVD

= DPEFDd.ODO, FC2D(2,2) * 2 . D 0 , (1 . 0 , - 4 . ) , AM AX 1 ( 2 5D0

= DPFFD(DPA1D(2) , F C2D ( 2 , 2 ) - 1 . 75D0 , 5 . 0 0 ) - 22.2 5 00

= DPGFD(2.D0/ .201 ,DPA1D(2) - 2 . 5 DO , 1 . 0 , CHAVC ) - 4.000

DPHFD(3.5D0, FC2D(2,2) - 2.7500,5.0) - 34.50 0

ODO

WRITE

DPAVD

1 - 4 DPBVD

DPCVD

"DPOVD^

0,4.0))

WRITE (NUVI, 1118) DPAVD, DPBVD, DPCVD, DPDVD

Zt"**'*V TEST OF COMPLEX STATEMENT FUNCTIONS

CHCVC = CHOVC = CHEVC = CHFVC =

CHAF C ( (

2

CHBFC( (4

CHCFC( ( 1 CHDFC( (

0

) , CHAVC ) - (3.0,12.0)

1.5), CHBVC , 1.0) - (7.0,-10.5 ) 0) *2, CHAVC, 0.000, AIMAG(CHAVC) -2.0)

0) , CHAVC, 0.0 0 0 , SNGL ( D M I N 1 ( 0 . D 0 , 4 DO ) 1)-(1 .0,0.0)

WRITE (NUVI, 11 17) CHCVC, CHOVC , CHE VC , CHFVC

WRITE (NUVI, 1119)

t'ttttt TEST OF LOGI CAL" STATEMENT FUNCTION

MCEVB = PPDVS .GT. 60.0

A36(1,1,1) = ATVS .LE. 20.9 .AND. AB F B (. TRUE TRUE. ',. FA LSE. ) MCHVB = BCFB( .TRUE. , .FALSE. , PPDVS, 21 .0) . AND .. NOT . PPDVS . GE . RRDVS

MCIVB = .NOT. ( I EFB( . FALSE ., ATVB ,. TRUE ., 6 5 0 ., - 5. 1 1 ). AND .ATVB ) MCKVB = MCFVB. AND. KLFB( .TRUE. , .TRUE. , .TRUE. , 100. ) .AND. .NOT. MCEVB

WRITE (NUVI, 1116) A3B(1,1,1), MCHVB, MCIVB, MCKVB

1116 F0RMAT(//4(L4)//38H THE FOUR ABOVE ANSWERS SHOULD BE TRUE/

1 35H FOR THIS SEGMENT TO BE SUCCESSFUL)

1117 FORMAT(/ 4(F16.7,F14.7/))

P0060440

P0060450

P0060460

P0060470

P0060480

P0060490

P0060500

P006051

0

P0060520

P0060530

P0060540

P0060550

P0060560

P0060570

P0060580

PI 1 1 01 80

P 1 1 1 0 1 90

P0072220

P0072225

P0072230

P 0 0 7 2 2 3 5 PI 11 B1 P0072240

PI 1 1 02 0 0 PI 1 1 021 0 PI 1 1 0 2 20

PI 1 1 0 23 0 PI 1 1 0 2 4 0 P 1 1 1 0 2 5 0 PI 1 1 0 2 60

PI 1 1 0 2 70

PI 1 1 02 8 0 PI 1 1 0 2 9 0 P 1 1 1 0 3 0 0 P 1 1 1 0 3 1 0 PI 1 1 0 3 2 0 P 1 1 1 03 3 0 PI 1 1 03 4 0 P 1 1 1 0 3 5 0 PI 1 1 0 360

P 1 1 1 0 3 7 0 PI 1 1 0 3 8 0 P 1 1 1 0 3 9 0 PI 1 1 0 40 0 PI 1 1 041 0 P 1 1 1 0420

P 1 1 1 0 4 3 0 PI 1 1 0 4 4 0 PI 1 1 0 4 5 0 PI 1 1 0 460

PI 1 1 0 4 70

PI 1 1 0 4 8 0 P1 1 1 0490

P11 1 0500

)P1 1 1 05 1 0 PI 1 1 0 5 2 0 PI 1 1 0 5 3 0 PI 1 1 0 5 40

PI 1 1 0 5 5 0 PI 1 1 0 5 60

PI 1 1 0 5 7 0 PI 1 1 0 5 8 0 PI 1 1 0 5 90

PI 1 1 0 6 0 0 PI 1 1 061 0 PI 1 1 06 2 0 PI 1 1 0 63 0 PI 1 1 06 4 0

NBS FORTRAN Test Programs Version 1 123
1118 FORMAT (/ 4(D30.18/)) P1110650

1119 FORMAT (/ 40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/ P1110660

140H TEST SEGMENT TO BE SUCCESSFUL. VALUES /40H WITH EXPONENTS LEP 1 1 1 0670

2SS THAN 10**(-14) /22H ARE CONSIDERED ZERO ) P1110680

C

* « * * * E N 0 0 F t E S T S E G M E N T i 1 i PI 11 0 6 9 0 C***** WHEN EXECUTING ONLY SEGMENT 111, THE STOP AND END CARDS P1110700

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PI 11071 O' C***** IN COLUMNS 1 AND 2 REMOVED. P1110720

C= ' STOP Pi 1 1 0 73 0 C= END P1110740

STOP Pi l l CI END P.1,11C.2 C******t«*«»****««*******«*«*«********««*********««******«**«***«««t«*«*pi40 00iO

C«**** P1400020

C***** CPXAD - (140) PT40 0030

C* * * * * PI 40 0 0 40

C******«***«*«****«*i!««»**«*t««»t***»t*«****««***««***«**«****««««*«««««pi4 0 0050

C***** GENERAL PURPOSE P1400060

C*»*** TO TEST ADDITION AND SUBTRACTION OF COMPLEX NUMBERS ASA REFP1400070

C*«*** INCLUDES OPERATIONS WITH UP TO 9 TERMS 6.1 PU0 0 080

C***** DOES NOT TEST FOR ACCURACY P 1 40 0 090' C***** P1400100

C*****ADDITION AND SUBTRACTION OF 2 TERMS P 1 40 0 1 1 0 C***** P1400120

C**«*« SPECIFICATIONS SEGMENT 140 Pi 400 1 30

C*«*»* P0012570

C*t**« WHEN EXECUTING ONLY SEGMENT 140. THE SPE C IF I CAT ION STATEMENTS P00 1 2 5 75

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0012580

Z* **'*'* IN COLUMNS 1 AND 2 REMOVED. P00 1 2 5 8 5 C***** P0012590

C= COMPLEX AVC, BVC, CVC, DVC, EVC, FVC, GVC, HVC, IVC, JVC, AAV C , P 0 0 1 2 5 9

5

C= 1 ABVC,BAVC,BBVC,CCVC,CDVC,BCVC,DCVC P0012600

COMPLEX AVC, BVC, CVC, DVC, EVC, FVC, GVC, HVC, IVC, JVC. AAVC'. P140A1

1 ABVC , BAVC, BBVC , CCVC , CDVC , BCVC , DCVC P140A2

Z***** ' PO0 1 2605

C*««** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1400140

C«»*** WHEN EXECUTING ONLY SEGMENT 140, THE FOLLOWING STATEMENT P0 0 722 5 0 C*.«*t NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072255

C • * • P 0 0 7 2 2 6 0 C= NUVI = 6 P0072265

NUVI = 6 Pi40B1

WRITE (NUVI, 1401) P1400150

1401 FORMAT( IHl , 1X,34HCPXAD - ( 1 4 0 ) C 0 MP L E X AD D I T I 0 N AND/16X, P 1 400 1 60

1 nHSUBTRACTI0N//2X, 14HASA REF. - 6 . 1 / / 2X , 7HRESULTS / / ) P 1 400 1 70

AVC=( 1 .46 7,2.560 ) PI 400 1 80

BVC=(3.568,7.480) P1400190

CVC = AVC + BVC P 1 4002 0() DVC=AVC+ ( 3 . 568 , 7 . 480 ) P1400210

EVC = ( 1 .9467 , 2.9 5 60 ) + BVC P 1 40 022 0 FVC=(1.467,2.560)+(3.568,7.480) P1400230

GVC = AVC-BVC PI 40 02 40

HVC = ( . 1 46 7E + 1 , . 2 5 60E1 ) - BVC P 1 40 02 5 0 IVC = AVC - ( 3 5 68E- 3, .74 8 0E + 1 ) P 1 400260

JVC=(1.467,2.560)-(3.568,7.480) P1400270

C***t*ADDITION AND SUBTRACTION OF 3 TERMS P 1 40 0280

AAVC=AVC+BVC-CVC P1400290

ABVC = AVC+( 3.5 68,7.480 )-DVC P 1 40 03 00

BAVC= ( 1 . 467 , 2 . 560 ) +BVC-CVC P1400310

8BVC = ( 1 .467, 2.5 60 ) + ( 3. 5 68,7. 480 )-FVC P 1 400320

BCVC=AVC-BVC-GVC P1400330

CCVC = ( 1 . 46 7 , 2 . 5 60 ) - BVC-HVC

' PI 40 03 40

CDVC=AVC-(3.568,7.480)-IVC " P1400350

D C V C = ( 1 . 46 7 , 2 . 5 6 0 ) - ( 3 . 5 6 8 , 7 . 4 8 0 ) - J VC P 1 4 0 0 3 6 0 WRITE(NUVI,1402) AAV C , AB V C , B AV C , B B V C , B C V C , C CV C , CDVC. DCVC PI 400370

C**»t*ADDITION AND SUBTRACTION OF 5 TERMS P1400380

AAVC = AVC-(1.89.6. 4 8 ) - AAV C

- B V C + ( 0.0,9.830) P1400390

ABVC = AVC- ( 1 . 89 , 6 . 48 ) -AAVC-BVC + ( 0 . 0 , 9 . 8 30 ) P 1 400400

WRITE(NUVI . 1402)ABVC P1400410

124 NBS FORTRAN Test Programs Version 1
140Z F0RMAT(2X.2F8.4)

AAVC=AVC-(1 .89,6. 48)- BVC+ (0.0,9. 83) ^CVC

C*'«tttADDltlbN AND SUBtRACtibN OF 6 TERHS

ABVC=AVC-(1 .89,6.48)-BVC*(0.0,9.83)+CVC-AAVC

C * * 1

1

c * * t *

WRITE(NUVI , 1402) ABVC

tADDITION AND SUBTRACTION OF 8 TERMS

AAVC = AVC + BVC- CVC+ ( 0 . l4 . 6 . 4 5 ) - ( 4 . 5 4 , 6 . 8 5 ) + OVC+ ( 1 . 6 , 6 . 0

) -EVC

ADDITION AND SUBTRACTION OF 9 TERMS

" ABVC = AVC + BVC- CVC+ ( 0 . 34 /6 . 45 ) - ( 4 . 5 4 , 6 . 8 5 ) +OVC* ( 1 . 0 , 0 . 0

) -EVC-AAVC

WRITE (NUVI,1403) ABVC

FORMAT (2X,2F8.4//2X.35HTESf IS POSITIVE IF NUMBERS PRINtED/2X

' 117HAB0VE ARE 0.0.0.0)

* END OF TEST SEGMENT UO

* WHEN EXEClJTING ONLY SEGMENT 140, THE STOP AND END

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

PI 400420

PI 400 430

P 1 4 0 0 4 4 0 PI 40 0 4 5 0 P 1 4 0 0 4 6 0 PU 0 0 4 70

P 1 4 0 0 4 8 0 PI 400 490

PI 4 0 0 5 0 0 PI 4 0 0 5 1 0 PI 40 0 5 2 0 PI 4 0 0 5 3 0 PI 4 0 0 5 40

PU 0 0 5 5 0 P 1 4 0 0 5 6 0 P1400570

P 1 4 0 0 5 8 0 PI 40 0 5 90

P 140 CI PI 40C2

* * * P 1 4 1 0 0 1 0 PI 4 1 0020

P 1 4 1 0 0 3 0

* « *PU 1 0 0 4 0 PI 4 1 0 0 5 0 REFP1 41 0060

PI 4 1 0 0 70

PI 4 1 00 8 0 P I 4 1 0090

P1410100

PI 410110

P00 1 26 1 0 POO 1 261 5 P001 2620

P001 2625

P00 1 263 0 P001 2635

P0012640

P141A1

PI 41 A2

POO 1 264 5 P1410120

P0072270

P0072275

P0072280

P0072285

P 0 0 7 2 2 9 O' PI 41 B1 PC 0 72 29 5 PI 41 01 30

PI 41 01 4 0 P1410150

PI 41 01 60

PI 41 01 70

P 1410180

P1410190

P 1 4 1 0 2 0 O' PI 41 021 0 PI 4 1 022 0' PI 4 1 023 0 P 1 4 1 0 2 4 0 PI 4 1 02 5 0 PI 4 1 0260

PI 4 1 02 70

P 1 4 1 0 2 8 0 PI 4 1 0290

P 1 4 1 0 3 0 0 P1410310

1403

C » * * * C * 1 1 * c * « * * c * * t * c=

CARDS

c * * « * c * * * * i « » «

t

c * * * * Q * * * * c * t *

«

c * * * * c * * t * c t * * * c * * * t c * « *

«

c t * t C t « * C t * * « C t « * * c * * *

«

c=

C =

t

"* CPXMU - (i^f)

*

t

*

*

*t QQ-j^PLgX- AVC^ BVC. CVC'. bVC, EVC. FVC, GVC, HVC, IVC^ JVC

1 .AAVC, ABVC, BAVC, BBVC

COMPLEX AVC. BVC, CVC, DVC, EVC. FVC. GVC. HVC, IVC. JVC

1 .AAVC, ABVC, BAVC. BBVC

GENERAL PURPOSE

TO TEST MULTIPLICATION OF COMPLEX NUMBERS

INCLUDES OPERATIONS WITH UP TO 10 TERMS

DOES NOT TEST FOR ACCURACY

ASA

6.1

SPECIFICATIONS SEGMENT 141

WHEN EXECUTING ONLY SEGMENT 141. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

C * * * * c * * 1

1

c « « «

t

c « * «

c » « *

«

c * * *

OUTOUT TAPE ASSIGNMENT STATEMENT, NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 141, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = 6 NUVI = 6

C • « t *

C t * * * * WRITE (NUVI, 1411)

1411 FORMAT (IHi.l )(.36HCPXMU - (141) COMPLEX MULT I P L I CAT ION / / 2)(

.

114HASA REF. - 6 . 1 / / 2 X . 7H RE SU LTS / /

)

MULTIPLICATION OF TWO TERMS

AVC = (-0.5.0.86602)

BVC = (-0.5.-0.86602)

AAVC = (AVC * BVC )

BAVC = (-0.5.0.86602) * BVC

BBVC = (-0.5.0.86602)*(-0.5.-0.86602)

WRITE(NUVI.1412) AAV C . AB V C . BAV C . B B VC

MULTIPLICATION OF 3 TERMS

AVC=(0.0, 1.0)

BVC=(1 .0,0.0)

CVC=(0.0,-1 .0)

AAVC=AVCtBVC* CVC

ABVC=(0.0, 1 .0)*BVC*(0.0,-1 .0)

WRITE (NUVI ,1 412 ) AAVC, ABVC

1412 F0RMAT(2X.2F8.3)

C t « * »

NBS FORTRAN Test Programs Version 1 125
C»****HULTIPLICATION OF 4 TERMS P1410320

AVC=( 0. 3090 1 ,0 . 9 5 1 05 ) PU1 0330

BVC=(-0. 80901, 0.58778) PI 4 1 0 3 40

CVC=(-0. 80901 ,-0.58778) P1410350

30901 ,-0.95105)

86602 ) »EVC

CVC= ( -0 . 86602

DVC= ( -0 . 93969

EVC=( 0 . 3 42 02 , FVC=( 0 . 86602 ,

DVC=(0. 30901 ,-0.95105)

AAVC = AVC»BVC* CVC*DVC

ABVC=AVC* ( -0 . 80901 , 0 . 5 8 7 7 8 ) » C V C t (

0

WRITE(NUVI , 1412) AAVC.ABVC

C«**«tMULTIPLI CATION OF 5 TERMS

AVC=(0 . 5 , 0 .86602)

BVC=(- 0 . 5 , 0 .86602 ) CVC = (1 . 0 , 0 . 0 ) DVC=(- 0 . 5

, - 0 . 86602 ) EVC=(0 . 5 ,-0.86602)

AAVC = AVC* BVC* CVC*DVC*EVC

ABVC=AVC*(-0.5,0.86602)*CVC*(-0.5,-0

WRITE(NUVI ,1412) AAVC.ABVC

C*****MULTIPLICATION OF 6 TERMS

AVC = ( 0.98 48 0,0. 1 7364 ) BVC= ( -0 . 17364, 0.98480)

0.5)

-0.34202)

0.93969)

0.5)

AAVC=AVC* BVC* CVC*DVC*EVC*FVC

ABVC=AVC*(-0. 17364, 0.98480)*CVC*(-0. 93969,

1 -0.5)

WRITE(NUVI , 1412) AAVC.ABVC

C*****MULTIPLICATION OF 7 TERMS

AVC=(0. 70710, 0.70710)

BVC= ( 0 . 0 , 1 . 0

)

CVC= ( -0 . 7071 0 ,0.70710)

DVC= ( 1.0.0.0)

EVC::( - 0 . 70 7 1 0 ,- 0.70 7 1 0 ) FVC= ( 0.0,-1.0)

GVC=(0. 70710, -0.70710)

AAVC = AVC*BVC*CVC*DVC*EVC* F V C * G V C ABVC=AVC*(0.0,1.0)*CVC*( 1.0,0.0)*EVC*(0.0

WRITE(NUVI , 1412) AAVCABVC

C*t*»*MULTIPLICAT10N OF 8 TERMS

AVC=(0. 76604, 0.64278)

BVC: ( 0 . 1 7364 , 0 . 98480

)

CVC= ( -0 . 5 , 0 . 86602

)

DVC=(-0. 93969. 0.34202)

EVC: ( - 0 . 93 969.- 0.3 4202 ) FVC= ( -0 . 5

, -0.86602)

GVC= ( 0 . 1 73 6 4

, - 0 . 9 8 4 8 0 ) HVC= ( 0 . 76604 , -0.64278)

AAVC = AVC*BVC*CVC*DVC*EVC» p y C * G VC * H V C ABVC:AVC*(0. 17364,0. 98480)* CVC*DVC*(-0. 93969,-0

WRITE(NUVI , 1412) AAVCABVC

C*****MULTIPLICATION OF 9 TERMS

AVC=(0 . 80901 , 0 . 58778)

BVC=(0. 30901 ,0.95105)

CVC= ( - 0 . 9 4 8 32 , 0 . 3 1 73 0 ) :(- 0. 8 0 90 1 .0.5 8 7 78 ) = (1.0,0.0)

: ( - 0 . 8 0 90 1

, - 0 . 5 8 7 78 ) :(-0. 94832, -0.31730)

HVC=(0. 30901 ,-0.95105)

IVC=( 0. 8090 1 ,- 0.5 8 7 7 8 ) AAVC = AVC*BVC* CVC*DVC*EVC«FVC*GVC*HVC* I VC

A B V C : A V C * ( 0 . 3 0 9 0 1 , 0 . 9 5 1 0 5 ) * C V C • ( - 0 . 8 0 9 0 1 , q ; 5 g 7 7 g y , ( IGVC'HVC* IVC

WRITE(NUVI , 1412) AAVCABVC

Ct»**«MULTIPLICATION OF 10 TERMS

AVC= ( 0 . 86602 , 0 . 5

)

BVC= ( 0.5,0 .86602)

0.34202)*EVC*(0. 86602

DVC:

EVC

FVC:

GVC:

PI

PI

PI

PI

p.,PI

PIPI

PI

PIPI

PI

PI

PIPIPI

PI

PI

PI

PI

PI

p 1 PI

PIPI

PI

PI

p 1 PI

PI

PI

PIP1

PI

PIPI

PI

PI

PIPI

PI

PIPI

PI

3 4202 ) FVC*GVC*HVCP1

PI

PIPI

PIPi

PI

p 1 PI

PI

PI

PI

PI

PIPI

PI

PI

PI

PI

1 . 0 ) 'GVC

1 .0,0.0)*FVC*

410360

410370

410380

410390

410 4 0 0 410410

410 42 0 410430

410440

410450

4 1 0 46 0 410470

41 04 80

410490

410 5 0 0 410510

410520

410530

410 5 4 0 410550

4 10 5 6 0 410570

410580

410590

410600

410610

41062 0 410630

410640

410650

410660

410670

410680

410690

4 1 0 7 0 0 410710

4 1 0 72 0' 410730

4 1 0 7 4

0' 410750

410760

410770

41078 0 410790

4108 00

410810

4 10 8 2 0 410830

410840

410850

410860

410870

410880

410890

410 9 0 0 410910

4 1 092 0 410930

410940

410950

4 10960

410970

4 10980

410990

126 NBS FORTRAN Test Programs Ver on 1
CVC=(0.0. 1.0)

DVC=(-0. 5, 0.866021

EVC=( -0 . 86602 , 0.5 ) FVC=(-1 .0.0.0)

PU1 1 000

PU1 1010

PU1 1020

PU11030

Pi 41 1 040

PI 41 1 050

P 1 4 1 1 0 6 0 PI 41 1 070

PI 411080

PI 41 1 090

PI 4 1 1 100

P 1 4 1 1 1 1 0 PI 41 1 1 20

P141 1 1 30

P 141 1 1 40

P141 1 1 50

PI 41 1 1 60

PI 41 1 1 70

PI 41 11 80

PI 41 1 1 90

PI 411 200

P141 1 21 0 PI 41 1 22 0 PI 41 CI P141C2

***P1 420010

PI 42 0 0 2

0' PI 42 0 0 3 0 P1420040

* * ^Pl 42 0 0 5 0 PI 4 2 0 060

REFP 1 42 0 0 70

PI 42 0 0 8 0 PI 42 0 090

P142010 0 P0 0 1 2 6 5 0 POO 1 2 6 5 5 POO 1 2660

POO 1 2 66 5 POO 1 26 70

P0012675

PI 42A1

POO 1 268 0 P14201 1

0

POO 723 0 0 P0072305

P 0 0 72 3 1 0 P0 0 723 1 5 P0072320

P1 42B1

P 0 0 7 2 3 2 5 P1420120

P1420130

PI 42 0 1 40

P1420150

P1420160

P 1 4 2 0 1 7 0 PI 42 0 1 8 0 PI 42 0 1 9 0 P1 420200

PI 4 2 02 1 0 PI 4 2 022 0 PI 42 0 2 3 0 PI 42 02 40

P1420250

PI 42 0 260

PI 42 0 2 70

PI 42 0 2 8 0

GVC=(-0. 86602. -0.5)

HVC=(-0. 5. -0.86602)

IVC = (0.0,-1 .0)

JVC= ( 0.0,1.0)

AAVC=AVC*BVC*CVC*DVC*EVC*FVC*GVC*HVC»IVC*JVC

ABVC=AVC*(0.5,0.86602)*CVC*(-0.5,0.86602)*EVC*FVC*GVC*HVC*(0.0,

0)*JVC

WRITE(NUVI , 1412) AAVC.ABVC

1

WRITE(NUVI ,1413)

1413 FORMAT (1H0,35HTEST IS POSITIVE IF NUMBERS PRINTED/1X,

il7HAB0VE ARE 1.0,0.6)

WRITE(NUVI, 1414)

FORMAT (//39H ERROR SHOULD NOT EXCEED + OR - .001 ) END OF TEST SEGMENT 141

WHEN EXECUTING ONLY SEGMENT 141, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

I N COLUMNS i ' AND 2 REMOVED

.

STOP

END

STOP

END

CPXpy- ( 1 42 )

1414

C « * * C * * * c * * * C * «

«

c=

0 =

c * * * c * * c « * t c * * * c * * * c « *

«

c * « C * * * c * * * c « * * c * * * c * «

«

c * * * c * * *

c * * * c=

GENERAL PURPOSE

TO TEST DIVISION OF COMPLEX NUMBERS ASA

6.1

SPECIFICATIONS SEGMENT 142

WHEN EXECUTING ONLY SEGMENT 142, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

COMPLEX NUMVC,DENVC,QAVC,QBVC,QCVC,QDVC

COMPLEX NUMVC.DENVC.QAVCQBVCOCVC.QDVC

C * * * c * *

«

c * * * c * * * c « * * c * *

«

c=

* *

t *

* *

OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 142, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI

NUVI

C * 1 1 * *

1421

C * * *

C t * « *

WRITE (NUVI, 1421)

FORMAT( 1 HI , IX, 25HCPX[)V - (142) DIVISION 0F/16X,

15HC0MPLEX NUMBERS//15H ASA REF.- 6 . 1 / / 2X , 7HRESU LTS / /

)

'TEST NUMBER 1 NUMVC=(0. 36602,1 .36602)

DENVC=( 0 . 86602 , 0.5 ) QAVC=NUMVC/DENVC

OBVC = (0. 36602,1 . 3660 ) / D E N V C QCVC=NUMVC/(0. 86602, 0.5)

ODVC = ( 0 . 3 6602 , 1 . 366()2 ) 7 rb :8660 27d75

WRITE(NUVI , 1 422 ) QAVC ,.QBVC, QCVC, QOVC

TEST NUMBER 2 NUMVC=(0.0,1 .41420)

DENVC=(6.7071 0 , 0 . 7 0 71 0

') QAVC=NUMVC/DENVC

QBVC= ( 0 . 0 , 1 . 4 1 42() ) / DENVC

QCVC=NUMVC/(0. 70710, 0.70710)

NBS FORTRAN Test Programs Version 1 127
0DVC=(0.0,1.4U20)/(0. 70710. 0.70710) PU20290

kRITE(NUVI . U22) QAVC , QBVC . QCVC , ODVC P1420300

1422 F0RMAT(2X.2F8.4) PI 4203 1 0 C****tTEST NUMBER 3 PI 420320

NUMVC= ( -0 . 36602 . 1 .36602) P1420330

DENVC=(0. 5, 0.86602) P1420340

QAVC=NUMVC/DENVC P1420350

QBVC=(-0. 36602, 1.36602)/DENVC PI 420360

OCVC=NUMVC/ ( 0.5,0 . 86602

)

PI 420370

QDVC=(-0. 36602, 1.36602)/(0. 5, 0.86602) PI 420380

WRITE(NUVI,1422) QAVC, QBVC. QCVC, ODVC PI 420390

C*«t**TEST NUMBER 4 PI 420400

NUMVC=(0.73204,2.73204) PI 42041 0 DENVC= ( 1.73204,1.0) P1420420

QAVC=NUMVC/DENVC P1420430

QBVC=(0.73204,2.73204)/DENVC PI 420440

QCVC=NUMVC/ ( 1 . 73204, 1.0) P1420450

QDVC=(0. 73204, 2. 73204)/(1 . 73204, 1 .0) PI 420460

WRITE(NUVI,U22) QAVC, QBVC, QCVC, ODVC P1420470

C***** TEST NUMBER 5 P1420480

NUMVC: ( 0.0,2.82840) PI 420490

DENVC= ( 1 . 4 1 42 0 , 1 . 4 1 42 0 ) P1420500

QAVC=NUMVC/DENVC P1420510

QeVC= ( 0 . 0 , 2 . 82840 ) /DENVC P1420520

QCVC:NUMVC/(1. 41420, 1.41420) PI 420 530

QDVC=(0. 0,2. 82840)7(1.41420, 1.41420) P1420540

WRITE(NUVI,1422) QAVC, QBVC, QCVC, ODVC P1420550

WRITE(NUVI ,1423) P1420560

1 423 FORMAT ( / / 2 X . 3 5 HT E S T IS POSITIVE IF NUMBERS PRINTED/2X. P1420570

1 1 7HAB0VE ARE 1.0,1.0) P1420580

WRITE (NUVI, 1424) P1420590

1424 FORMAT (//39H ERROR SHOULD NOT EXCEED + OR - .0001 ) P1420600

Ct**** END OF TEST SEGMENT 142 P1420610

C*t«t. WHEN EXECUTING ONLY SEGMENT 142, THE STOP AND END CARDS P1420620

C*»»*» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1420630

C***t» IN COLUMNS 1 AND 2 REMOVED. PI 420640

C= STOP PI 420650

C= END PI 420660

STOP PI 42C1

END P142C2

Ct«***t**<r«*************t t** ****ir**t**t***t*****t**ttt t****tttt*t ***P1430010

c * * » «

PI 430020

C***** CPXEXC 143) PI 430 030

C * 1 1 1 * PI 430040

**t«»t«tt«tt«*Pl430050

C***** GENERAL PURPOSE PI 430060

C..t.t TO TEST EXPONENTIATION OF COMPLEX NUMBERS ASA REFP1 430070

C*«««* BY INTEGERS 6 .1 P1430080

C»»*»* EXPONENT VALUES VARY FROM 3 TO 100 PI 43 0090

c * *

«

PI 430 1 00

C«*»»* SPECIFICATIONS SEGMENT 143 PI 430 1 1 0

c « « * «

«

P0012690

C*.*.* WHEN EXECUTING ONLY SEGMENT 143, THE SPECIFICATION STATEMENTS P0012695

C***«* WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012700

C«.«*« IN COLUMNS 1 AND 2 REMOVED. P0012705

C= INTEGER AVI P0012710

tri' " conPiBX avc, 6VC. cvc.DvcEvc P6bi2715

COMPLEX AVCBVC.CVCOVC.EVC P143A1

INTEGER AVI pT4 3Ar"";: C*»*»« OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1 4301 2Q,

C t « « « * P0072330

C****» WHEN EXECUTING ONLY SEGMENT 143, THE FOLLOWING STATEMENT P0072335

C*«»»» NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072340

c * * * »

P0072345

C= NUVI = 6 P0072350

NUVI = 6 P1 43B1

c

* « * «

P0072355

WRITE (NUVI, 1431) PI 430 1 30

128 NBS FORTRAN Test Programs Version 1
1431 F0RMAT(1H1,1 X,36HCPXEX - (143) COMPLEX

1 2X. 1 1HASA.REF.6. 1 //2X,29HRESULTS BASED

EXPONENTIATION//

ON THE FUNCTION//

P 1 4 3 0 1 4 0 PI 43 0 1 5 0 2 2X,2 5H1.0 = S I N * * 2 ( X ) + COS * * 2 ( X ) / / ) C***** EXP0NENT=3

P 1 4 3 0 1 6 0 P1430170

AVC = (-0.5,0.8660254)

AVI=3

P 1 4 3 0 1 6 0 PI 4 3 0 1 9 0 BvC = Av C * * 3 CVC = (-0.5,0.8660254) ** 3

PI 4 3 0 Z 0 0 PI 43 0 21 0 DVC = (-0.5,0.8660254) ** AVI

EVC = AVC* *AVI

P 1 4 3 0 2 2 0 PI 43 0 2 3 0 WR I TE ( NUVI , 1 432 ) BVC , CVC , DVC , EVC

C****« EXP0NENT=4

P 1 4 3 0 2 4 0 PI 43 02 5 0 AVC=(0. 0,1.0)

AVI =4

P 1 4 3 0 Z 6 0 PI 4 3 02 7 0 BVC=AVC**4

CVC=(0.0, 1 .0)**4

P 1 4 3 0 2 8 0 PI 43 0 2 9 0 DVC= ( 0 . 0 , 1 . 0 ) * *AVI

EVC = AVC* *AVI

P 1 4 3 0 3 0 0 PI 43 0 3 1 0 WR I TE ( NUV I

, 1 432 ) BV C , CV C , DV C , E V

C

1432 FORMAT (2X,2F8.4)

P 1 4 3 0 3 2 0 PI 43 0 3 3 0 C* * * * « EXP0NENT = 6 AVC = ( 0.5,0.8660254)

P 1 4 3 0 3 4 0 PI 43 0 3 5 0 AV I =6

BVC = AVC* *6

P 1 4 3 0 3 6 0 PI 4 3 0 3 70

CVC = ( 0.5,0.8660254) ** 6 DVC = ( 0.5,0.8660254) «• AVI

P 1 4 3 0 3 8 0 PI 4 3 0 3 90

EVC= AVC* AVI

WRITE(NUVI , 1432) BVC , CVC , DVC , EVC

P 1 4 3 0 4 0 0 PI 4 3 0 4 1 0 C* * « * * EXP0NENT = 8 AVC = (0.7071068,0.7071068)

P 1 4 3 0 4 Z 0 PU3 0 43 0 AV I = 8 BVC = AVC« *8

P 1 4 3 0 4 4 0 PI 43 0 4 5 0 CVC = (0.7071068,0.7071068) ** 8 DVC = (0.7071068,0.7071068) ** AVI

PI 4 3 0 4 6 0 PI 4 3 0 4 70

EVC=AVC**AVI

WRITE(NUVI , 1432) BVC , CVC , DVC , EVC

P 1 4 3 0 4 8 0 PI 4 3 0 49 0 C* * * * * EXPONENT^ 1 0 AVC = (0.8090170,0.5877853)

P 1 4 3 0 5 0 0 PI 43 0 5 1 0 AV I = 1 0 BVC=AVC**10

P 1 4 3 0 5 2 0 PI 43 0 5 3 0

^*V/^* _ /A OArtAITA A COT^OC^X IA CVC = (0.8090170,0.5877853) ** 10

DVC = (0.8090170,0.5877853) ** AVI

P 1 4 3 0 5 4 0 PI 43 0 5 5 0 EVC = AVC * * AV

I

WRITE(NUVI , 1432) BVC , CVC , DVC , EVC

PI 4 3 0 5 6 0. PI 43 0 5 7 0 C*«*«*EXPONENT=20

AVC = (0.9510565,0.3090170)

ni / 7AC0A P 1 4 3 0 5 8 0 P1430590

AV I = 2 0 BVC = AVC* •20

ni/7AZAA P 1 4 3 0 6 0 0 P 1 43 0 6 1 0 P\/P » /A nCIACZC A ^ArtAITAV ^A CVC = (0.9510565,0.3090170) ** 20

DVC = (0.9510565,0.3090170) ** AVI

ni / 7A / TA

P 1 4 3 0 6 2 0 PI 4 3 0 63 0 EVC=AVC**AVI

WRITE(NUVI , 1432) BVC , CVC . DVC , EVC

P 1 4 3 0 6 4 0 PI 43 0 6 5 0 C«**** EXPONENT=40

AVC = (0.9876883,0.1564345)

P 1 430660

P1430670

AV I = 4 0 BVC = AVC* *40

PI 43 06 8 0 P1430690

CVC - (0.9876883,0.1564345) ** 40

DVC = (0.9876883,0.1564345) ** AVI

P 1 4 3 0 7 0 0 P 1 43 0 7 1 0 EVC- AVC** AVI

WRITE(NUVI , 1432) BVC , CVC , DVC , EVC

PI 43 0 72 0 PI 43 0 73 0 C**««t tXPONENT-60

AVC = (0.9945219,0.1045285)

P 1 4 3 0 7 4 0 PI 430 7 5 0 AV I = 6 0 BVC=AVC**60

PI 43 0 760

PI 43 0 7 70

P\/P /A nrt/Cltrt A -lA/CTOCX . . /A CVC - ( 0 . 99 4 5 Z 1 9 , 0 . 1 0 4 5 2 8 5 ) ** 60

DVC = (0.9945219,0.1045285) ** AVI

P 1 4 3 0 7 8 0 PI 43 0 790

EVC- AVC** AVI

WRITE(NUVI , 1432) BVC , CVC , DVC , EVC

PI 43 0 8 0 0 P1430810

NBS FORTRAN Test Programs Version 1 129
C* » « » tEXPONENT = 80 PU30820

AVI = 80 PU30830

A V C =( 6 . 99691 73 , 6.0784591 ) PI A 3 08 4 6 BVC=AVC**80 P1430850

CVC = ( 0.99691 73 , 6 . 0784591 ) ** 80 PT430 860

DVC = (0.9969173,0.0784591) ** AVI P1430870

EVC = AVC**AVI PI 43 0880

WRITE(NUV1 , 1432) BVC , CVC , DVC , EVC P1430890

C»«««» EXPONENT=100 PI 43090 0 AVC = (0.9980267,0.0627905) P1430910

AVI = 100 PI 430920

BVC=AVC*»100 P1430930

CVC = ( 0.998 026 7,0.062 790 5 ) ** l66 PT430946

DVC = (0.9980267,0.0627905) ** AVI P1430950

EVC = AVC**AVI P'l 43 096 0 WRITE(NUVI , 1 432 ) B V C . C V C , D V C , E V C P1 430970

WRITE (NUVI,1 433 ) P 1 430986

1 433 FORMAT (// 37H TEST IS POSITIVE IF NUMBERS PRINTED/2X,. P1 430990

1 26HAB0VE ARE CLOSE TO 1.0,0.0) PI 43 1 0 00

WRITE (NUVI, 1434) P1431010

U3'4 FORMAT(// 39H ERROR SHOULD NOT EXCEED + OR ' - .OOOi ) PI 43 1 020

C«**** END OF TEST SEGMENT 143 P1431030

C*'*'»** WHEN EXECUTING ONLY SEGMENT 143, THE STOP AND END CARDS P143l646

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1431050

C«**»« IN COLUMNS 1 AND 2 REMOVED. PI 43 1 0 60

C= STOP P1431070

C'= END PI 43 1 0 8 0 STOP P143C1

END P143C2

C**1l;****i*«*1t<rt***t***it*********»******ttt*t**tt***t«***tt**t*****t***t*P1440010

C* * * * * P I 440 020

C* * » * * CPXOP - (144) P1440030

C* * * » * PI 4400 40

C*****************«it***********tt**t******t*t***tt*t***t***«*«***t**t**tP1440050

C«**** GENERAL PURPOSE ASA REF PI 4 40 060

C*»*»* TO TEST ARITHMETIC OPERATIONS ON COMPLEX NUMBERS. 6.1 P1440070

C*»«*« OPERATIONS INCLUDE ALL BASIC OPERATORS ( + ,-,*,**) ACTING P 1 4 40 08 6 C***** ON COMPLEX NUMBERS P1440090

C'*'*"* * * p'l 440 1 0 0 C**«** SPECIFICATIONS SEGMENT 144 P1440110

C *'*«*» POO 1 2 730

C****» WHEN EXECUTING ONLY SEGMENT 144, THE SPECIFICATION STATEMENTS P0012735

C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012746

C***** IN COLUMNS 1 AND 2 REMOVED. P0012745

C***** POO 1 2 7 5 0 C= INTEGER AVI P0012755

C= COMPLEX AVC, BVC, CVC, DVC, EVC, FVC, GV C , HVC , PV C , RV C , SVC , tVC , UVCP 0 6 1 2 76

6

INTEGER AVI P144A1

COMPLEX AVC, BVC, CVC, DVC, EVC, F V C , G V C , H V C , P V C , R V C , S V C , T V C , U V C P 1 4 4 A2

C***** P0012765

C**»** OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1440126

C***** P0072360

C***** WHEN EXECUTING ONLY SEGMENT 144, THE FOLLOWING STATEMENT P0 0 72 365

C«*«** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072370

C***** P0072375

C= NUVI = 6 P0072380

NUVI : 6 P144B1

C»**** P0072385

WRITE (NUVI . 1441 ) P 1 440 1 30

1441 FORMAT( 1 HI , IX, 32HCPX0P - (144) COMPLEX OPERAT I ONS / / 2X , P 1 440 1 40

111HASA REF 6.1//2X,7HRESULTS//) P1440150

AVC = (0.9396926,0.3420201) P1440160

BVC = (1.2817127,0.5976725) P1440170

CVC = (0.0, 1 .4142136) P1440180

DVC : ( 0.70 7 1 068, 0.70 7 1 068 ) P 1 440 1 90

EVC = (1.0986841, 0.4550899) P1440200

AVI = 2 PI 44 02 1 0 RVC=( AVC*BVC+(0. 9396926,0. 3420201 )*BVC+AVC»( 1.281 7127, 0.5976725)- P1440220

130 NBS FORTRAN Test Programs Version 1
1 (0. 9396926,0. 3420201 )*(1. 2817127, 0.5976725) + CVC/DVC+(0.0,1.4U2136PU40230

2)/ OVC + CVC/(0. 7071068, 0.7071068)-(0.0.1.4U2136)/(0. 7071068. P1440240

3 0 . 7 0 71 0 6 8 ) + E V C * * 2 - E V C * » A V f 1 . 0 9 8 6 8 4 1 . 0 . 4 5 5 0 8 9 9 ) * * 2 +( 1 . 0 9 8 6 8 4 1 . P 1 4 4 0 2 5 0 4 0.4550899)**AVI )**2/(0.0, 72.0) P1440260

PI 4 4 0 2 70

GVC = ( 0. 433 0 1 .0.3 ) PU 4 02 8 0 HVC= ( 0 . 43 3 0 1 . 0 . 2 )

'

. ,. PI 4 4 02 90

PVC= ( 1 . 732 0 4 , 1 . 0 ) P 1 4 4 0 3 0 0 S V C = F V C / ( ( G V C + H V C ) * ( P V C * *Z) ) P 1 4 4 0 3 1 0 TVC=(0.0, 4. 0)/(((0. 43301, 0.3) + (0. 43301, 0.2))*((1. 73204, 1.0)**2)) PU40320

U V C = F V C / ( ( G V C + ( 0.4 3 3 0 1 , 0 . 2 )

) * ( P V C * * 2 ) ) P1440330

WRITE (NUVI,1442) RVC , SVC , TVC , UVC P1440340

U42 FORMAT ( 4(2X/2F'8.4/) /37H TEST IS POSITIVE IF NUMBERS PRINTED / P 1 4 40 3 5 0 12X, 17HAB0VE ARE 1.0,0.0 ) P1440360

WRITE (NUVI. 1 443 ) PI 4403 70

1443 FORMAT(// 39H ERROR SHOULD NOT EXCEED + OR - .0001 ) P1440380

C* «'*T« END OF TEST SEGMENT 144 PI 4 403 90

C*«*** WHEN EXECUTING ONLY SEGMENT 144, THE STOP AND END CARDS P1440400

C«"**"«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PU 4 0 4 1 0 C***** IN COLUMNS 1 AND 2 REMOVED. P1440420

C = STOP P 1 4 4 0 4 3 0 C= END PU4 0 4 40

STOP P 1 4 4 CI END P144C2

Ct»«*********««t*****«*****«*t****«*******«************************«*«*«Pl4500l6

C***** PI 4 5 0 02 0

C

^^.^^.^.^..^..^..^.^^..^ P 1 4 5 0 0 3 0

C * * « * » P 1 4 5 0 0 4 0 C**«*««««*««**«»«»««««t*t«******»******«****«*t*************«**«*«**«»*«pi450050

C**«t« GENERAL PURPOSE ASA REF P1450060

C**»*« TO TEST ADDITION AND SUBTRACTION OF COMPLEX 6.1 P 1 4 5 0 0 7 0 C***** AND REAL NUMBERS P1450080

C *'**"*"* P 1 4 5 0 0 9 0 C«.*.*** S P E C I F I C A T IONS SEGMENT 145 P 1 4 5 0 1 0 0

C"*"*"'*"*"* ' P 0 0 1 2 7 7 0 C***«* WHEN EXECUTING ONLY SEGMENT 145, THE SPECIFICATION STATEMENTS P0012775

C*«*«* WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012780

C*«*** IN COLUMNS 1 AND 2 REMOVED. P0012785

C * »

' "* * P 0 0 1 2 7 9 0 C= COMPLEX AVCBAVC.CAVC.DAVC.ASVC.BSVCCSVC.AAVC P0 0 1 2 79 5 C= 2 DSVC. AAAVC, ABAVC, ACAVC , ADAVC, AASVC, ABSVC. ACSVC. ADSVC PC 0 1 2 8 0 0 COMPLEX AVCBAVCCAVCDAVC.ASVC.BSVC.CSVC.AAVC P145A1

2 DSVC. AAAVC .ABAVC , ACAVC, ADAVC. AASVC, ABSVC, AC SVC. AD SVC P145A2

C**»** P0012805

C*«**"t 0 U T OUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P 1 4 5 0 1 1 0 C*»*«* P0072390

C *'*'** WHEN EXECUTING ONLY SEGMENT 145. THE FOLLOWING STATEMENT POO 72 3 9 5 C*t*** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072400

t* * *"*'* P0072405

C= NUVI = 6 P0072410

NLIVl"=

'6

'

'r,

". PI 45B1

C**«** P0072415

W R I T E ( N U V'i T4 5 0 ) P 1 4 5 0 1 2 0 1450 FORMAT( 1H1 , 1X,38HCREAD - (145) ADDITION AND SUBTRACTION/ P1450130

1 i0X,27HOF COMPLEX AND REAL NUMBERS//2X, P 1 4 5 0 1 4 0

1 12HASA REF. 6 . 1 / / 2X . 7HRESU LTS / / ) P 1 4 5 0 1 5 0 aVC=(5.4,7.5) P 1 4 5 0 1 60

AVS=4.2 P1450170

CtttTt ADDITION AND SUBTRACflON OF 2 NUMBERS P 1 4 5 0 1 8 0 AAVC=AVC-AVS P1450190

B A V C = ( 5 . 4 , 7 . 5 ) - A VS P 1 4 5 0 2 0 0 CAVC=AVC-4.2 P1450210

DAVC=(5.4.7'.5)-4^2 PI 4 5 02 2 0 ASVC=AVC+AVS P1450230

BSVC=( 5 .4,7 ;5 )+XvS PI 4 5 02 4 0 CSVC=AVC+4.2 P1450250

DSVC=(5.4.7.5)*4.2 P 1 4 5 0260

C«tt«« ADDITION AND SUBTRACTION OF 3 NUMBERS P1450270

NBS FORTRAN Test Programs Version 1 131
AAAVC=AVC-AVS-AAVC

ABAVC=(5.4,7.5)-AVS-BAVC

ACAVC=AVC-4.2-(1 .2.7.5)

ADAVC=(5.4.7.5)-4.2-(1 .2,7.5)

AASVC=AVC+AVS-ASVC

ABSVC=(5.4.7.5)+AVS-BSVC

ACSVC=AVC+4.2-(9.6.7.5)

ADSVC=(5.4.7.5)+4.2-(9.6.7.5)

WRITE(NUVI ,1451 ) ABAVC . ACAVC , AOAVC . AASVC , ABSVC , ACSVC . AOS^

1451 FORMAK 2X. 2F8.4)

C«;««t ADDITION AND SU BTRACt I ON 0

F

' 7 NUMBERS

ADSVC=AVC-(5 .4. 7. 5)+AVS-4.2+ASVC-3.2-(6.4,7.5)

WRITE(NUVI .1452) ADSVC

1452 F0RMAT(2X,2F8.4//37H TEST IS POSITIVE IF NUMBERS PRINTE0/2X,

1 17HAB0VE ARE 0.0,0.0)

***** END OF TEST SEGMENT 145

* * * * WHEN EXECUT I NG ONLY SEGMENT 145 ^ THE STOP AND END CARDS

***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= »  IN COLUMNS 1 AND 2 REMOVED.

= STOP

= END

STOP

END

«** «!**«**********************«*******************************ft*t*

PU50280

P1450290

P1450300

P1450310

Pi45b320

P1450330

P1450340

P1450350

Pi 450360

P1450370

Pi4503Sb

P1450390

P1450400

P1450410

PI 45 0420

P1450430

PI 450440

P1450450

P1450460

P1450470

P1450486

PI 45C1

P1'45C2

*P1460010

CREMU (146)

P1460020

P1460030

PI 460040

***tt************************************************t*******«*** P1460050

GENERAL PURPOSE

TO TEST MULTIPLICATION OF COMPLEX NUMBERS BY

FIEAL NUMBERS

ASA REF

6.1

P1460060

P1460070

PI 46 00 80

P1460090

P1460106

P0012810

POO 128 15

P0012820

P0012825

P0012830

P0bl2835

PI 46A1

POO 1 28 40

PI 4601 1 0 POO 72420

P0072425

P007243b

P0072435

SPECIFICATIONS SEGMENT 146

WHEN EXECUTING ONLY SEGMENT 146. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

COMPLEX AVC.BVC, MAVC , MBVC . MCVC . MDVC

COMPLEX AVC.BVC. MAVC . MBVC . M CVC . MDVC

OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 146. THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

C= NUVI = 6 P0072440

NUVI = 6 PI 46B1

c * * * * * P0072445

WRITE (NUVI. 1461) P1460120

1461 FORMAT( 1H1 . 1X.39HCREMU - (146) MULTIPLICATION OF C0MPLEX/16X. P1460130

1 7HBY REAL //2X. P1460140

2 11HASA.REF.6.1//2X.7HRESULTS//) P1460150

C*****MULTIPLI CATION OF A COMPLEX NUMBER BY A REAL NUMBER P1460160

AVC=( 1 .6.3.2) P1460170

AVS=0.625 P1460180

MAVC=AVC*AVS P1460190

MBVC=(1 .6,3.2)*AVS P1460200

MCVC=AVC«0 .625 P1460210

MDVC=(1 .6,3.2)*0.625 P1460220

WRITE (NUVI. 1463) MAVC . MBVC . MCVC . MDVC P1460230

1463 F0RMAT(4(2X.2F8.4/)//37H TEST IS POSITIVE IF NUMBERS PRINTED/ ,2X.P1460240

417HAB0VE ARE 1.0,2.0 ) P1460250

C«.***MULTIPLICATION OF 4 TERMS P1460260

AVS = 4.0 P1460270

BVS=0 .25 P1460280

AVC=(0. 93969. 0.34202) P1460290

BVC=(1 .28168.0.59764) P1460300

132 NBS FORTRAN Test Programs Version 1
MAVC=AVS«AVC*BVS*BVC

MBVC=4.0«BVS*AVC*BVC

PU603 1 0 PU60320

MCVC = 4.0*BVS*(0. 93969.0. 34202)* BVC PI 460330

MDVC = 4. 0*0. 25»(0. 93969 ,0. 34202) 1 . 28168 , 0.59 764) PU60340

WRitE (NUVi.1'462) MAVC . M8VC . MCVC , MDVC PU603 5 0 1462 F0RMAT(//4(2X,2F8.4/)//37H TEST IS POSITIVE IF NUMBERS PRINTED/ PU60360

1.0)

000 1 )

12X,17HAB0VE ARE 1 .0 WRITE (NUVI ,1464)

f464 FORMAT(// 39H ERROR SHOULD NOT EXICEED OR

C«t«»« END OF TEST SEGMENT 146

C«'«*T* WHEN EXECUTING ONLY SEGMENT 146, THE STOP AND END

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= CARDS

C * * * * * IN C= STOP

C= END

STOP

COLUMNS 1 AND REMOVED

END

P1460370

PI 460 3 2 0 PI 46 0 390

PI 460 4 00

PI 46 0 4 1 0 PI 46 0 42 0 PI 460 43 0 PI 4 6 0 4 4 0 PI 460 4 5 0 PI 46C1

P146C2

Ct*t*«***«************ji***ttt «** *****«r*****«t*t«********************p'|470010

C *'i'*' *"* P 1 4 7 0 0 2 0 C***** CREDV - (147) P1470030

C *'**"* * P 1 4 7 0 0 4 0 C«*«*t«**«»**»t««*«t««*****« «»«** ***«*********««*«*«*****«**t»**«*««P1470050

C «**** GENERAL PURPOSE AS ARE F PI 4 7 0 0 6 0 C«***« TO TEST DIVISION OF REAL (COMPLEX) NUMBERS BY 6.1 P1470070

C***«t COMPLEX (REAL) NUMBERS

C * * t * « C *** * * S P E C I F I C A T I 0 N S SE G M E N t f4 7

C * « * * * C*i*** WHEN EXE CUT I NG ONLY' SEGMENT 1 47 , THE SPEC I FTC AT I ON STATE ME NTS

C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= C***** IN COLUMNS 1 AND 2 REMOVED.

C * * * * * C = C d M P L E X A V C , 0 A V C , D B V C , D C V C . D D V C COMPLEX , M.C ^MyC.rPByC , DCVC , DDVC

c * * * * « C* * * * « p y T 0 y T T A P E ASS I GNMENT STATEMENT . NO I NPUT TAPE

.

C * t « *

«

C***** WHEN EXECUTING ONLY SEGMENT 147, THE FOLLOWING STATEMENT

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

Z* * t * * C= NUVI = 6 Nuyi = 6

c * * « *

«

WRITE (NUVI, 1471)

1471 FORMAT ( 1 HI , 1 X , 33Hi:REbV - (147) DIVISION OF COMP LE)< / 1 6X . 1 6HANb

1L NUMBERS/ /2X, 1 1 HASA REF 6 . 1 / / 2X . 7HRESU L TS / / ) CVnT*OIVISION OF REAL BY COMPLEX

AVS=2.0

AVC=(1 .0,-1.0)

DAVC=AVS/AVC

DBVC = 2 . 0/AVC '.

- DCVC = AVS/ ( 1 . 0 . -1.0)

DDVC = 2 . 0/ ( 1 . 0 , -1.0)

WRITE (NUVI, 1473) D AV C , D B V C , D C V C . DD V

C

1'473 ' FORMAT( 2X, 2F8.4)

C*«t*«DIVISION OF COMPLEX BY REAL

AVS = 2.5 463

AVC=(2.5463,2.5463)

DAVC=AVC/AVS

DBVC=(2.5463,2.5463)/AVS

DCVC = AVC/ 2 . 5 463

DDVC=(2.5463,2.5463)/2.5463

WRITE (NUVI, 1472) DAVC . DBV C . D CVC , ODVC

PI 4 70 0 8 0 PI 4 70 0 9 0 PI 4 70 1 0 0 P 0 0 1 2 8 5 0 P 0 0 1 2 8 5 5 P001 2860

P0012865

P0012870

P 0 0 1 2 8 7 5 PI 47A1

P001 2880

PI 470 1 1 0 P0072450

P0072455

P 0 0 7 2 4 6 0 P0072465

P0072470

PI 47B1

P0072475

PI 4 70 1 2 0 REAP 1 4 70 1 3 0 PU701 40

PI 4 70 1 5 0 PI 470 1 60

P 1 4 7 0 1 7 0 PI 4 70 1 8 0 PU701 90

PI 4 7 02 0 0 PU 702 1 0 PI 4 7 0 22 0 P 1 4 7 0 2 3 0 PI 4 702 4 0 PI 4 702 5 0 PI 4 702 60

P1470270

PI 4702 8 0 PI 47 02 90

PI 4 703 0 0 PI 4703 1 0

1 472 FORMAT (4(2X,2F8..4/)//37H TEST IS POSITIVE IF NUMBERS PRINTED/ P 1 4 70 32 0

1 2X, 17HAB0VE ARE 1.0,1.0)

WRITE (NUVI, 1474)

1474 FORMAT(// 39H ERROR SHOULD

C«t*«« END OF TEST SEGMENT 147

NOT EXCEED + OR 000 1 )

PI 4 70 33 0 PI 4 70 3 4 0 PI 47 03 5 0 PI 4 7036 0

NBS FORTRAN Test Programs Version 1 133
r*«««« WHEN EXECUTING ONLY SEGMENT 147 THE STOP AND END CARDS

C****» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

PI 470'^70

P1470380

r**«** IN COLUMNS 1 AND 2 REMOVED

C= STOP

PI 4 7fi <5 0 PI 470400

r= F ND STOPPI L7 {\L1 0 PI 47C1

END P147C2

£«***t**«*«i*t*ttt«tt****«*t«**t>****t*tt*****tt>**t*«t***«t***tt*t««*«ttP']4200iO

C * « * «

t

C* » * « CREOP - (148)

PI 4 8 0 020

PI 4 8 0 030

C» « • * PI 48 00 40

C«««««t«»**«*«**«««*»*****tt****«*««»»*«»*tt****t»»*tt**«*«««*t««*«t*«*«pi480050

C*»*** GENERAL PURPOSE ASA REF

C«««»« TO TEST COMBINED OPERATIONS ON COMPLEX AND REAL NUMBERS 6.1

PI 480 060

PI 480 0 70

C*tT**DIVISION OF TWO POLYNOMIALS

c * * « » PI 48 0 0 80PI 48 0 090

C.***» SPECIFICATIONS SEGMENT 148

[;«***

PI 4 8 0 1 00

P0012890

C***** WHEN EXECUTING ONLY SE GME NT 1 4 8, THE SPEC I F I CAT I 0 N STATEMENTS

C**.»* WHICH APPEAR AS COMMENTS MUST HAVE THE C=

P 0 0 1 2 8 9 5 P0012900

IN COLUMNS 1 AND 2 REMOVED.

Q * « » « t P0012905

P0 0 1 29 1 0 C= INTEGER AVI

C= COMPLEX, AVC, BVC, CVC, DVC, RVC

P0 0 1 29 1 5 P0012920

INTEGER AVI

COMPLEX AVC , BVC , CVC , DVC , RVC

PI 48A1

PI 48A2

c

* » * * » C«.»». OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P 0 0 1 2 9 2 5 P1480110

[) t * « t * C***»* WHEN EXECUTING ONLY SEGMENT 148, THE FOLLOWING STATEMENT

P0072480

P0072485

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED,

c * * * * * P0072490

P0072495

C= NUVI - 6 NUVI = 6 P0072500

PI 48B1

c « » * t * WRITE (NUVI, 1481)

P0072505

PI 4 8 0 1 20

1481 FORMAT( 1H1 , 1X,36HCRE0P - (148) OPERATIONS ON REAL A N D / 1 6X , 1 5 H COMP L P 1 4 8 0 1 3

0

1EX NUMBERS// 2X,12HASA REF. 6.1//2X, 7HRESULTS//) P1480140

AVC=(1 .0,1.0)

AVS = 1 . 0

PI 48 0 1 5 0 PI 48 0 1 60

BVS = 2.0

BVC= ( 1.0,-1.0)

PI 48 0 1 70

PI 48 0 1 80

RVC - (BVS + AVC *(1.+AVC * ( - 1 . + ( 1 . 0 , 1 . 0 ) « ( - 1 . +AVC))>)/

1 (4.0+BVC*(2.0+BVC«(-AVS+BVC*(0.5+BVC))))

P 1 4 8 0 1 9 0 PI 4 8 0200

WRITE (NUVI, 1483) RVC P1480210

1 483 FORMAT( 2 X , 2 F 8 . 4 / / 3 7 H TEST IS POSITIVE IF NUMBERS PRIP 1 48 0220

3NTE0/2X, 1 8HAB0VE ARE 2.0,-1.0//)

C* »«»* COMPLEX ARITHMETIC EXPRESSION

PI 48 0230

PI 4 8 02 40

AVC= ( 1.60,3.2)

AVS = 0 . 625

PI 4 8 0 2 5 0 PI 4 8 02 60

BVS = 2 . 0 BVC= ( 1 . 0

, - 1 . 0 )

PI 4 8 02 70

PI 4 8 02 8 0 CVS = 2 . 5 CVC= (2 . 5,2.5)

PI 48 0 290

PI 4 8 0 3 0 0 DVC = (1 . 09866 , 0.45 508)

AVI = 2

PI 4 8 0 3 1 0 PI 4 8 03 20

RVC=(AVC»AVS+(1.6,3.2)*AVS-AVC*0.625-(1.6,3.2)*0.625+BVS/BVC

1-BVS/(1.0,-1.0)+2.0/BVC+2.0/(1.0,-1.0)+CVC/CVS-(2.5,2.5)/CVS+

PI 4 8 03 30

PI 4 8 03 4 0 2CVC/2.5+(2.5,2.5)/2.5+DVC**AVI-(1.09866,0.45508)*»2+DVC**2+

3 ( 1.09866,0. 45508)** AVI)»*2/(0. 0,72.0)

PI 4 8 03 5 0 PI 4 8 0360

WRITE (NUVI, 1482) RVC

1482 F0RMAT(2X,2F8.4// 37H TEST IS POSITIVE IF NUMBERS PRINTED/2X,

P 1 4 8 0 3 7 0 PI 48 03 8 0

1 1 7HAB0VE ARE 1.0,0.0)

WRITE (NUVI, 1484)

PI 4 8 0390

PI 4 8 0 4 0 0 1484 F0RMAT(// 39H ERROR SHOULD NOT EXCEED + OR - .0001 ) C*»*** END OF TEST SEGMENT 148

PI 4 8 0 4 1 0 PI 4 8 0 42 0 C**»** WHEN EXECUTING ONLY SEGMENT 148, THE STOP AND END CARDS

C*«*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

PI 4 8 0 43 0 PI 4 8 0 4 4 0

134 NBS FORTRAN Test Programs Version 1
C««««t IN COLUMNS

C= STOP

C= END

STOP

1 AND REMOVED

END

C « * * C * * * c « * *

c * * * c * « c « * * c * * * c * * * c « * * c * * * c * * * c » «

c * * * c * * *

c « «

c

« * * C t «

c * * * c=

i:=

*** MISC3 - (149)

t «

«t GENERAL PURPOSE ASA REF

»* TO TEST EFFECT OF BLANKS WITHIN STATEMENT, 3.1.4.1

«* CONTINUATION OF STATEMENT TO MAX. NO. OF LINES.' 3.2.4,3.

** AND USE OF SPECIAL CHARACTERS TO INDICATE CONTINUATION 3.2.4

'** LINE - ** FOR BASIC INTEGERS AND REAL NUMBERS

* * ** S P E C_ I, F I C A T 10 N S SEGMENT 149

* * ** WHEN EXECUTING ONLY SEGMENT 149, THE SPECIFICATION STATEMENTS

** WHICH APPEAR AS COMMENTS MUST HAVE THE C=

*« IN COLUMNS 1 AND 2 REMOVED.

* * DIMENSION A1S(5) ,A2S(2,2)

INTEGER I 1 I (5) , 121 (2,2)

DIMENSION A1S(5) ,A2S(2,2)

INTEGER I 1 I (5) . 121 (2.2)

C * t « * » C»*«T« 0 U T 0 U T T A P E ASSIGNMENT STATEMENT. NO INPUT TAPE.

C « « * * * C « * * c « * * c * «

«

c=

** WHEN EXECUTING ONLY SEGMENT 149, THE FOLLOWING STATEMENT

* * NUVI = 6 MUST HAVE THE C= I N COLUMNS 1 AND 2 REMOVED

NUVI = 6 NUVI

C * * * * *

1 490

WRITE (NUVI, 1490)

F0RMAT(-1H1 , 1X,37HMISC3 - (149) EFFECT OF BLANKS WITHIN/16X,

122HSTMNT AND CO N T I N U AT I 0 N / 1 6X , 2 0 HO F STMNT TO 20 LINES//

239H ASA REFS. - 3.1.4.1 3.2.4.3.3 3 . 2 . 4 / / 2 X , 7 H R E S U L T S ) J A C V I = 1

I = 1 + 1 -(tZ

/

)

IA

A

a'

K... *

(

i

= 2 2I( 2 CV S

1 S (

1 )

2)

3 1.0 E -2

( 1 )

0 00 . E

- .0 3

CVI

J A

C V

I

1231

45

6

7

8

PI 4 8 0 4 5 0 PI 4 8 0 460

PI 4 8 0 4 70

PI 48C1

P148C2

•P1490010

PI 4 90 0 20

PI 490 0 3 0 PI 490 0 4 0 PI 490 0 5 0 PI 490 06 0 P1490070

3P 1 490 0 8 0 PI 490 090

P 1 4 9 0 1 0 0 PI 490 1 1 0 P 1 4 9 0 1 2 0 PI 490 1 3 0

P 0 0 1 2 9 3 0 P0 0 1 293 5 P 0 0 1 29 4 0 P0 0 1 2 9 4 5 P 0 0 1 2 9 5 0 P001 2955

P 0 0 1 2960

PI 49A1

P149A2

P0 0 1 296 5 PI 490 1 40

P 0 0 72 5 1 0 P0 0 72 5 1 5 P0072520

P0072525

P0072530

PI 49B1

P0072535

P 1 4 9 0 1 5 0 PI 49 0 1 60

P 1 490 1 70

PI 49 0 1 8 0 P 1 4 9 0 1 9 0 PI 49 0 2 0 0 P 1 4 9 0 2 1 0 PI 49 02 2 0 PI 49 02 3 0 PI 490 24 0 PI 4902 5 0 PI 49 02 6 0 PI 4902 70

PI 4902 8 0 P 1 4 9 0 2 9 0 PI 490 3 0 0 P 1 4 9 0 3 1 0 P1 490320

PI 490 33 0 PI 490 3 4 0 PI 490 3 5 0 PI 490360

PI 490 3 70

PI 490 3 8 0 PI 490 390

+ P 1 490 4 0 0 P 1 4 9 0 4 1 0 PI 490 42 0 PI 49 0 43 0 PI 49 0 4 4 0 P1490450

PI 490460

NBS FORTRAN Test Programs Version 1 135
9 1 P1490470

A > PI 490480

B 6 PU90490

C M PU90500

=

1 A

V S P1490510

PI 490 5 20

( PI 490 5 30

$ A PI 490 5 40

*

.

C V

PI 490 5 5 0 PI 490 5 60

) SPl 490570

/ + PI 490 5 80

1 A 1 PI 490 590

2 s PI 49060 0 3 (PI 4906 1 0 42) +P1 490620

5 A PI 490630

6 2 PI 490640

7

8 Z

S (

1 PI 49065 0 PI 490660

9) PI 490670

A PI 490680

B 6 0 PI 490690

U RI T E (NU VI , 1 49 1 ) KB CVI , CMA vs PI 490 700

1 491 F 0 RM A T (//I10//F11 .1// 2 X, 35HTEST IS POSITIVE IF NUMBERS PRIP1490710

1NTED/ 2 X, 1 1HAB0VE ARE 0) P1490720

c * * «END OF TEST SEGMENT 149 PI 490730

c * * «

t

* WHEN EXECUTING ONLY SEGMENT 149, THE STOP AND END CARDS PI 490 740

c » t «

«

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE 0= PI 490 75 0

c * * * t * IN COLUMNS 1 AND 2 REMOVED. PI 490760

c = STOP PI 490 7 70 c= END PI 490780

STOP PI 49C1

END PI 49C2

c * « *

«

c « « *

«

c * t »

«

c * « * * c * * *

«

c * * t

c * * * * c * * * *

c * * «

c * * «

c * « «

c * « «

c

* « « «

c * » »

»

c * * 1

1

c

1 « «

c

« « «

c * * »

c = c=

C

t * «

«

c * «

«

c * « «

»

c

* « *

c « t »

c * « «

«

**«*t«*****t*tt«**t«**t*tttttt****tt**ttttt****tt*t*tttt*t*ttt*tt*pi500010

PI 5 0 002 0 MiSU - (150 ) PI 5 0 0030

PI 5 0 0 0 4() *******« t** ttt*tt***tt**t***t*t******t«:*******t*tt*t*****tt**tpi500050

GENERAL PURPOSE ASA REF P1500060

TO TEST EFFECT OF BLANKS W I TH I N STATEMENT 3.1.4.1 Pr5 0 0 0 70

CONTINUATION OF STATEMENT TO 20 LINES, 3 . 2 . 4 . 3 . 3 P 1 5 0 0 0 8

0

AND USE OF SPECIAL CHARACTERS TO INDICATE CONTINUATION 3.2.4 P1500090

CONTINUATION LINE CAN CONTAIN FORTRAN CHARACTERS P1500100

(OTHER THAN C IN COLUMN 1) IN COLUMNS 1 THRU 5 (CLARIFICATION 3)P1500110

PI 5 0 0 1 20 SPECIFICATIONS SEGMENT150 P 1 5 0 0 1 3 0 P0012970

WHEN EXECUTING ONLY SEGMENT 150, THE SPEC I F I CAT I ON StAtEMENTS P00 1 2975

WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012980

IN COLUMNS 1 AND 2 REMOVED. P0012985

P00 1 2990

INTEGER AVI PO0 1 2995

COMPLEX AVCBVC, CVCDVCRVC P00 1 3000

INTEGER AVI P150A1

COMPLEX AVC , BVC , CVC , DVC , RVC P150A2

P0013005

OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1500140

P0072540

WHEN EXECUTING ONLY SEGMENT 150, THE FOLLOWING STATEMENT P0072545

NUVI : 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072550

P0072555

NUVI

NUVI

C « « *

»

1 500

WRITE (NUVI, 1500)

F 0 RM A T( 1 HI 1 13 HMISC4 (150)

P0072560

PI 50B1

P0072565

PI 5 00 1 5 0 P 15 00160

X,1X, 2 3 HEFFECT OF BLANKS WITHIN 16X. 22HSTMNT AND CONP 1 5 00 1 70

136 MBS FORTRAN Test Programs Version 1
YTINUATION/ 16X, 20HOF STMNT TO 20 LINES//

I39H ASA REFS. -3.1.4.1 3.2.4.3.3 3 . 2 . 4/ /2X, 7HRESULTS/ /

>

AVC = (1 .0 .1 .6)

AVS = 1 . 0 B V S = 2 . 6 BVC= (1 .0 1 .0)

RVC = T. 0 (B VS +A

) * ( C* ( 1 . +A VC

0+ A

* ( V

1 .+

C )

(

1

) ) 0,/ ( U4 .0 V(

WV C RVC

BV

)

(2 V C0 +

* ( 0 BVC

5

) ) RV +(-2.0, + 1 0) uv I 1502

C * * * t c « * * *

1 503

VC = 1 .

W RI T E (N

FORHAT( 2X, 2F8.4)

COMPLEX ARITHMETIC EXPRESSION

* STATEMENT LABEL NOT REFERENCED

1 5 02 VC

3.4

A

+ V-C

PIPI

PIPI

PI

PI

PI

PI

PI

PIPI

PI

PI

PI

PI

PI

PI

P1

PI

PI

PIPI

PI

PI

PI

PI

PIPI pi

PIPI

P1 pi

PI

PI

PIPI

PI

PI

PIPI

PI

PI

PI

PI

PIPI

PI

PI

PI

PI

P1

PI

PI

PI

PI

PI

PI

PI

PI

PI

P 1 Pi

PI

P1

PI

PI

PI

500180

500190

500Z00

500210

500220

500230

500Z40

500250

500260

500270

500280

500290

500300

5003 10

500320

500330

500340

500350

500360

500370

5 0 0 3 8 0 500390

5 0 0 4 0 0 500410

5 00420

500430

5 0 0 4 4 0 500450

5 0 0 4 6 0 500470

500480

500490

5 0 0 5 0 0 500510

5 0 0 5 2 0 500530

500540

500550

5 0 0 5 6 0 500570

5 0 0 5 8 0 500590

500600

500610

500620

500630

5 0 0 6 4

0' 500650

500660

500670

500680

500690

5 0 0 7 0 0 500710

500720

500730

5 00740

500750

500760

500770

500780

500790

5 0 0 8 0 0 500810

5 0 0 8 2 0

5 0 0 8 3 0 500840

500850

/

( 1

) . .6

.0

I . J3

K.

C * « * * t

L2

M ) CONTINUE STATE ME NT WltH NO LABEL

CONTINUE

3 . 4

AVS

BVS

BVC

CVS

0.625

2.0

( 1 . 0 . - 1 . 6 ) 2.5

CVC

DVC

AVI

RVC

(2

(

1

2

5.2.5)

0986841 0.4550899)

B(AVC«AVS

C+(1 .6,3.2)

D«AVS-AVC

E*0.625

F-(1 .6,3.2)

G*0.625

H+ BVS /BVC

I-BVS/(1 .0,-1 .0)

J+2.0/BVC+2.0/

K(1 .0,-1 .0)+CVC/CVS

L-(2.5.2.5)/CVS+CVC/2.5

M+(2.5.2.5)/2.5+DVC**AVI

N-(1 .0986841 .0.4550899)«*2

0 + DVC* *2

P + 0(1 .0986841 ,0.4550899)

R* *AVI ) S**2/(0. 0.72.0)

f - ( i . 0 .

6

W R IT

0)

E ( N U V I 1 5 0 1 ) R

2X

15 01 FORM AT(/ II X . 2 F 8 1501 II I Z 7H TEST IS POSITIVE IF NUMBERS PRINTED/

=, 1 7 HABOVE ARE 0.0,0.0 ) Ct»«*« END OF TEST SEGMENT 150

C t « » * * WHEN EXECUTING ONLY SEGMENT 15 0^ THE STOP AND END CAFtDS Ct«*«« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C;: tttttt IN COLUMNS 1 AND 2 REMOVED.

C= STOP

NBS FORTRAN Test Programs Version 1 137
C= END P1500860

STOP P150C1

C««»*«**»*»****t*tt«t«t*«*«««*«««*»«t«»««««**tt«**t««t*«*««**«t«*tt****tPl600010

C *'*»«* P 1"6 0

0'02 0

C,».*.*.* * B R F ,C P

- (16 0,) P 1 6 0 0 0 3 0

C * * * * * PI 6 0 0 0 4 0

C« * * * GENERAL PURPOSE ASA'' REFP'l 6 00 0'6 0 C*»*»* 1.T0 TEST REAL FUNCTIONS 8 . 3 . 1 P 1 6 0 0 0 70

C«*««* 2. DUMMY ARGUMENTS ARE REAL OR INTEGER VAR^^^^ P1 60008'6

C***** ARRAY NAMES P1600090

C

*

'* *"*" 3

.

' F U N C't I 0 N S C 0 N T A I N U P 't 0

'2 0 A R G U M E

N

T'S PI 6'0 0

"l "O "O Ct*«*t 4. IN REFERENCE. ACTUAL ARGUMENTS ARE VARIABLE NAME,. P1 600 1 1 0 C***** ARRAY NAME. ARRAY ELEMENT NAME, OR AN ARITHMETIC pT60 0 1 20

C***** EXPRESSION 8.3.2P1600130

•'C***** RESTRICTIONS OBSERVED P160'0l'4'0 C***** 1 . ITEMS(2) , (3) . (4) . (5) . (6) OF PARAGRAPH 8.3.1 P 1 600 1 5 0 C***** 2. LAST SENTENCE OF PARAGRAPH 3.2 pT600T60'

C**«** THIS SEGMENT IS TO BE RUN WITH SEGMENTS P1600170

C**«*« 400. 420, 430, 440, 450, 460 WHrCH PI 60 0 1 80

C**«** CONTAINS ALL FUNCTIONS BEING TESTED HERE. P1600190

C * * *

"* p 16 0 0 2 0 0 Ct*«** S PECIFICATIONS SEGMENT 160 P1600210

C***** POO 130 10

C***** WHEN EXECUTING ONLY SEGMENT 160, THE SPECIFICATION STATEMENTS P0013015

C***t« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PO0 1 3020'

C » IN COLUMNS 1 AND 2 REMOVED. P0013025

C** «** POO 1 3 03 0 C= DIMENSION A1S(5) ,A2S(2,2) P0013035

DIMENSION A1S(5),A2S(2,2) p'l60A1

C* * * * * POO 1 3040

C» * * * * OUT P U T T A P E ASS I GNMENT STATEMENT NO j p^'f' jaPE'. P 1 60022d

C**»*« WHEN EXECUTING ONLY SEGMENT 160, THE FOLLOWING STATEMENT P0072570

C*t*** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072575

C* * * * * P0 0 72 5 80

C= NUVI = 6 PO O 72 5 8 5 NUVI = 6 P160B1

WRITE(NUVI ,1 60 4 ) P1 60023'0

1604 FORMAT( 1H1 . 1X,37HBRFCP - (160) REAL EXTERNAL FUNCTIONS/ P1600240

1 /2X, 16HASA REF . - 8.3.1//28H RESULTS SHOULD BE POSITIVE) Pi6002 50

IAVI=2 P1600260

A1 S( 1 )='l'.'() PI 60 0 2 7() A1S(2)=1.0 P1600280

A2S(2,2) = 1 .0 P 1 60029()

A2S(2,1)=1.0 P1600300

AVS=1.0 PI 6003 1 0 BVS=2.0 P1600320

CVS=1 . 0 PI 600330

DVS=1.0 P1600340

EVS=1.0 Pi 60 0.3 5 0 IVI=AFS(2.0)-8.0 P1600360

MAVI = 1 P 1 60 03 7() ^ IF(IVI)1600, 1601 ,1600 P1600380

"l"6'0 5 IVI = BFS(2.0,BVS)-4.0 PI 600390

MAVI=2 P1600400

I F ( I V I) 1 6 0 0 , 1 6 0 i , "i 6'()'0 P 1 6 0 0 4 1() 1606 IVI CFS(2)-16.0 P1600420

MAV P 1 60 0430

IF .V 1600.1601.1600 P1600440

'l'6'b7 .=DFS(2, lAVI )-1 .0 PI 60045 0 .aVI=4 P1600460

I F( IVI ) 1 60 0, 1 60 1 . 1 600 PI 600 470

160 IVI=EFS(A1S)-2.0 P1600480

MAVI = 5 P 1 60 0490

I F(I VI ) 1 600 . 1 60 1 . 1 600 P 1 60 0 5 00 "

"i 6"69 1 V I = F F S ( I AV I , AVS , + 2 , - 1 ;q ^ g -|^yy-j.y5 , a 1 S . 1 . 0 , I AV I , A 1 S , A 1 S . B VS , DVS P 1 6 0 0 5 1 0

1 ,A1S(1 ) ,A2S,A2S,A2S,EVS+1 .0, IAVI-1 ) + 1.0 P1600520

138 NBS FORTRAN Test Programs Version 1
HAVI=6

IF(IVI) 1600,1601,1600

P1600530

PI 600 5 40

1600 WRITE (NUV! , 1602)MAVI

GO TO 7001

P1600550

PI 60 0 5 60

1601 WRITE (NUVI . 1603)MAVI

1602 FORMAT (//2X,5HTEST ,I1,12H IS NEGATIVE)

PI 60 0 5 70

PI 60 0 5 80

1603 FORMAT (//2X,5HTEST ,I1.12H IS POSITIVE)

7001 GO TO (1605.1606,1607,1608,1609,7000 ),MAVI

PI 600 5 90

P1 600600

7000 CONTINUE

C««»*t END OF TEST SEGMENT 160

PI 6 0 06 1 0 PI 6 0 062 0 C*»««* WHEN EXECUTING ONLY SEGMENT 160. THE STOP AND

C»*«** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= END CARDS

I N P1600630

PI 6 0 064 0 C««««t COLUMNS 1 AND 2 REMOVED.

C= STOP

PI 6 0 06 5 0 PI 6 0 066 0 C= END

STOP

PI 60 06 70

P160C1

END PI 60C2

c « « * t * C****t AFS - (400)

P4000020

P4000030

C « « * 1

1

* *

* P4000040

C***»*REAL FUNCTION OF REAL ARGUMENT (TEST 1)

FUNCTION AFS(AWVS)

P4000060

P4000070

AFS=4.0*AWVS

RETURN

P4000080

P4000090

END P40 00 1 0 0

c * « « t * C*ttt* BFS - (420)

P4200020

P4200030

C* t * t * P4200040

C«ttt*REAL FUNCTION OF REAL ARGUMENTS (TEST 2)

FUNCTION 8FS(AWVS. BWVS)

P4200060

P4200070

BFS=AWVS>BWVS

RETURN

P4200080

P4200090

END P4200100

Cttttt*««««tt«»*t«*t»«*tt***»***tt*«»t**««*«t*«***««*«tt*****«*'**t«*t*««P4300010

C t * * * * C**««t CFS - (430)

P4300020

P4300030

c * * * « « ttttttntttt

P4300040

*«*««P4300050

C«****REAL FUNCTION OF INTEGER ARGUMENT (TEST 3)

FUNCTION CFS(IWVI)

P4300060

P4300070

CFS=4.0«*IWVI

RETURN

P4300080

P4300090

END P43001 00

C * * 1 1

1

C*»**» DFS - (440)

P4400020

P4400030

C * 1 1 1

»

P4400040

C*««»*REAL FUNCTION OF INTEGER ARGUMENTS (TEST 4)

FUNCTION DFS( IWVI , JWVI

)

P4400060

P4400070

KVI = IWVI - JWVI

DFS=4.6*«KVI

P4400080

P4400090

RETURN

END

P44001 00

P4400 1 1 0

c * * * t * P4500020

C***»* EFS - (450)

C * * t * t P4500030P4500040

Ct*ttt*t*tt**t*t*t*tt*tt**«tt*t*tttt**t*tt*t***t*tt*t**«

CtttttREAL FUNCTION OF ARRAY NAMEdEST 5)

»t»*«P4500050

P4500060

FUNCTION EFS(AWIS)

DIMENSION AW1S(2)

P4500070

P4500080

EF3=AW1S(1 )*AW1S(2)

RETURN

P4500090

P4500100

NBS FORTRAN Test Programs Version 1 139
END P4500110

C**t*****tttt*ttt*«»*«ttttttttt**ttt*«t*t*ttt«tttt«ttt*tt**ttt*tt**«ttttP4600010

C * * * *

*

' P460002'0

C * * * *

» F FS z (.16 0 > ; P4600030

C*'**"*"* P460'0040

C«***««**«**»t*t*t**«t«**t*«*«»«««**t*t«»*t»tt«ttt*tt«t»««t««t«««tt«itt«P4600050

C* ;'t » « REAL FUN CtTON OF o i p F^RENT TYPES OF ARGUME NTS ( TEST 6) P4600 060

FUNCTION FFS( IWVI ,AWVS, JWVI ,BWVS,AW1S,KWVI , CWVS , BW 1 S, OMVS , LWV I , P4600 0 70

1 CW 1 S . DW 1 S , EWVS , FWVS , GWVS , BW2S , CW2S , DW2S , HWVS , MWV 1) P46 00 680

DIMENSION AW1S(2) ,BW1S(2), CW 1 S ( 2 ) , DW 1 S ( 2 ) , BW2S ( 2 , 2 ) CW2S ( 2 , 2 ) P 4600 090

1DW2S(2,2) P46W100

FFS = AWVS* * IWVI-BWVS** JWVI AWI S( 1

) - CWVS * * K WV I + BW 1 S ( 2

) -OWVS + CW 1 S ( 1 ) P4600 1 1 0

1 **LWVI+DW1S(1)-EWVS + FWVS-GWVS + BW2S(2,1)-CW 2 S (2 , 2 ) DW2S ( 2 .2 ) -HWVS » * P4600 1 20

2MWVI P4600130

RETURN

...END

t«

^.^..^.^.^..-.^

*

* GENERAL PURPOSE ASA

* 1-TO TEST INTEGER FUNCTIONS T.

« 2-DUMMY ARGUMENTS ARE REAL OR INTEGER VARIABLES OR

* ARRAY NAMES 'sT

* 3-FUNCTIONS CONTAIN UP TO 20 ARGUMENTS

* 4-IN REFERENCE .ACTUAL ARGUMENTS ARE VARIABLE NAME,'

« ARRAY NAME, ARRAY ELEMENT NAME, OR AN ARITHMETIC

* "EXPRESSION 87

*RESTRI CTIONS OBSERVED

« 1-ITEMS (2), (3), (4). (5). (6) OF PARAGRAPH 8.3.1

"

t 2-LAST SENTENCE OF PARAGRAPH 3.2 *

THIS SEGMENT IS TO BE RUN WITH SEGMENTS

« 401, 421. 431. 441. 451. 461 WHICH

« CONTAINS ALL FUNCTIONS BEING TESTED HERE.'

P4600140

P4600 1 50

»**P1610(jlb

P1610020

Pi6i6d36

P1610040

»**p'i6i6b50

REFP1610060

3.iPi6i6676

P1610080

3 . 1 P 1 6 1 0 0 9 0 P1610100

Pi 610110

P1610120

3.2P1610136

P1610140

P 1 6 1 0 i 5 6 P1610160

PI 61 01 7 0 P1610180

P1610190

P1610200

PI 61 02 10

P0013050

P0013055

P0013060

P0013065

P0013070

P0013075

P0013080

PI 61 A1

P161A2

POO 1 30 85

P1610220

P0072590

P0072595

P0072600

P0072605

P0072610

P161B1

P0b7261 5 P1610230

P1610240

P1610250

P1610260

P1610270

P1610280

P1610290

P161030b

P1610310

PI 61 0320

P1610330

Pi 61 0340

P1610350

C t » « « C t « «

«

c « * t * c * * * « C t * * * c * * * * c * * « » c * * «

c « » «

t

c * « * * c * « « * c * * * * C t * * * c * * * * C * * * t c * * »

»

c * « * * C « 1 1

1

c « * * * C t « * t c « « * * c * « 1

1

C t * t * c * * * t c « * * t C t * «

t

SPECIFICATIONS SEGMENT 161

WHEN EXECUTING ONLY SEGMENT 161. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

DIMENSION A1S(5)

INTEGER 111(5)

DIMENSION A1S(5)

INTEGER 111(5)

C « « *

«

C * « * t C * t * t C « t « » C 1 1 1 * C t « « »

« 0 U T P L) T TAP E ASSIGNMENT STATEMENT. NO INPUT .TAPE

t« WHEN EXECUTING ONLY SEGMENT 161, THE STATEMENT NUVI = 6

* MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C = NUVI = 6 NUVI = 6

C * * * * t WRITE(NUVI ,1614)

1614 FORMATdHI .1X.40HBIFCP - (161) INTEGER EXTERNAL FUNCTIONS/

1 16X,26HWITH INTEGER AND REAL ARGS / / 2X 1 6HASA REF. - 8.3.1//

228H RESULTS SHOULD BE POSITIVE)

IAVI=2

A 1 S ( 1 ) = 1 . 0 A1S(2)=1 .0 I1I(1)=1

1 1 I(2) = 1 AVS = 1 .0 BVS=2.0

CVS = 1 .0 DVS = 1 .0

140 NBS FORTRAN Test Programs Version 1
EVS=1 .0 IVI=IAFI (2.0) - 8 MAVI=1

IF ( I V I ) 1610,1611,1610

UTS IVjsIBFi (2.6,BVS)-4

MAVI=2

IF (IVi) i6"iO. 161 i , 1610

1616 IVI = ICFI (2) - 16

MAVI=3

IF ( IVI ) 1610,1611.1610

1617 IVI = IOFI (2. lAVI )-i

MAVI=4

IF (IVI) 1610,1611,1610

1618 IVI=IEFI(I1I)-2

MAVI =5

IF ( IVi ) 1610,1611.1610

T619 IVI=I FFI ( lAVI , AVS, 2, -1 .0. A1S. lAVi . CVS. A1S, i .0. lAVI , A1S.A1S. BVS.

1DVS,A1S( 1 ) .A1S,A1S,A1S,EVS + 1 .0, IAVI-1 ) + 1 MAVI =6

IF(IVI) 1610.1611.1610

'UIO WRITECNUVI . 1612)MAVI

GO TO 7002

"UTI WRITE(NUVI . 161 3) MAVI

1612 FORMAT (//2X.5HTEST ,I1,12H IS NEGATIVE)

1613 FORMAT (//2X,5HTEST ,I1,12H IS POSITIVE)

7002 GO TO ( 1 61 5 , 1 6 1 6 , 1 6 1 7, 1 6 1 8 , 1 6 1 9 . 7003 ) , MAVI

7003 CONTINUE

C««*«* END OF TEST SEGMENT 161

C:«**«* WHEN EXECUTING ONLY SEGMENT 161. THE StOP' AND END CARDS

C**»** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C'**'*'** IN COLUMNS 1 AND I REMOVED.

C= STOP

C= END

STOP

END

* t t * t t M * * * * t t t t t t t -k t t t * * * t t t t t -k t t % t t * H t % t t t * It t * t * * * t t * t t * t * * t * t * * * * t * t c * * * * * C.**,*,».* I.AF I - (401.)

C * * * * * ^* * t t t * t * t * * t t * i t * % t t * t t -t * * t k t * * t * t t t * t t * t t t t t t * t * t * t * t t t t t t * t * * t * t t * * t t

(:« » « * » I NTEGER FUNCTION OF REAL ARGUMENT (TEST 1 ) FUNCTION lAFKAWVS)

IAFI=4.0*AWVS

RETURN

END

* * t * * * k t t * t t * * t * t M * t t % t t t t * M * t * t *********** * * * * * **********************

c « * * « « C*«t** IBFI - (421 ) c * * * «

t t t * t t t * t k * t t t * t -k t t t * t * % * t t t t * t t *********** * * * * * **********************

C*****INTEGER FUNCTION OF TWO REAL ARGUMENTS (TEST 2)

FUNCTION IBFI (AWVS, BWVS)

IBFI=AWVS+BWVS

RETURN

END

Cot******************************* *********** * * * * * **********************

c * * * * * C***** ICFI - (431 ) c * * * * * c********************************* *********** * * * * * **********************

C*****INTEGER FUNCTION OF INTEGER ARGUMENT ( TEST 3)

FUNCTION I CFI ( IWVI

)

I CFI =4.0** IWVI

RETURN

END

C***********************************************************************

c * * * * * C***** IDF I - (441)

P1610360

PI 6 1 0370

P 1 6 1 0 3 8 0 P161 0390

P 1 6 1 0 4 0 0 P1610410

P 1 6 1 0 4 2 0 PI 6 1 0 430

PI 6 1 0 4 40

PI 6 1 0 4 5 0 PI 61 0460

PI 6 1 0 4 70

P 1 6 1 0 4 8 0 PI 6 1 0490

PI 6 1 0 5 00

P1610510

P1610520

P1610530

P1610540

P1610550

P 1 6 1 0 5 6 0 PI 6 1 0 5 70

P 1 6 1 0 5 8 0 PI 6 1 0 5 90

P 1 6 1 0 6 0 0 PI 61 061 0 P 1 6 1 0 6 2 0 P1610630

PI 6 1 0640

PI 6 1 0 6 5 0 P1610660

P1610670

PI 6 1 0680

PI 61 CI PI 61 C2

P4 0 1 0 0 1 0 P 4 0 1 0 0 2 0 P40 1 0 03 0 P 4 0 1 0 0 4 0 P401 0050

P 4 0 1 0 0 6 0

P 40 1 0 0 70

P 4 0 1 0 0 8 0 P40 1 0090

P 4 0 1 0 1 0 0 P421 001

0

P42 1 0 020

P421 0030

P 4 2 1 0 0 4 O' P 42 1 0 0 5 0 P 42 1 0 060

P 42 1 00 70

P421 0080

P42 1 0090

P 4 2 1 0 1 0 0 P4310010

P 4 3 1 0 0 2 0 P43 1 0030

P4310040

P4310050

P 43 1 0 0 60

P431 0070

P 4 3 1 0 0 8 0 P431 0090

P431 01 00

P4410010

P 4 4 1 0 0 2 0 P4410030

NBS FORTRAN Test Programs Version 1 141
C*»*»* P4410040

C» * » » . I NTEGER FUNCTION OF INTEGER ARGUMENTS ( TEST 4 ) P4 4 1 0060

INTEGER FUNCTION IDFI (IWVI, JWVI) P4410070

REAL KUVS P44 1 0080

IDFI = IWVI - JWVI P4410090

IDFI = KUVS ** IDFI P4410i0 0 RETURN P4410110

DATA KUVS / 4. 6/ " " P4 41012 0

E N D P4410130

C*titi)«t***t«*tt«**t**t««**t*t*tr»***t t** *t****t****************t*****P4510010

C***** P4510020

C«'  lEFI - (45 1) P4 5 1 0030

C.** ,*** P4 5 1 0 040

Cii*t**»***it**«*«*****tt*<t*********************««*t***t**«******«*tt*t***P45l 0 05 0 C* * * * • I NTEGER FUNCTION OF ARRAY NAME (TEST 5) P45 1 0 060

FUNCTION lEFI ( IAW1 I ) P45 1 0 0 70

DIMENSION lAWIKZ) P45 1 0080

IEFI = IAW1 I ( 1 ) + IAW1 I (2) P4 5'1 0 090

RETURN P4510100

END P4510110

Ct*****«******«:«t:*tt*******«**********t*«***tt********t**ttt*******t P4610010

C** *** P46 1 002 0 C***** IFFI - (461) P4610030

C * * « * * P46T00 40

Cii«**««***«»«t«««*»««*«iit*«««***««tt*******t*t**t*«*«t*****«»*«*t«««''***tP4610050

C***** INTEGER FUNCTION OF DIFFERENT TYPES OF ARGUMENTS(TEST 6) P46 1 0060

FUNCTION IFFKIWVI , AWVS , J W V I , B WVS , AW 1 S , K W V I , C WVS , B W 1 S , D WVS , L WV I P46 1 00 70

1CW1S,DW1S,EWVS,FWVS,GWVS.EW1S,GW1S,HW1S,HWVS,MWVI) P4610080

DIMENSION AW1S(2),BW1S(2),CW1S(2),DW1S(2),EW1S(5), GW1S(5). P4610090

1 HW1S(5) P4610100

IFFI=AWVS**1WVI-8WVS*«JWVI+AW1S(1)-CWVS«*KWVI+BW1S(2)-DWVS+CW1S(1)P4610110

1«*LWVI+DW1S(1 )-EWVS + FWVS-GWVS + EW1S(l ) -GW1S(2) +HW1S(2) - H W VS * * P 4 6 1 0 1 2

0

2MWVI P4610130

RETURN P4610140

END P 461 01 50

C<t**t«r*1tt«r****tit***1t**tl;*t**«******<rt «** ***tt««:«**********«*t*******ttP1620010

C***** P1620020

C* * * * * FRF CP - (162) PI 620030

C**\* * PI 620 0 40

C«t*t****««*«««**»««»*«*t**«**««**«****«««t*»«»*«*****«*««**«««*t*«*«*t»pi620050

C***** GENERAL PURPOSE ASA REF P1620060

C**»** i.TO TEST REAL FUNCTIONS IN FULL FORTRAN P 1 62 00 70

C***** 2. THIS SEGMENT COMPLETES SEGMENT (160) IN ORDER TO TEST P 1 62 00 8 0 C***.* FOR ALL FEATURES REQUIRED IN FULL FORTRAN 8 '. 3 . 1 P 1 6 2 0 0 9 0 C»«*** 3. DUMMY ARGUMENTS CAN BE I N T E G E R ( T E S T E D IN 1 60 ), REAL ( TESTED IN P 1 62 0 1 00

C**««* 160), ARRAY NAME(TESTED IN 160), DOUBLE PRE C I S I ON , COMPLEX , P 1 620 1 1 0 C***** LOGICAL OR EXTERNAL PROCEDURE 8 . 3 . 1 P 1 6 2 0 1 2

0

C****» 4. DUMMY ARGUMENTS MAY BE REDEFINED IN S U B P R 0 G R AM ( I T E M 4 ) 8 . 3

.' 1 P 1 62 0 1 3 0 C*«*** 5. IN REFERENCE, ACTUAL ARGUMENTS MAY BE AS IN (160) AND P 1 62 0 1 40

C***** BESIDES EXTERNAL PROCEDURE. IN THIS CASE, EXTERNAL 8 . 3 . 2 P 1 6 2 0 1 5 0 C.*.»* PROCEDURE IS REFERENCED BY AN EXTERNAL STATEMENT P1620160

C***.* 6. USE CAN BE MADE OF ADJUSTABLE DIMENSION P 1 62 0 1 70

C*.»*. RESTRICTIONS OBSERVED P 1 62 0 1 8 0 C«**«* 1. ITEMS (1), (2), (3), (5) OF 8.3.1 P 1 620 1 90

C»»*«* 2. PARAGRAPH 8.3.2, LINE 18 TO END OF PARAGRAPH P1620200

C*»**« THIS SEGMENT USES 5 REAL FUNCTIONS P 1 6202 1 0 C*'*«« THIS SEGMENT IS TO BE RUN WITH SEGMENTS P1620220

C***** 402, 422, 432, 442, 452 WHICH PI 62 023 0 C**««* WHICH CONTAINS ALL FUNCTIONS BEING TESTED HERE P1620240

C * * * * P 1 6 2 0 2 5 0 C***** SPECIFICATIONS SEGMENT 162 P1620260

C* » * * P0 0 1 3090

C****» WHEN EXECUTING ONLY SEGMENT 162, THE SPECIFICATION STATEMENTS P0013095

C**»*« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0013100

C»**** IN COLUMNS 1 AND 2 REMOVED. P0013105

c * « * » ! P 0 0 1 3 1 1 0 C= DIMENSION A1S(5) ,A2S(2,2) ,A3S(3,3,3) P0013115

NBS FORTRAN Test Programs Version 1
C= INTEGER 1 1 I ( 5 ) , 12 I (2 . 2 ) , 13 I (2 . 2 . 2) P001 31 20

C= REAL JRFS.IRFS P001 31 25

C= LOGICAL A1B(2) ,A2B(2.2) ,A3B(2.2.2) .AVB.BVB P0013130

C= DOUBLE PRECISION AVD , A 1 D ( 4 ) , A2 D ( 2 . 2 ) . A3 D ( 2 , 2 , 2 ) P0013135

C= COMPLEX AVC.BVC.A1C(12),A2C(2,2),A3C(2.2.1) POO 1 3 1 40

C= COMMON AXVS , CXVS P0013145

C= EXTERNAL GFS P00131 50

DIMENSION A1S(5),A2S(2,2).A3S(3,3.3) PI 62A1

INTEGER 111(5). 121(2,2), 131(2,2,2) PI 62A2

REAL JRFS.IRFS PI 62A3

LOGICAL A1B(2).A2B(2.2),A3B(2,2,2) , AVB , BVB PI 62A4

DOUBLE PRECISION AVD . A 1 D ( 4 ) , A2 D ( 2 , 2 )

, A3 D ( 2 . 2 , 2

)

P 1 62A5

COMPLEX AVC,BVC,A1C(12),A2C(2,2),A3C(2,2.1) P 1 62A6

COMMON AXVS. CXVS PI 62A7

EXTERNAL GFS P162A8

c * * * t * P0013155

C««**« OUTPUT TAPE ASSIGNMENT STATEMENT. NO I NPUT TAPE . P1620270

c * « * «

P0072620

C*«*«* WHEN EXECUTING ONLY SEGMENT 162. THE STATEMENT NUVI :: 6 P0072625

C«***« MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072630

c « * * * P0072635

C= NUVI =6 P0072640

NUVI = 6 PI 62B1

c « * * «

t

P0072645

WRITE (NUVI, 1624) P 1 6 2 02 8 0

1 624 FORMATdHI ,1X,33HFRFCP - (162) REAL FUNCTIONS W I TH / 1 OX , 3 1 H L 0 G I C AL , PI 62 0 290

1 D.P.. AND COMPLEX ARGS//16H ASA REF. 8.3.1// PI 6 2 0 3 0 0 228H RESULTS SHOULD BE POSITIVE) P1620310

C* * * * *TEST 1 PI 62 0 3 2 0 AVD = 1 . ODO PI 62 03 3 0 MAVI = 1 PI 62 0 3 40 IVI = I.O-GFS(AVD) PI 62 0 3 5 0 IF ( IVI ) 1 620 . 1 62 1 .1 620 PI 62 0 3 60

C* * t *TEST 2 PI 62 0 3 70

1625 MAVI =2 PI 62 0 3 8 0 AVC = (1.0,-1.0) P1620390

BVC = (1 .0,1 .0) PI 62 0 40 0 IVI = HFS(AVC,BVC) PI 62 0 4 1 0 IF (IVI) 1 620,1 62 1 , 1 620 PI 62 0 42 0 C* « t « «TEST 3 P1620430

1626 MAVI=3 PI 62 0 4 4 0 AVB = .TRUE. PI 62 0 4 5 0 IVI = IRFS(AVB)«2.0 P1620460

AVB = .FALSE. P1620470

JVI = IRFS(AVB)«4.0 PI 62 0 4 8 0 LVI = IVI + JVI - 4 PI 62 0 49 0 IF (LVI) 1620,1621 ,1620 PI 62 0 5 0 0 Ct««««TEST 4 PI 62 0 5 1 0 1627 MAVI=4 P1620520

IVI = JRFS(AVD,GFS) P1620530

IF ( IVI-1 ) 1 620, 1 621 , 1 620 PI 62 0 5 4 0 C*****TEST 5,6.7 P1620550

1628 AXVS = 1.0 P1620560

AVS = 1.0 P1620570

AlSd ) = 1.0 P1620580

A2S(1 , 1 ) = 1.0 PI 62 0 5 90

A3S(1 . 1 , 1 ) = 1.0 P1620600

AVB = .FALSE. P 1 62 06 1 0 A1B(1) = .FALSE. P1620620

A2B(1.1) = .FALSE. PI 62 0 63 0 A3B(i.i,i) = .FALSE. PI 620640

lAVI = 1 PI 62 0 6 5 0 111(1) = 1 PI 62 0 660

121(1,1) =1 PI 62 0670

131(1,1,1) =1 P1620680

A1 C( 1 ) = (1.0,1.0-) PI 620690

A2C(1 . 1 ) = (1 .0, 1 .0) PI 62 0 7 0 0 A3C(1 .1,1) = (-2.0,-2.0) P1620710

NBS FORTRAN Test Programs Version 1 U3
AVD = 1 . ODO

A1 D( 1) = 1 . ODO

P1620720

P1620730

A2D(1 , 1 ) = 1 . ODO

A3D( 1 , 1 , 1 ) = 1 .ODO

P1620740

P1620750

IVI= RFS(AVS. lAVI .AVB,AVC.AVD,A1S.A2S,A3S,J1 I , 121 . 131 ,A1B,A2B,A3B.P1620760

1 A1 C- A2C.A3C,A1D,A2D,A30,GFS) P1620770

MAVI : 5 IF ( IVI ) 1 620, 1 62 1 , 1 620P1620780

P1620790

1629 MAVI : 6 BVB = AVB . AND . A1 B( 1 ) . AND . A2B( 1

, 1 ) . AND . A3B( 1 . 1

, 1)

P1620800

P1620810

IF (BVB) GO TO 1621

GO TO 1620

P1620820

P1620830

7010 I VI =REAL (AVC)

JVI = AIMAG(AVC)

P1620840

P1620850

MAVI = 7 BVB - IVI . EG. 0. AND. JVI .EQ.OP1620860

P1620870

IF (BVB) GO TO 1621

1620 WRITE (NUVI,1622) MAVI

P1620880

P1620890

GO TO 7011

1621 WRITE (NUVI,1623) MAVI

P1620900

P1620910

1 622 FORMAT( / /2X, 5HTEST ,I1,13H IS NEGATIVE.)

1623 FORMAT (//2X,5HTEST ,I1,13H IS POSITIVE.)

PI 620920

P1620930

7011 GO TO (1 625 , 1 626, 1 627 , 1 628 , 1 629, 701 0 , 701 2) , MAVI

7012 CONTINUE

P1620940

P1620950

C » END OF TEST SEGMENT 162

C** «** WHEN EXECUTING ONLY SEGMENT 162, THE STOP AND

P1620960

END CARDS P1620970

C**»«» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C***»* IN COLUMNS 1 AND 2 REMOVED.

P1620980

P1620990

C= STOP

C= END

P1621000

P1621010

STOP

END

P162C1

P162C2

c * t « * * ***««*««t*»***««P4020010

P4020020

C***** GFS - (402)

c * « * * * P4020030

P4020040

C**«:****************i>t*t****t***t*«******t************«t*tttttt*tt**t*t*P4020050

Ct«t»* REAL FUNCTION OF DOUBLE PRECISION ARGUMENT (TEST 1) P4020060

FUNCTION GFS(AWVD)

DOUBLE PRECISION AWVD

P4020070

P4020080

GFS = AWVD

RETURN

P4020090

P4020100

END

C*******t**«***tt**t«tt«t*t*t*ttt***tit««t***«**«tt***t**

P40201 10

««»»««»**t«t*tt*P4220010

c * * * C**«** HFS - (422)

P4220020

P4220030

C « t * *

«

C*t**it«*t*t***ttt«******«**«t*t(ttt***ttt*t**tt**t******

P4220040

t t** ***t**t*P42200S0

C»«t«*REAL FUNCTION OF COMPLEX ARGUMENT (TEST 2)

FUNCTION HFS(AWVC, BWVC)

P4220060

P4220070

COMPLEX AWVC , BWVC , CVC

CVC = AWVC * BWVC

P4220080

P4220090

HFS : AIMAG(CVC)

RETURN

P4220100

P42201 1

0

END P4220120

t**«t*t*****t***P4320010

C t « « * * C***** IRFS - (432)

P4320020

P4320030

c * « * «

Ct***«***tt*********«*t«*******(*«tt****«*t«t*t*t*t***t*

P4320040

«»»**««*««t«ttt*P4320050

C***««REAL FUNCTION OF LOGICAL ARGUMENT (TEST 3)

REAL FUNCTION IRFS(AWVB)

P4320060

P4320070

LOGICAL AWVB

IF (AWVB) GO TO 4321

P4320080

P4320090

4320 IF (.NOT. AWVB) GO TO 4322

RETURN

P4320100

P4320 1 1 0 4321 IRFS : 2.0

GO TO 4320

P4320120

P4320130

144 NBS FORTRAN Test Programs Version 1
4322 IRFS = 0.0

RETURN

END

P432 0 U0

P43201 50

P43201 60

C*****t***t***********t******tr*******************************t*t**« tPAA20010

C«** »* JRFS - (442) P4420030

C *'*'*"*"* P4420040

C*«***REAL FUNCTION OF EXTERNAL PROCEDURE (TEST 4)

REAL FUNCTION JRFS( BWVD.BWFS)

DOUBLE PRECISION BWVD

JRFS = BWFS(BWVD)

RETURN

END

Ct*****«**«*****************t*********«*«*«t*«******«*«**««**«*t********P4520010

C***** P4520020

C * R F S - ( 452 ) P 4 5 2 0 0 3 0

C * * * * * P 4 5 2 0 0 4 0 [;t**4r*************t «** ***t***«*****«i**t******«***it************«;**t*«P4520050

P4420060

P4420070

P4420080

P4420090

P4420 1 00

P 4 42 0 1 1 0

C*****REAL FUNCTION OF DIFFERENT TYPES OF ARGUMENTS. USE IS MADE OF

C* * * * »ADJUSTABLE DIMENSION (TEST 5. 6, 7)

FUNCTION RFS(AWVS, IWVI , AW VB . AWV C , AWVD , AW 1 S , AW2 S

, AW3 S , IW1 I , IW2I

,

1 i W3 I , AW 1 B , AW2 B , AW 3 B , AW 1 C , AW 2 C , AW3 C , AW 1 D , AW 2 0 , AW3 D , AW F S ) LOGICAL AWVB,AW1B,AW2B,AW3B

COMPLEX AWVCAWI C,AW2C, AW3C

DOUBLE PRECISION AWVD. AW 1 D , AW2 D , AW3

D

DIMENSION AW1S( IWVI ) ,AW2S(IWVI , IWVI ) ,AW3S(IWVI

IW2I ( IWVI

AW2B( IWVI

AW2C( IWVI

AW2D( IWVI

I WVI ) IWVI)

IWVI)

IWVI )

IW3 I ( IWVI

AW3B( IWVI

AW3C( IWVI

AW3D( IWVI

I WVI

I WVI

I WVI

IWVI

I WVI

I WVI ) IWVI)

I WVI ) IWVI ) IWVI)

IW1 I ( IWVI

)

AW1B( IWVI

)

AW1 C( I WVI ) AW1D( IWVI ) COMMON BXVS

RFS :AWVS* * I WVI +AW1 S( I WVI ) * * I W1 I ( I WVI ) -AW2S( I WVI , I WVI ) * * I W2 I

1 ( I WVI , I WVI ) +AW3S (I WVI , I WVI , I WVI ) * * I W3 I ( I WVI , I WVI , 1 WVI ) -AWVD + 2 AW1D( IW VI )-AW2D( IWVI, IWVI)- AW 3D( IWVI, IWVI, IWVI )+AWFS(AWVD)-BXVS

AWVB = IWVI .EQ.

1

AW1B( IWVI ) = IWVI .EQ. 1 AW2B( IWVI , IWVI ) = IWVI .EQ. 1 AW3B( IWVI , IWVI , IWVI) = IWVI.EQ.1

AWVC = AWIC(IWVI) +AW2C( IWVI , IWVI )+AW3C( IWVI , IWVI , IWVI

)

RETURN

C * * * * END OF TEST SEGMENT 402

END

P4520060

P4520070

P45200S0

P4520090

P 4 5 2 0 1 0 0 P 4 5 2 0 1 1 0 P4 5 2 0 1 20

P45201 30

P45201 40

P45201 50

P45201 60

P45201 70

P45201 80

P4520 1 90

P4520200

P 4 5 2 0 2 1 0 P4520220

P 4 5 2 0 2 3 0 P4520240

P4520250

P4520260

P4520270

P4520280

P4520290

C***lt*ilr*****tilr«rt*****«******«rlr**«*lt*ll:*t«*it«:***«*ilrt**«*«:*****4t**t********P'|

C ***** , PI C***** F I FCP - ( 163) PI

C * * * * * PI C*****************************«*****************************************P1

C**T** GENERAL PURPOSE ASA REF PI C«  1.T0 TEST INTEGER FUNCTIONS IN FULL FORTRAN PI C** *** 2. THIS SEGMENT COMPLETES SEGMENT (161) IN ORDER TO TEST PI C*«*** FOR ALL FEATURES REQUIRED IN FULL FORTRAN. 8.3.1 PI

C*'***"* 3.DUMMY ARGUMENTS CAN BE I N T E G E R ( T E S T E D IN 1 6 1 ) , R E AL ( T E S T E D PI

C * * « * * C***** 4. DUMMY ARGUMENTS MAY BE REDIFINED IN SUBPROGRAM ( I TEM 4)

C«**** 5. IN REFERENCE , ACTUAL ARGUMENTS MAY BE AS IN (161) AND BESIDES

[:*'**«* EXTERNAL PROCEDURE. IN THIS CASE .EXTERNAL PROCEDURE IS C****« REFERENCED BY AN EXTERNAL STATEMENT.

C***** 6.' USE CAN BE MADE OF ADJUSTABLE DIMENSION.

C*****RESTRICTIONS OBSERVED

C * * « * « 1 . I T E M S ( 1 ) , ( 2 ) , ( 3 ) ; ( 5 ) ; O F 8 . 3

'.' i C**«** 2 PARAGRAPH 8.3.2, LINE 18 TO END OF PARAGRAPH

C*'*'*** THIS SEGMENT" USES 5 INTEGER FUNCTIONS

C**«** THIS SEGMENT IS TO BE RUN WITH SEGMENTS

C **"*** 403 , 42 3, 433, 4 4 3, 4 5 3 WHICH

Z*±*** WH I CH CONTAI NS ALL FUNCTIONS BE I N G TE STE D HERE

C * * * * * C**«*« SPECIFICATIONS SEGMENT 163

6300 10

630020

630030

630040

630050

630060

630070

630080

630090

630 100

630 110

6 3 0 12 0 630 130

630 140

630 150

630160

630 170

630180

630190

630200

6302 10

6 3 0 2 2 0 630230

630240

630250

NBS FORTRAN Test Programs Version 1 145
c * » * * C « t *

«

c * * * * C t * «

«

c * * * * c=

c=

c=

c=

c=

c=

c=

WHEN EXECUTING ONLY SEGMENT 163, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

EXTERNAL IFI DIMENSION A1S(5) ,A2S( '2/2) .A3 S (3,3.3)

INTEGER I 1 I (5) , 121 (2,2) ,131 (2,2,2)

P0013160

P0013165

POO 13 170

P00131 75

P0013180

P001 31 85

P0bl31 90

P0013195

POO 1 3200

P0013205

POO 132 10

P0 0 1 32 1 5 P163A1

P163A2

P163A3

P163A4

P163A5

P163A6

P163A7

P0013220

Pi 630260

P0072650

P0072655

P0072660

P0072665

P0072670

P163B1

P0072675

P1630270

PI 63 02 8 0 PI 63 0290

P1630300

P1630310

P1630320

P1630330

P1630340

P1630350

P1630360

P1630370

P1630380

P1630390

P1630400

PI 6304 1 0 P1630420

P 1 6 3 0 4 3 0 PI 63 04 40

PI 6 3 0 4 5 0 PI 63 0 460

P 1 6 3 0 4 7 0 PI 63 0 48 0 PI 63 0 490

PI 630 5 0 0 P 1 6 3 0 5 1 0 PI 63 0 5 2 0 PI 63 0 5 3 0 PI 63 0 5 40

PI 63 0 5 5 0 PI 63 0 5 60

PI 63 0 5 70

P1630580

P1630590

PI 63 060 0 P1630610

PI 63 062 0 PI 630630

P1630640

PI 63 06 5 0 PI 63 0660

2)

LOGICAL AVB,BVB,A1B(2),A2B(2,2),A3B(2,2.2)

DOUBLE PRECISION AVD . A1 D ( 4 ) , A2D ( 2 , 2 )

, A3D ( 2 ,

2

COMPLEX AVC, BVC , A1 C( 1 2) , A2C(2 , 2 ) , A3C(2 , 2 , 1

)

COMMON AXVS , CXVS

EXTERNAL IFI DIMENSION A1S(5).A2S(2,2),A3S(3,3.3)

INTEGER I 1 I (5) , 121 (2.2) , 131 (2,2,2)

LOGICAL AV B, BV B, A1 B (2) ,A2B (2,2) , A3 6(2,2,2)

DOUBLE PRECISION AVD , A 1 0 ( 4 ) , A2 D ( 2 , 2 ) . A3 D ( 2 , 2 . 2

)

COMPLEX AVC, BVCAI C( 12) ,A2C(2,2) .A3C(2,2, 1 ) COMMON AXVS, CXVS

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

C * « * * c * * * * c * * * * C t * * t C t * «

c « * * c =

WHEN EXECUTING ONLY SEGMENT 163. THE STATEMENT

MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = 6

NUVI : 6 NUVI = 6

C * * *

1634

1

2, C * « «

C * « * 163 5

WRITE(NUVI , 1634)

FORMAT ( 1H1 , 1X,33HFIFCP - (163) INTEGER FUNCTION IN/ 16X,

12HFULL FORTRAN/ /2X,

14HASA REF. 8.3.1//28H RESULTS SHOULD BE POSITIVE)

TEST 1 AVD=1 .ODO

MAVI = 1 IVI=1-IFI (AVD)

TF (I VI ) 1 630 , 1 63 1 TEST 2 MAVI =2

AVC=(1 .0, 1.0)

1630

1630

BVC= ( 1.0,-1.0)

IVI=JFI (AVC, BVC)

IF (IVI) 1 630 , 1 63 1 C« * * «TEST 3 1636 MAVI =3

AVB= .TRUE . IVI=KFI (AVB)*2

AVB= . FALSE

.

JVI=IVI+KFI (AVB)-4

IF ( JVI ) 1630, 1631 .1630

C* 1 1 « » TEST 4 1637 MAVI=4

Ivj = LFI(AVb.IFI)-i

IF ( IVI ) 1 630, 1 63 1 , 1 630

C« * * « * TESTS 5,6,7

1638 AXVS=1 .

0

AVS = 1 . AlSd ) = 1 .0 A2S( 1 , 1 )=1 .0 A3S(1 , 1 . 1 ) = 1 .0 IAVI=1

111(1) = 1 121 ( 1 , 1 )=1

I 3 I( 1 , 1 , 1 ) = 1 A1 C( 1 ) = (1 .0, 1 .0)

A2C(1 , 1 )=(1 .0, 1 .0)

A3C( 1 . 1 , 1 ) = ( - 2 . 0, -2

AVD=1 .ODO

0)

NBS FORTRAN Test Programs Version 1
A1D(1)=1.0D0 PI 63 06 70

A2D(1,1)=1.0D0 PI 63 06 8 0 A3D ( 1 . 1 , 1

) = 1 . ODO P 1 63 0690

IVI=MFI (AVS, lAVI ,AVB, AVC, AVD, A1S, A2S,A3S, 111,121,131,, A1 B

, A2B , A3B , P 1 63 0 70 0 1A1C,A2C,A3C,A1D,A2D,A3D,IFI) PI 63 0 7 1 0 MAVI =5 P1630720

IF ( IVI ) 1 630 . 1 63 1 , 1 630 P1630730

1639 MAVI =6 P1630740

BVB=AVB.AND.A1B(1).AND.A2B(1.1).AND.A3B(1.1,1) PI 63 0 7 5 0 IF (BVB) GO TO 1631 PI 63 0 760

IF ( . NOT . BVB ) GO TO 1630 P1630770

7007 IVI=REAL(AVC) P1630780

JVI =AI MAG(AVC) PI 63 0 79 0 MAVI =7 PI 63 0 8 0 0 IF ( IVI + JVI ) 1 630, 1 63 1 . 1 630 PI 63 0 8 1 0 1630 WRITE( NUVI , 1 632 ) MAVI PI 63 0 8 2 0 GO TO 7008 PI 63 0 8 3 0 1631 WRITE(NUVI , 1633) MAVI PI 6 3 0 8 40

1 632 FORMAT (//2X,5HTEST ,I2,12H IS NEGATIVE) P1630850

1633 FORMAT( / /2X, 5HTEST , I2,12H IS POSITIVE) PI 63 0 8 6 0 700S GO TO ( 1 63 5 . 1 636 , 1 637 . 1 638 , 1 639 , 7007 , 7009 ) , MAVI PI 6 3 0 8 70

7009 CONTINUE PI 63 0 8 8 0 C«**** END OF TEST SEGMENT 163 P1630890

C»**t^* WHEN EXECUTING ONLY SEGMENT 163 , THE STOP AND END CARDS PI 63 0 9 0 0 C*»*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C: P1630910

C * « * * « I N CO L UMNS 1 AND 2 FtE MOVED,, P 1 6 3 0 9 2 0 C= STOP

C= END

P1630930

P 1 630940

STOP

END

PI 63C1

PI 63C2

C t « * «

«

P4030020

C*t«»« IFI

C t » t « « "

- (403) P4030030

P4030040

PRECISION ARGUMENT(TEST 1

)

P4030060

FUNCTION IFKAWVD)

DOUBLE PRECISION AWVD

P4030070

P4030080

I F I =AWVD

RETURN

P4030090

P4 0 3 0 1 0 0 END

tttttttttttttttttttlitttlitttittilitt

P40301 1

0

.«**»P4230010

c * * * * » C***** JFI - (423)

P4230020

P4230030

c * « * » « Qt*t**t*tttttt*tt**tttttt*ttt***t

P4230040

t»**«t*«******t***«***«*****«******»«««P4230050

Ct*»»«iNTEGER FUNCTION OF COMPLEX

FUNCTION JFI (AWVC.BWVC)

ARGUMENT(TEST 2) P4230060

P4230070

COMPLEX AWVCBWVC.CVC

CVC =AWVC*BWVC

P4230080

P4230090

JFI=AIMAG(CVC)

RETURN

P42301 00

P 4 23 0 1 1 0 END P 4 2 3 0 1 2 0

C t * t * « C***«* KFI - (,^.33.) P4330020

P4330030

c * « * t * ^ttt**tttttt*t*t*ttittt**tt*t*t*tt

P4330040

t«*»«P4330050

Ct*«t* INTEGER FUNCTION OF LOGICAL

FUNCTION KFKAWVB)

ARGUHENT(TEST 3) P4330060

P4330070

LOGICAL AWVB

IF (AWVB) GO TO 4331

P4330080

P4330090

4330 IF ( .NOT. AWVB) GO TO 4332

RETURN

P433 0 1 0 0 P43 3 0 1 1 0 4331 KFI = 2 GO TO 4330

P4330120

P4330130

4332 KFI = 0 RETURN

P4330 1 40

P43301 50

NBS FORTRAN Test Programs Version 1 147
END P4330160

*****t******t*tt****tt**ttt*«*t****tt**«***t**«***t ik** ***tt****P4430010

* P4430020

* LFI - (443) P4430030

C t « «

«

C * * « « c * * * * C* * * * * P 4 43 0 0 40

Ctt**«*«***t**«t**t*tt*t*t*t*t*«****t********«**«««*«*«t**tt*t***«***«*«P4430050

C * * «

MNTEGER FUNCTION OF EXTERNAL PROCEDURE ( TEST 4)

FUNCTION LFKBWVD, IWFI ) P4430060

P4430070

DOUBLE PRECISION

LFI=IWFI (BWVO)

RETURN

END

BWVO P4430080

P4430090

p 4 4 3 0 1 0 0 P4430 1 1 0 Qt * t * c * « * * c * « *

«

c * * * * C*«t**«i*******«;*t****t*t*t**t**ttt*******t*t**t*t************«r «** ****P4530050

C * * * C * * *

*«:«****t*t*t****« 4r** *t***t**t***************t*t*t«:**ti**«**t****P4530010

* P45300Z0

* MFI - (453) P4530030

* P4530040

MNTEGER FUNCTION OF DIFFERENT TYPES OF ARGUMENTS. USE IS MADE OF

* ADJUSTABLE D I MENS I ON ( TEST 5.6,7)

FUNCTION MFKAWVS, IWVI . Ak VB , A W V C . AWVD , A W 1 S , AW2 S , AW 3 S . IW1 I , IW2I

1 IW3I ,AW1B.AW2B,AW3B,AW1C,AW2C,AW3C.AW1D.AW2D.AW3D, IWFI)

DOUBLE PRECISION AWVD , AW 1 D , AW2D . AW3D

LOGICAL AWVB,AW1B.AW2B,AW3B

COMPLEX AWVC, AW1 C,AW2C, AW3C

DIMENSION AW1S( IWVI ) ,AW2S( IWVI , IWVI ) ,AW3S( IWVt j^^j-^Wl) ".

1 IW1 I ( IWVI ) . IW2I ( IWVI

2 AWIB(IWVI) .AW2B( IWVI

3 AW1 CdWVI ) ,AW2C(IWVI

4 AW1D( IWVI ) .AW2D( IWVI

COMMON BXVS

MFI = AWVS * * I WV I AW 1 S ( I MV 1) * * I W 1 I ( I WV I ) - AW2S ( I WV I , I Wl ) * *TH2 I

1 ( IWVI . IWVI )+AW3S( IWVI , IWVI , IWVI )** IW3I ( IWVI , IWVI , IWVI )-AWVO + 2 AWIDdWVI )-AW20( IWVI , IWVI )-AW30( I WV I . I WV I , I WV I ) + BXVS * d W F I ( AWVD ) 3-1.0

AWVB=IWVI .EQ.

1

AWIB(IWVI) = IWVI .EG. 1 AW2B(IWVI . IWVI ) = IWVI.EQ.i

AW3B(IWVI , IWVI , IWVI ) = IWVI.EQ.I

AWVC = AWIC(IWVI) +AW2C( IWVI . IWVI )*AW3C( IWVI , IWVI /rWVi)

IWVI ) IWVI ) IWVI )

I WVI )

IW3I( IWVI

AW3B( IWVI

AW3C(IWVI

AW3D( IWVI

IWVI

I WV I IWVI

IWVI

IWVI ) IWVI ) IWVI ) IWVI )

c * * * c « « «

«

c » * * .* c * * *

«

c * * »

C * t * t c * * * * C t « * t c * t » * c * * t c * *

«

c » *

«

c * * *

»

c * « *

«

c « t « * C t * «

t

C * * t * c * * * c * * * t c * * * * c * * * * c * » * * c « * * * r » * »

«

c * » * c * * * * c * * * *

P4530060

P4530070

P4530080

P4530090

P4530100

P 4 5 3 0 1 1 6 P4530120

P4530130

P45301 40

P45301 50

P4530160

P45301 70

P4530U0

P4530190

P4530200

P4530210

P4530220

P4530230

P4530240

P4530250

P4530260

P4530276

P4530280

P4530290

RETURN

END

*t********«*t***t*ttt**ttt*t«**ttt*tt***t***t***t**t«*ttt***tlr*****Pl640010

CFCCP-( 164) P1640030

* P1640040

«**t*t*******t*t*t*t*t*t*****t*****t********t**«t*****t***tttt*tt**Pl640050

* GENERAL PURPOSE ASA REFP1640060

* 1.T0 TEST COMPLEX FUNCTIONS IN FULL FORTRAN 8.3.1 P1640070

* 2. DUMMY ARGUMENTS ARE REAL , I NTEGER , COMPLEX , LOGI CAL , Pi 64008d

* DOUBLE PRECISION, EXTERNAL PRO CEDURE , ARRAY NAME. P1640090

* 3. FUNCTIONS CONTAIN UP TO 20 ARGUMENTS P164dl06

* 4. IN REFERENCE ACTUAL ARGUMENTS ARE VARIABLE NAME P1640110

* ARRAY NAME, ARRAY ELEMENT NAME , AR I THMET I C EXPRESSION PI 640 1 20

* EXTERNAL PROCEDURE P1640130

* 6. USE CAN BE MADE OF ADJUSTABLE OIMENTION Pi64dl46

* 7. ARGUMENTS CAN BE PASSED THROUGH COMMON P1640150

•RESTRICTIONS OBSERVED P164bl66

* 1 . ITEMS(2) , (3) , (4) , (5) , (6) OF PARAGRAPH P1640170

* 2. LAST SENTENCE OF PARAGRAPH 3.2 P164018d

* THIS SEGMENT USES 8 COMPLEX FUNCTIONS P1640190

* THIS SEGMENT IS TO BE RUN WITH SEGMENTS P1 64020d

* 404. 414. 424, 434, 444, 454, 464 P1640210

* WHICH CONTAIN ALL FUNCTIONS BEING TESTED HERE P164b226

* P1640230

* S P ECIFICATIONS SEGMENT 164 P1640240

t P0013230

* WHEN EXECUTING ONLY SEGMENT 164, THE SPE C I F I CAT I ON ' StATEMENfS P0dl 3235

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0013240

NBS FORTRAN Test Proorams Version 1
C***»* IN COLUMNS 1 AND 2 REMOVED.

C 1 1 1 * t P0013245

P001 3250

C= DIMENSION A1S(5) .A2S(2.2) .A3S(3.3.3)

C= INTEGER 111(5) I 2 I ( 2 2 ) , I 3 I ( 2 , 2 , 2

)

P0013255

P0 0 1 3260

C= LOGICAL AVB.A1B(2).A3B(2,2,2),A2B(2.2).BVB

C= DOUBLE PRECISION AVD . A 1 D ( 4 ) . A2 D ( 2 , 2 ) , A3 D ( 2 . 2 . 2

)

P0 0 1 326 5 POO 1 3 2 70

C= COMPLEX AFC,BFC,CFC,DFC,EFC.FFC.HFC.AVC.BVC

C= 1 A1C(12) A2C(2 2> A3C(2.2.1)

P0 0 1 3 2 7 5 PO 0 1 3 2 8 0 C= COMMON AXVS, CXVS

C= EXTERNAL BFC

POO 1 3 2 8 5 PO 0 1 3 2 90

DIMENSION A1S(5),A2S(2,2),A3S(3,3,3)

INTEGER 111(5) 121(2 2) 131(2.2,2)

PI 64A1

P 1 64A2

LOGICAL AVB.A1B(2),A3B(2,2,2).A2B(2,2),BVB

DOUBLE PRECISION AVO , A 1 D ( 4 ) , A2 D ( 2 , 2 ) , A3 D ( 2 , 2, 2

)

PI 64A3

P 1 64A4

COMPLEX AFC.BFC,CFC,DFC,EFC.FFC,HFC.AVC,BVC

1,A1C(12),A2C(2,2).A3C(2.2,1)

PI 64A5

P 1 64A6

COMMON AXVS , CXVS

EXTERNAL BFC

PI 64A7

P 1 64A8

c * * * « C*««*« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE . P001 3295

PI 6402 5 0

c * « * * * C*t*»« WHEN EXECUTING ONLY SEGMENT 164, THE STATEMENT NUVI = 6 P0072680

P0072685

C**t«* MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

t * * * P0072690

P0072695

C= NUVI = 6 NUVI = 6 P0072700

P 1 64B

1

C * 1 1 »

WRITE(NUVI , 1641

)

P0072705

P 1 6 4 0 2 6 0 1641 FORMAT( 1H1 , 1X,31HCFCCP - (164) COMPLEX F U N C T I 0 N S / / 2X

,

1 21HASA REFS. 8 . 3 . 1 , 8 . 3 . 2 / / 2X , 7HRESULTS)

PI 640 2 70

PI 640 2 8 0 C* * * * * TEST 1 BVC=AFC(1 .0)

PI 640290

P 1 6403 00

MAVI =1 WRITE(NUVI . 1642) BVC,MAVI

PI 6403 1 0 PI 64032 0 1642 F0RMAT(1H0,2F5.1,9H -- TEST ,I2.20H POSITIVE IF 0,

C***«* TEST 2 .0,0.0) PI 640330

PI 640 3 40

MAVI=2

BVC= BFCd )-(1 .0. 1 .0)

PI 6403 5 0

P 1 640360

WRITE(NUVI . 1642)BVC,MAVI

Ct**«« TEST 3

PI 6403 70

PI 6 403 8 0 MAVI =3

AlSd ) = 1 .0

PI 6 40390

PI 6 40 400

A1S(2)=1 .0 BVC=CFC(A1S)

PI 640 4 1 0 PI 640 420

WRITE(NUVI , 1642)BVC,MAVI

C***** TEST 4

PI 640 430

P 1 6 4 0 4 40

MAVI =4

BVC = DFC (1 .DO)

PI 6 40 4 5 0

P1 11 6\j 4~ 0yj 46~ \j 0V WRITE(NUVI , 1642)BVC,MAVI

C*t***TEST 5

PI 640 4 70

P 1 6 4 0 4 8 0 MAVI =5

AVC= ( 1.0,1.0)

PI 6 40 490

PI 6 4 0 5 00

BVC=EFC(AVC)

WRITE(NUVI . 1642)BVC,MAVI

PI 64 0 5 1 0 PI 64 0 5 20

C* * * « «TEST 6 MAVI =6

PI 6 40 5 3 0 P1 11 6\J 4~ 0V 5J 4~ 0v AVB=.TRUE.

BVC=FFC(AVB)-( 1 .0,1.0)

P1640550

P 1 6 4 0 5 6 0 WRITE(NUVI , 1642)BVC,MAVI

C* * * * « TEST 7 PI 6 4 0 5 70

PI 64 0 5 8 0 MAVI=7

AVB= . FALSE . P1640590

P 1 6 4 0 6 0 0 BVC=FFC(AVB)

WRITE(NUVI , 1642)BVC,MAVI

P1640610

P1 11 6\J 4~ 0V 6\J 2^ 0\J C**«»« TEST 8,9,10

IVI-1

PI 6 4 0 63 0 P 1 6 4 0 6 4 0 AVD=1.0D0

A1D(1 )=1 .ODO

PI 64 06 5 0 PI 640 660

NBS FORTRAN Test Programs Version 1 1 49
ODO

:1 .ODO

A2D(1 , 1) = 1 A3D( 1 ,1.1)'

AVS = r.O

AlSd ) = 1 .0 A2S(1.1)=1.6

A3S(1 , 1 , 1 ) = 1 .0 A 1 C ( 1) = (1 . 0 , 1 . 6 ) A2C(1 , 1 ) = (1 . 0 , 1 . 0 ) A3 C ( 1 . 1 , 1) = ( 1 . 0 . 1 . 0 )

I 1 I ( 1) = 1 T'2i(T7T)='i

131 ( 1 , 1 , 1 ) = 1 AVC = (0.0,0 0)

P1640670

P1640680

PI 640690

P1640700

P 1 64071 0 P1640720

P1640730

PI 640740

PT64075 0 PI 640760

PI 6 4 0 7 7 0 P1640780

PI 640 790

ByC=. HFC(AVS , IVI , AyB, Ay.C,Ayp,AlS P 1.64080 0 1A1 C,A2C.A3C, A1D.A2D,A3D, BFC)

MAVI = 8 WRITE (NUVI . 1 642 ) BVC,MAVI

MAVI =9

P1640810

P1640820

P 1 6 4 0 8 3 0 PI 640 840

IF(AXVS) 1643,1644,1643

1648 MAVI = 10

P1640850

PI 640860

BVB=AVB.AND.A1B(1).AND.A2B(1,1).AND. A3B(1

IF (BVB) GO TO 1644

,1,1) P1640870

P1640880

1643 WRITE(NUVI , 1645)MAVI

GO TO 1647

PI 640 890

PI 640900

1644 WRITE(NUVI , 1646)MAVI

1 64 5 FORMAT( / 1 5X, 5HTEST ,I2,12H IS NEGATIVE)

PI 6409 1 0 P1640920

1646 FORMAT( / 1 5X, 5HTEST ,I2,12H IS POSITIVE)

1647 IF (MAVI - 9) 16 4 9,1648,1649

PI 640930

PI 640940

1649 CONTINUE

C***** END OF TEST SEGMENT 164

P1640950

P1640960

C*»*** WHEN EXECUTING ONLY SEGMENT 164, THE STOP AND END CARDS P1640970

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1640980

C***** IN COLUMNS 1 AND 2 REMOVED.

C= STOP

PI 640990

PI 64 1 0 0 0 C= END

STOP

P1641010

PI 64C1

END P164C2

*******«*t**«**t*«:*****tP4040010

c * * * « * C***** AFC - (404)

P4040020

P4040030

C***** P4040040

C* ***« COMPLEX FUNCTION OF REAL ARGUMENT (TEST 1)

COMPLEX FUNCTION AFC(AWVS)

P4040060

P4040070

AFC = (-1 .0,0.0)+AWVS

RETURN

P4040080

P4040090

END P4040100

«*****«*t******«**t*t*«*P4140010

C * t * * C***** BFC - (414)

P4 1 40 020

P41 40030

c

* * * * P4 1 40040

****it**tt t** *******tP4140050

C* «*** COMPLEX FUNCTION OF INTEGER ARGUMENT (TEST

COMPLEX FUNCTION BFC( IWVI

)

2) P4140060

P4 1 40 0 70

BFC=(1 .0, 1 .0)**IWVI

RETURN

P41 40080

P41 40090

END P41 401 00

**t**t*********«***«t***P4240010

C

» * * * * C***** CFC - (424)

P4240020

P4240030

c * * * * * P4240040

**4r***t**t*************itP4240050

C* **** COMPLEX FUNCTION OF ARRAY NAME (TEST 3)

COMPLEX FUNCTION CFC(AWIS)

P4240060

P4240070

DIMENSION AW1S(2)

CFC = (2.0,0.0)-AW1S(1 )-AW1S(2)

P4240080

P4240090

RETURN

END

P42401 00

P42401 1

0

150 NBS FORTRAN Test Programs Version 1

m
c * t «

c * * *

»

c * * * * c « « * * c « * * * c « « * *

ttlltlitt***********************************************************

t

*

COMPLEX FUNCTION OF DOUBLE PRECISION ARGUMENT (TEST 4). COMPLEX FUNCTION DFC(AWVD)

DOUBLE PRECISION AWVD

AVS = AWVD

DFC = (1.0,1.0) * AVS - (1.0.1.0)

RETURN

...END

c * * * * c « * * t c * * * c * * * c * * * * c * * * *

EFC - (444)

COMPLEX FUNCTION OF COMPLEX ARGUMENT (TEST 5)

COMPLEX FUNCTION EFC(AWVC)

COMPLEX AWVC

EFC = AWVC- (I.O.I. ()') RETURN

"end"

c » * * * c « « «

c * * * * c « * * * c * * * *

littttKiitttiitttttlitlittttliltlili**************************************

FFC - (454)

COMPLEX FUNCTION OF LOGICAL ARGUME NT ( TE STS 6,7)

COMPLEX FUNCTION F F C ( AW V B )

'

'

'

' LOGICAL AWVB

IF (AWVB) GO TO 4541

I F ( . NOT. AWVB) GO TO 4542

RETURN - FFC = (1.0.1.0)

GO TO 4 5 40

FFC = (0.0,0.0)

4540

4541

4542

RETURN

END

C * * * C « * *

«

c « * *

»

C t * *

«

c * * * * c « * * *

HFC ( 464 )

C * * « «

C t * * t C t « * *

COMPLEX FUNCTION OF DIFFERENT TYPES OF ARGUMENTS (TESTS 8,9,10

COMPLEX FUNCTION HF C ( AWVS . I WV I

, AWVB , AWVC , AWVD , AW 1 S , AW2S , AW3S

,

IW1I,IW2I,IW3I,AW1B,AW2B,AW3B,AW1C.AW2C,AW3C,AW1D,AW2D,AW3D.AWFC

DIMENSION AW1S( IWVI ) .AW2S( IWVI . IWVI ) .AW3S( IWVI , IWVI , IWVD

.

IW1I(IWVI).IW2I(IWVI,IWVI).IW3I(IWVI,IWVI,IWVI),

AW1 B( I WVI ) . AW2B( I WVI . I WVI ) . AW3B( I WVI , I WVI , I WVI ) AW1 C( IWVI ) .AW2C( IWVI . IWVI ) .AW3C( IWVI . IWVI , IWVI )

.

AMI D( IWVI ). AW 2D(I WVI, IWVI), AW 3D(IWVI. IWVI, IWVI)

COMMON BXVS

LOGICAL AWVB,AW1B,AW2B,AW3B

COMPLEX AWVC.AWI C.AW2C,AW3C. AWFC

DOUBLE PRECISION AWVD , AW1 D , AW2D , AW3b

HFC = AWVC

BXVS = AWVS« « I WVI +AW1 S( I WVI ) ** I W1 I ( I WVI ) -AW2S( I WVI . I WVI ) » • I W2 I

( I WVI , I WVI ) +AW3S( I WVI , I WVI , I WVI ) * • I W3 I ( I WVI , I WVI , I WVI ) -AWVD*

AW1D( IWVI )-AW2D( IWVI . IWVI )-AW3D( IWVI . IWVI , IWVI

)

AWVB = IWVI.EQ.1

AW1 B( IWVI) = I W V

I

7E Q 71 AW2B( IWVI , IWVI ) = IWVI .EO. 1 AW3B( IWVI , IWVI , IWVI ) = IWVI.EQ.1

RETURN

END OF TEST SEGMENT 464

END

ttt*t***ttt*ttt*t*t*t*t**ttttttttttttt*tttttttt*ttt*t*iiii**ttttt

*P434001

0

P4340020

P4340030

P4340040

P 4 3 4 0 0 5 0 P4340060

P4340070

P4340080

P4340090

P43401 00

P 4 3 4 0 1 1 0 P43401 20

*P444001

0

P4440020

P4440030

P4440040

P4440050

P4440060

P4440070

P4440080

P4440090

P4 440 1 0 0 P 4 44 0 1 1 0 *P'i 5 4 0 0 1 0 P 4 5 4 0 0 2 0 P4540030

P4540040

P4540050

P4540060

P4540070

P 4 5 4 0 0 8 0 P4540090

P 4 5 4 0 1 0 0 P4 5 4 0 1 1 0 P45 40120

P4540 1 30

P 4 5 4 0 1 4 0 P45401 50

*P46400 1

0

P4640020

P4640030

P4640040

P4640050

P4640060

P46400 70

)P4640080

P464009 0 P464 0 1 0 0 P 4 6 4 0 1 1 0 P4640 1 20

P 4 6 4 0 1 3 0 P46401 40

P 4 6 4 0 1 5 0 P4640 1 60

P46 4 0 1 70

P4640 1 80

P 4 6 4 0 1 9 0 P4640200

P 46402 1 0 P4640220

P464023 0 P4640240

P 4 6 4 0 2 5 0 P4640260

P 4640270

P4640280

*P 1 6 5 0 0 1 0 PI 6 5 0 02 0 NBS FORTRAN Test Programs Version 1 151
C«**** DPFCP-(165)

c * * * *

«

P1650030

P1650040

C***** GENERAL PURPOSE

*t«***pi650050

P1650060

C*«**« 1.T0 TEST DOUBLE PRECISION FUNCTIONS IN FULL FORTRAN

C***** 2. DUMMY ARGUMENTS ARE REAL , I NTEGER , COMPLEX , LOG I CAL

,

8.3. 1P1650070

PI 65 00 8 0 C*»t** DOUBLE PRECISION, EXTERNAL PRO CE DURE , ARRAY NAME

C***** 3. FUNCTIONS CONTAIN UP TO 20 ARGUMENTS

P1650090

PI 6 5 0 1 00

C*»«*« 4. IN REFERENCE , ACTUAL ARGUMENTS ARE V AR I A B L E 1 N AM E

,

C***** ARRAY NAME, ARRAY E L E M E N T N AM E , 0 R ARITHMETIC EXPRESSION. 8.3.

PI 6 5 0 1 1 0 2P1650120

C***t*RESTRICTIONS OBSERVED

C***** 1 . I TEMS ( 2 )

, ( 3 ) , ( 4 ) , ( 5 ) , ( 6 > OF PARAGRAPH 8.3.1

P1650130

P 1 65 0 1 40

C***** 2 LAST SENTENCE OF PARAGRAPH 3.2

C*t*** THIS SEGMENT IS TO BE RUN WITH SEGMENTS

P16501 50

PI 650 1 60

C*«*»* 405, 415, 425, 435. 445. 455. 465, 475

C***** WHICH CONTAINS ALL FUNCTIONS BEING TESTED HERE.

P1650170

P 1 6 5 0 1 80

c « « * C***«* SPECIFICATIONS SEGMENT 165

PI 65 0 1 90

PI 65 0200

c

* * * «

«

C*»«*« WHEN EXECUTING ONLY SEGMENT 165, THE SPECIFICATION STATEMENTS

POO 1 3300

P0 0 1 33 0 5 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C***** IN COLUMNS 1 AND 2 REMOVED.

P0013310

P0 0 1 33 1 5 C t * « *

«

C= DIMENSION A1S(5) ,A2S(2,2) ,A3S(3.3,3)

P0013320

P001 3325

C= INTEGER I 1 I (5 ), 121 (2. 2) , 131 (2, 2, 2) C= LOGICAL A1B(2),A2B(2,2),A3B(2,2,2),AVB,BVB

P0013330

P0013335

C= DOUBLE PRECISION AFD, BFD, CFD, DFD, EFD, FFD. GFD, HFD.AVD

C= 1 , A1D(4) ,A2D(2,2) ,A3D(2,2,2)

P0013340

POO 1 33 4 5 C= COMPLEX AVC , A1 C ( 1 2 ) , A2C(2 . 2 ) , A3C(2 , 2 . 1 ) C= COMMON AXVS , CXVS

P0013350

P00 1 33 5 5 C= EXTERNAL CFD, AFD

DIMENSION A1S(5).A2S(2,2),A3S(3,3,3)

P0013360

PI 65A1

INTEGER 111(5), 121(2. 2), 131(2, 2, 2)

LOGICAL A1B(2),A2B(2,2),A3B(2,2,2),AVB.BVB

P165A2

PI 65A3

DOUBLE PRECISION AFD, BFD, CFD. DFD, EFD, FFD, GFD. HFD.AVD

1 , A1 D( 4 ) , A2D(2 , 2 ) , A30(2 , 2 , 2 ) P165A4

PI 65A5

COMPLEX AVC,A1C(12),A2C(2,2),A3C(2,2,1)

COMMON AXVS, CXVS

P165A6

PI 65A7

EXTERNAL . CFD, AFD

c * « « «

»

PI 65A8

P0013365

C*«»tt OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

C*«**t WHEN EXECUTING ONLY SEGMENT 165, THE FOLLOWING STATEMENT

P1 6502 1 0 P007271

0

Ct«**« NUVI : 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED,

c * « * * * P007271

5

P0072720

C= NUVI : 6 NUVI = 6 P0072725

PI 65B1

WRITE (NUVI, 1650)

1650 FORMAT( 1H1 , 1X,30HDPFCP - (165) DOUBLE PRECISION/ 16X, 9HFUNCTI0NS

P1650220

PI 6 5 0230

1 //2X,21HASA REFS. 8 = 3 . 1 . 8 . 3 . 2 / / 2X , 7HRESULTS)

C***** TEST 1 P1650240P1650250

MAVI = 1 IVI = AFDd .0) - 1 .000P1650260

PI 6 5 02 70

IF ( IVI ) 1 6 5 2,1 653 . 1 652

C«**«* TEST 2 P1650280

P1650290

1657 MAVI =2

IVI=BFD(1 )-1 .000

P1650300

P1650310

IF(IVI) 1 6 5 2, 1 653 . 1 652

C***«« TEST 3 P1650320

PI 6 5 0330

1658 MAVI =3

AVD = 1 . ODO

P1650340

PI 6 5 03 5 0 IVI=CFD(AVD)-1 .ODO

IF(IVI) 1652,1653,1652

P1650360

PI 6 5 03 70

Ctt*t* TEST 4 .ONE ARGUMENT IS ARRAY ELEMENT NAME

1659 MAVI =4

P1650380

PI 6 5 0390

AVC = (1.0,1.0)

AlCd ) = (1 .0,-1 .0)

P1650400

PI 6 5 0 4 1 0 IVI=DFD(AVC, A1 C( 1 )

)

IF ( IVI ) 1 6 5 2,1 653 , 1 652

PI 6 5 0420

P1650430

152 NBS FORTRAN Test Programs Version 1
C*t*«« TEST 5.6 P1650440

7014 MAVI =5 PI 65 0 4 5 0 AVB=.TRUE. P1650460

IVI=EF0(AVB>-1 .000 PI 65 04 70

IF<IVI)1652, 1653. 1652 P1650480

7015 MAVI = 6 PI 6 5 0 490

AVB=. FALSE. PI 6 5 0 5 0 0 IVI=EFD(AVB) P1650510

IF(IVI)1652. 1653. 1652 P1650520

C****t TEST 7 PI 6 5 0 5 3 0 7016 MAVI = 7 P1650540

IVI = FFD (1 .EO,AFD) - 1 .ODO PI 6 5 0 5 5 0 IF (IVI ) 1 652 , 1 653 . 1 652 P1650560

C«*«t« TEST 8 PI 6 5 0 5 70

7017 MAVI = 8 PI 6 5 0 5 8 0 A1D( 1 )=1 .ODO PI 6 5 0 5 90

A1D(2)=-1 .000 PI 6 5 060 0 IVI=GFD(A1D) PI 6 5 06 1 0 IF (IVI) 1652.1653.1652 PI 6 5 062 0 Ct**** TESTS 9.10,11.12 PI 6 5 063 0 7018 lAVI : 1 PI 6 5 06 4 0 AV0=1 .ODO PI 6 5 06 5 0 A1D( 1 ) = 1 .ODO PI 6 5 066 0 A2D( 1 . 1

) =1 . ODO PI 6 5 06 70

A3D( 1 ,1.1)= 1 .000 PI 6 5 0 6 8 0 AVS = 1 .0 PI 6 5 0 690

A1S( 1 ) = 1 .0 P1650700

A2S( 1 , 1 ) = 1 . 0 P 1 6 5 0 7 1 0 A3S( 1 , 1 . 1 ) = 1 .0 PI 6 5 0 720

A1 C( 1 ) = ( 1 . 0 . 1 . 0) PI 6 5 0 73 0 A2C( 1 . 1 ) = ( 1 . 0 . 1 . 0) P 1 6 5 0 7 4 0 A3C(1 . 1 . 1 ) = (1 .0, 1 .0) P1650750

I 1 I ( 1 ) = 1 P1650760

121 (1 , 1 )=1 PI 6 5 0 7 7 0 131 ( 1 . 1 , 1 ) = 1 PI 6 5 0 78 0 MAVI = 9 P1650790

IVI :HFD(AVS. lAVI .AVB. AVC, AVO. A1S, A2S. A3S. 1 1 I

.

121 . 131 ,A1 B.A2B.A3B, PI 6 5 0 8 0 0 1A1 C,A2C,A3C,A1D,A2D,A3D. CFD) P1650810

IF (IVI) 1652,1653.1652 PI 6 5 0 8 2 0 7019 MAVI = 10 PI 6 5 0 8 3 0

I VI =AXVS PI 6 5 0 8 4 0 IF ( IVI ) 1 652 . 1 653 . 1 652 PI 6 5 0 8 5 0 7020 MAVI = 11 PI 6 5 0 8 60

WRITE (NUVI,1656) AVC, MAVI PI 6 5 0 8 7 0 1656 F0RMAT(//2F5.1//2X,5HTEST .I2.31H IS POSITIVE I F NUMBERS PRINTED/ PI 6 5 0 8 8 0

1 2X, 17HAB0VE ARE 0.0,0.0) P 1 6 5 0 8 9 0 7021 MAVI = 12 P 1 6 5 0 9 0 0 BVB = AVB . AND . A1 B( 1 ) . AND . A2B( 1 . 1 ) . AND. A3B( 1 ,

1

, 1 ) P1650910

IF(BVB) GO TO 1653 PI 6 5 0 92 0 1652 WRITE(NUVI , 1654)MAVI P1650930

GO TO 1651 P 1 6 5 0 9 4 0 1653 WRITE(NUVI , 1655)MAVI PI 6 5 0 9 5 0 1654 FORMAT( /2X, 5HTEST ,I2.12H IS NEGATIVE) PI 6 5 0 960

1655 FORMAT( /2X. 5HTEST .I2.12H IS POSITIVE) PI 6 5 09 70

1651 GO TO (1657.1658.1659.7014,7015,7016,7017,7018,7019,7020,7021. P 1 6 5 0 9 8 0

1 7022) .MAVI PI 6 5 0 99 0 7022 CONTINUE P 1 6 5 1 0 0 0 C**««* END OF TEST SEGMENT 165 PI 65 1 01 0 C****» WHEN EXECUTING ONLY SEGMENT 165, THE STOP AND END CARDS PI 6 5 1 02 0 C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = P1651030

C***«« IN COLUMNS 1 AND 2 REMOVED. P1651C40

C= STOP P1651050

C= END PI 6 5 1 0 60

STOP PI 65 CI END P165C2

Z****************ii**************ii*ttt*t*ttt**t*ttt* * * * * tttttttttiitttttt *P4 0 5 0 0 1 0

C * * * t * P4050020

C***** AFD - (405) P4050030

NBS FORTRAN Test Programs Version 1 153
c * * * * P4050040

DOUBLE PRECISION

FUNCTION

FUNCTION

OF REAL ARGUMENT (TEST 1)

AFO(AWVS)

P4050060

P4050070

AFD=AWVS

RETURN

P4050080

P4050090

END P40501 00

c * * « * * BFD -(415)

P 4 1 5 0 0 2 0 P4 1 5 0030

P41 50040

C*«*«*DOUBLE PRECISION

DOUBLE PRECISION

FUNCTION

FUNCTION

OF INTEGER ARGUMENT ( TEST2

)

BFD( IWVI)

P 4 1 5 0 0 6 6 P4 1 5 00 70

BFD=1 .ODO**IWVI

RETURN

P41 50080

P41 50090

END P4 1 5 0 1 0 0

C * * * * * c « * * «

CFD - (425)

P4250020

P4250030

c « * « * * QtttittttttttttttttttttP4250040

*«*«t*tt**t«t«««»t****t*»t««t******««*t*P4250050

C«***«DOUBLE PRECISION

DOUBLE PRECISION

FUNCTION

FUNCTION CFD(AWVD)

PrHc,J\J\JO\J L? ^ Cl 0 f\0 P4250070

DOUBLE PRECISION

CFD=AWVD

AkVD

P4250090

RETURN

END

r H L. J V 1 V U P42501 1

0

c * * * t

«

P4350020

c * t * *

«

c * * «

D F D rHjJ\J\Jj\J

P 4 3 5 0 0 4 0 C*.***DOUBLE PRECISION FUNCTION OF COMPLEX ARGUMENT(TEST 4) P4350060

DOUBLE PRECISION FUNCTION

COMPLEX AWVC , BWVC , CVC

UrU^nWVL, BWVL.' P4350080

CVC =BWVC*AWVC

DFD:AIMAG( CVC) P4350100

RETURN

END

r H ijv \ 1 U P4350120

c * * * *

«

P44 5 0 02 0 EFD - (445)

P44 5 0 040

C«**»*DOUBLE PRECISION FUNCTION OF LOGICAL ARGUMENT(TEST 5.6) P4450060

DOUBLE PRECISION

LOGICAL AWVB

FUNCTION

P4450080

IF(AWVB) GO TO 4451

4450 I F ( . NOT. AkVB) GO TO 4452

P4450090

P44501 00

RETURN

4451 EFD = 1 . ODO

P44501 10

P4450120

GO TO 4450

4452 EFD = O.ODO

P4450130

P44501 40

RETURN

END

P44 5 0 1 5 0 P4450160

c * * * * P4550020

c * * * * * c « « «

«

FFD - (455) P45 5 0030

P4550040

C***««DOUBLE PRECISION FUNCTION OF EXTERNAL PROCEDURE (TEST 7) P4550060

DOUBLE PRECISION

DOUBLE PRECISION

FUNCTION

BWFD

FFD(BWVS,BWFD) P4550070

P4550080

FFD = BWFD (BWVS)

RETURN

P4550090

P4550100

END P4 5 5 0 1 1 0

154 NBS FORTRAN Test Programs Version 1
c « * * c « *

«

c * * * c * * * c «

«

GFD - (465)

DOUBLE PRECISION FUN Ct I ON OF ARRAY NAME (fESt 8 ) DOUBLE PRECISION FUNCTION GFD(AWID)

DIMENSION Ak1D(2)

DOUBLE PRECISION AW1D

GFD= AW1D( 1 )+AW1D(2)

RETURN

end

C t * * c * * * c * «

«

c * «

c * « C t * * c * * * c * «

HFD ( 475 )

CAN

,AWVB,AWVC,AWVD,AW1S,AW2S

C,AW2C,AW3C,AW1D,AW2D,

AW3S( IWVI

IW3I( IWVI

AW3C( IWVI

AW3D (I WVI

AW3B( IWVI

CWFD

IWVI

I WVI

I WVI

I WVI

I WVI

IWVI)

IWVI)

IWVI)

I WVI ) IWVI)

c * » * c « * * C « t * c *

«

c * * * c * * * c « «

«

c « * c « »

c * *

«

C t * c « * t c * * * c * «

c « «

t

C 1 1

«

C * t

»

C t * t c « «

«

c » * * c t

«

c * » c * * t c * * * c * * *

DOUBLE PRECISION FUNCTION OF DIFFERENT TYPES OF ARGUME NTS . USE

BE MADE OF ADJUSTABLE D I ME NS I ON . SOME ARGUMENTS CAN BE PASSED

THROUGH A COMMON STATEMENT.

DOUBLE PRECISION FUNCTION H F D ( AW VS . I W V I AW3S, IWVI , IW2I , IW3I ,AW1B.AW2B,AW3B,AW1

AW3D , CWFD ) DIMENSION AW1S( IWVI )

, AW2S( IWVI , IWVI ) IW1 I ( IWVI )

, IW2I ( IWVI , IWVI ) AW1 C( IWVI ) .AW2C( IWVI , IWVI

)

AW1D( IWVI ) ,AW2D( IWVI , IWVI

)

AW1B( IWVI ) ,AW2B( IWVI , IWVI

)

DOUBLE PRECISION AWVD . AW 1 D , AW2D . AW3 D

.

COMPLEX AWVC, AWiC , AW2C , AW3C:

REAL AMIS, AW2S, AW3S

LOGICAL- AWVB,AW1B,AW2B,AW3B

COMMON BXVS

HFD = AWVD - AW1D( IWVI )+AW2D( IWVI . IWVI )-AW3D( IWVI , IWVI , IWVI

)

+ CWFD(AWVD) - 1.0D0

AWVC = AW1 C( I WVI ) +AW2C( I WV I, I WV I ) - AW3 C ( I WV I

, I WV I , I WV I ) - ( 1 . 0 , 1 .0)

BXVS =AWVS* IWVI -AWl S( IWVI)**IW1I(IWVI)+AW2S(IWVI,IWVI)**IW2I

(IWVI , I WVI ) -AW3S( I WVI , I WVI . I WVI ) * * I W3 I ( I WVI , I WVI , I WVI ) AWVB=IWVI .EO.

1

AW1B( IWVI ) = IWVI .EO.'l AW2B( IWVI . IWVI )=IWVI .EQ.

1

AW3B( IWVI . IWVI , IWVI ) = IWVI .EQ.

1

RETURN

END

BFCCP-(166)

t****t*t*t***ttt1lt1lt1l*t**1l*tttttttttttt*tttttttt*tlLtttttt*t1t*t*tt

GENERAL PURPOSE

1. T0 TEST LOGICAL FUNCTIONS IN FULL FORTRAN

2. DUMMY ARGUMENTS ARE RE A L , I N T E G E R , CO M P L E X , L 0 G I C AL

.

DOUBLE PRECISION, EXTERNAL PROCEDURE , ARRAY NAME.

3. FUNCTI0NS CONTAIN UP TO 20 ARGUMENTS

4. IN REFERENCE ACTUAL ARGUMENTS ARE VARIABLE NAME

ARRAY NAME. ARRAY ELEMENT NAME , AR I THMET I C EXPRESSION

EXTERNAL PROCEDURE

6. USE CAN BE MADE OF ADJUSTABLE D I MENTION

7. ARGUMENTS CAN BE PASSED THROUGH COMMON

RESTRICTIONS OBSERVED

1 . ITEMS(2) . (3) . (4) . (5) . (6) OF PARAGRAPH

2.LASt SENTENCE OF PARAGRAPH 3.2

THIS SEGMENT IS TO BE RUN WITH SEGMENTS

406, 416. 426. 436, 446, 456, 466, 476 WHICH

CONTAINS ALL FUNCTIONS BEING TESTED HERE.

LOGICAL FUNCTION OF REAL ARGUME NT ( TEST 1)

SPECIFICATIONS SEGMENT 166

P4650020

P4650030

P4650040

•P4650050

P4650060

P4650070

P4650080

P4650090

P46501 00

P 4 6 5 0 1 1 0 P46501 20

*P4 7 5 0 0 1 0 P 4 7 5 0 0 2 0 P4750030

P4750040

*P4750050

P4750060

P4750070

P 4 7 5 0 0 8 0 P4750090

P47501 00

P47501 1

0

P 4 7 5 0 1 2 0 P47501 30

P47501 40

P47501 50

P47501 60

P47501 70

P 4 7 5 0 1 8 0 P47501 90

P 4 7 5 0 2 0 0 P475021

0

P4750220

P4750230

P4750240

P4750250

P4750260

P4750270

P4750280

P4750290

P4750300

P475031

0

P4750320

•P1660010

PI 66 0 02 0 P 1 66 0 0 3 0 P 1 660040

*P 1 66 0 0 5 0 P 1 66 0 0 60

PI 66 0 0 7 0 PI 660 0 8 0 P1660090

PI 66 0 1 0 0 PI 66 0 1 1 0 P1660120

P1660130

PI 660 1 40

P 1 660 1 5 0 PI 660 1 60

PI 660 1 70

P 1 660 1 8 0 P1660190

PI 66 0 2 0 0 P1660210

PI 66 0220

PI 660 2 3 0 P 1 660240

P00 1 3 3 70

NBS FORTRAN Test Programs Version 1 155
C***** WHEN EXECUTING ONLY SEGMENT 166, THE SPECIFICATION STATEMENTS P0013375

C«*»** WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0013380

C««*** IN COLUMNS i AND 2 REMOVED. PqqYjYjj

C *.**.*.* PO0 1 3390

c= DIMENSION A1S(5).A2S(2.2),A3S(3,3.3) P0013395

c= INTEGER 111(5), 121(2, 2), 131(2, 2, 2) P0013400

c= LOGICAL AVB,AFB,BFB,CFB,DFB,EFB,FFB,GFB,HFB P0013405

c = 1 , A1B(2) ,A2B(2,2) ,A3B(2,2,2) P001 341

0

c = DOUBLE PRECISION AVD , A1 D ( 4 ) , A2D ( 2 , 2 ) . A3D ( 2 , 2 , 2) P001341

5

c= COMPLEX AVC,A1C(12),A2C(2,2),A3C(2,2,1) P001 3420

c= COMMON AXVS.CXVS P0013425

c= EXTERNAL AFB P0013430

DIMENSION A1S(5),A2S(2,2),A3S(3,3,3) P166A1

INTEGER 111(5), 121(2,2), 131(2,2,2) P166A2

LOGICAL AVB,AFB,BFB,CFB,DFB,EFB,FFB,GFB.HFB P166A3

1 , A1B(2) ,A2B(2,2) ,A3B(2,2,2) P166A4

DOUBLE PRECISION AVD , A1 0 ( 4 ) . A2 D ( 2 . 2 ) , A3D ( 2 , 2

,

2) P166A5

COMPLEX AVC,A1C(12),A2C(2,2),A3C(2,2,1) PI 66A6

COMMON AXVS.CXVS P166A7

EXTERNAL AFB P166A8

c * * * P0013435

c * * * * * OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1660250

c « * * * « P0072730

c * « * * * WHEN EXECUTING ONLY SEGMENT 166, THE FOLLOWING STATEMENT P0072735

c « « *

«

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072740

c= NUVI = 6 P0072745

NUVI = 6 P166B1

MAVI=1 P1660260

WRITE(NUVI ,1662) P1660270

1662 FORMAT( 1H1 , 1X.31HBFCCP - (166) LOGICAL FUN CT I ONS / / 2X

.

P1660280

1 13HASA REF 8 . 3 . 1 / / 2X . 7HRESU LTS ) P1660290

AVB = AFB(1 .0) PI 660300

IF (AVB) GO TO 1664 P1660310

WRITE(NUVI , 1661 ) MAVI PI 660320

GO TO 1665 PI 660330

1660 FORMAT (/7H TEST ,I2,12H IS POSITIVE) P1660340

1661 FORMAT (/7H TEST ,I2.12H IS NEGATIVE) P1660350

1664 WRITE(NUVI , 1660) MAVI P1660360

GO TO (1665,1666,1667,1668.1669,7030,7031,7032,7033,7034), MAVI P1660370

c « * «

»

* LOGICAL FUNCTION OF INTEGER ARGUMENT (TEST 2) P1660380

1665 MAVI=2 P1660390

AVB=BFB( 1

)

P1660400

IF (AVB) GO TO 1664 P1660410

WRITE(NUVI , 1661 ) MAVI P1660420

C*****LOGI CAL FUNCTION OF DOUBLE PRECISION ARGUMENT ( TEST 3) P1660430

1666 MAVI =3 P1 660440

AVD=1 .000 P1660450

AVB=CFB(AVD) P1660460

IF (AVB) GO TO 1664 PI 660470

WRITE(NUVI , 1661 ) MAVI P1660480

c * * «

«

« LOGICAL FUNCTION OF LOGICAL ARGUMENT(TEST 4) PI 660490

1667 MAVI =4 P1660500

AVB=DFB( .TRUE .

)

P1660510

IF (AVB) GO TO 1664 P1660520

WRITE(NUVI , 1661 ) MAVI P1660530

C»«t«*LOGI CAL FUNCTION OF COMPLEX ARGUMENT ( TEST 5) P1660540

1668 MAVI =5 PI 660 5 50

AVB = EFB((1 .0,1 .0)) P1660560

IF (AVB) GO TO 1664 P1660570

WRITE(NUVI , 1661 ) MAVI P1660580

C***** LOGICAL FUNCTION OF ARRAY NAME (TEST 6) P1660590

1669 MAVI =6 P1660600

AlSd ) = 1 .0 PI 66061 0 A1S(2)=0.0 P1660620

AVB=FFB(A1S) P1660630

IF (AVB) GO TO 1664 P1660640

WRITE(NUVI , 1661 ) MAVI P1660650

c * * * t * LOGICAL FUNCTION OF EXTERNAL PRO CEDURE ( TEST 7) P1660660

156 NBS FORTRAN Test Ppogrems Version 1
7030 MAVI=7

AVB= GFB(AF8,1.0)

IF (AVB) GO TO 1664

WRITE(NUVI , 1661 ) HAVI

P1660670

P1660680

P 1 6 6 0 6 9 0 P1660700

Pi 66071 0 P1660720

P1660730

PI 660 740

P 1 6 6 0 7 5 0 PI 660760

P1660770

PI 660 7 8 0 PI 6 6 0 7 9 0 PI 660 8 0 0 P1660810

PI 660 8 20

P 1 6 6 0 8 3 0 PI 660 8 4 0 PI 660 8 5 0 PI 660 860

PI 660 8 70

PI 660 8 80

PI 660890

PI 660900

PI 6609 1 0 PI 660920

PI 660930

PI 660 940

P 1 6 6 0 9 5 0 PI 660960

P 1 6 6 0 9 7 0 PI 660980

PI 660990

PI 66 1 0 0 0 P1661010

PI 66 1 020

PI 6 6 1 0 3 0 P1661040

P 1 6 6 1 0 5 O' PI 66 1 060

P 1 6 6 1 0 7 0 PI 66 1 080

PI 66 1 090' PI 661 1 00

P 1 6 6 1 1 1 0 PI 661 1 20

P 1 6 6 1 1 3 0 PI 661 1 40

P 1 6 6 1 1 5 O' P166C1

P166C2

P406001

0

P 4 0 6 0 0 2 0 P4060030

P4060040

P4060050

P4060060

P4060070

P4060080

P4060090

P 40 6 0 1 0 0 P4 1 6 0 0 1 0 P 4 1 6 0 0 2 0 P41 60030

P 4 1 6 0 0 4 0 P4 1 60 0 5 0 P41 60060

P41 60070

C * t 7031

LOGICAL FUNCTION OF DIFFERENT TYPES OF ARGUMENTS

MAVI=8

AVb = i.ODO

AVC = (1.0.1.0)

I AVI = 1 AVB=.TRUE.

AiB(i ) = .tRUE.

A2B(1 . 1 )=.TRUE.

A3B(1 ,1.1 )=.TRUE.

A1C(1)=(1 .O.T.O)

A2C( 1 . 1 ) = ( 1 .0. 1 .6)

A3C(1 , 1 ,1 )=(-2.0,-2 0)

AlOd ) = 1 .000

A2D(1 . 1 ) = 1 .000

A3D( 1 .1.1 )=-2.bb6

I 1 I ( 1 ) = 1 121(1. 1)=1

13 I ( 1 . 1 . 1 ) = 1 A1S( 1 ) = 1 . 0 A2S(1 . 1 ) = 1 .0 A3S(1 , 1 , 1 ) = 1 .0 AXVS=1.0

AVB= HFB(AVS. I AV r^AVB , AVD^AV C . A 1 S . A2 S . A3 S . I 1 I ,121 ,131 .AiB,A2B,'

1A3B, A1 C, A2C, A3C.A1D, A2D,A3D.AFB)

7032

IF (AVB) GO TO 1664

WRITE(NUVI , 1661 ) MAVI

MAVI = 9

I AVI =AVD

IF( lAVI .EQ.O) GO TO 1664

WRITE(NUVI . 1661 ) MAVI

7033 IAVI=1

MAVI =1

0

I AV I =AVS

IF( lAVI .EQ 0) GO TO 1664

WRITE(NUVI , 1661 ) MAVI

7034 MAVI=11

WRITE(NUVr, 1 663 ) f^yQ^Jf^^J1663 FORMAT (//2F8.4//7H TEST I2,31H IS POSITIVE IF NUMBERS PRINTED/

119H ABOVE ARE 0 . 0 , 0 . 0 / / 2X , 1 2HE ND OF (166))

** END OF TEST SEGMENT 166

*'* WHEN EXECUTING ONLY SEGMENT 166, THE STOP AND END

** WHICH APPEAR AS COMMENT CARDS MUST HAVE .THE C= IN ** COLUMNS 1 AND 2 REMOVED.

STOP

C * * * c * * * c * * * CARDS

C * *

«

c=c= END

STOP

END

C*

C*

C*

C*

C*: C*

AFB ( 406 )

*

*

C * t c**

c * * c * * c * * c * *

logical function of real argument (test 1)

logical function afb(awvs)

afb= awvs.gt.o.o

RETURN

END

BFB - (416)

LOGICAL FUNCTION OF INTEGER ARGUMENT (TEST 2)

LOGICAL FUNCTION BFB(IWVI)

NBS FORTRAN Test Programs Version 1 157
BFB= IWVI.GT.O P41600S0

RETURN P4160090

END P 4160 100

Ct*«*t«*««***t«*«*«****t««*«t«*««**««*t**t********««t«ttt«*««***********P4260010

C* *'* *'* P4260 020

C«**** CFB - (426) P4260030

C***** P4260040

C****************t**«***it***«*****t*ti**«i*t*i*****rlr <;t** tt**t*t***t*P4260050

C****«LOGI CAL FUNCTION OF DOUBLE PRECISION ARGUHE N T ( TE ST 3 ) P4260060

LOGICAL FUNCTION CFB(AWVD) P4260070

DOUBLE PRECISION AWVD P42600 8 0 CFB= AWVD.GT.O.ODO P4260090

RETURN P4Z60100

END P4260 1 1 0 C**i»*************»t***«*****«***«******t**t*«********«***iir**************P4360010

C***»* P4360020

C***** DFB - ( 436 ) P436003 0 C***** P4360040

Q************«******tt*t*ttttit*****tt**it*t**it***t**t*t***t*t****ttt P4360050

C«** «*LOGICAL FUNCTION OF LOGICAL ARGUMENT (TEST 4) P4360060

LOGICAL FUNCTION DFB(AWVB) P43600 70

LOGICAL AWVB P4360080

DFB = AWVB P4360090

RETURN P4360100

END P4360 1 1 0 Q***t***************«***«*«**ti***«**ir «:** ******t***t t** ***«:*****P4460010

C * » * • * ""P 4 4 6 0 0 2 0 C* * * * EFB - ( 446 ) P4460 03 0 C***** P4460 040

[;*****«*****«*************t*»»**tt*****«*******t*******«t*****t« «** «P4460050

C*****LOGI CAL FUNCTION OF COMPLEX ARGUMENT ( TEST 5) P4 460 060

LOGICAL FUNCTION EFB(AWVC) P4460070

COMPLEX AWVC P4460080

AVS =AIMAG(AWVC) P4460090

EFB = AVS .GT.0.0 P 4 460 1 00

RETURN P4460110

END P4460 1 2 0 C**********»«»«t************««*«*»«»t*»*«*t***«t***«*«*****«««tt*«**»***P4560010

C***** P4 5 60 020

C* * * FFB - ( 4 5 6 ) P4 5 60 0 30

C***** P 4 5 60 0 40

C***t*********«;******it*:*****t**t t** ««*«;***«***it**<r*«****tr*****lt tP4560050

C** *»*LOGICAL FUNCTION OF ARRAY NAME (TEST 6) P4 5 60060

LOGICAL FUNCTION FFB(AWIS) P4560070

DIMENSION AW1S(2) P4560080

BVS =AW1S( 1 )+AWlS(2) P4560090

FFB= BVS . GT . 0 . 0 P4 560 1 00

RETURN P4560110

END P4 5 60 1 2 0 C**4r*****it*«*ilr*******«*ilr*ilr*******«***ilrt**t*****tt****ik*t****t***t***«**«P4660010

C* * * * * P4660 020

C***** GFB - ( 466 ) P 4660 03 () C **"*** P4660040

Clt*«***ittilr«******«**t*******t***«*«**********il[*t**i;t**tt**t*«***t*«r***«tP4660050

C* * * * * L 0 G I C A L F U N C T I 0 N 0 F E X T E R N A L P R 0 C E D U R E ( T EST 7 ) P 4 6 6 0 060

LOGICAL FUNCTION G F B ( AW F B , AW VS ) P4660070

LOG I CAL AWFB P4660 0 8 0 GFB= AWFB(AWVS) P4660090

RETURN P4660 1 00

END P4660 1 1 0 C**********«*«*******«*t**«****************«***t*t*****«**«**rlr**********P4760010

C***** P4760020

C'« * * H F B

'

' - ( 476 ) P 4 760 0 3 0

C,*,* *,* * P4 760 0 40

C*«*«t*«***«»«»*t**«*«****t«***»»*t*«**«t*****«***t*«n««*«*«**»*»*«**««*P4760050

C*****LOGI CAL FUNCTION OF DIFFERENT TYPES OF AR G U M E N T S ( T E S T 8,9,10,11) P4760060

LOGICAL FUNCTION HFB(AWVS, IWVI , AW V B , AW VD , AW V C , AW 1 S , AW 2 S , A W 3 S , P4 7600 70

1|k1 I , I W2 I , I W3 I , AW1 B , AW2B , AW3B , AW^^^ ,AW3C,AW1D,AW2D, AW3D , AWFB) P4 760080

158 NBS FORTRAN Test Programs Version 1
COMMON BXVS P4760090

COMPLEX AWVC, AW1 C,AW2C,AM3C P4760 1 00

DOUBLE PRECISION AWVO , AW 1 D , AW30 , AW20 P47601 1

0

LOGICAL AWVB,AW1B.AW2B,AW3B,AWFB P4760120

i) i MENS i ON AWi C( i WVi ) , AW2C( i WVI , 2")

, AW3C( i wvi , 2 . 2) ,

1 AW1B( IWVI ) ,AW2B( IWVI ,2) ,AW3B( IWVI ,2,2) , P4760 1 30

P4760 1 40

2 AW1S( IWVI ) ,AW2S( IWVI ,2) ,AW3S( IWVI ,2,2) , P4760 1 5 0 3 AWI D ( I WVI )

, AW2D < I WVI , 2 ) , AW3D ( I WVI , 2, 2 )

, P4 760 1 60

4 I W1 I ( I WVI ) , I W2 I ( I WVI , 2 ) , I W3 I ( I WVI , 2 , 2 ) P 4 760 1 70

HFB = AWVB . AND . AW 1 B ( I WV I ) . AND . AW2 B ( I WV I

, I WV I ) . AND . AW3B ( I WVI

,

P 476 0 1 8 0

1 IWVI , IWVI ) .AND.AWFBd .0) P4-7 6 0 1 9 0 AWVC=AW1C(IWVI)+AW2C(IWVI,IWVI)+AW3C(IWVI, IWVI, IWVI) P4f 6 0 2 0 0 AWVD=AW1D(IWVI)+AW2D(IWVI,IWVI)+AW3D(IWVI,IWVI,IWVI) P4760210

AWVS=BXVS+AW1S(IWVI)**IW1I(IWVI)-AW2S(IWVI,IWVI)**IW2I(IWVI, IWVI) P4760220

1 -AW3S(IWVI, IWVI, IWVI)**IW3I(IWVI, IWVI, IWVI) P4760230

RETURN P4760240

END P4760250

Ctt »** ******«*«*«t*********«*******t*«***««***«*****t «** *«***t*tpi670010

c * * * * * P1670020

C*«*** SBRTN - (167) P1670030

c * * * * * PI 6700 40

Q***<t**********t**t***t*ttik*t4r*********t**t*t******t********t***t*******P1670050

C«**** GENERAL PURPOSE ASA REFSP1670060

Cttttt TO TEST SUBROUTINE SUBPROGRAMS 8 4.1 P1670070

Ct*««« RESTRICTIONS OBSERVED PI 6 7 0 0 8 0 C*«*** SYMBOLIC NAME OF A SUBROUTINE MAY NOT APPEAR IN ANY 8.4. 1 . //19P 1 6 70 090

Ct«*** STATEMENT IN THIS SUBROUTINE EXCEPT IN THE PI 6 70 1 0 0 C***«* SUBROUTINE STATEMENT ITSELF P 1 6 70 1 1 0 Ct**** * SYMBOLIC NAMES OF DUMMY ARGUMENTS MAY NOT APPEAR 8.4. 1 . 1 /23P 1 6 70 1 2 0 C***«* IN EQUIVALENCE OR COMMON STATEMENTS IN THE SUBPROGRAM P1670130

C*«*«* * SUBROUTINES MAY NOT CONTAIN A FUNCTION STATEMENT, 8-.4. 1 .//29P1670140

Ct»««* ANOTHER SUBROUTINE STATEMENT, OR ANY STATEMENT THAT P16701 50

Ct**** DIRECTLY OR INDIRECTLY REFERENCES THE SUBROUTINE P1670160

C**»** BEING DEFINED. P1670170

C***** * AT LEAST ONE RETURN STATEMENT MUST BE IN A SUBROUTINE P16701 80

C***** 8.4. 1 . 1 /33P 1 670 1 90

C***** GENERAL COMMENTS P1670200

C***** THIS SEGMENT IS TO BE RUN WITH SEGMENT 407, 417, 427 P1670210

c * « * * * P1670220

C***** SPECIFICATIONS SEGMENT 167 P1670230

c * * * * * P0013440

C***** WHEN EXECUTING ONLY SEGMENT 167, THE SPECIFICATION STATEMENTS P0013445

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0013450

C***** IN COLUMNS 1 AND 2 REMOVED. P001 3455

c * * * P0013460

C= DIMENSION IAB1I(4), IAB2I(3,3), AB1S(4), AB2S(3,3) P001 3465

C= COMMON AXVS, CXVS. IXVI, IAX1I(4), IAX2I(3,3), I AX3 I ( 2 , 2 . 2 )

,

P0 0 1 3 4 70

C= 1 BXVS, AX1S(4), AX2S(3,3) P001 3475

C= EXTERNAL SORT P0013480

DIMENSION IAB1I(4), IAB2I(3,3), AB1S<4), AB2S(3.3) PI 67A1

COMMON AXVS, CXVS, IXVI, IAX1I(4). IAX2I(3.3), I AX3 I ( 2 . 2 , 2 )

.

P167A2

1 BXVS, AX1S(4), AX2S(3,3) PI 67A3

EXTERNAL SORT P167A4

C * * * «

P0013485

C**««* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE P1670240

c * * * * * P0072750

C*»»** WHEN EXECUTING ONLY SEGMENT 167, THE FOLLOWING STATEMENT P0072755

C**»** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072760

C= NUVI = 6 P0072765

NUVI = 6 P167B1

c * * * * * P0072770

C***** WRITE HEADING P1670250

WRITE (NUVI, 1670) P1670260

1 670 FORMATdHI , 1X,35HSBRTN - (167) SUBROUTINE SUBPROGRAM/ PI 67 02 70

1 /2X,16HASA REF. - 8 . 4 . 1 / / 2X , 7HRESULTS

)

P1670280

C*«««* SET ALL VARIABLES AND SOME ELEMENTS IN ARRAYS TO 2ER0 P1670290

lAVI = 4 PI 6703 00

AVS = 0.0 P1670310

NBS FORTRAN Test Programs Version 1 159
IAB1 I ( 1 ) = 0 P1670320

IAB1I(3) = 0 P1670330

IAB2I(1.2) = 6 PI 670340

IAB2I(3,3) = 0 P1670350

t***** PI 676360

AB1S( 1 ) = 0.0 P1670370

AB1S(4) = 0.0 PT6703 86

AB2S(1 ,3) = 0.0 P1670390

ABZS(2,3) = b.O p 1 6 70^00

C***t* P1670410

I XV I = 0 P I 6 764 20

BXVS = 0.0 P1670430

IAX1 I (2) = 6 PI 670440

IAX2I (1 ,2) = 0 P1670450

C***** PI 670460

AX1S(2) = 0.0 P1670470

AX2S(1.2) = 0.6 PI 676486

C***** P1670490

C**«*. SET ELEMENTS IN INTEGER AND REAL ARRAY TO 1 TO TEST [3 1 670 5 00

C***** EXPRESSIONS IN SUBROUTINE ARGUMENT P1670510

lABIKZ) = 1 P1 670 520

IAB1I(4) = 1 P1670530

IAB2I (2, 1) = i

•

• p:,^7Q5^Q

IAB2I(2,2) = 1 P1670550

t***** P'i 670566

AB1S(2) = 1.0 P1670570

AB1S(3) = 1.0 PI 670 5 80

AB2S(1,2) = 1.0 P1670590

AB2S(2,2) = 1.6 PI 670600

C»**** P1670610

CALL AAOHAVI. AVS, lABII. IAB2I. AB 1 S /AB 287' SORT , " P1 676626

1IABlI(2)+IAB1I(4)tIAB2I(2.1)-IAB2I(2,2), P1670630

2AB1S(2)+AB1S(3)*AB2S(1,2)-AB2S(2.2),1.6? P1670646

CALL ACQ P1670650

tt**tt WRITE RESULTS PI 670666

WRITE (NUVI,1671) lAVI, AVS. lABIKI). IAB1I(3), IAB2I(1,2). P1 670670

A IAB2I(3,3). ABIS(I). AB1S(4), P1 670680

B AB2S(1.3). AB2S(2,3), IXVI, BXVS. P1670690

C IAX1I(2). IAX2I(1.2). AX1S(2). Pi670700

D AX2S(1.2) P1670710

16 71 FORMAT ( / / I 1 0 / F 1 1 . 1 / 4 ( I 1 0 / ) . 4 ( F 1 1 . 1 / ) , I 1 0 / F 1 1 . 1 ^ 2 ( j 1 6/ ) 72 ( F 1 1

.^^ P 1 6707 20

A)) P1670730

WRITE (NUVI,1 672 ) P1 670740

1672 FORMAT ( / / 2X , 38HTEST SUCCESSFUL IF ALL RESULTS EQUAL 1//) P1670750

C**«** END OF TEST SEGMENT 167 P1670760

Ct**** WHEN EXECUTING ONLY SEGMENT 167. THE STOP AND END CARDS P1670770

C*«**t WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= Pi670780

Ctt««t IN COLUMNS 1 AND 2 REMOVED. P1670790

C:= STOP P1 670806

C= END P1670810

STOP Pi67C1

END P167C2

c*t*t***t***t «t«** *t**t*t**t*tttt***tt****t*t***«*«t*tt*t*tt*ttt*tt*P46766i6

C*»*** P4070020

C* * * * * AAO - (467') P 4 0 7 00 30

C** vv* P40 700 40

C**********tt***ttt*tt*t*t***t***t**« ttt** ****«*t***t*t***t*t*t****tP4070050

C»tt** THIS SUBROUTINE IS TO BE RUN WITH SEGMENT 167 P4070060

SUBROUTINE AAQ (IWVI, AWVS. IAW1I. IAW2I. AW1S. AW2S7SQF1, P4070076

1MWVI, BWVS. CWVS) P4070080

DIMENSION IAW1I(4). I AW2 I ( 3 , 3 ) , AW 1 S ( 4 ) , P4070096

1 AW2S(3,3) P4070100

IWVI = INTCSQFKFLOATdWVI) + .5)) - 1 P4070 1 1 0 AWVS = AWVS + 1.0 P4070120

I AVI = 5 P46701 36

IAW1 1(1) = MWVI P4070140

IAW1I(3) = IAW1I(3) +1 P4070156

IAW2I(3.3) = IAW2I(3.3) + 1 P4070160

160 NBS FORTRAN Test Programs Version 1
AWISd) = BWVS P40 70 1 70

AW2S(1,.3) = CWVS P40 70 1 8 0 C*»*»» PA070190

C*«*»« CALL A SUBROUTINE FROM ANOTHER SUBROUTINE P4070200

CALL AB0(iAW2i. AWIS. AW2S) P4070210

RETURN , P4070220

END P40 7023 0 Ct***t**t t** **t**t«i t** «:****t*********t*********«*t*«****t*****ttP4 1 70010

C *'»«« P4 1 70 0 2 0 C***** ABO - (417) P4170030

C *'*»'*"* P4 1 70 0 4 0 C*t********t*t*t****«*******t*t***«*t*******t*t***t**t*************tt***P4l70050

SUBROUTINE A B 0 ( I C W 2 I . C W 1 S . C W 2 S ) P 4 1 70060

DIMENSION irW2I(3,3). CW1S(4), CW2S(3.3) P4170070

ICW2I(1.2) = ICW2I(1,2) + 1 P4 1 70 08 0 C***** P41 70090

cwTs

('4 ) = c w 1 s

('4)

+

V.6 P 4 1 7 0 1 0

0

CW2S(2.3) = CW2S(2,3) + 1.0 P4170110

RETURN P4170120

END P4 1 70130

Q***t«**********ttt*****ir*******« t** ***********<i****t*«rt****t**tt*«*P4270010

C****« P4270020

C'*'*

*"*"* a c q" "- U'

2

7'

) P 4 2 7 0 0 3 0 C«***.« P4270040

C*******t**********t*t****«t*************t*****t***************t*******«P4270050

SUBROUTINE ACQ P4270060

DIMENSION 10X11(4), 10X21(3,3), 10X31(2,2,2) P4270070

1 ,AAX1S(4), AAX2S(3,3) P4270080

cMmON AB)(VS, ACXVS, IAXVI, 1DX1I, IDX2I, IDX3I. P42 70 0 90

1 AAXVS. AAXIS, AAX2S P4270100

lAXVT = IAXVI + 1 P 42 70 1 1 0 AAXVS = AAXVS +1.0 P4270120

IDX1 1(2) = IDX1 I (2) + 1 P 42 70 1 3 0 10X21(1,2) = IDX2I(1,2) + 1 P4270140

C"***'** P 42 70 1 5 0 AAX1S(2) = AAX1S(2) * 2. + 1.0 P4270160

AAX2S(1,2) = AAX2S(1,2) + 4.0 - 3.0 P 42 70 1 70

C***** P4270120

RETURN P 4 2 7 0 1 9 0 C**«*t END OF TEST SEGMENT 427 P4270200

END P 42 702 10

£,tt**t*t*****t**t*t***t**t**tt***t***iit**t**ttt*tii*t***tt*t**ii**t*t*t*ttP]i)&00'\0

C * * * * * P 1 6 8 0 0 2 0

C *.*.*, ** F S B R T : ( .1 .6 8 ) P 1 6 8 0 0 3 0 C * * * * * P 1 6 8 0 0 4 0 C*t«t****t**t «** *t*t*********«*******t*********t**it********t***«****«P'i680050

C * * * GENERAL PURPOSE A S A R E F S P 1 6 8 0 0 6 0 C«**«« TO TEST SUBROUTINE SUBPROGRAM IN FORTRAN 8.4.1 P1680070

C***** RESTRI CTI(3NS OBSERVED P 1 68 0 0 8 0 C«t»«» SYMBOLIC NAME OF A SUBROUTINE MAY NOT APPEAR IN ANY 8 . 4 . 1 . 1 / 5 6 P 1 6 8 0 0 9

0

C***«* STATEMENT IN THIS SUBROUTINE EXCEPT IN THE P 1 68 0 1 0 0 C«**** SUBROUTINE STATEMENT ITSELF. P1680110

C«***« * SYMBOLIC NAME OF DUMMY ARGUMENTS MAY NOT APPEAR 874 . i . 1 / 3 9 P 1 6 8 0 1 2 0 C»*«** IN EQUIVALENCE OR COMMON STATEMENTS IN THE SUBPROGRAM P1680130

C**T*'*

t

SUBROUTINES MAY NOT CONTAIN A FUNCTION STATEMENT, 8 . 4 . 1 . 1/ 4 5 P 1 6 8 0 1 4 0 C*t*«* ANOTHER SUBROUTINE STATEMENT, OR ANY STATEMENT THAT P1680150

t'*"*"*'*'* DIRECTLY OR INDIRECTLY R E F E R E N C E S THE SUBROUTINE P 1 6 8 0 1 60

C«*««« BEING DEFINED. P1680170

C**«** * AT LEAST ONE RETURN STATEMENT MUST BE IN A SUBROUTINE P 1 6 8 0 1 8 O' C***** 8.4.1 .1/49P 1 6 8 0 1 90

C * « * « * GENERAL C 0 M M E N T S P 1 6 8 0 2 0 0 C»*««« THIS SEGMENT IS TO BE FtUN WITH SEGMENT 40 8 , 4 1 8, 42 8 P 1 6 8 0 2 1 0 C * * * * « P 1 6 8 0 2 2 0 C«***« SPECIFICATIONS SEGMENT 168 P1680230

C

«'« * » « P 0 0 1 3 4 9 0 C«***« WHEN EXECUTING ONLY SEGMENT 168, THE SPECIFICATION STATEMENTS P0013495

C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0013500

C****« IN COLUMNS 1 AND 2 REMOVED. P0013505

NBS FORTRAN Test Programs Version 1 161
c * * * * * c=c=

c=

c=

c =

c = c=c=

c=

c = c=

c=

P0013510

P I HENS I ON IAB1 1(4), IAB2I (3,3) ^ I.AB3 1.(2 ,2 ,2 ),, AB1,S,(.4),, AB2S (.3, 3.).., PO 0.1,3 5 1.5 AB3S(2.2.2)

COMMON AXVS. CXVS. IXVI, IAX1I(4), IAX2I(3.3)

A BXVS. AX1S(4). AX2S(3.3), AX3S(2.2.2).

B AX2D(2,2). AX3D(2,2.2). AXVC. AX1C(2),

C AX3C(2,2,2). AXVB, AX1B(2), AX2B(2,2),

DOUBLE PRECISION AXVD, AX1D, AX2D. AX3D

DOUBLE PRECISION AVD , A 1 D ( 4 ) , A2 D ( 2 , 2 ) , A3 D ( 2 . 2

,

COMPLEX AXVC, AX1C, AX2C. AX3C

COMPLEX AVCAI C( 12) ,A2C(2.2) ,A3C(2,2, 1 ) LOGICAL AXVB, AX1B, AX2B, AX3B

LOGICAL A1B(2) ,A2B(2,2) ,A3B(2,2,2) ,AVB

DIMENSION IAB1I(4), IAB2I(3,3), I AB3 I ( 2 . 2 , 2 )

.

A AB3S(2,2,2)

COMMON AXVS, CXVS, IXVI, IAX1I(4), IAX2I(3,3)

A BXVS, AX1S(4), AX2S(3,3), AX3S(2,2,2),

B AX2D(2,2), AX3D(2,2,2), AXVC, AX1C(2),

C AX3C(2,2,2), AXVB, AX1B(2), AX2B(2,2),

DOUBLE PRECISION AXVD, AX1D, AX20, AX3D

DOUBLE PRECISION AVD , A 1 D ( 4 )

, A2 D ( 2 , 2 ), A3 0 ( 2 , 2

,

COMPLEX AXVC, AXlC, AX2C, AX3C

AVCAI C( 1 2 ) , A2C( 2 , 2 ) , A3C( 2 AXVB, AX18, AX2B, AX3B

A1B(2) ,A2B(2,2) ,A3B(2,2,2)

, IAX3I(2,2.2),

AXVD. AX10(2),

AX2C(2.2)

.

AX3B(2.2,2)

2 )

AB1S(4), AB2S(3.3)

, IAX3I(2,2,2)

AXVD, AX1D(2),

AX2C(2,2)

,

AX3B(2,2,2)

2)

COMPLEX

LOG I CAL

LOG I CAL

2,1)

AVB

C » * t

«

C t *

c « « * * » c * * » * *

C =

c * * « *

«

c

* * « *

«

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 168

NUVI = 6 MUST HAVE THE C^ IN NUVI = 6 NUVI = 6

THE FOLLOWING

COLUMNS 1 AND

STATEMENT

2 REMOVED

IN ARRAYS TO ZERO

1680

SET INTEGER VARIABLES AND SOME ELEMENTS

WRITE HEADING

WRITE (NUVI, 1680)

FORMAT (1H1 , 1X,36HFSBRT - (168) SUBROUTINE SUBPROGRAMS/

8.4. 1 //2X, 7HRESULTS)

C « « »

«

A/18H ASA

lAVI = 0 IAB1 I ( 1

)

IAB2 I ( 1

,

I AB3 I ( 1

,

IXVI = 0

I AX1 I ( 1 )

I AX2 I ( 1

,

I AX3 I ( 1

,

» SET

AVS = 1

.

AB1S( 1

)

AB2S( 1

,

AB3S( 1

.

BXVS = AX1S(2)

AX2S( 1

.

AX3S( 1

,

REF

= 0 2) = 1,2)

: 0 2) = 1,2)

REAL

= 0

= 0 VARIABLES AND SOME ELEMENTS IN ARRAYS TO ONE

C « * * t

«

SET

: 1 2 ) = 1.2)

1

.

= 1 2) = 1,2)

DP

1 . = 1

1 . = 1 . VARIABLES AND SOME ELEMENTS IN ARRAY TO TWO

AVD = 2.000

A 1 D ( 1 ) = 2 . 0 D 0 A2D( 1 .2) = 2. ODD

A3D(1.i,2) = 2.0b0"

AXVD = 2. ODD

AXID(I) = 2.000

AX2D(1 ,2) = 2. DO

AX3D(1 ,1,2) = 2.0D0

C*«*** SET COMPLEX VARIABLES

AVC = (3.0,3.0)

A1 C( 1 ) = (3.0,3.0)

A2C(1,2) = (3.0,3.0)

A3C(1 ,2,1) = (3.0,3.0)

AND SOME ELEMENTS IN ARRAYS TO (3.0,3

P0013520

P0013525

P6013536

P0013535

P00 1 3 5 4() P0013545

POO 1 35 5 0 P0013555

POO 1 3 560

P0 0 1 3 565

P0013570

, P168A1

P168A2

" P168A3

P168A4

PI 68A5

P168A6

PI 68A7

PI 68A8

PI 68A9

PI 68AA

P168AB

P 1 6 8 A C P001 3575

PI 68 0 2 40

P0072780

P007278 5 P0072790

POO 72 795

PI 68B1

PI 68 02 5 0 P1680260

P1680270

PI 6 8 02 80

PI 6 8 0 2 9 0 PI 68 03 00

P I 68 03 1 0 P1680320

P1680330

P1680340

P I 68 03 5

0' PI 68 0 360

PI 6803 70

PI 68 03 80

P 1 6 8 0 3 9 0 PI 68040 0 PI 6 8 0 4 1 0 PI 68 0 420

PI 6 8 0 4 3 0 PI 68 0 440

P 1 680 4 5 () PI 68 0460

Pi 68 04 70

P1680480

P 1 6 8 0 4 9 0 P1680500

Pi 6 8 0 5 16

P1680520

Pi680530

P1680540

P 1 6 8 0 5 5 0 0)P1680560

PI 68 0 5 70

PI 6 8 0 5 80

P1680590

P1680600

162 NBS FORTRAN Test Proorams Version 1
AXVC = (3.0,3.0)

AXICd ) = (3.0,3.0)

AX2C(1 ,2) = (3.0,3.0)

AX3C(1 , 1 ,2) = (3.0, 3.0)

C*';««« SET LOGICAL VARIABLES AND SOME ELEMENTS IN ARRAYS TO

AVB = .FALSE.

FALSE .

A1B(1 ) = . FALSE . A2B(1 ,2) = . FALSE

.

A3B(1 ,1.2) = .FALSE.

AXVB = .FALSE.

AX1 B(1 ) = . FALSE

.

AX2B( 1 ,2) = .FALSE.

AX3B(1 ,1,2) = .FALSE.

C*«*** SET INTEGER AND REAL VARIABLES FOR EXPRESSION USAGE IN C***** DUMMY ARGUMENT

IAB1 I ( 4 ) = 0 IAB1 1(2) = 0 AB1S(4) = 0 . 0 AB1S(2) = 0.0

JAVI = 1 KAVI = 1 LAVI = 1 MAVI = 1 NAVI = 1 ABVS = 1 . ACVS = 1 . ADVS = 2. AEVS = 2.

1681

1682

C * «

t

C t «

C * 1

1

c * * * c=c=

C t «

t

c «

«

c * * * C « t * c « »

C t * t

P1680610

PI 68 0 62 0 P1680630

P1620640

PI 6806 5 0 PI 6 8 0 66 0 PI 68 0 6 7 0 PI 68 06 8 0 P 1 6 8 0 6 9 0 PI 68 0 70 0 P 1 6 8 0 7 1 0 PI 6 8 0 72 0 PI 6 8 0 73 0 P 1 68 0 7 4 0 PI 68 0 7 5 0 PI 68 0 760

P 1 6 8 0 7 7 0 PI 68 0 7 8 0 P 1 6 8 0 7 9 0 PI 68 0 8 0 0 PI 68 0 8 1 0 PI 6 8 0 8 2 0 PI 6 8 0 8 3 0 PI 68 0 8 40

PI 6 8 0 8 5 0 PI 6 8 0 8 60

PI 6 8 0 8 70

PI 6 8 0 8 8 0 PI 68 0 8 90

PI 68 0 9 0 0 P 1 6 8 0 9 1 0 PI 6 8 0 92 0 PI 68 09 3 0 PI 6 8 0 9 4 0 PI 68 09 5 0 P1680960

PI 6 8 09 70

PI 6 8 0 9 8 0

, PI 6 8 0 99 0 PI 6 8 1 0 0 0 P 1 6 8 1 0 1 0 PI 6 8 1 02 0

P 1 6 8 1 0 3 0 P1681040

P 1 6 8 1 0 5 0 P1681060

P1681070

P1681080

PI 68 1 0 90

P1681 100

P 1 6 8 1 1 1 0 P1681 120

P 1 6 8 1 1 3 0 P1681 140

P 1 6 8 1 1 5 0 PI 681 1 60

P168C1

P168C2

*«*t*t*t**tt********t***tt*t«******tt********iiritt**«*********it**tt***P4080010

*« ° P4080020

'« * ADO - ( 408 ) P4080030

»* P408004 0

AFVS = 2.

CALL ADQ( lAVI , IAB1 I , IAB2I. IAB3I

A AID, A2D, A3C), AVC, A1C,

B JAVI +KAVI «LAVI-MAVI /NAVI

WRITe ( NUVI , 1681

)

CALL AFQ

FORMAT ( /28H TEST IS SUCCESSFUL

A28H GROUP CONTAINS SAME VALUES)

WRITE (NUVI, 1 682 ) lAVI, lABIKI), IAB1I(2), IAB1I(4), IAB2I(1

A I AB3 I ( 1 , 1 , 2 ) . IXVI, lAXlId), IAX2I(1,2),

AVS, AB1S, AB2S, AB3S, AVD,

A2C. A3C, AVB, A1B, A2B, A3B,

1 ,ABVS+ ACVS* ADVS- AEVS /AFVS, 2.

)

IF EACH/

2 )

AB1S(2) ,AB1S(4)

6C2)

D

E

FG

H FORMAT (

12

3

4

* END

IAX3I ( 1,

1

BXVS.

2), AVS

AX1S(2)

A1D( 1 ) . A2D( 1 , 2 )

.

AX2D(1,2), AX3D(1

A3C(1 ,2,1), AXVC,

AX3C(1 ,1,2), AVB,

AX1 B( 1 ) , AX2B (1 , 2

)

AB1 S( 1 ) , AB2S (1 , 2 ) , AB3S( 1

,

1

AX2S ( 1,2), AX3S( 1 ,1,2), AVD,

A3D (1,1,2), AXVD, AXID(I),

1,2), AVC , A1C( 1 )

, A2C( 1 , 2 ) , AX1 C( 1 ) , AX2C( 1

, 2 )

,

A2B(1 , 2 ) AX3B (1 , 1 A1 B( 1 ) A3B( 1 2)

1,2)

AXVB

10(110/)/

10(F11.1/)/

8 ( 1 PD1 5 . 1 / ) / 8(0PF5 . 1 , F5 . 1 / ) 7

8(L10/) ) OF TEST SEGMENT 168

* WHEN EXECUTING ONLY SEGMENT 168, THE STOP AND END CARDS

** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN ** COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

'* SUBROUTINE ADO CALLED BY SEG. FSBRT(168)

SUBROUf INE ADGK IWVI , IAW1 I , I AW2 I, I AW3 I, AWVS , AW 1 S , AW2 S , AW3 S

,

A AWVD,AW1D,AW2D,AW3D,AWVC,AW1 C, AW2C,AW3C,

"B AWVB,AW1B,AW2B,AW3B,KWVI ,MWVI ,BWVS, CWVS)

DIMENSION IAW1I(4), IAW2I(3,3), I AW 3 I ( 2 , 2 , 2 ) , AW1S(4), AW2S(3 3 )

P4080060

P4080070

P4080080

P4080090

P4 0 8 0 1 0 0

NBS FORTRAN Test Programs Version 1 163
A AW3S(2.2,2). AW1D<2). AM20(2.2). AW30(2,2,2). AW1C(2). P4080110

B AW2C(2,2), AW3C(2.2,1), AW1B(2), AW2B(2,2), P4080120

C AW3B(2,2, 2) P408bT36

DOUBLE PRECISION AWVD, AW1D, AW2D. AW3D P4080UO

COMPLEX AWVC, AW1C, AW2C, AW3C P4080T56

LOGICAL AMVB, AU16, AM2B, AM3B P4080160

C«**** STORE INTEGER AND REAL EXPRESSIONS P4b80176

IAW1I(4) = KWVI P4080180

IAW1I(2) = MWVI P4080 1 9b

AW1S(4) = BWVS P4080200

AW1S(2) = CWVS P40 8021 0 CALL AEO ( IWVI , IAW1 I , IAW2I , IAW3I ,AWVS,AW1S,AW2S,AW3S) P4080220

C*T*«« INCREMENT DOUBLE PRECISION PA08b230

AWVD = AWVD + AWVD P4080240

AWID(I) = AWID(I) + AW1D(1) " P40 8 02 5 0 AW20(1,2) = AW2D(1,2) + AW20(1,2) P4080260

AW3D(1,1.2) = AW3D(1,1,2) + AW3D(i.i.2) P4680276

C*«t*» INCREMENT COMPLEX P4080280

AWVC = AWVC + AWVC P4080290

AWICd) = AWICd) + AWICd) P4080300

AW2C(1,2) = AW2C(1,2) + AW2C(i".'2) P40803 ib

AW3C(1,2,1) = AW3C(1,2,1) + AW3 C ( 1 2 1 ) P4080320

C«**** CHANGE LOGICAL P4b'8b33b

AWVB = .NOT. AWVB P4080340

AWIBd ) = .NOT. AWIBd ) P4080350

AW2Bd,2) = .NOT. AW2Bd,2) P4080360

AW3Bd,1,2) = .NOT. AW3B{i,1,'2) P408037b

RETURN P4080380

END P4080390

C*»*««*****«**t tt** ****tt*****t*t*t*t*t****«*t«t**t*«tt«ttttt*ttttttP4180010

C***** P41 80020

C*«*** AEO - (418) P4180030

C * * * * * P 4 1 8 0 0 4 0 Citiir********tt**t***t t** ttt4t**t*t**t*t***t*t***«*«******tt**tttttttt*P4180050

C« * « * SUBROUT I NE AEO CALLED BY SEG ADO{ 408 ) WH I CH I S P41 80060

C*«««« CALLED BY SEG. FSBRTd68) P41 80070

SUBROUTINE AEQ(KWVI, KAW1I, kAW2I. k'AW3I, AAWVS. AAW1S, AAW2S, P4i8b080

A AAW3S) P4180090

DIMENSION KAW1 I ( 4 ), K AW2 I ( 3 J ) . KAW3 I ( 2 /2 . 2 ) . AAW 1 S < 4 ) , AAM2^ P4 i8bl 6b

A AAW3S(2,2,2) P4180110

C**«»* INCREMENT INTEGERS P418bl2b

KWVI = KWVI + 1 P4180130

KAWlId) : KAWlId) + 1 P418bl4b

KAW2Id.2) = KAW2I(1,2) + 1 P4180150

KAW3I(1,1.2) = KAW3I (1 , 1 .2) + 1 P418016b

C«***» INCREMENT REAL P4180170

AAWVS = AAWVS + 1. P4 1801 80

AAWISd) = AAWISd) + 1. P4180190

AAW2S(1,2) = AAW2Sd,2) + l'. P4 1 80200

AAW3Sd,1,2> = AAW3S(1,1.2) + 1. P41 802 1 0 RETURN P4i8b22b

END P4180230

C * * * t « * * * * * . * * « * t * t « * t * * * * t * * t * 1 1 1 1 1 * * 1 1 * * * * t * 1 1 1 * * « t * * * 1 1 * * * t * * t * * * 1 1 1 1 p 4 2 8 b 0 1 b C***«t P4280020

C*»*»* Ai=Q - (428) P4280030

C» » * * « ^ P4280040

C*******ttt«t****tt*t«*****tt**t«t«tt*t*ttt*t**t**ttttttt*«*ttt*t*t*tt**P4280050

C*»*«« SUBROUTINE AFQ CALLED BY SEG. FSBRTd68) P4280060

SUBROUTINE AFO P42;8b07b

COMMON ABXVS, ACXVS, lAXVI. IAX1I(4). IAX2I(3,3), I AX3 I ( 2 , 2 , 2 )

, P4280080

A AXVS. AX1S(4), AX2S(3,3), AX3S(2.2,2), AXVD. AX1D(2), P428009b

2 AX2D(2,2), AX3D(2.2,2) ,AXVC. AX1C(2), AX2C(2,2), AX3 C ( 2 , 2 , 2 ) P42 8 0 1 00

3 .AXVB, AX1B(2), AX2B(2,2). AX3B(2,2.2) P428bllb

DOUBLE PRECISION AXVD. AX1D. AX2D. AX3D P4280120

COMPLEX AXVC. AX1C. AX2C. AX3C P428bl3b

LOGICAL AXVB, AX1B, AX2B, AX3B P4280140

C««t»« SET INTEGERS TO 1 P42801 5b

lAXVI = 1 P4280160

164 NBS FORTRAN Test Programs Version 1
1 AX 1 1 V 1 ) - 1 P 4 d 0 0 1 7 0

I AXt I \ 1 f C) - 1 TAV*7T/1 1 "y \ — 1 IAX31v1,i,£) - 1 r***** OCT DCAI TA 9 AXVS - C

.

P 4 Z 6 0 Z 1 0 Avie/7\ - 9 Aa 1 0 V 4 J - c . P*>Z6UZZ0

AX<: b 1 1 , d ) - c . PAZoOZ30

AV7C/1 1 7^ — ^ n / OQA'? / A (;*t*** SET DP TO h P4Z80ZdO

AaVU - n . OUO r'tZoUdoO

AX lUvl; - H.UUO r'tZSOd/0

AV^n/1 0\ — / AHA AX^ U \ 1

f L) - 't.OOU AX5D(1,1,Z) - H.OOO P4Z80ZV0

r***** Ltttit CCT rriwDiCY Tn a oti LUnrLcA lU 0 D/ 9fiA7AA

A v\y r — t L. A iL A\ AX V L - (0.0,0.0) D / 9QA71A

AaIlii; Avir^i\ -- /A A A A^ io.u,o.UJ D/ 9fiA79A rHdoUidO

AV*5r/1 0\ — A A A\ D / 70A77A

AA5Ut1,1,t; - vO. 0,0.0; D / 5CA7/A

L***** LHANub LUulLAL D / '7fiA7(^A

AAV D - . 1 K U t

.

D/ 7QA7AA

AV1D/1\ - TDIIC Aa \ I - .IKUt. D/ 7QA77A

AV7D/1 9^ - TDIIC D/ 92A7fiA

AV7D/1 1 ^\ — TDIIC AX5d(1,i,4; - .IKUc. n / •5QA7QA

D C T 1 1 D M D/78A/.AA r'tdoU'tUU

c M n rj/TOA / 1A

ittititititittttt **D1AOAA1A **r lovUU 10

Q * * * r 1 0 V U U d 0

r 1 0 7 U U J U

Q * * * * * r 1 0 V U U 4 0 *********** ««P1690050

bcNcKAL rUKrUoc ASA REFSP1690060

8 . 5 PI 690 0 70

L***t* btlMcKAL LUrirltiiJIo PI 690 0 8 0

r * * * * * TUTC Inlo CCPMCWT otuntnll TC TH DC DltKI IJTTU CCPMCMT L C\ 0 TUTC io iU DC nun Wlln otuncNI hUt. Inlo PI 690 0 90

r***** CCPMCMT IIDTTCC HIIT TUC HATA CHDMCH TM CCPMCMT / f\ Q L****" bcbrlcNI WKllco UU 1 Inc UAIA rUKncU 1 rJ btbricNI hUV PI 69 0 1 0 0

Q * * * <t # P 1 69 0 1 1 0 r * C D C P T C T P A T T H M 0 CCPMCKIT lAQ L*"*** b r c L 1 r 1 LA 1 1 U N b bturitNl loV P1690120

Q * * Ik if It P0013580

r * * * * * UUCKI CYCrifTTMC HMIV CCPMCMT 1A0 TUC CDCrTCTPATTnM STATEMENTS POO 1 3 5 8 5 C***** WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0013590

t*"*"t t'* I N C 0 L U M N S 1 AND 2 REMOVED . P 0 0 1 3 5 9 5 C***** P0013600

c= COMMON /BLK1/JXVI, JAX1I(2), JAX2I (3,3) P0013605

c= A /BLK2/DXVS, DX1S(2). DX2S(2 ,2) P0013610

c= B /BLK3/DXVD, DX1D(2), DX2D(2 ,2) P0 0 1 3 6 1 5 c= C /BLK4/DXVC, DX1C(2), DX2C(2 ,2) P0 0 1 362 0 c= D /BLK5/DXVB, DX1B(2), DX2B(2 ,2) P001 36Z5

c= E /BLK6/JAX3I (2,2,2) , DX3S(2, 2,2), DX3D(2,2, 2) . P001 3630

c= F D23C(2,2,2), DX3B(2,2 ,2) P0013635

c= DOUBLE PRECISION DXVD, DX1D, DX2D, DX3D P0013640

c= COMPLEX DXVC, DXIC, DX2C, DZ3C POO 1 3645

c= LOGI CAL DXVB, DX1B, DX2B, DX3B POO 1 36 5 0 COMMON /BLK1/JXVI, JAX1I(2), JAX2I (3,3) P169A1

A /BLK2/DXVS, DX1S(2), DX2S(2 , 2 ) PI 69AZ

B /BLK3/DXVD. 0X1D(2), DX2D(2 ,2) PI 69A3

C /BLK4/DXVC, DX1C(2). DX2C(2 ,2) PI 69A4

D /BLK5/DXVB, DX1B(2). DX2B(2 .2) PI 69A5

E /BLK6/JAX3I (2,2,2) , DX3S(2, 2,2), DX3D(2.2, 2) , PI 69A6

F D23C(2,2,2), DX3B(2,2 ,2) PI 69A7

DOUBLE PRECISION DXVD, DX1D, DX2D, DX3D PI 69A8

COMPLEX DXVC, DXIC, DX2C, DZ3C PI 69A9

LOGI CAL DXVB, DX1B, DX2B. DX3B PI 69AA

c * * *

«

* P0013655

C * t * * « OUT PUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1690130

z* * * * * P007Z800

C«t*t* WHEN EXECUTING ONLY SEGMENT 169, THE FOLLOWING STATEMENT P007Z805

c « * * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0 0 7Z81 0 c= NUVI = 6 P007Z81

5

NBS FORTRAN Test Programs Version 1 165
NUVI = 6 P169B1

C.t*«* WRITE HEADING FOR SEGMENT 169 P1 690 U0

WRITE (NUVI, 1690) PI 690 1 50

1690 FORMAT ( 1 H 1 . 1 X , 3 5 H B L K DT - (169) BLOCK DATA SUBPROGRAM// P1690160

A16H ASA REF . - 8 . 5//2X, 7HRESULTS) PT6 9 0i7 6 WRITE (NUVI, 1691) P1690180

1691 FORMAT ( /28H TEST IS SUCCESSFUL IF EACH/ P1 6901 90

A23H GROUP CONTAINS SAME VALUES) P1690200

WRITE (NUVI, 1 692 ) JAX2I(1,1), JAX1I(2), J AX2 I ( 2 . 1 ) , J AX3 rr2 727f) PI 6902 1 0 A . DX3S( 1 , 2 , 1 ) , DXISd), DX2S(1,1), DX3S(2,2,1), DX2D(2.2) P 1 690220

B ,DX1D(2), DX2D(2,1), DX3D(2,2,1), DX2C(2,2), DX1C(2) P1690230

C .DX2C(2,1), D23C(2,1,1), DX2B(2,2), DX1B(2). DX2B(2,1) P1690240

D ,DX3B(2,2, 1 ) , JAX2I(3,1), PI 6902 5 0

E DX3B(2,1,2), DX2S(2,2) P1690260

1 692 FORMAT (// 4(110/)// P 1 6902 7() A 4(F12.1/)// PI 6902 80

B 4(1PD16.1/)// PI 69 0 2 90

C 4 ( 0PF6 . 1 , F6 . 1 / ) / / PI 6903 00

D 4(L10/)// PI 6903 1 () F 3(2H ,A2/)) P1690320

C«t*** END OF TEST SEGMENT 169 P 1 690336

C***t* WHEN EXECUTING ONLY SEGMENT 169, THE STOP AND END CARDS P1690340

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN P 1 6903 5 d C»**.. COLUMNS 1 AND 2 REMOVED. P1690360

C= STOP P 1 6903 7() C= END P1690380

STOP P169C1

END P169C2

Q*«««*««*««****«*«*«******««««t*tt»*»*t»*«*«*««»t**«««*««*»**«*««*«»»«««P4090010

C* * * * P409002 0 C****« BLOKD - ( 4 09 ) P409003'6

C***** P4090 040; C**«»**«******««««t***»t*«***«»t «iir** «**t«*iit**t t** t««****«**«**«tP4090050

C*t*«* GENERAL PURPOSE P4090060

C****« THIS SEGMENT CONTAINS ONE BLOCK DATA SUBPROGRAM. P 4090 0 70

C***** IT IS TO BE RUN WITH SEGMENT 169 P4090080

C***.* GENERAL COMMENTS P4090 090' C***** THIS SEGMENT USES ALL THE PERMISSIBLE STATEMENTS IN A P4090100

C**«*» BLOCK DATA SUBPROGRAM. THE DATA STATEMENT CONSISTS OF ALL P4090110

C***** TYPES OF VARIABLES AND ARRAYS. A HOLLERITH CONSTANT P4090120

C«**** IS ASSIGNED TO INTEGER, REAL AND LOGICAL P409 0 1 30' BLOCK DATA P4090140

COMMON /BLK1/JXVI, JAX1I(2), JAX2I(3,3) P4090150

A /BLK2/DXVS, DX1S(2), DX2S(2,2) P4090160

B /BLK3/DXVD, DX1D(2), DX2D(2,2) P40 90 1 70

C /BLK4/DXVC, DX1C(2), DX2C(2,2) P4090180

D /BLK5/DXVB, DX1B(2), DX2B(2,2) P4090 1 90

E /BLK6/JAX3I (2,2,2) , DX3S(2,2,2), DX3D(2,2,2), P4090200

F D23C(2,2,2), DX3B(2,2,2) P4090210

DIMENSION CY3C(2,2,2) P4090220

DOUBLE PRECISION DXVD , DX1D, DX2D, DX3b P409023 0 COMPLEX DXVC, DX1C, DX2C, DZ3C, CY3C P4090240

LOGICAL DXVB, DX1B, DX2B, DX3B P40 902 5

0' INTEGER JXVI P4090260

REAL DXVS P4 0902 70

EQUIVALENCE ( D Z 3 C ( 1, 1, 1 ) , CY3C(1,1,1)) P40902 8 0 DATA JAX2I(1,1), JAX1I(2), JAX2I(2,1), J AX3 I ( 2 , 2 , 1 ) , DX3S ( 1 , 2 , 1)", P409 0290

A DXIS(I), DX2S(1,1), DX3S(2,2,1), DX2D(2,2), DX1D(2), P4090300

B DX2D(2,1), DX3D(2,2,1), DX2C(2,2), DX1C(2), DX2C(2,1), P4 09C310

C DZ3C(2,1,1), DX2B(2,2), DX1B(Z), DX2B(2,1), DX3B(2,2,1), P4090320

b JAX2I(3,1),DX3B(2,1,2),DX2S(Z,2)/4«2,4*3.0,4«4.0D0,4*(4.,5.),P4090330

E 4*. TRUE., 2HAB, 2HAB, 2HAB/ P40903 40

C.«*«* END OF TEST SEGMENT 409 P4 0903 5 0 END P4 090 3 60

C****«***«»**««»t***t«***t*t*******»***«*«*****«««*»»**««*****t*««*»*«*»P1790010

C* * * * * PI 790 02 0 C» * * * * BLKDA - ( 1 79) PI 79003 0 C***** P1790040

166 NBS FORTRAN Test Programs Version 1
C * 1 1

«

C t « * * c * * *

«

c « * « c * * «

«

C * t * * Q * * * * c * * «

[;*««*

C * * * * C * « * * C * * *

«

c=

c=

c=

c=

c = c=c=

c=

c=

c=

t GENERAL PURPOSE ASA REF

* TO TEST BLOCK DATA SUBPROGRAMS 8.5

« THIS SEGMENT IS TO BE RUN WITH SEGMENTS 419, A29, 439. THIS

SEGMENT WRITES OUT THE DATA FORMED IN SEGMENT 419, 429, 439

SPECIFICATIONS SEGMENT 179

* WHEN EXECUTING ONLY SEGMENT 179, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

DOUBLE PRECISION DXVD. DX1D, DX2D, DX3D

COMPLEX DXVC, DX1C, DX2C, D23C

COMMON /BLKI/JXVI, JAX1I(2), JAX2i(3,3)

A /BLK2/DXVS, 0X1S(2), DX2S(2,2)

B /BLK3/DXVD, DX1D(2), DX2D(2,2)

C /BLK4/DXVC, DX1C(2), DX2C(2,2)

b /BLK5/DXVB, DX1B(2), DX2B(2,2)

E /BLK6/JAX3I (2,2.2) , DX3S(2,2,2), DX3D(2.2.2).

F DZ3C(2,2,2) , DX3B(2,2,2)

LOGICAL DXVB, DX1B, DX2B, DX3B

DOUBLE PRECISION DXVD, DX10, DX2D, DX3D

COMPLEX DXVC, DX1C, DX2C, DZ3C

COMMON

A

B

Cb

E /BLK6/ JAX3I(2,2,2)

"F DZ3C( 2,2,2). bX3B(2,2

LOGICAL DXVB. DX1B, DX2B,

/BLKI/JXVI

/BLK2/DXVS

/BLK3/DXVD

/BLK4/DXVC

/BLK5/DXVB

JAX1 1(2)

DX1S(2) , DX1D(2) , DX1 C(2) , bX1B( 2)

.

JAX2I (3,3)

DX2S(2,2)

DX2D(2.2)

DX2C(2,2)

DX2B(2,2)

DX3S(2 2,2) , ,2)

DX3B

DX3D(2,2,2)

C * t « * C « * «

«

c * * « * c « * *

«

c « * * *

OUTPUT T WHEN EXE CUT I NG

NUVI = 6 MUST

APE ASSIGNMENT

ONLY SEGMENT 179,

STATEMENT. NO INPUT TAPE

THE FOLLOWING STATEMENT

HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = 6

C * t « t

«

FOR SEGMENT 179

1790

1 791

SEVERAL BLOCK DATA/ 16X.

-8.5// 9H RESULTS)

NUVI = 6 WRITE HEADING

WRITE (NUVI, 1790)

FORMAT (1H1 , 1X,32HBLKDA - (179)

1 IIHSUBPROGRAMS/ 2X. 14HASA REF.

WRITE (NUVI. 1791)

FORMAT (//28H TEST IS SUCCESSFUL

A28H GROUP CONTAINS SAME VALUES)

WRITE (NUVI, 1 792 ) JXVI. JAXIKI), J AX2 I ( 1 , 2 ) , JAX3 I ( 1 , 1 A DX1S(2), DX2S(1.2), DX3S(1.1,2), DXVD

B bX2D(1,2), DX3D( 1,1.2), DXVC, DXICd)

IF EACH/

2). DXVS.

DX1D( 1 )

,

DX2C( 1 , 2

)

1792 FORMAT (//

D23C(

1

DX3B(

1

DX3B(2

4(110/)//

4(F12. 1 / )//

2)

2)

2)

DXVB, DXIB(I)

JAX2I (1 ,3)

,

DX2S(2 , 1 )

DX2B(1 ,2)

C * * * * C * * « t c * « *

«

c * * «

t

c'= C =

B 4(1PD16.1/)//

C 4(0PF6.1 ,F6.1/)//

b 4(Lio / ) / / E 3(2H ,A2/))

*' " END OF TEST SEGMENT 179

* WHEN EXECUTING ONLY SEGMENT 179, THE STOP

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

« IN COLUMNS 1 AND 2 REMOVED.

'STOP

END

STOP

END

AND

C = END CARDS

C * * * * C * « »

«

»P1 790050

PI 790 060

P 17 9 0 0 7 0 PI 790 0 8 0 PI 790 090

PI 790 1 0 0 PI 790 1 1 0 P001 3660

P001 3665

P001 3670

P001 3675

P0 0 1 3 6 8 0 POO 1 3 6 8 5 P 0 0 1 3690

P 0 0 1 3 6 9 5 P0013700

POO 1 3 70 5 P001 371

0

P 0 0 1 3 7 1 5 P001 3720

P0 0 1 3 72 5 POO 1 3 73 0 PI 79A1

PI 79A2

PI 79A3

PI 79A4

P179A5

PI 79A6

PI 79 A

7

PI 79A8

PI 79A9

P 1 79AA

P 0 0 1 3 7 3 5 P 1 79 0 1 2 0 P0072820

P0072825

P 0 0 7 2 8 3 0 P0072835

PI 79B1

PI 790 1 3 0 P 1 7 9 0 U 0 PI 79 0 1 5 0 P 1 7 9 0 1 6 0 PI 79 0 1 70

PI 790 1 8 0 P1790190

PI 790 2 0 0 PI 790 2 1 0

, P 1 7 9 0 2 2 0 PI 790 2 30

PI 790 2 40

PI 7902 5 0 P 1 7 9 0 2 6 0 PI 7902 70

PI 7902 8 0 PI 790 2 9 0 PI 79 03 00

PI 7903 1 0 P 1 7 9 0 3 2 0 PI 7903 3 0 P 1 7 9 0 3 4 0 PI 7903 5 0 PI 79 03 6 0 PI 790 3 70

P179C1

PI 79C2

«P4190010

P4190020

NBS FORTRAN Test Proflrams Version 1 167
C***** BLAKD - (419) P4190030

C,*,*,* » * P41 900.40

C*»«*«»««««t«««t**«t**«**«****««t*t««»tt«««t**«t« «** ««««t««t«t*«*t**P4i9b05 0 C**«*« GENERAL PURPOSE P4190060

C * * * * THIS SEGMENT CON TAINS THE FIRST O F THREE B L 0 C < 0 AT A SUB P R 0 G R AM SP 4 1 9 0 0 7

6

C**««* TO BE RUN WITH SEGMENT 179 P4190080

C***** THESE SEGMENTS USE ALL THE PERMISSIBLE STATEMENTS IN A P4 1 90 090

C***** BLOCK DATA SUBPROGRAM. THE DATA STATEMENTS CONSIST OF ALL P4190100

(:***«« TYPES OF VARIABLES AND ARRAYS. A HOLLERITH CONSTANT IS 94190110

C***** ASSIGNED TO INTEGER , REAL, AND LOGICAL P4190120

BLOCK DATA 94190130

DOUBLE PRECISION DXVD, DX1D, 0X2D P4190140

COMMON /BLK1/JXVI, JAXIKZ), JAX2I(3.3) 94190150

A /BLK2/ DXVS, DX1S(2). DX2S(2,2) P4190160

B /BLK3/ DXVD. DX1D(2). DX2D(2,2) P4190176

INTEGER JXVI P4190180

REALDXVS P4 190190

DATA JXVI, JAXII(I), JAX2I(1,2). DXVS, DX1S(2) P4190200

A ,DX2S(1,2). DXVD, DXID(I), DX2 D ( 1 , 2 ) / 3 * "I P41 9021 0'

B ,3 2.0,3 * 4.000 /, J AX2 I (1 , 3 ) , DX2 S ( 2 . 1 ) / 2HHP , 2 HHP / P41 90220

C****« END OF TEST SEGMENT 419 P41 90236

END P,4,1 902 40

Q * * * * * * 1 1 11 * * * * * * t * 1

1 * 11 * * * * * t * * 1 1 1 * * * * * * * 11 * 11 * 1 1 1 * * * * 1 1 1 1 * 1 1 * * * t * * * * 1 1 * p if 2 9 0 0 10

C***** P4290020

C* * * « BLBKO - ( 429 ) P429003 0

C ***** P 4 2 9 0 0 4 0 C****************tiii****************ii***t*******t******t**tt***«;**«t*****P4290(}5 6 C*«««« TO BE RUN WITH SEGMENT 179 P4290060

C***** THIS SEGMENT CONTAINS THE 2ND OF THREE BLOCK DATA SUBPROGRAMS P4290676

C«**«* TO BE RUN WITH SEGMENT 179 P4290080

BLOCK DATA P429009()

COMPLEX DXVC, DX1C, DX2C P4290100

COMMON /BLK4/ DXVC , DX 1 C ( 2 ) . DX2C(2.2) P4290 1 l6

C /BLK5/DXVB, DX1B(2). DX2B(2,2) P4290120

LOCSICAL DXVB, DX1B. DX2B P4290 1 30

DATA DXVC, DXICd), 0X2 C ( 1 , 2 ) , DXVB , DX 1 B ( 1 ) . 0X2 B ( 1 . 2 ) / P42901 40

D 3 * (3.. 4.). 3 .FALSE./ P4290 1 56

C*t««« END OF TEST SEGMENT 429 P4290160

END P 42 90 1 70

C******«***it************************t***t****ttt*t*tt***ttt*t*t**t*t*tt*P4390010

C***** P4 3 90 02 6 C*«**« BLCKD - (439) P4390030

C» ** « * P439004()

C*****t***«*t*«**«*t>*«tt*t<t*«***tt>tt**t*t**ttttt***«*«tt*t**t**tt**t«P4390050

Zttttt THIS SEGMENT CONTAINS THE THIRD OF THREE BLOCK DATA SUBPROGRAMSP4390060

C..«»« TO BE RUN WITH SEGMENT 179 P4390070

BLOCK DATA P4390080

COMMON /BLK6/JAX3I (2,2.2) .DX3S(2, 2, 2) .0X30(2.2,2) P4390090

E .D23C(2.2.2) , DX3B(2.2.2) P4390 1 06

DOUBLE PRECISION DX30 P4390110

DIMENSION CY3C(2,2.2) P439012b

COMPLEX DZ3C,CY3C P4390130

EQUIVALENCE ( D Z 3 C ( 1 , 1 , 1 ) , C Y 3 C ( 1 , 1 . 1 )) P43901 40

LOGICAL DX3B P4390150

DATA JAX3 I ( 1 , 1 , 2 ) , DX3S( 1 . 1 . 2 ) . DX3D( 1 . 1 . 2) . CY3C( 1 . 1 . 2) . b)(3B( i , 1 ,2) / P43901 6b

F 1, 2.0, 4.0D0, (3 ., 4 . ) , . FALSE. / . DX3 B ( 2 , 2 . 2 ) / P4390170

G 2HHP/ P4390i80

C***«t END OF TEST SEGMENT 439 P4390190

- END P4390200

C************«*t*t***tttt******t*******«t***tt******tt*t*****t***t**t«*tpi80 0 010

c"*'*'* P'1 800026

C«*«** UNFRW - (180) P1800030

C*«*** PI 80 0 040

C****i>*»****«*****t«t**tt************t***t*****t*tt*t**ttt*t«**t*t*t*tt*piS000 50

C« * « * « GENERAL PURPOSE ASA RE F PI 800060

C«*«*« TEST OF UNFORMATTED READ AND WRITE STATEMENTS 7 . 1 . 3 . 2 . 4 P 1 8 0 0 0 7

0

C « « « * » 7.1 .3.2.5P1 800080

C*««** S P E C I F I C A T 10 N S SEGMENT 180 P18p0090

168 NBS FORTRAN Test Programs Version 1
Cttt»« P0013740

C»*»«* WHEN EXECUTING ONLY SEGMENT UO,, THE SPECIFICATION STATEMENTS P0 0 1 3 74 5 Ctt«T« WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C= P0 0 1 3 7 5 0 C*»»t« IN COLUMNS 1 AND 2 REMOVED. P0013755

C'»'*'*'*"« POO 1 3 760

C= DIMENSION CMA1S(5). CMB1S(5), AC1S(25) P0013765

DIMENSION CMA1S(5). CMB1S(5), AC1S(25) P180A1

C«**** P0013770

Ct*Tt« 0 U T P L) t TAPE ASSIGNMENT STATEMENTS. NO INPUT TAPE. PI 8 0 0 1 0 0 C«**** P0072840

t*'**'** WHEN EXECUTING ONLY SEGMENT 180, THE FOLLOWING STATEMENTS P00 72 8 45

C***** NUVI=6 AND INVI=9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072850

C t

"* * «

* P 0 0 7 2 8 5 5 C= NUVI = 6 P0072860

C = INVI = NUVI = INVI =

C * * * «

180

C***** HEADER FOR SEGMENT 180 WRITTEN

CMAVS = 1 . 5E01

CMBVS = -2.75E-0

HCAVI = 5 MCBVi = -10

DPAVS = 1 . 02E0

DPBVS = 9876. OE-2

CMAISd) = 1 .OEO

CMA1S(2) = 2. OEO

CMA1S(3) = 3. OEO

CMA1S(4) = 4. OEO

CMA1S(5) = 5. OEO

CMBVS

MCBVI

DPBVS

IVI = 1.5.1 >

READ

READ

READ

READ

READ

(INVI)

(INVI)

( INVI)

(INVI)

(INVI)

CMCVS, CMDVS

MCCVI, MCDVI

DPCVS, DPDVS

CMB1S

( A C 1 S ( I V I ) , IVI = 1,5.1 ) C«tt«t CHECK RECORDS BY SUBTRACTING CORRESPONDING VALUES

CMEVS = CMAVS - CMCVS

CMBVS - CMDVS

MCAVf - MCCVI

MCBVI - MCDVI

DPAVS - DPCVS

DPBVS - DPDVS

CMAISd ) - CMBIS('f)

CMA1S(2) - CMB1S(2)

CMA1S(3) - CMB1S(3)

CMA1S(4) - CMB1S(4)

CMA1S(5)- CMB1S(5)

CMA1 8(1 ) - AC1 S( 1

)

CMA1S(2) - AC1S(2)

CMA1S(3) - AC1S(3)

CMA1S(4) - AC1S(4)

CMA1S(5) - AC1S(5)

CMEVS, CMFVS;

CMFVS = MCEVI

MCFVI = DPEVS = DPFVS = ACVS = BCVS = 'ccvs = DCVS = FFCVS = CMGVS = CMHVS = CMIVS : CMJVS = CMKVS =

P0072865

PI 80B1

P180B2

P0072870

WRITE (NUVI, 0180)

FORMAT( 1 HI , IX, 30HUNFRW - (180) UNFORMATTED READ/ 14X,

T22H AND WRITE STATEMENTS/ /36H ASA REFS - 7.1.3.2.4 AND 7. T. 3 If

2//10H RESULTS )

PIPI

5 PI

PI

PI

PI

PI

PI

P 1 PI

PI

PI

Ct««*« WRITE AND READ VARIABLES OF THE SAME TYPE

REWIND INVI

WRITE (INVI) CMAVS

WRITE (INVI) MCAVI

WRITE (INVI) DPAVS

WRITE (INVI) CMA1S

WRITE (INVI) (CMAIS(IVI)

REWIND INVI

WRITE (NUVI, 181) MCEVI, MCFVI, DPEVS, DPFVS

1

0181 FORMAT

ACVS, BCVS. CCVS, DCVS, FFCVS, CMGVS, CMHVS, CMIVS, CMJVS

CMKVS

(//2(F20.10/).2(I19/),7(F20.10/))

PI

PI

PI

PI

PI

PI

PI

PI

PIPI

PI

PI

PI

PI

PI

PI

PI

PI

PI

PI

PI

PIPI

PI

PIPI

PIPI

PI

PI

PIPI

P1

PI

PI

PI

PIPI

800110

800120

800130

800140

8 0 015 0 800160

800170

800180

8 0 019 0 800200

8 0 0 210

800220

800230

800240

800250

800260

800270

800280

800290

800300

800310

800320

8 0 0 3 3 0 800340

800350

800360

800370

800380

800390

800400

800410

800420

8 00 430

800440

800450

800460

800470

800480

800490

800500

8005 10

800520

800530

800540

800550

800560

8 0 0 5 7 0 800580

8 0 0 5 9 0 800600

NBS FORTRAN Test Programs Version 1 169
c « * «

«

READ AND WRITE VARIABLES OF DIFFERENT TYPES P1800610

REWIND INVI P1800620

WRITE (INVI) CMAVS. HCAVI Pl'800630

WRITE (INVI) CMAIS(I), CMA1S(2),, CMBVS, MCBVI P1 800640

WRITE (INVI) CMA1S(3), CMA1S(4), CMA1S(5), DPAVS, OPBVS P1800650

REWIND INVI P1800660

READ (INVI) CMCVS. MCCVI P 1 800'67()

READ (INVI) CMBISd), CMB1S(2), CMDVS, MCDVI P1 800680

READ (INVI) CMB1S(3)

= CMAVS

= CMBVS

= MCAVI

= MCBVI

= DPAVS

= DPBVS

= CMA1 S ( 1 ) = CMA1S(2)

= CMA1S(3)

= CMA1S(4)

= CMA1S(5)

( NUV I ,0182)

CMB1S(4)

CMCVS

CMDVS

MCCVI

MCDVI

DPCVS

DPDVS

- CMB1S( 1

)

- CMB1S(2)

- CMB1S(3)

- C M B 1 S ( 4 ) - CMB1S(5)

CMEVS, CMFV'S

0182

C

« « «

c * * *

»

c

« * *

«

c * * *

«

c * * «

CMB1S(5). DPCVS, DPDVS

CMEVS

CMFVS

MCEVI

MCFVI

DPEVS

DPFVS

CMGVS

CMHVS

CMIVS

CM JVS

CMKVS

WRITE

CMHVS, CMIVS, CMJVS, CMKVS

FORMAT ( / /2 ( F20 . 1 0/ ) , 2 ( II 9/ ) , 7( F20 . 1 0/ ) ) TEST UNFORMATTED READ WITH NO LIST

REWIND INVI

CMAVS, MCAVI

CMAIS

CMBVS, MCBVI

C M A 1 S ( 5 ) , C M A 1 S ( 4 ) , C M A i S ( 3 ) , C M A i S ( 2 ) , C M A 'l S ( T

)

CAN NOT BE TESTED, BUT INCLUDED FOR ACCEPTANCE

MCEVI, MCFVI, DPEVS, DPFVS. CMGVS

WRITE (INVI)

WRITE (INVI)

WRITE (INVI)

WRITE (INVI)

ENDFILE AS

WHEN NO LIST IS SUPPLIED BY COMPARING

READ

READ

CMEVS

CMFVS

MCEVI

MCFVI

WRITE MCEVI, MCFVI

,183

184

C * * *

«

C * * *

«

c * * * * c * * * c = c=

» A STATEMENT.

ENDFILE INVI

REWIND INVI

*CHECK THAT A RECORD IS READ

« VALUES OF THE THIRD RECORD

READ (INVI) CMCVS, MCCVI

(INVI)

(INVI) CMDVS, MCDVI

= CMAVS - CMCVS

= CMBVS - CMDVS

- MCAVI - MCCVI

= MCBVI - MCDVI

(NUVI, 0183) CMEVS, CMFVS

FORMAT( / /2 ( F20 . 1 0/ ) , 2 ( I 1 9/ ) ) WRITE (NUVI, 0184)

FORMAT(37H0 ALL ABOVE ANSWERS SHOULD BE ZERO IF /

1 37H THE READ AND WRITE RECORDS COMPARE. ) REWIND INVI

* END OF TEST SEGMENT 180

» WHEN EXECUTING ONLY SEGMENT 180, THE STOP AND END

» CARDS WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE ' C='

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

PI 800690

PI 80 0700

P 1 8 0 0 7 1 0 PI 80 0 720

PI 8 00 73 0 PI 8 00 740

PI 800 7 5 () PI 800 760

P 1 8 0 0 7 7 0 PI 800 780

PI 80 0 790

PI 80 0 8 00

, P 1 8 0 0 8 1 0 PI 80 0 820

P 1 8 0 0 8 3 0 PI 8 0 0 8 40

PI 8 0 08 5 0 PI 8 0 0860

PI 8 008 70

PI 8 008 80

P 1 8 0 0 8 9 0 PI 800900

PI 8 009 1 0 PI 800920

P 1 8 0 0 9 3 0 PI 8 00940

PI 8 009 5 0 PI 800960

P 1 8 0 0 9 7 0 PI 8 0098 0 PI 8 00990

PI 8 0 1 0 0 0 PI 801 01 0 PI 8 0 1 020

P 1 8 0 1 0 3 0 PI 8 0 1 040

PI 8 0 1 0 5 0 P1801060

P 1 8 0 1 0 7 0 PI 80 1 0 8 0 PI 80 1 090

PI 801 1 00

PI 801 11 0 PI 801 120

P 1 8 0 1 1 3 0 PI 801 1 40

P180C1

PI 80C2

C * t *

«

c * « * * c * * »

«

c * « * c * * * c « * «

c * t c * * *

c « * t « c » »

c « * * * c * * «

*«*i**i**tt******rt**llrt*t**t*«***tt*****t******«t*lt*t*t*t*t**tt**t**P1820010

* P1820020

BACUP (182) PI 82 0030

V PI 82 00 40

* t t t t**«t********««*t*il*«t********<r*rtt*****(******tlt********t«**P1820050

* GENERAL PURPOSE ASA REF P1820060

WRITE A BLOCK, 1 024 WORDS IN LENGTH, UNFORMATTED. 7 . 1 . 3 . 2 . 5 P 1 8 2 0 0 7

0

TO TAPE , BACKSPACE , READ TO MEMORY 7 . 1 . 3 . 3 . 2 P 1 8 2 0 0 8 0

* 7.'l .3.2.4P 1 8 2 0090

* SPECIFICATIONS SEGMENT 182 P1820100

* PO 0 1 3 780

* WHEN EXECUTING ONLY SEGMENT 182. THE SPECIFICATION STATEMENTS P0013785

NBS FORTRAN Test Programs Version 1
C*»*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C**«t« IN COLUMNS 1 AND 2 REMOVED.

P001 3790

P00 1 3 79 5 c « « »

«

C= DIMENSION IV1I(1024)

P001 3800

P00 1 3 8 0 5 DIMENSION IV1I(1024)

c * « « t

«

PI 82A1

P0013810

Ct***« OUTPUT TAPE ASSIGNMENT STATEMENTS. NO INPUT

c * » « «

TAPE . P 1 8 2 0 1 1 0 P0072880

C***** WHEN EXECUTING ONLY SEGMENT 182, THE FOLLOWING STATEMENTS

C*«««» NUVI=6 AND IRVI=9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P0072885

P0072290

c « « « «

«

C= NUVI = 6 P0072895

P0072900

C= INVI = 9 NUVI = 6 P0072905

PI S2B1

INVI = 9

c * * * * * PI 82B2

P0 0 729 1 0

1 820 FORMATC 1 HI , IX. 28HBACUP - (182) BACKSPACE TAPE / / 2X , 1 8HASA

33.3.2//9H RESULTS)

REF. 7.1 . PI 8 2 0 1 2 0 PI 82 0 1 30

WRITE(NUVI ,1820)

£****« HEADER FOR SEGMENT 182 WRITTEN

P 1 8 2 0 1 4 0 PI 82 0 1 5 0

c * * « *

»

REWIND INVI

P1820160

P1220170

C***** CREATE A LIST, 1024 WORDS IN LENGTH. CONTAINING

C » THE INTEGERS 1 TO 1024. ONE INTEGER PER WORD.

PI 8 2 0 1 8 0 PI 8 2 0 1 9 0 ISVI = 0 HRRVI = 1

P 1 8 2 0 2 0 0 PI 8 2 02 1 0 1821 ISVI = ISVI + 1 IV1 I( ISVI ) = ISVI

PI 8 2 022 0 PI 8 2 0 23 0 IF ( ISVI - 1 024 ) 1 82 1 , 1 822. 1 823

C«»** * WRITE THE LIST TO AN INTERMEDIATE TAPE

PI 8 2 0 2 4 0 PI 8 2 0 2 5 0 1822 WRITE (INVI) IV1I

WRITE(NUVI . 1 82 8 ) MRRVI. (IVIKJCVI), JCVI = 1,9).

PI 8 2 0 26 0 PI 8 2 0 2 70

1 ( I VI I ( K CVI ) , K CVI : 1 0 1 6 . 1 024 ) C«**«t CHANGE MEMORY VALUES TO 5 TIMES THE ORIGINAL VALUES

PI 8 2 0 2 8 0 PI 8 2 0 290

MRRVI = 2 ISVI = 0

PI 82 0 3 0 0 PI 8 2 0 3 1 0 1825 ISVI = ISVI + 1 IV1 I ( ISVI ) = 5 * ISVI

PI 8 2 0 32 0 PI 82 0 33 0 IF (ISVI - 1 024 ) 1 82 5 . 1 826. 1 823

1826 BACKSPACE INVI

PI 8 2 0 3 4 0 PI 8 2 0 3 5 0 C**«»» WRITE THE CHANGED VALUES

WRITE(NUVI . 1 82 8 ) MRRVI. (IVIKJCVI). JCVI:1.9),

PI 8 2 0 36 0 PI 8 2 0 3 70

1 ( IV1 I (KCVI ) .KCVI = 1 0 1 6. 1 024 ) HRRVI = 3

PI 8 2 0 3 8 0 PI 8 2 0 39 0 C*«t»t READ INTERMEDIATE TAPE WHICH HAS BEEN BACKSPACED

READ(INVI) IV1I

PI 8 2 0 400

PI 8 2 0 4 1 0 REWIND INVI

C««ttt WRITE INITIAL VALUES FROM BACKSPACED TAPE.

P 1 8 2 0 4 2 0 PI 8 2 0 43 0 WRITE(NUVI . 1 82 8 ) MRRV I

. ( I V 1 I ( L V I ) . L V I = 1 . 9 )

. ( I V 1 I ( K V I ) . KV I =

1 1016, 1024)

PI 8 2 0 4 40

PI 8 2 0 4 5 0 1823 WRITE (NUVI. 1829)

1 828 F0RMAT(//7H GROUP . I 3 . 3 ( / 2X , 3 ( I 6 ) ) . 3 ( / 2X . 3 ( I 6 ) ) )

P 1 8 2 0 460

PI 8 2 0 4 70

1829 F0RMAT(//2X.33HGR0UPS 1 AND 3 SHOULD BE THE SAME/

I 30H AND GROUP 2. 5 TIMES GROUP 1)

PI 82 0 4 8 0 PI 8 2 0 490

C»*»«* END OF TEST SEGMENT 182

C««t»« WHEN EXECUTING ONLY SEGMENT 182. THE STOP AND END

PI 82 0 5 0 0 PI 82 0 5 1 0 C*«*«* CARDS WHICH APPEAR AS' COMMENT CARDS. MUST HAVE THE C = Cttttt IN COLUMNS 1 AND 2 REMOVED.

P 1 8 2 0 5 2 0 PI 82 0 5 3 0 C= STOP

C= END

PI 82 0 5 40

PI 82 0 5 5 0 STOP

END

PI 82C1

PI 82C2

Ct****t**t**t**t**t**t************ttt**tt**«*****tt***«****tt*

C * t « t

«

tttottttt* »P 1 90 0 0 1 0 PI 9 0 0 020

C****t DOTRM - (190)

c « * «

»

PI 90 0030

PI 90 00 40

C**t****t*t*t*t**tt**«««***tttt*«**tt*t**«*******t**t**«***«tt

c * * « * « *P 1 90 00 5 0 P1900060

NBS FORTRAN Test Programs Version 1 171
c « * * » c * « * * c * «

c « * *

«

c * * * * c * * «

C t * * * c * « * * c « « *

«

c * « *

c

« * *

«

c * * * *

c * * * * c « * * t

c * * «

t

c * « * * c * * * * c « * * *

c « « *

«

c « * * *

c * * *

«

c

« * «

c « * » *

c =

c « « » * c * » t * c « * t * c « « * * c * * «

c * * « c=

* GENERAL PURPOSE ASA REF P1900070

* DO LOOPS TESTED WITH ALL ALLOWABLE 7.1.2.8 P1900080

« TERMINAL STATEMENTS (I/O TESTED g^p^p-^YELY) pmoWO

« CONTINUE, ASSIGN, LOGICAL IF P1900100

* RESTRICTIONS OBSERVED pi 900 lio

« « Ml, M2 AND M3 ARE GREATER THAN ZERO 7 . 1 . 2 . 8 / 23P 1 900 1 20

* * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 77V.TT/UPi9^^^^

* THE DO AND IS IN THE SAME PROGRAM UNIT P1 900U0

* * TERMINAL STATEMENT IS EXECUTABLE BUT NOT

A

^^..^.^....^..^.^.^^^^^

* GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR 7 . 1 . 2 . 8 / 1 0 P 1 9 0 0 1 6

0

* DOSTATEMENT pi900T7 0

* * Ml, M2 AND M3 ARE NOT REDEFINED WITHIN 00 7 , 1 . 2 . 8 . 2 / 5 4P 1 900 1 80

* * BRANCHES TO TERMINAL STATEMENT FOR MORE THAN -.y^^ ^^^^^

* ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1900200

* * CONTROL IS NEVER PASSED INTO RANGE OF DO FROM ^^^^^^^^^^^^^

* OUTSIDE ITS RANGE P1900220

* p^90023()

* SPECIFICATIONS SEGMENT 190 P1900240

* PO0 1 3 820

* WHEN EXECUTING ONLY SEGMENT 190, THE SPECIFICATION STATEMENTS P0013825

« WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0013830

* IN COLUMNS 1 AND 2 REMOVED. P0013835

*

' POO l 3'84() DIMENSION IAC1I(5) P0013845

DIMENSION IAC1I(5) P19bA1

* P0013850

P I 900250

P0072920

P0072925

P0072930

P0072935

P0072940

PI 90B1

P0072945

PI 900260

P1900270

Pi 90 02 8 0 P1900290

8 PI 900300

P1900310

PI 900320

P1900330

» OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE,

* W H E N EXE CUT I N G 0 N L Y S E G M E N T i 9 0 , T H E F 0 L L OWING STATE ME NT

* NUVI 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = 6 NUVi = 6

C « « «

«

8906

WRITE (NUVI, 8906)

FORMAT ( 1 HI , IX, 25HD0TRM - (190) DO TERM I NAL / / 2X

.

- 1 7 H A S A REF - 7 TV. 2 . 8 / / 2 X , 7 H R E S U L T S ) C***** HEADER FOR SEGMENT 190

C»««*» CONTINUE WITH

WRITE (NUVI, 8905)

8905 FORMAT ( / / 2X , 23HTEST 1 CONTINUE

C***** HEADER FOR CONTINUE EXPLICIT

EXPLICIT INCREMENT**«********««*********7.1.2

EXPLI CIT)

TEST

DO 1901 JACVI = 1,4,1 P1900340

lACIKJACVI) = JACVI P1900350

1901 CONTINUE P1900360

IF ( IAC1 I ( 1 )- 1 ) 1 909 , 1 902, 1 909 P1900370

1902 IF ( IAC1 I ( 2 )-2 ) 1 909, 1 903, 1 909 P1900380

1903 IF ( IAC1 I ( 3 )-3 ) 1 909 , 1 904, 1 909 P1900390

1904

C « « * «

»

1909

I F

8904

C « * «

«

I 1 , IX, 17HINDI CATES

EXPLICIT TEST

ERROR**)

C « « «

c * * * * 19 0 5

8903

C « « *

»

c * * «

t

TEST IS SUCCESS

8902

C » « *

«

8909

7900

(IAC1I(4)-4) 1909,1905,1909

WRITE OUT ERROR MESSAGE

MRRVI=1

WRITE (NUVI ,8904)MRRVI

FORMAT ( /2X, 6H» «TEST

« ERROR FOR CONTINUE

'GO to 8909

* NO ERROR

* WRITE OUT CONTINUE EXPLICIT

MRRVI = 1 WRITE (NUVI , 8903 ) MRRVI

FORMAT (/2X,6H«*TEST,I1,1X,12HSUCCESSFUL»*)

» SUCCESS FOR CONTINUE EXPLICIT TEST

* CONTINUE TERMINAL IMPLIED TEST ************************ 7 .

1

WRITE (NUVI, 890 2 ) FORMAT ( //2X, 22HTEST2 CONTINUE IMPLIED)

* HEADER FOR CONTINUE IMPLIED TEST

LCCVI=2

DO 7900 KBCVI = LCCVI,

4

IAC1 I (KBCVI ) = KBCVI + 1

P1900400

P1900410

pT90b420

P1900430

P1 900440

P1900450

P1900460

P1900470

P19b0480

P1900490

pi9bb 5 00

P1900510

PI 900 520

8 P1900530

P1900540

P1900550

P1900560

P1900570

PI 9005 80

P1900590

NBS FORTRAN Test Prograflis Version 1
c * * * t * GO

P1900600

PI 9006 1 0

PI 900660

PI 90 06 70

PI 90 06 80

P1900690

PI 900 700

PI 90 0 7 1 0

'8 PI 9 0 0 72 0 PI 90 0 73 0 P19007i0

PI 9 0 0 7 5 0 P 1 90 0 760

P1900770

C»t.*« CHECK VALUES IN IAC1I ARRAY

IF (IAC1I(2)-3) 7909,8900,7909

8900 IF (IAC1I(3)-4) 7909,8901.7909 P1900620

8901 IF (IAC1I(A>-5) 7909,7901,7909 P1900630

7909 HRRVI=2 PI 9006 AO

WRITE (NUVI , 8904)MRRVI P1900650

ERROR IN CONTINUE IMPLiED TEST

TO 8908

C*t.*« WRITE out CONTINUE IMPLIEb IS SUCCESS

7901 HRRVI=2

WRITE (NUVI .8903)MRRVi

C «,»*.*» SUCCESS IN CONTINUE IMPLIED TEST

C*«*** ASSIGN TERMINAL TEST «««******t«*««««t«*«««*««*«»*****7,i

WRITE (NUVI. 9908)

9908 FORMAT ( / / 2X , 1 ZHT EST3 ASS iGN)

Ct*«t* .HEADER FOR ASSIGN TEST

8908 MDCVI =0

ASSIGN 7904 TO JFCVI

00 7902 NECVi = 2,5,2 PI 900 78 0 MDCVI = MDCVI +1 P1900790

7902 ASSIGN 7903 TO JFCVI PI 90 0 8 00

GO TO JFCVI, (7903.7904,7904) P1900810

C****« AN ERROR IN ASSIGN TEST

7904 MRRVI=3

WRITE (NUVI , 8904)MRRVI

C»**** ERROR FOR ASSIGN TEST

GO TO 8907

7903 IF (MDCVI-2) 7904,7905,7904

£)*«*» ASSIGN TEST IS SUCCESS

7905 MRRVI=3

WRITE (NUVI , 8903 )MRRVI

C.*.* * * .* S U C C ESS F 0 R A S S I G N TEST

C*«*** LOGICAL IF TERMINAL TEST****************************** 7, WRITE (NUVI. 9905)

9905 FORMAT ( / / 2X , 1 6HTESt4 LOGICAL IF)

C « HEADER FOR LOGICAL IF TEST

1.2

8907 KGCVI

LHCVI =

PI 90 0 8 2 0 PI 90 0 83 0 PI 90 0 8 40

P1900850

P 1 9 0 0 8 6 0 PI 90 0 2 70

P I 90 0 8 8 0 PI 90 0 890

PI 90 090 0 P1900910

T PI 90 0920

PI 90 0 93 0 P 1 9 0 0 9 4 0 PI 90 0 9 5 0 PI 90 0 960

PI 9009 70

ASSIGN 7908 TO KCVI PI 90098 0 DO 7906 JCVI =1,3 PI 90 0990

KGCVI = KGCVI +1 P1901 000

7906 IF (KGCVI .EQ. LHCVI) ASSIGN 7907 TO KCVI P1901010

GO TO KCVI , ( 7908,7907,7908 ) P1901020

C** *** TEST IS SUCCESS P1901030

7907 MRRVI=4 P1901040

WRITE (NUVI .8903)MRRVI P1901050

c * * * * * GOSUCCESS

TO 9902

FOR LOGICAL IF TEST P1901060

P1901070

PT901 0 80

P1901 090

PI 9 0 1 1 0

0' P1901 1 10

P1 90 11 20

P1901 130

PI 9 0 1 14 0 P1901 1 50

P 1 9 0 1 1 6 0 P1901 170

P 1 9 0 1 1 8 0 PI 90C1

P190C2

C**««* LOGICAL IF IS NOT SUCCESS

7908 MRRVI=4

WRITE (NUVI .8 9 0'4yMRRVI

C***** ERROR FOR LOGICAL IF TEST

9902 CONTINUE

C**t** END OF TEST SEGMENT 190

C* ***« WHEN ' EXECUT I NG ONL Y SE'GMEN't l'90; THE ST'O'P AND END CARDS

C***** WHICH APPEAR AS„ COMMENT CARDS MUST HAVE THE C= (: » IN COLUMNS i AND 2 REMOVED.

C= STOP

C= END

STOP

END

C** *«t*****««**«*«**«*«****tt«*****«***« «** **«*«*«**««*««*tt««t«ttt«Pl910010

C *'*'*"*'* PI 9 1 0 0 2 0 C***** DOLMT - (191 ) P1910030

C * * * * * P 1 9 1 0 0 4 0 C***««*«*t««ttt«***«t«*««t**«*«****«*«**t«*««**t*«*»***««*tt«««**«»«t*««pi910050

C

*'*'*' * GENERAL PURPOSE A S A R E F P 1 9 1 0 0 6 0 C***«* TEST DO LOOPS WHERE 7 . 1 . 2 . 8 / 1 8 P 1 9 1 0 0 7

0

NBS FORTRAN Test Programs Version 1 173
c * « * *

c

« * * *

* INITIAL

* TERMINAL

P1910080

P1910090

c « t «

c * « * *

* INCREMENT VALUES

» ARE COMPUTED AND SET AT OBJECT TIME

P1910100

P1910110

c * * *

«

c

» « *

« RESTRICTIONS OBSERVED

» * Ml, M2 AND M3 ARE GREATER THAN ZERO 7. 1 .2 P1910120

.8/21P1910130

c * * c « * * *

* * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS

* THE DO AND IS IN THE SAME PROGRAM UNIT

7. 1 .2 .8/08P1910140

PI 91 01 50

C t « t * c « * *

«

* * TERMINAL STATEMENT IS EXECUTABLE BUT NOT A

* GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR

7.

7.

1

1 .2.2

. 8/07P1 91 01 60

.8/10P19101 70

c * * * c

« * «

t

* DO STATEMENT

* * Ml, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 . 1 . 2 . 8 P1910180

.2/54P1910190

c * « * »

c

» « t «

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST

. 1 . 2 . 8 . 2/01 PI 9 1 0200

P191 021 0

c * * c » « »

* • CONTROL IS NEVER PASSED INTO RANGE OF DO FROM 7

* OUTSIDE ITS RANGE

. 1 . 2 .8 . 2/44P1 9 1 0220

PI 91 0230

c * » *

C t * * * * OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

PI 91 0240

PI 9 1 02 5 0

c

* « «

«

C * t » * * WHEN EXECUTING ONLY SEGMENT 191, THE F 0 L L 0 W I N G

' ST ATE ME NT P0072950

P0072955

c « * * * £ t * t *

* NUVI = 6 MUST HAVE THE C- IN COLUMNS 1 AND Z REMOVED P0072960

P0072965

c = NUVI = 6 NUVI = 6 P0072970

P191B1

c * * * * t WRITE ( NUV I

, 1 9 1 4 ) P0072975

PI 9 1 0260

1914 FORMAT (1H1 , 1X,27HD0LMT - (191) DO SET LIMITS//2X,

- 18HASA REF. - 7 . 1 . 2 . 8 / / 2X , 7HRESULTS ) PI 9 1 0270

PI 91 0280

c * « * « • HEADER FOR SEGMENT 191 WRITTEN

JACVI - 1 PI 9 1 0290

P1910300

KBCVI = 3 LCCVI = 1 P1910310

P 1 91 0320

NECVI = 0 DO 1911 MDCVI = JACVI, KBCVI, LCCVIP191 0330

PI 9 1 0340

1911

NECVI = NECVI + JACVI + KBCVI + MDCVI + LCCVI

CONTINUE

P1910350

PI 91 0360

c * * * IF (NECVI-21 ) 1913, 1912. 1913

ERROR

PI 9 1 03 70

P1910380

1915

WRITE ( NUVI , 1 91 5

)

FORMAT ( /2X, 24H* »TEST INDICATES E R RO R * * / / 2X , 1 0 H * * * 1 1 * * *

)

PI 9 1 0390

PI 9 1 04 00

c « * «

» DOLMT TEST FAILS, LIMIT VALUE SET INCORRECTLY

GO TO 1917

PI 91 041 0 P191 0420

c * * *

«

1912

• CORRECT

WRITE (NUVI, 1916)

PI 9 1 0 43 0 PI 9 1 0 4 40

1916

c * * *

«

FORMAT ( /2X, 19H**TEST SUCCESSFUL**)

• DOLMT TEST IS SUCCESSFUL

PI 9 1 04 5 0 PI 9 1 0460

1917

[]**««

CONTINUE

* END OF TEST SEGMENT 191

PI 9 1 0 4 70

PI 9 1 0 480

c

* * »

c

« * « *

* WHEN EXECUTING ONLY SEGMENT 191, THE STOP AND END

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= CARDS P1910490

P1910500

c

* « « «

c = IN COLUMNS 1 AND 2 REMOVED.

STOP

PI 91 05 1 0 PI 9 1 0 5 2 0 c= END

STOP

PI 9 1 0 5 3 0 PI 91 CI

c

» «

«

END P191C2

«***«**«t*»**t*t«***«***«***«**«*«*****«*«**tt«*«*t*******«**«t«*t*pi920010

c * « *

c * * »

* DONSC - (192)

PI 92 002 0 PI 92 003 0 c * * * *

c * * * * it* « * *

P 1 920040

*****P1920050

c * * * *

c * * *

«

* GENERAL PURPOSE

* TEST NESTED DO LOOPS 7. ASA

1 .2 REF P1920060. 8/28P 1 92 0 0 70

c * * t

c » * *

«

* WITH 2, 3, 4, 5 LEVELS

* SPECIAL CONSIDERATION

PI 92 00 8 0 PI 92 0 090

c « «

C t * *

«

» 5 LEVELS ARBITRARILY ASSIGNED AS MINIMUM REQUIREMENT

* RESTRICTIONS OBSERVED

P1920100

P 1 92 0 1 1 0

c « « *

«

c * « «

«

* Ml, M2 AND M3 ARE GREATER THAN ZERO

* * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS

7.

7 .

1

1 .2

.2 .8/21P1920120

.8/08P1920130

1 74 NBS FORTRAN Test Programs Version 1
THE DO AND IS IN THE SAME PROGRAM UNIT P 1 920 U0

» TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7.1 2 8/07P19201 50

c«*«** GO TO, ARITHMETIC IF, RETURN, STOP. PAUSE OR 7.1 2 8/10P1920160

DO STATEMENT P19201 70

* Ml. M2 AND M3 ARE NOT REDEFINED WITHIN DO 7.1.2 8 2/54P1920180

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7.1.2 8 2/01P1920190

ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1920200

c*«*«* PI 92 0 2 1 0 c***«* SPECIFICATIONS SEGMENT 192 PI 92 02 2 0 c****« POOl 3860

WHEN EXECUTING ONLY SEGMENT 192, THE SPECIFICATION STATEMENTS P0013S65

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P001 3870

IN COLUMNS 1 AND 2 REMOVED. POOl 3 8 7 5 POOl 3880

c= INTEGER MCA3I (2.3,3) POOl 3885

INTEGER MCA3I (2,3,3) PI 92A1

POOl 3 890

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE PI 92 02 3 0 P0072980

c***«« WHEN EXECUTING ONLY SEGMENT 192, THE FOLLOWING STATEMENT P0072985

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072990

c«*«*« P0072995

c= NUVI = 6 P0073000

NUVI = 6 PI 92B1

c « * * «

P0073005

WRITE (NUVI, 8920) P1920240

8920 FORMAT (1H1 . 1X,26HD0NSC - (192) NESTED LOOPS// 2X, PI 92 0 2 5 0 - 18HASA REF. - 7 . 1 . 2 . 8 / / 2X , 7HRE SU L T S

)

PI 92 0260

c « « « *

«

HEADER FOR SEGMENT 192 WRITTEN PI 92 02 70

c « « * «

TWO LEVELS OF NESTING*****************************************P1920Z80

MRRVI =2 PI 92 02 90

WRITE (NUVI , 892 1 )MRRVI PI 92 03 0 0 8921 FORMAT (//2X. 11 ,1X,17HLEVELS OF NESTING) PI 92 0 3 1 0

c * * « * * HEADER FOR TWO LEVELS PI 92 0 3 2 0 JACVI = 0 PI 92 03 3 0 DO 1922 KBCVI = 1, 2, 1 PI 92 03 4 0 JACVI = KBCVI*3 + JACVI P1920350

DO 1921 LCCVI = 1,5, 2 P1920360

JACVI = JACVI + LCCVI P1920370

1921 CONTINUE PI 92 0 3 8 0 1922 CONTINUE PI 92 0 3 90

c * * * * * TEST JACVI FOR VALUE OF 27 PI 92 0 4 0 0 IF (JACVI-27) 1924,1923,1924 PI 92 0 4 1 0

c « « * *

«

CORRECT PI 92 0 42 0 1923 WRITE (NUVI. 8922) PI 92 0 43 0 8922 FORMAT (2X, 19H**TEST SUCCESSFUL**) PI 92 0 44 0 c * * * * t TWO LEVELS OF NESTING IS CORRECT PI 92 0 4 5 0 GO TO 7927 P1920460

C * « * t ERROR P1920470

1924 WRITE (NUVI, 8923) P1920480

8923 FORMAT (2X,24H**TEST INDICATES ERROR**) P1920490

c * * « * « TWO LEVELS OF NESTING IN ERROR P1920500

c * « « « * THREE LEVELS OF NESTING***************************************P1920510

7927 MRRVI=3 PI 92 0 5 2 0 WRITE (NUVI ,8921 )MRRVI PI 92 0 5 3 0 c * * * * * HEADER FOR THREE LEVELS PI 92 0 5 40

MDCVI = 0 PI 92 0 5 5 0 DO 1927 LCCVI = 6,7 P1920560

DO 1926 KBCVI = 8,10,2 P1920570

DO 1925 JACVI = 1,3,1 PI 92 0 5 8 0 MDCVI = MDCVI + JACVI + KBCVI + LCCVI PI 92 0 5 9 0 1925 CONTINUE P1920600

1926 CONTINUE P1920610

1927 CONTINUE P1920620

C * « t «

«

TEST MDCVI FOR VALUE OF 210 PI 92 0630

IF (MDCVI - 21 0) 1 928, 1 929. 1 928 PI 920640

C * * t * * ERROR P1920650

1928 WRITE (NUVI. 8923) P1920660

NBS FORTRAN Test Programs Version 1 175
C»t*** THRcc LcVcLS Or NcSTING IN cRROR n4AOAZ9A P 1 9Z0670

GO TO /V^o PI 9Z0680

[;**t*« CORRcLT A1 A^AZAA PI 9Z0o90

<irt*5A MOTTC /hlllV/T 0O^^\ 19Z9 WRITE (NUVIfOVZZ; A4 AIATAA P 1 9Z 0 70 0 C***«* THREE LEVELS OF NESTING IS CORRECT PI 9Z071

0

L****t rUUK LbVcLb Ur NtollNu***************"********** tt»ttt**»*tt*tP'i9Z0720

7VZo nRRVl -4 A1 ATA'J^A PI 920730

WRITE (NUVI,o9Zl)MRRVl A1AOA7 / A P 1 9 Z 0 7 4 0 Ct»*** HEADER FOR FOUR LEVELS A'lA^ATCA PI 92 0 750

I H U V I - U D1 A^A7iA PI 9Z07oU

IGDVI - 0

A"! ATAT^A PI 920770

1 r D V I - 0 ni A^A70A P 1 9Z 0 78 0 trr\v/T — A

I E D V 1 - 0

A-l A^ATAA PI 920790

1 L V 1 - 1 A1 AOAOAA P19Z0600

DO 79Z0 MDCvI - Z ,

3

n A AOAO >f A PI 9208 1 0 IHDVI - IHDVI + MDCVI + lEDVI AIA'^AO^A

P 1 92 0 82 0 DO 79Z0 LCCVI - 3,5,3 A1 AOA07A PI 92 0830

IGDVI - IGDVI + LLLVl IHDVI PI 920840

DO 79Z0 KBCVI - i,Z,ICVl A1ATA0CA P 1 92 0 8 5 0 TrA\/T — TCA\/T A l/Dr\/T a TAA\yl IFDVI - IFDVI + KdLVI + IGDVI A-IATAOZA P19Z0860

AA 7Q^A lAPV/T — / C "5 DO 7VZ0 JACVI - 4,5,Z A1ATA0TA PI 920870

TCA\/T — TCAV/T a IAPV/T a TCAV/T lEDVI - lEDVI JACVI + IFDVI AIA'^AOOA P 1 9Z0880

79Z0 CONT I NUE A1 A^AftAA PI 9Z0890

A^^d.^* C*tttt TCCT TCA\/T CAD \/Atlir AT iOC TEST lEDVI FOR VALUE OF io5 A1 AOAAAA P 1 9 Z 0 9 0 0 IF (lEDVI - 185) 79Z 1

, 79ZZ , /9Z

1

A1 A^AA-* A P 1 9 2 0 9 1 0 C***** ERROR A1 ATAA'^A

P 1 9 Z 0 9 Z 0 79Z1 WRITE (NUVI,89Z3) A1 A'iAATA

P 1 9Z 0 93 0 [,»««« FOUR LcVcLS Op NcSTING IN ERROR P 1 9Z 0 9 4 0 GO TO /VZ9 PI 9Z 0 9 5 0 L***** LUKKcLI PI 9Z09o0

70'5'5 IIDTTC /Mll\/T OQOON /9ZZ WRITt (NUVI,89ZZ) 151 Q^A07A PI 9Z0970

L****« FOUR LcVELS OF NESTING IS CORRcCT PI 9Z0980

t»*t«* FIVE LEVELS OF NESiINo*** *********************** ***ttttit***tttpi920990

^AOA UnA\/T«>C 79Z9 MRRVI-5 P 1 9Z 1 0 0 0 WRITE ( NOV I , 89Z 1 ) MRRV

I

A'lAT'lA'lA P 1 9Z 1 0 1 0 HEADER FOR FIVE LEVELS P 1 9 Z 1 0 Z 0 IGDVI - 0 A1 ATI A7A P 1 9Z 1 0 3 0 DO 79Z3 NECVI = 10,11,1 AIA^IA/A P 1 9Z 1 0 4 0 DO /9Z3 MDCVI = 4,5,1 A'lA^IACA P 1 9 Z 1 0 5 0 DO 79ZA LCCVI - 1,Z,3 P 1 9 Z 1 0 6 0 DO 79Z4 KBCVI - 6, 8, 4 A1A'^1A'7A

P 1 9Z 1 0 70

DO 79Z4 JACVI - 1,3,Z P 1 9 Z 1 0 5 0 IGDVI-IGDVI+JACVI-KBCVI+LCCVI-nDCVI+NECVI nin^i AQA P 1 9 Z 1 0 9 0 79Z4 CONTINUE AilA^I lAA P 1 9 Z 1 10 0 79Z3 CONTINUE A'IA'51 1 1A Pi9Z1110

C*«t«* TEST IGDVI FOR VALUE OF Z4 AIA^I lOA P 1 9 Z 1 1 Z 0 IF (IGDVI - Z4) 79Z5, 79Z6,7925 AIA^I 1?A P 1 9Z 1 1 3 0 C*«*** ERROR AlAOil/A P19Z1 140

79Z5 WRITE (NUVI,89Z3) AIA^I 1 CA P 1 9Z 1 1 5 0 C«***» FIVE LEVELS IN ERROR AlAOi 1 Z.A P 1 9Z 1 160

AA TA AA^^ GO TO 99Z3 A-IATi 1 ^A

P 1 9 Z 1 1 7 0 79Z6 WRITE (NUVI,89Z2) AiA^I 1 OA

P 1 9Z 1 18 0

p ..... . r"Tiin ir"\/niA AAAAr*AT C»**»» FIVE LEVELS CORRECT AIA*?*! 1QA P19Zl 190

^ ^ ^ ^ ^ AAfclTAAl l/AATAAinA f~AA ^ AA lAAAA IIAHA Tkl AllrtAAOtnT C««t** CONTROL VARIABLES FOR 3 DO LOOPS USED IN SUBSCRIPT ^V/nnrAATAfclA niAOI^AA EXPRESSIONS P19Z1Z00

FOR A 3 DIMENSIONAL ARRAY P 1 9Z 1 Z 1 0 9923 WRITE(NUVI, 99Z0) P1921220

9920 FORMATC / /2X. 34HC0NTR0L VARI ABLE USED I N ^SUBSCFI 1 Pf ) P1 921 236

I VI = 1 PI 92 1 2 40

KVI = 0 P1921250

8924 KVI : KVI + 1 P1921260

JVI = 0 P1921270

8925 JVI = JVI + 1 P1921280

MCA3 I( I VI , JVI , KVI ) = IVI * 2*<JVI-1)+ 6«(KVI-1) P1921290

HCA3I ( IVI + 1 , JVI ,KV! ) = IVI + 1 2 ( J V I - 1 ) + 6 * ( K V I - 1 ) P1921300

IF(JVI-3) 8925,8926,8929 P1921310

8926 IF(KVI-3)8924. 8927, 8929 P1921320

8927 I I VI = 1 P1921330

DO 8928 KVI =1,3 P1921340

176 NBS FORTRAN Test Programs Version 1
00 8928 JVI = 1,3 P 1 92 1 3 5 0 DO 8928 IVI = 1,2 PI 92 1 360

lAVl -

n

lA3 1 ( 1 V 1 , J V I , K V 1 ; - IIVI P 1 9 ^ 1 3 7 0 IF (lAVI) 8929, 8928, 8929 P 1 92 1 3 8 0 8928 IIVI = IIVI 1 P 1 92 1 390

WRITE (NUVI, 8922), P 1 9 Z 1 4 0 0 GO TO 9911 P 1 9 Z 1 4 1 0

Q Q 7 Q

8 7 £ 7 WnllC vIMUVl, OtCj/ P 1 9 2 1 4 2 0 9921 CONTINUE P 1 9 Z 1 4 3 0 C « 1 1 * t END OF TEST SEGMENT 192 P 1 9 Z 1 4 4 0 c * « * * * WHEN EXECUTING ONLY SEGMENT 192, THE STOP AND END CARDS P 1 9 Z 1 4 5 0 C t * « * t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 1 9 Z 1 4 6 0 c * * * * t IN COLUMNS 1 AND Z REMOVED. r\ A r\ ~i A 1 TA

P 1 9 Z 1 4 7 0 C = STOP riinii / OA

P 1 9Z 1 4 8 0 L- c K\ r\ c N U P 1 V d 1 4 V 0 STOP P 1 9 Z C 1 END P 1 9 Z C Z ^ttt*tlit*t*t*t***t**tttttittt***t*t*tt*tt*t*t**ttit t** t* t t ft t * ft ft ft *»**P1930010

C 1 1 1 1 * r \ ^ 5 \J \J L\J c * « t * * DONSI - (193) niA7AA?A P 1 9 3 0 0 3 0 C * t * * * P 1 9 3 0 0 4 0 c * * * * * t*ft*fttfttft*t*t«ftfttft*ftittft*ftftftftftftftftft*ftftfitft*ftftttftft*ft*ft*ftftft* * t * * ft ft ft * ***»P1930050

c * * * * * GENERAL PURPOSE ASA Dec nin7AriiA Htr rlV50060

c * * * * * TESTS INCOMPLETE DO LOOP 7

7 . 1 . 2 . 8 . l/19PlViOO/0

* t i * RESTRICTIONS OBSERVED P 1 9 J 0 0 8 0 c * * * t * * Ml, M2 AND M3 ARE GREATER THAN ZERO 7. 1 . 2 . 8/ZiPl930090

c * * * * * * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7. 1 . 2 . 0 / A0nin7A1AA 8/08P1930100

C * t * * t THE DO AND IS IN THE SAME PROGRAM UNIT rilOTA'l iA

P 1 9 3 0 1 1 0 c * * * * * * TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7. 1 2 8/0/P19301Z0

C * t * * * GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR 7. 1 . 2 . 0 / iAn^n?Ai7A 8/10Pi93013 0 c * * «t * * DO STATEMENT P 1 9 3 0 1 4 0

C * « * t ft * Ml, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 . 1 . 2

s 1/54P1930150

C * t It * t * BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 . 1 . 2

«

• 0 • 1 / 01P1930160

Q * * * * t ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P 1 9 3 0 1 7 0

t * t * ninVAi OA

P 1 9 3 0 1 8 0

Q * * t * * OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE P 1 9 3 0 1 9 0 c * t * * * P 0 0 / 3 0 1 0 ^ t * * * * WHEN EXECUTING ONLY SEGMENT 193, THE FOLLOWING STATEMENT P 0 0 / 3 0 1 5 c ft * t t tt NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED P00/3UZ0

c ft t ft t t nAA77A^C P00/30Z5

NUVI = 6 nAA77A7A POO / 3030

NUVI = 6

n 1 Q 7 D 1 P 1 9 3 B 1 C ft ft * * ft DAA77A7C POO/ 3035

WRITE (NUVI, 1935) P 1 93 02 0 0

1I 07 ^J sJ FORMAT (1H1 , 1X,27HD0NSI - (193) INCOMPLETE D0//2X, P 1 V 3 0 1 0 18HASA REF. - 7 . 1 . 2 . 8 / / 2X , 7HRE SU LTS

)

P 1 93 0 Z Z 0

Q ft A ft It ft HEADER FOR SEGMENT 193 WRITTEN P 1 9 3 0 d 3 0 KBCVI = 0 P 1 9 3 0 Z 4 0 DO 1931 JACVI = 1,5,1 nin7A^CA P 1 9 3 0 Z 5 0 KBCVI = KBCVI + JACVI P 1 9 3 0 Z 6 0 IF(KBCVI - 6) 1931 , 1930, 1931 P 1 9 3 0 2 7 0 1930 GO TO 1932 P 1 9 3 0 Z 8 0 1931 CONTINUE P 1 9 3 0 Z 9 0 C * It ft t * ERROR EXIT ni n7A7AA P 1 9 3 0 3 0 0 WRITE (NUVI, 1936) ni 07A71 A P 1 9 3 0 3 1 0 1936 FORMAT ( 1 HO , 2X, 28H* t I NCOMPLETE LOOP IN ERROR**) ni ATAXIA P 1 9 3 0 3 2 0

C ft ft t ft t INCOMPLETE LOOP TEST IN ERROR ni n7A7TA P 1 9 3 0 3 3 0 GO TO 1937 niA'JA'T/A

P 1 9 3 0 3 4 0

C ft ft « * ft TEST JACVI FOR VALUE OF 3 7 . 1 . 2 .8. A / ^"iniATA^CA 1/21P1930350

1932 IF (JACVI - 3 ) 1 933, 1 934, 1 933 niA7A^ / A P 1 9 3 0 3 6 0 C t * t ft ERROR IN INDUCTION VARIABLE ni A7A7^A P 1 93 0 3 7 0 1933 WRITE (NUVI, 1938) niA'7A'70A

P 1 9 3 0 3 8 0 1938 FORMAT (1H0,2X,31H**INDUCTION VARIABLE IN ERROR**) ni A7A?AA P 1 9 3 0 3 9 0

C ft * * * * INDUCTION VARIABLE SET INCORRECTLY OUTSIDE LOOP ni ATA / AA

P 1 9 3 0 4 0 0 GO TO 1937 AlA^Ay 1A

P 1 9 3 0 4 1 0 1934 WRITE (NUVI, 1939) nin7A / 7A P 1 9 3 0 4 Z 0 1939 FORMAT (1H0,1X,30H**INCOHPLETE LOOP SUCCESSFUL**) PI 93 0 43 0 C * ft ft * * INCOMPLETE LOOP TEST SUCCESS P 1 93 0 4 4 0

NBS FORTRAN Test Programs Version 1 177
1937 CONTINUE

C«t««« END OF TEST SEGMENT 193

P1930450

P1930460

C««ttt WHEN EXECUTING ONLY SEGMENT 193, THE STOP AND END

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= CARDS P1930470P1930480

C«*»*» IN COLUMNS 1 AND 2 REMOVED.

C= STOP

P1930490

P1930500

C= END

STOP

P1930510

P193C1

END

1 1 1 1 * 1

1

P19"3C2

*«*tpi940010

C t « » « « C«**** DONSX - (194)PI 940020

PI 940030

C t « * «

* 1 1 1 * 1

1

PI 940040

****P1940050

C**«»« GENERAL PURPOSE

C**«** TESTS EXTENDED RANGE OF DO LOOP VARIABLE

ASA

7.1.2

REF P1940060

.8.2P1940070

C«**»t RESTRICTIONS OBSERVED

C«t«*« * Ml, M2 AND M3 ARE GREATER THAN ZERO 7.1.2.

PI 940 080

8/21 PI 940090

C«»«»* « TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS

C***'* THE DO AND IS IN THE SAME PROGRAM UNIT

7.1.2. 8/08P1940100

, P1 940 1 1 0 C***** t TERMINAL STATEMENT IS EXECUTABLE BUT NOT A C***«* GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR

7.1.2.

7.1.2.

8/07P1940120

8/10P1940130

C*«««« DO STATEMENT

Ct**tt t Ml, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 .1.2.8.

PI 940 1 40

2/54P19401 50

C«*«»* t BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 C***** ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST

.1.2.8. 2/01P1940160

P19401 70

C***** * THE EXTENDED RANGE OF A DO DOES NOT CONTAIN A 7 C***t* DO OF THE SAME PROGRAM UNIT THAT HAS AN.1.2.8. 2/48P1 9401 80

P1940190

C*t«t« EXTENDED RANGE.

C * t * *

«

PI 94020 0 P194021

0

C****t SPECIFICATIONS SEGMENT 194

C

t * « t * PI 940220

P0013900

C.***t WHEN EXECUTING ONLY SEGMENT 194, THE SPECIFICATION STATEMENTS P0013905

C*t«** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0013910

C***** IN COLUMNS 1 AND 2 REMOVED,

c « * » *

«

P001391

5

P0013920

C= DIMENSION IAC1I(5)

C= INTEGER 131(2,2,2)

P0013925

P001 3930

DIMENSION IAC1I(5)

INTEGER 131(2,2,2)

PI 94A1

P194A2

c * * * * * C**t*t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P0013935

PI 940230

c * * * «

C***** WHEN EXECUTING ONLY SEGMENT 194, THE FOLLOWING STATEMENT

P0073040

P0073045

C*«*«« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

c « * * *

«

P0073050

P0073055

C= NUVI = 6 NUVI = 6 P0073060

P194B1

c « * « * * WRITE (NUVI, 8944)

P0073065

PI 940240

8944 FORMAT ( 1 H 1 , 1 X , 3 1 H DO N SX - (194) EXTENDED DO RANGE//2X.

120HASA REF. - 7 . 1 . 2 . 8 . 2 / / 2X , 7HRESULTS ) PI 9402 5 0 P1940260

C***** HEADER FOR SEGMENT 194 WRITTEN P1940270

C«*«*« EXTENDED RANGE FROM SINGLE LE VE L ****************************** P 1 9 4 0 2 8

0

MRRVI =1 WRITE (NUVI ,8942)MRRVI

P1940290

P1940300

8942 FORMAT ( / / 2 X , 2 6 H E XT E N D E 0 RANGE FROM LEVEL ,11)

C***** HEADER FOR SINGLE LEVEL WRITTEN

PI 9403 1 0 PI 940320

DO 194i JACVI = 1,4,2

lACIKJACVI) = JACVI

P1940330

P1940340

GO TO 1942

1943 IF(JACVI-I) 1945,1941,1945

PI 9403 5 0 PI 940360

1941 CONTINUE

GO TO 1949

PI 9403 70

PI 94038 0 C***** TEST JACVI FOR VALUE OF 1 1942 IF (JACVI - 1) 1946,1943,1946

PI 940390

PI 94 0 40 0 C***** TEST lACIKD AND IAC1I(3) FOR VALUES OF 1 AND 3

1 946 IF (lACIKD-l) 1 9 4 7 . 7946 , 1 947

PI 940 4 1 0 PI 940420

178 NBS FORTRAN Test Programs Version 1

i
7946 IF <IAC1I(3)-3) 1947,1943,1947

C*t«tt ERROR

1947 WRITE (NUVf, 7947)

7947 FORMAT ( / 2X . 2 4H * * TEST INDICATES ERROR**)

C * * * * * SETTING OF IAC1I ARRAY, LOOP NOT WORKING

GO

C * * * *

1 945

C * * * *

1 948

C « * * * *

ERROR IN TO 8940

* TEST JACVT FOR VALUE OF 3 IF ( JACVI - 3) 1948, 1941 ,1948

* ERROR

WRITE (NUVI,7947)

ERROR IN SETTING OF INDUCTION VARIABLE

60 TO 8940

1949 WRITE (NUVI.7949)

7949 FORMAT ( / 2X , 1 9H * * TEST SUCCESSFUL**)

C*;«T* EXTENDED RANGE SUCCESS FOR SINGLE LEVEL

8940 MRFIVI =2

C«««»V EXTENDED FtANGE FROM DOUBLE LEVEL******************************

WRITE (NUVI ,8942)MRRVI

C*«*«* HEADER FOR DOUBLE LEVEL WRITTEN

DO 7940 KBCVI = 3,4

DO 7940 JACVI = 1,2.3

GO TO 7941

I GOV I = 1 CONTI NUE

« TEST JACVI FOR VALUE OF 1 IF (JACVI-1) 7942.7943,7942

* ERROR

WRITE (NUVI, 7947)

* DOUBLE LEVEL NESTING IN ERROR

GO TO 8946

* TEST KBCVi FOR VALUE OF 3 OR 4 IF (KBCVI-3) 7942.8947.7944

IF (KBCVI-4) 7942.7945.7942

* CORRECT

WRITE (NUVI, 7949)

* DOUBLE LEVEL TEST CORRECT

8947

7940

C * * * « 7941

C * « * * 7942

C * « * *

c * * * * 7943

7944

C * * « * 79 4 5 C * * * * 8946 CONTINUE

131(1.1.1)

131(2.1.1)

131(1.2.1)

131(2.2.1) = 2 131(1,1,2)= -2

131(2.1.2) = 0 131(1,2,2) = -3

131(2,2,2) = -2

FORMAT(//2X.40HEXTENDED RANGE CONTAINING A DO STATEMENT)

WRITE(NUVI, 8952)

8952

131 ( 1 . 1 , IVI ) = 131 ( 1. 1 . IVI ) + 1 DO 8948 JVI = 1 .2 131 ( 1 , JVI , IVI

)

= 131(1, JVI. IVI) 2 GO TO 8949

895 1 CONTINUE

8948 CONTINUE

8950

8949

WRITE (NUVI, 8950) 131

F0RMAT(8(/I5) /30H THE ABOVE 8 VALUES SHOULD BE/

1 33H IN DESCENDING ORDER FROM 8 TO 1

)

GO TO 8953

bo 8954 KVi = 1.2

131 (KVI , JVI , IVI ) = I3I(KVI,JVI,IVI) 3 CONTINUE

GO TO 8951

895 3 CONTINUE

C««*«* END OF TEST SEGMENT 194

C***«« WHEN EXECUTING ONLY SEGMENT 194, THE STOP AND

C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= C«*««* IN COLUMNS 1 AND 2 REMOVED.

C= STOP

8954

END CARDS

PI 94 0 43 0 PI 94 0 4 4 0 PI 940 4 5 0 PI 940460

P 1 9 4 0 4 7 0 PI 940 4 8 0 PI 940 4 9 0 PI 94 0 5 0 0 PI 9 40 5 1 0 PI 9 4 0 5 2 0 PI 9 4 0 5 3 0 PI 9 40 5 40

PI 9 4 0 5 5 0 P1940560

P1940570

PI 940 5 8 0 PI 94 0 5 90

PI 94060 0 PI 9 406 1 0 PI 940620

PI 9 4063 0 PI 9406 4 0 PI 9 4 0 6 5 0 P1940660

P1940670

PI 9 4 068 0 P 1 9 4 0 6 9 0 PI 94 0 70 0 PI 940 7 1 0 PI 94 0 72 0 PI 940 73 0 PI 9 40 7 4 0 P 1 9 4 0 7 5 0 P1940760

PI 9 4 0 7 70

P1940780

P 1 9 4 0 7 9 0 PI 940 8 0 0 PI 9 40 8 1 0 P1940820

PI 94 0 8 3 0 PI 94 0 8 4 0

P 1 9 4 0 8 5 0 PI 94 0 860

PI 94 0 8 70

PI 940 8 8 0 PI 940 890

P 1 940 90 0 P 1 9 4 0 9 1 0 PI 94092 0

P 1 9 4 0 9 3 0 PI 94 0 9 40

P 1 9 4 0 9 5 0 PI 9 40 96 0 PI 9 4 0 9 70

PI 94 09 8 0 P 1 9 4 0 9 9 0 P1941000

P1941010

PI 94 1 0 20

P 1 9 4 1 0 3 0 PI 9 4 1 0 40

P 1 9 4 1 0 5 0 P1941060

P 1 9 4 1 0 7 0 P1941080

P1941090

PI 941 1 00

NBS FORTRAN Test Programs Version 1 179
C= END P1941110

STOP P194C1

END Pi9'4C'2

C*****t***t***t*tt*«**tttttt**tt*t«*t*****t**tt****t*t****t tt** **«««P1950010

c « * « * * P1950020

c * * * * t OONML - (195) P1950030

c * * « * t P1950040

**t***»pi950050

c * * * * * GENERAL PURPOSE ASA REF P1950060

C * t « «

TESTS TWO INDEPENDENT LOOPS NESTED 7.1 .2.,8/28P1950070

c * * * WITHIN LARGER ONE P1950080

c * * * *

«

RESTRICTIONS OBSERVED P1950090

c * * * * * * Ml, M2 AND M3 ARE GREATER THAN ZERO 7.1 .2,,8/21P1950100

c * * * t * * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7.1 .2 ,,8/08P19501 10

c * « * *

«

THE DO AND IS IN THE SAME PROGRAM UNIT P1950120

c « * * » TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7.1 .2,,8/07P1950130

c * * * * * GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR 7.1 .2,,8/10P1950140

c * « * * * DO STATEMENT P19501 50

C t * * * * * Ml, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 .1.2 .8,, 1 /54P 1 9501 60

c « * « * * * BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 .1.2 .8.,1/01P1950170

c * * * «

t

ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1950180

c * * * «

P1950190

c * * * «

«

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE P1950200

C t « « «

P0073070

c * t « « WHEN EXECUTING ONLY SEGMENT 195, THE FOLLOWING STATEMENT P0073075

c * * * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED P0073080

C t t * * P0073085

c= NUVI = 6 P0073090

NUVI = 6 P195B1

C t * 1

1

P0073095

WRITE (NUVI, 1950) P1950210

1950 FORMAT (1H1 , 1X,30HDONML - (195) MULT-LEVEL L00PS//2X, P1950220

- 18HASA REF. - 7 . 1 . 2 . 8 / / 2X , 7HRESU L TS ) P1950230

c « * t »

t

HEADER FOR SEGMENT 195 WRITTEN P1950240

IHDVI = 1 P1950250

IGDVI = 2 P1950260

IFDVI = 3 P1950270

DO 1951 JACVI = 1,2 P1950280

IFDVI = IFDVI JACVI P1950290

00 195Z KBCVI = 2,4,1 P1950300

IGDVI = IGDVI + 1 P1950310

1952 CONTINUE P1950320

IFDVI = IFDVI IGDVI P1950330

DO 1953 LCCVI = 6,7,3 PI 95 0340

IHDVI = 1 + IHDVI P1950350

1953 CONTINUE P1950360

IFDVI = IFDVI + IHDVI P1950370

1951 CONTINUE P1950380

c * * * *

«

TEST IFDVI FOR VALUE OF 24

IF (IFDVI - 24) 1954,1955.1954

P1950390

PI 950400

c * « * «

ERROR P1950410

1954 WRITE (NUVI, 1956) P1950420

1956 FORMAT (/2X.24H*«TEST INDICATES ERROR**) P1950430

c * * * *

»

MULTI-LEVEL TEST IN ERROR P1950440

GO TO 1958 P1950450

C * * t * t CORRECT P1950460

1955 WRITE (NUVI, 1957) P1950470

1957 FORMAT (/2X,19H**TEST SUCCESSFUL**) P1950480

C * * * 1

1

MULTI-LEVEL TEST CORRECT P1950490

1958 CONTINUE P1950500

C » t * * t END OF TEST SEGMENT 195 P1950510

c * * * « WHEN EXECUTING ONLY SEGMENT 195, THE STOP AND END CARDS P1950520

c « * * * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1950530

c * « * t IN COLUMNS 1 AND 2 REMOVED. P1950540

STOP P1950550

c= END P1950560

STOP P195C1

END P195C2

SO NBS FORTRAN Test Programs Version 1
C**********t**t**************t «** ***llr***t*t***«;ir«:****«*«**<r**«*****«P1960010

C***** P1960020

C* * * * * DONlb "- (196) PI 960 0 3 0

C * * « * * PI 9 6 0 0 4 0 C*t**********<r-*. *t«t***********«t************« t** **t***4r*****t*******l!*P1960050

C**»** GENERAL PURPOSE

C*««tt to TEST DO LOOPS WHICH HAVE I/O TERMINAL

C***t* STATEMENTS (FORMATTED READ, FORMATTED WRITE

C**«T* AND REWIND ARE USED AS TERMINAL STATEMENTS)

C « « * « * C***** RESTRrctlONS OBSERVED

C«*t** « Ml, M2 AND M3 ARE GREATER THAN ZERO 7 C*«*** * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7 C***»* THE DO AND IS IN THE SAME PROGRAM UNIT

C*'**T* « TERMINAL STATEMENT IS EXECUTABLE BUT NOT

A

T

Ct«*«* GO TO. ARITHMETIC IF, RETURN. STOP, PAUSE OR 7

.C ***«* 00 STATEMENT

Ct**«* * Ml, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7.1

CiT*;, * BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7.1

C***** ONE DO ARE CONTAI NED IN INNERMOST DO OF A NEST

C * * *

«

C «*«.** S P E C I F I C A T I 0 N S S E G M E N T 19 6

C « * * * * C****« WHEN EXECUTING ONLY SEGMENT 196, THE SPECIFICATION STATEMENTS

C:**«T* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C = C***** IN COLUMNS 1 AND I REMOVED.

ASA REF P1960060

7.i'.'2.'8"P'l 960 0 70

7.1 .3.2.2P 1 960 0 8 0 7.1.3.2.3P1960090

7.1 .3.3. 1P 1 960 1 0 0 P1960110

1 .2.8/21P 1 960 1 2 0 1.2.8/08P1960130

PI 960 U0

1 . 2 . 8/07P 1 960 1 5 0

1 .2.8/10P 1 960 1 60

P19601 70

2.8.2/54P1960180

2. 8. 2/01 PI 96 0 1 90

P1960200

P1960210

PI 960 2 2 0 P0013940

POOl 3945

P0 0 1 39 5 0 POOl 39 5 5 POOl 3960

POOl 3965

POOl 3970

POOl 3975

P 0 0 1 3 9 8 0 PI 96A1

P196A2

PI 96A3

P196A4

POOl 3985

P1960230

P0 0 73 1 0 0 P00731 05

P00731 1

0

PC 0 73 1 1 5 P00731 20

P 0 0 7 3 1 2 5 PI 96B1

P196B2

P 0 0 7 3 1 3 0

C * * * * t C= DIMENSION I AC1 I ( 5 ) , AC2S( 5 , 6) C= LOGICAL MCAVB,MCBVB,GH2B(1 ,2) C= DOUBLE PRECISION C C3D ( 7 , 2 , 2 ) , DPAVD , DPBVD

C= COMPLEX NUMVC,DENVC,LL1C(32)

DIMENSION I AC1 I ( 5 )

, AC2S( 5 , 6)

LOGICAL MCAVB,MCBVB,GH2B( 1,2)

DOUBLE PRECISION CC3D ( 7 , 2 , 2 ) , DPAVD , DPBVD

COMPLEX NUMVCDENVC, LL1 C(32 ) C * « « * * C***** d L) t P U

t

Ik P E ASSIGNMENT STATE ME NTS

C * * * * * NO INPUT TAPE

C * * * * * c * « t «

c * * « *

«

C= NUVI

WHEN EXECUTING ONLY SEGMENT 196.

NUVI=6 AND INVI=9 MUST HAVE THE

THE FOLLOWING

C= IN COLUMNS

STATEMENTS

1 AND 2 REMOVED

INVI

NUVI

I NVI

C * * * * *

1960

WRITE (NUVI

FORMAT (1H1

119HTERMINAL

1 960 ) 1X,31HD0NI0

STATEMENTS/

- (196) DO LOOPS WITH

2 OH ASA REF . - 7.1.2

I /O/ 1 6X.

8/ 9H RESULTS)

C * * « *

«

HEADER FOR SEGMENT 196 WRITTEN

KCAVI

CKAVS

DPBVD

DENVC

MCBVB = IAC1 1(2)

1

1 . 0

1 . ODO

(1.0,1

.TRUE .

1

0)

AC2S(4,3) 1 CC3D(5,1 ,2) = 1 .ODO

L L 1 C ( 2 ) = (1.0,1.0)

GH2B(1,1) = .TRUE.

WRITE (I NVI, 1 9 65 ^ KCAVr. CKAVS. DPBVD, DENVC, M CBVB , I AC lT( 2)

1 AC2S(4,3), CC3D(5,1,2), LL1C(2). GH2B(1.1)

REWIND INVI

DO 1964 JACVI

C * * * * * DO 1961 KBCVI =1.1 1 1961 READ ( I NVI ,1 965 ) MCAVI

1 AC2S(5,4), CC3D(6

PI

PI

PI

PIPI

PI

PI

PI

PI

PI

PIPI

PI

PI

P 1 PI

PI 1.3.1 PI

PIPI CMAVS , DPAVb. NUMVC, MCAVB PI 1.2), LL1 C(3) , GH2B(KBCV1 ,2) PI

960240

960250

960260

960270

960280

960290

960300

960310

960320

960330

960340

960350

960360

960370

960380

960390

960400

960410

9 6 0 4 2 0 960430

960440

960450

NBS FORTRAN Test Programs Version 1 181
C*«»** P1960460

DO 1962 LCCVI = 1,2,1 P1960470

1962 REWIND INVI ... p^g^Q^jQ

C*«*** P1960490

D 0 1 9 6 3 M D C V I = 1 , 1 , i P 1 96 0 5 0 6 1963 WRITE (NUVI,1 966) MCAVI, lACIKI), CMAVS, AC2S(5,4), OPAVD,, P1 9605 1 0

1 964

C « * t * 1965

1966

1967

CC3D(6,1,2), NUMVC, LL1C(3). MCAVB,

GH2B(MDCVI, MDCVI+1)

CONTINUE

WRITE (NUVI,1967)

FORMAT STATEMENTS FOR THIS SEGMENT

P1960520

P1960530

P1960546

P1960550

PI 960560

C

* * *

c

* * *

«

c * * *

«

C * 4 » *

c =

Q « * * «

c * * * *

c * * *

c

» * * »

* t * *

c

« * * Q t *

c * *

c * * * *

c

« * «

c « * * «

c

* * * *

c * * »

c * * « c=

£ t * t t £ * t * t c * * * *

c

« * « »

c

* * * * Q 4 * « *

c * « * t

c « * £ * t t *

c * * * *

c

* * *

c * « *

c

* * « (;**

[;***

C

« *

«

C

* *

«

C * * C * * «

FORMAT (2(1 5 , F5 . 1 ,D8 . 1 ,2(F5 . 1 ) , L5 ) ) P 1 9605 70

FORMAT ( // 2( I 1 0/ ) .2( F1 1 . 1 / ) , 2(01 5 . 1 / ) , 2(F5 . 1 , F6. 1 / ) .2(Llb/) ) P 1 960 5 80

FORMAT (//30H THIS TEST IS SUCCESSFUL IF 3/38H IDENTICAL GROUPP 1 96 0 5 90

S OF OUTPUT HAVE BEEN/12H GENERATED.) P1 960600

END OF SEGMENT 196 P1960610

WHEN EXECUTING ONLY SEGMENT 196, THE STOP AND END CARDS P1960620

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1960630

IN COLUMNS 1 AND 2 REMOVED. P 1 960640

STOP P1960650

END P 1 960660

STOP P196C1

END P 1 9 6 C 2 ***«tt**<r*««;*it«********t**it*«*<rt«i**t*****t*«*«t*t************tt***tP1970010

PI 970020

MORDO - (197) P1970030

PI 970 040

«***t***t t** ***tt***********t***«**«t*tt*«**«*«*****«***«*«**«pi970050

GENERAL PURPOSE ASA REF PI 9 70 060

A MORE COMPLICATED SEGMENT TESTING THE DO STATEMENT . 7 . 1 . 2 . 8 P 1 9 7 0 0 7

0

P 1 9 7 0 0 8 0 SPECIFICATIONS SEGMENT 197 P1970090 p0 0 1 3990

WHEN EXECUTING ONLY SEGMENT 197 THE SPECIFICATION STATEMENTS P0013995

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= POOUOOO

IN COLUMNS 1 AND 2 REMOVED. P0014005

POO UO 1 0 DIMENSION IAC1I(5), MCA1I(5) P0014015

DIMENSION IAC1I(5), MCA1I(5) P197A1

P001 4020

WHEN EXECUTING ONLY SEGMENT 197, THE SEGMENT 005, WHICH P1970100

CONTAINS THE STATEMENT FUNCTIONS BEING USED HERE, MUST BE P1970110

INSERTED AFTER THE SPECIFICATION STATEMENTS OF SEGMENT 197. P 1 9 70 1 20

PI 970 1 30

<tiir**t**»ll;***t it** **«*<t**t*****t ilr** ****llr*<[****<r <r** ***t*P0050500

P0050510

BSFDF-(005) POO 5 0520

P0 0 5.0,5 30

)r«;4;<*«il:«*****4r«t***!lrt*t*tilrt******«:**t«i«t***t**ttt********tt*«t***P0050540

GENERAL PURPOSE ASA REF P0050550

DEFINING STATEMENT FUNCTIONS THAT ARE TO BE TESTED P0050560

I N SEGMENT 197 . 8 . 1 . 1 P 0 0 5 0 5 7

0

HEADER FOR SEGMENT 0 0 5 POO 5 0 5 80

DEFINING EXPRESSION CONTAINS CONSTANTS AND VARIABLES P0050590

CMAFS(CAWVS, CBWVS) = CAWVS * 2. + CBWVS P0050600

CMBFS(MAWVI ,MBWVI ,MCWVI ) =(MAWVI + MBWVI + MCWVI)/3 P0 0 5 06 1 0 MCAF I ( MAWVI , MBWVI ) = MAWVI ** MBWVI P0 0 5 062 0 MCBF I ( CAWVS , CBWVS , CCWVS ) = (CAWVS + CBWVS + CCWVS) * 2.0 P0050630

DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES AND' P 0 0 5 064 0 INTRINSIC FUNCTIONS P0050650

CMCFS ( CAWVS , CBWVS , CCWVS ) = ABS ( CAWVS * • 2 - ( C B W VS + C C W VS ) * 2 ) P0 0 5 0660

CMDFS(MAWVI , MBWVI ) = I S I G N ( ( M AW V I + M B W V I )

, ( M AW V I - M B W V I ) ) P0 0 5 06 70

MCCFI (MAWVI , MBWVI , CAWVS) = MAWVI**2 + MBWVI**2 + I F I X ( C AWVS ) * * 2 P0 0 5 068 0 MCDF I( CAWVS , CBWVS , CCWVS , CDWVS , CEWVS) = (CAWVS + CBWVS + CCWVS + P0050690

CDWVS +CEWVS) •* (ABS(CAWVS)) P0050700

DEFINING EXPRESSION CONTAINS PREVIOUSLY DEFINED STATEMENT P0050710

FUNCTIONS AND/OR EXTERNAL FUNCTION REFERENCES ' P0050720

CMEFS(CAWVS, CBWVS) = CMBFS(1,2,3) + SQRT((CAWVS + CBWVS)) P0 0 5 0 73 0

182 NBS FORTRAN Test Programs Version 1
.HBWVI .MCWVI ) = MCCFKMAWVI ,MBWVI .3.0) + MCWVI **Z

,MBWy..I,) = M CAF,L.(.M.AWyi,,.MBWy| *

» M CAF I ( MAWV I,, M BWV I ) CMFFS(MAWVI

MCEFKMAWVI

MCFFKCAWVS.CBWVS.CCWVS) = SORT(CAWVS) + SQRKCBWVS)

C*««*« DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES

C'V**** OR EXTERNAL FUNCTION REFERENCES AND PREVIOUSLY DEFINED

C««**« STATEMENT FUNCTIONS.

CMGFS(MAWVI .MBWVI , CAWVS, CBWVS) = FLOATCMAWVI ** 2) - CMAFS ( CAWVS

,

UBWVS) + SQRT( (FLOAT(MAWVI + MBWVI)))

MCGFKMAWVI , MBWVI , MCWVI , CAWVS) = M C E F I( M A W V I , M B W V I) - MCEFICMAWVI

1MCWVI) + IFIX(EXP(CAWVS))

C **;«" END OF TEST SEGMENT 005'

C *,.** * P y T P U T T A P E ASSIGNMENT STATEMENTS. NO INPUT TAP E, C * * * «

«

C»«*** WHEN EXECUTING ONLY SEGMENT 197, THE FOLLOWING STATEMENTS

C* ««** NUVI =6 AND INVI = 9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C « * t * *

P00 5 0 7';0 P0050750

EXP(CCkVS) P0050760

INTRINSIC P0050770

P0050780

P0050790

P0050&00

P 0 0 5 0 8 1 0

, P 0 0 5 0 82 0 P0050830

P0050840

P 1 9 7 0 1 40

P0073140

P0 0 73 U5

P0 0 73 1 5 0 P0 0 73 1 5 5 C = NUVI = 6 P0073160

C = INVI = 9 P0073165

NUVI = 6 P 1 97B 1 INVI = 9 PI 97B2

c * * * * * P0073 1 70

WRITE (NUVI , 1 970 ) P 1 9 70 1 5 0 1970 FORMAT (1H1, 1X,37HM0RD0 - (197) A MORE COMPLICATED SEG./16X, PI 9 70 1 6 0

1 16H0F DO STATEMENTS// PI 9 7 0 1 70

2 35H ASA REFS

C * .* * * « HEADER FOR

C* « * * « TEST OF DO

C**«** REFERENCED

ASSIGN 9190 TO

MCBVI = 0 MCHVI =

DO 1971

C M A VS

= 1971 MCBVI = IF (MCBVI - 2)

9190 MCHVI = 1973

C* * * * * TEST OF DO

IVI = 0

- 7.1.2.8 AND 7.1.2.8.1 // 9H RESULTS ) SEGMENT 197 WRITTEN

WITH STATEMENT FUNCTIONS AND INTRINSIC FUNCTIONS

WITHIN ITS RANGE. TO BE RUN WITH SEG. 005 AND 412

MVI

PI 9 7 0 1 8 0 PI 9 70 1 90

PI 9 7 02 0 0 P1970210

PI 9 7 02 2 0 PI 9 702 3 0 PI 9 7 02 4 0 P1970250

P 1 9 7 0 2 6 0 P1970270

PI 9 702 8 0 PI 9 702 90

PI 9 7 0 3 0 0 P1970310

ASSIGN 9968 TO MVI P 1 9 7 0 3 2 0 DO 1973 MCAVI =1,3 P1970330

1973 CALL MDQ( MCAVI, IVI) P1970340

IFdVI - 6) 9966. 9968. 9966 P 1 970 3 5 0

1971

MCAVI = 4.8,4

CMAFSd.O, FLOAT(MCAVI ) ) MCBVI + MCAF I ( MCAVI , I F IX( CMAVS ) - 9966, 9190, 9966

(MCAVI+2))

WITH CALL STATEMENTS REFERENCED WITHIN ITS RANGE

C * * « 1

1

c « * « * » c * * « * * C t « » »

c « * * *

«

C * t * t *

TEST OF DO WITH THE FOLLOWING FEATURES COMBINED - PI 9 70360

1

C « * 1

1

c * « 1

1

C * t * * C * * * * c * * * * C t * t

«

9191

AN EXIT FROM THE RANGE OF A 00 BY THE EXECUTION OF A P1970370

GO-TO STATEMENT. THE CONTROL VARIABLE OF THE DO IS P1970380

DEFINED 7.1 .2.8.1/19-23P 1 9 70 390

A GO TO STATEMENT CAUSES CONTROL TO PASS FROM AN P1970400

INNER DO TO THE OUTER DO (WITHIN THE NESTED RANGE) P1970410

PI 9 70 420

PI 970 4 3 0

P 1 9 7 0 4 4 0 PI 9 70 4 5 0 P1970460

PI 9 70 4 70

PI 9 70 4 8 0 PI 9 70 490

PI 970 5 0 0 PI 9 70 5 1 0 PI 9 70 5 2 0 P1970530

P1970540

PI 9 70 5 5 0 PI 9 70 5 60

P1970570

PI 9 70 5 8 0 PI 970 5 90

P 1 9 7 0 6 0 0 PI 9706 1 0

9968 MCHVI = 1976

ASSIGN 9191 TO MVI

MCBVI = 0 DO 1976 MCAVI = 1,1,1

9192 MCBVI = MCBVI + 1 DO 1975 MCCVI = 1,3.1

MCBVI = MCBVI + 1 IF(MCBVI - 4) 9197, 9192, 1975

9197 GO TO (1975, 1975, 9966), MCCVI

1975 CONTINUE

1976 CONTINUE

IF (MCBVI - 8) 9966, 9191 , 9966

TEST THAT THE STATEMENT LABEL OF THE TERMINAL STATEMENT

OF MORE THAN ONE DO CAN BE USED IN ANY GO TO OR ARITHMETIC

IF STATEMENT THAT OCCURS IN THE RANGE OF THE MOST DEEPLY

CONTAINED DO WITH THAT TERMINAL STATEMENT. 7.1.2.8.2/1-6

ALSO THE CbNTRbL VARIABLE IS OEFINED WHEN EXIT IS MADE BY THE

EXECUTION OF AN ARITHMETIC IF STATEMENT.

ASSIGN 9194 TO MVI

MCHVI = 1977

NBS FORTRAN Test Programs Version 1 183
HCEVI = -24

DO 1977 MCAVI = 1,2

P1970620

P1970630

MCEVI = MCEVI + 1 DO 1977 MCBVI =1,2

P1970640

P1970650

MCEVI = MCEVI + 1 DO 1977 MCCVI = 1,5,1

P1970660

P1970670

MCEVI = MCEVI + 1 IF(MCEVI ) 1977. 1977, 1978

PI 970680

P1970690

1977

c * * * t CONTINUE

* ERROR IF LOOP TERMINATES THRU CONTINUE

P1970700

P1970710

c * * * GO TO 9966

* CONTROL VARIABLE DEFINED ON FIRST LEVEL ON ARITH. IF P1970720

P1970730

197 8 MCEVI = MCAVI + MCBVI + MCCVI

MCHVI = 1978

P1970740

P1970750

9194

IF(MCEVI -8) 9966,9194,9966

MCHVI = 1974

P1970760

P1970770

MCEVI - 0 ASSIGN 9961 TO MVIP1970780

P1970790

DO 1974 MCAVI =1,2

DO 1974 MCBVI = 1,2,1

P1970800

P197081

0

DO 1974 MCCVI = 4,5,1

DO 1974 MCDVI = 2,3

P1970820

P1970830

9195

GO TO 9193

GO TO 1974

PI 970840

P1970850

9193 MCEVI = MCAVI + MCBVI + MCCVI MCDVI + MCEVI

GO TO 9195

PI 970860

P1970870

1974 CONTINUE

IF(MCEVI - 160) 9966, 9961. 9966

P1970880

P1970890

c * * * c * * *

*

*

* TEST OF DO WITH I/O STATEMENTS REFERENCED WITHIN ITS RANGE.

* REWIND, UNFORMATTED READ AND WRITE ARE REFERENCED. THE

P1970900

P1970910

c * * * c * * * *

* FOLLOWING 3 DOS MUST BE KEPT TOGETHER FOR SE L

F - CHECK I NG

* PURPOSES

P1970920

P1970930

996 1 MCHVI = 1972

ASSIGN 9196 TO MVI

P1970940

P1970950

REWIND INVI

DO 9963 MCAVI = 1.4

P1970960

P1970970

MCA1 I (MCAVI ) : MCAVI

WRITE ( INVI) (MCA1 I (MCBVI ) . MCBVI = 1. MCAVI, 1)

P1970980

P1970990

9963 CONTINUE

DO 9964 MCCVI = 1.4

P1971000

P1971010

9964 REWIND INVI

DO 1972 MCDVI = 1.4

P1971020

P1971030

READ (INVI) ( IAC1 I (MCEVI ), MCEVI = 1, MCDVI)

DO 1972 MCFVI = 1, MCDVI

P1971040

P1971050

MCGVI = lACIKMCFVI) - MCAIKMCFVI)

IF (MCGVI) 9966, 1972. 9966

P1971 060

PI 971 070

19 7 2 9196

CONTINUE

WRITE(NUV1, 9969)

P1971080

P1971090

C * t

«

» GO TO 9198

* ERROR MESSAGES IF DO STATEMENT IS EXECUTED IN ERROR.

P1971 100

P1971 1 10

9966

9967

WRITE (NUVI,9967) MCHVI

FORMAT (// 36H DO RANGE ENDING AT STATEMENT LABEL, 15,

P1971 120

P1971 130

9969

1 1 4H I S I N ERROR . ) FORMAT(// 35H THIS SEGMENT SUCCESSFULLY TESTED / P1971140

P1971 1 50

222H IF NO ERROR MESSAGES)

GO TO MVI , (9190,9968,9191 ,9194,9961 .9196)

P1971 160

P1971170

91 9 8

C * * * REWIND INVI

* END OF TEST SEGMENT 197

P1971 180

P1971 190

Ct**«« WHEN EXECUTING ONLY SEGMENT 197, THE STOP AND END CARDS

C**«*» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1971200

P1971210

c * * * c =

* * IN COLUMNS 1 AND 2 REMOVED.

STOP

P1971220

P1971230

c = END

STOP

P1971240

P197C1

C t «

t

* END P197C2*«**********«**tt*t****t**t**t**tttt*t*ttt***tttttt*t«t*t-*tt*tttttt*P4120010

c «

«

c * * *

*

*

*

* HDQ - (412)

P4120020

P4120030

184 NBS FORTRAN Test Programs Version 1
C*«*** P4120040

Qtt*t**ttttt*tt****«*tt**tt«ttt tt** t**t**tt*t***t***«t*t***********»P4i20050

C

* ' t' t GENERAL PURPOSE A S A R E F P 4 1 2 0 0 6 0 Ctt*tt THIS SUBROUTINE IS USED WITH SEGMENT 197 TO P4120070

C«t»T» SHOW THAT SUBROUTINES MAY BE CALLED FROM DO LOOPS P4 1 2 00 8 0 SUBROUTINE MOO ( MWV I

, I WV I ) P4120090

IWVI = MWVI IWVi P4 120 100

RETURN P4120110

t*"*"t*'t END OF TEST SEGMENT 412 P4120120

END P 4120130

Ct*tt********t**««t*t*t*t*t***t***ttt*t**t**«t***«***********«t*****«***irP2000010

C****» P2000020

t* "t 't t't SUB R i - ( 20 0 ) P 2 0 0 0 0 3 0 C*t««* P200004 0 C**t*t**t**t**t*t*********t*********«***t******t**t «r** ***«**tt******P2000050

Ct  GENERAL PURPOSE ASA REF.P2000060

t'ttttt " TO TEST SUBROUTINE SUBPRbGRAM WITHOUT AN ARGUMENT LIST 2 . 4 . 1 . 1 P2 0 0 0 0 7 0 Ct** ** GENERAL COMMENTS P2000080

C't't'ttt IT IS TO BE RUN WITH SEGMENT 410 P2 0 0 0 090

C***** RESTRICTIONS OBSERVED P2000100

C***** SYMBOLIC NAME OF A SUBROUTINE MAY NOT APPEAR IN ANY 8 . 4 . 1 . 1 / 56P2 0 0 0 1 1 0 C**«*« STATEMENT IN THIS SUBROUTINE EXCEPT IN THE P2000120

C**.** SUBROUTINE STATEMENT ITSELF P2000130

C***** « SYMBOLIC NAMES OF DUMMY ARGUMENTS MAY NOT APPEAR 8 . 4 . 1 . 1 / 3 9 P 2 0 0 0 1 4 0 C***V* IN EQUIVALENCE OR COMMON STATEMENTS IN THE SUBPROGRAM P2 0 0 0 1 5 0 C***«« « SUBROUTINES MAY NOT CONTAIN A FUNCTION STATEMENT, 8 . 4 . 1 . 1 / 4 5 P 2 0 0 0 1 6

0

C***** ANOTHER SUBROUTINE STATEMENT, OR ANY STATEMENT THAT P2 0 0 0 1 70

C***** DIRECTLY OR INDIRECTLY REFERENCES THE SUBROUTINE P2000180

C *'***» BEING DEFINED P2 0 0 0 1 9 0 C***** * AT LEAST ONE RETURN STATEMENT MUST BE IN A SUBROUTINE P2000200

C't'iTi't 8 . 4'

."l

." 1/4 9 P 2 0 0 0 2 1 0 C..*.* * S P E C I F I C ,. A T I p, N S SEGMENT 2 0 0 P2 0 0 0 2 2 0 C**«*« P0014030

C***** WHEN EXECUTING ONLY SEGMENT 200, THE SPECIFICATION STATEMENTS P0014035

Ct  WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C: P00U040

C** *** IN COLUMNS 1 AND 2 REMOVED. P0014045

C= COMMON AXVS. CXVS. I XV I, IAX1I(4) POO 1 4 0 5 0 COMMON AXVS. CXVS, IXVI, IAX1I(4) ., , P200A1

C'*'*

*' * * P 0 0 1 4 0 5 5 C***** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE, P2000230

CVi'tT* WHEN eXECUTTnG ONLY SEGMENT 200, THE FOLLOWING STATEMENTS P 0 0 7 3 1 8 0 C***** NUVI=6 AND INVI=9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0073185

C* «**»"" P 0 0 73 1 90

C= NUVI = 6 P0073195

C= INVI = 9 POO 732 0 0 NUVI = 6 P200B1

INVI = 9 P2 0 0 B2

WRITE(NUVI. 0200) P2000240

200 F0RMAT(39H1 SUBR1 - '"(^dO) SUBROUt

I

NE' SUBPROGRAM /ISX, P2 0 0 02 5 0 124HWITH0UT AN ARGUMENT LIST //18H ASA REF. - 8.4.1//9H RESULTS) P2000260

iXS/] - NUVI P2 0 0 0 2 70

lAXII(l) = INVI P2000280

CALL SUBRQ P2000290

CONTINUE P2000300

C«**.* END OF SEGMENT 200 P2 0 0 0 3 1 0 C«**** WHEN EXECUTING ONLY SEGMENT 200, THE STOP AND END CARDS P2000320

C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P2 0 0 0 3 3 0 C***** IN COLUMNS 1 AND 2 REMOVED. P2000340

t- STOP P2 0 0 03 5 0 C= END P2000360

STOP P200C1

END P2 0 0 C2

C***********************«**********************************************tP4i00010

Zttttt P4100020

C***** SUBRQ UiO) P4 1 0 0 0 30

C* » « * * P 4 1 0 0 0 40

C*******'***************************************it**********t*i«*t*it**t***P4l00050

C*** * * THIS SEGMENT TESTS THAT A VARIETY OF FO FIT RAN STATEMENTS P4 1 0 0 060

NBS FORTRAN Test Programs Version 1 185
c « * * * * CAN BE USED IN A SUBROUTINE. IT IS TO BE RUN WITH SEGMENT

SUBROUTINE SUBRO

200 P41 00070

P4100080

8867 FORMAT (//36H DO RANGE ENDING AT STATEMENT LABEL. 15. 14H IS

1 ROR . )

I N ERP41 00090

P41 001 00

DIMENSION KCA1 1(5). KAC1 1(5)

COMMON BXVS, DXVS, NXVI, IXVI

P41 001 1 0 P41 001 20

C*«*** DEFINE ARITHMETIC STATEMENT FUNCTION

CKAFS( CEWVS, CFWVS) = CEWVS*2. + CFWVS

P4100130

P41 001 40

8 868 FORMAT (//35H THIS SEGMENT SUCCESSFULLY TESTED /

1 23H I F NO ERROR MESSAGES . ) P41 001 50

P41 001 60

C * * * * KCAF I (KEWVI , KFWVI ) = KEWVI«*KFWVI

« TEST OF 00 WITH STATEMENT FUNCTIONS

P41 001 70

P4100180

KCHVI = 4101

ASSIGN 4102 TO MVI

P41 001 90

P4 1 0 020 0 KCBVI : 0 DO 4101 KCAVI = 4,8,4

P41 0021

0

P41 00220

4101

CKAVS = CKAFSd.O, F LOAT ( K CAV I ) ) KCBVI = KCBVI + KCAFI (KCAVI , IFIX(CKAVS) - (KCAVI + 2))

P4 1 0023 0 P4 1 002 40

c * * * * IF(KCBVI - 2) 8866, 4102, 8866

t TEST OF DO WITH THE FOLLOWING FEATURES COMBINED - P4 1 0 02 5 0 P4 1 0 0260

c * * * *

c

* t «

* 1. AN EXIT FROM THE RANGE OF A DO BY THE EXECUTION OF A

* GO-TO STATEMENT, THE CONTROL VARIABLE OF THE DO IS P4 1 0 02 70

P4 1 0 02 80

c « « t * c « « * *

* DEFINED

* 2. A GO TO STATEMENT CAUSES CONTROL TO PASS FROM AN

P4 1 00290

P4 1 003 00

c * * * * 4102

* INNER DO TO THE OUTER DO (WITHIN THE NESTED RANGE)

KCHVI = 4106

P4 1 0 03 1 0 P41 00320

ASSIGN 8870 TO MVI

KCBVI = 0 P4 1 0 033 0 P41 00340

8 8 72

DO 4106 KCAVI = 1,1,1

KCBVI : KCBVI + 1 P4 1 0 03 5 0 P41 00360

DO 41 05 KCCVI - 1 , 3 , 1 KCBVI : KCBVI + 1 P41 00370

P 4 1 0 03 8 0

8 8 73

IF (KCBVI - 4) 8873, 8872, 4105

GO TO (4105,4105.8866), KCCVI

P41 00390

P4 1 0 0 40 0 4105

4106

CONTINUE

CONT I NUE

P4 1 0 0 4 1 0 P41 00420

c * * * IF(KCBVI - 8) 8866, 8870, 8866

* TEST THAT THE STATEMENT LABEL OF THE TERMINAL STATEMENT

P4 1 00 43 0 P4 1 00440

c * * * *

c * * * *

* OF MORE THAN ONE DO CAN BE USED IN ANY GO TO OR ARITHMETIC

* IF STATEMENT THAT OCCURS IN THE RANGE OF THE MOST DEEPLY

P4 1 0 0 45 0 P41 00460

c * * * * 8 8 70

* CONTAINED DO WITH THAT TERMINAL STATEMENT

ASSIGN 8876 TO MVI

P 4 1 0 0 4 7 0 P41 00480

KCHVI = 4107

KCEVI = -24

P41 00490

P4 1 00 5 00

DO 4107 KCAVI =1,2

KCEVI = KCEVI + 1 P4 1 0 0 5 1 0 P41 00520

00 4107 KCBVI = 1,2

KCEVI = KCEVI + 1 P4 1 0 0 5 3 0 P41 00540

DO 4107 KCCVI = 1.5,1

KCEVI = KCEVI + 1 P4 1 0 0 5 5 0 P41 00560

^107

IF(KCEVI ) 4107,4107,4104

CONTINUE

P4 1 0 0 5 70

P41 00580

c » *

«

ERROR IF LOOP TERMINATES THRU CONTINUE

GO TO 8866

P41 00590

P4 1 0 060 0

c * * * * 4104

•CONTROL VARIABLE DEFINED ON FIRST LEVEL ON ARITH. IF KCEVI = KCAVI + KCBVI + KCCVIP4 1 0 06 1 0 P4100620

KCHVI = 4104

IF(KCEVI - 8) 8866.8876,8866

P41 00630

P41 00640

S876 KCHVI = 4103

KCEVI = 0 P4 1 006 5 0 P41 00660

ASSIGN 8871 TO MVI

DO 4103 KCAVI =1,2

P41 00670

P4 1 00680

DO 4103 KCBVI = 1.2,1

DO 4103 KCCVI = 4.5.1

P41 00690

P41 00700

DO 4103 KCDVI = 2.3

GO TO 8878

P41 0071

0

P4 1 0 072 0

8 877

88 78

GO TO 4103

KCEVI = KCAVI + KCBVI + KCCVI + KCDVI + KCEVI

P41 00730

P41 00740

186 NBS FORTRAN Test Programs Version 1

i
4103

GO TO 8877

CONTINUE

P 4 1 0 0 7 5 0 P41 00760

IF(KCEVI - 160)8866.8871.8866

Ct««*t TEST OF 00 WITH I/O STATEMENTS

P41 00770

P 4 1 0 0 78 0 8871 ASSIGN 8860 TO MVI

KCHVI = 4108

P 4 1 0 0 7 9 0 P41 00800

REWIND IXVI

DO 8863 KCAVI =1.4

P4 1 0 0 8 1 0 P41 00820

KCA1 I ( KCAVI ) = KCAVI

WRITEdXVI ) (KCA1 I (KCBVI ) .KCBVI = 1. KCAVI. 1)

P 4 1 0 0 83 0 P41 00840

8863 CONTINUE

DO 8864 KCCVI =1.4

P41 00850

P41 00260

8864 REWIND IXVI

DO 4108 KCDVI =1.4

P41 00870

P 4 1 0 0 8 8 0 READ( IXVI ) (KAC1 I (KCEVI ) .KCEVI = 1. KCDVI ) DO 4108 KCFVI = 1 . KCDVI

P41 00890

P41 00900

KCGVI = KAC1 I (KCFVI )-KCA1 I (KCFVI

)

IF(KCGVI) 8866.4108.8866

P4 1 0 09 1 0

P 4 1 0 0 92 0 4108

8860

CONTINUE

WRITE(NXVI ,8868)

P 4 1 0 0 93 0 P41 00940

8866

GO TO 8869

WRITE(NXVI ,8867) KCHVI

P 4 1 0 0 9 5 0 P41 00960

8869

GO TO MVI , (8860.4102.8870,8871 .8876)

REWIND IXVI

P 4 1 0 0 9 70

P 4 1 0 0 98 0 RETURN

C»*«*t END OF TEST SEGMENT 410

P41 00990

P41 01 000

END

* * * P41 01 01 0 *P3 0 0 0 0 1 0

C * t * * * C***** LOGIF - (300)

P3000020

P3000030

C * « « 1

1

t * t P3000040

*P3000050

C***»* GENERAL PURPOSE ASA

C«*«** TEST LOGICAL IF STATEMENT 7.1

REF

•2 . P3000060

3P3000070

C * * *

«

c « * *

* GENERAL COMMENT

* ASSIGNED GO TO. INTRINSIC FUN CT I ON . AR I THMET I C IF. CALL.

P3000080

P3000090

C«*««* COMPUTED GO TO AND I/O STATEMENTS ASSUMED WORKING,

c * * * * * P3 0 0 0 1 0 0

P 3 0 0 0 1 1 0 Ct««»* SPECIFICATIONS SEGMENT 300

c * * * * *

P 3 0 0 0 1 2 0 POO 1 4060

c * * * * C t « * *

* WHEN EXECUTING ONLY SEGMENT 300. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0014065

P00U070

c

* « «

«

c * « * t

* IN COLUMNS 1 AND 2 REMOVED.

*

P 0 0 1 4 0 7 5 POO 1 4 0 8 0 c=

c= LOGICAL MCAVB,MCBVB,MCA1B(7)DOUBLE PRECISION DPAVD, DPBVD , DPCVD , DPDVD , DPEVD . DPFVD

P0 0 1 4 0 8 5 P001 4090

LOGICAL MCAVB,MCBVB,MCA1B(7)

DOUBLE PRECISION DPAVD, D P B VD . DP C VD , D P D VD , D P E VD , D P F VD

P300A1

P300A2

c * » *

«

c * * * *

t

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P00U095

P3 0 0 0 1 3 0

C * t * * c « « * * WHEN EXECUTING ONLY SEGMENT 300, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P 0 0 7 3 2 1 0 P007321

5

C 1 1 « » C= NUVI = 6 P0073220

P0073225

NUVI = 6 WRITE (NUVI, 3000)P300B1

P30001 40

3000 FORMAT (1H1, 1X.34HL0GIF - (300) LOGICAL IF STATEMENT//

120H ASA REF. - 7.1.2.3//10H RESULTS //

P3000 1 50

P3000 1 60

c * * * t 2/37H TEST EXPLICITLY WRITTEN SIGNED 2ER0/2X)

* HEADER FOR SEGMENT 300 WRITTEN

P3000 1 70

P3 0 0 0 1 8 0 MACVI = 0 MCAVB = .TRUE.

P3 00 0 1 90

P3000200

MCBVB = .FALSE.

MCAIB(I) = .TRUE.

P30002 1

0

P3000220

C * t * * MCA1B(2) = .FALSE.

* TEST THAT MINUS ZERO AND PLUS ZERO ARE TREATED 4. P3000230

2/ 1 1 P3 0 0 0 2 4 0 C»««t* AS EQUAL VALUES

IVI = -8

P3000250

P3000260

NBS FORTRAN Test Programs Version 1 187
I I V I - - 8 JVI = +0

P3000270

P3000280

J J V I = - 0 KVI = 8 P3000290

P3000300

KKVI = 8 AVS = -0.5

P300031 0 P3000320

AAVS = -0.5

BVS = +0.0

P3000330

P3000340

BBVS - -0.0

CVS = 0.5

P3000350

P3000360

C CVS - 0.5

DPAVD = -0.5D0

P3000370

P3000380

DPBVD - -0 . 5D0

OPCVD = +0.0D0

P3000390

P3000400

r\nr\v/r\ — a aha DPDVD = -0 . ODO

DPEVD = 0.5D0

P30004 1

0

P3000420

c « * t * DPFVD = 0.5D0

* TEST FOR EXPLICITLY WRITTEN -0 EQUAL TO + 0 P3000430

P3000440

IF((JVI) .EQ. (JJVI))MACVI = MACVI + 1 IF((JJVI) .EQ. (JVI>) MACVI = MACVI + 1 P3000450

P3000460

in//. AN / A\\ UAP\iT _ kt A ^ i 1 T 4 IF((+0) .EQ. (-0)) MACVI = MACVI + 1 IF((-0) .EQ. (+0)) MACVI = MACVI + 1 P3000470

P3000480

9951

IF (MACVI - 4) 9951, 9954, 9951

WRITE (NUVI, 9953)

P3000490

P3000500

9952

GO TO 9955

FORMAT(UH +0 EQUALS -0)

P30005 1

0

P3000520

99 5 3 99 5 4 F0RnAT(17H +0 NOT EQUAL -0)

WRITE (NUVI, 9952)

n^AAAP^A P3000530

P3000540

99 5 5 c * * MACVI = 0

* TEST EXPLICITLY WRITTEN +0.0 EQUALS -0.0

n^AAA^ PA P30005 50

P3000560

IF ((BVS) .EQ. (BBVS)) MACVI = MACVI + 1 IF ((BBVS) .EQ. (BVS)) MACVI = MACVI + 1

n^AAAP ^A P3000570

P3000580

If* //.A A\ l"rt / A A\\ AiA^lfT _ UA^tJT 4 IF ((+0.0) .EQ. (-0.0)) MACVI = MACVI + 1 IF ((-0.0) .EQ. ( 0.0)) MACVI = MACVI + 1

n^AAAPAA P3000590

P3000600

9944

IF (MACVI - 4) 9944, 9947, 9944

WRITE (NUVI, 9946)

n^AAAZ 4 A P300061

0

P3000620

9945

GO TO 9948

FORMAT (18H +0.0 EQUALS -0.0)

f\7AAAZ ?A P3000630

P3000640

9946

9947

FORMAT (21H +0.0 NOT EQUAL -0.0)

WRITE (NUVI, 9945)

n'VAAA / PA P3000650

P3000660

c * * * * 99 4 8

* TEST EXPLICITLY WRITTEN +0.0D0 EQUALS -0

MACVI = 0 .poo

rt^AAA / ^A P3000670

P3000680

IF ((DPCVD) .EQ. (DPDVD)) MACVI = MACVI +1

IF ((DPDVD). EQ. (OPCVD)) MACVI = MACVI + 1

n?AAAi ftA P3000690

P3000700

C * * * * IF ((+0.0D0) .EQ. (-0.0D0)) MACVI = MACVI + 1

ft^AAA'Ji A P30007 1 0 P3000720

IF ((-O.ODO) .EQ. (0.000)) MACVI = MACVI + IF (MACVI - 4) 9949, 9957, 99491 n?AAA'7?A P3000730

P3000740

99 49 WRITE (NUVI, 9960 ) GO TO 9958

n'7AAA">CA P3000750

P3000760

9959

996 0

r/NntaaT .a Ar\A ^aiiai^ a AnA\ FORMAT (22H +0.0D0 EQUALS -O.ODO)

FORMAT (25H +0.0D0 NOT EQUAL -O.ODO)

ft"»AAAT'>A P3000770

P3000780

9957

9958

WRITE (NUVI, 9959

)

MACVI = 0 P3000790

P3000800

795 0 WRITE (NUVI, 7950)

FORMAT (33H0 TEST COMPUTATIONAL SIGN OF ZER0/2X)

n7AAA0 t A P30008 1 0 P3000820

C * t *

«

* TEST FOR COMPUTATIONALLY CREATED +0 AND

IF((IVI * JVI) .EQ. (JVI))MACVI = MACVI + -01

n7AAA07A P3000830

P3000840

IF((JVI) .EQ. (JVI * I1VI))MACVI = MACVI + IF((JVI / IVI) .EQ. (+0) )MACVI = MACVI +

1

1

n^AAAACA P3000850

P3000860

IF((IVI + KVI) .EQ. (JVI))MACVI = MACVI + IF((KKVI + IIVI) .EQ. (JVI))MACVI = MACVI1+ 1

n^AAA a ^A P3000870

P3000880

IF((IIVI - IVI) .EQ. (JVI))MACVI = MACVI + IF((KVI - KKVI) .EQ. (JVI))MACVI = MACVI +1

1

n7AAA OftA P3000890

P3000900

9956

IF (MACVI - 7) 9956, 9940, 9956

WRITE (NUVI, 9953 )

n7AAAA4 A P300091 0 P3000920

9940

GO TO 7955

WRITE (NUVI, 9952)

n^AAArt^A P3000930

P3000940

188 NBS FORTRAN Test Programs Version 1
Cttt*t TEST FOR COMPUTATIONALLY CREATED +0.0 AND -0.0 P3000950

795 5 MACVI = 0 P3 00 0 960

IF ((AVS « BVS) .EO. (BVS)) MACVI = MACVI 1 P3000970

I F (.( BVS ) , E q . ( BVS * AAVS ) ) MACVI = MAC V I * 1 P3 0 00980

Tc f f D\/ c 1 Av/c\ cn f f\ f\ \ \ MAr\/l - MAr\/T J. 1 rjUUUvVU

tc t ( K\ic rwc\ cn ^D\/c^^ matvi - matv/i * 1 IP v\AVo LVo/ .tU. \ OW o I ) nALvl - nMLVl 1 r J u U 1 U U U TC t / r CMC A AA\/c^ cn ^D^/c^^ mapx/i - MAr\/i * 1 r J U U 1 U 1 u IC /^AA\/C - A\/C^ cn fD\/C^^ MAPV/I - MAPVI 4. 1 IP vxnnVo nv 0 ) .tU. K ow o ) / nnUVi - nALVl 1 r J U U 1 u d U TC / t r\ic - pp^/c^ cn /D\/c^^ mapx/i - map\/t « 1 IP X^LVo LLVO^ .CU. KoM^l) nnLVl - nALVl 1 r J U U 1 U J U iP vPIALVl // /7J|, 1 7 J L , /7J| n 7 n n 1 n A (1 r J U U 1 U

U

7 O C 1 UDTTC MKIIC ^MIIV/T (.NUVl, OQAA^ 77H0y r J U U 1 U J U PO Tn 70^7 r J U U 1 U 0 U 7 Q ? 7 IJDTTC MKlIt ^MIIWT tIMUV.l, OOAC\ 77'*j/ r 0 U U 1 U / U ^ It It t t t TCCT Itol PUK cnD pLUnrUIAIlUNALLl n M D iiT A T T n M A 1 1 V PRCATcn LnCAICU 4.rt U.UUU rtnrt A w n -rt nnrt AIMU U.UUU r J U U 1 U o U 7 0 5 7 / 7 3 3 n A L V 1 - u r J U U 1 U 7 U TC /^nDA\/n * nDP\/n^ cn ^norx/nxx mapv/i - mapvi 4. 1 IP V^UrAVU " UrLVU/ .CU. \ Ur U ) > nALVl - nALVl 1 r J U U 1 i U U TC 1 f no r \i T\\ cn ^nDP\/n * nDO\/nxx map\/i - mapv/t * 1 iP VVUrLVU/ .tu. VL/rLVU " Ur oW i 1 nALVl - nALVl 1 r J U U 1 1 1 u TCIP (VVurLVU ( no r \m 1 noAvn^ cn ( (\ nnnx'* mapv/t - maput + 1

/ UrAVU/ .CU. VU.UuU// nALVl - nALVl * 1 r J u V 1 1 6 U IP VVUrAVU * UrCVU/ .CU. VUrLVU// nALVl - nALVl * 1 r J u u 1 I J y IP V\UrPVU ^ UrDVU/ .CU. VL/rLVU/^ llALVl — nALVl ^ 1 D 7 0 f) 1 1 in

ICIP ffnpRvn VVUrDVU - nPAVDi UiAVU/ .Cu. cn fnprvriM VL/iLVU// mapvi MALVi -— mapvt nALVl +^ i1 p 7 fi n 1 1 s n iP \\L/rCVU UrPVU/ .CU. VUrLVU// nALVl — nALVl ^ 1 pP

7J nU nv 11 11 AD nu IPTP CMArVI VnALVl - 7)// 7QS^ /7JH| QQ'^Q 7Q'i^ /7jn p 7 n n 1 1 7 n

/ 7 J H URnr\iic T TF (vivuvi, NIIV I 99^0 ttow/) pr J 0V nu 11 11 o 0V GO TO 9941 rp 7J 0V nU 11 11 Q7 nU 9939 WRITE (NUVI, 9959) p~ 7J 0\J f)\J 11 ?L. nV 0 9941 MCAVI = 0 P 7 0 0 1 ? 1 0 WRITE (NUVI, 9942) p 7 n fi 1 ? 7 n 9942 F0RMAT(31H0 TEST -LOGICAL IF- FOLLOWED BY/ p 7 n n 1 7 7 n 131H DIFFERENT KINDS OF STATEMENTS ) r J y U 1 c. H y

1 C o 1 1 p 7 n n 1 7 10

C 4 w t ft t inRTPAl LUvJlLAL ICIP CniinUCn PULLUWCU RVDT QIMDIC DlnrLC AOOlulinCnil AQCIflUMCMT QTATCMCMT OlAICnCni P7nni r J U U 1 c7An0 U

C ft ft ft ft ft PnPDCPT DCCMIT - (\ nTUICQLITQC DCCIIIT - 1 p 7 n n 1 7 7 0 TCIP ^MPA1flf?^^ vnLAIOVt// MPAVT nLAVl -- 1

1 P7nni r J V U 1 L7xn0 u UDTTC nnllt ^IUtl\/t VIMUVl,jUu7/ 7nA0^ MPA\/I nLAVl P7nni r J U U 1 t7on7 U

p * * * * * ^ w w w w w TCCT 7 1 C 0 1 C P7nni7nn P J U U 1 J u u

C ft ft ft ft ft inr, LUUILAL iTAi TFir FniinuFn rULLUnCU ryDl ikf UOC ofUr llilRllv iNTRiN<5Tr OIL FiiNrTiriM rUIVLIiUlv p 7 n fi 1 7 1 n

C ft ft ft ft ft CORRECT RESULT =0, OTHERWISE RESULT =2 P7nni77n p J u u 1 J d y MCAVI = 2 P7nni77n r 0 U U 1 J J U IF (MCAVB) MCAVI = IFIX(5.0 - 4.0 - 1.0) P7nni r J U U i 7in J H y WRITE (NUVI, 3009) MCAVI P7^n17'^n r J u u 1 J J y MCAVI = 0 pr 7 n n 1 7 A n J y y I J 0 y

C ft ft ft ft ft TEST 3

pr 7 n n 1 7 7 n J y y 1 J / y

C ft ft ft ft ft LOGICAL IF FOLLOWED BY ARITHMETIC STATEMENT P7nni7xn r J y y ! J 0 y C ft ft ft ft ft CORRECT RESULT =0, OTHERWISE RESULT =3 pr 7 n n 1 7 0 n J y y 1 J 7 y IF (MCAVB .AND. MCBVB) MCAVI = 3* 2 / 2 rp 7J ny ny 11 inn *+ y V WRITE (NUVI, 3009) MCAVI p 7 n n 1 i 1 n r J y y 1 H 1 y

C ft ft ft ft ft TEST 4

D 7 n n 1 i 7 n r J y y 1 c u

C ft ft ft ft ft LOGICAL IF FOLLOWED BY GO TO STATEMENT D7nni r J U U 1 i7n H J u

C ft ft ft ft ft CORRECT RESULT =0, OTHERWISE RESULT =4 pr 7 n n 1 i i n J y y i n y MCAVI = 0 P7nAii^n p 0 y u 1 H J u IF (MCAVB .AND. MCBVB .OR. MCA1B(1)) GO TO 3001 P7nni Lkf\ p 3 y y 1 H 0 u MCAVI = 4 P7nni i7n

3001 WRITE (NUVI, 3009) MCAVI P7nnii8n r 3 y U 1 H 0 y

C ft ft ft ft ft TEST 5 p 7 n n 1 / Q n p 3 U U 1 H 7 u C ft ft ft ft ft LOGICAL IF FOLLOWED BY CALL STATEMENT p 7 n n 1 ^ n n r 3 y y 1 J u u C ft ft ft ft ft CORRECT RESULT =0, OTHERWISE RESULT =5 p 7 n n 1 1 n r 3 U U 1 J 1 y MCAVI =0 P7nni r 3 y y 1 ^7n J d y IF (MCBVB .OR. (1 .GE. 2) . AND .. FALSE . ) CALL SMCQ(MCAVI) P7nni P 3 U U 1 ^7n J 3 u WRITE (NUVI, 3009) MCAVI P7oni r ^ 3 y y 1 J *t y C ft ft ft ft ft TEST 6 P7nni r 3 y U 1 ^^n J J u C ft ft ft ft ft LOGICAL IF FOLLOWED BY NESTED USE OF INTRINSIC FUNCTIONS p 7 n n 1 '^ A n r 3 u y 1 J 0 u

C ft ft ft ft ft CORRECT RESULT =0, OTHERWISE RESULT =6 p— 7J nV ny 11 sJ 7/ ny MCAVI = 6 P3 0 0 1 5 8 0 IF (.TRUE. .OR. ((1. .LE. (0.1 + 1.5)) .AND. (MCAIB(I) .OR. ,.TRUE P3001590

1 .)) .AND. MCBVB) MCAVI = I F I X ( RE AL ( ( 0 . 0 , 1 . 0 ) )

)

P3 0 0 1 60 0 WRITE (NUVI. 3009) MCAVI P3 00 1 6 1 0 C ft ft ft ft ft TEST 7 P3001620

NBS FORTRAN Test Programs Version 1 189
Ct***. LOGICAL IF FOLLOWED BY ASSIGNED GO TO STATEMENT P3001630

C***** CORRECT RESULT =0, OTHERWISE RESULT =7 P3001640

ASSIGN 3 002 TO MCBVI P300'l'6'50 MCAVI = 7 P3001660

I F (.NOT. ( M C A V B .AND. M C B V B .AND. .FALSE. .OR. ( . N Of' ;' j rue ;yy ) p 3 oof6 7

0

1G0 TO MCBVI , (3001 .3002,3003) P3001680

GOT03003 P3 0 0T6"90

3002 MCAVI = 0 P3001700

30()3 WRITE (NUVI, 3009 ) MCAVI P30bT7T6

C****t TEST 8 P3001720

C*«**» LOGICAL IF FOLLOWED BY ARITHMETIC IF STATEMENT P300 1 730

C***** CORRECT RESULT =0, OTHERWISE RESULT =8 P3001740

MCAVI = 0 P300 i750

IF (.NOT. ( .NOT. ( .TRUE. .OR. MCAVB .AND. (8. .NE. 7.)))) P3001760

ilF (MCAVI) 3 0 04,3 00 5,3 00 4 P300r770

3004 MCAVI = 8 P30 0 1 780

3 0 0 5 WRITE (NUVI,3009 ) MCAVI P30 0i79()

C**«** TEST 9 P3001800

C**t** LOGICAL IF FOLLOWED BY I/O STATEMENT P300 1 8 1 0 C***** CORRECT RESULT =0, OTHERWISE RESULT =9 P3001820

MCAVI = 0 P30 0 1 83 0 IF ((8.0D0 .EQ. (1. + 7.)) .AND. (.NOT. (3 .NE. 3))) P3001840

1WRITE (NUVI,3009) MCAVI P3001850

C***** TEST 10 P3001860

C***«*" LOGICAL IF FOLLOWED BY COMPUTED GO to' STATEMENT P300 1 8 70

Ct**** CORRECT RESULT =0, OTHERWISE RESULT =10 P3001880

MCAVI = 2 P3 00 1 890

IF ( .TRUE. .AND. (8 .GE. 6) .OR. (.FALSE.)) GO TO ( 9950 . 3006 ),, P300 1 900

" 1 MCAVI P3 00 1 910' 9950 MCAVI 10 P3 00 1 920

GO TO 30 0 7 P3 00 1 930

3006 MCAVI = 0 P3001940

3 0 0 7 WRITE (NUVI,3009 ) MCAVI P3 00 1 9 5 0 WRITE (NUVI,3008) P3001960

C***«* TEST EXPRESSIONS IN LOGICAL IF STATEMENTS P3 0 0 1 970

C***** TEST 11 .LT. EXPRESSION. RELATION, EXPRESSION (TRUE) P3001980

MCAVI = n P3 0 0 1 990

IF((SNGL(DABS(-DSIGN(DBLE(2.0),1.0D0)))).LT.AMIN1((FL0AT(IDIM P3002000

1 (1 + 2, 0))), (AIMAG(CMPLX(1.0,2.0)))) + 1.0) MCAVI = 0 P3 0 020T()

WRITE (NUVI, 3009) MCAVI P3002020

C «  TEST 12 L T . EXPRESSION', RELATION, CONSTANT ( fruE ) P 3 0 0 20 3 0 MACVI = 12 P3002040

I F ( ( AM I N 1 (FLOAT ( I D IM ( 4 - 1,0)) . AIM AG ( CMPLX ( ^ _ ; q ) j jTTf! 4To') P3 0 020 5 () 1MACVI = 0 P3002060

WRITE (NUVI, 3009) MACVI P3002076

C** *** TEST 13 .LT. CO N S T ANT ( D . P . ) , R E L AT I 0 N , EXPRESSION ( RE AL ) ( TRUE ) P 3 0 0 2 0 8 0 MACVI = 13 P3 002 090

C*****IF (l.(DO).LT. (SNGL(DABS(DSIGN(DBLE(4.0) , 1 .ODO) ) ) ) ) MACVI = 0 P3 002 1 00

C*****WRITE (NUVI, 3 0 09 ) MACVI P3 0 02 1 1 0 C***** TEST 14 .LE. .AND. .LE. (SHOULD BE LESS AND EQUAL) (TRUE) P3002120

MACVI = 14 P30 02 1 30

IF((REAL(C0NJG((1 .0,-2.0))) + A I MAG ( ( 1 6 . 0

, - 4 . 0 ) ) .LE. P3 0 02 1 40

1 AIMAG(C0NJG((1 .0,-2.0))) + REAL ( ( - 4 . 0 , 1 6 . 0 ) ) + 1.0) .AND. ' P3 0 02 1 5 0 2 ( AI MAG( CON JG( (2 . 0

, -4 . 0 ) ) ) + R E A L (( - 8 . 0 , 1 6 . 0 ) ) . L E . P3 0 02 1 60

REAL ( CON JG( ( 4 . 0

, -2 . 0 ) ) ) + A I M AG ( ( 1 6 . 0, - 8 . 0 ) ) ) ) MA CV I =

' 0 P3 0 02 1 70

WRITE (NUVI, 3009) MACVI P3002180

Z***'*t " TEST 15 .LE. (FALSE) P3 0 02 1 90

MACVI = 0 P3002200

IF (MAX1((AMA)<0(4,2,-(1 y jyyy-^f^-Q) _ L 2 t* jy^^^y^' .

' ]5 P3 0022 1 0 WRITE (NUVI, 3009) MACVI P3002220

C***** TEST 16 .NE. .AND. '.ET. (TRUE) P3 0 0223 0 MACVI = 16 P3002240

I F ( ( ( A I NT ( A I NT (A I NT (1 .4 + 2 . 9 ) + Y76 ) -'8. yyy-^'^ _ ( rg^oyy.AN d7( - 022 5 0 1AINT(AINT(AINT(2.6 + 4.8) + 1 . 4

) - 9 . 2 ) ) ) MA C V I = 0 P3 0 02260

WRITE (NUVI, 3 0 09 ) MACVI P3 0 022 70

C***** TEST 17 .GT. (TRUE) P3002280

MACVI = 17 P3002290

IF((FL0AT(IABS(IFIX(ABS(-5.0+ S I GN ( - 1 . 0 , 2 . 0 ) ) ) ) ) ) .GT. 2. ODO) P3 0 02300

190 NBS FORTRAN Test Programs Version 1
1MACVI = 0 WRITE ( NUy i

, 3009.) MACVI

C«***t TEST 18

MACVI = 18

IF((8.6).GE.

WRITE (NUVI,

GE EQUAL (TRUE)

(FLOAT( IABS( IFIX(ABS(

3009) MACVI

4.0*SIGN(4.0.-2.0)))))))MACVI

P300231

0

P3002320

P3 0 0 23 30

P3002340

:b P3002350

P3002360

* * * t TEST 19 GE GREATER (TRUE)

MACVI = 19

I F( ( MACVI ) .GE . ( I ABS( I F IX(ABS( - 4 WRITE (NUVI, 3009) MACVI

t**"**'* TEST 2 0 .GT. (FALSE) .OR

MACVI = 20

rF((-MACVr) .GT. (MAX1 (AMAX0(8,

1 (-20) .NE. MACVI))MACV1 = 0

0 + SIGN(8.0.-4.0))))))MACVI = 0

EO. (TRUE)

(2*4) ,4) , 16.0) ) .OR. .NOT. ( lABS

/

P3002370

P3002380

P3002390

P3002400

P 3 0 0 2 4 1 0 P3002420

P3002430

P3002440

P3002450

P3002460

P3002470

P3002480

P3002490

P3002500

P 3 0 0 2 5 1 0 P3002520

P3002530

P3002540

P3002550

P3002560

P3002570

P3002580

P300C1

P3 0 0 C2

C*****t*************«***************************************t***t t** P4110010

C***** P41 10020

C * » *"** S M C Q - ( 4 1 1 ) P 4 1 1 0 0 3 0

C.*.*.«.*.* P4 1 1 00 40

C**t***********<t**t**t*t****«*****************i[t***t***««***t*ir******tttP4110050

P4 1 1 0060

WRITE (NUVI. 3009) MACVI

WRITE (NUVI. 9943)

9943 FORMAT(28H0 ALL VALUES SHOULD BE ZERO./

137H A VALUE OTHER THAN ZERO WILL BE THE

234H NUMBER OF THE TEST WHICH FAILED. ) 3008 F0RMAT(34H0 THERE SHOULD BE 10 VALUES ABOVE.

131H IF ONLY 9, TEST 9 HAS FAILED.)

3009 FORMATdZX, 110)

C**««* END OF TEST SEGMENT 300

C***«* WHEN EXECUTING ONLY SEGMENT 300, THE STOP

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

Ct*t*« IN COLUMNS 1 AND 2 REMOVED.

AND

C = END CARDS

C =

C = STOP

END

^fOP

END

C***«* GENERAL PURPOSE

C***** TO DEFINE SUBROUTINE SMCQ WHICH IS USED

SUBROUTINE SMCQ(MWVI)

MWVI = MWVI "+ '5 RETURN

N SEGMENT 300 P41 1 0070

P4 1 1 0 08 0 P4 1 1 0090

P41 1 01 00

P41 10110

P41 10120

Q************tt*******«tt**********«*t*t****t***«**t*t*«***«t**tt***t***P3010010

C***«* P301 0020

c * * « t * END OF TEST SEGMENT 411

END

BARIF - (301) P3 0 1 0 0 3 0 P3 0 1 00 4 0

C t « t «

t

c * « « «

C*»«tt GENERAL PURPOSE

C* * * * * TEST BAS I C FORTRAN AR I THMETTC I F sfATEMENT

C*«t** GENERAL COMMENTS

C * V* V * B AS I C I N T R I N S I C F U N C 1 1 0 N S ASSUMED WORK I N G

C * * «

ASA REF P3010060

7.1 .2.2P3 0 1 0 0 70

P3 0 1 00 8 0 P3010090

P30 1 0 1 00

C««t*« SPECIFICATIONS SEGMENT 301 P3010110

C«**** P001 41 00

C « * * * * WHE N E)(E CUT I NG ON L Y SEGMENT 3 01, THE SPE C I F I CAT I (DM STATEME NT S P 0 0 1 4 1 0 5 C****« WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0014110

C**t** IN COLUMNS 1 AND REMOVED

C =

C = DIMENSION

DIMENSION

DIMENSION

DIMENSION

C * * «t * * c « « * « * 0

c * * * * *

LIKIO)

MCA1 K5),CMA1S(5)

LIKIO)

MCA1 K 5 ) . CMA1S(5

)

UTPUT TAPE ASSIGNMENT STATEMENT, NO INPUT TAPE

C**«*« WHEN EXECUTING ONLY SEGMENT 301. THE FOLLOWING STATEMENT

C * * V* * NUV I = 6 MUST HAVE THE C= I N COLUMNS 1 AND 2 REMOVED

,

t* * * * * C= NUVI = 6

P00141 1 5 P0014120

P 0 0 1 4 1 2 5 P301 A1 P301A2

P001 41 30

P 3 0 1 0 1 2 0 P0073230

P0073235

P0073240

P0073245

P0073250

NBS FORTRAN Test Prograins Version 1 191
NUVI = 6

C « « «

«

3010

P301B1

P0073255

P36ldl30

24HP3010140

WRITE (NUVI, 3010)

FORMAT ( 1H1 , 1X,27HBARIF - (301) BASIC F0RTRAN/15X,

1 ARITHMETIC IF ST ATE ME N t / 2)( , 1 8 HASA REF. - 7 /l . 2 . 2 / 2X . 7HRESULf^^^^^

* HEADER FOR SEGMENT 301 WRITTEN

5

C * * « t * ^ j;^ ^ J ^ ^ ^ _ MCAVI = 0 MCBVI = 21 JACVI = -0

CMA1S(1) = 10.5

CMAVS = -0,0

CMBVS - . -, 5 C«»*t* TEST FOR SIGN OF ZERO

P3010150

P3010160

P3bl0170

P3010180

P30i0190

P3010200

P3b 10210

P3010220

P3010230

TYPE INTEGER 4.2/11 P3010240

8335

DO 8335 IVI = 1,9

LI I( IVI ) = 0 P3 0 1 0250

P3010260

MVI = 1 KVI = 0 P3010270

P30 1 0280

JVI = -0

Bvs = -o;o

P30 1 0290

P3010300

NVI = 1 WRITE (NUVI, 8300)

P3010310

P3010320

8320

IF (- 0 ) 83 1 1 . 83 1 4 , 83 1 7 IF (0) 8312, 8315, 8318

P3010330

P3010340

832 1 8322

IF (+0) 8313, 8316. 8319

NVI = 10

P30 1 03 50

P301 0360

8323

IF (JVI + (-0)) 8311, 8314, 8317

IF (-IABS(JVI)) 8312, 8315, 8318

P3010370

P3010380

8324

83 2 5 IF (-JVI + (+0)) 8313, 8316, 8319

WRITE (NUVI, 8303)(L1 I ( IVI ) , IVI = 1,9)

P3010390

P3010400

C « * * * * TEST FOR SIGN OF ZERO - TYPE REAL

MVI = 2 P3010410

P3010420

KVI = 0 NVI = 1 P3010430

P301 0440

8336

DO 8336 IVI = 1,9

LI I ( IVI ) = 0 P30 1 0450P3010460

WRITE (NUVI, 8304)

IF (-0.0 ) 83 1 1 , 83 1 4 , 83 1 7 P301 0470P3010480

8326

8327

IF (0.0) 8312, 8315, 8318

IF (+0.0) 8313, 8316, 8319

P301 0490

P3010500

832 8 NVI = 10

IF (BVS +(-0.0)) 8311, 8314, 8317

P3010510

P3010520

8329

8330

IF (-ABS(BVS)) 8312, 8315, 8318

IF (-BVS + (+0.0 ) ) 83 1 3, 83 1 6 , 831 9 P3 0 1 0530P3010540

833 1 WRITE (NUVI, 83 03 ) (LIKIVI), IVI = 1,9)

WRITE (NUVI, 8337)

P3010550

P3010560

C * * «

GO TO 8305

* SWITCH FOR INTEGER AND REAL TESTS

P301 0570

P3010580

8332 KVI = KVI + 1 GO TO (8333, 8334) , MVI

P301 0590

P3010600

c « « «

«

8333

t RETURNS FOR TEST SIGN OF INTEGER ZERO

GO TO (8320, 8321, 8322, 8323, 8324, 8325), KVI

P3010610

P3010620

C * * * * 8334

RETURNS FOR TEST SIGN OF REAL ZERO

GO TO (8326, 8327, 8328, 8329, 8330, 8331), KVI

P3010630

P3010640

c * * * 8311

* TALLY RESULTS OF CONTROL TRANSFERS

LI I ( 1 ) = LI I ( 1 ) + NVI

P301 0650

P3010660

8312

GO TO 8332

LI I (2) = LI I (2) + NVI

P3010670

P3010680

8313

GO TO 8332

LI I (3) = LI I (3) + NVI

P3010690

P3010700

8314

GO TO 8332

LI I (4) = LI I (4) + NVI

P3010710

P3010720

8315

GO TO 8332

LI I (5) = LI I (5) NVI

P3010730

P3010740

8316

GO TO 8332

LI I (6) = LI I (6) NVI

P3010750

P3010760

8317

GO TO 8332

LI I ( 7) = LI I ( 7) NVI

P3010770

P3010780

192 NBS FORTRAN Test Programs Version 1

I
GO TO 8332 P3010790

8318 L1I(8) = L1I(8) NVI P3010800

GO TO 8332 P3010810

8319 LI 1(9) = LI 1(9) NVI P3010820

GO TO 8332 P301

8300 FORMAT^ 38H TEST FOR SIGN OF ZERO - TYPE INTEGER// 29H PATH « FP301

10RM OF EXPRESSION «/ 29H OF IF * -6 * 0 « +0 * > P301

8303 FORMAT( 1H .7<4H«»*0/ 1H .4(6X,1HO/ 8H NEC. v3(I4,3H 0/1H ,4P301

1(6X,1HO/8H ZERO «.3(i4.3H «)/1H , 4 ( 6X . 1 H « ) / 8H POS. ,3(I4, P3 01 23H *)/1H , 4(6X, 1H*>/1H ) P301

83 0 4 FORMAt( //35H TEST FiDR SIGN OF ZERO _- YYPE REAL / / 29H PATH * FOP3 01 1RM OF EXPRESSION «/ 29H OF IF « -0.0 * 0.0 * +0.0 « ) P301

8337 F0RMAT(/34H ALL ENTRIES SHOULD BE 0 EXCEPT /36H THE ZERO PATH, P301

1 WHICH SHOULD BE 11 /33H IN EACH COLUMN. OTHER TESTS MAY / 31HP301

9986.9986

9987

2 FAIL IF THESE RESULTS D I F F ER . / / / 3 7H TEST EXPRESSIONS IN IF 3ATEMENTS /1H ) C**t»« ARITHMETIC IF WITH EXPRESSIONS OF TYPE INTEGER

C***t« TEST 1 - SHOULD TAKE ZERO BRANCH

8305 IF (MCAIKI) - 5 ) 998 1 . 30 1 1.998 1 C«*.«* TEST 2 - SHOULD TAKE ZERO BRANCH

30n IF (MCAII(I) + 5 - IFIX( CMAISd ) ) ) 9982,30 1 2 . 9982

C*»*t* TEST 3 - SHOULD TAKE MINUS BRANCH

3012 IF ((MCBVI * 2 / 7) - I ABS ( I F I X ( 1 0 . 5 - 1 0.4 )) - 7 ) 3 0 1 3 . 9983 . 998

C«**«t TEST 4 - SHOULD TAKE PLUS BRANCH

3013 IF ((MCAild) - 4) *» 99 /(MCBVI - 4 t ' m c A 1 I ( 1 ) ) ) 99 8 4 , 99 8 4 , 3 0 1 4 C«**«« ARITHMETIC IF WITH EXPRESSION OF TYPE REAL

Ct***« TEST 5 - SHOULD TAKE ZERO BRANCH

3014 IF (CMAISd) - 1 0.5 ) 998 5,3 0 1 5,998 5 C«***« TEST 6 - SHOULD TAKE MINUS BRANCH

3015 IF (CMAISd) * 2.0 - ( F LOAT ( M CBV I) **1) - 1.0) 3016

CT«T«* TEST 7 - SHOULD' TAKE PLUS BRANCH

3016 IF (CMBVS • (-2.0) « (MCBVI - 4 • MCAlId)) - 29.0 ) 9987

C****« TEST 8 - SHOULD TAKE ZERO BRANCH

3017 IF (MCAVI) 9988,3018,9980

3018 WRITE (NUVI,3019)

GO TO 9980

3b'l'9 FORMAT ( 1 SH TESTS' SUCCES'SFUL

)

9981 MCAVI = 1 IF ( IABS(MCA1 I ( 1 ) - 5 )) 8 3 0 1 , 8 3 0 2 . 83 () 1 8301 WRITE (NUVI,9989) MCAVI

GO TO 3011

8302 WRITE (NUVI,8306) MCAVI

8306 FORMAT ( / / 2X , 1 4HERR0R IN TEST ,12, 2 3H ' BE CAUSE MINUS ZERO WAS/

1 30H TREATED AS A NEGATIVE NUMBER)

GO to 3011

9982 MCAVI = 2 IF ( I ABS ( MCAII (1 ) + 5 - j p j ^ ( ^i^^fS ( 1 T)')') 83()7 .8308,830 7 8307 WRITE (NUVI,9989) MCAVI

GO TO 3012

8308 WRITE ( NU V I . 8 3 06 ) . M CAV

I

9983

GO TO 3012

MCAVI = 3 WRITE (NUVI.9989)

GO TO 3013

MCAVI

9984

9989) MCAVI

9985

8309

8310

9986

MCAVI = 4 WRITE (NUVI

GO 10 3014

MCAVI = 5 IF (ABS( CMAISd ) _ ^0.5))

WRITE (NUVI.9989) MCAVI

3015

(NUVI. 8306) MCAVI

3015

= 6 (NUVI.9989) MCAVI

8309.8310.8309

9987

GO TO

WRITE

GO TO

MCAVI

WRITE

GO TO 3016

MCAVI = 7 WRITE (NUVI 9989) MCAVI

STP301

P301

P301

P301

P301

P301

P301

P301

3 P301

P301

P301

P30 1 P301

P301

P301

P301

P301

301 7P301

P301

P301

P301

P301

P301

P301

P301

P301

P301

P301

P301

P301

P301

P30 1 P301

P301

P301

P301

P 3 0 1 P301

P301

P301

P301

P301

P301

P301

P3 01 P30 1 P301

P301

P301

P301

P3 01 P301

P301

P301

0 8 30

0 8 40

0 8 5 0

0 8 6 0

0 8 70

0 8 8 0

0 8 90

090 0 0910

092 0 093 0

0 940

0 9 5 0 0960

0 9 70

0 98 0 099 0 1000

1010

1020

1030

1040

1050

1060

1070

1080

1090

1 100

1110

1120

1 130

1140

1 1 5 0 1160

1170

1180

1 190

1200

1210

1220

1230

1240

125 0 1260

1270

1280

1290

1300

1310

1320

133 0 1340

1350

1360

1370

1380

1390

1400

1410

1 420

1 430

1440

1 4 5

0'

1 460

NBS FORTRAN Test Programs Version 1 193
GO TO 3017 P301U70

9988 MCAVI = 8 P301U80

W R I T E ( N U V I , 9 9 8 9 > M C A V I P 3 01 1 4 96

9989 FORMAT ( 6H TEST. 12, 7H FAILED) P3011500

9 9 80 CONTINUE P30H 510' C*«t*t END OF TEST SEGMENT 301 P3011520

C**«** WHEN EXECUTING ONLY SEGMENT 301, THE STOP AND END CARDS P30H530

C«  WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P3011540

C** *** IN COLUMNS 1 AND 1 REMOVED. P3 0115 50

C= STOP P3011560

C= END P3 Oil's 70' STOP P301C1

END P301C2

C*t***»*«««*«*«*«t******«*******«**«««*tt*t«**««t*«*«*«****«*****««tt«*«P3020010

C* * ** * P3 02 0 020

C'**** FARIF - (302) P3020030

C***** P3 02 0 040

C**»**«*t«**t«*t*»**» t«** »*«**»«*«t«t«*«**«*«»«**t««*«**«»t«*«****»«P3020050

C.***t GENERAL PURPOSE ASA REF P3 020060

C.»**« TEST OF FULL FORTRAN ARITHMETIC IF STATEMENT 7 . 1 . 2 . 2P3 0200 70

C***** GENERAL COMMENTS P3 02 0 0 80' C*«*** INTRINSIC FUNCTIONS ASSUMED WORKING P3 020 090

C***** P3 02 0 1 00

C*«««» SPECIFICATIONS SEGMENT 302 P3020110

C***** F'00U140'

C***** WHEN EXECUTING ONLY SEGMENT 302, THE SPECIFICATION STATEMENTS P0014145

C » WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0 0 1 4 1 5

0' C** **v IN COLUMNS 1 AND 2 REMOVED. P0014155

C * * * »

'

• P 0 01416 0 C= DIMENSION MCA1 I ( 5 )

, AC2S( 5 , 6 ) P0014165

C= DOUBLE PRECISION MCAVD,MCBVD P0 0 1 4 1 70' C= COMPLEX CHAVC P0014175

DIMENSION MCA1 I ( 5 ) , AC2S ( 5 , 6 ) P302A1

DOUBLE PRECISION MCAVD,MCBVD P302A2

COMPLEX CHAVC '

' " P3 02A3

C***** P0014180

C*««*« OUTPUT T A P E ASSIGNMENT STATEMENt'. NO INPUT fAF>E. P3 0 20 1 2 6 C* « *

* « P0 0 73260

C*«««t WHEN EXECUTING ONLY SEGMENT 3 02, THE FOLLOWING STATEMENT P0 0 73265

C*t*«* NUVI = 6 MUST HAVE THE C: IN COLUMNS 1 AND 2 REMOVED. P0073270

C * • P 0 0 7 3 2 7 5 C= NUVI : 6 P0073280

NUVI = 6 P3 0 2 B1 C***** P0073285

WRITE (NUVI ,3 02 0 ) P3 02 0 1 3() 3 0 2 0 FORMAT ( 1 H 1

, 1 X , 2 6 H F AR I F - ( 302 ) FULL FORTRAN/ 1 6X . 24HAR I THMET I C IP3 02 0 1 40

1 F STATEMENTS/ P30201 50

2 2 0 H ASA REF. - 7 . 1 . 2 . 2 / 2 X , 7 H R E S U L T S ) P3 02 0 1 60

C***** HEADER FOR SEGMENT 302 WRITTEN P3 02 0 1 70

MCA1 1(1) = 5 P30201 80

MCAVI = 0 P3 0 2 0 1 90

AC2S ( 1

, 1 ) : 1 0 . 5 P3020200

MCAVD = -15.0D0 P3 0 2 02 1 0 CHAVC = (1.0,2.0) P3020220

MCBVD = -O.ODO P3 02 023 0 C*«t*. ARITHMETIC IF WITH EXPRESSION OF TYPE DOUBLE PRECISION P3020240

Zttttt TEST THAT MINUS 2ER0 IS TREATED AS 2ER0 4'. 27 1 1 P 3 0 2 0 2 5 O' IF (MCBVD) 9301,9303,9301 P3020260

93 0 1 WRITE (NUVI, 93 02 ) P3 0 2 02 70

9302 FORMAT ( / / 2X , 3 7HE RROR , MINUS 2ER0 TREATED AS NEGATIVE/ P3 02 0 2 8 0

1 36H NUMBER - OTHER TESTS MAY FAIL AS A/ P3020290

2 8H RESULT) P3020300

MCAVI = 0 P3 02 03 1 0 C»*.** TEST 1 - SHOULD TAKE 2ER0 BRANCH P3020320

9303 IF (MCAVD + 15.0D0) 3 0 2 8,3021,3028 P3020330

C»*««. TEST 2 - SHOULD TAKE MINUS BRANCH P3020340

3 02 1 IF (MCAVD / D B L E ( F L 0 AT ( M CA 1 I ( 1 ) ) ) * 2. DO) 3 0 2 2,3 02 9,3 029 P3 02 0 3 5 0 C«»«** TEST 3 - SHOULD TAKE MINUS BRANCH P3020360

194 NBS FORTRAN Test Programs Version 1
3022 IF (MCAVD/(-15.0D0 ) + 6. 000 - 2 . 000 ** 3 ) 3 0 2 3,997 1 . 9971

C«««*t TEST 4 - SHOULO TAKE PLUS BRANCH

3 023 I F (OS rGN( 1.0D0,OBLE(REAL(CHAVC)))) 9972,9972,3024

C***«* TEST 5 - SHOULD TAKE ZERO BRANCH

P3020370

P30203S0

P30Z0390

P3020400

T A ^ / IF (2. 000 «* 2

- 4.000/ 1.0D0) 9973. 30Z5. 9973 D T r\ "? r\ / ^ r\ K J U d U H 1 U 7 A ^ C IF (MCAVI) 9974,3026,9970

7 A 9 A WRITE (NUVI ,3027)

GO TO 9970

7 A 7 7 FORMAT (//34H SEGMENT 302 TESTED SUCCESSFULLY.)

7 A 7 J J\J Co MCAVI = 1 D 7 r\ "? f\ / AA

IF (DA8S(MCAVD + 1 5.000 ) ) 93 0 4, 93 0 5, 93 0 4

D 7 r\ r\ / 7 f\ Q 7 A / V 3 U H WRITE (NUVI , 99 7 5 ) MCAVI D 7 Ci '> r\ / 9A

GO TO 3 02 1 Q 7 A C 9 3 0 5 WRITE (NUVI .9306) MCAVI

n 7 rt Z. 9 3 0 6 FORMAT ( / /2X. 1 4HERR0R IN TEST .I2,23H BECAUSE MINUS ZERO WAS/ P 3 0 Z 0 D 1 0

1 30H TREATED AS A NEGATIVE NUMBER) P30Z0520

GO TO 30Z1 P30Z0530

7 rt T n 3029 MCAVI = 2 n"7A")AC / A P30Z0540

WRITE ( NUVI . 997 5 ) MCAVI P3020550

GO TO 3022 P3020560

rt ft 7 1 9 9 71 MCAVI = 3 PjOZOd/O

WRITE ( NUVI , 997 5 ) MCAVI P30Z0580

GO TO 3023 PiuZObvO

O Q 7 7

7 c MCAVI = 4 rJU^UoUU

WRITE (NUVI , 9975 ) MCAVI D7A7AA1 A r i U d U 0 1 U GO TO 3 02 4 D7f^7AA7A ri'JC'JocU

O O 7 7 7 7/3 MCAVI = 5 D7A7AA7A

IF (DABS(2.0D0 ** 2 - 4.000 / 1 .ODO) ) 93 0 7 , 93 0 8, 93 0 7 n7A0AAAn

Q 7 A 7 7 3 U / WRITE (NUVI , 99 7 5 ) MCAVI D7(^7AAt^A r5U£U0jU

GO TO 3 02 5 D7A7AAAA

O 7 A fi V 3 0 0 WRITE ( NUVI , 9306) MCAVI D7A7AA7A

GO TO 30Z5 D7A7AACA

9974 MCAVI = 6 D7A7AA0A

WRITE (NUVI . 9975

)

MCAVI D7A7A7AA

9975 FORMAT (//6H TEST, 13, 8H FAILED.

)

D7A7A71 A

r i [J CU / 1 U 9970 CONTINUE D7A7A77A

C««**« END OF TEST SEGMENT 302 r J \J L \J 1 J \J C « t « * * WHEN EXECUTING ONLY SEGMENT 302, THE STOP AND END CARDS P30Z0740

c « » «

» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P30Z0750

c * * « * IN COLUMNS 1 AND 2 REMOVED. P30Z0760

c= STOP P30Z0770

c= END P30Z0780

STOP

END

tttt*t*tt**t**ttt*tttt*t*tttt*ttt*tit*ttttttiitii***ttitt*tttttt***

Z* t * t * Z'tTt it l OFMT - ( ^ i 0 ) c * * * «

t

Z******ttttt**1itt*1i**tt**tt*t**ittttttttt*tt*tttt1ittt***t1it**1it1i

C***«t GENERAL PURPOSE

C*««** TO TEST ADDITIONAL FEATURES OF FORMATTED READ

C*«*»* AND WRITE STATEMENTS AND FORMAT STATEMENTS

C«**V* RESTRICTIONS OBSERVED

C«t«t* t ALL FORMAT STATEMENTS ARE LABELED

C***** t H AND X DESCRIPTORS ARE NEVER REPEATED

C«*t** * FOR W.D DESCRIPTORS, 0 IS ALWAYS SPECIFIED AND

C*'*T«« u IS EQUAL TO OR GREATER THAN 0 C«**** t FIELD WIDTH IS NEVER ZERO

C***** * IF THERE IS AN I/O LIST, THE FOFtMAT STATEMENT

C*««** CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER

C « «'**

* THAN H OR X)

'" C»*«*« * ITEMS IN I/O LIST CORRESPOND TO FORMAT DESCRIPTORS 7 C*««»t * NEGATIVE OUTPUT VALUES ARE SIGNED 7 C«*««* « FIELD WIDTH NEVER EXCEEDED BY OUTPUT 7 C:»*«*« '* FOR r CONVERSION, EXTERNAL INPUT FIELDS ARE 7 . Z C**».» INTEGER CONSTANTS

C INPUT OATA TO THIS SEGMENT CONSISTS OF 38 CARD IMAGES IN COL

C COLS. 22 25 31 34-35 40-43 55 67 69 74-76

P30ZC1

P30ZCZ

*"*"* *'*"«"

* «P3 1 0 0 0 1 0 P3 1 OOOZO

P3100030

P 3 1 0 0 0 4 0

* * » « t

«' « t p 3 1 0 0 0 5 0 ASA REFSP3100060

7.1.3.Z.ZP310007 0 7.1 .3.2.3P 3 1 0 0 0 8 0 P31 00090

/57P31 001 00

3 / 5 4 P 3 1 0 0 1 1 0 1/31P3100120

1 / 3 3 P 3 1 0 0 1 3 0

/ 1 8P31 001 40

4/Z2P310015 0 P3 1 00 1 60

P3100170

3 . 4/36P3 1 00 1 80

3.6/56P3100190

3.6/01P3100Z00

6.1/07P3100Z10

P31 OOZZO

8 0 P3100Z30

P31 OOZ40

1

NBS FORTRAN Test Programs Version 1 195
CARD 1 ... 0. E*00 + . EOO P3100250

C COLS. 16 31 33 42-45 50 59-60 P3100260

CARD 2 + + . D + bb . 00 P31 00270

C COLS. 1 1 4 1 8 26 28 ---38 42 58 P31 00280

CARD 3

C COLS.

1.23456987654. +1.234E-0 -98.7654E+0 + 2345.67891011*2

69 78

P3100290

P3100300

CARD 3

C COLS

-.109876-4

1---5

P3100310

P3100320

CARDS 4,5.6.7,8 12345

C COLS. 1-3

P3100330

P3100340

CARDS 9,10,11,12 1.1

C COLS. 1 - — 58

P3100350

P3100360

CARD 13

CARD 14

+0.339567E+02

+ .339567+2

P3100370

P3100380

CARD 15

CARD 16

+ 3.395670E1

0.962951342440+04

P3100390

P3100400

CARD 17

CARD 18

.96295134244D04

0.96295134244+4

P3100410

P3100420

CARD 19

CARD 20

0.96295134244D+04

31 .23 + 0. UE + 04 + 0.2D + 02

P3100430

P310044Q

CARD 21 CARD 2231.23 .14E+04 +.2+2

-0 . 1 35 79E + 0 5 4444

P3100450

P3100460

CARD 23

CARD 24

4444

4444

P3100470

P3100480

CARD 25

CARD 26

4444

4444

P31 00490

P3100500

CARD 27

CARD 28

-333 5.555+0.4545E-04

-6.666 .9989E+12

P3100510

P3100520

CARD 29

CARD 30

7.77-0.747E-02 +0.549E022

+0.662E-00 0.468-1011

P3100530

P3100540

CARD 31 CARD 32

0.59542D+04-44. 6666-0. 1234567890D-03

54.9327-0. 13956245340+00

P3100550

P3100560

CARD 33

CARD 34

65 432 . 1 +0.848E+03 .848E3 + .129007+0.1290+07 0.412021P3100570

P3100580

CARD 35

CARD 36

2222 222222222 2222 222222222222222222222222222222222

-.987E0-0.987E+00 +0.6D0 + 0.60+00 .3680-5

P3100590

P3100600

CARD 3 7 CARD 38

5 5 5 5 987654 8647.86 987.654

P3100610

P3100620

CARD COLS,

c * * « «

«

NOT MENTIONED ARE BLANK P3100630

P3100640

c * * * «

C « t * t

«

READ AND WRITE STATEMENTS FOR ENTIRE SEGMENT FOLLOW P3100650

P3100660

c * * * * t c * * * * * TEST THAT COMPLETELY BLANK FIELDS IN THE INPUT

ARE TREATED AS 2ER0S. (ALL VARIABLES AND ARRAY

7.2.3.6/45P3100670

P3100680

C « t « « * c * « * * * ELEMENTS USED IN THIS TEST ARE FIRST SET TO

N0N-2ER0 VALUES. I, E. F AND 0 DESCRIPTORS

P3100690

P3100700

c * * t »

t

C t « « t

«

APPEAR IN THE CORRESPONDING FORMAT STATEMENT P3100710

P3100720

c * « * « « S

c * « « »

PECIFICATIONS SEGMENT 310 P3100730

P0014190

C****« WHEN EXECUTING ONLY SEGMENT 310. THE SPECIFICATION STATEMENTS

C***** WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C= P0014195

P0014200

C « * « « * IN

c * * « * « COLUMNS 1 AND 2 REMOVED. P0014205

P0014210

C= DIMENSION A1S(5) .A2S(2,2) ,A3S(3,3.3) .EP1S(33)

C= DIMENSION IAC1I(5).IAC2I(2.7),AC1S(25),AC2S(5.6)

P0014215

P0014220

C= INTEGER MCA3I (2,3,3)

C= REAL MVS

P0014225

P0014230

C= DOUBLE PRECISION M CAVD . M C BVO . M C CVD . A 1 D ( 4 ) . A20 ( 2 , 2 ) , A3D ( 2 . 2 . 2

)

C= DOUBLE PRECISION DPAVD , DPBVD . DP CVD , DPDVO . DPEVD . DPFVD , DPHVD , AAAVO

P0014235

P0014240

DIMENSION A1S(5).A2S(2.2),A3S(3,3.3).EP1S(33)

DIMENSION IAC1 I (5) . IAC2I(2. 7) ,AC1S(25) ,AC2S(5,6>

P310A1

P310A2

INTEGER MCA3I(2.3,3)

REAL MVS

P310A3

P310A4

DOUBLE PRECISION M CAVD . M CBVO , M C CVD , A1 D ( 4 ) , A2D ( 2 , 2 ) , A3D ( 2 . 2 , 2

)

DOUBLE PRECISION DPAVD , DPBVD , DP CVD , DPDVD , DPEVD , DPFVD , DPHVD , AAAVO

P310A5

P310A6

C * 1 1 1

1

C * * 1 1 * I NPUT-OUTPUT TAPE ASSIGNMENT STATEMENTS

P0014245

P3100740

196 NBS FORTRAN Test Programs Vers ion 1
C**«»* P0073290

C*»**« WHEN EXECUTING ONLY SEGMENT 310, THE FOLLOWING STATEMENTS P0073295

C** t«» NUVi = 6 . IRVI = 5 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVE D . P 0 0 7 3 3 0

0

C= NUVI = 6 P0073305

C'i IRVi' =""5 POO 73 3 1 0 NUVI = 6 P310B1

IRVi = 5 P310B2

C***** P0073315

C *'i'* » HEADER FORMAT STATEMENT P3 1 00 7 5 0 3100 FORMAT ( 1 H 1 , 1 X , 3 8H I 0 FMT - (310) ADDITIONAL FORMATTED I/O P3 1 0 0 760

1 //2X,38HASA REFS - 7.1 . 3 . 2 . 2 7 . 1.3.2.3 7 . 2 . 3 / /2X , 7HRESULtS ) P3 1 0 0 7 70

WRITE (NUVI, 3100) P3100780

JACVI = llfll P3 1 0 0 790

IAC1 1(1) = -2345 P31 00800

I AC2 l'("l , i) =' 9 999 P3 1 0 0 8 1 0 HCA3I ( 1.1.1) = 2 P31 00820

ACVS =1.2 P3 100830

BCVS = -.34E-3 P3100840

AiSd ) = 34.56 P3 1 0 0 8 5

0' A1S(2) = 456.789E+02 P3100860

A2S( 1 ."1 ) = -7899'.3 P3 1 0 0 8 7 0 A2S( 2,,1 ) = +9876. 543E-01 P3 1 0 0 8 8 0 A3S( 1 . 1

. 1 ) = . 5 43 P3 1 0 0 8 90

A3S(2, 1 . 1 ) = 4. 33E + 1 P3 1 0 0 90 0 AAAVD = +2.22D+01 P3100910

A1D(1) = -.334560-01 P3100920

A'2 D ( i

'. i

") = 9 9 8 7 . 7 6 b + 2 P 3 1 0 0 9 3 0 A3D( 1 , 1 . 1 ) = 44 . D-2 P3 1 0 09 40

C*T**t FORMATS TO TEST THAT BLANK INPUT FIELDS ARE 7 . 2 . 3 . 6 / 4 5 P 3 1 0 0 9 5 0 C***** TREATED AS ZEROS. I. E. F AND D FIELDS ARE TESTED P3100960

C *««

* « C A R D S i A N D 2 P 3 1 0 0 9 7 0 3101 FORMAT (4(15), 4(F3.1), 4(E11.4)/ 4(015.8)) P3100980

READ ( IRVI .isibi ) JACVI . lACI in ) IAC2I ( r, MCA3i( 1 , r 1 ) , ACVS'^ P3 1 0 099()

1 AlSd), A2S(1,1), A3S(1,1,1), BCVS, A1S(2), A2S(2,1), P3101000

2 A3 S ( 2 . 1 , 1 ) , AAAVb . ^ 1 D ( 1 ) V A2 D (1,1), A3 D ( 1 , 1 , 1) P 3 1 0 1 0 1

0

3102 FORMAT ( /2X,16HTEST BLANK I NPUT / 2X , 2 6HE ACH ANSWER SHOULD BE ZERO , P3 1 0 1 020

1 4(7 16) / 4( /F8 . 1 ) / 4( /El 2 . 1 ) / 4 ( /D1 2 . 1 ) ) P310103b

WRITE (NUVI, 3102) JACVI. lACIKD. IAC2I(1,1), MCA3I(1,1,1). ACVS , P3 1 0 1 040

1 /iiiS(1). A2S(1,1). A3S(1 ,1,1), BCVS, A1S(2), A2S(2,1), P310105()

2 A3S(2,1,1), AAAVD, A1D(1), A2D(1,1), A3D(1,1.1) P3101060

ZtttVt TEST THAT DECIMAL POINTS APPEARINC3 IN INPUT FIELDS 7 . 2 . 3 . 6 / 4 7P 3 1 0 1 0 7 0 C*«*** OVERRIDE THE SPECIFICATIONS SUPPLIED BY E, F AND P3101080

t

'* "* * *

'* b F I ELD D E S C R I P T 0 R S P 3 1 0 1 0 9 0 3103 FORMAT (/34H TEST DEC. PT. SPECIFIED BY INPUT/ 36H 3 LINES IN EAP3101100

iCH (3Ft0UP SHOULD MATCH / 26H * LINE IS HOLLERITH DATA ) P3101110

WRITE (NUVI, 3103) P3101120

CMAVS = 1 .23456 P3101 130

CMBVS = 987654 . P3 1 0 1 1 40

C M E V S = 0 . 1 2 3 4 E + 01 P 3 1 0 1 1 5 () CMFVS = - 0 . 98 76 5 4E + 02 P3101160

DP AVD = 0 . 2 3 4 5 6 7 8 9 1 0 I I D + 0'6 P 3 1 0 1 1 7

0

DPBVD = -0 . 1 098760-04 P31 01 1 80

C***** CARD 3 P3101190

3104 FORMAT (2(F7.3), 2(E12.5), 2(020.11)) P3101200

READ (IRVI ; 3 1 0 4 ) a C VS , BCVS, F F C VS , G G C V S , M C A VO . M C B VD P 3 101210

3105 FORMAT (/12H * 1 . 23456 , 2 ( / F 1 2 . 5 ) / / 1 3H * 98 76 5 4 . 0 , 2 ( / F 1 3 . 1 ) / P3101220

1 /15H * 0.1 234E + 6l,2(/Ei5.4)//17H * - 6 . 9 8 7 6 5 4 E + 0 2 , 2 ( / E 1 7 . 6 ) / P3101230

2 /23H * 0.234567891 0 1 1 0 + 06, 2 ( / D23 . 1 2 ) / / 1 7H * -0 . 1 09876D-04 , P3101240

3 2(/bi7.6) ) P3101250

WRITE (NUVI, 3105) CMAVS, ACVS, CMBVS, BCVS, CMEVS, FFCVS, CMFVS, P3101260

i' GGCVS, bPAVb. MCAVD, DPBVD, MCBVD P3101270

C*«*** TEST SIMPLE REPETITION OF FORMAT DESCRIPTORS 7.2.3.4/ P3101280

C*««** WHEN ADDITIONAL ITEMS REMAIN IN AN I/O LIST 7.1.3.2.1/ P3 1 0 1 290' C«*«** AND THE LAST RIGHT PARENTHESIS HAS BEEN REACHED P3101300

C* **'*"* IN THE CORRESPONDING FORMAT STATEMENT P31 01310'

3106" FORMAT ( 35H1 TEST FORMAT DESCRIPTOR REPETITION/ 32H ALL LINES P3101320

1IN EACH GROUP SHOULD/ 14H BE IDENTICAL) P310133b

WRITE (NUVI, 3106) P3101340

NBS FORTRAN Test Programs Version 1 197
JACVI = +12345 P31 01350

KBCVI = 3 P3 1 0 1 360

CMAVS = 1.1 P3101370

CMBVS = 1.23 P3101380

CMEVS = 33.9567 P3101390

CMGVS = 1 . 4E + 03 P3 1 0 1400

DPAVD = 962951342.440-5 P31 01 41 0 DPBVD = 2 . OD 1 P3 1 0 1 420

c * * «

«

* CARDS 4 , 5 , 6 , 7 , 8 P3 1 0 1 430

310 7 FORMAT (15) P3 1 0 1 440

READ (IRVI, 3107) IAC1I P31 01 450

c * * * * t CARDS 9 , 10, 11, 12 P31 01 460

3108 FORMAT ( F3 . 1 ) READ (IRVI, 3108) A2S

P3 1 0 1 470

P3 1 0 1 480

C * » « « * CARDS 13, 14, 15 P3 1 0 1 490

93Z0 FORMAT ( E 1 3 . 6 ) P31 01 500

READ (IRVI, 9320) A1S(1), HHCVS, A1S(2) P3 1 0 1 5 1 0

c » * * * » CARDS 16, 17, 18, 19 P31 01 520

932 1 FORMAT (018.11)

READ (IRVI, 9321) A2D

P3 1 0 1 530

P3 1 0 1 540

c

* « *

«

* CARDS 20 , 21 P3 1 0 1 5 50

9322 FORMAT ( I 1 , F 4 . 2 , E 9 . 2 , D 8 . 1

)

P3101 560

READ (IRVI, 9322) LCCVI, DCVS, AC2S(5,6), A3D(1,2,2), MO CV I

,

FFCVS, P3101 570

1 GGCVS, AAAVD H 5 1 0 1 D 5 0 9323 FORMAT ( /10H * 12345)

WRITE (NUVI,9323)

P31 01 590

P31 01600

93 2 4 FORMAT (110)

WRITE (NUVI,9324) JACVI, IAC1I

P31 0161

0

P3101620

932 5 FORMAT ( / 8H « 1.1)

WRITE (NUVI,9325)

P3101630

P3101640

932 6 FORMAT (F8.1)

WRITE (NUVI,9326) CMAVS, A2S

P3101650

P3101660

93 29 FORMAT (/17H * 0 . 3 3 9 5 6 7 E + 0 2 ) WRITE (NUVI,9329)

P3101670

P3101680

93 3 0 FORMAT ( E 1 7 . 6 ) WRITE (NUVI,933 0 ) CMEVS, AlSd), HHCVS, A1S(2)

P3101690

P31 01 700

933 1 FORMAT (/22H * 0 . 9 6 2 9 5 1 3 4 2 4 4 D + 0 4

)

WRITE (NUVI,9331)

P31 01 71 0 P3101 720

9332 FORMAT ( D22 . 1 1 ) WRITE (NUVI,9332) DPAVD, A2D

P3101730

P31 01 740

9333 FORMAT (/31H * 3 1.23 0.14E+04 0.2D+02)

WRITE (NL)VI,9333)

P31 01 750

P3101760

93 3 4 FORMAT ( I 6 , F6 . 2 , E 1 0 . 2 , D9 . 1

)

P3101770

WRITE (NUVI,9334) KBCVI, CMBVS, CMGVS, DPBVD, LCCVI. DCVS, P31 01 780

1 AC2S(5,6), A30(1,2,2), MDCVI, FFCVS, GGCVS, AAAVD P31 01 790

c « * « * * TEST THAT FORMAT CONTROL PASSES TO THE GROUP 7.2,,3,. 4/03P31 01 800

C

« « * * ENCLOSED BY THE LAST PRECEDING RIGHT PAREN. 7.1.3,,2,.1/39P3101810

C

* * » » WHEN THE I/O LIST CONTAINS MORE ELEMENTS THAN P3101820

C***** THE NUMBER OF DESCRIPTORS IN THE FORMAT STMNT. P31 01 830

JACVI = + 4 444 P3101840

KBCVI = -333 P31 01 850

LCCVI = 22 P3101860

MDCVI = 1 1 P3101870

ACVS = 5.555 P3101880

BCVS = -6.666 P31 01 890

CCVS = + 7.77 P3101900

DCVS = 65432.1 P3101910

CMAVS = - 0 . 1 3 5 79E + 5 P3101920

CMBVS - 0 . 4 5 4 5 E-04 P3101930

CMCVS = 0.9989E12 P3101940

CMDVS = - 0 . 74 7E-2 P31 01950

CMEVS = +0 . 549E+00 P3101960

CMFVS = 0 . 662E-0 P3101970

CMGVS = 0 . 468 E- 1 0 P3101980

DPAVD = +59.542002 P3101990

DPBVD = -0.0 1 234567890-2 P3 1 020 0 0 DPCVD = -1395624534.0-10 P3102010

DPDVD : + 1 29 . D4 P3 1 0 2 02 0

198 NBS FORTRAN Test Programs Version 1
DPEVD = 4. 12D+20

DPFVD = 36.8D-7

P3102030

P3 1 02040

DPHVD = 0.6D00

FFCVS = -44.6666

P3 1 0 2 0 5 0 P31 02060

GGCVS = +.549327E+2

HHCVS = 848.

P 3 1 0 2 0 7 0 P3 1 0 2 0 8 0 MVS = -.987

CMHVS = 1 . 23E-1

P31 02090

P3 1 02 1 00

C » t «

«

CMIVS = 646. E-2

* CARDS 22, 23, 24. 25, 26

P 3 1 0 2 1 1 0 P3 1 02 1 20

9335 FORMAT ( E12.5. (14))

READ (IRVI,9335) A1S(2), IAC1I

P 3 1 0 2 1 3 0 P3 1 02 140

C t « *

«

9336

* CARDS 27, 28

FORMAT (14, ( F6 . 3 ) , Ell . 4)

P 3 1 0 2 1 5 0 P3 1 02 1 60

READ (IRVI.9336 ) MRRVI, ACISd). EPISd), A3Sd,1.1). AC2S(2,2)

C*t*t* CARDS 29, 30

P 3 1 0 2 1 7 0 P3 1 02 1 80

9337 FORMAT (F4.2, (2(E10.3)). 12)

READ (IRVI,9337) A2S(2,2). A3S(2,1,1), EP1S(2), M CA3 I ( 1 , 1

, 1

)

,

P 3 1 0 2 1 9 0 P3 1 02200

c « * * *

1 BVS, AC2S(2,1), NECVI

* CARDS 31,32

P 3 1 0 2 2 1 0 P3 1 02 22 0 9338 FORMAT (D12.5. (F8.4, D17.10))

READ (IRVI,9338 ) MCAVD, EP1S(3), AIDd), A2Sd,2), A2D(2.1)

P3 1 02 23 0 P3 1 02240

C***** CARDS 33, 34, 35, 36

C**«** THIS READ CAUSES AN INPUT DATA CARD TO BE SKIPPED

P3 1 02 2 5 0 P3 1 02260

9339 FORMAT( F7.1, (/2(E10.3). 2(D10.3)), D10.3)

READ (IRVI.9339) CVS. A2S(2,1), A3Sd.2,2), A3Dd,1,1),

P31 02270

P3 1 02280

1 A3D(1,2,1), A2D(2,2). A3Sd,2,1), EP1S(4),

2 A1D(2). MCBVD, MCCVD

P31 02290

P3 1 02300

9340 FORMAT (/16H * - 0 . 1 3 5 79E + 0 5 , 2 ( / E 1 6 . 5 ) / / 9H « 4 4 44 , 6 (/I9))

WRITE (NUVI,9340) CMAVS, A1S(2), JACVI. IAC1I

P3 1 0 2 3 1 0 P3 1 02320

9341 FORMAT (/ 8H « -333, 2(/I8)/ 10H1 « 5.555, 2(/F10.3) //

115H * 0.4545E-04, 2(/E15.4)// ION « -6.666, 2(/F10.3) //

P3 1 0 2 3 3 0 P3 1 0 2 3 4 0 215H « 0.9989E+12, 2(/E15.4))

WRITE (NUVI, 934 1 ) KBCVI, MRRVI. ACVS, ACISd), CMBVS, EPISd),

P3 1 0 23 5 0 P3 1 02360

9342

1 BCVS, A3Sd,1,1), CMCVS. AC2S(2.2)

FORMAT (/9H * 7.77 , 2 ( / F 9 . 2 ) / / 1 4 H * -0.747E-02, 2(/E14.3) //

P3 1 02370

P3 1 0 2 3 8 0

1 14H * 0.549E+00, 2(/E14.3) //7H « 22, 2(/I7) //

2 14H * 0.662E+00, 2(/E14.3) //14H * 0.468E-10, 2(/E14.3) //

P3 1 02390

P3 1 0 2 40 0 3 7H * 11 , 2(/I7) ) WRITE (NUVI.9342) CCVS. A2S(2.2). CMDVS. A3S(2,1,1), CMEVS,

P3102410

P3 1 02420

1 EP1S(2), LCCVI, MCA3Id,1,1), CMFVS, BVS, CMGVS, AC2S(2,1),

2 MDCVI, NECVI

P3 1 02430

P3 1 02 4 4 0 9343 FORMAT (/16H « 0 . 5 9 5 4 2 D + 0 4 , 2 ( / D 1 6 . 5 ) / / 1 2 H * - 4 4 . 6 6 6 6 . 2 ( / F 1 2 . 4 ) / P 3 1 0 2 4 5 0 1/21H * -0.1 23 4 56 7890D-03,2(/D21 .10)/12H1 « 5 4 . 9 3 2 7 , 2 ( / F 1 2 . 4 ) / / P3 1 0 2 460

2 21H * -0.1395624534D+00,2(/D21 . 10) ) WRITE (NUVI. 9343 ) DPAVD. MCAVD, FFCVS. EP1S(3). DPBVD. AIDd).

P3 1 0 2 4 70

P 3 1 0 2 48 0 9344

1 GGCVS. A2S(1.2), DPCVD. A20(2,1)

FORMAT (/12H * 65432.1/ 2(F12.1/) / 14H * 0.848E+03/

P3 1 02490

P3 1 02500

1 3(E14.3/) / 14H » 0. 1 290 + 07/ 3 ( 0 1 4.3 /) / 1 4H * 0.412D + 21/

2 2(014.3/) / 14H * -0.987E+00/ 3(E14.3/) / 12H « 0.60+00/

P3 1 02 5 1 0 P3 1 02 5 2 0 3 3(D12.1/) / 14H * 0.368D-05, 2(/D14.3) ) WRITE (NUVI,9344) DCVS, CVS. HHCVS, A2S(2,1), A3S(1,2,2), DPDVD,

P3 1 02530

P3102540

1 A3Dd.1.1), A3D(1,2,1), DPEVD, A2D(2,2),

2 MVS. A3Sd,2,1). EP1S(4), DPHVD, A10(2), MCBVD.

P3102550

P3 1 02560

9345

3 DPFVD. MCCVD

FORMAT (/14H * 0.777E+01/ (E14.3))

P3102570

P3 1 02 5 8 0 9346

WRITE (NUVI.9345) CCVS. A2S(2,2)

FORMAT (/ 22H » -333 0.5 9 5 420 + 0 4 / 1 8, 0 1 4. 5 ) P3 1 02 5 90

P3 1 0260 0 9347

WRITE (NUVI.9346) KBCVI. DPAVD. MRRVI. MCAVD

IF (MRRVI - 5) 9348. 9349. 9348

P3 1 026 1 0 P31 02620

C * * « * 9348

« CARD 37

READ (IRVI. 9336) MRRVI

P3 1 02630

P3 1 02640

GO TO 9347

C«*»«* ADDITIONAL SCALE FACTOR ON INPUT-OUTPUT

P 3 1 0 2 6 5 0 P3102660

C t * t

«

9349

« CARD 38

READdRVI, 9327) A1S(3). A1S(4). A1D(4)

P31 02670

P31 02680

9327 FORMAT ( 1PE10.3. -1PE10.2. D10.3)

WRITE(NUVI. 9328) A1S(3). A1S(4), A1D(4)

P31 02690

P3 1 02 70 0

NBS FORTRAN Test Programs Version 1 199
9328 F0RMAT(//22H1 SCALE FACTOR ON READ/ 31H IN ORDER OF FORMAT 0 CCURRP3 1 0271

0

2ENCE/28H NO EXPONENT ON INPUT DATA // P31 02720

3 40H CARD 987654 8647.86 987.654/ P3 1 02730

4 40H DESC 1PE10.3 -1PE10.2 D10.3/ P31 02740

5 40H TO BE .98SE+02 .8648E+05 .98770+04/ P3 1 02750

6 4H IS, E12.3, Ei2.4, D12.4) P3 1 02760

C***** END OF TEST SEGMENT 310 P31 02770

C**«** WHEN EXECUTING ONLY SEGMENT 310, THE STOP AND END CARDS P3 1 02780

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P3 1 02790

C*t*«* IN COLUMNS 1 AND 2 REMOVED. P3 1 02800

C= STOP A^A4 A P3 1 028 1 0 C= END P3 1 02820

STOP P31 0C1

END P3 1 0 C2

0 . E + 00 + EOO

+ + . D+00 . DO

1.23456987654. +1.234E-0 -98.7654E+0 + 2345.67891011+2 4 A A A ^ ^ S - . 1 09876-4

1 2345

1 2345

1 2345

1 2345

1 2345

1 . 1

1 . 1 1.1

1.1

+ 0 . 339567E + 02

+ .339567+2

+ 3.395 670E1

0.96295134244D+04

. 96295 1 34244D04

0 .962 9 5 1 3 4244 + 4

0 . 9629 5 1 342 44D + 04

31 .23 + 0. 14E + 04 + 0.2D + 02

31.23 .14E+04 +.2+2

-0 . 1 3579E + 0 5 4444

4444

4444

4444

4444

-3 3 3 5;5 5 5Vo; 45 45e:o4

-6.666 .9989E+12

7.77-0.747E-02 +0.549E622

+0.662E-00 0.468-1011

0. 595420 + 04-44. 6666-0. 1 2 3 4 5 6 78 90 0- 03

5 4.932 7- 0. 1 39 562 4 5 3 4D + 00

6 5 432 . 1 + 0.8 48E + 03 .848E3 + . 1 290D7 + 0 . 1 290 + 07 0 . 41 2D21

22222222222222222222222222222222222222222222222222

-. 987E0 - 0.98 7E + 00 +0.6D0 + 0 . 60 + 00 . 368D-5

5 5 5 5 987654 8647.86 987.654

C**t****** t ********* t**t**t***********t*t**t***t*t*tttt****tt*t*P31 2001 0 C***** P3120020

C***** RDFHT - (312) P312bb3b

C***** P3120040

C* * t « * * » * t « . * « * «

«

t * tVt t i,\'t t t t tT* 't^^^^^^ 2 0050

C«»*** GENERAL PURPOSE ASA REFSP3120060

C«»««» TO TEST FORMATTED READ AND WRITE STATEMENTS 7 . 2 . 3 . 1 0 P3 1 2 0 6 70

Ct*«** IN WHICH THE FORMAT STATEMENT IS CONTAINED IN P3120080

C***** AN ARRAY P3120090

C««*«* RESTRICTIONS OBSERVED P3120100

C«*«** » AN H DESCRIPTOR MAY NOT BE PART OF A FORMAT 7 . 2 . 3 . 1 6 / 48 P3 1 2 0 1 1

6

C*««** STATEMENT IN AN ARRAY P3120120

C«*»*« « ALL FORMAT STATEMENTS ARE LABELED 7.'2.3 /57P312^136

C*t«*« « H AND X DESCRIPTORS ARE NEVER REPEATED 7 . 2 . 3 . 3 / 5 4P3 1 2 0 1 4

0

C****« * FOR W.D DESCRIPTORS, D IS ALWAYS SPECIFiEb AND 7 . 2 . 3 . 1 / 3 1 P3 1 20 1 5

0

C***** W IS EQUAL TO OR GREATER THAN D 7 . 2 . 3 . 1 / 33P3 1 20 1 60

200 NBS FORTRAN Test Programs Version 1
Cttttt » FIELD WIDTH IS NEVER ZERO 7.2.3 /18P3120170

C*«*** * IF THERE IS AN I/O LIST. THE FORMAT STATEMENT 7 . 2 . 3 . 4 / 2 2 P 3 1 2 0 1 8

0

C*«»«« CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER P3120190

C«*«t« THAN H OR X) P3120200

t'*"*"*** «' ITEMS IN 1/6 LIST CORRESPOND TO FORMAT DESCRIPTORS 7 . 2 . 3 . 4 / 36 P3 1 2 0 2 1 0 C*«t«t « NEGATIVE OUTPUT VALUES ARE SIGNED 7 . 2 . 3 . 6 / 5 6 P3 1 2 0 2 2 0 C«««»t t FIELD WIDTH NEVER EXCEEDED BY OUTPUT 7 . 2 . 3 . 6 / 0 1 P 3 1 2 0 2 3 0 C«.ttt « FOR I CONVERSION, EXTERNAL INPUT FIELDS ARE 7 . 2 . 3 . 6 . 1 / 0 7 P3 1 2 0 2 4

0

C.'*»t« INTEGER CONSTANTS P3 1 2 02 5 0 C««««* TEST HOLLERITH IN ARGUMENT OF A CALL P3120260

C««*«'* ARRAY NAME IN ARGUMENT LIST USED AS FORMAT SPECIFIER P3 1 2 02 70

C***** SUBROUTINE FMTQ ALSO TESTS THE EMPTY FORMAT STATEMENT P3120280

C*«'**« THE FOLLOWING DATA STATEMENTS INITIALIZE SOME 7 . 2 . 3 . 1 0 / 5 0 P 3 1 2 0 2 9 0 C*»*tt ARRAYS WITH FORMAT STATEMENTS TO BE USED FOR P3120300

C«*t»* READING WITH A, F AND D CONVERSION AND FOR P3 1 2 0 3 1 0 C««*** WRITING WITH I, E AND L CONVERSION P3120320

C***** P3120330

C INPUT DATA TO THIS SEG. CONSISTS OF 13 CARD IMAGES IN COLS. 1 - 80 P3120340

C COLS. 1 --50 P3120350

CARD 1 (15, 6X. U, 2(13), 12) P3120360

CARD 2 (E 9.2,3(E13.6)) P3120370

CARD 3 ( LI ,2(L2) . L3) P3 1 203 8 0 CARD 4 (2X, A2. 5(A2) ) P3 120390

CARD 5 (2X.F5.3, F4.0, 2(F7.2)) P3120400

CARD 6 (2X , D 16.9,09.2) ' P3120410

CARD 7 4756 -867224+39-6 P3120420

CARD 8 23 498.- 77.2 7 5 4 7.1 8 P3 1 2 0 43 0 CARD 9 -. 0076 + 1 1 +08. 9342 1 E- 1 3 8 93 . 42 1 E - 1 5 + 0 8 . 93 42 1 E - 1 3 P3 1 2 0 440

CARD 1 0 -0 . 35 790 1 246D + 00 + 0.52D-2 P3 1 2 04 5 0 CARD 11 TTA FF9$ P3120460

CAFlb VZ AB P3 1 2 0 470

CARD 13 CDE+*=123 P3120480

CAFID COLS. NOT MENTIONED ARE BLANK P3 1 2 0 490

C***»* P3120500

Ct**»« SPECIFICATIONS SEGMENT 312 P3120510

C«t«*« P0014250

C * * ; WHEN E X E C U TING 0 N L Y SEG M E N T 3 1 2 , THE S P E C I F I CAT I 0 N STATE MEN t S P 0 0 1 4 2 5 5 C*««** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0014260

C***** IN COLUMNS 1 AND 2 REMOVED. P0014265

C****» P0014270

C= OIMENSION LI j ( fo) , A3S( 3 , 3 , 3 ) , Y ER 1 S ( 7 ) , I AC 1 1(5) . AC1 S(25 ) POO 1 42 7 5 C= DIMENSION ZU3S(3 , 2 . 2 ) , ZT1 S( 4) , ZU1 S ( 1 2 ) , ZU2S( 4 , 2 ) , I AC2 I ( 2 , 7) P00 1 428 0 C= INTEGER AVI , IU2I (4. 2) , IT3I (4, 2 , 2) , IU3I (2, 3 ,3) , MCA3I (2,3,3) POO 1 428 5 C= LOGICAL AVB,BVB,CVB,GG1B(2),A1B(2) P0014290

C= DOUBLE PRECISION DP AVD , D P B VD , D P C VD , A 1 D ( 4 ) P0 0 1 42 9 5 C= COMPLEX CHAVCCHBVC P00 1 4300

DIMENSION LI I ( 1 0 ) . A3S(3 . 3 , 3 )

, YER1 S( 7) , I AC1 I ( 5 ) , AC1 S(25 ) P312A1

DIMENSION IAC2I(2,7),ZU1S(13),ZU3S(3,2,2),ZU2S(4,2),ZT1S(4) P312A2

INTEGER AVI , IU2 I ( 4 , 2 ) . IT3 I ( 4 , 2 , 2 ), IU3 I (2 , 3 , 3 ) , MCA3I(2,3,3) P312A3

LOGICAL AVB, BVB . CVB , GG1 B (2 )

, A1 B(2 ) P312A4

DOUBLE PRECISION OPAVD , OPBVO , DP CVD , A1 D ( 4 )

' P312A5

COMPLEX CHAVCCHBVC P312A6

C

*'*"*"*

t POO 1 43 0 5 Ct.t.t INPUT-OUTPUT TAPE ASSIGNMENT STATEMENTS P3120520

C***»* P0073320

C«**t* WHEN EXECUTING ONLY SEGMENT 312, THE FOLLOWING STATEMENTS P0073325

C*TtT« NUVI = 6 AND IRVI = 5 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P 0 0 7 33 3 0 C**«** P0073335

C = N il V I = 6 P 0 0 7 3 3 4 0 C= IRVI = 5 P0073345

NUVI = 6 P312B1

IRVI = 5 P312B2

C»**t* P0073350

DATA IU2I(1,1).IU2I(2,1),IU2I(3,1),IU2I(4,1),IU2I(1.2),IU2I(2,2), P3120530

1 IU2 I (3. 2) /2H( A. 2H2/ , 2H2X. 2H, 5 , 2H(A, 2H2 ) , 1 H) / P3 1 2 0 5 40

DATA ZU1S(1),ZU1S(2),2U1S(3),ZU1S(4),ZU1S(5),ZU1S(6),ZU1S(7). P3120550

1 ZU1S(8).ZU1S(9),ZU1S(10).ZU1S(11),ZU1S(12) / P3 1 20 560

2 2H( .2H ,2HF3.2H.3, 1H, ,2HF3,2H.0,2H, , 2H2 ( , 2HF6 , 2H . 2 , 2H ) ) / P3 1 2 0 5 70

NBS FORTRAN Test Programs Version 1 201
DATA IU3I(1.1.1),IU3I(2.1,1).IU3I(1.2.1).IU3I(2.2,1).IU3I(1,3.1). P3 120580

1 IU3I (2.3, 1 ) , IU3I (1 , 1 .2) , IU3I (2, 1 ,2) / P31 20590

Z 2H( .2H D,2H16,2H.9,2H. , 1 HD , 2H9 . . 2H2 > / P3i20600

DATA IT3I ( 1 , 1 . 1 ) . IT3 I (2. 1 . 1 ) , IT3I (3, 1 . 1 ) . IT3I (4, 1 . 1 )

, IT3I (1 ,2, 1

)

, P3 1 2 061 0

. i IT3I (2,2. 1 ) . IT3I(3.2. 1 ) , IT3I ( A,2, 1 ) . It31 ( 1 , 1 ,2) . rT3I (2, 1 .2) . P3 1 2 062 0 2 IT3I (3, 1 ,2) , IT3I (4, 1 ,2) , IT3I (1 ,2,2) / 2H ( 2 , 2HX , , 2H I 5 , 2H , 1 , P3 1 20630

'3 2HX, ,2HI4,2H, I ,2H4, ,2H1X,2H, I ,2H2, ,2Hn, 1H) / P3 1 20640

DATA ZT1 S( 1 ) , ZT1 S(2) , ZT1S(3) ,ZT1S(4) /2H(E, 2H1 1 , 2H.2, 1H) / P3 1 206 5 0 DATA ZU3S( 1 ,1,1), ZU3S(2 , 1 , 1 ) ,ZU3S(3 , 1 , 1 ) ,2U3S( 1 ,2,1 ) , 2U3S (' 2 , 2 . 1 ) , P3 1 20660

1 ZU3S(3,2,1) / 2H( 4 , 2H(E , 2H1 4 , 2H . 6 , 2H/ ) , 1 H) / P3 1 206 70

DATA ZU2S(1,1),ZU2S(2,1),ZU2S(3,1),ZU2S(4,1),ZU2S(1,2 ) , ZU2S(2 , 2 ), P31 2062 0 2 ZU2S(3,2) / 2H( L , 2H3 , , 2H2( , 2HL2 . 2H) , , ZHL3 , 1 H) / P3 1 20690

CT*T*. THE FOLLOWING READ STATEMENTS INITIALIZE SOME 7 . 2 . 3 . 1 0 / 5 1 P 3 1 2 0 7 0

0

C*«*«» ARRAYS WITH FORMAT STATEMENTS TO BE USED FOR P3120710

C*t««* READING WITH I, E AND L CONVERSIONS AND FOR P3 1 2 0 72 0 C««*t« WRITING WITH A, F AND 0 CONVERSIONS P3120730

C*«»*« P31Z 0 740

WRITE (NUVI,31Z0) P3120750

C * * *t» CARD 1 P3 1 20 760

READ (IRVI,3121) ACIS(I), AC1S(2), AC1S(3), AC1S(4), AC1S(5), P3120770

1 AC1S(6),AC1S(7),AC1S(8),AC1S(9),AC1S(10),AClS(ri). AC IS (12 ) P 3 1 2 0 7 8 0 C**»** CARD 2 P3120790

READ (IRVI,3122) Lll ' P3 1 2 0 800

C**«** CARD 3 P31Z0810

READ ( IRVI ,3121 ) A3S P 3 1 20 82 0 C*«*** CARD 4 P3120830

READ (IRVI, 3123) YER1S P3 1 2 0 8 4 0 C*«*«* CARD 5 P3120850

READ (IRVI, 3124) MCA3I P3120860

C«t*t« CARD 6 P3120870

READ (IRVI, 3124) IAC2I P3 1 2 0 8 80

C***** P3120890

C***** P3 1 2 0 9 0 0 C«.»«* THE FOLLOWING STATEMENTS MAKE USE OF THE FORMATS P3120910

C***** CONTAINED IN THE ARRAYS P3 1 209Z0

C«**** P3120930

C*.*»» READ AND WRITE WITH I CONVERS I ON US I NG FORMATS I N ARRAYS ' P3 1 2 0940

JACVl : 4756 P3120950

KBCVI = - 8 6 7 P3 1 2 0960

LCCVI = 224 P3120970

MDCVI = +39 P3 1 2 098 0 NECVI : -6 P3120990

C***»« CARD 7 WITH CARD 1 AS FORMAT P3121000

READ (IRVI,AC1S) AVI, MRRVI, lACIKD, IAC1I(2), IAC1I(3) P3121010

WRITE (NUVI ,3125) P3121020

WRITE(NUVI , IT3I ) JACVI , KBCVI, LCCVI, MDCVI, NECVI, AVI, MRRVI, P3121030

1 IAC1I(1),IAC1I(2),IAC1I(3) P3121040

Z***t* READ AND WRITE WITH F CONVERSION USING FORMATS IN ARRAYS P3121050

AVS = .234 P3121060

BVS = 98. P3121070

CHAVC = ( - 77 . 2 7

, + 5 4 7 . 1 8E0 ) P3121080

C«««t* CARD 8 FORMAT IS ( F 3 . 3 , F 3 . 0 , 2 ( F 6 . 2 ) ) P3121090

READ (IRVI,ZU1S) CVS, DVS, CHBVC " P3121100

WRITE (NUVI ,3127) P3121 1 10

WRITE (NUVI,MCA3I) AVS, BVS, CHAVC P3121120

WRITE (NUVI,MCA3I) CVS, DVS, CHBVC P3121130

C«T«tt READ AND WRITE WITH E C 0 N VE R S I 0 N U S I N G

' FMM ATS iN'TRRAYS P3121140

AVS = -0.76E+9 P3121150

BVS : + 0 8.93 42 1 E-13 '

'. P3121160

Ct««t« CARD 9 WITH CARD 2 AS FORMAT P3121170

R_aD (IRVI, LI I) ZU3S(2,2,2) , CVS,0VS,ZU3S(1 ,2,2) P3121180

WRITE (NUVI ,3128) P3121 190

WRITE(NUVI ,ZT1S) AVS. ZU3S(2,2,2) P3121200

WRITE (NUVI, 3129) P3121210

WRITE (NUVI, 2U3S) BVS , ZU3S ( i , 2 , 2 ) , CVS , DVS P3121220

C**»** READ AND WRITE WITH D CONVERSION USING FORMATS IN ARRAYS P3121230

DPAVD = - 0 . 3 5 790 1 2 46D + 00 P3121240

DPBVD = + . 0 00 5 2D + 1 P3121250

202 NBS FORTRAN Test Programs Version 1
C«**** CARD 10 FORMAT IS (016. 9. 09. 2) P3121260

REAO (IRVI.IU3I) A1D(1), DPCVD P3121270

WRITE (NUVI,9930) P3121280

WRITE (NUVI,IAC2I) DPAVO , DPBVO , A1 D ( 1

)

, DP CVD P3121290

CT*'*Ti READ AND WRITE WITH L CONVERSION USING FbRHATS IN ARRAYS P3121300

AVB = .TRUE. P3121310

BVB'= .FALSE. P3121320

C**«** CARD 11 WITH CARD 3 AS FORMAT P3121330

READ ( IRVI , A3S) A1 B( 1 ) , A1B(2), CVB, GG1B(2) P312

WRITE (NUVI,9931) P312

WRITE (NUVr, 2U2S) AVB, AVB. BVB, BVB P312

WRITE (NUVI,2U2S) A1B(1), A1B(2), CVB. GG1B(2) P312

C *«*«'» READ AND WRITE WITH A CONVERSION USING FORMATS IN ARRAYS P312

C*«*«* CARDS 12 AND 13 FORMAT IS ( A2 / 2X . 5 ( A2 ) ) P312

READ (IRVI. IU2I) JACVI. AVS, lACIKI), GG1B. BVB P312

WRITE (NUVI.3126) P312

WRITE (NUVI.YER1S) JACVI. AVS, lACIKD, GG1B, BVB P312

C« * * * * P3 1 2 CAL L F MT(3 ( N U V I . 2 1 1 S , 0.9999 , 2 H H 0 , 2 H L L , 2 H E R , 2 H I T , 2 H H , 2 H C 0 , 2 H N S . P 3 1 2

1 2H,TA^2HNT , 2H.S. ..IHAS , 2H C , 2HAL , 2HL , 2HAR , 2HGU , 2HME , 2HNT , 1 HS ) P3 1 2 C***** P312

C*«*«* ADDITIONAL FORMAT STATEMENTS REQUIRED BY THIS SEGMENT P312

C*«**» P312

C**«** THE FOLLOWING FORMAT STATEMENTS ARE USED TO 7 . 2 . 3 . 1 0 / 5 1 P 3 1

2

C*«V«« READ FORMATS INTO ARRAYS P312

3121 FORMAT (27(A2)) P312

iiZZ FORMAT (10(A2) ) P312

3123 FORMAT ( 7(A2)) P312

312A FORMAT (18(A2))

Z*t*t* THE FOLLOWING ARRAYS ARE USED TO WRITE OUT ALL

C*'«'«T« HOLLERITH INFORMATION, SINCE H FIELD DESCRIPTORS

C««**« MAY NOT BE PART OF A FORMAT WITHIN AN ARRAY

3120 FORMAT (1H1,1X,31HRDFMT - (312) FORMATS IN ARRAYS//

P31

7.2.3. 10/48P31

P31

P31

P31

1 22H ASA REFS

3125 FORMAT (/ 22H

3126 FORMAT (/ 13H

3i2'7 ' FORMAT (/ 2 5H

3128 FORMAT

3129 FORMAT

9930 FORMAT

9931 FORMAT

( / 1 1 H

( / 1 4H

(/ 27H

(/ 10H

. - 7.2.3. 10//34H EACH GROUP OF LINES SHOULD

4756 -867 224 39 -6)

ABCDE+*=123)

0.234 98. -77.27 547.18)

-0 . 76E+09)

0.893421E-12)

-0 . 357901 246D+00 0 .520-02)

T T F F)

C***** END OF TEST SEGMENT 312

C'iTiT* WHEN EXECUTING ONLY SEGMENT 3i'2. THE STOP

C*t««« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C:««t«« IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

AND

C

= END CARDS

MATCH)P31

P31

P31

P31

P31

P31

P31

P31

P31

P3 1 P3 1 P3 1 P3 1 P3 1 P3 1 P31

1340

1350

1360

1370

1380

1390

1400

1410

1420

1430

1440

1450

1 460

1470

1 4 8 0

1 490

1500

1510

1520

1530

21540

21550

21560

21570

21580

21590

21600

21610

21620

21630

21640

21650

21660

21670

2 16 8 0

2 1690

2 1700

21710

21720

2C1

2C2

Ctttt************t********« «** ***t***t*««*t*t«t*******« «** ******P4620010

C * * * «

«

C t « t « FMTQ ( 462 ) C * * * t *

C***** GENERAL PURPOSE

C««««« TO DEFINE SUBROUTINE

C***** to TEST FORMAT IN AN

C»***« EMPTY FORMAT

C***** HOLLERITH IN

IN SEGMENT 312

ARGUMENT. AN FMTQ WHICH IS USED

ARRAY PASSED AS AN

STATEMENT, AND

A CALL ARGUMENT

SUBROUTINE FMTQ(NWVI. 2TW1 S , AWVS . I WVH . JWVH . KWVH . LWVH , MWVH , NWVH

.

1 IIWVH, JJWVH.KKWVH, LLWVH,MMWVH,NNWVH.IJWVH, I KWVH

2 ILWVH, IMWVH, INWVH, JIWVH, JKWVH)

Di'MENSION 2tW1S(4)

WRITE (NWVI. 4620)

462b' F 0 R M A T ( / 1 1 H + . 1 0 E + 0 1 ) C*«tt«FORMAT LABELED 2TW1S PASSED AS ARGUMENT IS (Ell. 2)

WRITE (NWVI, 2tw1S) AWVS

WRITE (NWVI. 4621)

P4620020

P4620030

P4620040

•P4620050

P4620060

P4620070

P4620080

P4620090

P 4 62 0 1 0 0 P 462 0 1 1 0 P4 6 2 0 1 2 0

P 462 0 1 3 0 P46201 40

P 462 0 1 5 0 P4620 1 60

P4620 1 70

P 462 0 1 8 0 P4620 1 90

NBS FORTRAN Test Programs Version 1 203
462 1 F0RMAT(/39H HOLLERITH CONSTANTS AS CALL ARGUMENTS ) P4620200

WRITE (NWVI,4622 ) IWVH, J W VH , K W VH , L W VH , M kVH , N W VH , I I WVH , J J W VH , P46202 1 0

"l KKMVH, LLWVH , MMWVH . NNWVH , I JWVH , I KWVH , I LWVH , p4620220

2 IMWVH, INWVH, JIWVH, JKWVH P4620230

4622 F0RMAT(2X. 19A2)

WRITE (NWVI,4623)

4623 F0RMAt(//29H TEST

136H THE FOLLOWING

WRltE(NWVi ,4624 ) FORMAT( ) WRITE(NWVI , 462 5 ) F0RMAT(23H END EMPTY

RETURN

END

(I5,6X, 14, 2(13). 12)

(E 9.2,3(E13.6))

( LI , 2(L2) ,L3)

(2X,A2,5(A2)

)

(2X,F5.3, F4.0, 2(F7.2))

(2X , D 16.9,09.2)

EMPTY FORMAT STATEMENT / LINE SHOULD BE BLANK )

P4620240

P4620250

P4620260

P4620270

P4620280

P4620290

P4620300

P4620310

P4620320

P4620330

^62 4

4625 FORMAT TEST //22H END SEGMENT 312 TEST )

4756 -867224+39-6

23 49 8.- 7 7.27 5 4 7. 1 8 -.0076+1 1+08.93421E-13 893.421E-15+08.93421E-13

-0.357901246D+00 +0.52D- 2 TTA FF9$

AB

CDE+*=123

c*********************** t**«*«t««**«******««««*«««**««« ««** ***«««««»P3500010

C t * «

«

c * « « C * t * *

c * * «

c « » «

«

c « * * c * * «

c « « * * c * « *

«

c * « * c « « «

c * * *

«

c « * »

«

c » « *

«

c « » « c * » * «

c

« «

«

C t « * *

c » »

«

c * * * »

c * * *

«

c * * «

C « t «

t

c=

C * t * t c * t *

«

c * * *

c * t « c * « *

«

* P3500020

* HISC5 - (350) P3500030

* P3500040

****t*****tt*t***tr***********t«**«[««i*****t««********t*******t*****«P3500050

« GENERAL PURPOSE ASA RE FP3'5 0 0 060

t TO TEST SPECIFICATIONS FOR PROGRAM FORM 3.2 P3500070

* 3.2.1 P3500080

* 3.4 P3500090

* 3.5 P3500100

P3 5 00 1 1 0 P3500120

P3500130

P 3 5 0 0 1 4 0 P3 5 0 0 1 5 0 P3 5 00 1 60

P35001 70

P3500180

P3500190

P 0 0 1 4 3 1 0 P00 1 43 1 5 P00 1 4320

P001 4325

P0bl4330

J J J J J J ( 1 )P00 1 4335

JJJJJJCI )P3 5 0A1

P001 4340

STATEMENT. NO INPUT j A P E P 3 5 0 02 6 6 THE FOLLOWING STATEMENT P0073360

GENERAL COMMENTS

* AMONG OTHER TH I NGS, THIS SEGMENT TESTS THAT

NOT EXECUTED AND, AS A RESULT OF THIS TEST,

MAY GENERATE SOME WARNING MESSAGES.

« BECAUSE OF THE NATURE OF THE TESTS

LABELS AND NAMES DO NOT FOLLOW THE

SPECIFIED IN THE USERS MANUAL.

COMMENTS ARE

THE COMPILER

BEING PERFORMED,

CONVENTIONS

SOME

.,S,,P E C I .F I C A T I 0 N S SEGMENT 3 5 0

WHEN EXECUTING ONLY SEGMENT 350, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND REMOVED,

DIMENSION

DIMENSION

J ( 2 ) J(2)J J (1

JJ( 1

1 )

1 )

J J J( 1 J J J ( 1

1 )

1 )

J JJ J( 1 J JJ J( 1

1 )

1 )

J J J J J ( 1 ) J J J J J ( 1 ) OUTPUT T WHEN EXECUTING

NUVI = 6 MUST

APE ASSIGNMENT

ONLY SEGMENT 350,

HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

3 5 00

C » « *

«

c * « * c « * 350 1

NUVI = 6 NUVI = 6 WRITE (NUVI, 3500)

FORMAT (1H1 , 1X,32HMISC5 - 1GRAM FORM/ /2X, 32HASA REFS.

2 2X,35HTEST THAT COMMENTS

HEADER FOR SEGMENT 350

(350) SPECIFICATIONS FOR/

-3.2 3.2.1 3.4 3.5//

ARE NOT EXECUTED)

WRITTEN

1 6X,

» TEST THAT COMMENTS

*WRITE (NUVI, 3501)

FORMAT (2X,34HERR0R -

ARE NOT EXECUTED

COMMENT STATEMENT EXECUTED)

P0073365

P0073370

P00 733 75

P350B1

P3 5 002 10

12HPR0P3500220

P3 5 00230

P3500240

P3 5 0 02 5 0 2.1/36P3500260

P3500270

P3500280

204 NBS FORTRAN Test Programs Version 1
C«»«*«GO TO 3504 , P3500290

3502 MRRVI = 0 P3500300

C*»*»*1F (MRRVI) 3504. 3504. 3504 P3500310

3503 MRRVI = 1 P3500320

C««»«»MRRVI r -i P3500330

IF (MRRVI) 3504,3504,3505 P3500340

35b'4 WRITE (NUVI,3 5 0 1 ) P3 5 0 0 3 5 0 3505 WRITE (NUVI.3506) P3500360

3506 FORMAT (2X,35HTESt SUCCESSFUL IF NO ERROR MESSAGE) P3500370

GO TO 3509 P3500380

CVttt* TEST THAT ALL 72 CHARACTERS IN A LINE MAY BE USED 3 . 2 / 2 4P3 5 0 0 3 9

0

3509 WRITE (NUVI,8100) P3500400

8i'6b F0RMAT(///2X,22HTESt 72 CHARACTER LINE) P3 5 00 4 1 0 WRITE (NUVI,8101) P3500420

8idl 6 FORMAT ( /2X,2 9H 1 234 5 6 789i6l i V2 1 3 U 1 5 1 6 1 7 U 1 9 / 2X . 29H 1 2l4^

1131415 r6 171819) P3500440

WRITE (NUVI . 81 02) P3 5 0 0 4 5 0 8102 FORMAT ( /2X,36HTEST SUCCESSFUL IF 2 LINES ABOVE ARE / 2X , 1 9HD I G I TS P3500460

11 THROUGH 19) P3500470

C**t** TEST THAT STATEMENT LABELS MAY BE 1, 2. 3., 4 OR 5 3 . 4 / 1 2P3 5 0 0 4 8 0 C««t«« DIGITS LONG P3500490

WRITE (NUVI. 8112) P3500500

8112 FORMAT ( / / 2X . 3 7HTE ST 1.2, 3, 4. 5 CHARACTER STHNT. LABEL/) P3 5 0 0 5 1 0 GO TO 1 P3500520

8iT3 GO TO 2 2 P3 5 00 5 30

8114 GO TO 333 P3500540

8115 (30 TO 8099 P3 5 00 5 5 0 8097 GO TO 22255 P3500560

1 MRRVI = 1 P3500570

WRITE (NUVI. 8118) MRRVI P3500580

GO TO 81 13 P3 5 0 0 5 9() 22 MRRVI = 2 P3500600

WRITE (NUVI. 8118) MRFtVI P3 5 006 1 () GO TO 81 1 4 P3500620

333 MRRVI = 3 P3 5 0 063 () WRITE (NUVI. 8118) MRRVI P3500640

GO' to 81 1 5 P3 5 0 065 () 8099 MRRVI = 4 P3500660

WR I TE ( Nlivi ; 8 Tl'8 ) MRRV I P3 5 0 06 70

GO TO 8097 P3500680

22255 MRRVI = 5 P3 5 0 0690

WRITE (NUVI. 8118) MRRVI ' P3500700

8118 F OR MAT ( 2 X . H . 1 )( . 2 4 H C H A R AC t E R'T AB E L ^cQEpf g q) p 3 5 q o 7 1 () C«tt«« TEST THAT VARIABLE AND ARRAY NAMES MAY BE 3 . 5 / 2 1 P3 5 0 0 7 2

0

C***** 1, 2V 3, 4 OR 5 CHARACTERS LONG P3 5 00 73()

WRITE (NUVI. 8098) P3500740

8098 FORMAT ( / / 2X . 36HTESt 1.2.3.4,5.6 CHARACTER VAR I ABLES72X . P3 5 0 0 75 6 115HAND ARRAY NAMES) P3500760

M

'=

1 P3 5 0 0 77()

MM = 1 P3500780

MMM = 1 F»3 5 00 790

MMMM = 1 P3500800

MMMMM = i P3 5 0 0 8 1 () MMMMMM = 1 P3500820

J (1) = 1 P3 5 0 083 0 JJ(1 , 1 ) = 1 P3 5 0 08 40

JJJ(1 ,i ,1) = i P3 5 0 0 8 5 0 JJJJ(1,1)=1 P3500860

JJJjj(l) = i P3 5 0 0 8 70

J J J J J J ( 1 ) = 1 P3 5 0 08 8 0 IF ( M - 1 ) 8

1

'1 9 iJoT. 'nT9 P 3 5 0 0 8 9 () 8103 IF (MM-1) 8119,8104,8119 P3500900

8ib'4 IF (MMM-1) 8119.8105.8119 P3 5 0 09 1 0 8105 IF (MMMM-1) 8119. 8106.8119 P3500920

8106 IF (MMMMM-D 8 1 1 9.8096.8 1 1 9 P3 5 0 0 93 0 8096 IF (MMMMMM-1) 8119. 8107. 8119 P3500940

8107 I F ( J ( 1 ) -1 ) 8119 . 8108.8119 P3 5 0 09 5 6 8108 IF (JJd.D-l) 8119.8109,8119 P3 5 00960

NBS FORTRAN Test Programs Version 1 205
8109 IF ( J J J ( 1 , 1

, 1 ) -1) 8119,8110,8119

8110 IF (JJJJ(1,1)-1) 8119,8111.8119

P3500970

P3500980

8111 IF ( J J J J J ( 1 ) - 1 ) 8 1 1 9,8 09 5,8 1 1 9

8 09 5 IF (JJJJJJd )-1 ) 81 19,8121 ,81 19

P3500990

P3501000

8119 WRITE (NUVI,8120)

8120 FORMAT (/ 2X,21H»*TEST UNSUCCESSFUL**)

P3501010

P3501020

GO TO 8123

8121 WRITE (NUVI.8122)

P3501030

P3501040

8122 FORMAT (/ 2X,38H»*TEST S U C C E S S F U

L

- AL L NAMES ACCEPTED**)

C..»t« TEST THAT STATEMENT LABELS MAY BE PLACED 3. P3501050

4/13P3501060

C*«»»« ANYWHERE IN COLUMNS 1 TO 5 AND THAT LEADING

C»*»** ZEROS ON STATEMENT LABELS ARE NOT SIGNIFICANT

3. 4/17P3501070

P3501080

8123 WRITE (NUVI ,81 16)

8116 FORMAT ( / / 2X , 3 4HTE ST PLACEMENT OF STATEMENT LABELS/2X,

P350 1 090

P3 5 0 1 1 00

1 29HAND LABELS WITH LEADING ZEROS/)

MRRVI = 1 P3 5 0 1 1 1 0 P3501 120

GO TO 10

2 MRRVI = 2 P3501 130

P3501 140

GO TO 010

3 MRRVI = 3 P3 5 0 1 1 5 0 P3 5 0 1 1 60

GO TO 0010

4 MRRVI = 4 P3501 1 70

P3 5 0 1 1 80

GO TO 00 10

5 MRRVI - 5 P3 5 0 1 1 90P3501200

GO TO 00 10 06 MRRVI = 6 P3501210

P3501220

GO TO 0010

007 MRRVI = 7 P3501230P3501 240

GO TO 0010

0008 MRRVI - 8 P3501250P3501 260

GO TO 0010

0009 MRRVI = 9 P3501270

P3501280

0010 WRITE ( NUVI , 1 1 ) MRRVI

Oil FORMAT ( 110)

P3501290

P3501300

GO TO (02,3,004,0005,6,7,8,009,8117), MRRVI

81 17 WRITE (NUVI ,012)

P3501310

P3501320

12 FORMAT ( //2X,28HTEST SUCCESSFUL IF 9 NUMBERS/2X.

1 31HIN SEQUENTIAL ORDER FROM 1 TO 9/2X,

P3501330

P3501340

2 17HARE WRITTEN A B 0 VE / / / 2 X , 1 8 H E N D OF SEGMENT 3 5 0 ) C**»** END OF TEST SEGMENT 350

P3501350

P3501 360

C*«**» WHEN EXECUTING ONLY SEGMENT 350, THE STOP AND END

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= CARDS P3501370

P3501380

C***** IN COLUMNS 1 AND 2 REMOVED.

C= STOP

P3501390

P3501 400

C= END

STOP

P3 5 0 1 4 1 0 P350C1

END P350C2

C«*«*«******«**t***«*t*t******«****«*t*«******.*«*««««*«**«******»*««««*«P3510010

c

« » *

«

C***** FUNMX - (351

)

P3510020

P3510030

C * * * * * C**********t«***««*****«***»**«*«*******»*********t**t*«****t« * * t * * * « «

t

P351 0040

*P3510050

C****» GENERAL PURPOSE

C**«** THIS SEGMENT FURTHER TESTS SOME

ASA

8.3.

REF

3 P3510060

P3510070

C***** BASIC EXTERNAL FUNCTIONS BY USING TRIGONOMETRIC

C***** FORMULAE

P3510080

P3 5 1 0090

[»«**«

C*«*»* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE . P3510100

P35101 10

[»*«**

C***»* WHEN EXECUTING ONLY SEGMENT 351, THE FOLLOWING STATEMENT

P0073380

P0073385

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED,

c * * * * * P0073390

P0073395

C= NUVI = 6 NUVI = 6 P0073400

P35 1 B1

c * * «

«

WRITE (NUVI, 3510)

P0073405

P3510120

3510 FORMAT ( 1 H 1 , 2 X , 1 3 H F U N MX - ( 3 5 1 ) / / 1 X , 2 2 H THIS SEGMENT FURTHER

1 5HTESTS /21H SOME BASIC EXTERNAL,

P3510130

P3510140

206 NBS FORTRAN Test Programs Version 1
2 10H FUNCTIONS /33H BY USING TRIGONOMETRIC FORMULAE// P3510150

319H ASA REPS. - 8 . 3 . 3 / / 2X , 7HRESULTS ) P3510160

C"*"*"«' * * H E A D E R F 0 R S E G M E N T 3 5 1 W R I T T E N P 3 5 1 0 1 7 0 C«*««* TEST STATEMENTS USING ORDINARY TRIGONOMETRIC FUNCTIONS P3510U0

C M A V S

V. 7'5 P 3 5 1 0 1 9 0 CMCVS = ALOG(EXP( CMAVS) ) - 1.75 P3510200

CMDVS = EXP(ALOG(CMAVS)) - ] .75 P3 5 1 02 1 0 CMEVS = (SIN(2.0)) •* 2 + (C0S(2.0)) ** 2 - 1.0 P3510220

CMFVS = (f;o/(:oS(|;2))' ** 2 -((SIN(1.2) / C0S(1.2)) ** 2) - 1.6 P3 5 1 0 23 0 WRITE (NUVI,3511) CMCVS. CMDVS, CMEVS, -CMFVS P3 5 1 0 2 40

CMCVS = SIN(.78) - SQRTCI. - C0S(0.78) ** 2) P3 5 1 0 2 5 6 CMDVS = C0S(1.57) - SQRTd.O - SIN(1.57) ** 2) P3 5 1 0260

CMEVS = SQRT( (1 . 0 / COS( 0 . 5 23 6 ) ) * * 2 -i . 0)-SIN( 0 . 5 23 6 ) / CO'SCO . 5 2 36 ) P3 5 1 0 2 70

CMFVS = ATAN2(SIN(0.5),COS(0.5)) - 0.5 P3510280

WRITE (NUVI,3511) CMCVS, CMDVS, CMEVS, CMFVS P3510290

C*««*« TEST STATEMENTS USING HYPERBOLIC FUNCTIONS P3510300

CMAVS = EXP (1. 8 5 ) P3 5 1 03 1 0 CMBVS = EXP(-1 .85) P3510320

CMCVS ='TANH(1.85) - ((CMAVS - CMBVS) / (CMAVS + CMBVS)) P3 5 1 033 0 CMEVS = 2 . / (EXP( 1 . 05 ) + EXP(-1.05)) - SORT ( 1 . 0 -TANH ( 1 . 0 5

) * * 2 ) P3 5 1 03 40

CMFVS = TANH(2 . 0 1 ) / (SQRTd.O - TANH(2 . 01 ) * * 2 ) ) - . 5 * ( EXP ( 2 . 0 1 ) - P3 5 1 03 5 0

1 EXP(-2.01)) P3510360

WRITE (NUVr,3512) CMCVS, CMEVS, CMFVS P3 5 1 03 70

WRITE (NUVI,3513) P3510380

35Ti FORMAT ( / / 4 ( F 1 5 . 5 / ) ) P3 5 1 0 3 90

3512 FORMAT ( / / 3 ( F 1 5 . 5 / ) ) P3 5 1 0 4 0 0 35T3 FORMAT (//39H ALL ABOVE ANSWERS SHOULD BE 0 PLUS OR / P3 5 1 0 4 1 0

1 40H MINUS AN ERROR FACTOR OF NOT MORE THAN / P3510420

2 12H 10 ** ^j^yy P3 5 1 0 43 0 C***** END OF TEST SEGMENT 351 P3510440

C'*'**'** WHEN EXECUTING ONLY SEGMENT 351, THE STOP AND END CARDS P3 5 1 0 4 5 0 C**«** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P3510460

C IN COLUMNS 1 AND 2 REMOVED. • P3510470

C= STOP P3510480

C= END P3 5 1 0 4 90

STOP ' P351 CI END P3 5 1 C2

C««««*«*«****«*************««**«*«******«**«*******«*«*«***«***«t*«*«*««P3520010

t'tTt V* P3 5 2 0 02 0 C***«* NAMES - (352) P3520030

C'«"V"« "* * P 3 5 2 0 0 4 0 C*«**««*****t**t*********«******«***«*«*«*ir******»********«*****t****«««P35Z0050

C*;T*t GENERAL PURPOSE ASA REF P3 5 2 0 0 6 0 C***** TO TEST THE CAPABILITY OF COMPILERS TO IDENT-IFY DATA 1 0 . 1 . 7 / 5 4 P 3 5 2 0 0 7 0 C*V**'* NAMES THAT RESEMBLE FORTRAN VERBS AND/OR PREDEFINED P3 5 2 0 0 8 0 C*t*«* FUNCTION NAMES. P3520090

C * G E N E R A L COMMENTS P 3 5 2 0 1 0 0 C«**** BECAUSE OF THE NATURE OF THIS TEST SEGMENT, NAMING P3520110

C***** CONVENTIONS THAT EX I STED I N OTHER SEGMENTS WILL NOT P3 5 2 0 1 2 0 C****« BE OBSERVED. P3520130

C * *"* '* * P 3 5 2 0 1 4 0 C***** SPECIFICATIONS SEGMENT 352 P3520150

C***«* P0014350

C***** WHEN EXECUTING ONLY SEGMENT 352, THE SPECIFICATION STATEMENTS P0014355

CT*'*T« WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= PO 0 1 4360

Ct««*« IN COLUMNS 1 AND 2 REMOVED. P0014365

C*'*'**'* PO 0 1 43 70

C= DIMENSION G0T0(2, 2) , IF(5) "

. P0014375

DIMENSION G0T0(2.2), IF(5) ' P3 5 2A1

C***«* P0014380

C * * * *; 0 U T P UT f A P E ASS I GN MENT STATEME Nt '. NO I NPUT f APE ^ P3 5 2 0 1 60

C****« P0073410

C * kT*'* WHEN EXECUTING ONLY SEGMENT 3 52 , T H E F 0 L L OWING S T A T E M E N T P 0 0 7 3 4 1 5 C***«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0073420

C»**"*« P0073425

C= NUVI = 6 P0073430

NUVI = 6 P3 5 2 B1 C***** P0073435

NBS FORTRAN Test Programs Version 1 207
WRITE (NUVI,3520) P3520170

3 5 20 FORMAT (1H1 ,1X,13HNAMES - ( 3 5 2 ) / / 2X , 3 6HTE ST OF THE COMPILERS CAPAP35201 80

1BILITY OF /2X,37HIDENTIFYING DATA NAMES THAT RESEMBLE /2X. P3520 1 90

2 32HF0RTRAN VERBS AND/OR PREDEFINED / 2X , 1 5 H FUN CT I ON NAMES // P31 W 520200 ^ b V V V 3 22H ASA REFS . - 10.1 .7/4' //2X,7HRESULTS) P352021

0

c * * * * * HEADER FOR SEGMENT 352 WRITTEN P3 520220

INTEG = 0 P3520230

REAL = 2.0 P3520240

G0T05 = REAL - 2.0 P3520250

GOTO ( 1,2) = 10.0 - 5.0 * 2.0 P3520260

D013I = INTEG P3520270

1 3 DOUJ = INTEG +0 P3520280

1 4 IF(2) = 5-5 P3 520290

CALL = 0 P3520300

STOP? = REAL - 2.0 P3 5203 1 0 PAUSE = REAL / 2.0 - 1 .0 P3 520320

REA06 = 0.0 ** 5 P3520330

WRITE = 7.0 - 7.0 P3 520340

WRITE (NUVI, 3 5 2 1 ) G0T05, G0T0(1,2), 00131, DOUJ, IF(2). CALL, P3520350

1 STOP?, PAUSE, READ6, WRITE P3 520360

352 1 FORMAT ( / / 1 0 ( F1 0. 5/ ) ) P3 520370

C * * t

«

* TEST THAT THE SAME INTRINSIC FUNCTION NAMES OF P3520380

c * « «

* A PROGRAM UNIT OF AN EXECUTABLE PROGRAM CAN BE P3520390

c * « t

«

* USED TO IDENTIFY SOME OTHER ENTITY IN A DIFFERENT P3520400

c * * * * * PROGRAM UNIT OF THAT EXECUTABLE PROGRAM P352041

0

MCAVI : IABS(-5) P3520420

CALL MAQQ ( MCAVI , I VI

)

P3520430

MCCVI = IVI P3520440

MCBVI = ISIGN(1,-2) P3520450

CALL MBQQ ( MCBVI , I VI

)

P3520460

MCDVI = IVI P3520470

CMAVS = FL0AT(5 + 7) P3520480

CALL AMQ0( CMAVS, AVS) P3520490

CMCVS = AVS P3520500

CMBVS = ABS(-10.0 - 8. 00) P3 5 20 5 1 0 CALL BM0Q( CMBVS, AVS) P3520520

CMDVS = AVS P3520530

WRITE (NUVI,3522) MCCVI. MCOVI, CMCVS. CMDVS P3520540

3522 FORMAT ( / 2 ( I 1 0 / ) / / 2 ( F 1 0 . 5 / ) / / 3 5H ALL ABOVE ANSWERS SHOULD BE 0 FOP3 520 5 5 0 1R/36H THIS TEST S E G M E N T TO B E S U C CE SS F U L ) P3 52p56g

C**««« END OF TEST SEGMENT 352 P3520570

C«t.«« WHEN EXECUTING ONLY SEGMENT 352, THE STOP AND END CARDS P3520580

C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = P3 520590

C***** IN COLUMNS 1 AND 2 REMOVED. P3520600

C= STOP

C= END

P3520610

P3520620

STOP

END

P352C1

P352C2

Ct**t*****t >(** t*t****«***********t***«*

c * « * «

*********t***ttttt*t****ttt*P4130010

P4130020

C***** MAQQ - (413)

c « * * «

P4130030

P4130040

C******t**ttt*t«tttt*t**(*tt******«*t***ik***

C**«*« GENERAL PURPOSE

tt**ttttttttt*tt**t*tt*****tP4i30050

P4130060

C****» THIS SEGMENT CONTAINS A SUBROUTINE

C*««*« BY SEGMENT 352.

WHICH IS CALLED P4130070

P4130080

C*tt*t GENERAL COMMENTS

C«««»* SUBROUTINE MAQQ BEING DEFINED

P4130090

P4130100

SUBROUTINE MAQQ(MWVI , IWVI)

lABS = MWVI

P41301 10

P4130120

IWVI = lABS + ISIGN(MWVI. -HWVI)

RETURN

P4130130

P4130140

END

C***tt*t«t**(*t*tt**tt« tt** t***t« t** 

P41301 50

t******tt**t*****tttttt*tt*tP4630010

c « * « » t C*«*** MBQQ - (463)

P4630020

P4630030

c * « * «

C*«*«**«»l«*tSl>»4»*«»««t«*t*«»««»«»«*»»»****

P4630040

**««**«**t**«***t**«**t«***«P4630050

208 NBS FORTRAN Test Programs Version 1
C««t«« GENERAL PURPOSE

C***** THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS CALLED

C«***t BY SEGMENT 352

C*««*« GENERAL COMMENTS

t'*Ti,V* SUBROUTINE MBQO 'BEING DEFINED

P4630060

P4630070

P4630080

P4630090

P46 3 0 1 0 0

,S U B R 0 U T I N E M B Q Q,,(,M k V I , I W V I ) P 4 6 3 0 1 1 0 ISIGN = -MWVI

IWVI : ISIGN

RETURN

END

MWVI

P 4 6 3 0 1 2 0 P 4 6 3 0 1 3 0 P 4 6 3 0 U0

P46 3 0 1 5 0 Qt*tt**********t*tt**t*t*tttt*t***ttt*****tt*t**t**tt**ii***tii*tttttt*t**pi,J'iOQ]Q

C***** P4730020

C

*'*'*'** "

' AHQQ - ( 473 ) P4730030

C *.*,*. ** P4730040

C****************«***«******«****«*«***« «** **«*«****t**********t***«P4730050

C***** GENERAL PURPOSE

C*i*** THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS' CALLED

C*«*»« BY SEGMENT 352

C***** GENERAL COMMENTS

C*t*** SUBROUTINE AMQQ BEING DEFINED

C*** t tSTATEMENT FUNCTION NAME IS THE SAME AS' SUBROUtrNE NAME BY

P4730060

P4730070

P4730080

P4730090

P4730 1 00

P 4 73 0 1 1 0 C**«**SEGMENT 352, STAT. FUNCTION DUMMY ARGUMENT NAME SAME

cT**t*OUMMY ARGUMENT NAME, VARIABLE IS REFERENCED IN STAT.

SUBROUTINE AMQQCCWVS, AWVS)

BMQQ(CWVS) = CWVS + BVS

FLOAT = AVS

BVS : CWVS

AWVS = BMQQ(FLOAT) - (BVS + 1.0)

DATA AVS /I .0/

RETURN

END

AS SUBROUT I NEP4730 1 20

FUNCTION P4730130

P4730 1 40

P4730150

P4730 1 60

P4730170

P47301 80

P47301 90

P4730200

P4730210

Ct******t***********1t*****************«*<r***«;«*****»**4t*«;**4:*«***lt*«;***tP4330010

C *'*'*'*'* P483002 0 C ,* B M Q 0 - ( 483 ) P 4 8 3 0 0 3 0 C * «'*'*'* P4830040

C*******il>***<r*«**«**************«*««*****lt******«:**:ilr*******«**)r*****t«t<rP4330050

c * * « * * GENERAL PURPOSE P4830060

c * * * * * THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS CALLED P4830070

c « * « * * BY SEGMENT 352 P4830080

c * * * * * GENERAL COMMENTS P4830090

c « * « * * SUBROUTINE BMQO BEING DEFINED

SUBROUTINE BMOQ(CWVS, AWVS)

P48301 00

P4 8 3 0 1 1 0 ABS = CWVS P 4 8 3 0 1 2 0 AWVS = FLOAT( IS1GN( IFIX(ABS) , - 2)) + 18.0 P4830130

RETURN P4830 1 40

c * « * * * END OF TEST SEGMENT 483 P4 8 3 0 1 5 0 END P4830160

* * t * 1 1

1

****P3600010

c * * * * * P3600020

c * « * «SPEC2 - (360) P3600030

c * * * P3600040

c * * * * * * * 1 1 1 1 * * » * »P360 0 0 5 0

c * * * «

GENERAL PURPOSE ASA REFS P3600060

c * * * * * * TO TEST COMMON, DIMENSION AND EQUIVALENCE 7 . 2 . 1 . 2P3 60 0 0 70

c * * * * * STATEMENTS 7.2 . 1 . 3 P 3 6 0 0 0 8 0

C * 1 1 * * * TO TEST THAT VARIABLES AND ARRAYS WHICH ARE 7 . 2 . 1 . 4P3600090

c * * * * * EQUATED AND/OR IN COMMON MAY BE USED IN A P 3 6 0 0 1 0 0

c * * * t * VARIETY OF FORTRAN STATEMENTS P3 6 0 0 1 1 0

C * * * * <r RESTRICTIONS OBSERVED P36001 20

c * * * * * * NO DUMMY ARGUMENTS APPEAR IN COMMON OR EQUIVALENCE 7 .2.1. 4/40P36001 30

c * * * «STATEMENTS 8 .4.1. 1 /23P3 6 0 0 1 4 0 c * * * *

«

* NUMBER OF SUBSCRIPTS IN EQUIVALENCE STATEMENTS P36001 50

c * « * * CORRESPONDS TO ARRAY DIMENSIONALITY OR IS ONE 7 .2.1. 4/09P360016 0 c * * * * * * COMMON NEVER LENGTHENED BY EQUIVALENCE IN A 7 .2.1. 4/31 P3 6 0 0 1 7 0

c * * * * BACKWARD DIRECTION P 3 6 0 0 1 8 0 c * « * «

«

» ONLY ONE OF AN EQUATED PAIR OF ITEMS APPEARS 7 .2.1. 4/36P3600190

c « * * t * IN COMMON P3600200

c * t * *

«

* VARIABLES ARE NEVER EQUATED TO MORE THAN ONE 7 .2.1 . 4/42P3 6 0 0 2 1 0

NBS FORTRAN Test Programs Version 1 209
C****« ELEMENT OF THE SAME ARRAY P3600220

C***** GENERAL COMMENTS P3600230

C * * * • * THIS SEGMENT FOLLOWS THE 0 R D E R 0 F g p g , p j ^.^.^.....^ .^..^..^..^..^ p 36 002 40

C***tt REQUIRED IN BASIC FORTRAN (SEE 9.1.2/56 IN BASIC ASA BOOK) P3600250

c «

c * * * ** SPECIFICATIONS SEGMENT 360

P3600260

P3600270

c * * * c * * *

* * ** WHEN EXECUTING ONLY SEGMENT 360. THE SPECIFICATION STATEMENTS

POO 1 4390

POOl 4395

C****» WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= C*«**t IN COLUMNS 1 AND 2 REMOVED.

P 0 0 1 4 4 0 0 POOl 440 5 c * * * * * C= DIMENSION MX1 1(3), TX1S(3)

P 0 0 1 4 4 1 0 POOl 441

5

Cc= DlnhNSIuN nXdlKZ.i), TXZS(Z,Z), WAZZS(3,Z), RVY1S(2). RVY2S(1

DIMENSION JY2I(2,2), JY1I(5), NZ1I(4), NZ2I(4,2), WAZ1S(2)

, 2

)

POO 1 4420

POOl 4425

C-c= DIMENSION MMY1 I (400) ,NNY3I (ZO. 10, Z)

EQUIVALENCE (MMY1I(1),NNY3I(1,1,1)).(NZ1I(1),NNY3I(1))

nAAil t f^A

P 0 0 1 4 43 0 POOl 4435

Lc=

cnuunhi MX/IT u\yOT iitit fci^vyf uttt COMMON nXII, MXZl. NZII. NZVI, NZZI

COMMON MXVI

POO 1 4440

POOl 4445

r _

L - c=

rnMMHM TAV\/T LUMnUN lAXVl

COMMON WAZ1S

POOl 44 5 0 POOl 44 5 5 n _

L -

c = PHMMnM TV1C TV^C ID7\/T IIA7^P LUnnON TX1S. TXZS, JBZVI, WAZZS

EQUIVALENCE (MYVI.NZVI). ( I Y V I , N Z 1 I ( 1 ) ) , (NZ2I(4,1), JYVI)

POO 1 4460

POOl 4465

L -

c = bUUlVALtiMUt ( N i. c i \ i ) , KIWI), (.AAYvd.JdZVI.JYZICI). KVYlb(Z))

EQUIVALENCE (RVY2S(1,1),WAZ1S(2))

POOl 4470

POOl 44 7 5 r -

L - c=

cniiT\/Ai CM rc ^iviT^7^ D\/v1c/'7^^

EQUIVALENCE ( WAZZS ( 1 ), BBYVS , C CYVS ) , ( WAZZS ( 2 , 1 ) , DDYVS

)

rvAA"! / 1 OA POO 1 448 0 POOl 4485

DIMENSION MX2I(2,3). TX2S(2,2), WAZ2S(3,2). RVY1S(2), RVY2S(1 ,2)

P360A1

P360A2

UlntNolUN J 1 C I \ c , c ) , J 1 \ I \ J ) , n i, \ I ( H ) , vii.CiK'iiC), WAZlbvZJ

DIMENSION MMY1 I (400) ,NNY3I (20, 10,2)

P360A3

P360A4

EQUIVALENCE (MMY1I(1),NNY3I(1,1.1)),(NZ1I(1),NNY3I(1))

COMMON MX1I, MX2I. NZII, NZVI. NZZI

P360A5

P360A6

COMMON MXVI

COMMON lAXVI

n 7 i A A 7 P360A7

P360A8

COMMON WAZ1S

COMMON TX1S. TXZS, JBZVI, WAZZS

P 5 6 0 AV

P360AA

EQUIVALENCE (MYVI.NZVI), ( I YV I

, NZ 1 I ( 1) ) . (NZ2I(4.1), JYVI)

EQUIVALENCE (NZZI(3), KYVI), ( AAY VS , J BZV I , J Y2 I ( 1 ) , RVY1S(2))

P 3 6 0 AB

P360AC

EQUIVALENCE ( RV Y 2 S ( 1 , 1 ) , WAZ 1 S ( 2 )

)

EQUIVALENCE ( J Y 1 I ( 3 ), RVY 1 S ( 2 )

)

P360AD

P360AE

c***

EQUIVALENCE ( WAZZS ( 1 ), BBYVS , CCYVS ) . ( WAZZS ( 2 , 1 ), DDYVS

)

* * P360AF

P3600280

C***** SOME OF THE ITEMS DEFINED ABOVE ARE USED IN A VARIETY

C * t * * * P3600290P3600300

c * * * c * * * ** OF FORTRAN STATEMENTS

** SEGMENT

P3600310

P3600320

c * * * c « * * ** DEFINE THE SYMBOLIC OUTPUT UNIT FOR USE IN THIS 7.1

** OUTPUT-TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

.3/22P3600330

P3600340

C t * * * t Ct*«*t WHEN EXECUTING ONLY SEGMENT 360. THE FOLLOWING STATEMENT

P3600350

P0073440

c * * * c « * * ** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

* * P0073445

P0073450

c= NUVI = 6 NUVI = 6 P0073455

P360B1

c * * * »

JY2I (

1

, 1 ) = NUVI

P0073460

P3600360

C****» WRITE HEADER FOR THIS SEGMENT

WRITE (JBZVI,3600)

P3600370

P3600380

3600 FORMAT (1H1, 1X.36HSPEC2 - (360) COMMON AND EQUIVALENCE//

1 2X,36HASA REFS - 7.2.1.2 7.2.1.3 7.2.1.4// 2X , 7HRESULTS

)

P3600390

P3600400

C * * * c * * *

* * ** TEST THAT EQUIVALENCE WORKS - ASSOCIATED ITEM OF 10.2

P360041

0

.2/51P3600420

C**«** SAME TYPE BECOMES DEFINED WHEN EQUATED ITEM IS C**t** DEFINED

P3600430

P3600440

MYVI = 2 WAZ1S(2) = 2.0

P3600450

P3600460

360 1 WRITE (JBZVI, 3601) NZVI, RVY2S(1,1)F0RMAT(//27H LINE 1 BELOW IS HOLLERITH

P3600470

P3600480

210 NBS FORTRAN Test Programs Version 1
1 C « t « *

«

USE

// 11H 2 2.0/I6.F5.1 ) DEFINED ITEMS IN ARITHMETIC STATEMENTS

JYVI = 4 MXVI = 5 NZVI = 3 JY1 I ( 1 ) = MXIKZ) = NZ1 1(4) = JY2I (2 . 1 ) MX2I (1 ,3)

NZ2I (3

MX1 I (3)

MX2 I ( 1 MX1 I ( 1 ) lAXVI = NZ2 I ( 1 BBYVS = TX1S(3)

kAZ2S( 1

2)

= MX2I ( 1 ,3)

MX1 I( 2 ) NZ1 I( 4

(NZVI - JY1 I ( 1 ) ) - 18

1 ) = MX2 I ( 1 , 3 ) * (MYVI - JY1 I ( 1 ) ) - 18

= JYVI + JY2I (2. 1) + NZVI - MX1 I (2)

NZ2I (4,1) + JY1 I (4) + MYVI

1 ) - MXVI ** NZ1 I (4) - MXVI

2.0

= 1 . 0E1

2) = -3.0E00

RVYISd) = .04E + 2 DDYVS = RVYISd) ** ( WAZ2 S ( 1 , 2) - 5 . WAZ2S(2,1) = TX2S(2,2)**(WAZ2S(1 ,2)-5.0+TX1S(3

WRITE (JBZVI,3602 ) MX1I(3), MXlId), NZZId.l)

WRITE( JBZVI , 736 7 ) MX2Id,1), lAXVI , NZ2Id

JY1 I d ) J Y 1 I (1 )

0+TX1S(3)) -13

) )

0 + WAZ2S ( 1,2)

1 3 . 0 + WAZ2S ( 1,2)

DDYVS

1 ) , WAZ2S ( 2,1)

P3600490

1 . 1 . 1 P3 60 0 5 0 0 P360051

0

P3600520

P3600530

P3600540

P3600550

P3600560

P3600570

P36C0580

P3600590

P3600600

P3600610

P3600620

P3600630

P3600640

P3600650

P3600660

P3600670

P3600680

P3600690

P3600700

P 3 6 0 0 7 1 0 P3600720

3602 FORMAT (//34H ANSWERS BELOW SHOULD BE 0 OR 0.0// P3600730

1 3(16/) , F8.1) P3600740

c * * * *

«

USE ITEMS IN ARITHMETIC IF STATEMENTS 7.1.2 . 2P3 6 0 0 7 5 0 IF (WAZ2S(1,2)) 3603,3604,3604 P3600760

3603 IF (MX1 I ( 2 ) ) 360 4,360 5,360 4 P3600770

3605 IF (TX2S(2.2) + CCYVS ** NZ1I(4) + TX1S(3)) 3604, 3604,, 3606 P3600780

3604 WRITE (JBZVI, 3607) P3600790

3607 FORMAT (//22H ARITHMETIC IF FAILED) P3600800

GO TO 3609 P 3 6 0 0 8 1 0 3606 WRITE (JBZVI, 3608) P3600820

3608 FORMAT (//26H ARITHMETIC IF SUCCESSFUL) P3600830

C * * t «

t

USE ITEMS IN DO LOOP 7.1.2 . 8P3 6 0 0 8 4 0 3609 DO 7360 JYVI = 1 , NZVI , 1 P3600850

TX1S(3) = TX1S(3) + 1 .0 P3600860

7360 CONTINUE P3600870

WRITE (JBZVI, 7361) TX1S(3) P3600880

7361 FORMAT (//29H ANSWER BELOW SHOULD BE 13.0// F8.1) P3600890

c * * * * * USE ITEM IN COMPUTED GO TO 7.1.2.1 . 3P3 6 0 0 9 0 0 GO TO ( 7362 . 7362 , 736 4 ), NZVI P3 6 0 09 1 0 7362 WRITE (JBZVI, 7363) P3600920

7363 FORMAT (//23H COMPUTED GO TO FAILED) P3600930

GO TO 7366 P3600940

7364 WRITE (JBZVI, 7365) P3600950

7365 FORMAT (//27H COMPUTED GO TO SUCCESSFUL) P3600960

7367 FORMAT (3(16/). F8. 1 ) P3600970

7366 CONTI NUE P3600980

c * * * * * TEST EQUIVALENCE EXTENDS COMMON P3600990

c » « « * * ARRAYS- NNY3I (20, 10,2) EQUIVALENCED TO ARRAY MMY1I(400) WHICH I SP3 6 0 1 0 0 0 c * « * *

«

EOUIVALENCED TO THE 10TH STORAGE LOCATION IN BLANK 7.2.1 .4/29P3 6 0 1 0 1 0 C * 1 1 «

«

COMMON ( NZ 1 I (1 ) ) P36 0 1 02 0 WRITE (NUVI, 8366) P36 0 1 03 0 8366 FORMAT (34H0 TEST EQUIVALENCE EXTENDS COMMON ) P3601 040

DO 7368 IVI : 1 , 400 P36 0 1 0 5 0 7368 MMY1 I ( IVI ) : IVI P3601 060

IVI = 0 P3601 070

DO 7369 LVI = 1 . 2 P3601 080

DO 7369 KVI = 1 , 10 P3601 090

DO 7369 JVI = 1, 20 P3 60 1 1 0 0

I F(NNY3 I ( JVI . KVI . LVI )-( JVI +20* (KVI +1 0*LVI) - 220))7369,,8360 , 73 6 9 P360 1 1 1 0 8360 IVI = IVI + 1 P3601 1 20

7369 CONTINUE P360 1 1 30

IF (IVi - 400) 8363, 8361, 8363 P360 1 1 40

8363 WRITE (NUVI, 8364) P3 60 1 1 5 0 8364 F0RMAT(13H0 TEST FAILED ) P3601 160

NBS FORTRAN Test Programs Version 1 211
S361

8362

8365

GO TO 8365

WRITE (NUVl, 8362)

FORMAt(

1

7H6 test SUCCESSFUL

CONTINUE

END OF TEST SE(3MENt 360

' WHEN EXECUTING ONLY SEGMENT 360, THE STOP

< WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

- IN COLUMNS 1 AND 2 REMOVED.

STOP 77777

END

P3601170

P3601 180

P3601 190

P3601200

)

AND

C = END CARDS

P3601210

P3601220

P3601236

P3601240

P3601250

P3601260

P360C1

P360C2

STOP 77777

END

212 NBS FORTRAN Test Programs Version 1

1
NBS-l 14A (REV. 7-73)

U.S. DEPT. OF COMM. ]. p U lU. IC A TION OR RI:P0R'T no. 2. Gov't Acces.sion BIBLIOGRAPHIC DATA No. SHEET NBS-SP- 3 99 Vol. 2

3. Recipient's Accession No.

4. TITLE AND SUBTITLE

NBS FORTRAN TEST PROGRAMS

5. Publication Date October 1974

6. Performing Organization Code

7. AUTHOR(S)

Frances E. Holberton Elizabeth G. Parker

8. Performing Organ. Report No.

9. PERFORMING ORGANIZATION NAME AND ADDRESS

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

10. Project/Task/Work Unit No. 640112 3

11. Contract/Grant No.

12. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP)

Same as 9

Library of Congress Catalog Card Number: 74-12314

13. Type of Report & Period

Covered

Final

14. Sponsoring Agency Code

15. SUPPLEMENTARY NOTES

Volumes 1, 2, and 3 contain the documentation, Version 1 program

listing, Version 3 program listing, respectively. The magnetic tape containing the NBS

rUI\ll\rllN| ±fcio L r Ivjg,! dJltD -Lo clVa.XJ.clJJ_Lfc; JUl /~Llci(_.Jv D^-^JJ, l3~LXd.CJ\. r\0*..^-LX (Jl LiD'^U±'^ ItJCUx U-Li • 16. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here.)

,The NBS FORTRAN test programs, written in Standard FORTRAN, are designed to test whether

a FORTRAN coirpiler accepts the forms and interpretations of the FORTRAN language as described in the American National Standard FORTRAN document X3. 9-19 66. The test programs,

comprised of 116 test units, are structured into two versions, each containing approximately m,500 punch card inages. The test units may be used as separate executable

FORTRAN programs, or may be linked end to end with other test units, with a minimum of

user effort, to improve operating efficiency. Version 1 is structured into 116 executable FORTRAN programs, and Version 3, containing the same 116 test units, is structured

into 14 executable FORTRAN programs for use on large FORTRAN processors.

The test program design criteria was to:

. Constrain all test programs to the FORTRAN Standard X3. 9-19 56.

Reduce the effect of those areas in which the FORTRAN Standard does not prescribe

a method or solution, e.g., range, precision, size of computer, etc.

. Sinplify the use of the F0RTRAI4 test programs.

Test FORTRAN language elements before they are used in support of other tests.

. l^bintain an open ended system so that tests may be changed or added.

The test programs require the use of a card reader, printer and one intermediate tape

unit.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper name; separated by semicolons

)

Computer Programming language; FORTRAl^J; FORTRAfvI validation; language validation;

standard FORTRAinI; test program design.

18. AVAILABILITY [^Unlimited

1

' For Official Distribution. Do Not Release to NTIS

Ix ' Order From Sup. of Doc, U.S. Government P/kiti^fi, Qf/ic^

Washington. D.C. 20402. SD Cat. No. C13 1U:3VV ' V. Z

1 ! Order From National Technical Information Service (NTIS)

Springfield, Virginia 22151

19. SECURITY CLASS

(THIS REPORT)

UNCL ASSIFIED

21. NO. OF PAGES

221

20. SECURITY CLASS

(THIS PAGE)

UNCLASSIFIED

22. Price

$2.85

USCOMM-DC 29042-P74

U.S. GOVERNMENT PRINTING OFFICE: 1974— 583-013;22



NBS TECHNICAL PUBLICATIONS

PERIODICALS JOURNAL OF RESEARCH reports National Bureau

of Standards research and development in physics,

mathematics, and chemistry. Comprehensive scientific papers pive complete details of the work, including

laboratory data, experimental procedures, and theoretical and mathematical analyses. Illustrated with photographs, drawings, and charts. Includes listings of other NBS papers as issued. Published in two sections, available separately:

• Physics and Chemistry (Section A)

Papers of interest primarily to scientists working in these fields. This section covers a broad range of physical and chemical research, with major emphasis on standards of physical measurement, fundamental constants, and properties of matter. Issued six times a

year. Annual subscription: Domestic, $17.00; Foreign,

$21.25. • iVIathematical Sciences (Section B)

Studies and compilations designed mainly for the mathematician and theoretical physicist. Topics in mathematical statistics, theory of experiment design, numerical analysis, theoretical physics and chemistry, logical design and programming of computers and computer

systems. Short numerical tables. Issued quarterly. Annual subscription: Domestic, $9.00; Foreign, $11.25. DIMENSIONS/NBS (formerly Technical News Bulletin) —This monthly magazine is published to inform

scientists, engineers, businessmen, industry, teachers,

students, and consumers of the latest advances in science and technology, with primary emphasis on the work at NBS. DIMENSIONS/NBS highlights and reviews such

issues as energy research, fire protection, building

technology, metric conversion, pollution abatement,

health and safety, and consumer product performance.

In addition, DIMENSIONS/NBS reports the results of Bureau programs in measurement standards and techniques, properties of matter and materials, engineering standards and services, instrumentation, and automatic

data processing. Annual subscription: Domestic. $6.50; Foreign, $8.25.

NONPERIODICALS Monographs—Major contributions to the technical liter- ature on various subjects related to the Bureau's scientific and technical activities. Handbooks—Recommended codes of engineering and

industrial practice (including safety codes) developed

in cooperation with interested industries, professional

organizations, and regulatory bodies. Special Publications—Include proceedings of high-level national and international conferences sponsored by

NBS, precision measurement and calibration volumes,

NBS annual reports, and other special publications

appropriate to this grouping such as wall charts and

bibliographies.

Applied Mathematics Series—Mathematical tables, manuals, and studies of special interest to physicists, engineers, chemists, biologists, mathematicians, computer programmers, and others engaged in scientific and technical work.

National Standard Reference Data Series—Provides

quantitative data on the physical and chemical properties of materials, compiled from the world's literature and critically evaluated. Developed under a world-wide program coordinated by NBS. Program under authority

of National Standard Data Act (Public Law 90-396). See also Section ].2.,3. Building Science Series—Disseminates technical infor- mation developed at the Bureau on building materials, components, systems, and whole structures. The series presents research results, test methods, and performance criteria related to the structural and environmental functions and the durability and safety characteristics of building elements and systems. Technical Notes—Studies or reports which are complete

in themselves but restrictive in their treatment of a

subject. Analogous to monographs but not so comprehensive in scope or definitive in treatment of the subject area. Often serve as a vehicle for final reports of work performed at NBS under the sponsorship of other government agencies.

Voluntary Product Standards—Developed under pro- cedures published by the Department of Commerce in Part 10, Title 15, of the Code of Federal Regulations. The purpose of the standards is to establish nationally

recognized requirements for products, and to provide

all concerned interests with a basis for common under- standing of the characteristics of the products. The

National Bureau of Standards administers the Voluntary Product Standards program as a supplement to the activities of the private sector standardizing

organizations. Federal Information Processing Standards Publications (FIPS PUBS) —Publications in this series collectively constitute the Federal Information Pi-ocessing Standards Register. The purpose of the Register is to serve

as the official source of information in the Federal Gov- ernment regarding standards issued by NBS pursuant

to the Federal Property and Administrative Services Act of 1949 as amended. Public Law 89-.306 (79 Stat. 1127), and as implemented by Executive Order 11717

(38 FR 12315, dated May 11, 1973) and Part 6 of Title 15 CFR (Code of Federal Regulations). FIPS PUBS

will include approved Federal information processing standards information of general interest, and a complete index of relevant standards publications. Consumer Information Series—Practical information, based on NBS research and experience, covering areas

of interest to the consumer. Easily understandable language and illustrations provide useful background

knowledge for shopping in today's technological

marketplace.

NBS Interagency Reports—A special series of interim

or final reports on work performed by NBS for outside sponsors (both government and non-government). In

general, initial distribution is handled by the sponsor;

public distribution is by the National Technical Infor- mation Service (Springfield, Va. 22151) in paper copy

or microfiche form. Order NBS publications (except Bibliographic Subscription Services) from: Superintendent of Documents, Government Printing OflSce, Washington, D.C. 20402. BIBLIOGRAPHIC SUBSCRIPTION SERVICES

The following' current-awareness and literature-survey

bibliographies are issued periodically by the Bureau:

Cryogenic Data Center Current Awareness Service

(Publications and Reports of Interest in Cryogenics).

A literature survey issued weekly. Annual subscription: Domestic, $20.00; foreign, $25.00. Liquefied Natural Gas. A literature survey issued quarterly. Annual subscription: $20.00. Superconducting Devices and Materials. A literature survey issued quarterly. Annual subscription: $20.00. Send subscription orders and remittances for the preceding bibliographic services to the U.S. Department

of Commerce, National Technical Information Service, Springfield, Va. 22151. Electromagnetic Metrology Current Awareness Service (Abstracts of Selected Articles on Measurement

Techniques and Standards of Electromagnetic Quantities from D-C to Millimeter-Wave Frequencies).

Issued monthly. Annual subscription: $100.00 (Special rates for multi-subscriptions). Send subscription order and remittance to the Electromagnetic Metrol- ogy Information Center, Electromagnetics Division, National Bureau of Standards, Boulder, Colo. 80302.
U.S. DEPARTMENT OF COMMERCE

IMational Bureau of Standards

Washington, D C. 2Q234

OFFICIAL BUSINESS

Penalty for Private Use. $300

POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE COM-2 1 5 U.S.MAIL

'•^^6-191^


'1