z NBS SPECIAL PUBLICATION 399

Volume 2

loo

.U57

v/. 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 2 — Applied Radiation a — Quantum Electronics " — Electromagnetics 3 — Time

and Frequency 3 — 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 4 — Building

Environment 4 — Technical Evaluation and Application 4 — 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, Maryland, unless otherwise noted; mailing address Washington, D.C. 20234.

2 Part of the Center for Radiation Research.

;l Located at Boulder, Colorado 80302.

4 Part of the Center for Building Technology.
auonat Bureau of Standards

OV 1 1974

hot ace.

©C

1

00

U5t 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, Secretary

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. II. United States. National Bureau of Standards. III. Title. IV. Series: United States. National Bureau of Standards. Special Publication

399.

OC100.U57 no. 399 [QA76.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 $2.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 document 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 programs 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 program 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 6

6 Identification Cards and 40 Data Cards 13

009 AFRMT A-Conversion 14

3 Data Cards 16

010 DATA2 DATA Statement Use 16

003 -- DATA1 Test Format of Data Statement 16

011 - AASGN Real and Integer Arith Assignmt Stmnts 18

013 — DASGN Simple D.P. Assignment Statements 22

015 — CASGN Simple Complex Assignment Statements 28

016 - LASGN Logical Assignment Statements 35

017 - INTRL Arithmetic Assignment Statements 37

020 — UGOTO Unconditional GO TO Statements 39

021 - AGOTO GO TO Assignment Statements 40

022 - CGOTO Computed GO TO Statements 43

030 - ARBAD Basic Addition 45

031 - ARFAD Double Precision Addition 46

032 - ARBSB Basic Subtraction 47

033 - ARFSB Double Precision Subtraction 48

034 - ARBAS Basic Addition and Subtraction 49

035 - ARFAS Addition and Subtraction of D.P. Values 50

036 - ARBMI Multiplication of Integer Values 51

037 - ARBMR Multiplication of Real Values 52

038 - ARFMD Multiplication of D.P. Values 53

039 - ARBDV Division of Integer and Real Values 54

040 - ARFDV Division of D.P. Values 55

041 - ARBEX Exponentiation of Integer and Real Values 56

042 - 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

051 - SBB45 Subscripts of Int., Real Arrays v+k, v-k 63

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

c*v-k 64

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, IABS 68

056 IFFLT Intrinsic Function FLOAT 69

057 IFFIX Intrinsic Function IFIX 69

058 IFSGN Intrinsic Functions SIGN, ISIGN 70

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, AMAX1, MAX0, MAX1, DMAX1 75

063 IFMIN Intr Funct AMINO, AMIN1, MIN0, MINI, DMIN1 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

068 -

069 - 070 - 071 -

072 - 073 - 080 - 081 - 082 - 083 - 084 -

085 -

086 - 087 - 088 - 089 - 090 - 091 - 092 - 094 - 095 - 096 - 097 - 098 - 099 - 100 - 101-

102 - 103 - 110 - 005

111 - 006

140 - 141 - 142 - 143 - 144 - 145 - 146 - 147 -

148 - 149 - 150 - 160 -

400 -

420 -

430 -

440 - 450 - 460 -

IFIMG

IFDBL

IFCPX

IFCJG

IFBMS

IFFMS

EXPON

DEXPO

CEXPO

LOGTM

DPLOG

CXLOG

COLOG

DCLOG

SINUS

DP SIN

CSICO

COSNS

DP COS

TANGH

SQROT

DSQRO

CSQRO

ARCTG

DACTG

ACTG2

DATN2

DMODA

CABSA

BSFTS

- BSFDF

FSFTS

- FSFDF

CPXAD

CPXMU

CPXDV

CPXEX

CPXOP

CREAD

CREMU

CREDV

CREOP

MISC3

MISC4

BRFCP

AFS

BFS

CFS

DFS

EFS

FFS

Intrinsic Function AIMAG

Intrinsic Function DBLE

Intrinsic Function CMPLX

Intrinsic Function CONJG

Integer and Real Intrinsic Functions

Int, Real and D.P. Intrinsic Functions

Basic External Function EXP

Basic External Function DEXP

Basic External Function CEXP

Basic External Function ALOG

Basic External Function DLOG

Basic External Function CLOG

Basic External Function ALOG10

Basic External Function DLOG10

Basic External Function SIN

Basic External Function DSIN

Basic External Functions CSIN, CCOS

Basic External Function COS

Basic External Function DCOS

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 - Integer and Real

Statement Function Definition

Statement Funct - D.P., Complex, Logical

Statement Function Definitions

Addition and Subtraction of Complex

Multiplication of Complex Numbers

Division of Complex Numbers

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

Real Argument

Real Arguments

Integer Argument

Integer Arguments

Array Name As Argument

Different Types of Arguments

Page

87

89

90

90

91

93

96

97

98

99

100

101

103

104

104

106

107

108

109

110

111

112

113

114

115

116

117

118

118

120

120

121

122

124

125

127

128

130

131

132

133

134

135

136

138

139

139

139

139

139

140

v
Listings of NBS FORTRAN Test Programs, Version 1

Table of Contents

Page

161 - BIFCP Integer External Functions 140

401 - IAFI Real Argument 141

421 - IBFI Real Arguments 141

431 — ICFI Integer Argument 141

441 — IDFI Integer Arguments 141

451 — IEFI Array Name as Argument 142

461 — IFFI Different Types of Arguments 142

162 — FRFCP Real External Functions 142

402 — GFS D.P. Argument 144

422 — HFS Complex Arguments 144

432 — IRFS Logical Argument 144

442 — JRFS External Procedure 145

452 - RFS Different Types of Arguments 145

163 - FIFCP Integer External Functions 145

403 — IFI D.P. Argument 147

423 — JFI Complex Arguments 147

433 — KFI Logical Argument 147

443 — LFI External Procedure 148

453 — MFI Different Types of Arguments 148

164 — CFCCP Complex External Functions 148

404 — AFC Real Argument 150

414 — BFC Integer Argument 150

424 - CFC Array Name as Argument 150

434 — DFC D.P. Argument 151

444 — EFC Complex Argument 151

454 — FFC Logical Argument 151

464 — HFC Different Types of Arguments 151

165 — DPFCP Double Precision External Functions 152

405 - AFD Real Argument 153

415 — BFD Integer Argument 154

425 — CFD D.P. Arguments 154

435 — DFD Complex Argument 154

445 — EFD Logical Argument 154

455 — FFD External Procedure 154

465 — GFD Array Name as Argument 155

475 — HFD Different Types of Arguments 155

166 — BFCCP Logical External Functions 155

406 — AFB Real Argument 157

416 — BFB Integer Argument 157

426 — CFB D.P. Argument 158

436 DFB Logical Argument 158

446 — EFB Complex Argument 158

456 — FFB Array Name as Argument 158

466 — GFB External Procedure 158

476 — HFB Different Types of Arguments 158

167 — SBRTN Subroutine Subprogram 159

407 — AAQ Integer, Real Variables, Array Elements 160

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

ID? 1 AQ RT vnT RTDTV O LAJ UK DATA L/rilri Tpoh leal 1UJ 1 fiS

AO.Q oLi\JtsU RT OPT? RATA QiiKnrAoram -LOO

1 7Q RT TfTJA 1 fifi 41417Q RT AKT) RT nPTf DATA ^nKnrnorain 1UU 1 fift 4?9 RTX/Xj RKD XJi\_L/ RT OfK DATA Siihn-rnwraTTi 168

439 BLCKD BLOCK DATA Subnroeram 168

180 UNFRW Unformatted WRITE and READ 168

182 BACUP BACKSPACE TaDe 170

190 DOTRM* X/W X X\l 1. T)0 X/W T.nnn XjWWL/O^ — Tptth"! XC1 lUXllaX1 SJLaLClUClltO 1~ t" pmpn t*€? 171 X / X, 191 J—' X DOLMT L/ Wlxl XX TlO WW T.or»nQ JjUU — Pa ramp fprc qg V^ti aih1 p N^ttipc: L> O X CI X dXLLC L.C- X O Cx O V CXX XCIL/XC- L\ CxlU\_- O 173 X. / ~J 192 X> ./ X. DONST WWliuU DO LnnnQ — rniri'n 1 p

f

U\J iJUUpD WWL1IU 1C LCIp 1 v NpQfpH IN Np q. t~ C. LCU 11CO U X.174/ *T 193 uyjn o x HOJ-/W Tiiuupo nntiQ — Tr»r»r»ni-n1 x. liwunip xt-pf-p l t- DOww *> Fyi Hi ax f-l. Kvuy COWW TOi w X1 77/ / 194 DONSX noXJ\J Loon XJ WW L/ Oq — ExIjA 1~PTidpH L LIU V- VX Rati LYGll 1 Kppv 178

195 DONML J-/ Will xXj nOx/w Tuuupo .nnn c? — Npq1"pH liCO LCU Npcf liCO L 180 X, w w 196 D0NI0 DOU\J Loods XJ WW yJ O — I/O X / v-* Terminal X. <— X. 1U L HCIX Statements i—' l_ CX L CllxdX L O 181

197 MORDO X iw l\X/ w DOu\j T.or»n<? ijuu lj a — T/0 j. / w ^fal-mf Ft- Tnfr PAT T , OL.ciL.iui.* r L. . y 111 li f l. • , w^vlixj X W x_ 005 -- BSFDF Statement Functions 182

412 X XL/

W

SllTi W LIU Tfi11 1UULt" X.i TIP HC. ^1W Lill*>Ti L/ U IT* lUgiOT"^iTI dill 184

200 STTRTH l> U JJJX-L Qw lLIU iV> Y*/~iiit""i LUULXilC no — liTiPTaf UpciaLlUUo "I nTiC Tinnp LfD o +~ Qnl-\ T pirpl LLC d L O Ll U bcVcl i as

410 L»U XilVW ^nliTTMi O LIU 1UUt"i nP QiiKn TnoTaTn — Mo A t* ry T i o t" L XuC O U.U U LUgL cllll IN W r\ L g, o LlbL XLJ i as_/ 300 T OflTF TLUntrCjlLul "1 pal TT7 11 QJ

+-LdLclUt-il »a f- ompn i~Loc X187w / 411 Lll IWV^ Q i iV\ vnii t"i tip ^unn Tn C7T* ^jm 171 1 91

301 BARIF XXAtX "IX, i"iiTTiPi" L. IxlXlC ' "1L r'— TT? XX St" u LC1LC a Fpttipti LUC HLOt<^ — TnfpppT* lULCgul j Rpfll lVCCL X. 191 J ' x 302 x ni\l x aX X L.11111C Liu XX O L. d L t-lllt. ll Lb u • x » 1 9A

310 IOFMT Formatfpd X W X 1LLCL L LCU REAn/WPTTE xLXJxxX/ / V» XvX X XJ — ixUUX Addi t*L iX otiaI Wi- 1 Cx X FpAftiTpc; X Ca LU1CO 195

JO 1/a La Wcx X Lio Z. w w 312 X\U £ 11 X rUIUldLo XII rxxTxciyo x.ww ?00

462 FMTO X X XX w QiiV\"r"01lt""T JUUIUUL1nPllC ^llnTi O LIU T*iit7T*a]Tn p LU KL CxlLl j_ V..' XJ UaLa Wcx X. Ub x-L/H 350 1 IX. J ^TiPPi f i pafi one -f- OpcLll ILdL lUllo XWX/-a Pfna rtUgLTain cxLll "Pottti r W X 111 x. WH

351 ruin xa. DctblL Hj A. LCI llctX r UULLlULlo IL Ig r W X lULLXctC Z.UU

352 NAMES 1- J XXX ' ' 11 * Names Resemble FORTRvVN VeTbs 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

Ct*tt*t*t*t»t*tt******t**t*t***»»*t**tt*t«*t*t**tt*»tt*ttt*ttt*tttt*t*ttP0000010

C« P0000020

Ct ANSI FORTRAN <X3 . 9-1 966 ) TEST PROGRAMS POO 00 030

C* P0000040

C* PREPARED BY THE NATIONAL BUREAU OF STANDARDS VERSION 1 P00000 50

C* P0000060

C* JUNE 1974 P 6 0 0 0 0 7 0 C* , P0000080

C* 116 EXECUTABLE TEST PROGRAMS POO 00090

C* P0000100

C't THE FOLLOWING NAMES AND SYMBOLS SHOULD AGREE P 0 0 0 0 1 1 0 C* P0000120

C* EQUAL = PLUS LEFT PARENTHESIS ( R IGHT PARE NTHES I S ) P0000130

C* POOOOUO

C* CODES USED TO DESCRIBE THE INFORMATION IN THE TABLE P0 0 00 1 5 0 C* POOOOUO

C* M" MAIN PROGRAM P0000170

C* F EXTERNAL FUNCTION POOOOUO

C't S SUBROUTINE P 0 0 0 0 1 9 6 C* B BLOCK DATA P0000200

ft P 0 0 0 0 2 1 0 Ct I INPUT REQUIRED P0000220

C* P 0 0 0 0 2 3 0 C* NO. OF PAGES OF OUTPUT P0000240

C"t P00002 5 0 C* X INTERMEDIATE TAPE REQUIRED P0000260

C* P0000270

C* C BLANK COMMON P0000280

ft / SPECIAL BLANK COMMON P0000290

C* P0000300

ft D DATA STATEMENTS DEFINED P00003 1 0 C* P0000320

ft NO. OF CARDS PER SEGMENT P0000330

C* P0000340

C* D I RE CTOR Y OF 'TEST PROGRAMS - - - -

'- - 3 42 P 6 6 6 03 5

6

C* P0000360

Ct F'mTRW - '008 FORMATTED INPUT/OUTPUT M I 8 - - - 529 P 6 600 37

6

C* 6 SYSTEM IDENTIFICATION CARDS 6P0000380

ft" 40 DATA CARDS ------ 40P0000390

C* P0000400

ft AFRMT - 009'"""A- CON VERSI ION M 1 1

: '- 11 5 POO 0 0 41 0 C* 3 DATA CARDS , 3P0000420

C"t

' P0000430

C* DATA2 - 010 DATA STATEMENT USE M - 3 - - - 74P0000440

Ct DATAI - 003 TEST FORMAT OF DATA STATEMENT M - - - - D 84P0 00 045

0

C* P0000460

C* "AASGN -' Oil REAL AND INTEGER ARITH ASSIGNMT. STMNTS. M - 3 - - - 268 POO 00 4 70

C* P0000480

G"t" DASGN - 013 S I MPLE D . P ASS I GNMENT STATEMENTS M -

8 - - -" 420P0000490

C* P0000500

Ct CASGN - 015 SIMPLE COMPLEX ASSIGNMENT STATEMENTS M - 9 - - - 469P0000510

C* P0000520

C* LASGN - 016 LOGICAL ASSIGNMENT STATEMENTS M - 1 - - - 1 0 6 P 0 0 0 0 5 3

0

C* P0000540

C* I NT RL - 017 ARITHMETI C ASSIGNMENT STATEMENTS M - 4 - - - 18 5 P 0 0 0 0 5 5 0

C* P0000560

C't UGOTO : 02 0 UN CO NO if I ON AL GO TO STATE MEN TS M

'-

; 1

: - 69 P 0000 570

C* P0000580

C* A GOT 6 - 021 GO TO ASSIGNMENT STATEMENTS M - 1 - - - 1 49P00 00 590

C* P0000600

Ct CGbtO'"- ' 022 COMPUTED GO TO STATEMENTS M - 1 - - - 1 4 6 P 0 0 0 0 6 1 0 Ct P0000620

C't ARB AD - 030 BASIC ADDITION M - 1 - - - 1 1 5 P 0 0 0 0 6 3 0 Ct P0000640

C t ARF AD - 031 DOUBLE PRE C I S I 0 N ADD I T I ON M -

1 - - - 5 7P00 0 065 0 Ct P0000660

C t" "ARB SB -' 032 BASIC SUBTRACT I ON M -

1

: - 67P00 00670

Ct P0000680

NBS FORTRAN Test Programs Version 1 1
c*

c*

ARFSB - - 033 DOUBLE PRECISION SUBTRACTION M

-

1 - - - 72P0000690

P0000700

c*

c*

ARBAS - 034 BASIC ADDITION AND SUBTRACTION M

- 1 - - - 79P0000710

P0000720

c*

c*

ARFAS • - 035 ADDITION AND SUBTRACTION OF O.P. VALUES M

-

1 - - - 60P0000730

P0000740

c*

c*

ARBMI 036 MULTIPLICATION OF INTEGER VALUES M

- 1 - - - 66P0000750

^\ A A A A ^ / f\ P0000760

c*

c*

ARBMR • 037 MULTIPLICATION OF REAL VALUES M

-

1 - - - 64P0000770

r\ a a a a ^ a a P0000780

Ct

c*

ARFHO • 038 MULTIPLICATION OF D.P. VALUES M

-

1 - - - 71P0000790

r~\ A A A a n A a P0000800

c*

c*

ARBDV 039 DIVISION OF INTEGER AND REAL VALUES M

- 1 - - - 78P0000810

r\ A A A A A ^ A P0000820

c*

c*

ARFDV 040 DIVISION OF D.P. VALUES M

-

1 - - - 66P0000830

n A A A A A / A P0000840

o

c*

ARBEX 041 EXPONENTIATION OF INTEGER AND REAL VALUES M

- 1 - - - 90P0000850

n A A A A A t A P0000860

c*

c*

ARFEX •• 042 EXPONENTIATION OF D.P. VALUES M

- 1 - - - 74P0000870

P0000880

Ct

Ct

ARBHI • 043 HIERARCHY OF OPERATORS AND PARENTHESES M

- 1 - - - 177P0000890

OAAAA/"\AA P0000900

Ct

Ct

SBB67 • 050 SUBSCRIPTS OF INTEGER, REAL ARRAYS V, K M

-

1 - - - 79P0000910

r\ a a a a i~\ ~\ a P0000920

Ct

C t SBB45 •• 051 SUBSCRIPTS OF INT. .REAL ARRAYS V + K, V-K M

-

1 - - - 87P0000930

r\ A A A A /~i / A P0000940

Ct

Ct

SBB13 • 052 SUBSCRIPTS OF INT. .REAL ARRAYS CtV.

CtV+K , CtV-K

M

- 1 - - - 112P0000950

O A A A A / A P0000960

Ct

C t SBF1 7

- 053 SUBSCRIPTS OF D.P. ARRAYS V, K, CtV, M

- 1 P0000970

TAr\AAAA^\rt A - - - 79P0000980

Ct

c*

CtV + K. CtV-K, V + K , V-K P0000990

t~\ A A A A AAA P0001 000

Ct

Ct

SIHIF 054 ARITH. IF, LOGICAL IF FOLLOWED BY GO TO M

- 1 - - - 77P000 1 0 1 0 n A A A 4 A ^ A P000 1 020

Ct

Ct

IFABS • 055 INTRINSIC FUNCTIONS ABS, IABS M

-

1 --- 64P 0 0 01030

r\ A A A A A / A P0 0 0 1 0 40

c*

Ct

IFFLT -• 056 INTRINSIC FUNCTION FLOAT M

-

1 - - - 49P0001050

R A A A A / A P0001060

Ct

c*

IFFIX -• 057 INTRINSIC FUNCTION IFIX M

-

1 - - - 59P0001070

f"4 A A A * AAA P000 1 0 80

Ct

A . C t IFSGN •• 058 INTRINSIC FUNCTIONS SIGN, ISIGN M

- 1 - - - 82P0001090

R A A A 1 1 AA P0 0 0 1 1 0 0 Ct

c*

IFDAB -• 059 INTRINSIC FUNCTION DABS M

- 1 - .- - 65P0 00 1 1 1 0

A A A *S A ^ A P0 00 1 1 20

Ct

A . C t IFTRN - 060 INTRINSIC FUNCTIONS A I NT , INT, I D I NT M

- 1 - - - 107P000 1 1 30

n A A A -i 1 1 A P000 1 1 40

Ct

c*

IFHOO 061 INTRINSIC FUNCTIONS AMOD, MOD M

- 1 - - - 84P000 1 1 50

l"\ A A A <1 1 f A P 0 0 0 1 1 60

Ct

C t IFMAX •• 062 INTR. FUNCT . AMAXO , AMAX1 , MAXO , MAX1 , DMAX1 M

-

2 - - - 248P0001170

(~1 A l\ A A 1 AA P000 1 1 80

Ct

A . c*

IFMIN •• 063 INTR. FUNCT. AM I NO . AM I N 1 . M I NO , M I N 1 , DM I N

1

M

- 2 - - - 225P0001190

f\ A A A 1 T A A P0 00 1 200

Ct

Ct

IFDSG -• 064 INTRINSIC FUNCTION DSIGN M

-

1 - - - 58P0001210

r\ A A A A A P0001 220

Ct

Ct

IFDIM 065 INTRINSIC FUNCTIONS DIM, IDIM M

- 1 - - - 69P0001230

f-\ A A A if —i 1 A P000 1 240

Ct

Ac * IFSGL

"- 066 INTRINSIC FUNCTION SNGL M

- 1 - - - 80P0001250

r\ A A A *1 -j Z A P000 1 260

Ct

C t IFREL •• 067 INTRINSIC FUNCTION REAL M

- 1 - - - 102P0001270

f^AAAl 1 0 A P000 1 280

c*

A

' C t IFIMG 068 INTRINSIC FUNCTION A I MAG M

- 1 - - - 129P0001290

r\ A A A "1 "7 A A P000 1 300

Ct

Ct

IFDBL • 069 INTRINSIC FUNCTION DBLE M

-

1 - - - 57P0001310

ft A A A A 7 T A P000 1 320

Ct

A . C t IFCPX • 070 INTRINSIC FUNCTION CMPLX M

- 1 - - - 61P0001330

f"k A A A 4 "7 J A P0001 340

Ct

C t IFCJG • 071 INTRINSIC FUNCTION CONJG M

- 1 - - - 66P0001350

n A A A 1 7 Z. A P 0 0 O 1 3 6 0

& NBS FORTRAN Test Programs Version 1
IFBMS - 072 INTEGER AND REAL INTRINSIC FUNCTIONS M - 1

IFF MS - 073 INT., REAL AND D.P. INTRINSIC FUNCTIONS M -

Z

1 29P000 1 3 70

P0001380

1 8 1 P 0 0 0 1 3 9 0 P000 H00

EXPON - 080 BASIC EXTERNAL FUNCTION EXP

DEXPO : 081 BASIC EXTERNAL FUNCTION DEXP

60P0001410

P000 U20

68P000H30

P0001440

CEXPO - 082 BASIC EXTERNAL FUNCTION CEXP

LOGTM - 083 BASIC EXTERNAL FUN C T.I O N ALOG

98P0 0 0 H50

P000 H60

5 7 P 0 0 0 1 4 7 0 P000 H80

DPLOG - 084 BASIC EXTERNAL FUNCTION OLOG

CXLOG - 0 8 5 BASIC EXTERNAL FUNCTION CLOG

67P0001490

P0001 500

1 0 6 P 0 0 0 1 5 1 0 P000 1 5 2 0 56P000 1 530

P0001 540

COLOG - 086 BASIC EXTERNAL FUNCTION AL0G10

DC LOG - 087 BASIC EXTERNAL FUNCTION DL0G1 0 66P000 1 5 5 0 P0001 560

81P0001570

P0001 580

SINUS - 088 BASIC EXTERNAL FUNCTION SIN

OPSIN -' 0 89 BASIC EXTERNAL FUNCTION DSIN

M

"M" 82P0001 590

P0001600

6 5 P 0 0 0 1 6 1 6 P0001620CSICO - 090 BASIC EXTERNAL FUNCTIONS CSIN, CCOS M

COSNS - 0 91 BASIC EXTERNAL FUNCTION COS M 82P0001630

P0001640

81P0001650

P0001660

DPCOS

TANGH

092 BASIC EXTERNAL FUNCTION DCOS

"094 BASIC EXTERNAL FUNCTION TANH

09 5 BASIC EXTERNAL FUNCTION SORT

M

"M"

SQROT "m"

DSQRO

57P0001670

P0001680

55P0001690

P0 00 1 700

096 BASIC EXTERNAL FUNCTION DSORT

09 7 BASIC EXTERNAL FUNCTION CSORT

M

M

63P0001710

P0001720

74P0001 730

P0001 740

CSQRO

ARCTG 098 BASIC EXTERNAL FUNCTION ATAN

099 BASI C EXTERNAL FUNCTION DATAN

M

"ti"

58P0001 750

P0001 760

66P0001770

P0001 780

DACTG

ACTG2 100 BASIC EXTERNAL FUNCTION ATAN2

101 BASIC EXTERNAL FUNCTION DATAN

102 BASI C EXTERNAL FUNCTION DMOD

56P0001 790

P0001 800

6 6 p o 6 6 i 8 1

6

P0001 820

63P0001830

P0001 840

DATN2

DMODA

CABSA - 103 BASIC EXTERNAL FUNCTION CABS 84P0001850

P0001860

74P0001 870

35P0001880

BSFTS - 110 STATEMENT FUNCTIONS - INTEGER AND REAL M BSFDF - 005 STATEMENT FUNCTION DEFINITION M

FSFTS - 111 STATEMENT FUNCT.- D.P., COMPLEX, LOGICAL M

- FSFDF

P0001 890

108P0001900

5 8 P 0 0 0 1 9 1 0 P0001920

006 STATEMENT FUNCTION DEFINITIONS

140 ADDITION AND SUBTRACTION OF COMPLEX

M

CPXAD M

CPXMU

76P0001930

P0001940

141 P0001 950

P0001 960

141 MULTIPLICATION OF COMPLEX NUMBERS

CPXDV 142 DIVISION OF COMPLEX NUMBERS

CPXEX

83P0001970

P0001980

1 2 5 p 6 b 6 i 9 9 6

P0002000

143 EXPONENTIATION OF COMPLEX NUMBERS M

144 ARITHMEtiC OPERATIONS ON COMPLEX M

145 ADD AND SUBTRACT COMPLEX AND REAL NUMBERS

M

CPXOP

CREAD

63P0002010

P0002020

67P0002030

P0002040

NBS FORTRAN Test Programs Version 1 3
C* CREMU - 146 MULTIPLY COMPLEX BY REAL NUMBERS M - 1 - - - 62P0002050

C* P0002060

C* C R E DV -147 biviOE COMPLEX BY REAL AND THE REVERSE M - 1 - -

-' 5 jj P 6 6 OZ 0 70

C* P0002080

C'» CREOP - 148 COMBINED OPERAT I ONS ON COMPLEX AND REAL M - 1 - - - 66PO662696

C* P0002100

C"t « ISC 3 : 149 BLANKS IN, CONT. OF STATEMENT TO MAX LINES M - 1 - - -

' 97P00bTi 1

0

C* P0002120

C* M7SC4 - 150 SPECIAL CHARACTERS FOR CONTINUATIONS M - 1 - - - 1 65P0002 1 30

C* ' P0002140

C"*" BRFCP " 160 REAL EXTERNAL FUNCTIONS M - 1 - - - 8 2 P 0 0 6 2 1 5

0

C* AFS - 400 REAL ARGUMENT F 010P0002160

C't BFS : 420 REAL ARGUMENTS F 1 0 P 0 6 0 2 1 7

0

C* CFS - 430 INTEGER ARGUMENT F 1 0P0002 1 80

C't OFS : 4 4

0 "INTEGER ARGUMENTS F - -

- 1 1PO 002 190

C* EFS - 450 ARRAY NAME AS ARGUMENT F 11P0002200

C» F'FS

-' 460 DI FFERENT TYPES OF ARGUMENTS ' F - - - 15 POO 0221 6 C* P0002220

C* BIFCP " 161 INTEGER EXTERNAL FUNCTIONS M - 1 - - - 87P0062230

C* IAFI - 401 REAL ARGUMENT F 10P0002240

C* IBFI - 421 REAL ARGUMENTS F -

- 1 0 P 0 0 0 2 2 5

0

C* ICFI - 431 INTEGER ARGUMENT F 10P0002260

C* IDF I - "44f I NTEGER ARGUMENTS F D 1 3 P 0 0 0 2 2 7

6

C* IEFI - 451 ARRAY NAME AS ARGUMENT F 11P0002280

C* I F F

I

: 461 D I FFERENT TYPES OF ARGUMENTS F - -

: - 15P0002296

C* P0002300

C* FRF CP - 162 REAL EXTERNAL FUNCTIONS M - 1 - C - 1 3 2 P 0 0 6 2 3 1 0 C* GFS - 402 D.P. ARGUMENT F 11P0002320

C* HFS -' 422 COMPLEX ARGUMENTS F - -

: - 12P00 0233 0 C* IRFS - 432 LOGICAL ARGUMENT F - - - - - 16P0002340

C '* JRFS : 4 42 E XTERNAL PROCEDURE F

'- - -

-' : 1 IPC100235

6

C* RFS - 452 DIFFERENT TYPES OF ARGUMENTS F - - - C - 29P0002360

C*"" p 61 02 3.70

C* FIFCP - 163 INTEGER EXTERNAL FUNCTIONS M - 1 - C - 123P0002380

C* I F I - 403 D.P'. ARGUMENT F ii POO 023 90

C* JFI - 423 COMPLEX ARGUMENTS F 12P0002400

C* K F I - 433 LOGICAL ARGUMENT F 16P000241 0 C* LFI - 443 EXTERNAL PROCEDURE F 1 1 P0002420

C* MF I 4 53 D I FFERENT TYPES OF ARGUMENTS F - -

-

C - 29P660 2 436

C* P0002440

C* CFCCP - 164 COMPLEX EXTERNAL FUNCTION M

: 1 -C

- 1 32P0002 4 50

C* AFC - 404 REAL ARGUMENT F - - - - - 10P0002460

C* B F C -414 I NTEGER ARGUMENT ' F

" -

""- ""- - - 10P0002476

C* CFC - 424 ARRAY NAME AS ARGUMENT F 11P0002480

C"« DFC - 43 4 D.P. ARGUMENT F

'- - -

-' : 12P 0 002496

C* EFC - 444 COMPLEX ARGUMENT F 1 1 P00025 00

C* FFC - '454 ' LOGICAL ARGUMENT F - - - 1 5 P 6 0 0 2 5 1 0 C* HFC - 464 DIFFERENT TYPES OF ARGUMENTS F - - - C - 28P0002520

C* P 6 0 6 2 5 3 0 C* DPFCP - 165 DOUBLE PRECISION EXTERNAL FUNCTIONS M - 1 - C - 135P0002540

C* A F D - 405 REAL ARGUMENT F 1 0 P 0 0 6 2 5 5 0 C* BFD - 415 INTEGER ARGUMENT F - - - - - 10P0002560

C* CFD - 425 D.P. ARGUMENTS F - -

'-" - -"

1 1 P 0 0 0 2 5 7

0

C* DFD - 435 COMPLEX ARGUMENT F 12P0002580

C* EFD - 445 LOGICAL ARGUMENT F - - - - - 16P0002590

C* FFD - 45 5 EXTERNAL PROCEDURE F 11P0002600

C* GFD - 465 ARRAY NAME AS ARGUMENT F 1 2P00026 1 6 C* HFD - 475 DIFFERENT TYPES OF ARGUMENTS F - - - C - 32P0002620

C« P 0 6 0 2 6 3 6

C* BFCCP - 166 LOGICAL EXTERNAL FUNCTIONS M - 1 - C - 144P0002640

C* AFB - 406 REAL ARGUMENT F 1 6 POO 026 5

6

C* BFB - 416 INTEGER ARGUMENT F 10P0002660

C* CFB - 426 D.P. ARGUMENT ^

._ _•• 11pooo2670

C* DFB - 436 LOGICAL ARGUMENT F 1 1 P0002680

C* EFB - 446 COMPLEX ARGUMENT F - - 1 2 P 0 0 0 2 6 9

6

C* FFB - 456 ARRAY NAME AS ARGUMENT F 12P0002700

C* GFB - 466 ' EXTERNAL PROCEDURE F - - -

-

'- 11 POO 02 71 6

C* 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 - 103P000Z740

C* AAO - 4 6 7 I NT EGER . REAL VAR I ABLES , ARRAY ELEMENTS S - - - - - 23P666275

6

C* ABO - 417 ARRAY ELEMENTS S 13P0002760

C"» ACQ - 427 NO ARGUMENT LIST S - - - C - 21 POO 02 7 70

C* P0002780

C* FSBRT - 162 SUBROUTINE SUBPROGRAM M - 1 - C - 1 5 3 P 6 6 0 2 790

C* ADO - 408 DIFFERENT TYPES OF ARGUMENTS S - - - - - 39P0002800

C* AEQ - 418 ARRAY NAMES AND INTEGER ARGUMENTS S 23P000281 0 C* AFO - 428 NO ARGUMENT LIST S - - - C - 41P0002820

C* P* 6*002830

C* BLKDT - 169 BLOCK DATA TEST M - 1 - - - 71P0002840

C* BLOKD " *09 BLOCK DATA SUBPROGRAM B 0 3 6 P 0 0 0 2 8 5 0 C« P0002860

C* BLKDA - 179 BLOCK DATA TEST M - 1 - - - 70P0 0 02 8 70

C* BLAKD - 419 BLOCK DATA SUBPROGRAM B - - - - D 24P0002880

C*'* BLBKD - 429 BLOCK DATA SUBPROGRAM B - - D 17P0002890

C* BLCKD - 439 BLOCK DATA SUBPROGRAM B - - - - D 20P0002900

C* P 0 0 0 2 9 1 0 C* UNFRW - 180 UNFORMATTED WRITE AND READ M - 1 X - - 133P0002920

C* P 0 6 0 2 9 3 0 C* BACUP - 182 BACKSPACE TAPE M - 1 X - - 74P0002940

C* P 0 0 0 2 9 5 6 C* DOTRM - 190 DO LOOPS - TERMINAL STATEMENTS M - 1 - - - 135P0002960

C'« P 0 0 0 2 9 7 0 C* DOLMT - 191 DO LOOPS - PARAMETERS AS VARIABLE NAMES M - 1 - - - 62P0002980

C* POO 0 2990

C* DONSC - 192 DO LOOPS - COMPLETELY NESTED NEST M - 1 - - - 166P0003000

c"*"" P 0 0 0 3 0 1 6 C* DONSI - 193 DO LOOPS - INCOMPLETE DO, EXIT BY GO TO M - 1 - - - 60P0003020

C* p 00*6 30 30

C* DONSX - 194 DO LOOPS - EXTENDED RANGE M - 1 - - - 130P0003040

C* POO 03 0 5 0 C* DONML - 195 DO LOOPS - NESTED NEST M - 1 - - - 65P0003060

C'* P0003Q70

C* DONIO - 196 DO LOOPS - I/O TERMINAL STATEMENTS M - 1 X - -. 91P0003080

C* p 6 §036*9 6

C* MORDO - 197 DO LOOPS -I/O.STATMT FT . , I NTR FT. .CALL M - 1 X - - 143P0 003 1 00

C* BSFDF - 665 STATEMENT FUNCTIONS M 3 5 P 0 0 0 3 1 1 0

C* MDO - 412 SUBROUTINE SUBPROGRAM S 13P0003 1 20

C* POO 03 1 3 6 C* SUBR1 - 200 SUBROUTINE - OPERATIONS DONE AT SUB LEVEL M - 1 X C - 52P0003140

C* SUBRQ - 4*1*6 SUBROUTINE SUBPROGRAM - NO ARG . LIST S - - X C - 1 0 1 P 0 0 0 3 1 5 0 C* P0003160

C * LOG I F : 366 LOG I CAL I F S TAT E*ME N TS M -

1 - - - 2 7 5P0 003 1 7

6

C* SMCQ - 411 SUBROUTINE SUBPROGRAM S 12P0003 1 80

C* P 0 663 1 90

C* BARIF - 301 ARITHMETIC IF STATEMENTS - INTEGER, REAL M - 1 - - - 175P0003200

C* p 6 6 6 3 2 1 6 C* FARIF - 302 ARITHMETIC IF STATEMENTS - D.P. M

- 1 - - - 99P0003220

C * p 6 663230

C* IOFMT - 310 FORMATTED READ/WRITE -ADDITIONAL FEATURES M I 5 - - - 310P0003240

C* 38 DATA CARDS 3 8P00 0 3250

C* P0003260

C* RDFMT - 312 FORMATS IN ARRAYS M

i' 1 -"" - D 201 POO 03 270

C* FMTQ - 462 SUBROUTINE SUBPROGRAM S 33P00032 80

t* 13 DATA CARDS

-' : - - - - 13P0003290

C* P0003300

C * MI S C5 -' 3 56 S PEC I F I C A T I 0 N S F 0 R P R 0 G R A M FORM M - 1- "-'-

1 5 6 P 0 0 0 3 3 1 0 C* P0003320

C* FUN MX -' 3 51 BASIC EXTERN AL FUNCTIONS - TRIG FORMULAE M -1 '- - - 5 8 P 0 0 6 3 3 3 6

C* P0003340

C* NAME'S : 352 NAMES RESEMBLE FORTRAN VERBS, FUNCTIONS

M

: 1 "'- "- "- 7 9 P 0 0 6 3 3 5

0

C* MAQO - 413 SUBROUTINE (INTRINSIC FUNCTION NAMES S 15P0003360

C* ' MBQQ - 463 SUBROUTINE USED AS VARIABLE NAMES INS--'--- 1 5 P 6 6 6 33 7

6

C* AMQQ - 473 SUBROUTINE SOME SUBRTS. AND AS S - - - - D 21P0003380

C* BMQO -' 483 SUBROUTI NE FUNCTI ONS TN OTHERS ) S

- -: - 1 6 P 0 0 6 3 3 9

6

C* P0003400

NBS FORTRAN Test Programs Version 1 5
SPEC2 - 360 COMMON , DIMENSION. EQUIVALENCE M - 1 1 69P000341

0

P0003420

c>

c^C<C'

c"

c.> C<C

C'C>

********«********t*************t*******«**t****t*t***«**»*********P0080010

P0080020

P0080030

P0080040

FMTRW - (008)

************t**t*****t**t***********»******************tt*t*******P0080050

GENERAL PURPOSE ASA REFSP0080060

TO TEST SIMPLE FORMAT AND FORMATTED I/O STATEMENTS 7 . 1 . 3 . 2 . 2 P 0 0 8 0 0 7

0

SO THAT THESE FEATURES MAY BE USED IN OTHER TEST 7 . 1 . 3 . 2 . 3 P 0 0 8 0 0 8

0

PROGRAM SEGMENTS 7.2.3 POO 80090

RESTRICTIONS OBSERVED P0080100

* ALL-FORMAT STATEMENTS ARE LABELED 7.2.3 /57P0080110

* H AND X DESCRIPTORS ARE NEVER REPEATED 7 . 2 . 3 . 3 / 5 4P0 0 8 0 1 2

0

* FOR W'.'b DESCRIPTORS, D IS ALWAYS SPECIFIED AND 7 . 2 . 3 . 1 / 3 1 P0080 1 30

W IS EQUAL TO OR GREATER THAN D 7 . 2 . 3 . 1 / 33 PO 0 8 0 1 40

"if F I ELD WIDTH IS NEVER ZERO 7.2.3 / 1 8P 0 08 0 1 5 0

» IF THERE IS AN I/O LIST. THE FORMAT STATEMENT 7 . 2 . 3 . 4 / 22 PO 0 8 0 1 60

CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER PO 08 01 70

THAN H OR X) P0080180

ITEMS IN I/O LIST CORRESPOND TO FORMAT DESCRIPTORS 7 . 2 . 3 . 4 / 3 6 P 0 0 8 0 1 9

0

* NEGATIVE OUTPUT VALUES ARE SIGNED

'*' FIELD WIDTH NEVER EXCEEDED BY OUTPUT

* FOR I CONVERSION, EXTERNAL INPUT FIELDS ARE

INTEGER CONSTANTS

GENERAL COMMENTS

PLUS SIGNS FOR INPUT FIELDS ARE USUALLY OMITTED

7.2.3.6/56P0080200

7.2 .3 .6/01 POO 8 02 1 0 7.2.3.6. 1/07P0080220

POO 80230

P0080240

7.2.3 . 6 / 4 4 P 0 0 8 0 2 5 0 P0080260

P0080270

P0080280

3/05P0080290

/44P0080300

FORMATTED WRITES WITHOUT AN I/O LIST (FORMAT 7.1.3.2

STATEMENTS TEST H AND X DESCRIPTORS AND SLASH 7.2.3.2

RECORD DIVIDERS) 7.2.3.8

7.2.3.9

DATA TO THIS SEGMENT CONSISTS OF 40 CARD IMAGES IN COL. 1

1 - - 999

555554444

666 777777 8 333333111112222222255555444444444444

/09P0 0 803 1 0 /31P0080320

80 P 0 0 8 03 3

0

•61 P 0 0 8 03 4 0 POO 803 5 6 P0080360

P 6 6 80 3 70

P0080380

C INPUT

COL.

CARD 1 CARD 2 CARD 3 CARD 4 CARD

5"

CARD 6

CARD 7 CARD 8

CARD " 9

CARD 10

7.7123456.7

8.889.9997.123456

5 . 44446 . 555 5533 . 1 33 . 1 33 . 1 33 . 1 4 4 4

"'. f" 5555.15555.1 66666.166666.1 44.22

P0080390

P0080400

P 0 0 8 0 4 1 0 P0080420

2.12.12.12.12.1666.3334.3334.3334.333 P0080430

-0.1E+01+0.22E-01 0.333E+02 0 . 4 4 4 4E 0

3 -0 . 5 5 5 5 5 E - 03 + 0 . 666666E + P0080440

COL. 62 77 P 6 68 04 56

CARD 10 00+0.9876543E+12 P0080460

COL.

p

Trrrrrr~.—

poo 80 470

CARD 11 1.05.522.066.633.123455.0789 P0080480

1 23 . 00456 . 88 0. 123E + 01 +0 . 987 + 1 -0 . 2345 + 02 -6 . 6879E + 2 + 0 . 7E + 0 62 70

CARD 12

COL

CARD 12

COL.

3 0.4E+03

1 -- 0.987654 3E-04 + 6. 135791 3E-04

1 9.34 + 0.2468E + 02 +. 765 + 287.643 . 96 0 . 5407E + 0243 . 96 + 0 . 5407E + 0

61

P0080490

P0080500

P 0 0 8 0 5 1 6 P0080520

CARD 13

CARD 14

COL.

CARD 14

62

243 .96

78

0.5407+2

COL.

CARD 15

CARD 16

CARD 17

1 •61

+ 0 . 10 + 06

-6.3340-04 -.334-4 +6.76 5765 4D0 0 6 . 1 2 3 4 56 78 901 D + 1

6

+0. 987654321 09876D-1+0. 987654321 09876D-01 .98765432109876

COL.

CARD 17

COL.

CARD 18

CARD 19

CARD 20

62-66

-1

1 -- -.5555555420+03 -0.555555542+3

f ABC

FDEFFGHIT*+T1 F$)TF

61

P0080530

P0080540

P0080550

P0080560

POOS 6 5 70

P0080580

POO 80 5 90

P0080600

P 0 0 8 0 6 1 0 P0080620

P0080630

P0080640

POO 8065 0 P0080660

6 NBS FORTRAN Test Programs Versioh 1
CARD 21 9.91.19.92.29.93.39.94.49.91.19.92.29.93.39.94.4 P0080670

CARD 22 9.95.59.96.69.97.79.98.89.95.59.96.69.97.79.98.8 P0080680

CARD 23 • -9.9-9.9-9.9-9.9 P0080690

CARD 24 -0.99D + 01 -0. 990 + 01 -0. 990 + 01 -0. 99D + 01 -0. 990 + 01 -.990*01 -.99* P0080700

COL. 62 72 " POO 807 1 0 CARD 24 01 -.99*1 P0080720

COL. 1 61 P0080730

CARD 25 9999999999 P0080740

CARD 26 + 0 .990 + 0 1

' 0 . 990 + 01 + .99D01 + .9901 POO 8 075 6 CARD 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 P0080760

CARD 2 8 f Ft FT FT FT F PO 080 770

CARD 29 99999999 + 0. 99D + 01 0.990*01- 0.990*01 +0.990 + 01 .99D1 P0080780

CARD 30 9 .95.59.96.69.97.79.98 .899999999999 99 9 9 9 T F F j 9 . 9 9 . ^-99^9-9 P 00 80790

CARD 31 T F T F P0080800

CARD 32 4444.5 5 5 5 5 P 0 6 8 6 8 1 0 COL. 1 - 61 P0080820

CARD 33 123.45678E2 1 234 . 5678 1 23 . 45678 1 2.345678 1 . 2345678 . 1 23 P 0 0 8 0 8 3

0

COL. 62-66 P0080840

CARD 33 45678 P 0 0 8 0 8 5

0

COL. 1 61 P0080860

CARD 34 9876. 5498 . 7654E2 9 8 76 . 5 4 98 7 . 65 486 47860- 486 . 4786E286 . 4 786 P0080870

COL. 62--- 80 P0080880

CARD 3 4 8657. 86D0 98 76. 54 P0080890

COL. 1 61 P0080900

CARD 35 9. 8765 598 . 7654E2 98 76. 5 4 98 7 . 65 48647860-386 . 4786E286 . 4786 P 0 0 8 6 9 1 0 COL. 62- 80 P0080920

CARD 35 8657. 86D0 98 76. 5 4 P 0 0 8 6 9 3

0

COL. 1 61 P0080940

CARD 36 1 2233354488861 1 222 P 0 0 8 0 9 5

0

CARD 37 455666233444966111 P0080960

CARD 38 788999377555899777 ~ P0080970

CARD 39 11112 334 559 880 11 P0080980

CARD 40 6 778 995 441 222 00 P0080990

C* * * * * P0081000

C * * *"*

« S P E C I F I C A f 1 0 lit S SEGMENT 00 8 P 0 0 8 1 0 1 0 C****t P0010010

C"*'*"*"*« WHEN EXE CUT I NG ONLY SEGMENT 668 , THE S P EC IF I CAT I ON STATE ME NTS PO0 1 00 1 5 C****» WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS P0010020

C**t*t 1 AND 2 REMOVED P0010025

C= DIMENSION A1S(5) ,A2S<2. 2) . EP 1 S ( 33 ) , CMA1 S ( 5 ) , A3S ( 3 , 3 . 3 ) P0010030

C= 1 , I AC 1 I ( 5 ) , I AC2 I (2,7) , AC 1 S ( 2 5 ) , AC2S ( 5 , 6 ) , M CA1 I ( 5 ) P00 1 0035

C= INTEGER 121 (2,2) , 131 (2,2,2) .MCA3I (2,3,3) P0010040

C= LOGICAL MCA1 B ( 7 ) , A1 B ( 2 ) , A2B ( 2 , 2 ) , A3B ( 2 , 2 , 2 ) , AVB , CVB , DVB , MCBVB P 0 0 1 0 0 4

5

C= DOUBLE PRECISION DPA1 D ( 5 ) , M CA3D ( 1 , 4 , 2 ) . 2ZDVD t A20 ( 2 , 2 )

,. A30 ( 2 , 2 , 2 ) P0010050

C= 1i, AC 1 D( 1 0 ) . BC2D< 7, 4) , DPAVD, DPBVO PO0 1 005 5 C= COMPLEX BVC.QAVC, CHAVC, CHBVC. CHCVC, CHDVC P0010060

C= 1 , L L 1 C ( 32 ) , LM2 C ( 8 , 4) , A1 C( 12 ) , A2 C ( 2 , 2) , B3C(2 , 2 , 2) , B 1 C ( 8 ) PO0 1 0065

C***«* P0010070

DIMENSION A 1 S ( 5 ) . A 2 S ( 2 , 2 ) ,EP1S(33) . CMA1 S ( 5 ) , A3S ( 3 , 3 , 3 ) P008 A1

1 , IAC1 I (5 ) . IAC2I (2 , 7) . AC1S(25 ) , AC2S(5 .6) , MCA1 I (5) P008A2

INTEGER I 2 I ( z^zj, 131(2 ,2,2). MCA3K2.3.3) POO 8 A3

LOGICAL MCA1B(7) ,A1B(2) ,A2B(2,2) ,A3B(2,2,2) ,AVB. CVB. DVB , MCBVB P008A4

DOUBLE PRECISION DPA1 D ( 5 ) . M CA3D ( 1 . 4 , 2 ) . ZZDVO , A2 D ( 2 , 2 ) , A3 D ( 2 , 2 . 2 ) P0 0 8A5

1,AC1D(10).BC2D(7,4) , DPAVD , DPBVD P008A6

COMPLEX BVC.QAVC. CHAVC. CHBVC, CHCVC, CHDVC P068A7

1,LL1C(32).LM2C(8.4),A1C(12),A2C(2,2),B3C(2,2.2).B1C(8) P00 8A8

C t"t *"'* « I "N P U f - 0 U t P U t TAPE ASSIGNMENT STATEMENTS P 0 6 8 1 6 2 6

C***«* P0081030 „,.TM_

UH ^ N EX E c y TING ONLY SEGMENT 008 , THE FOLLOWING ^STAtlHTiiTS* P 0 0 7001 0

C.« «,**;* N U V I =6 AND I RV I =5 MUS T HAVE THE C = I N C OL UMNS 1 AND 2 REMOVED . POO 700 1 5 C* * * * * P0070020

C= IRVI = 5 P0070025

c= Niivi

"""= 6 POO 7003 6 IRVI = 5 P008B1

Nlivi = 6 P0 08B2

C*«»»» IDENTIFY THE SOURCE OF THE TEST PROGRAMS P0070035

WR I f E ( N U V 1 . 007 i )" P 6 6 7 6 6 4 6 0071 FORMAT (41H1 FORTRAN TEST PROGRAMS// P0070045

NBS FORTRAN Test Programs Version 1 7
1 42H PREPARED BY NATIONAL BUREAU OF STANDARDS//

7 ?iu cno mcc niu cdqtoaw d rci r e c q n p q // j jdn run use UN run i RflN rnuLtoouno //

P0070050

rUO/OOjj

4 42H IN ACCORDANCE WITH ASA FORTRAN X3 .9-1966/

/

3 tin VtKolUN 1 III)

P0070060

DftftTftftCK rOO/OOOj

C»t*t* 3 OF 6 INPUT CARDS IDENTI FY THE USERS SYSTEM AND COMPILER

L rntrnKtU BT U a t K P0070070

Dftft.7ft.ft.7S rUU/UU/j

C READ, NO LIST

r D D E D A Q E n DV IICED L KKtrAKtU Hi UotK

P0070080

rUU/UUS

J

C READ. NO LIST

r DDCDADCn DV 1 1 C E 0

L HKtrAKtU BY UotK

P0070090

DAA7flAOC rUU/UUVD

C READ, NO LIST

QCAn / TDWY A A 7 A \ READ ( IKV1 ,00/0;

P0070100

rUU/010j A A 7 A 1 AC

READ( IRVI ,0072) P00701 1

0

DAA7A1 1

0070 FORMAT ( 40H BASED ON ASA FORTRAN X3. 9-1966 /)

ft. ft 7? CnDMATf/flU. TCCT DDPP.RAHQ 1 \ U U / C rUKnft 1 l "tun It3l rRUuKflno 1 1 P0070120

KUU/U I L

J

0073 FORMAT ( 40H FORTRAN COMPILER /)

1 1 D T T C / M 1 1 W T rtA7rt \ WK1 IbvNUVl ,00/0;

P0070130

n A ft 7 ft 1 7 e WR I TE ( NUV I ,0072)

IIDTTC/MIIV/T rtft77 \ WKllbvNUVI,UU/j;

P0070140

n A A 7 A 1 / C rUU/UlHj

C*tt*t HEADER FORMAT STATEMENT

nnoA CnDMAT M U1 1Y 77UCMTRU - / ft rt JM f flPMiTTCn T/0//7Y

P0081040

D A A Q 1 A C A

r U U o 1 U JU

138HASA REFS - 7.1.3.2.2 7.1.3.2.3 7 . 2 . 3 / / 2X , 7HRESU LTS ) W K 1 1 t il\IUVl ( UU8U/

P0081060

B A A • 1 A7/l rUUo I U / 0 C*»*«* FORMAT WITH DIGITS 0-9 IN H FIELDS

n n « 1 cnoMAT 1 1 ittu 1 n 1 n 1 n

1

o 1 n 1 n 1 n 1 n i n 1 n quqqqqqqqqq a u a s a s a a a a / ? y

P0081080

r U U o I U 7 U ]7H7 777777, 6H666666,5H55555,4H4444,3H333,2H22,1H1)

Nn 1 I C i NU V 1 , UU 5 N

P0081 100

r u U 0 I I I u C«**«* FORMAT CONTAINING ALL LETTERS (A-2) IN H FIELDS AND

PL*" * * ** * nA VVnnlnBLE A R T A R 1 E MUMPER IMUnBEn flUrE PB1L nA WIM Vf\ Q0 TMIN UPI nlHU AMD YA ME! r 1 C LU3DQ

P0081 120

r U U o I I JU

0082 F0RMAT( /2X.3HAAA, 5X, 5H , 3 HB B B , 1 OX , 3H C C C / 3H , 3HDDD , 9X , 3HEEE , P008 1 1 40

19H ,3HFFF/4X,3HGGG,8X,3HHHH,8H .3HIII/5H , 3H J J J P 0 0 8 1 1 5 0 2.7H ,3HKKK,7X,3HLLL/6X,3HMMM,6X,3HNNN.6H .3H000/7X.

3 3HPPP , 5H ,3H00Q ( 5X,3HRRR/8X,3HSSS.4X,3HTTT,4H ,3HUUU/

P0081 1 60

1P0081 1 70

45H VVV ,3HWWW,3X,3HXXX/12X,3HYYY,3X,3HZ22)

WRITE (NUVI.0082)

P0081 180

P0081 190

Ct**«* FORMAT CONTAINING H FIELD WITH ALL POSSIBLE

C***** SPECIAL CHARACTERS 3.

P0081200

1 /46P008 1 21 0 0083 FORMAT ( / 2 1 H =+-*/()..$)

WRITE (NUV 1,0083)

P0081220

P0081230

C**«** FORMAT TO TEST VERTICAL SPACING

C * * * * * 7.1.3.

P0081240

4/04P0081250

7154 FORMAT (/24H BEGIN VERTICAL SPACING//30H FORMAT ( 1 4H SKIP 1

1 /) /)

LINEP0081260

P0081270

WRITE (NUVI, 7154)

7155 FORMAT ( 32H F0RMAT( 1 5H SKIP 2 LINES //) //)

P0081280

P0081290

WRITE (NUVI, 7155)

7156 FORMAT ( 33H FORMAT ( 1 6H SKIP 3 LINES ///) ///)

P0081300

P0081310

WRITE (NUVI, 7156)

0084 FORMAT ( 32H IMBEDDED SLASHES - SKIP 1 LINE //

P0081320

P0081330

1 14H SKIP 2 LINES/// 14H SKIP 3 LINES/ 3(/),

2 19H SKIP TO NEXT LINE/ 1H , 12H SKIP 1 LINE/ 1H0,

P0081340

P0081350

38H TEST N0/1H+,9X,14H/1H+,7HADVANCE/19H SKIP TO NEW PAGE / 4 1H1, /// 30H END OF VERTICAL SPACING TEST)P0081360

P0081370

WRITE (NUVI, 0084 ) C**tt* FORMATTED READ AND WRITE STATEMENTS WITH INTEGER 7.1.3.2.

P0081380

1 /25P0081390

C****« VARIABLES AND ARRAY ELEMENTS IN AN I/O LIST. (THE 7.2.3.

C « NUMBER OF ITEMS IN THE LIST IS VARIABLE.) SOME

3/01P0081400

P0081410

C** *«* FORMAT STATEMENTS CONTAIN REPEATED FIELDS.

C***«* FORMATS CONTAINING I CONVERSION DESCRIPTORS. 7.2.3.6.

P0081420

1 /03P008 1 430

C**»** FIELDS WIDTH IS FROM 1 TO 5 DIGITS. SOME 7.2.3.3

C***«* FIELDS ARE REPEATED

/01P0081440

P0081 450

0085 FORMAT (//25H BEGIN I CONVERSION TEST/40H EACH PAIR OF LINES SHOP0081460

1ULD BE IDENTI CAL/47H LINE 1 OF EACH GROUP IS HOLLERITH I NFORMAT 1 0P008 1 470

2N)

WRITE (NUVI, 0085)

P0081480

P0081 490

C***t* INPUT CARD 1 0086 FORMAT (2X.I3)

P008 1 5 00

P0081510

8 NBS FORTRAN Test Programs Version 1
READ (IRVI.0086) JACVI P008152C

Cttt.t INPUT CARD 2 P0081530

0087 FORMAT ( 1 X - I 5 . 1X.I4)

READ (IRVI.0087) KBCVI . IAC1K1)

P0081540

P0081550

C****t INPUT CARD 3 POOS 1 560

0088 FORMAT (2X, I3,2X,3( 12) ,2X, 1 1

>

P0081570

READ (IRVI.0088) IAC2K1.2), LCCVI. IAC1K5), IHDVI, MCA3K1.2.3) P008 1 580

c * * * * * INPUT CARD 4 P0081590

0089 FORMAT (2X. 2(13), 1(15), 4(12), 5(11), 3(14)) P0081600

READ (IRVI.0089) MDCVI, IAC2K2.2), IAC1M4), NECVI, IAC1 1(3), P0081610

1 IAC2M2.3); IAC2K2.1). MRRVI, IGDVI, KGVI, IEDVI, IAC2I (1,1 )P008 1 620

2 ,I'AC1I(2), IAC2I(2,7), MCA3I(2,1,3) P0081630

7086 FORMAT (/ 5H 999)

WRITE (NUVI.7086)

P0081640

P0081650

WRITE (NUVI.0086) JACVI P0081660

7087 FORMAT (/ 11H 5555 4444) P0081670

WRITE (NUVI.7087) P0081680

WRITE (NUVI.0087) KBCVI, IAC1K1) P0081690

7088 FORMAT (/ 16H 666 717117 8)

WRITE (NUVI.7088)

P0081 700

P0 08 1 7 1 0 WRITE (NUVI. 0088 ) IAC2M1.2). LCCVI, IAC1K5), IHDVI, MCA3I (1 ,2,3)P0081720

7089 FORMAT (/ 38H 3333331111122222222 5 5 5 5 5 44444444 444 4) P0081730

WRITE (NUVI.7089) P0081740

WRITE (NUVI. 0089 ) MDCVI, IAC2I<2,2>, IAC1M4), NECVI, IAC1 I (3) P0081750

1 IAC2K2.3). IAC2K2.1). MRRVI, IGDVI. KGVI, IEDVI. I AC2 I ( 1 , 1 ) PO 0 8 1 760

2 .IAC1K2). IAC2K2.7), MCA3K2.1.3) P008 1 770

C***t* FORMATTED READ AND WRITE STATEMENTS WITH REAL 7.1.3.2. 1 /25P00 8 1 780

C t * * * * VARIABLES AND ARRAY ELEMENTS IN AN I/O LIST. (THE 7.2.3.6. 2/18P0081790

C****« NUMBER OF ITEMS IN THE LIST IS VARIABLE.) ONLY 7.2.3.3 /01P0081800

C*«*** F CONVERSION IS USED IN THE FORMAT STATEMENTS. P008 1 8 1 0 C « SOME F FIELD DESCRIPTORS ARE REPEATED. FIELD P0081820

C** *»* WIDTH ALWAYS CONTAINS 1 POSITION FOR DECIMAL PT. P0081830

C**t«* FORMATS CONTAINING F CONVERSION DESCRIPTORS. 7.2.3.6. 2/18P0081840

C****« FIELD WIDTH IS FROM 1 TO 7 DIGITS. PLACEMENT OF 7.2.3.3 /01P0081850

C***»* DECIMAL POINT IS VARIABLE. SOME F FIELDS ARE P0081 860

Ct***« REPEATED P0081 870

7080 FORMAT (/ 25H BEGIN F CONVERSION TEST/40H EACH PAIR

1ULD BE IDENTICAL)

OF LINES SH0P0081 880

P0081 890

WRITE (NUVI.7080) P0081900

c * * * * * INPUT CARD 5 P0 08 1 9 1 0 7081 FORMAT (2X. F3 . 1 , F8 . 1

)

READ (IRVI.7081) ACVS. CMAVS

P0081 920

P0081 930

C***** INPUT CARD 6 P0081 940

7082 F0RMAT(2X,F4.2.F5.3.F8.6) P0081950

READ (IRVI.7082) A1S(2), BCVS, CMBVS P0081 960

C***«* INPUT CARD 7 P0081 970

7083 FORMAT (2X.F6.4,F7.5,4(F4.1),F5.1) P0 08 1 980

READ (IRVI.7083) HHCVS. CMCVS. GGCVS, FFCVS, A1S(1), AC1S(25), P0081 990

1 AC2S(4.1) P0082000

C***«* INPUT CARD 8 P0 0820 1 0 7084 FORMAT (2X.2(F6.1),2X,2(F7.1),2X,F5.2) P0082020

READ (IRVI. 7084 ) AC1S(18), AC1S(7). AC2S(4,4) , AC1S(8), AC 1 S C 1 0 ) P0 082030

C**t*« INPUT CARD 9 P0082040

7085 FORMAT (2X, 5 (F3 . 1 ) . F7 . 3 . 3( F5 . 3 ) ) P0082050

READ (IRVI.7085) AC2S(3,3) , AC2S(5,1), CCVS, AC1S(12), DCVS, P0082060

1 . AC1S(13), AC1S(5), A3S(1,1.2). AC2S(3,5) P0082070

7091 FORMAT (/ 13H 7.7123456.7)

WRITE (NUVI.7091)

P0082080

P0082090

WRITE (NUVI.7081) ACVS. CMAVS P00821 00

7092 FORMAT (/ 19H 8.889.9997.123456) P0082 1 1 0 WRITE (NUVI.7092) P00821 20

WRITE (NUVI.7082) A1S(2). BCVS. CMBVS P0082130

7093 FORMAT (/ 36H 5.44446.5555533.133.133.133.1444.1)

WRITE (NUVI.7093)

P0082140

P0082 1 5 0 WRITE (NUVI.7083) HHCVS. CMCVS, GGCVS, FFCVS. A1S(1), AC1S(25) P0082160

1 ,AC2S(4.1) P 0 0 8 Z 1 70

7094 FORMAT (/ 37H 5555.15555.1 66666.166666.1 44.22 ) WRITE (NUVI.7094)

P00821 80

P0082190

NBS FORTRAN Test Programs Version 1
7095

WRITE (NUVI, 7084) AC1S<18>, A C 1 S < 7 ) . AC2SU.4) , AC1S(8), AC 1 S ( 1 0 ) P0 0 8 22

FORMAT ( /39H 2.12.12.12.12.1666.3334.3334.3334.333) P00822

WRITE (NUVI ,7095) P00822

WRITE (NUVI, 708 5 ) AC2S(3.3) , A C 2 S ( 5 . 1

) , CCVS, AC1S(12), DCVS, P00822

1 C * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * * 7110

AC 1 S ( 1 3 ) , 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 F I ELD DES CRIPTORS ARE REPEATED

7.1 .3.2.1/

7.2.3.6.2/

7.Z.3.3 /

P00822

P0082Z

P 0 0 8 2 2 P00822

P00822

(FIELD WIDTH ALWAYS INCLUDES 6 EXTRA POSITIONS 7 . 2 . 3 . 6 . 2 . 1 / 4 7P 0 0 8 2

2

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.

7.2.3.6/01P00823

7 . 2 . 3 . 6 . Z 1 /04P0 0 823

POO S 2 3 P00823

P 0 0 8 2 3 FORMAT (//25H BEGIN E CONVERSION TEST/40H EACH PAIR OF LINES SHOP008Z3

P00823

P00823

P00823

P00823

1ULD BE IDENTICAL)

WRITE (NUVI, 7110)

t INPUT CARD '10

FORMAT (E8.1.E9.2

C * * * * 711

1

E10.3.E11 .4,E12.5,E13.6,E14.7)

7112

READ (IRVI.7111) AVS, BVS, EP1S(5), AC2S(1,5), CVS, AC2S(5.4)

1 A3S(2,1,2)

FORMAT (7 21H -0.1E+01 0 . 2 2E - 0 1 / 2X , E 8 . 1 , 2X , E 9 . 2 /

/

1 25H 0 . 333E + 02 0 . 4 4 4 4 E + 0 3 / ZX , E 1 0 . 3 , ZX , E 1 1 . 4 /

/

P008Z4

P008Z4

P008Z4

P008Z4

P008Z4

P008Z4

P 0 0 8 2 4 P00824

2 29H

3 16H

WRITE (NUVI

1 A3S(2

-0 . 5 5 5 5 5E-03 0 . 6 6 6 6 6 6 E + 0 0 / 2 X , E 1

2

0.9876543E+12/2X.E14.7)

7112) AVS, BVS. EP 1 S ( 5 ) , A C 2 S ( 1 , 5 > , 1.2)

5.2X.E13.6//

CVS, AC2S(5.4)

C***»* FORMATTED READ AND WRITE STATEMENTS WITH COMPLEX 7.1.3.2

C***t* VARIABLES AND ARRAY ELEMAENTS IN AN I/O LIST. 7.2.3.6

C**»*'« E AND F CONVERSION ARE USED IN THE FORMAT 7.2.3.4

Ct*t*» STATEMENTS. SOME FORMAT DESCRIPTORS ARE REPEATED 7.2.3.3

7118 FORM A T ( 31 HI BEGIN COMPLEX CONVERSION TES T/32H EACH GROUP

1D BE IDENTICAL)

WRITE (NUVI .71 18)

C*t*t* INPUT CARD 11

7119 FORMAT ( 2( F3.T) 2(F4

READ (IRVI.7119) CHAVC.

. 1 /25P0 0824

. 4/52P0 0 82 4 /39P00825

/01 P0 082 5 S HO U L POO 8 25

P00825

P00825

P00825

P 0 0 8 2 5 P00825

P 0 0 8 2 5 P00825

P00826

P00826

P00826

P00826

P00826

P00826

P 0 0 8 2 6! P00826

P00826

P00826'

PO 08271

P 0 08 2

7

POO 8 2 7

;

P00827:

P0082 7- P0 08Z7I

P00827(

P00827;

. 1 /25P00827i

.3/41 P00827<

/ 0 1 PO 0 82 8

(

P00828

'. 1 /45P00828J

/04P00828:

. 1 /04P00828'

P00828!

BE I P 0 0 8 2 8

<

P00828J

1 ) . 2( F7 . 4) ) CHBVC. A1C(2)

C * * * * 7120

C * * * * 7122

INPUT CARDS 12

FORMAT ( 2(F6.2)

READ (IRVI . 7120)

INPUT CARD 14

13

2(E10.3)

A2C( 1 .2) . 2(E1 1 .4) , B3C(2,2, 1 ) 2(E8.1)/ 2(E14.7))

CHCVC , A 1 C ( 1 ) , CHDVC

FORMAT (F5.2, E11.4, E10.3. F4.1, 3 ( F 5 . 2 . E 1 1 . 4 ) ) READ (IRVI. 7122) A2C<2,1>, BVC, OAVC, LM2C(1,2),

FORMAT (/ 1 0H 1.0 5.5/ 2 X . F3. 1.2X. F3. 1 //

1 12H 22.0 66.6/ 2X, F4.1, 2X, F4.1 //

L L 1 C ( 2 ) 7123

2 18H 33.1234 55.0789/ 2X, F7.4. 2X. F7.4 ) WRITE (NUVI. 7123) CHAVC, CHBVC, A1C(2)

FORMAT ( / 16H 1 23 . 00 456 . 88/ 2X, F6.2, 2X, F 6 . 2 //

1 24H 0.123E+01 0.987E+01/ 2X, E10.3, 2X, E10.3 //

2 26H -0.2345E+02 -0.6879E+02/ 2X. E11.4, 2X, E11.4 //

3 20H 0.7E+03 0.4E+03/ 2X, E8.1, 2X, E8.1 //

4 32H 6.9876543E-04 0 . 1 3 5 79 1 3

E

- 04 / 2X, E 1 4.7, ZX, E14.7)

WRITE (NUVI. 7124) A2C(1.2). B3C(2,2,1). CHCVC. A1C(1), CHDVC

FORMAT (/ 2 OH 1 9.34 0.2468E + 02/ 2X, F5.2, 2X. Eli. 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 / )

)

WRIT^ (NUVI, 7126) A2C(2.1), BVC, QAVC, LM2C(1,2), LL1C(2)

7124

7126

C * * * * C 1 1 * t C • t * t

C 1 1 1 *

C 1 1 * *

C t * * c * * t > C * 1 1 * 7127

* O

r MATTED READ AND WRITE STATEMENTS WITH 7.1.3.2

* BLE PRECISION VARIABLES IN AN I/O LIST. 7.2.3.6

* D CONVERSION IS USED IN THE FORMAT STATEMENTS. 7.2.3.3

SOME D FORMAT DESCRIPTORS ARE REPEATED. (FIELD

WIDTH ALWAYS INCLUDES 6 EXTRA POSITIONS TO 7.2.3.6.2

» PROVIDE FOR SIGN, DECIMAL POINT AND EXPONENT 7.2.3.6

t AND 1 POSITION FOR OPTIONAL DIGIT ZERO BEFORE 7.2.3.6.2

t THE DECIMAL POINT)

FORMAT ( /Z5H BEGIN D CONVERSION TEST/3 2H EACH GROUP SHOULD

1 DENT I CAL

)

10 NBS FORTRAN Test Programs Version
WRITE (NUVI, 7127)

Ct***« INPUT CARD 15

7128 " FORMAT ( 2X, D 8 . 1 ) READ < I RVI , 71 28 > DPAVD

P0082880

P0082890

PO 682900

P0082910

C t * * t 7129

* INPUT CARDS 16, 17, 18

FORMAT ( 2(D10.3), D14.7, D18.11/ 3 ( D2 1 . 1 4 > / 2(D16.9)>

READ < IRVI ,7129) M C A 3 D (1,2,2), AC1D(2) , BC2D(3, 1) , AC1D(1

>

1 ZZDVD, AC1D(3). DPBVD , MCA3D (1,2,1), BC2D(1,2)

P0082920

P0082930

p 0 0 8 2940

P0082950

7130 FORMAT (/ 10H 0.1D+06)

WRITE (NUVI, 7130)

WR ITE C N U V I ,7128) DPAVD

FORMAT (,/ 12H -0.3340-04/ 2X, D10.3 / 2X. D10.3 //

T 16H 0 . 765 765-40 + 0 0/ 2X, 014 . 7 //

2 20H1 0. 1 234567890 1 D+10/ 2X, 018.11 //

P0082960

P0082970

p 0 0 8298 0 P0082990

P 0 0 8 3 0 6 0 P0083010

7131

3 23H 0.987654321098760-01/ 2X, 021.14/ 2X, D21.14 / 2X, D21

4 18H -0.5555555420+03/ 2X, D16.9/ 2X, D16.9 ) WRITE (NUVI , 7131 ) MCA3D (1,2,2), AC1D(2> . BC2D(3, 1 ) , AC1D(1)

1 ZZDVD, AC1D(3), DPBVD, MCA3D (1,2,1), BC2D(1,2)

14//P0083020

P0083030

P 66 83040

P0083050

C****« FORMATTED READ AND WRITE STATEMENTS WITH LOGICAL 7 . 1 . 3 . 2 . 1 /25P0083060

C*t*»* VARIABLES AND ARRAY ELEMENTS IN AN I/O LIST 7.2.3.7 /56P0083070

C**"**"* SOME L DESCRIPTORS ARE REPEATED. POO 830 8 0 7132 F0RMAT(//25H BEGIN L CONVERSION TEST/33H LINES BELOW SHOULD BE IP0083090

C * * * * *1DENTI CAD

L CONVERSION IS

WRITE (NUVI, 7132)

INPUT CARD 19

USED IN THE FORMAT STATEMENTS 7.2.3.3

P0083100

/01P00831 10

P 6 0 8 3 1 2 0

C * * * * P0083130

7133

1 ) FORMAT (L4)

READ (IRVI, 7133) A2B(2

* INPUT CARD 20

FORMAT ( 2(L4). L3, L2, L3

READ ( IRVI . 7134) MCA1 B( 1 ) ,'

1 DVB, A3B( 1 ,2,1)

P00831 40

P0083 1 5 0 POO 83 160

P0083170

P 0 0 & 3 1 8 0 P0083190

C * * * * 7134 2(L1 )

)

MCBVB, A2B(

1

1 ) , A3B( 1 , 1 , 1 ) , CVB

7135 FORMAT (//24H T F F T T FT F / 2X, 3(L4), L3, L2, L3, P0083200

1 2 C L 1 ) > P008321 0

WRITE (NUVI. 7135) A2B(2, 1 ) , M C A 1 B ( 1 ) , MCBVB, A2B( 1 , 1 ) . A3 B ( 1 , 1 , 1 ) , PO 6 83 22

0

1 CVB. DVB f A3B(1,2,1) P0083230

C * t * * c * * * *

c * * * *

c * * * * 7097

* FORMATTED READ AND WRITE STATEMENTS WITH ARRAY 7.1.3.2.1 /26P0083240

* NAMES OF ALL TYPES IN AN I/O LIST. THE NUMBER OF 7 . 1 . 3 . 2 . 1 / 39P0 0 8 32 5 0

*" "if EMS IN THE LIST IS VARIABLE. SOME FIELD 7.2.3.3 / 6 1 POO 8 3 260

* DESCRIPTORS ARE REPEATED. P0083270

FORMAT (//32H TEST UNSUBSCR I PTED ARRAY NAMES/35H

1ACH GROUP OF LINES/22H SHOULD BE IDENTICAL.)

WRITE (NUVI , 7097)

* INPUT CARDS 21. 22

IN I/O LISTS EP0083280

P0083290

P 0 6 8 3 3 6 6

c * * * * P00833 1 0 7098 F0RMAT(2X,8(F3.1).8F3.1/8(2(F3.1)))

READ (IRVI, 7098) B1C.B3C

* INPUT CARDS 23, 24, 25

FORMAT ( 2X , 4 ( F4 . 1)/4(D9. 2). 4D9. 2/5(12))

P0083320

P0083330

POO 8 33 40

P0083350

C t * t * 7099

READ (IRVI. 7099) A2S , A3D. MCA1

I

C**«*t INPUT CARDS 26, 27. 28

7100 FORMAT ( 2X , 4 ( D9 . 2 ) / 2 7(F2. 1 ) 7 5 ( L1 ) . 5 L 1

)

READ (IRVI, 7100) A2D , A3 S , A1B, A3

B

P0083360

P0083370

POO 833 8

6

P0083390

C * * * * 7101

7102

7103

INPUT CARDS 29, 30

FORMAT (2X, 4(12). 5(09. 2)/4(2(F3.1)).8( 12). 4(L1),5(F3.1))

READ (IRVI, 7101) 121, DPA1D, A2C, 131. A2B , CMA1S

FORMAT (/ 26H 9.91.19.92.29.93.39.94.4 / 2X , 8 ( F3 . 1 ) / 2X , 8 ( F3 . 1 )

)

7104

WRITE

FORMAT

13 8H ' -

2 12H

39D + 6 1 / 4 9( F4

" WRITE

FORMAT

1 11H

28(F3.1

3 6H

WRITE

(NUVI, 7102) B1C

(/ 18H -9.9-9.9-9.9-9.9/2X,

0.99D+01-0. 990+01 -0 . 990+01-6.

9999999999/ 2X, 5(12) //38H

2X, 4(09.2) // 37 H 6.9 6.9

.1)/ 1X. 9(F4.1)/ 1X,9(F4.1)/

(NUVI , 7103) A2 S . A3 D , MCA1I

,

(/ 10H TFTFTFTF/ 2X. 8 < L

1

6.99 b + 01/ 5 (D1 1 .27) 7 26H

)/2X.8(F3.1)/2X.8(F3.1)//18H

f F FT/ 2X, 4 (LI ) II 1 7H 9.99.

(NUVI. 7104) A3B. 121, DPA1D,

4(F4.1 ) //

990+01 /2X,4(D9.2)/2X

0.99D+01 0. 990+01 0 0.9 6.9 6.9 0.9 6.9

4H1 TF/ 2X,2(L1 ) ) A2D , A3 S , A 1

B

) // 10H 99999999/

Tf9 5 . 5 9.96.69.97.79

9999999999999999/2X

99 . 99 . 99 . 9 / 2X , 5 ( F3

.

A2C, B3C. 131. A2B.

P0083400

P0083410

P 6 6 8 3420

P0083430

POO 834 40

P0083450

.4(09.2)// P0083460

.990+01 0.9P0083470

6.9 6. 9/ IX. P 6 6 8 3 4 8

6

P0083490

P0083500

2X. 4( I2)//P00835 1 0 .98.8/2X, P 6683 520

.8(12)// P0083530

i)> P0083540

CMA1S P0083550

NBS FORTRAN Test Programs Version 1
C t « *

C * * *

c * * *

c * * * 7090

** FORMATTED WRITES TO TEST THAT LEADING BLANKS

t* ARE INSERTED IN THE OUTPUT FIELD WHEN THE OUTPUT

** PRODUCED IS SMALLER THAN THE FIELD WIDTH. ( I , E

,

** F AND D DESCRIPTORS ARE TESTED)

7.2.3 6/51P0083560

P0083570

P0083580

P0083590

FORMAT ( /30H LEADING BLANK INSERTION TEST/40H EACH PAIR OF LINEP0083600

1S SHOULD BE IDENTICAL) P0083610

WRITE (NUVI , 7090 )

' POO 83620

7096 FORMAT (/ 3H 8/I3//4H 22/I4//5H 22/I5//6H 22/16// P0083630

1 7H 22/17// 5H 7.7/F5.1// 7H 8.88/F7.2/ 9H1 9.999/ P0083640

2 F9.3// 11H 5 . 4444/F1 1 . 4// 13H 6 . 5 5 5 5 5 / F 1 3 . 5 / / P00 836 5 0 3 1 5 H 7 . 1 2 3 4 5 6 / F 1 5 . 6 / / 1 OH 0.21E + 01/E10.2// P0083660

4 12H 0.331E+02/E12.3// 14H 0 . 4 4 4 1 E + 0 3 / E 1 4 . 4 / / P0083670

7105

C * * *

c * * * 7138

5 16H 0.55551E+04/E16.5// 18H 0 . 66666 1 E + 0 5 / E 1 8 . 6 /

/

6 20H O.1234567E+06/E20.7)

WRITE (NUVI, 7096) MCA 3 1(1 ,2.3), I AC 1 I (3) , NECVI, I AC 11 (3)

1 IAC2K2.3), ACVS, A1S(2), BCVS, HHCVS, CMCVS. CMBVS,

2 DCVS, ACiS(25 ) , AC2S<4. 1 ) , A C 1 S ( 7 ) , AC1S(8), CMAVS

FORMAT (/ 9H 0.1D + 00/D9.1// 10H 0 . 1 D + 0 0 / D 1 0 . 1 / /

1 1 1 H 0.1 D + 00/D1 1 . 1 / / 12H 0 . 1 D + 0 0 / D 1 2 . 1 / / 2 10H 1.0 5.5/ 2(F5.1) // 12H 9.9 5.5/ 2(F6.1) //

3 14H 9.9 5.5/ 2(F7. 1 ) // 16H 1.0 5.5/ 2 ( F 8 . 1 ) > WRITE (NUVI, 7105) AC1D(3), 22DVD , 22DVD

,

"

1 2 2DVD , CHAVC, B3C( 1,1,1), B3C (1,1,1). CHAVC

** FORMATTED READ AND WRITE STATEMENT TO TEST THAT 7.2.3

P0083680

P0083690

P 0083700

P008371

0

P0083720

P0083730

POO 83 7 40

P0083750

P 0 0 8 3 7 6 0 P0083770

' POO 83 780

7/03P0083790

C * * * 7139

7140

* OPTIONAL BLANKS MAY PRECEDE A LOGICAL INPUT FIELD 7 FORMAT ( 33H1 TEST LOGICAL FIELDS WITH BLANKS / 33H LINES

10ULD BE IDENTICAL)

WRITE (NUVI. 7138)

* INPUT CARD 31

FORMAT ( L6. L4, L10. L5)

READ ( I R VI ,7139) AVB. M C A 1 B ( 2 ) , A2B( 1 , 2 ) , A3B<2, 1 ,2)

FORMAT (//27H T F T F/ 2X, L6. L4. L10

WRITE (NUVI, 7140) AVB, MCA1 B(2) , A2B( 1 ,2) . A3 B( 2. 1,2)

2.3.7/06P0083800

BELOW SHP0083810

P 0083 820

P0083830

POO 8 3 8 40

P0083850

P 0083860

L5) P0083870

P 0083 8 80

C * * *

C * * * C* * * 7108

C * * * 7141

** FORMATTED READ AND WRITE TO TEST F DESCRIPTORS

'*"* WHERE D IS EQUAL TO 2ER0 AND WHERE W EQUALS D ** (2ND TEST APPLIES ONLY TO READ STMNTS.)

FORMAT <7/36H TEST D = 0 , W = D + 1 (PAIRS OF LINES/

1LD BE IDENTICAL))

WRITE (NUVI, 7108)

INPUT CARD 32

28H BELOW

FORMAT (2X. F5.0, F5.5)

READ (IRVI.7141) ACVS, BVS

FORMAT ( //7H 4444./2X, F5.0//

WRITE (NUVI, 7109) ACVS, BVS

FORMATS WITH G CONVERSIONS

INPUT CARD 33

1 /31 P0 0 83 890

4/40P0083900

P008391 0 SHOUP0083920

P0083930

POO 8 3 9 4 0 P0083950

P0083960

P0083970

POO 8 3 9 8 0 P0083990

POO 8 40 0 0 P008401

0

POO 84020

P0084030

POO 84040

SHP0084050

POO 8 40 60

P0084070

P0084080

P0084090

P 0 0 8 41 0 0 P0 08 4 1 1 0

7109 9H 5 5 5 5 5 / 3X, F6. 5)

C t * *

C » * t 7142 FORMAT ( 3(G11.4), 3G11.4)

READ (IRVI.7142) AC 1 S ( 1 4 ) , AC1S(15).

""

1 A C 1 S (21 ) . AC 1 S ( 22 ) 7143 FORMAT ( / 2X.23HBEGIN G CONVERSION

1 0 U L D BE IDENTI CAL//36H 1 23 5 E + 05

2 G14.4.4X.2G1 1 .4///3X.33H 12.35

3 G14.4. 4X.2G11 .4)

WRITE(NUVI ,7143) AC 1 S ( 1 4 ) , AC1S(15),

1 AC1S( 21 ) , AC 1 S ( 22 > SCALE FACTOR APPLIED TO F,E,D,G

AC 1 S ( 1 6 ) , AC 1 S ( 1 7

)

/2X, 38HEACH

1 2 3 5 .

1 .235

PAIR OF LINES

123 757

.1235/

AC1S(16) , AC1SM7)

C * * *

c * * *

c * * * 7144

DESCRIPTORS

** ON READ,

** INPUT CARD

FORMAT ( 2PF8

.

READ ( IRVI ,71

1 BC2D( 1 , 4)

FORMAT ( 22H

1

1E//40H CARD

2 40H DESC

3 4 OH TO BE

4 4H IS, F1

""'5 40 H CARD

6 40H DESC

BUT NOT ON

34

3.-2PE9.4.F9

44 ) EP 1 S < 16)

.

, E P I S ( 2 0

)",' E P SCALE FACTOR

9 8 76.54

2PF8 .

3

98 . 76 5 4 2.4, E12.4,

987.654

0PG9.4

WRITE P00841 20

P 0 0 8 4 1 3 0

. 4, -2PE9. 4, F9. 4, 09. 4,2 PG 9.4) P 0084140

S( 1 8 ) , EP1 S( 1 9) , P0 08 4 1 5 0 2 ,1) , E P 1 S ( 2 3 ) POO 8 4160

IN ORDER OF FORMAT 0 C C U RR E N CP 0 0 8 4 1 7

0

9 8 7 6.5 4 / POO 8 4 1 80

F9.4/ P0084190

987654.00 / POO 8 42 0 0 P008421

0

86 . 4 786E2/ POO 8 42 2 0 -2PE9.4/ P0084230

7145

.4,0PG9.4,D9

EP1S(17) ,EP1

1 S ( 2 2 ) , B C 2 D ( ON READ / 3 1 H

9 8. 7 6 5 4 E 2 -2PE9 . 4

. 9877E+04

F12.2//

86 4 78 6D -4

D9 . 4

12 NBS FORTRAN Test Programs Version 1
7 40H TO BE 987.654 .86480-02

8 4H IS, P-12.3,.012.4. E 1.2. .4. /./.. 8648E+04/ P0084240

P0084250

9 40H CARD 86 . 4786 865 7 . 87D0 9876 . 54/

A 40H DESC F9.4 09.4 2PG9.4/

"B 4 OH TO BE 8647.860 .86580 + 64 98.77/

C4H IS, F 12. 3, D12.4, G16.4)

P0084260

P0084270

P0084280

P0084290

WRITE(NUVI,7145) EP 1 S ( 1 6 ) , EP 1 S ( 1 7 ) , EP 1 S ( 1 8 ) , EP1 S ( 1 9

>

1 BC20(1.4),EP1S(20).EP1S(22).BC2D(2,1),EP1S<23)

CTt'tT* SCALE FACTOR APPLIED TO F, E, D, G DESCRIPTORS

C***»* ON WRITE, BUT , NOT ON READ

P0084300

P0084310

P0084320

P0084330

C****« INPUT CARD

7152 F0RMAT(F8.2.E9

35 P0084340

4, F9.2, G9.3,D9.0,E9.4, F9 . 4 , D9 . 2 , G9 . 4 ) POO 8 43 5 0 READ ( I RV I .7152) A C 1 S ( 1 ) , AC 1 S ( 2 ) . AC 1 S ( 3 ) , AC 1 S ( 4 ) , POO 8 4360

1 AC1D(4) ,AC1S(20) ,AC1S(23) . AC 1 D ( 5 ) ,AC1S(24) P0084370

7153 FORMAT (/23H SCALE FACTOR ON WRITE/31H IN ORDER OF

1NCE//40H CARD 9.87655 98.7654E2 9876.54/

2 40 H DESC 2PF12.2 -2PE12.4 (=12.4/

3 40H TO BE 987 . 65 . 0099E + 06 98.7654/

4 4H IS, 2PF12.2, - 2PE 1 2 . 4 , F 1 2 . 4 / / 5 40H CARD 987.654 864786D-3 86.4786E2/

6 4 OH DESC 1PG12.2 612.4 -2PE12.4/

7 40H TO BE 9.88E+02 8.6479D+02 .0086E+06/

8 4H IS, 1 P G 1 2 . 2 , D12.4, -2PE12.4//

9 40H CARD 86.4786 8657. 86D0 9876 . 54/

"A 40H DESC 2PF12.2 1PD12.4 2PG16.4/

B 40H TO BE 8647.86 8.6579D+03 9877./

C 4H IS, 2PF12.2, 1 P D 1 2 . 4, 2PG16.4/7

FORMAT OCCURREP0084380

P0084390

P0084400

P0084410

P0084420

P0084430

POO 8 4440

P0084450

P0084460

P0084470

P0084480

P0084490

P00845 00

H28H THE LAST TWO LINES OF EACH/24H SET SHOULD BE THE SAME) P0084510

WRITE(NUVI,7153) AC1S(1),AC1S(2),AC1S(3),AC1S(4)

1 AC1D(4),AC1S(20),AC1S(23),AC1D(5),AC1S(24)

C 1/6 FORMAT RESCAN

C***«* INPUT CARDS 36, 37, 38

7146 FORMAT ( 1

1

', 12 ,13)

REAO( IRVI ,7146) I 2 I , I A C 1 I 7147 FORMAT ( / 37H FORMAT RESCAN - THE

10ULD AGREE WITH THE FIRST / / 1 5

H

SECOND GROUP OF/38H EACH

1 22 333/15H 4 55

P0084520

P0084530

' P0084540

P0084550

P0084560

P0084570

SET SHP0084580

. 666/P0084590

P0084600

P008461 0 P0084620

P0084630

p 6 6 8 4640

P0084650

P 0084660

P0084670

P0084680

P0084690

P0084700

P0084710

P 0 0 8 4 7 2 0

P0084730

P0084740

P0084750

p 6 0 84760

P008C1

P008C2

115H 7 88 999/1H

WR I TE ( NUV I ,7147)

FORMAT ( I 4 , 15 , 16 ) WR I TE < NUV I ,7148) 121(1

7148

1 ) , 121 (2, 1 ) , 121 ( 1 ,2) , 121 (2,2) , IAC1

I

C**«** INPUT CARDS 39, 40

7149 FORMAT (14, 2(11, 1X, 12))

READ ( IRVI , 71 49) 121, I AC II 7150 FORMAT ( / 2 1 H 2 ** 4 $$ 6 ( ( /7H 8 $$/1H )

7151

WR I TE < NUVI.7150)

FORMAT (14. 3H **,1(I4,3H $$,(I4,3H (()))

WR I f E ( NUV I , 7 1 5 1 ) I 2 I ( 2 , 1 ) , I 2 I ( 2 , 2 ) , I AC 1 K 2 ) , I AC 11 ( 4

)

C » END OF TEST SEGMENT 008

C** «** WHEN EXECUTING ONLY SEGMENT 008 , THE STOP AND

C « WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C** **« 1 AND 2 REMOVED

C= STOP

END CARDS

IN COLUMNS

END

STOP

END

PREPARED BY USER

DO NOT READ OR WRITE RECORD 2 . DOUBLE SPACE ON OUTPUT

PREPARED BY USER

DO NOT READ OR WRIT E R E CORD 4 DOU'BLE SPACE ON OUT PUT

PREPARED BY USER

DO NOT READ OR WRITE RECORD 6 DOUBLE SPACE ON OUTPUT

999

555554444

666 777777 8 333333 1 1 1 1 1 2 2 2 2 2 2 2 2 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 7.7123456.7

8.889.9997. 1 23456

5. 44446. 5555533. 133. 133. 133. 1444.

1

10

ID

ID

NBS FORTRAN Test Programs Version 1 13
5555.15555.1 66666.166666.1 44.22

2. 12. 12. 12. 12. 1666.3334.3334.3334.333

-6. 1E+01+0. 22E-01 6.333E+02 0.4444E+03-6

1.05.522.066.633.123455.0789

5 5 55 5E-03+0 . 666666E + 00 + 0 .98 76 543E+12

123.00456.88 0. 123E+01 +0.987+1

0.9876543E-04+0.1357913E-04

19 .'34 + 6 . 2468E+02 + . 765 + 2 87 . 643

+ 0 . 1 D + 06

0.2345+02 -0.6879E+2+0.7E+03 0.4E+03

96 0.5407E+0243.96+0.5407E+0243.96 0 .5 407 + 2

-0 . 334D- 0 4 -. 33 4- 4 + 0 . 7 6 5 7 6 5 4 D 0 0 0 . 1 2 3 4 5 6 7 8 9 0 1 D + 1 0

+ 0 . 987654321 09876D-1 +0. 987654321 098760-01 .987654321 09876-1

- . 5 5 5 5 5 5 5 4 2D + 03 -0 . 5 5 5 5 5 5 5 42 + 3 TAB C FDEFFGH I T * + T 1 F$)TF

9. 91. 19. 92. 29. 93. 39. 94. 49. 91. 19. 92. 29. 93. 39. 94.

4

9 . 9 5.5 9.96.69 . 97.79.98.89.95.59 .96.69.97.79.98.8

-9.9-9.9-9.9-9.

9

-0.99D+01-0.99D+01-0.99D+01-0.99D+01-0.99D+01 -.990+01 -.99+01

9999999999

+0.99D+01 0 .990+01 +.99001 +.99D1

.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 . 99D + 01 0.99D + 01 0 . 99D + 0 1 + 0 . 99 D + 0 1 4 99D 1 9 . 9 5 . 5 9 . 9 6 . 6 9.9 7 . 79 .9 8 . 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 T F F T 9 . 9 9 . 99 . 9 9 .9 9 .9

T F T F 4444.55555

123.45678E2 1234.5678 123.45678 12.345678 1.2345678 .12345678

.99 + 1

9876 . 5498 . 765 4E2 9876 . 54

9 . 8 76 5 5 98 . 76 5 4E2 9876.54

12233354488861 1222

4556662334449661 1

1

7889993775 5 5899777

11112 334 559 880 11

987. 654864786D-486.4786E286. 4786

987. 654864786D-386.4786E286. 4786

8657.8600 9876.54

8657. 86D0 9876.54

6 778 995 441 222 00

C******************************************************************

C * * * * * C***«* AFRMT - (009)

*****P00?0 010

P0090026

P0090030

P0090040

* * * * * p 0090 050

REFSP0090060

3.2.2P0090070

3 . 2 . 2 P 0 0 9 0 0 8 0 3 . 2 . 3P0090090

3 P 0 0 9 0 1 0 0 3.8 P0090110

P 6 09 01 20

/57P0090130

.3/54P009 01 40

/ 1 8P0 090 1 5 0 .4/22 POO 9 0160

P00901 70

PO 090180

.4/36P0090190

.6/01P0090200

P009021

0

POO 90 220

P0090230

. 1 /25P0090240

/16P0090250

/ 0 1 P0090260

P0090270

- 55P0090280

P0090290

p 6 0903 66

P00903 1 0 P0090320

P0090330

PO 0903 40

P001 0080

c * * * * *

C *****

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

C * * * * *

c * * * * *

c * * * * *

c * * * * *

C * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

C * * * * *

c * * * * *

c * * * * *

c * * * * *

*******************************************************

GENERAL PURPOSE

TO TEST SIMPLE FORMAT AND FORMATTED I/O STATEMENTS

WHICH USE A- CONVERSION SO THAT THIS FEATURE MAY

BE USED IN OTHER SEGMENTS

* * * * * ASA

7.1.

7.1.

7.1.

7.2.

7.2.

RESTRICTIONS OBSERVED

* ALL FORMAT STATEMENTS ARE LABELED

* H AND X DESCRIPTORS ARE NEVER REPEATED

* FIELD WIDTH IS NEVER ZERO

* IF THERE IS AN I/O LIST, THE FORMAT STATEMENT

CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER

THAN H OR X)

* ITEMS IN I/O LIST CORRESPOND TO FORMAT DESCRIPTORS

*"" FIELD WIDTH NEVER EXCEEDED BY OUTPUT

7.2.3

7.2.3

7.2.3

7.2.3

7.2.3

7.2.3

READ AND WRITE STATEMENTS FOR ENTIRE SEGMENT FOLLOW

FORMATTED READ AND WRITE STATEMENTS WITH ALL 7.1.3.2

TYPES OF FIELDS. ONLY A (HOLLERITH) CONVERSION 7.2.3.8

IS USED IN THE FORMAT STATEMENTS. SOME A FORMAT 7.2.3.3

DESCRIPTORS ARE REPEATED

C INPUT

COL . CARD f

CARD 2 CARD 3

C * * * * *

C * * * * *

c * * * * *

DATA TO THIS SEG. CONSISTS OF 3 DATA CARD IMAGES IN COLS. 1

1 31 55

B = E F - * JK L / ( ) 6 1 2T UVW+ , . $X YZACDGH I PQRSMN0678 ( C ) B2$9 + A3 4 5 QZ1*A

ABCDEFGHI JKLM NOP OR ST U VWXYZ

SPECIFICATIONS SEGMENT 009

14 NBS FORTRAN Test Programs Version 1
c * * * *

c * * * *

c * * * *

c * * * * c=c=

c=

c=c=

* WHEN EXECUTING ONLY SEGMENT 009, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS i AND 2 REMOVED

.

P0010085

P001 0090

POO 1 0095

POO 1 0 1 00

DIMENSION A1S(5),A3S(3,3,3),EP1S<33>.IAC2I(2,7),AC2S(5,6)

1 , MCA1 I ( 5 ) , CMA1 S ( 5 ) INTEGER BVI , MAVI , LAVI , MCA3 1(2.3. 3)

REAL MVS, CVS, BCVS

PO 0 1 0 1 0 5 PO0 1 0 1 1

0

poo id ii

5

P001 0120

LOGICAL MCA1B(7), A1B(2), A2 B ( 2 . 2 ) . A3 B ( 2 . 2 . 2 ) . AVB , E VB

DIMENSION A1S(5) ,A3S<3,3,3) ,EP1S(3 3>, IAC2I (2,7) ,AC2S<5,6)

1 . MCA1 1(5), CMA1S(5)

INTEGER BVI , MAVI , LAVI . MCA3 I (2

REAL MVS , CVS , BCVS

PO 0 1 0 1 2 5 P009A1

P0 09A2

P009A3

P0 09A4

3,3)

L 0 G I C A L MCA IB (7) , A 1 B ( 2 ) , A2 B ( 2 , 2 ) , A3 B (2,2 ,2 ) , AVB , EVB P.009A5

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

P001 0130

* INPUT-OUTPUT TAPE ASSIGNMENT STATEMENTS P0090350

* P00701 50

* WHEN EXECUTING ONLY SEGMENT 009, THE FOLLOWING TWO STATEMENTS P0070155

* NUVI = 6 AND IRVI = 5 MUST HAVE

* THE C= IN COL 1 AND 2 REMOVED.

NUVI = 6

IRVI = 5

P0070160

P0070165

POO 701 70

P00701 75

C =

C = NUVI - 6

IRVI = 5 P009B1

P009B2

POO 70 180

P0090360

C * * * * * WRITE (NUVI, 0090)

READ (IRVI, 009 1 ) MVS, I AC2 I ( 2 , 2 ) , MAV I , AC2S ( 4 , 2 ) , M CA1 I ( 1 ) , LAV I , P0090370

1 A2B(1 ,2) .A1B(2) . BCVS. MCA1B(2). BVI. CVS. EVB,A1S(2),EP1S(9), P0090380

2 A3 S ( 1 . 1 . 1 ) , A3 B ( 2 , 2 , 1 ) . M C A3 I ( 1 . 2 . 3 ) , M CA3 1(2,1,2), M CA3 1(1,1,3) P 0 0 90 3 9 6 WRITE (NUVI, 0092 ) BVI, MVS, CVS, MAVI, EVB, MCA1K1), EP1S(9>,~ P0090400

1 a 1 s ( 2 ) , a"i"bi"i

2

:") mca'i b (2) V ia c 2 iTz ,2) ac2S(4.2) , p 0 0 9 0 4 1

0

2 LAVI, BCVS, A2B(1,2), MCA3 1(1,1,3), A3S<1,1,1), P0090420

3 MCA3I (2, 1 ,2) , MCA3I ( 1 .2.3) , A3B(2,2,1)

Ct**** FORMATTED READ AND WRITE TO TEST HOLLERITH FIELDS 7.2.3

C * * * * * WHERE FIELD WIDTH IS LESS THAN THE WORD LENGTH 7.2 .3

C***«* CAPACITY OF THE MACHINE

P0090430

8/22P0090440

8/28P0090450

P0090460

WRITE (NUVI, 0093)

READ (IRVI, 0094) CMA1S(2), CMA1S(1), LCCVI, AVB, BVI

WRITE (NUVI, 0095 ) BVI, AVB, CMA1S(2) , LCCVI. CMA1 S ( 1

)"'

* FORMATTED READ AND WRITE TO TEST HOLLERITH FIELDS

P0090470

P0090480

' P0090490

C * * * * 7.2.3.8/20P0090500

c * * * *

c * * * * WHERE FIELD WIDTH IS GREATER THAN THE WORD LENGTHCAPACITY OF THE MACHINE

WRITE (NUVI ,0096)

READ (IRVI. 0097) MRRVI

7.2.3 8/25P0090510

P0090520

P0090530

P0090540

C t * * *

c * * * *

C * t * *

c * * * *

c * * * *

C t * * * 0090

WRITE (NUVI, 0098) MRRVI P0090550

P0090560

P009057C

P0090580

7.2.3.8/16P0090590

7.2.3.3/01P0090600

FORMAT STATEMENTS FOR THE ENTRIRE SEGMENT FOLLOW

FORMATS TO TEST A CONVERSION. FIELD WIDTH IS

FROM 1 TO 4 CHARACTERS. SOME A DESCRIPTORS ARE

* REPEATED. P0090610

FORMAT (1H1 ,1X f 26HAFRMT - ( 009) A- CONVERS I ON / / 2X . P0090620

1 1 7HASA RE F - 7.2.3. 8//40H EACH PAIR OF LINES SHOULD BE I DENT I CAL / PO 09063 0 28X.26HFOR COMPUTERS STORING FOUR / 8X . 2 7H0R MORE CHARACTERS PER WORDP0090640

3) P0090650

FORMAT ( 2(A1) f 2(A2) f 3(A3) f 3(A4), A1 , A2. A3 A4, 6<A3>> P0090660

FORMAT ( // 29H AB CDE FGH I J K LMNOPORSTUVWX YZ/ 2X, 2(A1 ) . 2(A2) . P 0 0 9 0 6 7

0

1 3(A3), 3(A4)//12H =-*/()+,.$/ 2X, A1 . A2 , A3. A4 // P0090680

2 20H 0123456789+AB2$(C>/ 2X. 6 A3 ) P0090690

7.2.3.8/22P0090700

0091

0092

C * 1 1 * t* * * * 0093

FORMATS TO TEST A CONVERSION WHERE FIELD WIDTH

* IS LESS THAN THE WORD LENGTH CAPACITY OF MACHINE

FORMAT (//35H TEST A CONVERSION - ADDING BLANKS/40H

1 LINES SHOULD BE IDENTICAL)

FORMAT ( 5(A1>)

7.2.3.8/28P0090710

EACH PAIR OFP0090720

P0090730

P0090740

3X, A 3/7 PO 090 75 6 P0090760

7.2.3.8/20P0090770

7.2.3.8/25P0090780

0094

0095

C * * * * c * * * *

FORMAT (//4H A / 3X, A3//4H */ 3X. A3 //4H

1 4H 1/3X, A3 //4H 21 3X.A3)

* FORMATS TO TEST A CONVERSION WHERE FIELD WIDTH

* IS GREATER THAN WORD LENGTH CAPACITY OF MACHINE

0/

NBS FORTRAN Test Programs Version 1 1 5
0096 FORMAK/25H TEST A FIELD TRUN CAT I ON / 3 7H 2ND LINE SHOULD PART I AL LP0090790

1Y MATCH 1ST) P0090800

0097 FORMAT ( A26 ) P 0 6 9 0 8 1 6

0098 FORMAT (// 28H AB CDE FGH I JKLMNOPQRSTUVWXYZ / 2X, A26) P0090820

C »"** «"*"

" END OF TEST SEGMENT 009 PO 090 83 0 C****« WHEN EXECUTING ONLY SEGMENT 009 , THE STOP AND END CARDS P0090840

CT_i ^ HICH A p PEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS p 0090 850

C***«* 1 AND 2 REMOVED P0090860

STOP

END

STOP

END

P0090870

P0090880

POO 9 CI

P009C2

B=EF-*JKL/()012TUVW+, .$X Y2ACDGHIPQRSMN0678(C)B2$9+A3 45

QZ 1 * A

ABCDEFGHIJKLMNOPtJRSTUVWXYZ

Ctt**«»»»«»««»*«»t««««««t*i*««tt**«t****««tt*»*t«»»»t*«««t**«««»*t«t*t«*P01O0010

c * * * c» « *

c * * *

c * * *

c * * t

c * * *

c * * *

C t * *

c * * *

c * * *

c * * *

c * * *

c * * *

C * * *

c * * * c * * *

c * * *

c * * *

c * * *

p. * *

*

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c; * * *

c * * *

c * * *

c * * *

c"= c=

c'= c=

c'= c=

c=

c=

** P0100020

t* DATA2 - (010) P0100030

*"* PO 1 00040

tiit«iit«iittiitiiiititiiiiiittiiittiiiit)iiitttiititt«ittiittiitiitP01000^0

*"* P 6 1 00060

P0 1 00070

PO 1 00 080

U,:\\i\ J ! A ! t f1 c f'J I I I''.' it I:: UAi/VI - (UU;. J PO 1 00 090

GENERAL PURPOSE

TO TEST CONTENTS OF VARIABLES THAT WERE FORMED BY

DATA STATEMENTS IN SEG. DATA1 - (003)

• ***t**»**t««ttt*»«**«*«*t»«««««*«*«t»«»*«»»t«***tti»*»*»«»*t«tt«»*t*P0030010

** P0030020

'*"* DATA1 - ( 003 ) POO"3 00 30

*« COMPLETE WITH DATA2 - (010) P0030040

** P 0 0 3 0 0 5 0 **t»*t«t««»*»t»«»»*»tt*«*t*»t*t»****»*******t**i*««***»t«»t(,t*««**t*P0030060

** GENERAL PURPOSE

** TO TEST FORMAT OF DATA STATEMENT

*"* REST R i CT 10 N S OBSERV ED

** NO DUMMY ARGUMENTS OR EXTERNAL FUNCTION NAMES

** APPEAR IN DATA STATEMENTS

* *

*.* no initTaly defined items APPEAR IN BLANK COMMON

* *

*"* STORAGE UNITS IN IT I A LI ZED ONLY ONCE

** SUBSCRIPTS ARE INTEGER CONSTANTS

** EXPLICIT VARIABLES

** AVI IS INTEGER

** JVS IS REAL

* *

*'* S P E C I F I C 'A f I 0 N S SEGMENTS 0 03 AND 010

* * ** WHEN EXECUTING ONLY SEGMENTS 0 03 AND 010 , THE SPECIFICATION

** STATEMENTS WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

** IN COLUMNS 1 AND 2 REMOVED

.

ASA REFSP0030070

7.2.2 P0030080

p 6 6 30 090

7.2.2/27P0030100

87V. 1 .1/40 POO 30110

10.J.2/08P0030120

7 . 2.2 / 3 9 P 0 0 3 0 1 3 0 10.2 . 4/47P00301 40

1 0.1 .2/1 OPO 03 0 1 50

7.2.2/28P0030160

P 0 0 3 0 1 7 0 P0030180

P 6 030190

P0030200

P0030210

P0030220

PO0 10 140

P 0 0 1 0 1 4 5 P 0 01015 0 P0010155

PO 0 1 0160

PO 0 1 0 1 65

P 0 0 1 0 1 7 0

P 0 0 1 0 1 7 5 p 0010180

P 0 0 1 0 1 8 5 P 0 0 1 0 1 9 0 P 0 0 1 0 1 9 5 p 66 i bzob

P003A1

PO 03A2

P003A3

P003A4

P003A5

P003A6

P003A7

P0 03A8

P0030230

* * DIMENSION IAC2K2.7), EP1S(33). AC2S(5,6)

1 , AC3S( 1 ,1.3)

INTEGER AVI , M CA3 K 2 ,3,3) » I i i ( 5 ) REAL JVS

LOGICAL MAVB , MBVB , M CVB , M CA1 B ( 7 ) . GH2 B ( 1 . 2 ) , G I 3 B ( 1 . 1 . 2 ) , GG 1 B ( 2 ) DOUBLE PRECISION AVD , B VD , CVD , DVD

1 , D P A 2 D ( 2 , 2 ) , M C A 3 D ( 1 , 4 , 2 ) , A1 0(4)

COMPLEX ADSVC,BCVC,CHEVC ( DCVC,LL1C(32),LM2C(8,4).LN3C(9,2,2)

C * * * * * DIMENSION IAC2K2.7), EP1S(33), AC2S(5,6)

1 ,AC3S( 1 , 1 ,3)

INTEGER AVI , MCA3 1(2,3,3). 111(5)

C * * t

REAL JVS

LOGICAL MAVB. MBVB. MCVB. M CA1 B ( 7 ) . GH2 B ( 1 , 2 ) , G I 3 B ( 1 , 1 . 2 ) , GG 1 B ( 2

)

DOUBLE PRECISION AVD , BVD , CVD , DVD

1 ,DPA2D(2,2) ,MCA3D(1 ,4,2) ,A1D(4)

COMPLEX ADSVC.B C V C , C H E V C , D C V C , L L 1 C ( 3 2 ) , L M 2 C ( 8 , 4 ) , L N 3 C ( 9 ,2 , 2 ) ** TEST DATA INITIALIZATION OF INTEGER CONSTANTS TO 5.1.1.1

16 NBS FORTRAN Test Programs Version 1
C t * * »

INTEGER VARIABLES

DATA 1 1 1 ( 1 ) ,. M CA3 I < 1 , 2 ,. 1 > „ M CA3 I ( 2 „ 2 , 2 > I AC2 I ( 2 , 5 ) „ I AC2 K 2 , 6

)

AM C A3 I (2, 1 , 1 >/0, 2* 1 0,3*246/

TEST DATA INITIALIZATION OF REAL CONSTANTS TO

P0030240

P0030250

P6630260

C * * * P0030270

C t * t 5.1.1.2

** REAL VARIABLES P0030280

DATA EP1S(8>.EP1S(10),EP1S(12),AC2S(5 f 5),EP1S(11),AC2S(5,3). P0030290

A A C 2 Si 5 , 2 ) / 2 * 6 . /2 * - 7 5 0 /0 5 . . 2 4 6 1 5 E 3 , 2 . 4 6 1 5 E 2 , 3 . 5 4 6 7 4 E + 3 / P 0 03030 0

C t * * ** TEST DATA INITIALIZATION OF DP CONTANTS TO 5.1.1.3 P0030310

c * * * ** DP VARIABLES

DATA BVD ,DPA2D(2,1).CVD,DPA2D(1,2), DVD,DPA2D(2

A3 . 345 . 67890 1 0 + 2 , 1 1 2 2 33. 50-08 . 1 1 . 2 2 3 3 5 D - 4 , 3 . 4 D 1 2 .

6

** TEST DATA INITIALIZATION OF COMPLEX CONSTANTS

2) / + 34567890 . 10

34013/

'

TO 5.1.1.4

P0030320

P0030330

P0030340

C * * * P0030350

c * * * -* COMPLEX VARIABLES P0030360

DATA ADSVC,LN3C<9,1,2>,LL1C(30).LN3C<8,2,2).LM2C<8,3) f LN3C<9,1,1),P0030370

"ALU C(32> , LN3C( 8 , 1 , 2 ) / 2 *( 1 1 . 1 , 22 . 22 ) , (-3 . 45E1 .-67.8E-1 ) . P0030380

B(-34.5E0,-6.78E0),(10.E0,-20.E0),<1.0E1,-2.0E1),. ( -20 . OE 1 , +4 . E3 ) P0030390

C(-200.E0,+4000.E0>/

C*«*** TEST DATA INITIALIZATION OF LOGICAL CONSTANTS TO

C *"*"*"*"* LOGICAL VARIABLES

DATA MAVB ,MCA1B(6), MBVB / Z *. TRUE ... FALSE .

/

5.1.1.5

P0030400

P0030410

P00304Z0

P0030430

C * * * * * TEST DATA INITIALIZATION OF HOLLERITH CONSTANTS 5.1 .1.6

C * * *

C * * *

data gi3b(1.1.2),gg1b(1),ep1s(15)/2hn0,2*2had/

'** Test data initialization of a mixture of all Types of

** constants and variables in one data statement

data 11 i (2) . iac2i < 1 , 5) , iac2i ( 1 ,3) , 1 1 i ( 5 ) , i a c 2 i ( 2 , 4 )

,

AM C A3 1(1, 1,2), AVI . EP1 S < 1 3 ) . AC2S ( 2 . 6 ) . AC2S < 1 . 6 ), AC3S <

1

,1,11,.

P0030440

P0030450

P0030460

P0030470

P0030480

P0030490

BAC2S(3.6),AC3S(1,1,2),AC2S(4,6), AVD,A1D(1),DPA2D(1,1), P0030500

CMCA3D(1.1,1).A1D(2),MCA3D(1 ( 1,2),LL1C(29),LN3C(8,2.1),BCVC, P0030510

DLM2C(8. 4) ,GH2B( 1

, 1 ) ,GI3B( 1 , 1 , 1 ) , M CVB / 3 * 0 , 4 * - 7 5 0 , Z * 0 . . Z * Z 46 . 1 5 . P0030 5Z0

E354674 . E-2 . 3 5 4 . 674E+ 1. 35467. 4E-01. 3*-. 29505. -29. 5D + 3, P0030530

F3456 . 7890 1 0 + 0 1 , 0.34567890 1 D + 5,2*(1 . 1 1E 1 .+222.2E-1 ) . (-34. 5.-6.78)

G(-. 3 45E2 , -678. E-2). 2*. TRUE. , .FALSE./, 111(3), 111(4),

HMCA3 I ( 1 . 2. 2) , AC2S( 5 , 6) , JVS , EP1 S( 1 4) , AC3S( 1 , 1 . 3 ) . I AC2 I (

1

ICHEVC,LL1C(31),DCVC.LM2C(8,2).A1D(3),MCA3D(1,3,1).A1D(4).

4)

P0030540

P0030550

P0030560

P0030570

JMCA3D ( 1 .4,1),

K-.75005E03.-7

MCA1B(7) . GH2B ( 1 ,2)

5005E+0Z,ZHBC.2H*=,2H P,2*(10.,-20.)

/ 2*10. +246. P0030580

P0030590

C * * *

c * t *

c * * *

c * * *

c * * *

c * * *

c"=

L ( -200 . , + 4000 . ) , < -2 00 0 . E1

M34. 0011, 0.034014,2*. FALSE

** END OF SEGMENT 003

+ 400

/ E1).+1122.335D-6.0.00001122335D+2

* *

P0030600

P0030610

P0030620

PO 1 00 1 00

** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0 1 0 0 1 10

* * P 0 1 00 1 2 0

'*'"*' WHEN EXECUTING ONLY SEGMENTS 00 3 AND 010 THE FOLLOWTNG STAT EH EN f P 6 6 7 01 9 6 ** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070195

NUVI = 6

NUVI = 6

P0070200

P010B1

POO 7020

5

PO 1 0 0 1 30

' P 0 1 0 0 1 4 0 P0 1 0 0 1 5 0

P01 001 60

TP 0 1 0 0 1 70

PO 100 180

P01 001 90

PO 100200

P0 1 0 02 1 0

PO 100220

P0100230

P 0 1 0 0 2 4 6 P0100250

P 0 1 0 6 2 6 0 P0100270

P01002S0

P0100290

'' P0 1 0 03 00

PO 1 0031 0 P0100320

P0100330

c * * *

100

* t WRITE (NUVI, 100)

FORMAT (1H1.1X, 32HDATA2 - (010) DATA STATEMENT USE/

A /2X.17HASA REFS. - 7.2.2//2X.7HRESULTS)

WRITE (NUVI .101)

FORMAT(/35H LINE 1 OF EACH GROUP IS H 0 L L E R I TH / 3 6

H

101 INFORMATION

AEST IS SUCCESSFUL IF/37H

WRITE (NUVI , 102) 111(1).

A MC A3 1(1

B IAC2K2

EACH GROUP CONTAINS THE SAME VALUES)

111(2), IAC2K1.5). IAC2K1.3),

2,1). MCA3I (2,2.2) . 111(3), 111(4).

5) , IAC2I (2,6) , MCA3I (2. 1 , 1 )

,

CD MCA3I (1 ,Z,Z)

.

AVI

72 5X. 1H0/4( 126/)//

24X,2H10/4(I26/)//

111(5). IAC2K2.4), MCA3 1(1,1,2),

102 FORMAT (

B 23X,3H246/4( 126/)//

C 22X,4H-750/4(I26/))

WRITE (NUVI, 103) EP1S(8) , EP1S(10) , EP1SC13) , A C 2 S ( 2 , 6 )

,

A AC2S C

1

,6) ,AC3S(1 , 1

, 1

)

, EP1S(11

)

f AC2S(5,3),

B AC2S('3,6) , AC2S(5,2) , AC3S(1 .1 ,2) , A C 2 S ( 4 , 6 ) C EP1S(12), AC2S(5,5), AC2S(5,6), JVS

FORMAT ( /22X,4Hb.00/4(F26.2/)//

A 20X.6H246. 1 5 / 4 ( F2 6 . 2 / ) /

/

103

NBS FORTRAN Test Programs Version 1 17
B 19X,7H3546.74/4(F26.2/>, P0100340

C 1H1,18X,7H-750.05/4(F26.2/>) P0 1 003 50

WRITE (NUVI , 104) ADSVC, L L 1 C ( 2 9 ) , LN3C(9, 1 ,2) , LN3C(8,2, 1 ) , P 0 1 0 0 3 6 0 A BCVC,. L L 1 C ( 3 0 )

, LM2C(8,4), L N 3 C < 8 . 2 t 2 ) , P0 1 00370

B CHEVC, L L 1 C ( 3 1 ) , LM2C(8,3> , LN3C(9, 1 , 1 ) , PO 1 00380

C . DCVC (. LL1C<32>,. LM2C(8,2), LN3C(8,1 f 2> P0 1 00390

104 FORMAT ( /9X, 1 7H 1 1 . 1 2 2 . 2 2 / 4 < F 1 4 . 1 , F 1 2 . 2 / ) / / P 0 1 0 0 4 0

0

A 8X,18H-34.50 -6 . 78 / 4 ( F 1 4 . 2 , F 1 2 . 2 / ) / / P0 1 00 4 1 0

B 8X, 18H 1 0.00 -20.00/4(F14.2,F12.2/)// P0 1 00 42 0 C 5 X f 2 1 H -200.00 40 0 0 . 0 0 / 4 ( F 1 4 . 2 , F 1 2 . 2 / ) ) P0 1 0 0 43 0 WRITE (NUVI. 1 0 5 ) AVD, A 1 DC 1 > « DPA2D ( 1 , 1 ) , M CA3 D ( 1 , 1 , 1 ) , PO 1 0 0 4 40

A BVD, A1D(2). DPA2D(2,1), MCA3D ( 1.1.2). P0100450

B CVD , A 1 D < 3 ) , DPA2D (1,2), M C A 3 D ( 1 ,3,1), PO 1 0 0 460

C DVD. A1 D ( 4 ) . DPA2D(2,2). MCA3D(1,4,1) P0100470

105 FORMAT ( /16X, 1 OH-O . 29 5 D + 0 5 / 4 ( D2 6 . 3 / ) / / P 0 1 00 480

A 11X,15H0.345678901D+05/4(D26.9/)//. P0100490

B 1 3 X . 1 3 HO . 1 1223350-02/4(026.7/) . P 0 1 0 0 5 0 0

C 1H1, 17X,8H0.34D+13/4(D26.2/) ) P 0 1 0 0 5 1 0 WRITE ( NUVI ,106) MAVB, M CA1 B ( 6 ) , GH2 B ( 1 ,1 ) , G I 3 B ( 1 , 1 , 1 ) ,

" PO 1 0 0 5 2 0 A MBVB , MCVB, MCA1 8 ( 7 ) , GH2BC1.2), GG1B(1>, P0100530

B E P 1 S ( 1 5 ) , G I 3 B ( 1 . 1 , 2 ) , PO 1 00 5 4 0

C EP1S(14), AC3S(1.1,3), I A C 2 I (1 , 4 ) P0 1 0 0 5 5 0 106 FORMAT (//20X, 4H T/ 4(L24/)// PO 1 0 0 5 60

A 20X.4H F/ 4(L24/)// P0100570

B 22X , 2HAD /2(22X,A2/)/ P0100580

C 22X.2HN0 / 22X.A2// P0100590

D 22X.2HBC / 22X.A2// P 0 1 0 0600

E 22X.2H*= / 22X.A2// P 0 1 0 0 6 1 0

F 22X.2H P / 22X.A2) P 0 1 0 0 620

Ct**»* END OF SEGMENT 010 P0100630

e"*"*«"*» WHEN EXECUTING ONLY SEGMENTS 003 AND 010, THE STOP AND END P0 1 00640

C***** CARDS WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0100650

C* '* *"« * I N COLUMNS 1 AND 2 REMO V ED PO TO 0 660

C= STOP P0100670

C= END PO 1 0 0 6 8 0 STOP P010C1

END P010C2

C**************»*****************************«**************************P0110010

C *

"* "* "* * P O 1 1 0 0 2 0 C****« AASGN - (011) P 0 1 1 0 0 3 0 C*"*"«*« PO 1 1 00 40

C*t*»*****t»t******t*******»****************t****************«**********P0110050

C'*'**'*« GENERAL PURPOSE ASA RE F PO 1 1 0 0 60

C*t*** * TO TEST VERY SIMPLE ARITHMETIC ASSIGNMENT 7.1.1.1 P 0 1 1 0 0 7

0

C **"*'*« STATEMENTS , SO THAT THIS STATEMENT MAY BE P0 1 1 00 8 0 [«»•»» USED IN LATER SEGMENTS PO 1 1 0090

C»»*»* * TO TEST THAT ALL TYPES OF I NTEGER AND REAL CONSTANTS 5 . 1 . 1 PO 1 1 0 1 00

C*t*tt MAY BE FORMED 5 . 1 . 1 . 1 PO 1 1 0 1 1

0

C**'*«» 5.1 .1 . 2P01 10120

C****» GENERAL COMMENTS P 0 1 1 0 1 3

0

C * *"*"* * t ONLY REAL AND I NTEGER TYPES ARE I NCLUDED I N P 0 1 1 0 1 4

0

C*t**t THIS SEGMENT - NO MIXING OF TYPES P0110150

C***»* * IN ORDER NOT TO EXCEED THE WORD LENGTH CAPACITY OF P01 10160

C*t**t SOME COMPUTERS, INTEGER CONSTANTS ARE LIMITED TO P 0 1 1017 0 C 5 DIGITS AND REAL CONSTANTS TO 7 DIGITS. P01 1 01 80

C***«* P01 10190

C"t"t *"t '* S P E C I F I C A f I 0 N S SEGMENT 011 P 0 1 1 02 0 0 C****« P0010210

' C

*

'*"t 1 1 WHEN EXECUTING ONLY SEGMENT 011 , THE SPECIF I CAT I ON ST AT EM EN T PO 0102 1 5 C****« WHICH APPEARS AS A COMMENT MUST HAVE THE C= REMOVED P0010220

C= DIM E N S I 6 N I A C 1 K 5 ) . I AC 2 I ( 2 ,7 > . A C 1 S ( 2 5 ) . A C 2 S ( 5 , 6 ) . A2S(2 ,2) P00 1 022 5 DIMENSION IAC1I(5).IAC2I(2.7).AC1S(25).AC2S(5.6),A2S(2.2) P011A1

C***** P 0 0 1 0 2 3 0 C.*.* * 1 1 OUTPUT TAPE ASSIGNMENT - NO INPUT DATA PO 1 1 02 1 0 C * * * * * p 0 0 702 1 0 [«»«*» WHEN EXECUTING ONLY SEGMENT 011. THE FOLLOWING STATEMENT P0070215

C *"*"*"** NUVI s 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070220

C***«* P0070225

18 NBS FORTRAN Test Programs Version 1
C= NUVI = 6 P0070230

NUVI = 6 P01 1 B1

c * * * * * P0070235

WRITE (NUVI ,110) P0 1 1 0220

110 FORMAT (1H1.1X, 37HAASGN - (011) SIMPLE REAL AND INTEGER/10X.32HARP0110230

1 I THMET I C ASSIGNMENT STATEMENTS/2X, 16HASA REF. - 7 . 1 . 1 //34H LINE 1P0110240

2 OF EACH PAIR IS HO L L E R I TH / 1 3 H INFORM AT I0N//17H I NTEGER RESULTS ) P0 1 1 02 5 0 C**t«* HEADER FOR SEGMENT 011 WRITTEN P01 10260

C«**** TEST ASSIGNMENT OF UNSIGNED INTEGER CONSTANTS 7. 1 . 1 . 1 /40P0 1 1 0270

C***»* TO VARIABLES 5 . 1 . 1 .1/1 5P0 1 1 028 0 MRRVI = 1 P0 1 1 0290

JACVI = 12345 P0 1 1 0300

KBCVI = 000 PO 1 1 03 1 0 Otttt TEST ASSIGNMENT OF SIGNED INTEGER CONSTANTS TO 7. 1 . 1

A i i A ^ A A A A ^ ^ A .1/40P0110320

P ..... . V/AnTAHl PO

C * * * * * VARIABLES 5 . 1 . 1 / 1 1 P0 1 1 03 30

PI LAV I - + C P0 1 1 03 40

L 1 1 V 1 - - 5 P0 1 1 03 5 0 Mr*r\/i - - 1 7i ? n t\ A A f\ ^ / A P0 1 1 0360

MCr\/T - +

" A Q 1 7 lit IV I - + 0 7 I <£ P 0 1 1 0 3 7 0

f" * # * * * TCCT AQQinMMCWT flC IIMQIRMCn IMTCHPR r fl N Q T A W T c

^ * * i » * icoi A93 i unncn i ur uimoiuimcu i n i tutu l u im d i a im i o

7 1 . 1 .1/40P0110380

r * * * * * T f| ADD A VC c

J . 1 . 1

A f4CnA4«1A7nA .1/15P0110390

i if 1 id) - n nA4 4A/ AA

P 0 1 1 0 4 0 0

! I n ! n 1 ^ - ft? LA t HA1 4A / A. f\ P 0 I 1 0 4 1 0

T A f ? T f ? ? ^ - ft ft P0 1 1 04Z0

1 » P1 1 f 7 1 - LULL PUT 1 0 4 3 U ^*K»*x ICSI nDoluHnCN 1 Ur o ! u BCD 1 IM 1 t U C n LUN3 1 All 1 0

7

/ . 1I 1

. I 1 / / AOrt 1 1 A/ / A

I,f **   **  ** T(l 1 u AADDAVC K K A T o

c

J

4

. 1 ,1/1 IrUl lU^DU

I A T 7 I ( 1 1 1 - + A <\ DA 1 1 A / L A PUIIUhoU

IAL1 I U) - + h 5 L \ DA11A/7A PU1

1 * n ! m \ - _ 7 7 nAi 1A / OA

P 0 l I 0 4 8 0

I i n i m 7 \ - _ 7177 DA 1 1 A / OA PU1104V0

r****» TCCT ICC 1 RMMCMT DC 1 1 N C T fi M C n DCAI f Pi M C T A N T C L" " " " 1 c o 1 nSQloNnCIMI UP UIMSlulMtU KtAL t U IM o 1 A IM 1 57

4

1

4

. 1 1 / / AOA 1 1 A t A A .I/40P0110500

r * * * * * Tfi WADTADICC /DACIT DCAI PdllCTAllTC ( L * « * * IU VAKIABLtb v BAo 1 L KtAL LUNblANIaJ c

J .

41

4

. 1 .Z/18P0110510

a r V/ C - 4 A A L Vb - 1 . U

F=\ A A A ACTA

P 0 1 1 0 5 2 0 B flip _ 7 c 0 L 7 7 1 BLVS - 3 5 8 . 6 / Z 4

R A -1 4 AC7A

P 0 1 1 0 5 3 0

P * * * * * TCCT AGO 1 hllMCUT flC OTPMCri DCAI r/lMCTAHTC L****» Itbl As o

1

b N n t N 1 Ur olbNtU KtAL LUNblANIb 7

/ . 1 . 1

A 1 1 A (A A 1 4 A r / . 1 /40P0 1 1 0 5 40

r * * * * * Tfl WADTADICC f D A O T T DCAI PflMeT A WTO ^ L***** IU VAKIABLtb (BAblL KtAL LUNblANIb) cD . 1 . 1 T J4 O r\ A 1 4ACCA .2/18P0110550

C 1 1 1 * # 5 . 1

A 1 A A n A A A A P / A

. 1 / 1 1 P0 1 1 0560

r r v/ c — 7 a

C LVb - - Z . 0 rtA4 4 ACTA P 0 1 1 0 5 7 0 U L Vb - +5.0 r, a 1 4ACOA

P 0 1 1 0 5 8 0 Cr\ZO — "571/ 7 C A t L Vb - - c / } * : civ nA4 4 ACAA P 0 1 1 0 5 9 0

r L V b - + tV . JUjHd nA4 4A/AA PO 1 1 0600

r * * * * * TCCT ACCTPMMCAIT AC Mlic T f M C H DCAI PPifclCTAAITC L****» Itbl AbblbNntNl Ur U N b 1 b N t L) KtAL LUNblANIb 7

1 . 1 . 1

4 //AHA4 4AZ.4A .1/40P0110610

r * * * * * Tfl ADDAVC / D A C T P DCAI PPiUCTAMTC\ I***** IU AKKAYb (BAbIL KtAL LUNblANIb) cD .

*1 . 1 O Z4 OnAi 4 AiTA .Z/18P01106Z0

c * * t # *

r5A\

. 1 4 / 4 4nA4 4AZ.TA .1/MP0110630

A P 4 C / 7 \ — 6 i T 7 A L I b ( Z ) - 6 0. LI nA4 4Ai/A P0 1 1 0640

ACZS ( 1 , Z ) - 1034.

Z

nA4 4 AiCA P 0 1 1 0 6 5 0

A P 4 O / 4 \ — A A AC1S(1) - 0.0 Pi a a a A L t A P0 1 1 0660

A P 7 C / 4 4 \ — A AAAAA A CZ S ( 1 , 1 ) - 0.00000 nA4 4AZ*7A

P 0 1 1 0 6 7 0 C***«* TEST ASSIGNMENT OF SIGNED REAL CONSTANTS 7

.

1

A\ . 1

4 / /APiAtlA'OA .1/40P0110680

L****t r * * * * * Trt ADDAVC / D A C T P DCAI PPi 11 CTAAITCX tu ARRAYS (BASIL REAL LUNSTANTS) c5 . 1 . 1 .2/18P01 10690

c * * * * * 5 . 1

A j A A r\ r\ 1 A^AA

. 1 / 1 1 P0 1 1 0700

r*i A 1 'J AT4 A P 0 1 1 0 7 1 0 AC1S(3) = -2.5 P0 1 1 0720

AC2S(2, 1 ) = -5.66 f-\ i\ A A AT^A P0 1 1 0730

AC 1 S < 4 ) = +1.111111 f\ A A A A J A P01 1 0740

C**««* TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5 . 1 . 1 . 2/22P0 1 1 0 75 0 C**t*« CONSTANTS WITH NO DECIMAL DIGITS TO BOTH nA4 4AT / A P0 1 1 0 760

C***«* VARIABLES AND ARRAYS nAit 4 ATTA P0 1 1 0 7 70

GCVS = 1. DAI 1 A 7 O Ar U I I U / o U HCVS = -2. P01 1 0790

AADVS = +3. P0 1 1 0800

AC2S(3,1) = 4. P01 1 081

0

AC2S ( 1 .3) = +5. P0 1 1 0820

AC1S(5) = -6. P0 1 1 0830

Cttt** TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5. 1 . 1 .2/22P01 10840

C***«* CONSTANTS WITH NO INTEGER PART TO BOTH P0 1 1 08 50

Ct**** VARIABLES AND ARRAYS P01 1 0860

NBS FORTRAN Test Programs Version 1 19
BBOVS = .0 PO 1 1 0870

CCDVS = +.23 PO 1 1 0880

DODVS = -.716 P 0 1 1 0 8 9 0 AC1S(6) = -.7 PO 1 1 0900

AC2S(4, 1 ) = .81 PC111091 6 AC1S(7> = +.9 PO 1 10920

C't'i't't"* TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5.1.1 . 2/25P01 10930

C****» CONSTANTS WITH UNSIGNED AND SIGNED DECIMAL 5.1 .1 .2/32P011 0940 „..„_.„ EXPONENTS TO BOTH VARIABLES AND ARRAYS P 0 1 1 0 9 5 0 EEDVS = 1.05E02 PO 1 1 0960

FFDVS = -7.6E1 P0 1 1 0970

GGDVS = +332 . 4E0 P 0 1 1 0980

HHDVS = 51.3 2E-1 P0 1 1 0990

OODVS = +5.34E-3 P 0 1 1 1 0 0 0 PPDVS = -H . 1 9

E

- 2 P01 1 1010

QQDVS = -9.9E+2 P0111020

RRDVS = + 10.52 1 OE + 3 P 0 1 1 1 0 3 0 SSDVS = 4.56E+1 P 0 1 1 1 0 4 0 AC2S < 1 . 4 ) = 6 6 5 . 2 E 6 P 0 1 11050

AC 1 S < 1 1 ) =-52 . 9E01 PO 1 1 1 060

A CIS (9) = +7 8'. 5 6 4 E 2 P 6 1 110 7 0 AC2S( 5 , 1 ) = -3 . 4567E + 3 P 0 1 1 1 0 8 0 AC2S( 1 ,5) = 61 .62E + 2 PO 1 1 1090

AC 1 S ( 1 0 ) = +0 . 023E + 1 P 0 1 1 1 1 0

0

AC 1 S ( 8 ) =" 94.333E-1 P01 1 1 1 10

AC 1 S ( 1 2 ) = +0.3524E-2 P 0 1 1 1 1 2 0 AC2S (3 . 2 ) = -743.2E-3 P 0 1 1 1 1 3 0 Ctt*** TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5 . 1 . 1 . 2 / 22P 0 1 1 1 1 40

C*'"* t* * CONSTANTS (NO DECIMAL PART ) WITH DECI MAL 5^1.1 . 2/2 6 P 0 111150

C***»* EXPONENTS TO BOTH VARIABLES AND ARRAYS P0111160

TTDVS = 1 . EO PO 111170

UUDVS = +123. E2 P 0 1 1 1 1 8 0 VVDVS = -11.E3 P 6 11 119 0 WWDVS = 144. E-1 P 0 1 1 1 2 0 0 XXDVS = - 1 2 V E - 2 PO 111 210

YYDVS = +3645.E-3 P 0 1 1 1 2 2 0 ZYd'VS = 1 • E + 4 PO 1 1 1 23 0 CMAVS = -200 . E + 1 P 0 1 1 1 2 4 0 CMBVS = +99 . E + 2 P01 11250

AC 1 S ( 1 3 ) = +0.E00 PO 1 1 1 260

AC 2S(2. 5) = -1 5T2.E2 ' P 0 1 1 1 2 7

0

AC2SU.3) = 214. E3 P 0 1 1 1 2 8 0 A C 1 S ( 1 5 ) = 3 4 . E - 1 PO 1 1 1290

AC 1 S ( 1 4 ) = -4.E-2 P01 1 1 300

A C 2 S ( 3 , 4 ) = + 53 2 1 4 . E - 4 P 0 1 11310

AC2SC4.4) = +6.E + 3 P 0 1 1 1 3 2 0 AC2S(2,3) = 7 2. E + 4

' P01 1 1330

AC1SC16) = -813.E+1 P 0111340

C TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL 5.1.1 . 2/22P01 1 1350

C***** CONSTANTS (NO INTEGER PART) WITH DECIMAL 5 . 1 . 1 . 2 / 26P0 1 1 1 360

C* "*"*'*'« EXPONENTS TO BOTH VARIABLES AND ARRAYS P 6 1 1 1370

CMCVS = .234E0 P 0 1 1 1 3 8 0 CMDVS = - . 3E2 P 6 1 1 13 9 0 CMEVS = +.44E1 P 0 1 1 14 0 0 CMFVS = . 36E-3 P 0 111 410

CMGVS = +.9E-4 P 0 1 1 14 2 0 CMHVS = - . 1 OE-2 PO 1 1 1 43 0 CMOVS = .777E + 1 P 0 1 1 1 4 4 0 CMPVS = - . 29E + 3 P011 1450

CMOVS = +.04E + 2 P 0 1 1 1460

AC 1 S (1 7 ) = . 90 E l P01 1 1 470

AC2S(4.2) = +.810E0 P 0 1 1 1 4 8 0 AC1S( 19) = -.7E3 P 0 1 1 1 490

AC2S(3.3) = .62E + 3 PO 1 1 1 5 0 0 AC 1 S < 2 1 ) = + . 531 0E + 1 P 0 1 1 1 5 1

0

A2S( 1 , 2 ) = -.442E + 2 P 0 1 1 1 5 2 0 AC 1 S ( 1 8 ) = . 3 E - 4 P01 1 1530

AC2S(2.4) = +.25E-03 P 0 1 1 1 5 4 0

20 NBS FORTRAN Test Programs Version 1
C * t * t *

C t * * * *

c * * * * *

c * * t * *

A2S(2, 1 ) = -. 163E-2

TEST ASSIGNMENT OF UNSIGNED AND SIGNED REAL

CONSTANTS (FORMED BY PLACING DECIMAL EXPONENT

AFTER INTEGER CONSTANT) TO BOTH VARIABLES AND

P01

5.1 .1 .2/34P01

P01

P01

1 1550

11560

1 15 70

11580

1 1590

1 1600

11610

1 1620

1 163 0 11640

11650

1 1660

11670

1 1680

11690

1 1 700

11710

1 1 720

1 173 0

1 1740

11750

1 1 760

11770

1 1 780

1 1 790

1 1800

11810

1 1820

1 1830

1 1840

11850

1 1860

1 1870

11880

11890

11900

1 1 91 0 11920

119 3 0

1 1940

11950

1 1960

1 19 70

1 1980

1 1990

1 2000

12010

1 2020

1 2 0 3 0

1 20 40

1 2 0 5 0

1 2060

1 2070

1 20 80

1 2090

12100

12110

12120

1213 0 12140

12150

12160

12170

12180

1219 0

1 2200

12 210

1 2220

ARRAYS

AVS = 709E3

BVS = +81 842E0

CVS = -9E5

P01

P01

p 01

P01

DVS

EVS

FVS

GVS

627E+2

+ 53E + 3

-4E+04 .

1 463E-2

P01

P01

P 0 1 P01

HVS = + 2E-3

PVS = -355E-1

AC1S(24) = 29E5

AC 1 S ( 20 > = +4072E3

P01

P01

P 01

P01

AC2S(5,4) = -61835E2

AC2S(3.5) = 829E+1

AC1S(22) = +03E+2

AC1S(25) = -1E + 3

P01

P01

P 01

P01

AC2S(4,5) : A2SC2.2) = AC1S(23) = VERIFY3404E-4

+55E-5

- 7 6 1 E - 1 CORRECTNESS

P01

P01

P'61

c * * * * * P01

c * * * * * OF ASSIGNMENT BY WRITING

THE INFORMATION

WRITE (NUVI. 111) MRRVI,

< I A C 1 I ( I V I ) , I V I = 1 WRITE (NUVI ,112)

JACVI, KBCVI, MCAVI LCCVI. MDCVI, NECVI

I V I = 1 , 2 ) . JVi = 1 ,2)

P01

P01

p"b"i

P01

1 4) , ( ( IAC2I ( IVI , JVI

)

WRITE (NUVI, 113) ACVS, BCVS, CCVS, DCVS, ECVS, FCVS. AC 1 S ( 2

)

AC2S(1,2), AC1S( 1 ) , AC2S< 1 , 1 > . AC2S(2,2>.

A C 1 S ( 3 ) , A C 2 S ( 2 , 1 ) . A C 1 S ( 4 ) , G CVS, H CVS.

AADVS, AC2S(3,1)

P01

P01

P01

P01

WRITE (NUVI ,114)

WRITE (NUVI ,115)

AC2S ( 1 AC2S (

4

OODVS , AC2S( 1 A C 2 S < 1

3) , A C 1 S ( 5 )

.

1 ) , AC 1 S ( 7 )

,

PPDVS, QQDVS

4) , AC1S( 1 1 ) 5) , ac IS < 10

)

DDDVS

GGDVS

BBDVS, CCDVS

EEDVS, FFDVS

R RDVS , SSDVS

AC 1 S ( 9 ) , AC2S(5. 1

)

AC 1 S ( 8 > i AC 1 S ( 12).

AC 1 S ( 6 > ,P01

HHDVS. P01

P 0 1 P01

P01

AC2S(3, 2) , TTDVS, UUDVS, VVDVS, WWDVS, XXDVS , P01

WRITE (NUVI , 116) 3)

YYDVS

CMAVS. CMBVS, AC1S(13), AC2S(2.5). AC2SU,

AC 1 S ( 1 5 ) , A C 1 S ( 1 4 ) , AC2S(3,4) , AC2SU.4),

AC2S(2,3), AC 1 S ( 1 6 > , CMCVS, CMDVS, CMEVS , 22DVS

P01

P01

p'b'i

P01

WRITE (NUVI. 117) CMFVS, CMGVS, CMHVS, CMOVS, CMPVS, CMQVS,

AC 1 S ( 1 7 > , AC2S(4,2), AC1S(19), AC2S(3,3).

AC1 S ( 2 1 ) , A2S ( 1 , 2 ) , AC1 S ( 1 8 ) , AC2S ( 2 , 4 ) , A2S (

2

AVS , BVS, CVS, DVS, EVS, FVS, GVS, HVS, PVS

P01

P01

P 0 1 P011

)

WRITE (NUVI. 118)

1 1 1 FORMAT(/7X, 1H1

AC1S(24)

AC1S(22)

AC 1 S (23 ) 7X, 5H12345

AC 1 S ( 20 ) , AC2S(5,4), AC2S(3

A C 1 S ( 2 5 ) ,AC2S(4,5) . A2S ( 2 . 2 )

5)

13X, 1H0/1X, 17, 5X, 17, 7X, 17//

P01

P01

P 0 1 P01

1 7X, 1H2, 10X, 2H-3.8X, 6H -8765/1X, 17, 5X, 17, 7X, 17// P01

2 3X, 5H 6912, 11X, 1H0, 11X, 3H-23 / 1X, 17, 5X, 17, 7X.I7// P01

3 4X, 4H4444 , 7X , 5H 432 1, 1 2X , 2 H 4 5 / 1X , 17 , 5X , 17 . 7X. 17/ / P01

4 4X. 4H2468 , 6X, 6H -3123. 13X. 1 HO / 1X, 17, 5X, 17, 7X, 17) P01

112 FORMAT (/14H REAL RESULTS)

113 FORMAT ( / 3X , 3H 1 . 0 , 10X, 8H358.6724, 6X. 4H -2 . 0 / 1 X , F 5 . 1 , 6X . F 1

2

F8 . 1 / / 3X , 3H3.0.8X. 9H-2 7 1 4 . 2 5 0 ,7X,8H29. 3 0 5 42 / 1 X.F5. 1 ,6X, F11

.

F12.5//2X,5H86.27,8X,6H1034.2 i 10X,3H0.0/1X.F6.2,5X,F9.1.5X,

3X, 3H0.0, 10X,7H345.678 , 7X, 4H-2 . 5 / 1 X , F5 . 1 .6X.F11 .3.3X.F8.

2X.5H-5.66,11X,8H1.111111.5X.3H1.0/1X,F6.2,5X,F14.6.F8.1//

2 X , 4 H - 2 . 0 , 1 2 X , 3 H 3 . 0 , 1 0 X , 3 H 4 . 6 / 1 X , F 5 . 1 , 6 X , F 9 . 1 , 5 X , F 8 . 1 ) 114 FORMAT(/3X,3H5.0,11X,4H-6.0,1OX f 3H0.0/1X,F5.1,6X,F9.1,5X,F8.

1 3X,4H0.23,i0X.6H-0.716.7X,4H-0.7/1X,F6.2,5X,F11.3.3X,F8.1//

2 3X.4H0.81,11X.3H0.9/1X.F6.2,5X,F9.1/1H1,2X,9H0.105E+03,3X.

3 9H-6 . 76E + 02 , 5X , 1 OHO . 3 32 4E + 03 / E 1 2 . 3 , E1 2.2 , E1 5 . 4 / / 4 3X,10H0.5132E+01,3X,9H0.534E-02,3X.11H-0.1419E+00/E13.4,E12

5 E14.4//2X.9H-0. 99E + 03 , 5X , 1 2H 0 . 1 0 5 2 1 OE + 0 5 , 1 0 H 0 . 4 5 6E + 02 / E 1 1 . 6 E17.6.E10.3)

P01

.4.2X.P01

3,3X, P01

F8. 1 //P01

Til p'b'i

P01

p'b'i

Ml P01

p'b'i P01

p'b'i .3. P01

2, p'b'i P01

NBS FORTRAN Test Programs Version 1 21
115 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/ PO 1 1 2240

2 E14. 5.E12 . 4,E11.2//3X.11H0.94333E+01.2X.10H0.3524E-02,2X, ; P0H 22 5 0

3 11H-0.7432E+00/E14.5,E12.4,E13.4//3X,7H0.1E+01,6X,9H0.123E+05, PO 1 1 2260

4 3X . 9H-0 . 1 1 E + 0 5/E1 0 . 1 .E 15 .3 .E12.2//3X.9H0.144E+02.3X, 9 H - 0 .12 E + 00, P0 1 1 2270

5 5X.10H0.3645E+01/E12.3,E12.2,E15.4) P0112280

116 F0RMAT(/12H -0.200E+04,4X,8H0.99E+04,5X,7H0.0E+00/E12.3,E12.2, P0 1 1 2290

1 E12.1//2X,11H-0.1512E+06,3X.9H0.214E+06,4X.8H0.34E+01/E13.4, P0112300

2 El 2.3.E1 2 .2//2X, 8H-0 . 4E-01 ,6X, 1 1H0. 532 1 4E + 01 ,2X, 7H0 . 6E + 04/E10. l", P 6 1 123 1 0

3 E17.5,E9.1//3X,8H0.72E+06,4X.10H-0.813E+04,4X,9H0.234E+00/E11.2, P 0 1 1 23 2 0

4 E1 4.3, E 1 3 . 3 / / 2 X , 8 H - 0 . 3 E + 0 2 , 6 X , 8 H 0 . 4 4 E + 0 1 , 5 X , 7 H 0 . 1 E + 0 5 / E 1 0 . 1 , P 0 1 1 2 3 3 0

5 E14.2.E12. 1 ) P01 12340

1 1 7

1 1 8

F0RMAT(/3X,8H0.36E-03,5X,7H0.9E-04,5X,9H-0.10E1 E14.2//3X,9H0.777E+01,3X,9H-0.29E+03,5X,7H0.4E

2 E 1 2 . 1 / / 3 X , 8 H 0 . 9 0 E + 0 1 , 5 X , 9 H 0 . 8 1 0 E + 0 0 , 3 X , 8 H - 0 . '7 E

3 E11.1//3X,8H0.62E+03,5X.10H0.5310E+01.2X.T0H-0

4 E15. 4.E12.3//3X, 7H0 . 3E-04 , 6X, 8H0 . 25E-03 , 4X . 1 OH

5 E14.2.E14.3/1H1 ) FORMAT <3X, 9H0 . 709E + 06 , 4X, 1 1 HO . 8 1 8 42E + 05 , IX, 8H-0

1 E9.1//3X,9H0.627E+05,4X,8H0.53E+05,4X,8H-0.4E+

2 E 12.1 //3X, 1 OH 0 .14 6 3 E + 0 2 , 3 X , 7 H 0 . 2 E - 6 2.5 X , 1 0 H - 0 . 3 E10.1,E15.3//3X,8H0.29E+07,5X,10H0.4072E+07,2X

4 E11.2,E15.4,E14.5//3X,9H0.829E+04,4X,7H0.3E+0 3

5 E12.3,E11.1,E13.1//3X,10H0.3404E+00,3X,8H0.55E

02/E11 .2.E12.1 . P 0 1 1 23 5 0

+ 01 /E12.3.E12.2, PO 1 1 2 3 60

+ 6 3 / E 1 1 .2, El 4.3, P 6 1 1 2 3 7 0

. 4 42E + 02/E1 1 . 2 , P01 1 2380

-0. 163E-02/E10. 1 , P 0 1 1 2 3 9 0 P01 12400

. 9 E + 0 6 / E 1 2 . 3 , E 1 5 . 5 , P01 1 241 0 05/E12.3.E12.2, PO 1 1 2420

3 5 5 E + 02/E13 . 4, P 0 1 1 2 43 0

, 1 2H-0 . 61 835E+07/ P 0 1 1 2 4 40

, 5X, 8H-6 . 1E + 04/ PO 1 1 24 5 0 -03, 4X, 1 OH-0 . 761 E+0P01 1 2460

62/E13.4.E11 .2.E14.3)

C***»* END OF TEST SEGMENT 011

C"t"»

*"*" * WHEN EXECUTING ONLY SEGMENT 011, THE STOP

C***» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C IN COLUMNS 1 AND 2 REMOVED

C= STOP

C = END

STOP

AND

C = END CARDS

P0 1 1 2470

P01 12480

P 0 1 1 2 490

PO 1 1 2 5 00

P 0 1 12 510

P01 1 2520

P 0 1 1 2 5 3 0 P 0 1 1 C

1

END P 0 1 1 C2

C***********************************************************************P0130010

C * * * * *

C * * * * * DASGN - (013)

P0130020

PO 1 30030

C***** P0130040

C**************t*t*****************t******»************tt*******t t** P0130050

C***»* GENERAL PURPOSE

C***»* * TO TEST ALL POSSIBLE METHODS OF FORMING DOUBLE

C * * * » * PR EC I SI ON CONS TAN T S Z***t* * TO TEST THAT D.P. VARIABLES AND ARRAY

C * * * * * "e LEMENT S MAY BE R E FERE N CE

D

C***»* * TO TEST VERY SIMPLE ARITHMETIC ASSIGNMENT

C ***** " STATEMENTS , SO THAT TH I S FEATURE CAN BE USED

C***«* FOR INITIALI2ATI0N IN LATER SEGMENTS

C***** S P E " C I F I C A f I 0 N S SEGMENT 013

C * * * * *

C **'*»* WHEN EXECUTING ONLY SEGMENT 013, THE SPEC IF I CAT ION

C****« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C* * * * * I N COLUMNS 1 AND 2 REMOVED . C * * * * *

ASA REF P0130060

5.1.1 THRUP0130070

PO 130080

5.1.2 /5 P0130090

5.1 .3.1/16P0130100

7.1.1.1 P01301 10

TABLE 1 PO 1 30 1 20

P 0 1 3 0 1 3 0

STATEMENTS

P 0 1 3 0 1 4 0 P00 1 0240

POO 1 024 5 P00 1 0250

P 0 0 1 0 2 5 5 P00 1 0260

C= DOUBLE PRECISION MCAVD , MCBVD , MCCVD . MCDVD . MCEVD , MCFVD , MCGVD , P0010265

C= 1MCHVD.MCIVD.EEDVD.ACVD.BCVD, CCVD , DCVD , DDDVD , CCDVD, FFDVD.GGDVD, POO 1 0270

C= 2 HHDVD , EP 1 D ( 43 ) , AC ID (1 0 > . BC 2D (7, 4 ) , C C 3 D ( 7, 2 ,2) , F C 2 D ( 5 . 5 ) P00 1 0275

C= DOUBLE PRECISION DPAVD , DP BVD , DP CVD , DPDVD , DPE VD , DP F VD . DPG VD . DPHVD , P0010280

C= 1 DP I VD , DP JVD. DPKVD. DP LVD , DPMVD , DP NVD , DPOVD , DPPVD , PO0 1 0285

C= 2 AADVD,BBDVD.PPDVD,RRDVD,SSDVD,TTDVD,UUDVD,VVDVD,WWDVD,XXDVD. P0010290

3 Y YDVD , 22DVD , E CVD , F C V D . G CVD . H C V D.RC3 0(3,3.3) .MCJVD.MCKVD POO 1 0295

C****« P0010300

DOUBLE PRECIS ION MCAVD, MCBVD, MCCVD. MCDVD, MCEVD, MCFVD, MCG VD , P013A1

1 MCHVD.MC I VD.EEDVD.ACVD.B CVD. CCVD. DCVD, DDDVD. CCDVD, FFDVD.GGDVD. P013A2

2 H H D V D . E P 1 D ( 4 3 ) . A C 1 D ( 1 0 ) . B C 2 D ( 7 , 4 ) , C C 3D (7 . 2 , 2 ) . F C 2 D ( 5 , 5 > P 0 1 3 A

3

DOUBLE PRECISION DPAVD . DPBVD . DPCVD . DPDVD . DPEVD . DPFVD , DPGVD , DPHVD . P013A4

1 DP I VD, DP JVD, DPKVD. DP LVD, DPMVD, DPNVD. DPOVD, DPPVD, P013A5

2 AADVD. BBDVD.PPDVD.RRDVD.SSDVD.TTDVD, UUDVD.VVDVD. WWDVD.XXDVD, P013A6

3 Y YDVD , 22DVD , E CVD . F CVD . G CVD , H CVD , RC3D ( 3 . 3 . 3 ) . MC JVD , MCKVD P013A7

C***«* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0 1 30 1 50

22 NBS FORTRAN Test Programs Version 1
c » * * * * C***** WHEN EXECUTING ONLY SEGMENT 013, THE FOLLOWING STATEMENT

PO 1 301 60

P0070240

C****« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

c * * * * * P0070245

P0070250

C= NUVI = 6

NUVI = 6

P0070255

P013B1

WRITE (NUVI, 130)

WRITE(NUVI , 131

)

P 0 1 3 0 1 70

PO 1 30 1 80

130 FORMAT ( 1 H 1 ,1X,36HDASGN - (013) SIMPLE D.P. ARITHMETIC/

1 1 6X , 1 8HASS I GNME NT STMNTS . / 2X , 28HASA REFS. - 7.1.1.1 5. 1 . 1

PO 1 30 1 90

.III P0130200

2 2X , 7HRESULTS

)

131 FORMAT( /2X.23HLINE 1 OF EACH GROUP IS/

P 0 1 3 0 2 1 0 P0130220

A 2X , 2 1 HHOL LER I TH INFORMATION)

C***** HEADER FOR THIS SEGMENT WRITTEN

P0130230

P0130240

C***** TEST ASSIGNMENT OF UNSIGNED DP CONSTANTS WITH

C***«* UNSIGNED EXPONENTS TO VARIABLES AND ARRAY ELEMENTS

7.

5 .

1

1

. 1

. 1

. 1 /41P0 1 302 5 0 .3/40P0130260

c * * * * *

c * * * * *

5 . 5.

1

1

. 1

. 1

/ 1 4P0 1 3 0270

. 3/36P0 1 3 0280

c * * * * * MCAVD = 3.4D1

5. 1 . 1 .2/26P0130290

P0130300

MCBVD = 1 23456 . 7891 0 1 1 D02

AC1D( 1 ) = 3 .4D1

PO 1 303 1 0 P0130320

AC1D( 2 ) = 1 23 45 6. 789 1 0 1 1 D02

BC2D( 1 , 1 ) = 3 . 4D1

P0130330

P0130340

BC2D( 2,1 ) = 1 23 4 5 6 . 7 8 9 1 0 1 1 D 0

2

CC3D( 1 ,1,1) = 3 . 4D1

P0130350

P0130360

CC3D( 2, 1,1 ) = 1 23456. 789 1 0 1 1 D2

C**«** ASSIGNMENT OF UNSIGNED DP CONSTANTS WITH 5. 1 . 1 P0130370. 3/36P0 1 30380

C « SIGNED EXPONENTS TO VARIABLES AND ARRAY ELEMENTS

MCCVD = 29.8765234D-3

5. 1 . 1 . 2 / 26P0 1 30390

P0130400

MCDVD = 345 . 1 00 00 5 5 5D + 4 AC1D(3) = 29.8765234D-3

PO 1 3041

0

P0130420

AC1D( 4 ) = 34 5 . 1 0000 5 5 5 D + 4 BC2D( 3 , 1 ) = 29 . 8765234D-3

P0130430

P0130440

BC2D( 4 , 1 ) = 3 4 5 . 1 0000555D+4

CC3D(3,1,1) = 29.8765234D-3

P0 1 3045 0 P0130460

CC3D( 4,1 . 1 ) = 34 5 . 1 000 0 5 5 5 D + 4 Ct** *» ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO DECIMAL 5 . 1 . 1 P0130470

. 2/22P0 1 30480

C****« PART) WITH UNSIGNED EXPONENTS TO VARIABLES

C « AND ARRAY ELEMENTS

P0130490

P0130500

MCEVD = 22232425. D00

AC1D(5> = 22232425 . DOO

PO 1 305 1 0

P0130520

BC2D(5,1) = 22232425. DOO

CC3D( 5, 1 , 1 ) = 2223242 5. DOO

P0130530

P0130540

Ct** *« ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO

C***** INTEGER PART) WITH UNSIGNED EXPONENTS TO

5. 1 . 1 . 2/22P0 1 305 50

P0130560

C**«*. VARIABLES AND ARRAY ELEMENTS

MCFVD = .281420D5

P0130570

P0130580

AC 1 D < 6 ) = .28 1 420D5

BCZDC6 . 1 ) = .28142005

P0130590

P0130600

CC3D(6 , 1,1) = .28142005

C«*t** ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO DECIMAL

P 0 1 3 0 6 1 0

P0130620

C*.*«* PART) WITH SIGNED EXPONENTS TO VARIABLES AND

C***t* ARRAY ELEMENTS

P0130630

P0130640

MCGVD = 4455667788 . D+6

MCHVD = 35692483569248. D-02

P0130650

P0130660

AC1D(7) = 4455667788 . D+6

AC1D(8) = 35692483569248. D-02

P0130670

P0130680

BC2D( 7 , 1 ) = 445 5667788 . D + 6

BC2D(1,2) = 35692483569248 .D-02

P0130690

P0130700

CC3D( 7 , 1 . 1 ) = 445 5667788 .D + 6

CC3D(1.2,1) = 35692483569248. D-2

P0130710

P0130720

Ctttt* ASSIGNMENT OF UNSIGNED DP CONSTANTS (NO

C*t*»* INTEGER PART) WITH SIGNED EXPONENTS TO

P0130730

P0130740

[*<»« VARIABLES AND ARRAY ELEMENTS

ACVD = .6549876D-3

P0130750

P0130760

BCVD = .78D+10

AC1D(9) = .6549876D-3

PO 1 30770

P0130780

NBS FORTRAN Test Programs Version 1 23
AC1D(10) = .780*10 P0130790

BC2D< 2 , 2) = .65498760-3 P0130800

BC2D(3,2) = .78D+10 P0130810

CC3D(2,2, 1 ) = .6549876D-3 P0130820

CC3D(3.2, 1 ) = .780+10 P0130830

C**t*» ASSIGNMENT OF SIGNED DP CONSTANTS WITH 5.1.1 /12P0130840

C****t UNSIGNED EXPONENTS TO VARIABLES AND ARRAY P0130850

C***** ELEMENTS P0130860

CCVD = +0.0D0 P0130870

DCVD = -17263544. 5D3 P0130880

EP1D(1) = +0 . ODO P0130890

EP1D(2) = - 1 7263544 . 5D3 P0130900

BC2D(4,2) + 0 . ODOO P0130910

BC2D(5,2) = -17263544. 5D3 P0130920

CC3D(4,2, 1 ) = + 0 . ODO P0130930

CC3D<5.2, 1 ) = - 1 7263544 . 503 P0 1 30940

c * * * * * ASS I GNMENT OF SIGNED DP CONSTANTS WITH P0130950

c * * * * * SIGNED EXPONENTS TO VARIABLES AND ARRAY P0 1 30960

c * * * * * ELEMENTS P0 1 30970

ECVD = +1987 .62D+1 P0 1 3 0980

FCVD = -2.54396621D+2 P01 30990

GCVD = +34 . 78652991 0234D-7 P01 31 000

HCVD = -44.4D-10 P01 31 01 0 EP1D(3> = + 1 987 . 62D + 1 P01 31 020

EP1D(4) = -2.54396621D+2 P01 31 030

EP1D(5) = +34.786529910234D-7 P 0 1 3 1 0 4 0 EP1D(6) = -44.4D-10 P01 31 050

BC2D(6,2) = +1987.62D+1 PO 1 3 1 060

BC2D(7,2) = -2.54396621D+2 P0131070

3C2D(1.3> = +34.786529910234D-7 P0131080

BC2D(2,3) = -44 . 4D-1 0 PO 1 3 1 090

CC3D(6,2, 1 ) = +1987. 62D+1 r\ A A ~~> A A A A PO 1 3 1 1 00

CC3D(7,2, 1 ) = -2. 54396621D+2 PO 1 3 1 1 1 0 CC3D( 1 ,1,2) = +34.7865299102340-07 P0131 120

CC3DC2, 1,2) = -44.4D-10 PO 1 3 1 1 30

c * * * * * ASSIGNMENT OF SIGNED DP CONSTANTS (NO DECIMAL P01 3 1 1 40

c * * * * * PART) WITH SIGNED EXPONENT TO VARIABLES AND PO 1 3 1 1 5 0

c * * * * * ARRAY ELEMENTS P0131 160

AADVD = +0.D+1 P01 31 1 70

BBDVD = -123. D + 1 7 P01 31 1 80

CCDVD = +3692468. D-8 P0131 190

DDDVD = - 1 4 793 78 2 496 7 . D-5 P0131200

EP1D(7) = +0 . D+1 P013121 0 EP1D(8) = -123.D+17 PO 1 3 1 22 0 EP1D(9) = +3692468 . D-8 P0131230

EP1DC10) = - 1 4793 7824967 . D-5 P0131240

BC2D(3,3) = + 0 . D + 1 P0131250

BC2DC4.3) = -123". D + 1 7 P01 31 260

BC2D(5,3) + 3692468 . D-8 P01 31 270

BC2D(6,3) = -147937824967. D-5 P01 31 280

CC3D(3, 1,2)= + 0 . D + 1 P01 31 290

CC3D(4, 1,2) = -123.D+17 P01 31 300

CC3D( 5 ,1,2) = + 3692468 . D-8 P 0 1 3 1 3 1 0 CC3D(6, 1,2) = - 1 47937824967 . D-5 P 0 1 3 1 3 2 0

c * * * * * ASSIGNMENT OF SIGNED DP CONSTANTS (NO INTEGER P 0 1 3 1 3 30

c * * * * * PART) WITH SIGNED EXPONENTS TO VARIABLES AND PO 1 3 1 340

c * * * * * ARRAY ELEMENTS P 0 1 3 1 3 5 0 EE DVD = +. 9277861 74985D + 2 PO 1 3 1 360

FFDVD = -. 5935491 422361 9D+0 P0131370

GGDVD = +. 98663271 D- 03 PO 1 3 1 380

HHDVD = -. 1D-1 5 PO 1 3 1 390

EP1 D ( 1 1 ) = + .9277861 74985D+2 P01 31 400

EP1D(12) = - . 5935491 4223619D+0 P01 31 41 0

c P 1 D ( 1 3 ) + .98663271D-03 P 0 1 3 1 42 0 EP1D(14) = - . 1D-1 5 P 0 1 3 1 4 3 0 BC2D(7,3) = + . 9277861 74985D+2 P0131 440

BC2D(1,4) = - . 5935491 422361 9D+0 P0131 450

BC2D(2,4) = +.986632710-03 P 0 1 3 1 4 6 0

2 4 NBS FORTRAN Test Programs Version 1
BC2D(3,4) = - . 1D-1

5

P0131470

CC3D ( 7 , 1 , 2 ) = + . 9277861 74985D + 2 P01 31 480

CC3D(1,2,2) = -.59354914223619D+0 P0131 490

CC3D(2,2,2) = +.98663271D-3 P01 31 500

CC3D(3.2,2) = - . 1 D-1 5 P01 31 51 0 C****» ASSIGNMENT OF SIGNED DP CONSTANTS (NO DECIMAL P01 31 520

C*t*t* PART) WITH UNSIGNED EXPONENTS TO VARIABLES PO 1 3 1 530

C***«* AND ARRAY ELEMENTS P0131 540

PPDVD = +3261 294675 . D 1 2 P01 31 550

RRDVD = -969492909 . D4 P0131 560

EP1DM5) = + 3261 294675 . D 1 2 P0131 570

EP1DM6) = -969492909 . D4 P0131 580

BC2DU.4) = + 326 1 294675 . D 1 2 P0131 590

BC2D(5,4) = -969492909 . D4 P0 1 3 1 60 0 CC3D(4,2,2) = + 3261 294675 .0 1 2 P0131610

CC3D(5,2,2) = -969492909 . D4 P 0 1 3 1 62 0

C * * * * * ASSIGNMENT OF SIGNED OP CONSTANTS (NO INTEGER P 0 1 3 1 63 0 C***** PART) WITH UNSIGNED EXPONENTS TO VAR I ABLES P 0 1 3 1 6 4 0 C**»** AND ARRAY ELEMENTS P 0 1 3 1 6 5 0 SSDVD = +.00124608503 P 0 1 3 1 66 0 TTDVD = -.5902 P 0 1 3 1 6 70

EP1D(17) = +.001246085D3 P 0 1 3 1 6 8 0 EP1DC18) = -.59D2 PO 1 3 1 690

BC2D(6.4) = +.001246085D3 P01 31 700

BC2DC7.4) = -.5902 P01 31 71 0 CC3D<6,2.2) = + . 001 24608503 P01 31 720

CC3D<7,2,2) = - .5902 P 0 1 3 1 7 3 0 C***** ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING 5.1.1 .3/42P0131740

c * * * * * UNSIGNED EXPONENTS TO UNSIGNED INTEGERS

UUDVD = 798281392253D0

E P ID (19) ="" 79828 1 3922 5300

FC2D(1.1) = 798281 392253D0

RC3D( 1 , 1 , 1 ) = 7982 8 1 3 9 2 2 5 3 D 0 C**»** ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

C ****** SIGNED E XP0N E NTS TO UNSIGNED INTEGE RS

VVDVD = 42921D+6

WWDVD = 7936854430-4

P 0 1 3 1 7 5 0 P 0 1 3 1 760

P 0 1 3 1 7 7 0 P01 31 780

P 0 13179 0 P01 31 800

P01 31 81 0

P 0 1 3 1 82 0 P 0 1 3 1 83 0 P 0 1 3 1 8 40

PO 1 318 5 0 P 0 1 3 1 8 60

P 0 1 3 1 8 7 0 P 0 1 3 1 8 8 0 P 0 1 31 890

PO 1 3 1 90 0 PO 131 910

P 0 1 3 1 92 0 PO 1 3 1 93 0 P01 31 940

P 0 1 3 1 9 5 0 P01 31 960

P 0 13 19 7 0 PO 1 3 1 98 0 PO 131 990

P0132000

PO 1 3 2 0 1 0 P0132020

P0132030

P0132040

P 0 1 3 2 0 5 0 P0132060

P 0 1 3 2 0 7 0 P0132080

P 0 1 3 2 0 9 0 P 0 1 3 2 1 0 0 PO 1321 10

P 0 1 3 2 1 2 0 PO 1 32 1 30

P 0 1 3 2 1 4 0

EP1D(20)

EP 1 D ( 2 1 ) FC2D(2. 1 ) FC2D(3. 1 ) RC3D < 2 . 1

= 429210+6

= 793685443D-4

= 429210+6

= 7 9 3 6 8 5 4 4 3 D - 4

1 ) = 4292 1 D + 6

RC3D(3, 1 , 1 ) = 79368 5 4430-4

C***»* ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

C"*'"*"*"*"* U N S IGNED EXPONENTS TO SIGNED I NT EG E RS

XXDVD = +33344455566D2

' YYOVO = - 2 2 2 3 3 3 4 4 4 D 1 EP1D(22) = +3334445556602

EP 1 D < 23 ) = -22233344401

FC2D(4,1) = +33344455566D2

= -222333444D1

= +33344455566D2

='-22233344401

ASSIGNMENT OF DP CONSTANTS FORMED BY ADDING

SIGNED EXPONENTS TO SIGN ED INTEGERS

ZZDVD = +1D+1

mc i vb = -ZD + 2 MCJVD = +33333333333333D-3

MCKVD = -444444444D-4

E P 1 D ( 2 4 ) = +1D + 1 -2D + 2 +33333333333333D-3

-4444444440-4

+ 1 D + 1 -2D +2

+33333333333333D-3

-4444444440-4

+ 1D + 1

FC2D(

5

RC3D( 1 RC3D(2

1 ) 2,1)

2.1 ) C * * * * *

C * * * * *

E P 1 D ( 2 5 ) EP 1 D ( 26

)

E P 1 D ( 2 7)

FC2D(1 ,2)

FC2D(2.2)

FC2D(3,2)

FC2D(4,2)

RC3D(3 , 2,1)

NBS FORTRAN Test Programs Version 1 25
RC3D(1,3,1) = -20+2

RC3D(2,3,1) = +333333333333330-3

RC3D< 3 , 3,1) = -4444444440-4

C***»* ASSIGNMENT OF UNSIGNED DP VARIABLES AND ARRAY

CTt'T** ELEMENTS TO DP VARIABLES AND ARRAY ELEMENTS

C****» (BOTH PLUS AND MINUS VALUES ARE ASSIGNED IN THIS

C *'*'*"** WAY ) DPAVD = MCAVD

P0132150

P0132160

PO 132 170

1 /41P0132180

' p o 1 3 2190

P01 32200

PO 1 322 1 0 P0 1 32220

"PO 1 32 230

P0132240

PO 1 322 5 0 P0132260

POi 32270

P0 1 322 80

PO 1 3 22 90

P0132300

7.1.1

DPBVD

DPCVO

DPDVD

DPEVD

DCVD

EP1D( 1

)

EP1D(2)

BC2D ( 2 . 2 ) DPFVD = BC2D(4,2)

DPGVD = CC3D(3,1 ,1)

DPHVD = CC3D(7,2,1 ) EP1D(28) = DPAVD

E P 1 D ( 29

)

DPBVD P013231

0

EP 1 D ( 30

)

EP 1 D ( 1

)

P0 1 32320

EP1D(31 ) EP 1 D ( 2

)

P0132330

EP 1 D < 32 > BC2D(2,2) P0132340

EP1D(33) BC2DU.2) P0 1 323 5 0 EP 1 D ( 34 > CC3D(3, 1 . 1 ) P01 32360

EP 1 0 ( 3 5 ) CC3DC7.2, 1 ) P0132370

FC2D(5.2) DPAVD P0132380

FC2D( 1 ,3) DPBVO P0132390

FC2D(2.3) EP 1 D < 1

)

P0 1 32400

FC2D(3,3) EP1D(2) P0 1 324 1 0 FC2D(4,3) BC2D(2,2) P0132420

FC2D(5.3) BC2D(4,2) P0132430

FC2D(1 .4) CC3D(3. 1 . 1 ) P0132440

FC2D(2,4) CC3D<7,2. 1 ) P0132450

RC3D( 1 ,1,2) = MCAVD P0132460

RC30 < 2 . 1 ,2) = DCVD P01 32470

RC3DC3 . 1.2) = EP 1 D ( 1

)

P0132480

RC3DM .2. 2 ) = EP1D(2) P0132490

RC3D(2,2. 2) = BC2D(2.2) PO 1 32 5 00

RC3D(3.2. 2) = BC2DU.2) P0132510

RC3D ( 1 .3, 2) = CC3D<3, 1 . 1

)

P0132520

RC3D ( 2.3.2) = CC3D(7.2. 1 ) C*»*** ASSIGNMENT OF SIGNED DP VARIABLES AND ARRAY

C* t" *"* * E LE MENTS TO DP V A R I ABLE S AND ARRAY ELEMENTS

C**»*t < UNARY MINUS USED TO REVERSE BOTH PLUS AND

C*tt*t MINUS VALUES)

DPIVD = -GCVD

6.4

P01 32530

P0132540

PO 1 32 5 5 0 /44P0132560

POI 32 5 7 0 P01 32580

DPJVD =

- DDOVD P0132590

DPKVD = - AC1D(3) P0 1 32600

DPLVD = - EP 1 D ( 10) P 0 1 3 26 1 0 DPMVD = - BC2D(3. 1

)

P0132620

DPNVD = - BC2D(2,4) P0132630

DPOVD =

- CC3D(2. 1 , 1 ) P0132640

DPPVD = - CC3D(2, 1 ,2) P0 1 3265 0 EP 1 D < 36 > = -GCVD P0 1 32660

EP 1 D < 37

)

= -DDOVD P0132670

EP1D(38) = -AC1D(3) P0 1 32680

EP1D(39) = -EP 1 D < 1 0 ) P0 1 32690

EP 1 0 ( 40 > = -BC2D < 3.1) P0132700

EP1D< 41

)

= -BC2DC2.4) PO 1 3271

0

EP1D(42) = -CC3D(2. 1 . 1 ) P0132720

EP1DC43) = -CC3D(2. 1 .2) P0132730

FC2D(3.4) = -GCVD P0132740

FC2D(4. 4) = -DDDVD P0132750

FC2D(5 f 4) = -AC1D(3) P0132760

FC2D(1 .5) = -EP1DH0) P0132770

FC2D(2.5) = -BC2DC3.1) P0132780

FC2DC3.5) = -BC2D(2.4) P0132790

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) = RC3D(2 , 1,3) = -DDDVD

-AC 1 D < 3

)

-EP1DM0)

-BC2D(3 f.1 )

P0132830

PO 1 32840

PO 1 32850

P0132860

P0132870

P0132880

P 0 1 32890

P0132900

PO 1 3 291 0 P0132920

PO 1 3 293 0 P0132940

PO 1329 5 0 P0132960

P 0 132970

P0132980

POi 32990

P0133000

PO 1 330 1 0 P0133020

PO 1 33030

PO 1 330 40

PO 1 33 0 5 0 P0133060

PO 133 0 70

. PO 1 33080

P0133090

P 0 1 33 1 0 0 P 6 13 3110

PO 1 3 3 1 2 0 PO 133130

P01 33140

P 013 3 1 5 0 P0 1 33 1 60

P

0

"i 33170

PO 1 33 1 80

P(j"i 33190

P0133200

P 0 1 3 3 2 1 0

, P0133220

PO 1 3 3230

P0133240

PO 1 332 5 0 P01 33260

POI 33270

P0133280

, PO 1 33290

P0133300

PO 133310

P0133320

POI 3333-d

P0133340

PO 1 33350

P0133360

P 6 1 3 33 7 0 P0133380

POI 33390

P0133400

PO 1 334 1 0 P0133420

P0133430

P0133440

P 0 1 3 3 4 5 0

P0133460

P 0 1 3 3 4 7 0 P0133480

P 0 1 3 3 4 9 6 P0133500

R C3D ( 3 . 1 RC3D( 1 ,2

3) = 3) =

C * * * * *

RC3D(2.2,3) = -BC20(2

RC3DC3.2.3) = -CC3D(2

R C 3 D ( 1 .3,3) = -CC3D(2

WRITE RESULTS FOR

4)

1 ) 1.2)

THIS SEGMENT

WRITE (NUVI,

A AC 1 D < 2 )

.

"B C C 30(3,1

C AC1D(5),

D CC3D(6, 1

132) MCAVD

BC2D(2, 1 ) '.IT, MCDVD

BC2D( 5 , 1 )

, 1 ) , MCGVD

AC1D( 1 ) , CC3D(2,1

AC1DC4) , CC3D(5,1

A C 1 D ( 7 ) ,

BC2D( 1 , 1 ) 1), MCCVD

B C 2 0 ( 4 , 1 ) 1), MCFVD,

BC2D(7, 1

)

CC3D( 1 , 1 AC 1 D< 3 ) . CC3D<4, 1 AC 1 D < 6 )

,

CC3D(7, i"

1). MCBVD,

BC2D(3 . 1 ) 1), MCEVD,

BC2DC6, 1

)

,

1). MCHVD,

AC1D(8), BC2D < 1 , 2 ) , CC3D(1.2.1). ACVD, AC1D(9), BC2D(2,2)

CC3D(2.2.1). BCVD, AC 1 D ( 1 0 ) . BC2D(3,2)

EP1D(1) , B C 2 D ( 4 , 2 )

, CC3D(4,2,1), DCVD

CC3D(5,2,1), ECVD, EP1D<3) , B C 2 D (6,2)

EP 1 D ( 4 ) , BC2D(7,2), CC3D(7,2,1). GCVD

CC3D(3,2.

EP1D(2) f C C 3 D ( 6 , 2 , EP1D(5> ,

1), CCVD,

BC2D(5,2)

1 ) , FCVD,

BC2D( 1 ,3)

CC3D( 1 , 1 E P 1 0 ( 7 )

' C C 3 D < 4 , i EP1D(10)

WR I TE < NUVI . EP1D(12)

CC3D(2.2

E P 1 D C 1 5 ) CC3D ( 5 ,2

EP1D(18)

WRITE (NUVI,

EP1D(20)

RC3D(3 , 1 E P 1 D < 2 3 ) RC3D(3.2

E P 1 D ( 2 6 )

,2), HCVD,

, B C 2 D ( 3 3 ) ,2). CCDVD,

, B C2D ( 6 . 3

)

133) EEDVD

,

, BC2D(1,4)

,2), HHDVD,

, BC2D(4,4

,2)',SSDVD,

. BC2D(7,4)

134) UUDVD,

, FC2D(2.1)

, 1 ) , XXDVD,

. FC2D(5,1)

, 1). MCIVO,

. FC2D(3.2)

EP1D(6) ,

,.. C C 3 D C 3 , E P 1 D ( 9 )

, CC3D(6.

EP1D(1 1 )

, CC3D(1,

E P 1 D ( 1 4 > ), CC3D(4

EP1D(17).

. CC3D(7,

E P 1 D ( 1 9 )

, RC3D(2,

E P 1 D ( 2 2 )

, RC3D(2.

E P 1 D ( 2 5 >

, RC3D(2.

BC20(2,3)

,

1,2), BBDVD,

, BC2b(5,3)

,

1 2

)

2,2) , GGDVD

,

, BC2D(3,4)",

,2,2), RRDVD

B C 2 D ( 6 , 4 ) ,' 2,2)

, FC2D( 1 . 1 )

,

1), WWDVD,

FC2D(4, 1 ) , 1), ZZDVD,

F C 2 D ( 2 , 2 ) . 1), MCKVD,

CC3DC2.1.2). AAOVO,

E P 1 0 ( 8 ) . BC2D(4,3),

CC3D( 5 ,1,2), DDDVD,

CC30(7.1,2). FFDVD,

EP1D(13), BC2D(2,4),

CC3D(3,2,2), PPDVD,

, EP1DM6) ,BC2D( 5,4)

CC3D(6,2,2), TTDVD,

RC3D( 1 ,1.1), VVDVD,

EP1D(21), FC2D(3,1)

RC3D( 1,2,1), YYDVD,

EP 1 D ( 24 ) , FC2D(1,2)

RC3D( 1 , 3 , 1 ) , HCJVD,

EP 1 D ( 2 7 ) , FC2D(4,2)

2)

RC3D(3,3, 1

)

WRITE (NUVI, 135) 'MCAVD, DPAVD, EP1D(28), FC2D(5,2). RC3DM.1

DCVD, DPBVD. E P 1 D ( 2 9 ) , FC2D(1 .3) , RC3D(2, 1.2), EP1D( 1 ) . DPCVD, EP1D(30), FC2D(2,3). RC3D(3,1,2), EP1D(2), DPDVD,

" E P 1 D < 3 1 ) . F C2D ( 3 , 3 )', R C3D ( 1 ,2,2) , B C2D ( 2,2), DPEVD , EP1D(32 )

,'

F C 2 D < 4 . 3 )

t. RC3D(2,2,2), BC2D(4,2),. DPFVD, EP1D(33), FC2D(5,3)

RC3D(3,2,2) , CC3D(3. 1 . 1 ) . DPGVD, EP 1 D ( 34 ) , FC2D( 1 ,4)

,

RC3D(1.3,2). CC3D(7,2,1). DPHVD, EP1D(35), FC2D(2.4),

R C 3 D ( 2 . 3 . 2 ) , G CV D, DPIVD , E P 1 D ( 36 > . F C 2 D ( 3 , 4 ) , R C 3 D ( 3 , 3 , 2 )

.

DDDVD, DPJVD, EP1D(37), FC2D(4,4), RC3D(1,1.3), AC 1 D ( 3 )

,

DPKVD, EP1D(38), FC2D(5,4), RC3D(2,1,3). EP1D(10), DPLVD.

EP1D(39), FC2D(1,5), RC3D(3,1.3), BC2D(3,1), DPMVD, EP1D(40),

FC2D( 2 . 5 ) , RC3D ( 1 ,2,3) . B C 2 D ( 2,4), DPNVD, E P1D (4 1 ) , FC2D ( 3 ,5)

RC3D(2,2.3). CC3D(2.1,1). DPOVD, EP1D(42), FC2D(4,5),

RC3D(3.2.3), CC3D(2, 1 ,2) , DPPVD, EP1D(43), F C 2 D ( 5 , 5 ) , RC3D( 1 ,3.3)

132 FORMAT ( / A

BCb

E

FG

H

I

JK

LM

N0

P

0

1H1

6X,8H0.34D+02/4(D14.2/)/

6X, 19H0. 123456789101 1D+08/4(D25. 13/)/

6 X . 1 5 HO . 2987652340 - 01 7 4 < D 2 1^ 9 / )

7

6X,17H0.34510000555D+07/4(D23.11/)/

6 X . 1 4 H 0 . 2 2 2 3 2 4 2 5 D + 0 8 / 4 ( D 2 0 . 8 / ) / .281420D+05/4(018.6/)/

. 4 4 5 5 66 77 8 80 + 1 6/ 4 ( D 2 2 . 10/)

,

.35692483569248D+12/4(026.14/)/

.6549876D-03/4(D19.7/)/

78D+10/4CD14.2/)/

6X. 1 2H0

6X, 1 6H0

5X. 20H0

6X . 1 3H0

6X, 8H0

6X, 7H0 . OD + 00/4(013 . 1 / ) / 5X.16H-0. 1726354450+1 1/4(021. 9/)/

6X.12H0.198762D+05/4(D18.6/)/

5X,16H-0.254396621D+03/4(021.9/)/

6X, 2 OHO. 3478652991 0234D-05/4(D26. 14/)/

5X, 10H-0.444D-08/4(D15.3/) ,

1 H 1 . 5 X . 7 H 0 . 0 D + 0 0 / 4 < D 1 3 . 1 / ) / 5X, 10H-0. 123D+20/4(D15.3/)/

NBS FORTRAN Test Programs Version 1 27
R 6X,13H0.36924680-01/4(D19.7/>/ P0133510

S 5X , 19H-0. 1479378249670+07/4(D24. 12/) . 1H ) P0133520

133 FORMAT ( 6X, 18H0. 9277861749850 + 02/ 4 (D2 4. 12/)/ P0 1 33 530

T 5X,.21H-0 . 593549 1 422361 90 + 00 / 4 ( 026.1 4/)/ P0 1 33540

U 6 X, T 4 H 0.98663271 D-03/4(D20.8 7)7 PO 1 33 5 50

V 5X.8H-0. 10-15/4(013.1/)/ P0 1 33 5 60

W 6X. 16H0.3261294675D+22/4(022. 10 7) , PO 1 33 5 70

X 1H1 <4X, 16H-0.9694929090+13/4(D21 .91)1 P0 1 33 5 8 0 Y 6X.13H 0.12460850+ 01/4 (019. 7/)/ PO 1 33 5 90

Z 5X,9H-0.59D+0Z/4(D14.2/),1H ) P0133600

13 4 FORMAT ( 6 X ,18H0. 798281 3922530 + 1 2/4(024. 1 2 7 )7 PO 1 336 1 0

1 6X.11H0. 4292 1 0 + 1 1 / 4 ( 01 7 . 5 /)/ P0 1 33620

2 6 X ,1 5 H 0.79363 5443D + 05/4(D21 .9/) 7 PO 1 3 363 0

3 6X,17H0.333444555660+13/4(D23.11/)/ P0133640

4 5 X 7 1 6 H " 6 • 2 2 2 3 3 3 4 4 4 D + 1 0 / 4 ( D2 1 . 9 / ) / P 0 1 33 6 5 0

5 6X, 7H0 . 1 0 + 02/4(D1 3 . 1 / ) . P0 1 33660

6 1 H 1 , 4 X , 8 H - 0 . 2 D + 0 3 / 4 ( D 1 3 . 1 / ) /

" PO 1 33670

7 6X,20H0.33333333333333D+11/4(D26.14/)/ P0133680

8 5X,16H-0.444444444D + 05/4(D21.9/),1H ) P0 1 33 69 0 135 F ORMAT ( 6X , 2 0 HO . 3 4 0 0 0 0 0 0 0 0 0 0 0 0 D + 0 2 / 5 ( D26 . 1 4 / ) / P0 1 33 70 0

1 5 X ". 2 1 H-0.172635445000000 + 11/5(D26.14 7)1 P 0 1 3 3 7 1 0 2 6X,2OHO.OO00O0OO00OO00D+OO/5(D26.14/)/ P0133720

3 5 X ,2 1 H-0 . 1 72635445000000 + 1 1 / 5 ( D 2 6 . 14/)/ P 0 1 3 3 7 3 0

4 6X. 20H0 . 6 5 498 760 00 0 0 0 00- 03 / 5 ( D26 . 1 4/ ) , P0 1 33740

5 1 H 1 , 5X . 20 H 0.0 00000000000000 + 00/5(026. 1 4/)/ PO 1 33 75 0 6 6X, 20H0 . 2 98 76 5 23 4 00 0 0 0 D-0 1 / 5 ( D26 . 14/ ) / P0 1 33760

7 5 X .2 1H-0.25439662100000D+03/5<D2 6.14/), P 0 1 3 3 7 7

0

8 39H1 EACH GROUP SHOULD BE IDENTICAL EXCEPT/ P0133780

9 3 8H FOR THE SIGNS OF THE FIRST TWO LINES// PO 1 33790

A 6X.20H0 . 3478652 99 102340-05/5(026. 14/)/ P0 1 3 3 8 0 0 B 5 X . 21H-0.14793782496700D + 07/5(D26.14/W P 0 1 3 3 8 1 0

C 6X ( 20H0.298765234000000-01/5(D26.14/)/ P0133820

D 5 X". 21 H-0 .• 4793 7824967000 + 07 / 5 ( 026. 1 4 / ) / p 0 1 3 3 8 3 0

E 6X.20H0.29876523400000D-01/5(D26.14/)/ P0133840

F 6X.20H0. 98663271 000C00D-03/5(D26. 14/)/ P0 1 33 8 5

6

G 6X,20H0.12345678910110D+08/5(D26.14/), P0133860

H 1H1 . 4X, 21 H- 0 . 44 4 0 0 0 0 0 00 0 00 00- 0 8 / 5 (DZ6 . 1 4/ ) > P0 1 33 8 70

C**»** END OF SEGMENT 013 P0133880

C

*"* * * * WHEN EXECUTING ONLY SEGMENT 013, THE STOP AND END CARDS PO 1 33 890

C***t* WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0133900

C * * *"*'* IN COLUMNS 1 AND 2 REMOVED P 0 1 3 3 9 1 0 C= STOP P0133920

C = END P0 1 33 930

STOP P013C1

END P013C2

[

i i '. s j ; i » t i n 1 1

i t i » i i i i i i < i i i i u i i i < i i t i 1 1 » i < t i i < i i i 1 1 1

i n i i • 1 1 i i » 1 1 1 1 1 « p 0 I 5 0 0 1 0

C * * * * * P 0 1 5 0 0 2 0 C*.**.** CASGN - (015) P0 1 50030

C* * * * * P0 1 5 0 040

C***4 »** **»*************************************r(**44********t******P0150050

C

*'*"*

* * G E NERA L PURPOSE ASA RE F P 0 1 5 0 060

C***** * TO TEST METHODS OF FORMING COMPLEX CONSTANTS 5.1.1 P0150070

C« * * * * * TO TEST THAT COMPLEX VARIABLES AND ARRAY 5.1.2/5 P0 1 5 0 08 0 C****t ELEMENTS MAY BE REFERENCED. 5.1.3 /16 P0150090

C * * * * *

*"" TO TEST SIMPLE ARITHMETIC ASS I G N MENT STAT EME NTS 7.1.1.1 PO 150100

C***»* SO THAT THIS FEATURE CAN BE USED FOR INITIALIZATION TABLE 1 P0150110

C* * * * * IN LATER SEGMENTS P0150120

C * * « * * S P ECIFICATIONS SEGMENT 0 1 5 P 0 150130

C* * * * * POO 103 10

C***»* WHEN EXECUTING ONLY SEGMENT 015, THE SPECIFICATION STATEMENTS P 0 0 1 0 3 1 5 C* * * * * WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS P 0 0 1 0 3 2 6 (>**** 1 AND 2 REMOVED. P0 0 1 0 32 5 C* * * * * P 0 0 1 0 3 3 0 C= COMPLEX OEVC.QFVC.QGVC,QHVC,QIVC,OJVC,QtCVC,QLVC,QMVC.QNVC,QOVC, P0 0 1 0 33 5

C = 1 OPVC , ORVC , OSVC , QT V C , 0 U V C , QVVC.K V C , L V C , M V C , N V C , 0 V C , P V C , 0 V C , V V C , P 0 0 1 0 3 4 0 C= 2 MEVC,MFVC,MGVC,MHVC,MIVC,QQVC,MJVC,MKVC,MLVC, MNVC.MOVC, P0010345

C= 3 MPVC, MQVC, MRVC, MSVC.MTVC, MUVC, MVVC, BCVC.DCVC.DDVC PO 0 1 03 5 0 C= COMPLEX AVC , BVC . CVC, DVC, EVC, FVC, GVC, HVC. I VC, JVC, AAVC, P0010355

28 NBS FORTRAN Test Programs Version 1
c=

c=

c = c=

c =

C * t * * t

1 ABVC.BAVC.BBVC, CCVC, CDVC, CAVC , DAVC , ASVC , BSVC , CSVC, P0010360

2 DSVC.AAAVC.ABAVC, ACAVC,ADAVC, CHCVC P0010365

COMPLEX NUMVC. QAVC . QBVC . Q CVC , QDVC . RVC .SVC . TVCVUVC POO 1 0370

1 , MAVC.MBVC.MCVC.MDVC,B1C(8),B2C(4,2) f B3C(2,2 f 2) P0010375

COMPLEX L L 1 C ( 3 2 ) , L M 2 C ( 8 , 4 ) , L N 3 C ( 9 , 2 , 2 ) , A 1 C ( 1 2 ) , A2 C ( 2 , 2 ) , A3 C ( 2 , 2 , 1 ) P 0 01 0 3 8 0 P0010385

COMPLEX OEVC .QFVC , OGVC.QHVC, Q I V C . G(JVC . OKVC , OLVC , QMVC , QNVC , OOVC

,

1 QPVC,QRVC,QSVC,QTVC.QUVC,OVVC,KVC, LVC.MVC, NVC , OVC , PVC , QVC , VVC

,

2 MEVC.MFVC. MG V C . MH V C . M I V C , Q Q V C , M J V C . MK V C , MLVC, MNVC, MOVC.

3 MPVC,MQVC,MRVC,MSVC.MTVC,MUVC,MVVC,BCVC,DCVC,DDVC

COM PL EX AVC,8VC,CVC,DVC.EVC. FVCGVC.HVC. IVC , JVC , AAV C ,

"

1 ABVC.BAVC.BBVC. CCVC. CDVC, CAVC, DAVC. ASVC. BSVC, CSVC,

2 DSVC. AAAVC, ABAVC.ACAVC. ADAVC, CHCVC

COMPLEX NUMVC. QAVC , QBVC . Q CVC , QDV C , RVC . SVC , TVC . UVC

1 MAVC , MBVC , M CVC , MDVC , B 1 C ( 8 ) , B2 C ( 4 , 2 ) , B3 C ( 2 , 2 , 2 ) COMPLEX LL1C(32),LM2C(8,4),LN3C(9,2,2).A1C(12).A2C(2.2),A3C(2,2,

* 0 U fPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE7

'

*

* WHEN EXE CUT I NG ON L Y SEGME NT 015 , THE FOLLOWING STATEME NT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P01 5A1

P01 5A2

P015A3

P01 5A4

P015A5

P015A6

P 0 1 5 A 7 P01 5A8

P01 5A9

1 ) PO 1 5AA

P01 501 40

P0070260

P0070265

P0070270

C * * * *

c * * * *

c * * * *

C * t * *

C 1 1 * * * P0070275

C= NUVI : 6 P0070280

c * * * * * P0070285

NUVI :: 6 P01 5B1

WRITE (NUVI .150) P0150150

WRITE (NUVI ,151) P01 50160

150

151

C * * * *

C * * * *

c * * * *

C * t * *

c * * * *

c * * * *

F0RMAT( 1H1 , 1X, 32HCASGN - (015) COMPLEX ASSIGNMENT/

1 16X, 10HSTATEMENTS/2X, 28HASA REFS. - 5.1.1.4 7.1.1.1//

2 2X, 7HRESULTS//2X.23HLINE 1 OF EACH GROUP IS/

3 2X.21HH0LLERITH INFORMATION/)

FORMA f (2 X , 3 6 H V AL U E S IN A GROUP SHOULD BE THE SAME)

* HEADER FOR SEGMENT 015 WRITTEN

* BEG INN I NG OF TEST OF COMPLE X CONS T ANT ASSIGN ME NTS. I N

* THE FOLLOWING 22 BLOCKS, BOTH PARTS OF THE CONSTANT

* HAVE THE SAME METHOD OF FORMATION

* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

* UNSIGN ED BASIC REAL CONSTANTS

QAVC = (22.2,33.33)

33)

33)

33)

COMPLEX

P 0 1 5 0 1 70

P0150180

PO 150190

P01 50200

P01 50210

P0150220

PO 1 50230

P01 50240

PO i 50250

P01 50260

POI 5 02 70

P0 1 5 028 0

P'6'i 50290

P0 1 5 0300

PO 1 5 03 1 0 P0 1 5 0320

PO 1 50330

P01 50340

PO 1 5 03 5 0 P0 1 50360

POI 5037-6

P0 1 5 03 80

PO 1 50390

P01 50400

P0 1 5 04 1 0 P0 1 50420

P0150430

P0 1 50440

PO 1 5 0450

P0 1 50460

PO 1 50470

P0 1 5 0480

P 6 1 5 0 490

P0 1 5 0 5 0 0 POi 50510

P0 1 5 0 52 0 POI 50530

P01 50540

P01 50550

P01 50560

PO 150 5 70

P0 1 5 0 5 8 0

33

33

33

OF

LL1C(1 ) = (22.2

LM2C(1,1) = (22.2

LN3C( 1 ,1,1) = (22.2

TEST ASSIGNMENT

SIGNED BASIC REAL CONSTANTS

QBVC = (+395. 6, +4106. 7)

Q CVC = (-1 2345.67 ,- 1 234.567 ) QDVC = (+8.9,-9.1

)

QEVC = (-2635 . 1 2, +46. 2 1 ) LL1C(2) = (+395. 6, +4106. 7)

_ j _ ^ 2 3 4 5 /6 7 , - 1 2 3 4

= (+8.9,-9.1)

"= (-263 5. 1 2 , +46.2 1 ) = ( + 395. 6 . +4 1 06. 7 ) = (-12345.67,-1234.567)

= (+8.9,-9.1)

= (-263 5 .1 2 . +46.2 1 ) = (+395. 6. +4106. 7)

"=

( - 1 23 4 5.67 ,- 1 23 4.567 ) = (+8.9.-9.1)

L N 3 C ( 5 , 1 , 1 ) = ( -2 63 5 . 1 2 , + 46 . 21 ) TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

UNSIGNED AN D SI G N ED REAL CO NSTAN TS ( INTEGER PART

ONLY)

C * * * *

c * * * * CONSTANTS FORMED FROM

L L 1 C ( 3 ) LL 1 C ( 4 ) L L 1 C ( 5 ) LM2C(2. 1

)

LM2C(3, 1 LM2C(4, 1

)

LM2C(5. 1

)

LN3C(2. 1 , 1

)

L N 3 C ( 3,1 , 1 ) LN3C(4, 1 , 1 )

5 67 )

C * t * *

C * t * *

c * * * * QFVC

QGVC

QHVC

QIVC

QJVC

QKVC

= (10. ,20.

)

= (+300. , + 4000.

)

= (- 5 0 . ,-60 0. ) = ( + 71 .

, -92 . ) = (-883. , + 1 41 4. ) = ( 1 0 . ,+ 5 62. )

NBS FORTRAN Test Programs Version 1 29
QLVC = (2002. ,-983. ) P01 50590

QMVC = ( + 46 1 . ,- 1 65. ) P01 50600

QNVC = (-21 . , + 122. ) P0 1 5 06 1 0 LL1C(6) = (10. ,20. ) P01 50620

LM2C( 6, 1 ) = (+300. ,+4000 . ) P01 50630

LN3C( 6, 1 . 1 ) = (- 5 0. ,-60 0.

)

P01 50640

LL1C(7) = ( + 71 . ,-92.

)

P0 1 5 06 5 0 LM2C( 7, 1 ) = (- 8 8 3 . , + 1 4 1 4. ) P01 50660

LN3C( 7 , 1 , 1 ) = ( 1 0 . , +562 . ) P01 50670

LL1C( 8 ) = ( 2002. .-983. ) P01 50680

LM2C( 8 , 1 ) = ( + 46 1..- 1 6 5.) P01 50690

LN3C(8, 1,1) = (-21 . , + 122. ) P0 1 5 0 70 0 C***«* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0 1 5 0 7 1 0 C»**** UNSIGNED AND SIGNED REAL CONSTANTS (DECIMAL PART P0 1 5 0 720

C***«* ONLY P0 1 5 0 730

QOVC = ( .0 0 1 , .0 02 0 0 ) P0 1 5 0 740

QPVC = ( + .5 62 , + .562 ) P0 1 5 0 75 0 QQVC = (-. 3 ,-. 3333333 ) P01 50760

QRVC = ( + .4 , -.44 5 ) P0 1 5 0770

QSVC = (-.95, + .95) P01 50780

QTVC = ( .0164239, +.36) P01 50790

QUVC = ( .2 1 ,-.3963 ) P0 1 5 0 8 0 0 QVVC = ( + . 3398 , . 3398 ) P0150810

NUMVC = ( - . 6 , . 6

)

P0 1 5 0 82 0 LL 1 C( 9 ) = (.001, .00200) P01 50830

LM2C( 1 . 2 ) = ( + .562 , + .562 ) P01 50840

LN3C( 1 , 2 , 1 ) = ( - . 3 , - .3333333 ) P0 1 5 0 8 5 0

L L 1 C ( 1 0 ) = ( + .4 , -.445 ) P01 50860

LM2C (2.2) = (-.95, +.95) P01 50870

LN3C(2.2, 1 ) = ( .0 1 64239, + .36 ) P0 1 5 08 80

LL1CM 1 ) = ( .2 1 ,-.3963 ) P01 50890

LM2C( 3 . 2 ) = ( + .3398 , .3398 ) P01 50900

LN3C(3,2. 1 ) = (-.6, .6) P0150910

C***t* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P01 50920

C***»* UNSIGNED REAL CONSTANTS WITH UNSIGNED EXPONENTS P01 50930

AVC = (0.0E0, 1 .0E0) PO 1 50940

LL1CM 2 ) = ( 4 5 623 1 .1 E 1 ,789 . 453E3) P0 1 5 09 5 0 LM2C(4,2) = ( 44 . 9E4 , 2 . 5E3

)

P0 1 5 0960

LN3C( 4 , 2 , 1 ) = ( 2222. 3E 3 , 3 33. 2E2) P01 50970

C**t«* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0 1 5 098 0 Ctt*«* UNSIGNED REAL CONSTANTS WITH SIGNED EXPONENTS P01 50990

BVC = (3.0E+0.3.0E+0) P 0 1 5 1 0 0 0 CVC = (987654. 3E-1 .876543. 2E-2) P01 51010

DVC = (4.444E+3.55.555E-4) P0151020

EVC = (6.0E-5.7.7E+6) P 0 1 5 1 0 3 0 LL1C(13) = (3.0E+0.3.0E+0) P01 51 040

LM2C( 5 . 2 ) = ( 9 8 76 5 4. 3 E- 1 , 8 76 5 43. 2E-2) P01 51050

LN3C(5.2,1) = (4.444E+3.55.555E-4) P0 1 5 1 0 60

LL1C(14) = (6.0E-5.7.7E+6) P01 51 070

C***«* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P01 5 1 080

C**t»* SIGNED REAL CONSTANTS WITH UNSIGNED EXPONENTS P01 51090

FVC = (+14.2E1 .+26.67E0) P01 51 1 00

GVC = (-36.923E4.-0.234E03) PO 1 5 1 1 1 0 HVC = (+2.1E2.-2.1E2) P0151120

IVC = (-595.9E00.+4.967E2) P01 51 130

LM2C(6.2) = (+14.2E1 .+26.67E0) P01 51 140

LN3C(6,2,1) = (-36.923E4.-0.234E03) P01 51 1 50

LL1C(15) = (+2. 1E2.-2. 1E2) P 0 1 5 1 1 6 0 LM2C( 7 , 2 ) = ( -595 . 9E00 , +4 . 967E2

)

P01 51 1 70

Ct**»* TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P01 51 180

C***t* SIGNED REAL CONSTANTS WITH SIGNED EXPONENTS P01 51 190

JVC = ( + 1 .0E + 0. + 1 .0E + 0) P01 51200

KVC = (-2.0E-0.-2.0E-0) P0151210

LVC = (+49.2E-1 .-65.27E+2) P0151220

MVC = (-737. 1 E + 3

, +99 . 8E-3 ) P 0 1 5 1 2 3 0 NVC = (+4774. 47E+03, -9362. 4E-4) P01 51240

OVC = (-846 . 2E-5. + 13.33E + 1 ) P01 51250

LN3C(7,2.1) = ( + 1 .OE + 0, + 1 .OE + 0) PO 1 5 1 260

30 NBS FORTRAN Test Programs Version 1
LL1C(16) = (-2.0E-0.-2.0E-0) P 0 1 5 1 2 70

L M 2 C ( 1 , 3 ) = ( + 49.2E-1 ,-65.27E + 2> P0151280

L N 3 C < 1 , 1 , 2 > = < - 7 3 7 . 1 E + 3 . + 9 9 . a

E

- 3 > P0 151290

LL1C( 1 7) = (+4774 . 47E+03, -9362 . 4E-4) P0 1 5 1 300

LM2C<2,3) = (-846.2E-5.+13.33E+1

)

P01 5131 0

c * * * * * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P01 51320

c * * * * * UNSIGNED REAL CONSTANTS (NO DECIMAL PART) WITH P01 51330

c * * * * * UNSIGNED EXPONENTS P01 51340

PVC = (77. E7 . 8 1 6248. E2> P01 51350

LL1CM8) = (77. E7 , 8 1 6248. E2> P01 51360

LM2C<3,3) = ( 1 334 . E0 1 , 379 . E03

)

P 0 1 5 1 3 7 0 LN3C( 2 . 1,2 ) = ( 1 334 . E0 1 ,379. E03) P01 51380

c * t * * * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P01 51390

c * * * * * UNSIGNED REAL CONSTANTS (NO DECIMAL PART) WITH P0151400

c * * * * * SIGNED EXPONENTS P0151410

QVC = (3.E+5.3.E+05) P01 51 420

RVC = (299.E-4.299.E-1

)

P01 51 430

SVC = (1419. E + 2. 1419. E-2), P01 51 440

TVC = (76.E-3.987.E+0) P01 51 450

LL1CU9) = (3.E+05.3.E+5) P01 51 460

LM2CU.3) = (299.E-4.299.E-1

)

P0151470

LN3C<3,1,2) = (1419. E + 2, 1419. E-2) P0151480

LL1C( 20 ) = ( 76.E-3, 987. E + 0) P0151490

c * * * * * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P01 51 500

c * * * * * SIGNED REAL CONSTANTS (NO DECIMAL PART) WITH P01 51 510

C * t * * * UNSIGNED EXPONENTS P01 51 520

UVC = ( +31 . EO . +4659 . E1 ) P01 51 530

VVC = (-728. E2, -93296. E3) P0151540

MAVC = (+6.E6.-6.E6) P01 51 550

MBVC = (-7914.E3.+16.E5) P01 51 560

LM2C(5,3) = (+31 .E0.+4659.E1) P01 51 570

LN3C( 4 , 1 . 2 ) = (-728. E2, -93296. E3) P0151580

L L 1 C ( 2 1 ) = (+6.E6.-6.E6) PO 1 5 1 5 90

LM2C(6,3) = (-7914.E3,+16.E5> P01 51600

c * * * t * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM P0151610

C * * * * * SIGNED REAL CONSTANTS (NO DECIMAL PART) WITH P01 51620

c * * 1 1 * SIGNED EXPONENTS PO 1 5 1 630

MCVC = ( + 1 .E + 1 , + 1 .E + 1

)

P01 51640

MDVC = (-2. E-2, -2. E-2) P0151650

MEVC = (+3.E-3.-3.E+3) PO 1 5 1 660

MFVC = (-4.E+4.+4.E-4) P01 51670

MGVC = (+5.E+5,-5.E-5) P0151680

MHVC = (-6.E-6.+6.E+6) P01 51690

LN3C(5,1 ,2) = ( + 1 .E + 1 , + 1 .E + 1 ) PO 1 5 1 700

LL1C(22) = (-2. E-2, -2. E-2) P0151710

LM2C(7,3) = (+3.E-3.-3.E+3) P01 51 720

LN3C(6,1 .2) = (-4.E+4.+4.E-4) P01 51 730

LL1C(23) = (+5.E+5.-5.E-5) P01 51 740

LM2C(1,4) = (-6.E-6.+6.E+6) PO 1 5 1 750

c * * 1 1 * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM PO 1 5 1 760

c * * * * t UNSIGNED REAL CONSTANTS (NO INTEGER PART) WITH P01 51 770

C * * * * * UNSIGNED EXPONENTS PO 1 5 1 780

MIVC = ( .39393E01 , .62E04) P01 51 790

LLI C < 2 4 ) = ( . 39393E01 , .62E04) P01 51800

LM2C( 2 , 4 ) = ( . 009E2 , . 765765E3) P 0 1 5 1 8 1 0 LN3C(7.1.2> = ( . 009E2, .765 765E3) P01 51820

c * * * t * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM PO 1 5 1 830

C * t * t * UNSIGNED REAL CONSTANTS (NO INTEGER PART) WITH P01 51 840

C t * * * * SIGNED EXPONENTS P0151850

MJVC =( .3 52E + 09 , .352E + 3) PO 1 5 1 860

MKVC =( . 1 47626E + 0, .891E-14) PO 1 5 1 8 70

MLVC =( .9E-7, .9999E + 8) P01 51880

MNVC =( . 13E-04, . 13E-04) P01 51 890

LL1C( 25 ) =( .3 52E + 09, .352E + 3) P01 51900

LM2C(3,4) . =( . 1 47626E + 0, .891E-14) PO 1 5 1 91

0

LN3C(1 ,2,2) =( .9E-7, .9999E + 8) P01 51920

LN3C(2,2,2) =( .13E-4, .13E-4) P01 51930

c * * * * * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM PO 1 5 1 940

NBS FORTRAN Test Programs Version 1 31
C * 1 1 1

1

c

» * * * t SIGNEO REAL CONSTANTS (NO INTEGER PART) WITH

UNSIGNED EXPONENTS

P0151950

PO 1 5 1 960

MOVC = < + . 77E00 . + . 77E00 > MPVC =(+ 878E1.- 878E1)

PO 1 5 1 970

PO 1 5 1 980

MOVC = C - . 9797E2 . + . 9797E2 > MRVC =(- 10101E15 - 10101E15)

PO 1 5 1 990

P 0 1 5 2 0 0 0 LL1C(26) =< + ..77E00 . + . 77E00 > LM2C(4 4) =(+ 8 7 8 E 1 . - 878E1)

P0 1 520 1 0 P0 1 52020

LN3C(3,2,2) = < - . 9797E2 . + . 9797E2 > LN3C( 4 2 2 ) =(- 1 0 1 0 1 E 1 5

. - . 1 0 1 0 1 E 1 5 )

P0 1 52030

P01 V 11 52040 J b V ~ V

c * * * * *

c * * * * * TEST ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM

SIGNED REAL CONSTANTS (NO INTEGER PART) WITH

P0 1 520 50

P0 1 52060

c * * * * * SIGNED EXPONENTS

MSVC =(+ 6*8 E + 1 2 . + 357628E+0)

P01 52070

P0 1 520 80

MTVC =(+.798E-3.+.76444E-00)

MUVC =(- 3247E+20 - 2594E+5)

P01 52090

P0 1 52 1 00

MVVC =

( - . 43599E- 1 9

. - . 12E-4)

AAVC =( - 6E-9.- 6E+9)

P0 1 52 1 1

0

P0 1 5 2 1 20

ABVC =<-.91 19E+6.+.91 19E-6)

BAVC = ( + . 39426E + 2 . - . 39426E-2 )

P0 1 52 1 30

P01 521 40

BBVC =<+.45E-12,+.45E+12>

LL1C(27) = ( + . 68E + 1 2

, + . 357628E+0

)

P01 521 50

P01 521 60

LM2C( 5 . 4) =(+.798E-3,+.76444E-00)

l w 3 C ( 5 2 2 ) =(- 3247E + 20,- 2 594E + 5)

P01 521 70

P0 1 52 1 80

LL1C(28) =<-.43599E-19,-.12E-4)

LM2C(6 4) =(- 6E-9.- 6E+9)

P01 521 90

P0 1 52200

LN3C(6.2,2) =(-.9119E+6,+.9119E-6)

LM2C(7,4) =(+.39426E+2,-.39426E-2)

P0 1 5 22 1 0 P01 1 V 1 52220 J Urn Cm V

c * * * * * LN3C(7,2,2) =(+.45E-12.+.45E+12)

ASSIGNMENT OF COMPLEX CONSTANTS FORMED FROM SIGNED AND

P0 1 52230

UNSIGNED P0152240

c * * * * * INTEGER CONSTANTS WITH SIGNED AND UNSIGNED EXPONENTS

BCVC = ( + 4793E + 2 , 3479E2 ) P01 52250

P0 1 52260

DDVC = ( 3682E-3 , 8236E-2 ) DCVC = (-2571E5 +1752E+5)P01 52270

P0i V 11 52280 J t- L. <J v CHCVC = ( + 1 460E-4 .- 1 064E + 01 ) A1C( 5 ) = ( 4793E2 , 3479E + 2 )

P0 1 52290

P0 1 52300

A1C(6) = (3682E-03.+8236E-02)

A 1 C ( 7 ) = (-2571E + 5.1752E + 05)

P0 1 5 23 1 0 P0I V 11 52320 -1 ^ w 1— V A1C( 8 ) = ( 1 460E-4 . - 1 064E1 ) LM2C(8.2) = (4793E+2 +3479E+2)

P0 1 52330

P01 V 11 523 J tm J 40~ V LN3C(8,2,1) = (+3682E-3.8236E-02)

LN3C(8,2,2) = ( -257 1 E + 0 5 , 1 75 2E5 ) P01 52350

P01 52360

C t * * * * LN3C( 8,1,2 ) = ( 1 460E- 0 4 .- 1 064E + 1 ) ASSIGNMENT OF COMPLEX VARIABLES AND ARRAY ELEMENTS

P01 52370

P0 1 523 8 0

c * * * * * TO COMPLEX VARIABLES AND ARRAY ELEMENTS

CCVC = QTVC

P01 52390

P0 1 52400

CDVC = LL1CU2)

CAVC = LM2 C ( 1 , 4 ) P0152410

P0 1 52 420

DAVC = LN3C(6,2.2)

A 1 C C 1 ) = CCVC

P0 1 52430

P0 1 52440

A1C(2) = LL1C(12)

A 1 C ( 3 ) = LM2 C ( 1, 4 )

P0 1 5 24 5 0 P01 52460

A1C(4) = LN3C(6,2,2)

A2 C ( 1 , 1 > = QTVC

P01 52470

P0 1 52 480

A2C(2. 1 ) = LL1 C( 12)

A2 C ( 1 , 2 ) = LM2C ( 1 , 4 )

P0 1 52490

P0 1 52 5 00

A2C(2,2) = LN3C(6.2.2)

A3C( 1 , 1 , 1 ) = CCVC

P0 1 5 2 5 1 0 P0 1 52520

A3C(2. 1 , 1 ) = LL1 C( 12)

A3 C ( 1 , 2 , 1 = LM2C(1 4)

P0 1 52 530

P01 52540

c * * * * * A3C(2,2, 1 ) = LN3C(6,2,2)

ASSIGNMENT OF COMPLEX VARIABLES AND ARRAY ELEMENTS

P0 1 52 5 5 0 P0 1 5 2 5 60

c * * * t *

c * * * * * TO COMPLEX VARIABLES AND ARRAY ELEMENTS (UNARY

MINUS USED TO REVERSE BOTH PLUS AND MINUS VALUES)

6.4/44P01 52570

P0 1 52 5 80

ASVC = - QGVC

BSVC = - QHVC

P0 1 52 590

P0 1 52600

CSVC = - L L 1 C ( 26 ) DSVC = - L L 1 C ( 23 )

P0 1 5261 0 P0 1 52620

32 NBS FORTRAN Test Programs Version 1
a a i u r AAAVC =

1 U 7 P / 4 7 \ LMZ C ( 1 , 3

) P01 52630

A A 1 w r — AAAVC =1 U 7 P / 4 7 \ LMZ C ( 1 , 3 ) RAJ F 7 / 1 A P0 1 52640

a n a \ / p _ ABAVC =1 U "5 P / 4 i \ LMZ C ( 1 , 4 ) A 4 P 7 / FA P01 52650

a f a v/ r -> ACAVC - LN3C(5,Z,1) Pi A 4 C 7 Z Z A P01 52660

ADAVC =

1 II 1 P / t 7 4\

L N 3 C ( 6 , Z , 1 )

F\ A -1 fT "V / *TA P0 1 52670

B 1 C ( 1 ) = QGVC P0 1 52680

n 4 p / i \ — B 1 C ( Z ) = Q H V C P0 1 52690

B 1 C ( 3 ) = L L 1 C ( Z6

)

FN A .1 I— ^ ^ A A P0 1 52700

n 4 p / / \ _

B 1 C ( 4 ) =

1 1 4 P / 7 7 \ L L 1 L ( Z 3 ) P0 1 5 2 7 1 0

B 1 C ( 5 ) -

1 U 7 P / 4 7 \ LMZ C ( 1 , 3 )fl A 4 F "7 "1 A P0 1 52 720

B 1 C ( 6 ) = LMZ C ( 1 , 4 ) P0 1 5 2 730

n i p / 7 \ — B 1 C ( 7 ) =1 ftl 7 P / C 7 4\ LN3C(5,Z,1) P 0 1 5 2 740

B 1 C ( 8 ) =

1 II 7 P / Z. 7 4\

L N 3 C ( 6 , Z , 1 ) P 0 1 5 2 7 5 0 B2 C ( 1 , 1 ) - QGVC P0 1 52 760

n o p / 7 4 \ B2 C ( 2 , 1 ) —Pi 1 J I / P - QHVC n a 4 e 7 7 7 A P0 1 5 2 770

n 7 p / 7 4 \ B2 C ( 3 , 1 )1 1 4 P / 7 L \ - LLIC(Zo) n A <l F "1 T a A P 0 1 5 2 78 0 n 7 p / / 4 \ B2 C ( 4 , 1 ) —

1 1 4 P / 1 7 \ - L L 1 C ( Z 3 ) n a 4 r/ 7 7 a a P 0 1 5 2 790

B2 C ( 1 , 2 )

1 U 7 P / 4 7 \ - L M Z C ( 1 , 3 )

p> A a P" 7 A A A P0 1 5 280 0

r» 7 p / 7 1 \ B2 C ( 2 , 2 ) — - L MZ C ( 1

, 4 ) n a i rTM ft * a P 0 1 5 2 8 1 0

n 7 p / 7 7 \ B2 C ( 3 , 2 )1 II 7 P / C 7 4\ - LN3C(5,Z,1) n A <l r 7 O 7 A P 0 1 5 2 8 2 0 n 7 p / / 7 \ B2 C ( 4 , 2 )

1 11 7 P / Z 7 4\ - LN3 C ( 6 , 2 , 1 ) n A « r" ~> ft ^ A P 0 1 5 2 8 3 0 n 7 p / 4 4 B3 C ( 1 , 1 ,

4 \ 1 ) A p \ y p = - QGVC P 0 1 5 2 8 4 0 n 7 p / 7 4 B3 C ( 2 , 1 ,

4 \

1 ) _ A 1 1 \ / P

- - QHVC Pi A 4 C 7 O C A P 0 1 5 2 8 5 0 n 7 p / 4 i B3 C ( 1 , 2 , 1 ) = - LL1C(26) n a ^ n 7 a / a P0 1 52860

n 7 p / 7 7 B3 C ( 2 , 2 , 1 ) _ 1 i 4 P / 7 7 \ - - L L 1 C ( 2 3 ) n A 4 IT 7 O 7 A P0 1 52870

B3C( 1 ,1,2) _ 1 M 7 P / 4 7\ = - LMZ C ( 1 , 3 ) P.A4C70AA

P 0 1 5 2 8 8 0 B3C(2, 1 ,2) = - L M 2 C ( 1 , 4 ) n A 1 ^ -> ft A P 0 1 5 2 8 9 0 B3C( 1 ,2.2) - iM7r/Q ~> i \ - - LNH1 J , £ , w DAI C O Q rt ft

c * * * * * B3C(2.2.2) = WRITE

LN3C(6,

RESULTS FOR

152) QAVC

LM2 C ( 2 , 1 ) 1). QDVC,

LM2C( 5 , 1 )

2,1)

SEGMENT

L L 1 C ( 1 ) , LMZC< 1

, 1

)

LN3C(2, 1 , 1 ) , QCVC,

L L 1 C ( 4 ) , LM2C(4, 1 )

,

LN3C(5, 1 , 1 ) , QFVC,

THIS TEST

WRITE < NUVI

,

1 LL1C(2),

2 LN3C<3, 1 3 LL1C(5),

4 LM2C(6,1), QHVC, L N 3 C ( 6 , 1 , 1 ) , QIVC, L L 1 C ( 7 ) , QJVC, LMZ C< 7.1)

5 OKVC, LN3C(7,1,1), QLVC, LL1C(8), QMVC, LM2C(8,1), QNVC,

LN3C( 1

.

L L 1 C ( 3 ) , L N 3 C ( 4 ,

1

L L 1 C ( 6 ) ,

1.1), 0BVC

LM2C(3, 1

)

, 1 ) . QEVC,

QGVC.

6 LN3C(8. 1 , 1 )

,

7 LN3C(1 ,2,1).

8 LN3C(2,2, 1)

WRITE (NUVI, 153)

123

4

Q0VC, LL1C(9), QPVC, LM2C(1,2), QQVC

QRVC, L L 1 C ( 1 0 ) , QSVC, LM2C(2,2), QTVC

P0 1 5 29 1 0 P01 52920

P0 1 5 293 0 P01 52940

P0 1 529 5 0 P0 1 52960

P0 1 52970

P0 1 5 2980

P0 1 52990

P0 1 5 300 0 P0 1 5 3 0 1 0 P0 1 5 3 020

P 0 1 53 030

P0 1 530 40

P 0 1 5 3 0 5 0 P01 53060

P01 53070

P01 53080

P 6 1 5 3090

P0153100

P 0 1 5 3 1 1 0 P01 53120

P 0 1 5 313 0 P01 531 40

P 6 1 5 31 5 0 P 0 1 5 3 1 6 0 P01 531 70

P01 531 80

P0 153190

P01 53200

P0 1 532 1 0 P0 1 5 3220

P0 1 5 323 0 P01 53240

P0 1 532 5 0 P0 1 53260

P 0 1 5 32 7 0 P0 1 5 328 0 P0 1 53290

P01 53300

QUVC. LL 1 C ( 1 1 ) QVVC, LM2CC3.2)

LN3C(3,2, 1 > , AVC, L L 1 C ( 1 2 ) , LM2CC4.2) , LN3C(4,Z

LL1CC13), CVC, LM2C(5,2), OVC, LN3C(5,2,1), EVC

FVC, LM2C(6,2> , GVC, L N 3 C < 6,2,1), HVC, L L 1 C ( 1 5 ) LM2C(7,2), JVC, LN3C(7.2.1), KVC, LL1C(16), LVC

NUMVC,.

1) , BVC,

L L 1 C ( 1 4 )

i vc

,

LM2C(1 ,3)

5 MVC, LN3C(1,1,2), NVC, LL1C(17)

WRITE ( NUV I ,8873) OVC. LM2CC2.3), PVC.

1 L L 1 C ( 1 8 ) , LM2C(3, 3) , L N 3 C ( 2 , 1 ,2) , OVC, LL1 C( 19)

WRITE (NUVI, 154) RVC. LM2C(4,3), SVC, LN3C(3,1,2), TVC

1 LL1C(20), UVC, LM2C(5,3), VVC, LN3C(4,1,2), MAVC, LL1C(21)

2 MBVC, LM2C(6.3). MCVC, LN3C(5,1,2), MDVC, LL1C(22>, MEVC,

3 LM2C(7, 3) , MFVC, LN3C(6, 1,2), MGVC, L L 1 C ( 2 3 ) , MHVC,

4 LM2C(1,4), MIVC, LL1C(24), LM2C(2,4), LN3C(7,1,2)

WRITE (NUVI, 8870) MJVC, LL1C(25), MKVC, LM2C(3,4), MLVC,

LN3C(1,2.2). MNVC, LN3C(2,2,2), M0VC, LL1C(26)

+ MPVC, LM2C(4,4), MQVC, LN3C(3,2,2) . MRVC,

= LN3C(4,2.2). MSVC. LL1C(27), MTVC, LM2C(5,4),

$ MUVC , LN3C(5.2.2), MVVC, L L 1 C ( 2 8 ) , AAVC,

LM2C(6,4), ABVC, LN3C(6.2.2), BAVC, LM2C(7.4).

+ BBVC, LN3C(7,2.2)

WRITE (NUVI , 88 72 ) BCVC.A1C(5).LM2C(8,2),DDVC, A1C(6),LN3C(8.2,1),

1 DCVC.A1 C(7) ,LN3C(8,2,2) , CHCVC.A1 C(8) ,LN3C(8, 1 ,2)

0WRITE (NUVI. 8871) QTVC, CCVC, A1C(1), A2C(1,1), A3C(1,1,1),

A2C(2.1), A3C(2, 1 , 1 ) , LM2C( 1 , 4) , A3C(1.2,1), LN3C(6,2,2), DAVC,

2,1), QGVC, ASVC , B1 C( 1 ) , B2C(1 .1 ) , B1C(2), B2C(2,1), B3C(2,1 ,1),

B2C(3, 1 ) , B3C(1 .2, 1 ) . L L 1 C ( 2 3 ) . B3C(2,2,1), LM2C(1,3), AAAVC, B1C(5)

LL1C(12), COVC, A1C(2),

CAVC, A1C(3), A2C(1,2),

A1C(4) , A2C(2,2) , A3C(2

B3C(1.1.1), QHVC, BSVC,

LL 1 C ( 26 ) , CSVC . B 1 C ( 3 ) , DSVC. B1C(4), B2C(4,1),

NBS FORTRAN Test Programs Version 1 33
7 B2C(1,2), B3 C ( 1 . 1 . 2 > . LM2C<1,4>, ABAVC , B1C(6), B2C(2,2), P0 1 533 1 0 8 B3C<2,1,2),. LN3C<5,2,1), ACAVC, B1C(7)< B2C(3,2), B3C<1,2,2>, P01 53320

'9 LN3 C < 6 ,2,1). ADA V C , B 1 C ( 8 > , B 2 C ( 4 , 2 ) , B 3 C ( 2,2, 2 > P0 1 53330

Ct**t* FORMAT STATEMENTS FOR THIS SEGMENT P0153340

152 FORMAT (7 6X , 9H0 . 222E + 02 ( 9X , 1 0 HO . 3 3 3 3E + 02 / 4 ( E 1 5 . 3 , E 1 9 . 4 / ) / PO 1 533 50

A 6X,10H0.3956E + 03,.8X,11H0.41067E + 04/4(E16.4,E19.5/)/ P0153360

B 5X, 14H-0 .1 2 3 4 5 6 7E + 0 5 . 4X . 1 4H - 0 . 1 23 4 5 6 7E + 0 4 / 4 ( E 1 9 . 7 , E 1 8 . 7 / ) / P 6 1 53370

C 6X,8H0.89E+01,9X,9H-0.91E+01/4<E14.2,E18.2/)/ P0153380

0 5 X , 13H-0.2 6 3 5 1 2 E + 6 4 , 6 X , 1 0 H 0 . 4 6 2 1 E + 0 2 / 4 ( E 1 8 . 6 , E 1 6 . 4/ ) / P 0 1 5 3 3 9 0 E 6X.7H0.1E+02,11X,7H0.2E+02/2(E13.1,E18.1/)/ P0153400

F 6X , 7H0 . 3E + 03 , 1 1 X , 7H0 . 4E + 04 / 2 ( E 1 3 . 1 .E18.1/W P 0153410

G 5X.8H-0.5E+02,10X,8H-0.6E+03/2(E13.1,E18.1/)/ P0153420

H 6 X, 8 HO. 7 IE* 02 , 9X , 9H- 0 . 92E + 0 2 / 2 ( E 1 4 . 2 , E 1 8 . 2 / ) / P 0153430

I1H1,4X,10H-0.883E+03 ( 9X,10H0.1414E+04/2(E15.3,E19.4/)/ P01 53440

j 6X, 7H0. 1E + 02, 1 1X,9H0.5 62E + 03/2(E13. 1 ,E2 0.3/)/ P 0153450

K 6X,10H0.2002E+04.7X,10H-0.983E+03/2(E16.4,E17.3/)/ P0 1 5 3 460

L 6X,9H0.461E + 03,8X, 1 0 H- 0 . 1 6 5 E + 0 3/ 2 ( E 1 5 . 3 , E 1 8 . 3 / ) / PO 1 5 3 470

M 5X.9H-0.21E + 02, 10X.9H0. 1 2 2 E + 0 3 / 2 ( E 1 4 . 2 , E 1 9 . 3 / ) / P0 1 5 3 48 0 N 6X , 7H0 . 1 E - 0 2 , Tl X , 7 H 6 . 2 E - 0 2 / 2 ( E 1 3 . 1 , E 1 8 . 1 / ) / P0 1 5 3 49 0 0 6X.9H0.562E+00,9X,9H0.562E+00/2<E15.3,E18.3/)/ P0153500

P 5 X , 8 H - 6 . 3 E + 0 0 . i 6 X , 1 4 H - 0 . 3 3 3 3 3 3 3 E + 0 0 / 2 ( E 1 3 . 1 , E 2 4 . 7 / ) / P 6 1 5 3 5 1 0 Q 6X.7H0.4E+00, 10X, 1 0 H- 0 . 4 4 5 E + 0 0 / 2 ( E 1 3 . 1 ,E20.3/)/ P0153520

R 5 X . 9 H - 0 . 9 5 E + 0 6 , 1 0 X , 8 H 0 . 9 5 E + 0 0 / 2 ( E 1 4 . 2 , E 1 8 . 2 / ) / P 6 1 5 3 5 3 0 S 6X. 12H0. 1 64239E-01 , 6X , 8 H 0 . 3 6E + 0 0 / 2 ( E 1 8 . 6 , E 1 4 . 2 / ) , 1H ) P0 1 53 5 40

15 3 FORMAT ( 6 X , 8 H 0 . 2 1 E + 0 0 , 9 X , 1 1 H

- 0 . 3 9 6 3 E + 0 0 / 2 ( E 14 . 2 , E 2 0 . 4 / j 7 PO 1 53 5 5 0 A 6X,10H0.3398E+00,8X,10H0.3398E+00/2(E16.4,E18.4/)/ P0153560

B 5 X , 8 H - 6 . 6 E + 0 0 . 1 i X . 7 H 0 . 6 E + 0 0 / 2 ( E 1 3 . 1 , E 1 8 . 1 / )7 P 0 1 5 3 5 7 0 C1H1 f 5X,7H0.0E + 00,11X.7H0.1E + 01/E13.1 ( E18.1// P01 53580

0 6X, 13 HO. 456231 1E + 07, 5X, 12 HO . 789453E + 06/E19. 7, El 7 .6// PO 1 53 5 90

E 6X.9H0.449E+06,9X,8H0.25E+04/E15.3,E17.2// P0153600

F 6X, 1 1H0 . 22223E + 07. 7X . 1 OHO . 3 3 3 2 E + 0 5 / E 1 7 . 5 , E 1 7 . 4/"/ P 6 1 5 3 6 1 0 G 6X. 7H0.3E + 01 . 1 1X.7H0.3E + 01 /2(E13. 1 /E18. 1 />/ P0 1 5 362 0 H 6X,13H0.9876543E + 05.5X,13H0.8765432E + 04/2(E19.7,E18.7/)/ P 6 1 5 3 6 3 0

1 6X,10H0.4444E+04,8X,11H0.55555E-02/2(E16.4,E19.5/>/ P0153640

J 6X, 7H0.6E-04, 1 1X, 8H0.77E+07/2(E13. 1 ,E19. 2/)7 PO 153650

K 6X,9H0.142E+03,9X.10H0.2667E+02/2(E15.3,E19.4/)/ P0153660

"l'

' 5X, 12H-0. 3692 3E + 06, 6X. 10H-0 . 23 4E + 03 / 2 ( E 1 7 . 5 ,E16. 3/)/ P 0 1 5 3 6 7 0 M 6X.8H0.21E+03,9X,9H-0.21E+03/2(E14.2,E18.2/)/ P0153680

"" N 5 X ,11 H-0 .5 9 5 9 E + 0 3 . 8X, 1 6 HO .49 67 E + 6 3/2 ( El 6.4 , El 8 .4 / ) 7 PO 1 5 3690

0 6X, 7H0 . 1E + 01 . 1 1X, 7H0 . 1 E + 0

1

II (E1 3 . 1 , E1 8 . 1 / ) / P0 1 5 3 700

P 5X , 8H-0 . 2E + 01 , 1 OX , 8H-0 . 2E + 01/ 2 (El 3 . 1 , E1 8 . 1 / ) / P0 1 5 3 7 1 0 Q 6X, 9H0 . 492E+01 , 8X. 1 1H-0 . 6 5 2 7E + 0 4 / 2 ( E 1 5 . 3 , E1 9 . 4/ ) , P0153720

RiH T . 4 X , 1 1 H - 0 . 7 3 7 1 E + 0 6 ,8X,9H0.998E-01/2(E16. 4 , E1 7

.

3/ ) I P 0 1 5 3 73 0 S 6X.12H0.477447E+07.5X,12H-0.93624E+00/2(E18.6,E17.5/),1H ) P0153740

8873 FORMAT ( 5 X . 1 3 H-0 . 8462 0 0 E - 0 2 ,6 X ,11 HO .1 3 3 3 0 E + 0 3 / 2 ( E 1 8 . 6 , E 1 7 . 5 / )7 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 . 12 HO . 1 33400E 0 5 . 6X , 11H0 . 379 0 0 E + 0 6 7 2 < E 1 8 ^ 6 , E 1 7 ^ 5 7 > 7 P 0 1 53 770

U 6X,12H0.300000E+06,6X,11H0.30000E+06/2(E18.6,E17.5/),1H ) P0153780

154 FORMAT ( 6X , 9H0 . 299E - 0 1 , 9X , 9H 0 . 2 99E + 0 2 / 2 ( E 1 5 . 3 , E 1 8 . 3 / ) / P 0 1 5 3 7 9 0

............ A 6X.10H0.1419E+06,8X,10H0.1419E+02/2(E16.4.E18.4/)/ P0153800

6X ( JHO . 76 E

- 0 1 . 10 X ,9H0.987E + 03/2(E14 . 2.E19. 3 / )7 P 0 1 53 8 1 0 C 6X.8H0.31E+02.10X.10H0.4659E+05/2(E14.2,E20.4/)/ P0153820

""0""

5 X , 1 0 H - 0 . 7 2 8 E + 0 5 , 8 X . 12H-0. 93296 E + 08 7 2 (El 5.3 7 E 20 .5 / )/ P 0 1 5 3 8 3 0 E 6X.7H0.6E+07, 10X,8H-0.6E+07/2(E13. 1 ,E18.1/)/ P0153840

F 5 X , 1 1 H - 0 . 79 1 4 E + 0 7,8 X , 8 H 0 . 1 6 E + 0 7 / 2 ( E 1 6 . 4 , E 1 6 . 2 7 ) /

" P 6 1 538 5 0 G 6X,7H0.1E+02,11X,7H0.1E+02/2(E13.1,E18.1/), P0153860

H1Hi,4X,8H-0.2E-01,10X,8H-0.2E-bl72(E13.1,E18.1/)/ PO 1538 70

1 6X,7H0.3E-02,10X,8H-0.3E*04/2(E13.1 ,E18.1/)/ P0153880

J 5X.8H-0 . 4E + 0 5 , 1 TX, 7H0 . 4E-03/ 2 ( E 13. 1 , El 8.1 7)7 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-0 5 /1 1 X , 7H0 . 6E + 0 7 / 2 ( E 1 3 . 1 , E 1 8 . 1 / )7 PO 1 539 1 0 M 6X f

1 1 HO . 39393E + 01 , 7X , 8H0 . 62E + 0 4 / 2 ( E 1 7 . 5 , E 1 5 . 2 / ) / P0 1 5 3920

N 6X, 7H0 .9E + 00 . 1 IX, 1 2H0 . 76 5 76 5 E + 0 3 / 2 ( E 1 3

'. 1 ,E23 .6/ ) , 1H ) P 0 1 5 3 9 3

0

8870 FORMAT ( 6X , 9H0 . 3 5 2E + 09 , 9X , 8H0 . 3 5 E + 03 / 2 ( E 1 5 . 3 , E 1 7 . 2 / ) / P0 1 5 3940

( 6X , 1 2H0 . 1 4 7626E + 0 0 , 6X , 9H0 . 8 9 1 E- 1 4/ 2 ( E 1 8 . 6 . E 1 5 . 3 / ) / P 0 1 5 39 5 0

* 6X, 7H0 .9E-07, 1 1X, 1 OHO . 9999E + 0 8 / 2 ( E 1 3 . 1', E21 . 4/ ) / P0 1 5 3960

.. 6X.8H0. 13E-04/10X.8H0. 13E-04/2(E14.2,E18.2/)7 PO 1 53970

/ 6X ( 8H0.77E+00,10X,8H0.77E+00/2(E14.2.E18.2/)/ P0153980

34 NBS FORTRAN Test Programs Version 1
/A

6X.9H0

5 X f 1 1 H 4X. T2H6X. 8H0

878E+01.8X,10H-0.878E+01/2(E15.3,E18.3/>/

0.9797E+02,8X,10H0.9797E+02/2(E16.4,E18.4/),

6 . i o i 6 1 e + i 5 , 6 x , 1 2 hi - b . i 6 i 6 t F+i 5 / 2

(

eT7.5

68E+12; 10X, 12H0. 3 5 7628E + 00 / 2 < E 1 4 . 2 , E22 . 6/ )7

P01 53990

P0 1 5 4000

/ P01 5401

0

P01 54020

POI 54030

P0 1 5 4040

P 6 1 5 4 0 5 0 P01 54060

PO 154070

P01 54080

PO 1 54090

P 0 1 5 4 1 0 0 P 01541 1°

P01 54120

POI 541 30

P01 541 40

7 / > P 0 15 4150

P01 54160

7 P 6 15 41 7 0

, P0154180

PO 1 54190

P0 1 5 4200

PO 1 5 42 1 0 )/ P0154220

PO 1 54230

)/ P0154240

7 POi 5 42 50

/ P0154260

POI 5 42 70

)) P0154280

POI 5 4290

P0 1 5 4300

• P 6 1 5 4 3 1 0 P0 1 5 4320

POI 5 4330

P0154340

P01 5C1

P01 5C2

* * * p 6 1 6 6 o i 6 P0160020

P 0 1 6 0 0 3 0 P0160040

* » * P 0 1 6 0 0 5 0 REFPO 1 60060

1 .2P0160070

P0160080

PO 1 6 0090

PO 1 60 1 0 0 POO 1 0390

P0010395

poo i 0466

P0010405

POO 10410

POO 10415

P 0 0 1 0 4 2 0 P0010425

POO 1 0430

P016A1

P016A2

...

P016A3

P016A4

P01601 10

P0070290

P0070295

P0070300

P0070305

P 0 1 6 B

1

PO 1 60 1 20

1 H

1

6X,9H0.798E-03,9X,11H0.76444E+00/2(E15.3,E20.5/)/

5X.11H-0.3247E+20,7X.11H-0.2594E+05/2(E16.4,E18.4/)/

5 X , 1 2 H - 6 . 4 3 5 9 9

E - 1 9 . 6X , 9

H - 6 . 12E-04/ 2 < El 7 . 5 , E1 5 . 2 / )7

5X. 8H-0 .6E-09, 10X, 8H-0 .6E + 09/2(E13 . 1 ,E18 . 1 / )

/

3

4

5 8872 FORMAT

(

5X, 1 1 H-0 . 91 1 9E + 06

6X, 1 1H0.39426E + 02

6 X , 8H0.45E-12, 1 OX

8X,10H0.9119E-06/2(E16.4 ( E18.4/

6X.12H-0.39426E-02/2(E17.5,E18.

8 H 0 . 4 5 E + 1 2 / 2 ( E 1 4 . 2 , E 1 8 . 2 / ) , 1 H )

) / 5/ ) /

10H0.3479E+06/3(E16.4,E18.4/)

10H0.8236E+02/3(E16.4,E18.4/)

1 OHO . 1 7 5 2E*09/3 (E16 . 4 . E18 . 4/ ) 11H-0.1064E+05/3(E16.4,E18.4/

FORMAT ( 1H1 , 5X. 1 3 H 0 . 1 6 4 2 3 9 0 E - 6 1 , 5X, 1 3 H 0 . 3 6 0 0 0 0 0 E + 0 0 / 5 (£19.7',

1 /6X,13H0.4562311E+07,5X,13H0.7894530E+06/5(E19.7,E18.

6X, 1 OHO

6X, 1 OHO

5 X . 1 1 H-0

6X, 1 OHO

4793E+06

3682E+01

L 5 7 1 E + 0 9

1 460E+00

8X

8X

,

8X

7X

.

/

/

/

) ) E18.

71)1

.71)

.71)

88 7 1

23

4 39H1

5 38H

6

7

89

A

'

5X. UH- 0 . 60 00 0 0 0E-05

5X. 14H-0.91 19000E+06

EACH GROUP SHOULD BE

FOR THE SIGN OF THE

6X, 13H0.300 000 0E+03,

5X, 1 4H-0 . 5000000E+02

6 X , 1 3 H 0 . 7 70 000 0E + 00

,

6X, 1 3H0 . 5 0 00 0 0 0E + 06

6X, 13H0 . 492 0 0 00E + 01 ', 5X, UH-0 . 600 0 0 0 0 E-05

E1 8 E1 8 ,5X,13H0.6000000E+07/5(E19

, 5X, 13H0.91 1 9000E-06/5(E19

IDENTICAL EXCEPT/

FIRST TWO LINES//

5 X , 1 3 H 0 . 4 0 0 0 0 0 0 E + 0 4/5 (E1 9. 7, E1 8 . ,4X,14H-0.6000000E+03/5(E19.7 < E1

5X,13H0.7700000E+00/5(E19.7,E18.

, 4X,14H-0.5000000E-04/5(E19.7,E1

4X, 1 4 H - 0 . 6 5 2 7 0 0 0 E + 0 4 / 5 ( E 1 9 . 7 , E Y

8

, 5X,13H0.6000000E+07/5(E19.7,E18

C * * * *

c * * * *

c * * * *

c * * * *

B

C 6 X , 1 3 H 6 . 4 4 4 4 0 0 0 E + 0 4 , 5 X , 1 3 H 0 . 5 5 5 5 5 0 0 E - 6 2 / 5 ( E 1 9 . 7 , E 1 8 . D 1H1,4X.14H-0.3692300E+06,4X,14H-0.2340000E+03/5(E19.7,E1

* END OF TEST SEGMENT 015

* WHEN EXECUTING ONLY SEGMENT 015, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN COLUMNS

* 1 AND 2 REMOVED.

71) I 8.7/

7 hi

8.7/

.71)

.71)

7 hi

8 .71

C =

C = STOPEND

STOP

END

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * t

c * * * *

c * * * *

c * * * *

c * * * * c=

c=

c=

c=

c * * * *

* LASGN - (016)

* GENERAL PURPOSE

* TO TEST LOGICAL ASS I G N ME NTS

* CONSTANTS USED IN THIS SEGMENT

* S P E C I F I C A f I ON S SEGMENT 016

ASA

7.1,

* WHEN EXECUTING ONLY SEGMENT 016, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

DIMENSION IAC1M5)

LOGICAL MCAVB,MCBVB.MCCVB,MCDVB,MCEVB.MCFVB,MCGVB,MCHVB,MCIVB,

1 MCJVB, MCKVB, MCLVB, MCMVB, MCNVB , MCA1 B( 7)

LOGICAL AJ;.B.12).,.A2B(.2.t

t DIMENSION IAC1K5)

LOGICAL MCAVB.MCBVB,MCCVB,MCDVB,MCEVB,MCFVB,MCGVB.MCHVB.MCIVB,

1 MCJVB, MCKVB, MCLVB, MCMVB. MCNVB ,MCA1B(7)

LOG I CAL A 1 B ( 2 ) , A 2 B ( 2 , 2 ) . A 3 B ( 2 . 2 , 2 ) , AVB , BVB , CVB

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

* WHEN EXECUTING ONLY S EG MENT 016, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C»«tt

C * t * *

c * * * *

C * t * t NUVI

NUVI

C * 1 1 1

1

NBS FORTRAN Test Programs Version 1 35
IAC1 1(1 ) = 25

IAC1 I (2) ' = 10

PO 1 60 1 30

PO 1 60 1 40

IAC1 1(3) = 15

I AC 1 I (4) = 25

P01601 50

PO 1 60 1 60

C»tt*t WRITE HEADER FOR THIS SEGMENT

WRITE (NUVI.160)

PO 1 60 1 70

P01 601 80

160 FORMAT (1H1.28H LASGN - (016) ASSIGNMENT OF/ 1 6X , 1 7HL0G I GAL VAR I ABPO 1 60 1 90

ALES / 2 1 H ASA REFS. - 7.1.1.2//9H RESULTS) P0160200

C***»* TEST THE ASSIGNMENT OF RELATIONAL EXPRESSIONS 6.2

C***«* TO LOGICAL VARIABLES AND ARRAYS

P0 1 602 1 0 P0160220

MCAVB = IAC1 1(2) .. LT. IAC1 I (3)

MCBVB = IAC1 I (3) . LT. IAC1 I (2)

P0160230

P0160240

MCCVB = I AC 1 I ( 1 ) .EO. IAC1 I (4)

MCDVB = IA'C1I(2) .EO. IAC1K1)

P0160250

P0160260

MCEVB = IAC1 1(1) . LE . IAC1 1(4)

MCFVB = IAC1 1(2) . LE . IAC1 1(1)

P0160270

P0160280

MCGVB = I AC 1 I ( 1 ) . LE . IAC1 1(2)

MCHVB = IAC1 1(1) .EQ. 25

P0160290

P0160300

MCIVB = IAC1 1(2) .EQ. IAC1 1(4)

MCA1B(1) = IAC1K2) . NE . IAC1M3)

P 0 1 603 1 0 P0160320

MCA1B(2) = IAC1M1) .NE. IAC1K4)

MCA1B(3) = IAC1K1) .GT. IAC1K2)

P0160330

P0160340

MCA1B(4) = IAC1K2) .GT. IAC1K1)

MCA1B(5) = IAC1 1(1 ) .GE. IAC1 1(2)

P0160350

P0160360

A1B(1 ) = IAC1 1(1) .GE. IAC1 1(4)

A 1 B < 2 ) = IAC1 I (2) .GE . I AC 1 I ( 1 ) P0160370

P0160380

C***«* TEST THE ASSIGNMENT OF A MIXTURE OF RELATIONAL AND

C****» LOGICAL EXPRESSIONS TO LOGICAL VARIABLES AND ARRAYS 6.3

P0160390

P0160400

A2B(1 , 1 ) = .TRUE.

A2B(1 f 2) = .FALSE

.

PO 1 60 A 1 0 P0160420

AVB = A2B(1,2) .AND. .NOT. A2B(1,1)

BVB = A2B(1,2) .OR. .NOT. A2B(1 ,1)

P0160430

P0160440

CVB = IAC1K2).LT.IAC1I(3).AND.(A2B(1,1).OR..NOT.A2B<1,2>).OR.A2B(P0160450

A1,1).AND..N0T.A2B(1.2).AND.IAC1I(1).GT.IAC1I(4) PO 1 60 460

A2B(2,1) = .NOT. (CVB. AND. MCIVB) .AND. IAC1K2) .NE. IAC1K3) .AND

1 IAC1M2) .LT. IAC1K3) .AND. IAC1M1) .EQ. IAC1K4)

. P0 1 60 4 70

P0160480

A2B(2,2) = A2B(1,2) .AND. IAC1K1) .EQ. IAC1K4)

A3B(1,1,1) = IAC1K2) .LT. IAC1K3) .AND. A2B(1,2)

P0160490

P0160500

A3B(1,1.2) = IAC1K2) .GT. IAC1K3) .AND. A2BM.1)

A3B(1,2,1) = .NOT. MCA1B(5) .AND.

PO 1 60 5 1 0 P0160520

1 A2B(1,1) .OR. IAC1K1) .EQ. IAC1K4)

A3B(1,2,2) = .NOT. (A2B(1,2) .AND. I AC 1 I ( 1 ) .EQ. I AC 1 I ( 4 ) ) . OR

.

P0160530

P0160540

1 A2B( 1 , 1 ) .OR. A2B( 1 , 2)

A3B(2,1,1) = A2B(1,2) .OR. IAC1K1) .EQ. IAC1K4)

P0160550

P0160560

A3B(2,2,1) = .NOT. MCCVB. AND. MCHVB .OR. IAC1M1) .NE. IAC1K4) .OR

1 IAC1K1) .LT. IAC1K4) .OR. A2B(1,2)

. P 0 1 60 5 7

0

P01 60580

A3B(2.1,2) = .NOT. A3B ( 1 ,1,2) .AND.

1 ( A2B(1 , 1 ) .AND. .NOT. A2B(1 ,2) ) P01 60590P0160600

A3B(2,2,2) = IAC1K1) .LT. IAC1K4) .OR. .NOT. A2B(1,2) P0 1 6061 0 MCJVB=IAC1I(2).GT.IAC1I(3).AND. (A2B( 1 , 1 ) . OR . . NOT . A2B ( 1 . 2 ) ) . OR . A2B < P0 1 60620

A1 , 2 ) . AND . .NOT . A2B (

1

,2) . AND . I AC1 I (1 ) . GT . I ACT I ( 4

)

MCKVB = I AC1 I (2) . LT . I AC1 I (3 ) . AND . A2B( 1 , 1 ) .OR . A2B( 1 , 2 ) P0160630P01 60640

MCLVB = (IAC1K2) .LT. IAC1K3) .AND. A2B(1,2)) .OR. A2B(1,1)

MCMVB = A2B(1,2) .OR. IAC1K2) .LT. IAC1K3) .AND. A2B(1,1)

P0 1 6065 0 P0 1 60660

C * t * MCNVB = A2B(1.2) .OR. (IAC1K2) .LT. IAC1K3) .AND. A2B(1,1))

** WRITE VARIABLES THAT ARE TRUE

P0 1 60670

P0 1 60680

WRITE (NUVI.161) MCAVB, MCCVB. MCEVB, MCFVB, MCHVB, MCA1B(1),

A MCA1B(3), MCA1B(5), A1B<1), A2B(1,1), A2B(2,1),

P0160690

P0 1 60 700

B A3B(1,2,1), A3BM,2,2), A3B(2,1,1), A3B(2,1,2),

C A3B(2,2,2), CVB, MCKVB, MCLVB, MCMVB, MCNVB

P0 1 607 1 0 P0160720

161

c * * * FORMAT (//32H ALL ANSWERS BELOW MUST BE TRUE / / 2 1 ( L 1 6 / ) / /

)

** WRITE VARIABLES THAT ARE FALSE

P0160730

P01 60740

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 ) , PO 1 6 0 760

162

B A3B(2.2.1), AVB, BVB, MCJVB

FORMAT (33H ALL ANSWERS BELOW MUST BE F ALSE / / 1 5 ( L 1 6 / ) ) P0160770

P0160780

C****» END OF SEGMENT 016

c * * * * * P0160790

P0160800

36 NBS FORTRAN Test Programs Version 1
C*«*** WHEN EXECUTING ONLY SEGMENT 016, THE STOP AND END

C***»« CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

PO 1 608 1

0

P0160820

C***t* IN COL 1 AND 2 REMOVED.

C * t * * * P0160830

P0160840

C= STOP

C= END

P0160850

P0160860

STOP

END

P016C1

P016C2

C«»»*«*«««»»»*»t«»««tt*»««»«t**»t*t»«««»t«i«t»ttt**»«it»t»*«»*t«*tt«»»t»P0170010

C***«* P0170020

C***«* INTRL - (017)

c * * * * * P01 70030

P01 70040

C****« GENERAL PURPOSE ASA

* * * * * REF

* PO 1 700 5 0 P01 70060

C***«* TO TEST ARITHMETIC ASSIGNMENT STATEMENTS WHERE TABLE

C*«*** REAL CONSTANTS AND VARIABLES, INTEGER VARIABLES (LINES

1 .PG13P0 1 700 70

2.3, P0170080

C***»* AND ARRAY ELEMENTS. AND DOUBLE PRECISION CONC***«* STANTS AND VARIABLES ARE ASSIGNED TO EACH OTHER

5.6, P0170090

9, 1 0 ) P 0 1 7 0 1 0 0

c * * * * * C****t SPECIFICATIONS SEGMENT 017

P01 701 1

0

P 0 1 7 0 1 2 0

c * * * * * C***»* WHEN EXECUTING ONLY SEGMENT 017, THE SPECIFICATION STATEMENTS

P001 0440

PS A A 1 A / / C P 0 0 1 0 4 4 5 C***»* WHICH APPEAR AS COMMENTS MUST HAVE THE C= IN

C***t* COL 1 AND 2 REMOVED

P0010450

n A A 4 A / C C PO 0 1 0 4 5 5 C= DIMENSION A1 S( 5 ) , A2S(2 , 2 ) , A3S(3 .3 . 3) . IAC1 I ( 5 ) . IAC2 I (2 , 7)

C= INTEGER MCA3I (2,3.3)

P00 1 0460

P00 1 0465

C= DOUBLE PRECISION AC 1 D ( 1 0 ) . B C2D ( 7 , 4 ) . C C3D ( 7 . 2 . 2 ) , DPAVD

c * * * * * P001 0470

P001 0475

DIMENSION A1S(5),A2S(2,2).A3S(3.3.3),IAC1I(5),IAC2I(2.7)

INTEGER MCA3I (2.3.3)

P01 7A1

P01 7A2

DOUBLE PRECISION AC 1 D ( 1 0 ) , B C2 D ( 7 , 4 ) . C C3 D ( 7 . 2 , 2 ) , DPAVD

C***t* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

P01 7A3

P01 701 30

c * * * * * C***** WHEN EXECUTING ONLY SEGMENT 017, THE STATEMENT NUVI = 6P0070310

P00 703 1 5 C**»»* MUST HAVE THE C= IN COL 1 AND 2 REMOVED,

c * * * * * P0070320

P0070325

C= NUVI = 6

c * * * * * P0070330

P0070335

NUVI = 6

WRITE (NUVI. 170)

P01 7B1

P01 701 40

170 FORMATMH1 , 1X.39HINTRL - (017) ASSIGN INTEGER, REAL. AND/

1 1 6X, 23HDOUBLE PRECISION VA L UE S / 2X , 2 9 H AS A REFS. - 7.1.1.1. 5 . 1 . 1 P01 701 50

. PO 1 70160

22/2X. 7HRESULTS/

)

C***«* TEST ASSIGNMENT OF INTEGER VARIABLES TABLE 1/LN

P01 701 70

5.9P0170180

JACVI = 1 IAC1 1(3) = +111P01 701 90

P01 70200

IAC2K2.3) = -1111

MCA3I (2. 1 .2) = -11111

P0 1 702 1 0 P01 70220

ACVS = IAC1K3)

A1S(2) = IAC2K2.3)

P01 70230

P01 70240

A2S(2, 1 ) = MCA3I (2, 1 ,2)

A3S(2.1,2) = JACVI

P0 1 702 5 0 P01 70260

DPAVD = MCA3 I (2 . 1 . 2

)

AC1D(7) = JACVI

P01 70270

P01 70280

BC2D(7,4) = IAC1K3)

CC3D(5. 1 ,2) = IAC2I (2 f 3)

P01 70290

P01 70300

WRITE (NUVI, 171)

171 FORMAT (/2X.24HASSIGN INTEGER VAR I AB LE S / / 3X . 21H1 TO

P01 70310

P01 70320

1REAL VARIABLES) P0170330

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)

172 FORMAT ( / 8X , 8H 111.0 */F14.1//

P0 1 703 5 0 P01 70360

1 7X.9H-1 1 11.0 */F14. 1 //

2 4X, 1 2H - 1 1 1 1 1 . 0 * /F1 4 . 1 / /

P0 1 703 70

P0 1 703 80

3 11X.5H1.0 */F14.1//3X,33H2 - TO DOUBLE PRECISION VAR I ABLESPO 1 70390

4 //4X.16H -0 -111110 05 * / D 1 8 . 5 / / P0 1 7040 0

5 11X.9H0.1D 01 */D18.1//

6 9X.11H0.111D 03 * / D 1 8 . 3 /

/

P0 1 704 1 0 P01 70420

NBS FORTRAN Test Programs Version 1 37
7 7X 17H-0 1111D 04 * / D 1 ft 4/) P ft 1 7 ft £7 0 C*t*** TEST ASSIGNMENT OF INTEGER CONSTANTS P 0 1 7 ft LLCs A T V9 = -7777 P 0 1 7 04 S 0 A 1 <? ( 7 j = +77? PHI 7 n a a n A79 ( 7 1) = -77772 P0 i 70 470

A 7 C ( 7 1 7) s ? Pr Vft 1 7 ft £ R ft

1 / V "r 0 v DPAVD U r A V U = 7£. Pr Vft 1 7 ft L 9 ft I / y t 7 u AriD(7) - -77777 P 0 1 7 0 S 0 fl

R T 7 D ( 7 ) = -2222 P 0 1 7 0 S 1 0

rLLjUvJi r 7 D C S 1

\ , C

7 I} -

- +777 T LLC P 0 1 7 0 S ? 0 P 0 1 7 0 S 1 0

1 77 FORMAT (/?X 24HASSIGN INTEGER C 0 N S T A N T S / / 3

X

7 1 H 1 -

tm I n I TI Ufi RPfl17f»S£fl nr U I / U j t U

1 F A 1 VARIARIF^) p n 1 7 o s s o URTTF (NIIVT 170ATVS A1S(?) A2S(2 1) A7S(2 1 7) DPAVD A r 1 D ( 7

)

R T 7 D P 0 1 7 0 S 6 0 P 0 1 7 0 S 7 0

1 7 U FORMATS rUl\Mnl\/UAi7ri /6X 9H-222? (_£.?_ c. 0v * // 1F 11 3J • 1// 1 / / pr o\J 11 7/ vo sJ a0 o\J

1 8X.7H222.0 * / F 1 3 . 1 / / 0r 0w 1

1 7/ nv sJ q7 nv 2 3X.12H -22222.0 * / F 1 3 . 1 / / P0 1 70600

3 10X.5H2.0 * / F 1 3 . 1 / 35H1 2 - TO DOUBLE PRECISION VAR I AB L E S / P 0 1 70 6 1 0 4 /12X.9H0.2D 01 WD19.1// P0 1 70620

5 5 X ,1 6 H -0 . 22222D 0 5 * /D 1 9.5// P0 1 7063 0 6 8X, 1 3H-0 . Z222D 04 * / D 1 9 . 4 / / P0 1 7064 0 7 1 OX, 1 1 HO . 22 2D 0 3 * /D1 9 . 3/ ) P0 1 706 5 0 C****« TEST ASSIGNMENT OF BASIC REAL CONSTANTS TABLE 1/LN 2.10P0170660

JACVI = 3.3 P 01 70670

IAC1K 3 ) = +333.3E-2 P0 1 7068 0 IAC2K 2.3 ) = .3333E + 1 P01 70690

MCA3I (2, 1 ,2) = -.0033333E3 P01 70700

DPAVD = +3.3333 P0 1 7071 0 AC1D(7) = .3333333E1 P0 1 70 72 0 BC2D(7,4) = -333.3333E-2 P0170730

CC3D < 5 . 1 . 2 ) = -. 03333 33E + 2 P0 1 70 740

WRITE ( N U V 1.7173) P0 1 70 7 5 0 7173 FORMAT ( / 2X , 2 7H ASS I G N BASIC REAL CO N STANTS / / 3X , 24H1 - P0 1 70760

1 TO INTEGER VARIABLES) P0 1 70 770

WR I TE ( NUV I . 71 72) JACVI , IAC1 I (3) , IAC2I (2 , 3) .MCA3I (2, 1 , 2 )

, DPAVD , A C 1 D ( P0 1 7 0 78

0

17) , BC2D( 7, 4) . CC3D( 5 ,1, 2) P0 170 790

7172 FORMAT (/9X.3H3 * / 3 ( I 1 0 / ) / 8X , 4H-3 * / 1 1 0 / / 3X , 3 3 H2 - TO DOUBLE PRE C I SP 0 1 70 8 0

0

1 ION VARIABLES// P0 1 708 1 0 2 8X, 13H0.33333D 01 WD19.5// P0 1 70820

3 6 X , 1 5 HO . 3 333 33 3 D 01 * / D 1 9 . 7 / / P0 1 7083 0 4 5X, 16H-0.3333333D 01 * / D 1 9 . 7 / / P0 1 70840

5 6X, 1 5H-6 . 333333D 01 */D19. 6/> P0 1 70 8 5 0 C**t** TEST ASSIGNMENT OF REAL VARIABLES P0170860

ACVS = +.0044444E4 P01 70870

A1S( 2 ) = -4444. E-2 P0 1 70 8 8 0 A2S(2 , 1 ) = -44 . 4 P 0 1 70 890

A3S(2,1,2) = 4.4444E+1 P0170900

JACVI = A2S(2,T) P0 170910

IAC1 1(3) = A1S(2) P01 70920

I A C 2 K 2 . 3 ) = A3 S ( 2

", 1 , 2

:") P 0 1 7 0 9 3 0 MCA3I (2,1,2) = ACVS P01 70940

DPAVD = A2S(2. 1 ) P0 1 7095 0 AC1D(7) = A1S(2) P0170960

BC2D(7,4) = A3S(2, 1 ,2) P 0 1 7 09 70

CC3D(5,1 ,2) = ACVS P0 1 70980

WRITE (NUVI , 175) P 0 1 7 0 9 9

0

175 FORMAT (/23H ASSIGN REAL VARIABLES// 27H 1 - TO INTEGP01 71 000

1ER VARIABLES) P 0 1 7 1 0 1 0 WRITE (NUVI,176)JACVI,IAC1I(3).IAC2I(2.3).MCA3I(2,1.2). DPAVD . AC 1 D ( PO 1 7 1 0 2

0

1 7 )

,

B C 2 D ( 7 . 4 ) , C C 3 D ( 5 , 1. 2 ) PO 1 71 030

176 FORMAT ( /7X.5H-44 * / 2 ( 1 1 0 / ) / 8X . 4H 4 4 */2(I10/), 35H1 2 - TO DOU B L P 0 1 7 1 0 4

0

IE PRECISION VARIABLES 7 7 P 0 171050

2 6X. 12H-0 . 444D 02 */D16.3// P 0 1 7 1 060

3 5 X . 1 3 H - 0 .4444b 02 * / D 1 6 1 4/7 P 0 1 7 1 0 7 0 4 5X. 1 3H0 . 44444D 02 * / D 1 6 . 5 / / - P0 1 7 1 080

5 5 X . 1 3H0 . 44444D 0

2

: * 7 D 1 6 . 5 / ) PO 1 7 1 090

C****» TEST ASSIGNMENT OF D.P. VARIABLES TABLE 1/LN 3.6P0171100

38 NBS FORTRAN Test Programs Version 1
DPAVD = 5 5 5 5 . 55 P01 71 1 1 0 AC1D( 7 ) = +5 5 5 5 5 5 5 55 5 5 55 5 . D-13 P0 1 71 1 20

BC2D ( 7 . 4 ) = -. 00000 5 5 5 5 5 5 5 5 5D6 P0171130

CC3D(5,1,2) = -.055555555555550+2 P0171 140

JACVI = DPAVD P0171150

IAC1 1(3) = AC1D(7> P 0 1 7 1 1 60

IAC2I (2,3) = BC2D(7,4) P0171 170

MCA3M2.1.2) = CC3D(5,1,2) P01 71 1 80

ACVS = CC3D ( 5 . 1 ,2) P01 71 190

A1S(2) = BC2D<7,4) P01 71 200

A2S(2, 1 ) = AC 1 D ( 7

)

P 0 1 7 1 2 1 0 A3S(2 . 1.2) = DPAVD PO 1 71 220

1 77

WRITE (NUVI.177)

FORMAT ( / 2X , 3 3 HASS I GN DOUBLE PRECISION VARIABLES/

1/3X.24H1 - TO INTEGER VARIABLES)

WRITE (NUVI , 1 78) JACVI , IAC1 I (3) , IAC2I (2,3) , MCA3I (2, 1 .2) ,ACVS

P 0 1 7 1 2 3 0 P 0 1 7 1 2 4 0 PO 1 7 1 2 5 0 A1S(2)P01 71 260

1 ,A2S(2, 1 ) ,A3S(2, 1 ,2)

178 FORMAT ( / 3X , 9H 5 5 5 5 * / 1 1 0 / / 9X . 3H5 * / 1 1 0 / / 8X f 4H-5

12 - TO REAL VARIABLES/7

"

2 3X.16H-0.5555556E 01 * / E 1 7 . 7 / / ""3 ' 3X, 16H-0 . 5 5 5 5 5 5 6E 01 * / E 1 7 . 7 / / 4 3X, 16H 0.5 5 5 5 5 56E 01 * / E 1 7 . 7 / /

5 3X.16H 6 . 5 5 5 5 5 5 E 0 4 * / E 1 7 . 6 /

)

C***»* TEST ASSIGNMENT OF DOUBLE PRECISION CONSTANTS

JACVI = 66666.D-4

IAC1M 3 ) = - . 00000066666666D7

I AC 2 j (

2

< 3 ) = - . 0666666666666 60 + 2 MCA3I (2, 1 ,2)=66666. 666666666 0-1

ACVS '=" 66666666666666 .DO

A1S( 2 ) = +66666. D-4

A2S ( 2 . 1 ) = - . 00000006666666D8

A3S(2,1,2) = - . 06666666666666D+2

WRITE (NUVI, 179)

179 FORMAT ( 35H1 ASSIGN DOUBLE PRECISION CONSTANTS/

1/3X.24H1 - TO INTEGER VARIABLES)

WRITE(NUVI,7170)JACVI,IAC1I(3),IAC2I(2,3),MCA3I(2.

1 ,A2S(2, 1 ) ,A3S(2. 1 ,2)

7170 FORMAT ( / 9X.3H6 * / 1 1 0 / / 8X , 4H-6 * / 2 ( 1 1 0 / ) / 3X , 9H

f 3X.21H2 - TO REAL VARIABLES//

2 3X.16H 0.6666667E 14 * / E 1 7 . 7 / / 3 3X. 1 6H 0 . 66666E 01 * /E1 7 . 5 /7

4 3X. 16H-0.6666666E 01 * / E 1 7 . 7 / /

5 3X. 1 6H-0 . 6666667E 01 * / E 1 7 . 7 / ) WRITE (NUVI. 7171)

7171 F 0 R M A T ( / 7 3 4 H A L L TE ST 0 UTPUT S HOULD BE CHECKED/

1 34H AGAINST THE ASTERISKED (*) FIGURE/

2

"' 1 8H WHICH PRECEDES IT)

END OF TEST SEGMENT 017

P01 71 270

*/2(I10/)/3X,21HP0171280

P 0 1 7 1 2 9 0 P0171300

1 .2) , ACVS

P 0 1 7 1 3 1 0 P01 71320

PO 1713 3 0 P01 71 340

P 0 1 71 3 50

PO 1 7 1 360

P0 1 7 13 70

P01 71380

P 0 1 713 9 0 P01 71 400

P01 71 41 0 P01 71 420

P 01 71430

P01 71 440

P 0 1 71 4 5 0 A1S(2)P01 71 460

P 0171 470

P01 71 480

PO 1 71490

PO 1 71 500

PO 1 71510

P01 71 520

P 0 1 7 1 5 3 0 P01 71 540

P0 1 7 1 5 50

PO 1 71 560

POi 71 570

P01 71 580

PO 171 5 9 0 P01 71600

6666 * / I 1 0/ /

C * * *

c * * *

C * * *

c * * *

c * * *

c * * * c=

c=

* *

* * 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

ttttt*lttti*tttllttlllttll«t*>tlilt«IIHtlllttttl«til

P 0 1 7 1 6 1 0 P01 71620

PO 1 7 1 630

P01 71640

POI 7 1 6 5 0 P01 7C1

P01 7C2

•t***t »t«t** P0200010

P0200020

P0200030

P0200040

*»*«***«ttttt«t«P0200050

ASA RE F P02 0 0060

7.1.2.1. 1P0200070

P0200080

7.1.2 /54P0200090

P 02 OOf00

P0200 1 1 0

C t * *

c * * *

c * * *

c * * *

c * t *

c\* * *

c * * *

c * * t

c * * *

c * * *

c * * *

UGOTO - (020)

t *

t *

t *

** GENERAL PURPOSE

TO TEST UNCONDITIONAL GO TO STATEMENTS

RESTR I Ct ldN OBSERVED

GO TO STATEMENTS CAUSE BRANCHES ONLY TO

EXECUTABLE STATEMENTS

** GENERAL COMMENTS

* *

NBS FORTRAN Test Programs Version 1 39
C»«tt* GO TO STATEMENTS ALSO TESTED IN SEGMENT 193

C * * * * *

C"*"«"*"*"* 6 0 f P U f f "A P E A S S I G N M E N T S T AT E M E N T N O

C * * * * *

C * * * * *

C 1 1 * * *

C t * * * * C= NUVI = 6

C * * * * * NUVI - 6

WRITE (NUVI, 200)

200 FORMAT ( 1 H 1

, 1 X , 3 3HUG0T0 - (020) UNCONDITIONAL GO T0/16X,

19 H STATE M E N T / / 2 X

,

2 21HASA REFfS. - 7.1 .2.1 .1//2X.7HRESULTS)

C"*"*«"»* HEADER FOR SEGMENT 020 WRITTEN

C***** TEST BRANCH FORWARD

P0200120

P0200130

P 0 Z 6 0 1 4 0 POO 70340

P 0 0 7 0 3 4 5 P0070350

P0070355

P0070360

P0070365

P020B1

P0200 1 5 0 P0200160

P 0 2 0 0 1 7 0 P0200180

P 02 6 0190

P0200200

INPUT TAPE

NUVI =

6

WHEN EXECUTING ONLY SEGMENT 020, THE STATEMENT

MUST HAVE THE C= IN COL 1 AND 2 REMOVED.

GO TO 201 P02002 1

0

203 MRRVI = 3 P0200220 1 V c_ V V (— C V WRITE (NUVI, 7200) MRRVI P0200230

7200 FORMAT ( / 4X , I 1

)

P0200240

GO TO 204 P0200250

207 MRRVI = 7 P0200260

WRITE (NUVI, 7200) MRRVI P0200270

GO TO 208 P0200280

202 MRRVI = 2 P0200290

WRITE (NUVI, 7200) MRRVI P0200300

C***** TEST BRANCH BACKWARD P020 03 1 0 GO TO 203 P0200320

201 MRRVI = 1 P0200330

WRITE (NUVI, 7200) MRRVI P0200340

GO TO 202 P0200350

208 MRRVI = 8 P0200360

WRITE (NUVI, 7200) MRRVI P0200370

GO TO 209 P0200380

206 MRRVI = 6 P0200390

WRITE (NUVI, 7200) MRRVI P0200400

GO TO 207 P02 00 4 1 0 204 MRRVI = 4 P0200420

WRITE (NUVI, 7200) MRRVI P0200430

c * * * * * TEST BRANCH TO STATEMENT IMMEDIATELY AFTER P0200440

C * * * * * UNCONDITIONAL GO TO P0200450

GO TO 205 P0200460

205 MRRVI = 5 P0200470

WRITE (NUVI, 7200) MRRVI P0200480

GO TO 206 P0200490

209 WRITE (NUVI , 720 1 ) P0200500

720 1 FORMAT (//2X,35HTHIS TEST IS SUCCESSFUL ONLY IF THE/ P02 00 5 1 0 12X.37HNUMBERS LISTED ABOVE ARE SEQUENTIALLY/ P0200520

c * * * *

c * * * *

C * * * *

C * * * *

C * * * * c=

c =

22X.20HIN ORDER FROM 1 TO 8)

END OF TEST SEGMENT 020

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * * *

C * * * *

* WHEN EXECUTING ONLY SEGMENT 020, THE STOP AND END

* CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

* IN COL 1 AND 2 REMOVED.

STOP

END

STOP

END : *************** ************************************************

*

* AGO TO - (021 ) ****************************************************************

* GENERAL PURPOSE ASA

* TO TEST GO TO ASSIGNMENT STATEMENTS 7.1 . 1

* AND ASSIGNED GO TO STATEMENTS 7.1.2

* RESTRICTIONS OBSERVED

* INTEGER VARIABLE USED IN ASSIGN STATEMENTS 7.1.1.3

P0200530

P0200540

P0200550

P0200560

P0200570

P0200580

P 02 00 5 '90 P0200600

P020C1

PJ.20.C2

* * * * p 0 2 1 0 0 1 0 P021 0020

P 02 1 0 030

P021 0040

* * * * P 0 2 1 00 5 0 REF P0210060

.3 P 0 2 1 0 0 7 0

. 1 .2P02 1 0 080

P 02 1 0 0 90

/06P0210100

40 NBS FORTRAN Test Programs Version 1
C**t*. IS NEVER REFERENCED ELSEWHERE IN THIS SEGMENT 10.2.3 /12P0210110

C»***« ASSIGNED GO TO STATEMENTS CAUSE BRANCHES ONLY 7.1.1.3 /03P0210120

C***tt TO EXECUTABLE STATEMENTS 7.1.2 /54P021Q130

Cttt'tt INTEGER VARIABLE ALWAYS CONTAINS STATEMENT 7 . 1 . 2 . 1 . 2 / 20P02 1 0 140

C**t«* LABEL FROM THE ASSIGNED GO TO LIST P021 01 50

c****» GENERAL COMMENTS P 0 2 1 0 1 6 0 c***«* IGVI AND KGVI ARE IMPLICITLY DEFINED 5.3 /07P021 01 70

C* * t * * GTVI IS EXPLICITLY DEFINED 7.2.1.6 /55P021 0180

c* * * * * ASSIGN AND ASSIGNED GO TO ALSO TESTED IN P02 1 0 1 90

c***»* SEGMENT 190 P02 1 0200

c* * * * * P0210210

Ct * * * * SPECIFICATIONS SEGMENT 021 P02 1 0220

C**t** P001 0480

C* t * * * WHEN EXECUTING ONLY SEGMENT 021. THE SPECIFICATION STATEMENTS P 0 0 1 0 4 8 5 Ct * * * * WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL P 0 0 1 0 490

c* * * * * 1 AND 2 REMOVED PO 0 1 0 49 5 C = INTEGER GTVI P 0 0 1 0 5 0 0 c***»* R A A 4 A C A C PO 0 1 0 5 0 5 INTEGER GTVI P 0 2 1 A

1

c* * * * t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. RATI A "} 7 A P 0 2 1 0 2 3 0 c* * * * * HAA7A77A P0070370

c * * * * * WHEN EXECUTING ONLY SEGMENT 021, THE STATEMENT NUVI = 6 nAA7A7*7C P0070375

c* * * * * MUST HAVE THE C= IN COL 1 AND 2 REMOVED. RAA7A7 0A P0070380

c* * * * * R A A *5 A 7 O C P0070385

c= NUVI = 6 P\AA~7A7^\A P0070390

c

* * * * * P0070395

NUVI = 6 P 0 2 1 B 1 WRITE (NUVI, 210) P02 1 0240

210 FORMAT (1H1 . 1X.33HAG0T0 - (021) ASSIGN AND ASSIGNED/ 16X, P02 1 02 5 0 15HG0 T0//2X, P02 1 0260

231HASA REFS. - 7.1.1.3 AND 7 . 1 . 2 . 1 / / 2X , 7HRESU LTS

)

P021 0270

c * * * * * HEADER FOR SEGMENT 021 WRITTEN P021 0280

c * * * * * TEST FORWARD BRANCHING GO TO WITH ONLY ONE P021 0290

c * * * * * LABEL IN THE BRANCH LIST P02 1 030 0 ASSIGN 211 TO IGVI P02 1 03 1 0 GO TO IGVI , (211) P02 1 0320

c * * t * * TEST FORWARD BRANCHING GO TO WHICH BRANCHES P021 0330

c * * * * * TO IMMEDIATELY FOLLOWING STATEMENT P021 0340

212 MRRVI = 2 P021 0350

WRITE (NUVI, 8212) MRRVI P021 0360

ASSIGN 213 TO GTVI P021 0370

GO TO GTVI . (213) P02 1 038 0

c * * * * * TEST FORWARD BRANCHING GO TO WHERE ALL BRANCHES P021 0390

C * * w * * ARE IDENTICAL P02 1 0 4 0 0 213 MRRVI = 3 P02 1 0 4 1 0 WRITE (NUVI, 8212) MRRVI , P0210420

ASSIGN 214 TO GTVI P02 1 0430

GO TO GTVI , (214,214,214) P02 1 0440

c * * * * * TEST FORWARD BRANCHING GO TO WITH SEVERAL UNIOUE P02 1 04 5 0

c * * * * * BRANCHES IN THE LIST P021 0460

215 MRRVI = 5 P02 1 0470

WRITE (NUVI. 8212) MRRVI P02 1 0480

ASSIGN 217 TO KGVI P02 1 0490

ASSIGN 216 TO IGVI P021 0500

GO TO IGVI , (217.218.216.219) P0210510

c * * * * * TEST BACKWARD BRANCHING GO TO WHERE BRANCHES P02 1 0 5 2 0

c * * * * * ARE IDENTICAL P02 1 0 5 3 0 214 MRRVI = 4 P021 0540

WRITE (NUVI, 8212) MRRVI P02 1 0 5 5 0 ASSIGN 215 TO IGVI P021 0560

GO TO IGVI , (215.215) P02 1 0 5 70

c * * * * * TEST BACKWARD BRANCHING GO TO WITH ONLY ONE LABEL P 0 2 1 0 5 8 0 c * * * * * IN THE BRANCH LIST P02 1 0 5 90

211 MRRVI = 1 P0210600

WRITE (NUVI, 8212) MRRVI P 0 2 1 0 6 1 0 ASSIGN 212 TO GTVI P02 1 0620

GO TO GTVI , (212) P02 1 0630

c * * * * * IN THE FIRST PART OF THIS TEST, ALL GO TO STATEMENTS P021 0640

NBS FORTRAN Test Programs Version 1 4 1
c * * * *

c * * * *

c * * * *

c * * * *

c * * * * 216

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

P021 0650

P021 0660

P 0 2 1 0 670

P 0 Z 1 068 0 P02 10690

P02 1 0700

P 6 2 1 0 71 0 P021 0720

P 0 2 1 0 7 3 0

P 0 2 1 0 7 4 0 P 6 2 1 offt

P021 0760

P 02 1 0 7 70

P021 0780

P 0 2 1 0 790

P021 0800

P02 1 08 1 0 P02 1 0 82 0 PO 210 830

P021 0840

P02 1 0 8 5 0 P021 0860

P 6 2 1 0 8 7 0 P021 0880

P 0 2 1 0 8 9 0 P021 0900

P 0 2 1 0 9 1 0 P0210920

P 0 2 1 0 9 3 0 P021 0940

P 0 2 1 0 9 5 0 P021 0960

P 0 2 1 0 9 70

P0210980

P 0 2 1 0 9 9 0 P02 1 1 000

P 0211 010

P02 1 1 020

P 0 2 nolo

P021 1 040

P 02 1 1 0 5 0 P02 1 1 060

P 0 2 1 1 0 70

P02 1 1 0 8 0 P 0 2 1 1 090

P021 1 100

P 0 2 11 11 0 P021 1 120

P021 1 130

P021 1 1 40

P 0 2 1 1 1 5 0 P021 1 160

P 0 211 170

P021 1 180

P021 1 190

P02 1 1 2 00

P 0 2 1 1210

P02 1 1 220

P02 1 1 230

P021 1240

P02 1 1 2 5 0 P02 1 1 260

P 0 2 1 1 270

P02 1 1 280

P02 1 1 290

P02 1 1 300

p 0 21131 0 P02 1 1 320

TEST UNTIL FINAL MESSAGE IS TO BE WRITTEN

MRRVI = 6

WRITE ( N U V I ,8212) MRRVI

ASSIGN 8216 TO IGVI

8216

217

GO TO KGVI

MRRVI = 7 ASSIGN 218

GO TO 8211

(217,219,7210,7214,8210)

TO GTVI

218 MRRVI = 8 ASSIGN 219

GO TO 8213

219 MRRVI = 9

TO KGVI

ASSIGN 7210 TO KGVI

GO TO 8213

MRRVI = 10

ASSIGN 7211 TO GTVI

GO TO 8211

MRRVI = 11

7210

721

1

7212'

7213

ASSIGN 7212 TO GTVI

GO TO 8211

MRRVI = 12

ASSIGN 7213 TO GTVI

GO TO 821

1

MRRVI = 13

ASSIGN 7214 TO KGVI

GO TO 8213

MRRVI = 14

ASSIGN 7215 TO GTVI

7214

72 1 5

7216

GO TO 8211

MRRVI =. 15

ASSIGN 7216

GO TO 8211

TO GTVI

MRRVI = 16

ASSIGN 7217 TO GTVI

GO TO 8211

MRRVI = 17

ASSIGN 7218 TO

GO TO 8211

7217

GTVI

7218 MRRVI = 18

ASSIGN 7219 TO GTVI

GO TO 8211

7219 MRRVI = 19

8210

8211

8212

C * * * t

ASSIGN 8210 TO KGVI

GO TO 8213

MRRVI = 2 0 ASSIGN 8214 TO IGVI

GO TO 8213

WRITE (NUVI.8212) MRRVI

FORMAT (/6X.I2)

* TEST GO TO WITH CONTINUATION CARD

8213

GO TO GTVI, (218. 7211, 7212. 7213, 7215. 7216. 7217. 7218,

1 7219)

WRITE (NUV'i , 8212) MRRVI

GO T

r IGVI . (8216.8214)

HRI JUVI .8215 ) FP .AT (1H0.2X.35HTHIS TEST IS SUCCESSFUL ONLY IF THE/

8214

8215

C * * *

C * * *

c * * * *

C t * * *

c * * * * c=

1 . 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

* CARDS. WHICH APPEAR AS COMMENTS. MUST HAVE THE C=

* IN COL 1 AND 2 REMOVED.

STOP

42 NBS FORTRAN Test Programs Version 1
END

STOP

END

P021 1330

P021 C1

P021 C2

»**«*i»tt*t»tttt«tt«t«ititttt»i-i«ttt*tt*t*tt«t«tt«ttttttittttttttt«P022OO1O

* P 62 2 00 2 0

* CGOTO - (022) P0220030

* p 02 20 0 40

*****t**************************************t*********************tP0220050

C * * * *

c * * * *

C * * * *

c * * * *

c * * * *

C * * * *

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c

* * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * » * *

C * * * * c=

c * * * *

GENERAL PURPOSE

TO TEST COMPUTED GO TO STATEMENTS

RESTRICTIONS OBSERVED

VALUE OF INTEGER VARIABLE IS NEVER LESS THAN 1 AND NEVER LARGER THAN THE NUMBER OF BRANCHES

INTEGER VARIABLES USED IN COMPUTED GO TO STMNTS

ARE NOT EQUATED TO AVOID SECOND LEVEL

DEFINITION PROBLEMS

ASA REF P0220060

7.1 .2.1 .3 P0220070

P0220080

7.1.2.1 .3/33P022 0 090

P02201 00

10.2.8 /09P0220110

10.3 / 1 3 P 0 212 012 0 P022 0 1 30

GENERAL COMMENTS

IGVI AND KGVI ARE IMPLICITLY DEFINED

GTVI IS EXPLICITLY DEFINED

COMPUTED GO TO ALSO TESTED IN SEGMENT 162

5.3

7.2.1.6

P0220140

/07P02201 50

/55P0220160

P0220170

P0220180

P0220190

POO 10510

P0 0 1 0 5 1 5 POO 1 0520

P001 0525

' POO 1 0 530

P0010535

PO 0 1 0 5 40

P022A1

P 02 20200

P0070400

P0070405

P007041

0

P007041 5 P0070420

P0070425

P022B1

P 0 2 2 0 2 1 0 P0220220

P0220230

P0220240

PO 22 02 50

P0220260

P 0 2 2 0 2 7 0 P0220280

P 0 2 2 0 2 9 0 P0220300

P 0 2 2 0 3 1 6 P0220320

P0220330

P0220340

P0220350

P0220360

P0220370

P0220380

P 6 2 2 0 3 9 6 P0220400

P0220410

P0220420

P0220430

P0220440

P 02 20450

P0220460

P022 0 4 70

P0220480

P0220490

P0220500

SPECIFICATIONS SEGMENT 022

WHEN EXECUTING ONLY SEGMENT 022, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL

1 AND 2 REMOVED

INTEGER GTVI

INTEGER GTVI

C * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

c * * * *

220

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 022, THE STATEMENT NUVI 6

MUST HAVE THE C= IN COL 1 AND 2 REMOVED.

NUVI

C * * * *

c * * * *

C t * * *

c * * * *

c * * * * 222

NUVI = 6

WRITE (NUVI. 220)

FORMAT ( 1H1 , 1X.28HCG0T0 - (022) COMPUTED GO T0//2X,

2 0HASA REF. - 7.1. 2 .1 . 3 77 2 X , 7 H R E S U L T S

)

HEADER FOR SEGMENT 022 WRITTEN

TEST FORWARD BRANCHING GO TO WITH ONLY ONE

LABEL IN BRANCH LIST

IGVI = 1 GO TO (221 ) . IGVI

TEST FORWARD BRANCHING GO TO WHICH BRANCHES

TO IMMEDIATELY FOLLOWING STATEMENT

MRR'v'i = 2 WRITE (NUVI, 8222) MRRVI

GO TO ( 223 ) . GTVI

C * * * *

c * * * *

c * * * * 2 23

TEST FORWARD BRANCHING GO TO WHERE SOME BRANCHES

ARE IDENTICAL

MRRVI = 3 WRITE (NUVI, 8222) MRRVI

GTVI = 2 GO TO ( 225 . 224 , 225 ) , GTVI

TEST FORWARD BRANCHING GO TO WITH SEVERAL UNIQUE

BRANCHES IN LIST

MRRVI = 5 WRITE (NUVI, 8222) MRRVI

KGVI =

1

IGVI = 3

GO TO ( 227.228. 226,229) . IGVI

TEST BACKWARD BRANCHING GO TO WHERE SOME

BRANCHES ARE IDENTICAL

MRRVI = 4

C * * t *

c * * * * 22 5

C * * * * C * 1 1 * 224

NBS FORTRAN Test Programs Version 1 43
WRITE (NUVI.8222) MRRVI

IGVI = 4 GO TO (226,226,226,225), IGVI

TEST BACKWARD BRANCHING GO TO WITH ONLY ONE

P0220510

P0220520

P0220530

P0220540

P0220550

P0220560

P0220570

P0220580

P0220590

P0220600

P0220610

P0220620

P0220630

P0220640

p 6 2 Z 06 50

P0220660

P 0 2 2 0 6 7 0 P0220680

P 0 220690

P0220700

P 0 2 2 0 7 1 0 P0220720

PO 220730

P0220740

P0220750

P0220760

P 02 2 0 770

P0220780

P 0 2 2 0 7 9 0 P0220800

P 0 2 2 0 8 1 0 P0220820

P0220830

P0220840

P0220850

P0220860

P 0 2 2 0 8 7 0 P0220880

P 6 22 0890

P0220900

P 0 2 2 0 9 1 0 P0220920

P 0 2 2 0 9 3 0 P0220940

P 0 2 2 0 9 5 0 P0220960

P0220970

P0220980

P 0220 9 90

P0 22 1 00 0 P022 1 0 1 0 P022 1 02 0 P0221030

P0221 040

P 0 2 2 1 0 5 0 P0221 060

P0221 070

P0221 080

P0221 090

P0221 1 00

P 0 2 2 1 1 1 0 P0221 120

P 0 2 2 1 1 30

P0221 1 40

P022 1 1 5 0 P0221 160

P 0 2 2 1 1 7 0 P0221 180

C t * * *

c

* * * t 221

* LABEL IN BRANCH LIST

MRRVI = 1 WRITE (NUVi, 8222) MRRVI

GTVI = 1 GO TO (222). GTVI

* IN THE FIRST PART OF THIS TEST, ALL GO TO STATEMENTS

* WERE EXECUTED ONLY ONCE, IMMEDIATELY AFTER THE

* INTEGER VARIABLE WAS DEFINED. ALL GO TO STATEMENTS

C * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * * 226

WHICH FOLLOW WILL BE EXECUTED MORE THAN ONCE.

VALUE OF, IGVI IS ALWAYS 1 IN THIS PART OF THE TEST

UNTIL THE FINAL MESSAGE IS TO BE WRITTEN

MRRVI = 6

8226

227

228

229

IGVI = 1 WRITE (NUVI.8222) MRRVI

GO TO (227,229,7220,7224.8226), KGVI

MRRVI = 7 GTVI = 1 GO TO 8221

MRRVI = 8 KGVI = 2 GO TO 8223

MRRVI - 9

KGVI = 3

'

GO TO 8223

7220 MRRVI = 10

GTVI = 2 GO TO 8221

7221 MRRVI = 11

7222

7223

72 2 4

7225

GTVI = 5 GO TO 8221

MRRVI = 12

GTVI = 4 GO TO 8221

MRRVI = 13

KGVI =

4

GO TO 8223

MRRVI = 14

GTVI = 6

GO TO 8221

MRRVI = 15

GTVI = 7 GO TO 8221

MRRVI = 16

GTVI = 9

GO TO 8221

MRRVI = 17

GTVI = 8 GO TO 8221

MRRVI = 18

GTVI = 3

GO TO 8221

MRRVI = 19

KGVI =

5

GO TO 8223

MRRVI = 20

IGVI = 2 GO TO 8223

WRITE (NUVI, 8222) MRRVI

FORMAT (/6X, 12)

* TEST GO TO STATEMENT WITH CONTINUATION LINE

GO TO (228, 7221, 7229, 7223. 7222, 7225, 7226, 7228,

1 7227), GTVI

WRITE (NUVI, 8222) MRRVI

GO TO ( 8226 , 8224 ) , IGVI

7226

7227

7228

7229

8220

822 1 8222

C * * * *

8223

44 NBS FORTRAN Test Programs Version 1
8224 WRITE (NUVI.8225)

8225 FORMAT ( 1 HO , 2X , 3 5HTH I S TEST IS SUCCESSFUL ONLY IF THE/

P0221 190

P0221200

1 2X. 37HNUMBERS LISTEO ABOVE ARE SEQUENTIALLY/

22X.21HIN ORDER FROM 1 TO 20)

P0221210

P0221220

C****« END OF TEST SEGMENT 022

c * * * * * P0221230

P0221240

C****« WHEN EXECUTING ONLY SEGMENT 022, THE STOP AND END

C***** CARDS. WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

P0221250

P0221260

CM*** IN COL 1 AND 2 REMOVED.

C= STOP

P0221270

P0221280

C= END

STOP

P0221290

P022C1

END P022C2

C***t*******************************t*************t t** ****t*ti**t**tP0300010

c * * * * * C***«* ARBAD - (030)

P0300020

P0300030

C****» P0300040

C*******************s***»***«ft*********«*********«*<it»****»*t*********9*P0300050

Z**t*t GENERAL PURPOSE ASA REF

C****t TEST THAT EXPRESSIONS INVOLVING THE ADDITION 6.1

P0300060

P0300070

C***«* OF INTEGER OR REAL VALUES MAY BE FORMED

C«**** GENERAL COMMENTS

P0300080

P0300090

C***** TYPES ARE NEVER MIXED.'

C » VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED

P030 0 1 0 0 P030 0 1 1 0 C** *** IN A VARIETY OF COMBINATIONS,

c * * * * * P0300120

P030 0 1 30

C***t* SPECIFICATIONS SEGMENT 030

c * * * * * P03001 40

P001 0550

C***** WHEN EXECUTING ONLY SEGMENT 030, THE SPECIFICATION STATEMENTS

C « WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COL

P001 0555

P001 0560

C** *»* 1 AND 2 REMOVED

c * * * * * P001 0565P001 0570

C= DIMENSION A1 S( 5 ) , A2S(2 , 2 ) , I AC1 I ( 5 ) , I AC2I (2 . 7)

c * * * * * P001 0575P0010580

DIMENSION A1S(5),A2S(2,2),IAC1I(5),IAC2I(2,7)

C****« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P030A1

P03001 50

c * * * * * C**«** WHEN EXECUTING ONLY SEGMENT 030, THE STATEMENT NUVI = 6

P0070430

P0070435

C***»* MUST HAVE THE C= IN COL 1 AND 2 REMOVED,

c * * * * * P0070440

P0070445

C= NUVI = 6

c * * * * * P0070450P0070455

NUVI = 6

WRITE (NUVI. 301)

P030B1

P0300160

301 FORMAT ( 1 H 1 , 1 X , 28HARBAD - ( 03 0 ) BASIC AD D I T I 0 N / / 2X

,

-14HASA REF. - 6 . 1 / / 2X , 7 H RE S U LTS

)

P03001 70

P03001 80

C***** HEADER FOR SEGMENT 030 WRITTEN

WRITE (NUVI, 302 ) P0300190P0300200

302 FORMAT (//2X, 16HINTEGER ADDITION)

C « TEST 1 - ADD 2 INTEGER VARIABLES (ONE CONTAINS MINUS VALUE)

P030 02 1 0 P0300220

MRRV I = 1 JACVI =2P0300230

P0300240

KBCVI = -2

I HDVI = JACVI +KBCVI

P0300250

P0300260

WRITE (NUVI, 303) MRRV I , IHDVI

303 FORMAT (/6H TEST, 13, 16)

P0300270

P0300280

C** **« TEST 2 - REVERSE VARIABLES IN TEST 1 MRRV I = 2 P0300290

P0300300

I GDV I = K B CV I + J A CV

I

WRITE (NUVI, 303) MRRV I

, IGDVI

P03003 1 0 P0300320

C**«** TEST 3 - ADD 2 CONSTANTS

MRRV I = 3 P0300330

P0300340

IAC1 1(1) = 2+(-2)

WRITE (NUVI, 3 03 ) MRRV I , IAC1M1)

P0300350

P0300360

C***»* TEST 4 - ADD 2 ARRAY ELEMENTS (ONE CONTAINS MINUS VALUE)

MRRV I = 4 P0300370

P0300380

IAC1 1(3) = 3 IAC2I (1,3) = - 3 P0300390

P0300400

NBS FORTRAN Test Programs Version 1 45
IAC2K2.2) = IAC1 I <3> + IAC2I (1,3) P0300410

WRITE (NUVI.303) MRRVI , IAC2I(2,2) P0300420

c * * * * * TEST 5 - ADD 8 INTEGER VARIABLES P0300430

MRRVI = 5 P0300440

LCCVI = -6. P0300450

MDCVI=-2 P0300460

NECVI = +18 P0300470

IFDVI = JACVI+KBCVI+LCCVI+MDCVI+MDCVI+LCCVI+KBCVI+NECVI P0300480

WRITE (NUVI.303) MRRVI , IFDVI P0300490

c * * * * * TEST 6 - ADD COMBINATION OF VARIABLES, ARRAY ELEMENTS P0300500

c

* * * * * AND CONSTANTS P0300510

MRRVI = 6 P0300520

IAC2I (2,2) = -2 P0300530

IFDVI = IAC1 I (3) + IAC2I (1 ,3) + IAC2I ( 2 , 2 ) + J A C V I + K B C V I + L C C V I + 7 + 1 P0300540

IIDTTC /MI1WT 7 A 7 \ MDDV/T TCHWT P0300550

c * * * t * TCCT 7 Ann 7 DC A 1 WADTADICC Ihbl f AUU C KtAL VAKlAtSLto P0300560

IIDTTC / M 1 1 W T 7 A / ^ WKIlt I NUV 1 , JU^i ) P0300570

304 CnDMAT M / 1 CU DC i I A H ft T T T F\ fcM rUKnAI W/IjH KtAL AUU1I1UN; P0300580

rl K K V 1 - 1 P0300590

ALV3 - t.U P0300600

BCVS = 2.0E0 P030 06 1 0 HHCVS = ACVS+BCVS P0300620

WRITE ( N U V I ,3 0 5 ) MRRVI, HHCVS P0300630

305 FORMAT (/6H TEST , I 3 , F7 . 1 ) P0300640

c * * * * * TEST 8 - REVERSE ORDER OF VARIABLES IN TEST 7 P0300650

MRRVI = 8 P0300660

GGCVS = BCVS + ACVS P0300670

WRITE ( NU V I , 3 0 5 ) MRRVI, GGCVS P0300680

c * * * * * TEST 9 - ADD 4 REAL VARIABLES P0300690

MRRVI = 9 P0300700

FFCVS = ACVS + BCVS + ACVS + BCVS P0300710

WRITE < N UV I

, 3 0 5 ) MRRVI, FFCVS P0300720

c * * * t * TEST 10 - ADD 2 REAL CONSTANTS P0300730

MRRVI = 10 P0300740

c * * * * *

A2S(1 ,2) = 3.5 + (-3.5)

WRITE (NUVI. 3 0 5 ) MRRVI, A2S ( 1 . 2 ) TEST 11 - ADD REAL ARRAY ELEMENTS

MRRVI = 11

A1S( 1

) = -25. E

- 1 ACVS = 2.5

P0300750

P0300760

P 0 3 6 0 7 7 0 P0300780

p 6 3 06790

P0300800

A2S (1 , 1 ) = -7.0 P030081

0

FFCVS = A1S( 1 ) + A2S( 1 , 1 ) + 9.5 P0300820

WRITE ( NUVI.305) MRRVI, FFCVS P0300830

c * * t ** TEST 12 - ADD COMBINATION OF VARIABLES, ARRAY ELEMENTS P0300840

c * * * ** AND CONSTANTS

MRRVI = 12

P0300850

P0300860

FFCVS = A1S(1) + ACVS + 7.0 + A2S(1,1) P0300870

WRITE (NUVI.305) MRRVI, FFCVS P0300880

WRITE (NUVI.306) P0300890

306 FORMAT C / / 3 5 H ALL ABOVE ANSWERS SHOULD BE 0 FOR/ P0300900

1 31H THIS SEGMENT TO BE SUCCESSFUL) P030091

0

c * * * ** END OF TEST SEGMENT 030 P0300920

c * * * P0300930

c * * * ** WHEN EXECUTING ONLY SEGMENT 030, THE STOP AND END P0300940

c * * * ** CARDS. WHICH APPEAR AS COMMENTS, MUST HAVE THE C = P0300950

c * * * ** IN COL 1 AND 2 REMOVED. P0300960

C = STOP P0300970

C = END P0300980

STOP P030C1

END P030C2

Ct*« HltltttlDtlltttttllttltttlltllttttlllltttttlltilt t****» t** t««tP0310010

C**t P0310020

** ARFAD - (031) P031 0030

o*» P031 0040

Ctt* Ittttllttltttltttlttllltttltitltllllllttllllllltttt * * * * P 0 3 1 00 5 0 C**t ** GENERAL PURPOSE ASA REF P031 0060

c«»* ** TEST THAT EXPRESSIONS INVOLVING THE ADDITION OF 6. 1 P031 0070

c**« ** DOUBLE PRECISION VALUES MAY BE FORMED P0310080

46 NBS FORTRAN Test Programs Version 1
C**t*» GENERAL COMMENTS P0310090

C*t**« VARIABLES,, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0310100

cTttTi VARIETY OF -COMB I NAT IONS P03101 10

C****» P0310120

C *"*"*'** S P E C I F I C A T I 0 N S SEGMENT 031 P0310130

C* * * * * , P001 0590

C *

"* "* "*' * WHE N E X E CUT I N G 0 N L Y S EG MEN f 031 , THE "S PEC I F I CAT I ON STATEMEN T S POO 1 0 5 9 5 C****« WHICH APPEAR AS COMMENTS , MUST HAVE THE C= IN COL P00 1 0600

C * * * * * 1 AND 2 REMOVED POO 1 0605

C* * * * * P00 1 061 0 C= DOUBLE PRECISION ACVD , B CVD , F F CVD , GG CVD , HHCVD POO 1061

5

C = 1 , E P 1 D < 43 >.., B C 2 D ( 7 , 4 ) , C C 3 D (7 ,2,2;) P 0 0 1 0 6 2 0 C* * * * * P 0010625

DOUBLE PRECISION ACVD , BCVD , FFCVD , GGCVD , HHCVD P031A1

1 , E P 1 D ( 43 > , B C2 D ( 7 , 4 ) , C C3 D ( 7 , 2 , 2 ) P0 31A2

C* * 0 U T P U T T A P E ASS I GNMENT STATEMENT, NO I NPUT ...TAPE! . P 0 3 1 0 1 4

0

C * * * * * P007046 0 [**** WHEN EXECUTING ONLY SEGMENT 031, THE STATEMENT NUVI = 6 P0070465

C* * * * * MUST HAVE THE C= IN COL 1 AND 2 REMOVED. P0070470

C***** P0070475

C'="" NUVI = 6 P00 704S0

C* *'* * * P0070485

NUVI = 6 P 03 1 81

WRITE (NUVI, 310) P0310150

310 FORMAT ( 1 H 1

, 1 X , 2 7HARFAD - (031) D.P. ADDITION// P0310160

-16H ASA REF. - 6.1//9H RESULTS) P0310170

C**V*t HEADER FOR SEGMENT 031 WRITTEN P 0 31018 0 ACVD = - . 01 41 421 3562373095D2 P0310190

BCVD = 1 4 . 1 4 2 1 3 5 6 2 3 7 3 0 9 5 D -1 P 03 1 0 2 0 0 EP1D(20) = -4. 12310562561766D0 P0310210

BC2D( 6 , 3 ) = .2061 5 528 1 28088301

" P 0 3 1 0 2 2 0 HHCVD=ACVD+BCVD P0310230

GG C V D = BCVD + A CVD PO 3 1 02 40

EP1D(34) = .003D3 + (-300.0D-2) P0310250

FFCVD = BCVD + ACVD + ACVD + BCVD P 0 3 1 0 2 6 0 CC3D(7,1,1)=EP1D(20) + BC2D(6,3 ) + 206. 1 55281280883D-2 +41. 2310562561 7P031 0270

166D-1 + E P 1 D ( 2 0 ) P03 1 0280

WRITE (NUVI ,312) HHCVD, GGCVD, FFCVD, EP1D(34), CC3D ( 7 1

( 1 ) P03 1 0290

312 FORMAT ( / / 5 ( D2 2 . 1 0 / / ) / / 3 8 H THE 5 ANSWERS ABOVE SHOULD BE 6 PLUS / P 0 3 1 0 3 0 0 137H OR MINUS AN ERROR FACTOR OF 0.1D-13) P0310310

C * * * * * END OF TEST SEGMENT 031 P03 1 032 0 C***«* P0310330

ftVtTt WHEN EXECUTING ONLY SEGMENT 031 , THE STOP AND END P 0 3 1 0 3 4

0

C****« CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C= P0310350

C » IN COL 1 AND 2 REMOVED. P0310360

C= END P0310370

C= STOP P031 03 8 0 STOP P031C1

END P031 C2

C** ********»***»***««**t***»«i>*t*****»**»*****«***«**t**t*t***«***ttt**«P0320010

C* * * * * P 0 3 2 0 0 20

C****» ARBSB - (032) P0320030

C* * * * * P 0 3 2 0 0 4 0 C***t*t********ttt**t*t***t***t*t******t*t*t**tt**tt**t**t**tt*t*****tt*P0320050

C

*"*• * * * G ENERAL PUR P 0 S E ASA REF P 0 3 2 0 0 60

C**t*« TEST THAT EXPRESSIONS INVOLVING THE SUBTRACTION OF 6.1 P0320070

C*»*** INTEGER OR REAL VALUES MAY BE FORMED P 0 3 2 0 0 8

0

C***«* GENERAL COMMENTS P0320090

C* **'** TY PES ARE NEVER MIXED p 032 01 00

C*t*«* VARIABLES. ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P0320 1 1 0 C****« VARIETY OF COMBINATIONS. P0320120

C***»* SPECIFICATIONS SEGMENT 032 P0320130

C* * * * * po'6 10630

C***»* WHEN EXECUTING ONLY SEGMENT 032, THE SPECIFICATION STATEMENTS P0010635

C***«* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS P 0 0 1 0 6 4

0

C****« 1 AND 2 REMOVED P0010645

C * * * * * P 0 6 1 0 6 5 0 C= DIMENSION A1S(5) ,A2S(2.2) . IAC1 I (5) , IAC2I (2,7) P0010655

NBS FORTRAN Test Programs Version 1 47
c * * * * * DIMENSION A1S(5> ,A2S(2,2), IAC1 I (5) , IAC2I (2,7)

t OUT P1 f TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

*

* WHEN EXECUTING ONLY SEGMENT 032 , THE STATEMENT NUVI =

6

* MUST HAVE THE C= IN COL 1 AND 2 REMOVED..

* NUVI = 6

P0010660

P032A1

P 0 3 2 0 1 4 6 P0070490

POO 7049

5

P0070500

p 6 070 50 5 P0070510

P 0 0 7 0 5 1 5 P032B1

P03201 50

P0320160

P 0 3 2 0 1 7 0 P03201 80

P 0 3 2 0 1 9 0 P0320200

P 0 3 2 0 2 1 6 P0320220

P0320230

P0320240

P0320250

P0320260

P0320270

P0320280

p 03 2 6 29

6

P0320300

P 0 3 2 0 3 1 0 P0320320

P 0 3 2 0 3 3 6 P0320340

P03203 5 0 P0320360

P 6 3 2 0 3 7 0 P0320380

PO 3 2 0 3 9 0 P0320400

P 6 3 2 0 41 0 P0320420

P 0 3 2 0 4 3 0 P0320440

P 0320456

P0320460

P 0 3 2 6 4 7 0 P0320480

PO 32 6 490

P0320500

P032C1

P032C2

* PO 3 3 0 0 1 0 P0330020

P 0 3 3 0 0 3 0 P0330040

P0330050

P0330060

P 6 33 6070

P0330080

P 0 3 3 0 0 9 0 P03301 00

P 0330110

P03301 20

PO 3 3 0 1 3 0 P001 0670

P00 1 0675

P001 0680

PO0 1 068 5 P001 0690

P 0 010 6 9 5 P0 0 1 0 70 0

c * * * *

c * * * t

c * * * *

c * * * *

c * * * * c=

320

c * * t

c * * * * * NUVI = 6

WRITE (NUVI , 32 0)

FORMAT ( 1 H 1 , 1 X , 3 1 HARBS B - ( 032 ) BASIC SUBTRACTION//

1 1 7 H ASA R£ FS . - 6 . 1 / / 2X , 7HRESULTS

)

* HEADER FOR SEGMENT 032 WRITTEN

MRRVI = 1 WRITE ( NUVI . 321 )MRRVI

321 FORMAT ( // 2X . 4HTEST , I 1 , IX, 19HINTEGER SUBTRACTION)

JACVI =3

i ac i i ( i ) = 3

I HDV I = JACV I - I AC 1 1(1)

I GOV I = I A C 1 I ( 1 )- JACVI

I FDV I = JACVI - I AC1 I (1 ) - I AC 1 I ( 1

) + JACV

I

IAC2I (2,3) = 3-2-1

IAC2I ( 1,1) = 6 - JACVI - IAC1 1(1)

WRITE < NUVI . 323 > IHDVI , IGDVI , IFDVI, I A C 2 I (2.3) , IAC2I (1 , 1

)

323 FORMAT ( / 5 ( I 1 1 / ) )

328

329

MRRVI = 2 WRITE ( NUVI , 329) MRRVI

FORMAT ( / / 2X , 4 HTEST , I 1 , 1 X , 1 6HRE AL SUBTRACTION)

ACVS=5 . 1E1

BCVS=.51E2

HHCVS=ACVS-BCVS

GGCVS=BCVS-ACVS

FFCVS=ACVS-BCVS+BCVS-ACVS

A2S( 1 ,2) = 2.1E1

A 1 S < 1 ) = ACVS - A2S( 1 , 2) - 30.0

WRITE (NUVI ,324 ) HHCVS, GGCVS, FFCVS. A1S( 1 ) FORMAT ( /4( F1 1 . 1 / ) / 3 4H ALL ABOVE ANSWERS SHOULD BE 0 FOR/

131 H THIS SEGMENT TO BE SUC C E S SFUL)

* END OF TEST SEGMENT 032

324

C * * * *

C * * * *

c * * * *

c * * * t

c * * * *

*

* WHEN EXECUTING ONLY SEGMENT 032, THE STOP AND END

* CARDS, WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

* IN COL 1 AND 2 REMOVED.

C =

C = STOPEND

STOP

END

C * * 1

1

C * * * *

c * * * *

c * * * *

c * t * *

c * * * *

c * t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c = c=

* AR FSB - ( 033 )

ASA REF

6 . 1

* GENERAL PURPOSE

* TEST THAT EXPRESSIONS INVOLVING THE SUBTRACTION OF

* DOUBLE PRECISION VALUES MAY BE FORMED

* GENERAL COMMENTS

* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A

* VARIETY OF COMBINATIONS

* SPECIFICATIONS SEGMENT 033

*

* WHEN EXECUTING ONLY SEGMENT 033 , THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

* 1 AND 2 REMOVED

* DOUBLE PRECISION ACVD , B CVD , C CVD , D CVD , GG CVD , HH CVD , DP CVD , FFCVD

1 , ACID ( 1 0 ) , A2D (2,2) ,A3D(2,2,2)

48 NBS FORTRAN Test Programs Version 1
c * * t * t P001 0705

DOUBLE PRECISION ACVD . B CVD . C CVD , D CVO f GG CVD . HH CVD . DP CVD , F F CVD P033A1

1.AC1D(10),A2D<2,2>,A3D<2,2.2) P033A2

C*tt.t OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

.

P03301 40

c * * * * t P0070520

C***** WHEN EXECUTING ONLY SEGMENT 033. THE STATEMENT NUVI = 6 P0070525

r>

~ \ uiiat 11 a \ / r* t ii r p — Til p n. t <i Akin *5 DCUPiWPPi C**t»* MUST HAVE THE C- IN COL 1 AND Z REMOVED. P0070530

c * * * t * P0070535

C = NUVI - o P0070540

Q * t * * * P0070545

NUVI - 6 P033B1

MR y TP / hi 1 1 W V 7 7 A \ WRITE ( NUVI , 330

)

P0330 1 5 0

7 7 A CrtnUAT / 1 U 1 1 V 7AUAOCCD / A77 \ f\ ft OIIOTDAPTTrtAl// 330 FORMAT ( I H l , 1 X , 3 0 H AR F 5 B - ( 0 3 3 ) U.K. SUBTRACTION// P0330 1 60

ALU A C A DC C L 1 / / 7V 7UDCCIII TC \ -Ion AbA Kbr. - o . 1 / / , / HKboUL 1 b

/

P0330 1 70

C t * * * * HEADER FUR bcbnhNI 033 WRITTEN P03301 SO

A CVD - 1 . U D £ P0330190

n r \ / p» - 7 ft i B CVD- .3D 1 P0330200

I L VU - 1 j . U 0 P03302 1 0 A C 1 D ( I ; - oO.D-i P0330220

AZD ( 1 , 1 ) - - . 0ZUZ P0330230

A 7 P« / 4 O 4 \ — /AAA ft 7 A3 D ( 1 , Z , 1 ) - 4 0 0 0. D - 3 P0330240

C * * * t * TWO TERM oUdIRALIIUN P0330250

HHCVD= ACVD-BCVD P0330260

I I I I i"

1 V / Pi — 1 II 1 P V J Pi ft ^ A p, A HHCVD= HHCVD-97.0D0 P0330270

G G C VD = 1 . 0 D 0 - A C 1 D ( 1 ) P0330280

p p p \ / r\ — pppwp« t c APtA GGCVD-GGCVD+5 . ODO P0330290

P\PWP\ / AHA a 7Pi / 1 "5 4 \ DCVD - 4. ODO - A3D(1,Z,1) P0330300

nn t tp /hiii\/T "7"71\ uupwn p p p\/n ft p \ / ft WRITE (NUVI, 331) HHCVD, GGCVD, DCVD P033 03 1 0

C * * * * * THREE TERM SUBTRACTION P0330320

HHCVD- ACVD-BCVU-V/.0U0 P0330330

ap pi/a _ aaa rr\/n 1 aha b b C V D - lo.UUU - CCVD - i.OUO P0330340

ULVU - n5U\\iCi\)nCV\\i\) O . UUU P0330350

IIDTTC / M I I W T 771 \ U U P W Pt P P Pl/fS Pi P \ / Pi WRITE (NUVI, 331) HHLVD, GbCVU, DLVD P0330360

r - * * * * r a 1 1 n TCDM CIIDTDA PT ! nM C * * * * * rUUK I b R M bUBIKACIlUN P0330370

p. Pi P\/n — L OCC£Q/£AA/A1A/PtA DPCVD - o.8!)DOD46U04U104UU PNA^^A"9 A A P0330380

FFCVD - (+.34d/06/300dOODcUl) P0330390

a a pi/A _ P. Pi P W Pi P. C P W P» /*> 70O77AA"5AAC"3P» 7 7 A A P» 7 GGCVD - DPCVD - FFCVD - 4 Z . 7 a Z 7 3 0 0 Z 0 0 5 Z D - Z - 3 00D-Z P0330400

l_l IJ P V / Pi — AP\/n A P 4 Pi / 4 \ A P 4 Pi / 4 \ O O Pi 1 HHCVD-ACVD - AC1D(1 ) - A C 1 D ( 1 ) - 8 . 8 D 1 P033041

0

DCVD = CCVD - A2D(1,1) - 110. D-1 - AC 1 D ( 1

)

P0330420

WRITE (NUVI. 332) HHCVD. DCVD , GGCVD P0330430

331 FORMAT ( / / 3 ( D22 . 1 0 / ) ) P0330440

332 FORMAT ( / / 3 ( D22 . 1 0 / ) / / 3 6H THE ANSWERS ABOVE SHOULD BE 0 PLUS/ P0330450

137H OR MINUS AN ERROR FACTOR OF 0.1D-13) P0330460

C***** END OF TEST SEGMENT 033 P0330470

c * * * * * nA^^A / AA P0330480

C***«* WHEN EXECUTING ONLY SEGMENT 033, THE STOP AND END P0330490

C***** CARDS. WHICH APPEAR AS COMMENTS, MUST HAVE THE C= P0330500

C « IN COL 1 AND 2 REMOVED. P0330 5 1 0 C= STOP P0330520

C= END nA^^Af^A P0330530

STOP P033 C1

END P033C2

C** *************************************************t******************tP0340010

c * * * * * P0340020

C*»*** ARBAS - (034) P0340030

c * * * * * P0340040

*P0340050

C****» GENERAL PURPOSE ASA REF P0340060

C***«* TEST THAT EXPRESSIONS INVOLVING THE ADDITION AND 6.1 P0340070

C***»* SUBTRACTION (COMBINED) OF INTEGER OR REAL VALUES MAY BE P0340080

C****« FORMED. P0340090

C*«*** GENERAL COMMENTS P03 40 1 00

C « TYPES ARE NEVER MIXED. P03401 10

C** *«* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN P0340120

C***»* A VARIETY OF COMBINATIONS. P0340130

c * * * * * P03401 40

C***»* SPECIFICATIONS SEGMENT 034 P0340 1 5 0

c * * * * * P001 071

0

NBS FORTRAN Test Programs Version 1 49
C«**»* WHEN EXECUTING ONLY SEGMENT 034, THE SPECIFICATION STATEMENTS

C***«* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

C tt'tt't 1 AND" 2 REMOVED

C * * * * *

P00 1 0 7 1 5 P001 0720

POO i 672 5 P 0 0 1 0 73 0 c=

c=c=c«*

DIMENSION A2S(2,2) ,A3S(3,3,3)

1 , IAC1 1(5), IAC2I (2,7),AC1S(25)

INTEGER MCA 3 I ( 2,3, 3

)

* * * DIMENSION A2S(2,2) ,A3S(3,3,3)

1 , IAC1 1(5), IAC2I (2,7) , AC 1 S < 2 5 > INTEGER MCA3I (2,3,3) OUTPUT TAPE ASSIGNMENT

P0 0 1 0 73 5 P0 0 1 0 740

POO 1 0 74 5 P0 0 1 0 7 5 0 P034A1

P034A2

C * *

c * *

c * *

c * *

c * *

STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 034, THE STATEMENT NUVI

MUST HAVE THE C= IN COL 1 AND 2 REMOVED.

C =

C * * NUVI

* * * NUVI = 6 WRITE (NUVI, 340)

340 FORMAT ( 1 H 1

, 1 X , 32HARBAS - (034) BASIC ADDITION AND/14X,

113H- SUBTRACT I ON / / 1 6H ASA REF. - 6.4//

2 2 X , 7HRESULTS)

C***«* HEADER FOR SEGMENT 034 WRITTEN

WRITE (NUVI ,341)

341 FORMAT ( / / 2X , 26HTEST 1 INTEGER ADD AND SUBT)

JACVI

KBCVI

LCCVi

MDCVI

5

110

-2

IAC1 1(2) = 3 IAC2I (2,2) = -3

IHDVi = JACVI +KBCVI -LCCVI +MDCVI - IAC1 I (2)+

9

IGDVI = ( JACVI +KBCVI ) - ( MD CV I - I A C 1 I ( 2 ) ) - 11

P034A3

P0340 1 60

P0070550

P0070555

POO 7 0 5 6 0 P0070565

POO 7 0 5 70

P0070575

P 0 3 4 B 1 P03401 70

P 0 3 4 0 1 8 0 P0340190

P0340200

P03 402 1 0

P 0 3 4 0 2 2 0 P0340230

P 0 3 4 0 2 4 0 P0340250

P0340260

P0340270

P0340280

P0340290

P 0 3 4 0 3 0 0 P03 4 0 3 1 0

342

C«*:

IFDVI =(6 + (KBCVI - (LCCVI+MDCVI ) ) ) + 1 MCA3I(1,1,1) = IAC2K2.2) - JACVI - MDCVI - KBCVI

WRITE (NUVI ,342 ) IHDVI , IGDVI , IFDVI , MCA3I ( 1,1,1)

FORMAT ( / 4 ( I 1 1 / ) )

344

HEADER FOR TEST2

WRITE (NUVI, 344 ) FORMAT ( /2X, 24HTEST2

ACVS = 5.0

BCVS = 1.0

CCVS = 10.0

REAL ADD AND SUBTR)

P0340320

P 03 4033 0 P 0 3 40 3 4 0 P0340350

PO 3 40360

P0340370

P 0 3 4 0 3 8 0 P0340390

P0340400

P034041

0

PO 3 40 420

P0340430

P 0 3 4 0 4 4 0 P0340450

P 0 3 4 0 4 6 0 P0340470

PO 3 40 48 0 P 0 340490

P0340500

P0340510

P 0 3 4 0 5 2 0 P0340530

P 0340540

P0340550

P03 4 0 5 60

P0340570

P0340580

P034C1

P034C2

*P0350010

P03 5 0020

P0350030

P03 5 00 40

*P0350050

DCVS = -.2E+1

AC 1 S < 1 ) = 30.E-1

A2S (2,1 ) = 6.0

HHDVS= ACVS + BCVS - CCVS + DCVS +9 . 0-AC1 S< 1

GGDVS= (ACVS + 1.0) -11.0 - ( D CVS - A C 1 S ( 1 ) ) FFDVS= (6.0 + (BCVS-(CCVS+DCVS))) + 1.0

A3S(1 , 1 , 2) = A2S(2, 1) - CCVS + 8.6 - 4.0

WRITE (NUVI, 343) HHDVS, GGDVS, FFDVS, A3S(1,1 f 2)

343

C * *

C * * c*«

c * *

c * * c=

c=

FORMAT (//4(F11 . 1 / > / 3 5 H ALL ABOVE ANSWERS SHOULD BE 0 FOR/

1 31H THIS SEGMENT TO BE SUCCESSFUL)

END OF TEST SEGMENT 034

WHEN EXECUTING ONLY SEGMENT 034, 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 * *

c * *

c * *

c * *

IttitttltltllttMtltlttltttlttitlltttttMttttttlHtltttttttttltltt

ARFAS - (035)

ittiittitiiittiiiiiiititittitttitittttttitiitttttiitiiiiiiittttitt

50 NBS FORTRAN Test Programs Version 1
c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c = c=

GENERAL PURPOSE

TEST THAT EXPRESSIONS INVOLVING THE ADDITION AND

ASA RE F P03 5 0060

6.1 P0350070

SUBTRACTION (COMBINED) OF DOUBLE PRECISION VALUES

MAY BE FORMED

P0350080

P0350090

GENERAL COMMENTS

VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A

P0350100

P03501 1

0

VARIETY OF COMBINATIONS P0350120

P03501 30 SPECIFICATIONS SEGMENT 03 5 P03 5 0 U0

P0 0 1 0 760

WHEN EXECUTING ONLY SEGMENT 03 5 . THE SPECIFICATION STATEMENTS PO0 1 0765

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0010770

I N CO LUMNS f AND 2 REMOVED . POO 1 07 7 5 P001 0780

DOUBLE PRECISION ACVD, BCVD, CCVD, DCVD, FFDVD.GGDVD, HHDVD

1;, A C 1 D < 10) , BC2D< 7.4), CC3D( 7.2,2)

DOUBLE PRECISION ACVD , B CVD , C CVD , D CVD , F FD VD , GGDVD , HHDVD

1,AC1D(10).BC2D(7,4),CC3D(7,2,2>

C * * *

c * * *

c * * *

c * * *

c * * *

c =

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 035, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

WRITE (NUVI

P0 0 1 0 78 5 P00 1 0 790

P 0 3 5 A

1

P035A2

P001 0795

P03 5 0 1 5 0 P 0 0 7 0 5 8 0 P0070585

P 0 0 7 0 5 9 0 P0070595

P03 5B1

3 5 0 ) P0350160

350 FORMAT ( 1 H 1

, 1 X , 32HARFAS - (035) D.P

-HHASA REF. - 6 . 1 / / 2X . 7HRESU LTS )

C * * * * * HEADER FOR SEGMENT 03 5 WR ITTEN

ACVD = 5.0D0

ADD AND SUBTR//2X, P03501 70

P03501 80

P 0 3 5 0 1 9 0 P0350200

BCVD = 10.0D-1

CCVD = 10.0D0

DCVD = -0.2D1

AC 1 D ( 1 ) = 300 . OD-2

P0350210

P0350220

P0350230

P0350240

P0350250

P0350260

P0350270

P0350280

BC2D(6.3) = 400 . D-2

AC1D( 2 ) = . 248 1 63264248 1 6D5

BC2D( 5 , 3 ) = -. 1 2 4 0 8 1 63 2 1 2 4 6 8 D 5 HHDVD = ACVD + BCVD - CCVD + DCVD 9.0D0 AC 1 D ( 1

)

GGDVD = (ACVD + 1.0E0) - 11.0E0 -(DCVD - A C 1 D ( 1 )

)

FFDVD = (6.0D0+(BCVD-(CCVD+DCVD))) + 10.0D-1

CC3D ( 6 .1,1) = C CVD - D C VD B C2 D < 6,3) -A CVD - 11 . 0 D

0

CC3D(5.1,2) = AC1D(2) + BC2D( 5,3 ) - 1 240 8 . 1 632 1 2 40 8D0

P0350290

P0350300

P 0 3 5 0 3 1 0 P0350320

P 0 3 5 0 3 30

P0350340

LEP0350350

P0350360

P0350370

P0350380

PO 35 0390

P0350400

P03 5 04 1 0 P0350420

P 0 3 5 0 4 3 6 P035C1

351

WRITE (NUVI. 351) HHDVD, GGDVD, FFDVD, CC3D(6,1,1), CC3D(5.1,2)

FORMAT (//5(D22.10/)//35H THE ANSWERS ABOVE SHOULD BE 0 FOR/

1 32H THIS SEGMENT TO BE SU C CESS F U L . / 36H VALUES WITH EXPONENTS

2SS THAN / 3 1 H 1 0 * * < - 1 4 > ARE CONSIDERED 2ER0)

END OF TEST SEGMENT 035

WHEN EXECUTING ONLY SEGMENT 035, THE STOP AND END

CARDS. WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

IN COL 1 AND 2 REMOVED.

STOP

END

STOP

END P035C2

**********p 036 0 01 0 P0360020

P0360030

P 03 60 6 40 ********** p 0 3 6 o Q ^ Q

ASA REF P0360060

6.1 P0360070

P0360080

P0360090

ARBMI ( 036 )

********************************************************

GENERAL PURPOSE

TEST THAT EXPRESSIONS INVOLVING MULTIPLICATION OF

INTEGER VALUES MAY BE FORMED.

GENERAL COMMENTS

INTEGER SUBTRACTION ASSUMED WORKING

* VARIABLES. ARRAY ELEMENTS AND CONSTANTS ARE USED

IN A VARIETY OF COMBINATIONS.

P0360100

P03601 10

P0360120

P0360130

NBS FORTRAN Test Programs Version 1 5 1
c * * * * *

c * * * * * SPECIFICATIONS SEGMENT 036 P0360140

P0010800

c * * * * *

c * * * * * WHEN EXECUTING ONLY SEGMENT 036, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

P001 0805

P00 1 08 1 0

c * * * * *

c * * * * *

1 AND 2 REMOVED. P001 08 1 5 P0010820

c = DIMENSION IAC1M5), IAC2K2.7)

DIMENSION IAC1K5), IACZK2.7)

P0010825

P036A1

c * * * * *

c * * * * * OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P00 1 0 830

P03601 50

c * * * * *

c * * * t * WHEN EXECUTING ONLY SEGMENT 036, THE FOLLOWING STATEMENT

P0070600

P0070605

c * * * * *

C t * * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P007061

0

P 0 0 7 0 6-1 5 c= NUVI = 6

NUVI = 6

P0070620

P036B1

C t * * * * WRITE (NUVI, 360)

P0070625

P0360160

360 FORMAT (1H1, 1 X , 36HARBM I - (036) INTEGER MULTIPLICATION//

1 1 6 H ASA REF. - 6 . 1 / / 2X , 7HRE SU LTS ) P0360170

P0360180

C * * t * * HEADER FOR SEGMENT 036 WRITTEN

J ACV I =

1

P03601 90

P0360200

KBCVI =2

L C CV I =0

P036021

0

P0360220

MDCVI =-5

IAC1 1(2) = -10

P0360230

P0360240

IAC2I (1 ,2) = 3

IHDVI = JACVI *KBCVI

P0360250

P0360260

IGDVI = K B C V I * MD CV I *LCCVI

IFDVI = MDCVI*JACVI*IAC1I(2)*3

P0360270

P0360280

I E D V I = -3 * JACVI *

( -MDCVI ) * JACVI * KBCVI

IDDVI=KBCVI*KBCVI*KBCVI*KBCVI*KBCVI*JACVI

P0360290

P0360300

ICDVI = (-IAC1 I (2) )* JACVI * KBCV I * JACVI * K B C V I * JACVI *1

IAC2I ( 1 , 1 ) = 1 A C 2 I ( 1 , 2) * MDCVI * IAC1 I (2) *2

P036031

0

P0360320

IHDVI = IHDVI - 2 IFDVI = IFDVI - 150P0360330

P0360340

IEDVI = IEDVI + 30

IDDVI = IDDVI - 32

P0360350

P0360360

ICDVI = ICDVI - 40

IAC2I (1,1) = IAC2I (1,1) - 300

P0360370

P0360380

1 WRITE (NUVI, 361) IHDVI, IGDVI, IFDVI, IEDVI, IDDVI, ICDVI,

I AC2 I ( 1 , 1

)

P0360390

P0360400

361

1 FORMAT (//7(I10/)//35H ALL ABOVE ANSWERS SHOULD BE 0 FOR/31H THIS SEGMENT TO BE SUCCESSFUL)

P036041

0

P0360420

c * * * * *

c * * * * * END OF TEST SEGMENT 036 P0360430

P0360440

c * t * * *

c * * * * * WHEN EXECUTING ONLY SEGMENT 036, THE STOP AND ENDCARDS. WHICH APPEAR AS COMMENTS, MUST HAVE THE C=

P0360450

P0360460

c * * * * *

c = IN COL 1 AND 2 REMOVED.

STOP

P0360470

P0360480

c = END

STOP

P0360490

P036C1

c * * * * * END

j . ; ; I i I « i I t I t t i I i i 1 I t I i l < i I I 1 i I t I t t « i t I I I I i I t I ! I i i i 1 i i i t i )« t P036C2

*****P0370010

c * * * * *

c * * * * * ARBMR - (037)

P0370020

P0370030

c * * * * *

c * * * * * Hllttltilli»lHt*tttltntttH»IHI*HtlttHH»HtHlttHtl*t

P0370040

* * * * *P03 700 5 0

c * * * t *

c * * * * * GENERAL PURPOSE ASATEST THAT EXPRESSIONS INVOLVING MULTIPLICATION OF 6 REF

. 1 P0370060P0370070

c * * * * *

c * * t * * REAL VALUES MAY BE FORMEDGENERAL COMMENTS

P0370080

P0370090

C * * * * *

c « * * * * REAL SUBTRACTION ASSUMED WORKING

* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A

P03 70 1 0 0 P03701 1

0

c * * * * *

C * * * * * VARIETY OF COMBINATIONS. P03701 20

P03701 30

c * « * * *

c * * * * * SPECIFICATIONS SEGMENT 037 P03701 40

P001 0840

52 NBS FORTRAN Test Programs Version 1
c * * * *

c * * * *

c * * * *

c * * * t

c'=

C * * * *

c * * * *

c * * t *

C * * * *

c * * * *

c * * * * c=

* WHEN EXECUTING ONLY SEGMENT 037, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS

* 1 AND 2 REMOVED

.

* DIM E N S I 0 N A 2 S < 2 ^2 ) ; a c i S ( 2 5 ) DIMENSION A2S(2,2> ,AC1S<25>

0 U T P U T TAP E ASSIGNMENT STATEMENT, NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 037, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE """C =

" IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

P0010845

P0010850

P 6 6 1 0 8 5 5 P0010860

POO 1 0865

P037A1

POO 1 0870

P03701 50

POO 7 0630

P0070635

p 6 070640

P0070645

P 0 0 7 0 6 5 0 P037B1

POO 70 '65 5 P0370160

P 0 3 7 0 1 7 6 P03701 80

P03701 90

P0370200

P 0 3 7 0 2 1 0 P0370220

P 0 3 7 0 2 3 0 P0370240

P 0 3 7 0 2 5 6 P0370260

P0370270

P0370280

P0370290

P0370300

P 0 3 7 0 3 1 0 P0370320

P 0 3 7 0 3 3 0 P0370340

P0370350

P0370360

P0370370

P0370380

P0370390

P0370400

P037041

0

P0370420

P 03 70 43 0 P0370440

P03 704 5 0 P0370460

P0370470

P037C1

P037C2

* p o 3 a o o 1 o P03 8 0 02 0 P0380030

P0380040

*P0380050

P0380060

P0380070

P0380080

P0380090

P0380100

P03 8 0 1 1 0 P0 3 80120

P0380 1 30

P038 01 40

P0 0 1 0 8 80

POO 1 08 8 5 P00 1 0890

POO 1 089 5 P0 0 1 090 0

c * * * *

370

C * * * *

WRITE (NUVI, 370)

FORMAT ( 1 HI , 1 X , 33HARBMR - ( 037 ) REAL MULT I PL I CAT I ON / / 2X

.

I 1 4HASA REF. - 6 . 1 / / 2X , 7H RE S U L TS )

i HEADER FOR SEGMENT 037 WRITTEN

ACVS =1.0

BCVS = 0.2E2

CCVS = -1.0

DCVS =0.0

AC 1 S < 1 > = . 5E + 1 HHDVS=ACVS*BCVS

GGDVS=BCVS*BCVS*1 .0

FFDVS=2 . 0 * A C 1 S(

' 1 ) * ACVS* ACVS

EEDVS=ACVS* BCVS* C CVS*D CVS *AC1S( 1

)

DDDVS = AC1S(1 ) * ACVS * BCVS* 1 . OE 1 * ACVS* A CVS

CCDVS = CCVS* CCVS* CCVS* 3 . E 0 * AC VS * A CVS * ACVS

A2S( 1 , 1 j = ACVS* CCVS* z. HHDVS = HHDVS - 20.0

GGDVS = GGDVS - 400.0

FFDVS = FFDVS - 10.0

DDDVS = DDDVS - 1000.6

CCDVS = CCDVS + 3.0

371

A2S( 1 , 1 ) = A2S( 1 , 1 ) + 2 . WRITE (NUVI. 371) HHDVS. GGDVS, FFDVS, EEDVS. DDDVS, CCDVS,

A2S( 1 , 1 ) FORMAT (//7(F11 .1/)//35H ALL ABOVE ANSWERS SHOULD BE 0 FOR/

31 H THIS SEGMENT TO BE SUCCESSFUL)

END OF TEST SEGMENT 037

WHEN EXECUTING ONLY SEGMENT 037, 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 * * * *

c * * * *

c * * * * c=

c=

c * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

*****************************************************************

ARFMD - (038 ) *****************************************************************

ASA REF

6.1

GENERAL PURPOSE

TEST THAT EXPRESSIONS INVOLVING THE MULTIPLICATION

OF DOUBLE PRECISION VALUES MAY BE FORMED

GENERAL COMMENTS

* DP ADDITION AND SUBTRACTION ASSUMED WORKING.

* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A

VARIETY OF COMBINATIONS.

S P E C I F I C A f 1 0 N S SEGMENT 03 8

WHEN EXECUTING ONLY SEGMENT 038, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED

NBS FORTRAN Test Programs Version 1 53
C= DOUBLE PRECISION ACVD , BCVD , CCVD , OCVD , EEDVD , DDDVD , CCDVD

C= 1 , F F D V D , GGDVD,HHDVD,,AC1D<10> f BC2D(7.( 4),. 0 030(7,2,2)

DOUBLE P REC I S I 0 N ACVD , B CVD , CCVD.D CVD .EEDVD , DDDVD, C CDVD

, F F D V D , GGDVD,.HHDVD,AC1D(10) ,BC2D(7,4) f. CC3D(7,2,2>

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c"=

0 L) T....P U T T;..A P E ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 038, THE FOLLOWING STATEMENT

"n'UVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P0010905

POO 1 091

0

P038A1

P038A2

PO0 1 0915

P03801 50

POO 7 0 66

6

P0070665

POO 70670

P0070675

POO 7068 0 P038B1

POO 7 06 8

5

P03801 60

P 038 6 1 70

P03801 80

P03 80190

P0380200

P 03 802 10

P0380220

P0380230

P0380240

P0380250

P0380260

P0380270

P0380280

P0380290

P0380300

P 6 3 803 1 6 P0380320

P0380330

P0380340

P038 03 5 0 P0380360

P 03 8 03 70

P0380380

P0380390

P0380400

P 0 3 8 0 41 0 P0380420

P0380430

P0380440

P038 045 0 P0380460

P 0 3 8 0 4 7 0 P0380480

P 6 3 8 0 496

P0380500

' P 6 380 5 1 0 P0380520

P038C1

P038C2

* P 0 3 9 0 6 1 6 P0390020

P03 90 03 0 P0390040

« P 0 3 9 0 0 5 0 P0390060

P0390070

P0390080

P 0 3 9 0 0 9 0 P0390100

P03901 10

P00 1 0920

POO 1 092 5 P0010930

P 0 0 1 0 9 3 5 P0010940

NUVI = 6 NUVI = 6

C * * * *

380

WRITE (NUVI, 380)

FORMAT ( 1H1 , 1 X , 33HARFMD - (038) D.P

15H ASA REF. - 6 . 1 / / 2 X , 7 H R E S U L TS ) MULTIPLICATION// 2X,

C * * * * * HEADER FOR SEGMENT 038 WRITTEN

ACVD=1 .000

BCVD=2.0

CCVD=-30 . OD-1

D CVD= 1 . 0D1

AC 1 D ( 1 ) = 1 . 1D1

CC3D(3,1, 2) = .26214 406

CC3D(6, 1,2) = -2000. D-3

CC3D(3,2,2) = 409. 6D1

HHDVD=ACVD*BCVD

.^.^^.^.^^.^^.^.^....^..^.....^.^.^ FFDVD = A C 1 D ( 1 ) * ACVD * ACVD * A CVD

EEDVD= C CVD *C CVD* ACVD *1 .000* BCVD

DDDVD =A CVD* 2 . 0D1 * ACVD *D CVD* 1 . OEO*CCVD

CCDVD = ACVD* BCVD* CCVD* CCVD* CCVD* BCVD* ACVD

BC2D(3,4) = DCVD*(400.D-2)*CC3D(6. 1 .2)

BCZD (2,3 ) =" C C 3 D(3, 1 ,2) * CC3 0(3.2,2)

HHDVD = HHDVD - 2.

FFDVD = FFDVD - 11

EEDVD = EEDVD - 18

DDDVD = DDDVD

CCDVD = CCDVD

BC2D(3.4)

BC2D(2.3)

ODO

. ODO

.ODO

6 0 0 . 0 D 0 108. ODO

BC2D(3,4) -(-80. DO)

BC2D( 2 , 3 ) - 1 . 07374 1 824D9

WRITE (NUVI, 381) HHDVD, GGDVD. FFDVD. EEDVD, DDDVD. CCDVD,

1 BC2D(3,4) , BC2D(2.3)

381

C * * * *

C * * * *

C * t * *

c * * * *

FORMAT (//8(D22.10/)//35H THE ANSWERS ABOVE SHOULD BE 0 FOR/

31H THIS SEGMENT TO BE SUCCESSFUL)

END OF TEST SEGMENT 038

WHEN EXECUTING ONLY SEGMENT 038. THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

STOP

END

STOP

END

ARBDV - (039)

: i ' : e e I M I t « t I t I t t < t t t t « i I t i < 1 t t t > t t I t t t t « I t t t < * t t I t t t t t I t I t > t t t •

GENERAL PURPOSE ASA REF

TEST BASIC DIVISION. 6.1

INTEGER AND REAL (SP) TYPES ONLY

C * * * *

C * * t *

c * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * t

c * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * * c * * * *

SPECIFICATIONS SEGMENT 039

WHEN EXECUTING ONLY SEGMENT 039. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED

.

54 NBS FORTRAN Test Programs Version 1
DIMENSION A2S(2,2) , IAC1 1(5) , IAC2I (2,7) ,AC1S<25)

PflOIOQiS r \J \J 1 V 7 H J P039A1

C***»* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

p n o 1 o q ^ o P0390120

r^ #11 #M #It #H #A C*«*** WHEN EXECUTING ONLY SEGMENT 039, THE FOLLOWING STATEMENT

r u u i U07U

P0070695

C * * * * * NIIVI - (\ MII^T HAVF THF P = TN PDI IIMNS 1 AND 7 RPMnVFD

c * * * * * P0070705

P - N 1 1 V I - h

NUVI = 6

p o n 7 o 7 1 n P039B1

r^ #H #It *H *H tH WRITE (NUVI, 390)

Pfin7fl71 s P0390130

7 0 n FORMAT (1 H1 1X 70HARRDV - C 0 79 ) INTFGFR A N I") RFAI /1SX

-9H DIVISI0N//2X, 14HASA REF. - 6.1/ / 2X . 7 H RE S U L TS

)

p— oV 7J q7 nV 11 tUi n P0390 1 50

r***«* HFAnFR FOR Q F 0 M F M T ft 7 9 LI R T T T F M WRITE (NUVI, 391)

r V J 7 v I DU

P03901 70

791 FORMAT (//?X ?? U TF C!T1 INTFfSFR u I V I <5 I fl N ) JACVI =1 P0390190

k r r v i =

?

LCCVI=0

P07O0700 rUJ7yt.vv

P0390210

mI I nU rL- vV It -— 1I oV IAC1 I (2) = 1 P0390230

IAT7IM 1 nlib t \ 1 i tO/ =- -X0 IHDVI=KBCVI/JACVIP07Qfl?£0. rVJ7vtHU

P0390250

TonvT-Mnrvi JUUV1-IIULV1/NDLV1/ / krcvt / i a r v i J A L- V 1 IFDVI=LCCVI/JACVI /JACVI/1

rUJ7UtOV

P0390270

i f n v i - Mnrvi/KRrvi/iArii(?wiAni(?wiAr\/i

IAC2 I ( 1 , 2 )= I AC2 I ( 1 . 4) /4/KBCVI P0390290

! MfW T - I WnV T - 7 i n u v i - inuvi &. IGDVI = IGDVI - 5 P0390310

IFDVI iCUVi -— IFDVI I c U V 1 - SJ IAC2K1 ,2) = IAC2K1 .2) + 1Pfl79ft7?0

P0390330

UIRITF (NIIVI 79?) THDVI IfiDVI IFDVI IFDVI I A f 7 I ( 1 ?j

392 FORMAT <//5<I10/>>

rUJ7vJ*tU

P0390350

WRITE (NUVI, 393)

393 FORMAT ( / / 2X , 1 9HTEST2 REAL DIVISION)

P0390360

P0390370

A L V O — 1 .V

BCVS=0.0

P07907a0 rvJ/UJOU

P0390390

rrv^-1 n f 1 DCVS=20.0E-1

POTQO^flO

P03904 1 0 AAn<!(1 L- 1 O \ 1 ):1flfl / 1 U v . OF-? V C L A2S( 1 , 1 ) = -200. E-2

P0790470 rvJ7v"TfcW

P0390430

hhdvs- ArV^/AfVS

GGDVS = CCVS/ACVS/ (-ACVS) P0390450

ffdvq- r r vq / r

r

vq / n r

/

rrUVO- D L- V 0 / LLVj/ULVJinlVO a rvs EEDVS= CCVS/AC1 S( 1 ) /DCVS/ (-1 . 0) /ACVS

Pfl79ft4ftfl

P0390470

AA 7L O ( 1 7 ) - A 7 <5 ( 1 1 ) / APKM WAfV<!/(-7 f) C f) > \ I e L 1 Ac.O\l,l//nL-IO\l//ALVO/V L . v C v / HHDVS = HHDVS -1.0

rVJ7VtOv

P0390490

uuUVo - uuU V D + I U .

U

EEDVS = EEDVS + 5.0

Pfl790Sftfl

P0390510

A2S(1 2) = A2S(1 2) - 1.

WRITE* (NUVI ,394) 'HHDVS , GGDVS, FFDVS, EEDVS, A2S(1,2)

P0790570 rwJ7VJtv

P0390530

7JTHo a FORMAT run:nnl I//SCF11 W/J\rll.l////Jjn I / W / 7 S H ALL All ADUVC A R 0 VF AA NPI 30 LIn FC Rr\ 3O QOnUULU u n 1 1 1 D RDCF 0\J FDR/ rurw 12X.29HTHIS SEGMENT TO BE SUCCESSFUL)

P0390540

P0390550

r*t**« w FND CI\!L' OFUricOIOCuMCIMIl'J/ TF^T ^FGMFNT A79

C***«* WHEN EXECUTING ONLY SEGMENT 039, THE STOP AND END CARDS

P0390560

P0390570

r*t*«* UHITH APPFAR A<? POMMFNT TARnS MII<?T HAVF THF C= IN COLUMNS

C***t* 1 AND 2 REMOVED.

P0390580

P0390590

C= STOP

C= END

P0390600

P0390610

w 1 U r END

P039C1 r v J 7 U l P039C2

C*«»*«*«»»****t«»«««tt»«»«tit*»««»*tt«*«ttt»tt»ttt*«*«***»t«*«ttt*«*t«*tP0400010

C****« P0400020

C***»* ARFDV - (040)

c * * * * * P0400030

P0400040

C«t«ttttttttit*ttttt*ltt«l<t«*«>«t*t*tttttltltltttttttittHHtttttttt

C**««* GENERAL PURPOSE ASA

t**P0400050

REFP0400060

NBS FORTRAN Test Programs Version 1 55
c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

c=

* TEST THAT EXPRESSIONS INVOLVING DIVISION OF DOUBLE 6.1

* PRECISION VALUES HAY BE FORMED

* GENERAL COMMENTS

* * DP SUBTRACTION ASSUMED WORKING.

*

'"* VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A

t VARIETY OF COMBINATIONS,

*

* SPECIFICATIONS SEGMENT 040

P0400070

P0400080

P0400090

. P04001 __...._„.00

P0400120

P 0 A 0 0 1 3 0 P04001 40

P 0 0 1 0 9 6 0 P00 1 0965

POO 1 0970

P001 0975

P0 0 1 09 8 0 P001 0985

POO 1 0990

P040A1

P040A2

P00 1 0995

P 0 4 0 0 1 5 0 P0070720

P 0 0 7 0 7 2 5 P0070730

P 0 0 7 0 7 3 5 P0070740

P040B1

P0070745

PO 400 160

P04001 70

P 0 4 0 0 1 8 0 P0400190

PO 40020 0 P04002 1 0 P 0400220

P0400230

PO 40 02 40

P0400250

P 6 4 0 0 2 6 0 P0400270

P0400280

P0400290

P 0 4 0 0 3 0 0 P040031

0

PO 4 6 03 2

6

P0400330

PO 40 03 40

P0400350

P 6 4 0 0 3 6 0 P0400370

P 6 400380

P0400390

' P 6 4 0 0 4 6 0 P040041

0

PO 400 42 0 P0400430

' P 0 4 0 0 4 4 0 P0400450

P 0 4 0 0 4 6 0 P0400470

P 6 4 0 ci

P040C2

* PO 4 1 0 0 1 0 P041 0020

P 0 4 1 0 0 3 0 P0 4 1 0 040

* P 0 4 1 0 0 5 0 P041 0060

PC14 1 0 0 7 0 P0 4 1 0 08 0

* WHEN EXECUTING ONLY SEGMENT 040. THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

* 1 AND 2 REMOVED.

* DOUBLE PRECISION ACVD , B C VD , C CVD . D CVD , EE DVD , F F DVD , GGDVD , HHDVD

i , AC 1 D (10 ),BC2D(7,4),CC3D(7,2.2>

DOUBLE PRECISION A CVD , B CVD , C CVD . D CVD , E E DVD , F F DVD , GGDVD , HHDVD

1 , AC 1 D (10 > . B C2D( 7, 4) , CC3D( 7, 2 , 2

)

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

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,...

NUVI = 6

NUVI = 6

C * * * *

400

c * * * * *

WRITE (NUVI, 400)

FORMAT ( 1H1 , 1X.27HARFDV - (040) D.P. DIVISION//

- 16 H ASA RE F . - 6 . 1 7/2 X , 7HRESULT S ) HEADER FOR SEGMENT 040 WRITTEN

ACVD = 1 . 0D0

BCVD = 20.0D-1

CCVD "= .102

DCVD = -10.0

A C 1 D ( 1 ) = 0.0

CC3D( 1 , 2,2 ) = -.00403

CC3D( 1 , 1,2 ) = . 2441 4 0 6 2 5 D - 3 HHDVD = BCVD/ACVD

CC3D(3, 1,2) = . 125D0

GGDVD = DCVD/DCVD/ACVD

F F DVD = A C 1 D(T ) / BCVD /AC V D/ 1 - DO 7 1 .56

EEDVD = DCVD/BCVD/(-5.0E0)/ACVD/ACVD

BC2D(4,4) = CC3D(1 , 2 , 2 ) / B CVD / D CVD / . 0 0 2D2

BC2D(4,3) = CC3D(1,1,2) / CC3D(3,1,2)

HHDVD = HHDVD - 2.0D0

GGDVD = GGDVD - 1 . 0D0

EEDVD = EEDVD - 1.656

BC2D(4,4) = BC2D(4,4) - 1 . 0D0

B C 2 D ( 4,3) = BC2D( 4 , 3 ) - 1 9 5 .3 1 2 5 D - 5 WRITE (NUVI, 401) HHD VD , GGD VD , F F D VD , E ED VD , B C2D ( 4 , 4 ) , BC2D(4,3)

401

C * * * *

C * * t *

c * * * *

c * * * * c=

c=

FORMAT (//6(D22.10/)//35H THE ANSWERS ABOVE SHOULD BE 0 FOR/

1 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

EN D

* ARBEX - (041

j

*

* GENERAL PURPO S E ASA REF

* TEST THAT EXPRESSIONS INVOLVING INTEGER AND REAL 6.1

C * * * *

C * * * *

c * * * *

C * t * *

c * * * *

c * * * *

c * * * *

c * * * *

56 NBS FORTRAN Test Programs Version 1
c * * * *

c * * *

«

c * * «

c * * * *

c * * * *

c * * * *

C * * * *

C * * * *

C * t * *

C * * * *

c * * * *

C t * * t

C * * * *

c * * * * c=

EXPONENTIATION MAY BE FORMED

GENERAL COMMENTS

THE FOLLOWING TESTS ARE MADE - INTEGER BY INTEGER GIVING INTEGER

P041 0090

P0410100

P04"10'1 10

P0410120

P0410130

P041 01 40

P 0 4101 5 0 P0410160

P 6 4 1 01'70

P001 1000

PO0 1 i GO

5

P 0 0 1 1 0 1 0 POOH 01 5 POO 1 1 020

POO 1 1025

P041 A1

P 0 0 1 1 0 3 0 P041 01 80

PO 070 75 0 P0070755

POO 70 760

P0070765

POO 70 770

P041 B1

POO 70 7 75

P041 01 90

P0 4 1 02 0 0 P0410210

P 0 4 1 0 2 2 0 P0410230

P 0 4 1 0 2 4 6 P04 1 02 5 0 PO 4 10260

P041 0270

P041 0280

P041 0290

PO 4 1 030 0 P041 03 1 0 > 0 4 103 2 0 P041 0330

PO 4 103 40

P0 4 1 03 5 0 P0 4 10360

P0 4 1 03 70

PO 4 1 03 8 0 P0 4 1 0390

P0410400

P0 4 1 0 4 1 0 PO 4 1 042 6 P04 1 0430

P04 10440

P041 0450

PO 4 1 0460

P04 1 0470

PO 4 10480

P041 0490

P 0 4 1 0 5 0 0 P 0 4 1 0 5 1 0 p

0'4 i' 0

5 '20 P0410530

P0 4 1 0 5 40

P041 0550

P 0 4 1 0 5 6 0 P0 4 1 0 5 70

P 0 4 1 6 5 8 0 P041 0590

P041 0600

P041 061

0

6.1

REAL (SP) BY INTEGER GIVING REAL (SP)

REAL (SP) BY REAL (SP) GIVING REAL (SP)

RESTRICTIONS OBSERVED

SPECIFICATIONS SEGMENT 041

* WHEN EXECUTING ONLY SEGMENT 041, THE SPECIFICATION STATEMENTS

* WHICH. APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

1 AND REMOVED.

DIMENSION A2S(2,2),IAC1I(5),IAC2I(2,7),AC1S(25)

DIMENSI 0 N A 2 S < 2 , 2) , I AC 1 I ( 5) , I AC 21 (2. 7) ,A C 1 S < 2 5)

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 041, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C = NUVI

NUVI

C 1 1 * *

410

WRITE (NUVI. 410)

FORMAT ( 1 H 1 , 1 X , 3 4HARBEX - (041) BASIC EXPONENTIATION//

- 2X.15HASA REFS. - 6.1//2X, 7HRESULTS)

*' HEADER FOR SEGMENT 041 WRITTEN

WRITE (NUVI, 411)

FORMAT ( / / 2 X , 1 8 H I N T E G E R BY INTEGER)

JACVI =1

C * * * *

411

KBCVI

=

LCCVI=

MDCVI

=

I AC 1 I (

I A C 2 i ( IHDVI

I GDVi =

I FDVI

=

IEDVI

I DDVI

=

IAC2I

(

IHDVI

I FDVI

IEDVI

i bb vi

IAC2I

(

WRITE

FORMAT

WRITE

FORMAT

ACVS=i

BCVS=0

CCVS-0

DCVS = A C 1 S (

1

A2S( 1

, HHDVS=

GGDVS=

FFDVS=

EEDVS=

DDDVS=

CCDVS=

A2S(2,

HHDVS

FFDVS

EEDVS

02-1

2)

1,4) = 3

= LCCVI * * IAC1 I (2

)

KBCVI * * JACV I JACVI * * K B C V I = MDCVI * * I AC1 I (2 )

( LCCVI * * LCCVI ) * * ( JACVI * * MDCVI ) 1,2) = (LCCVI * * I A C2 I ( 1 , 4) ) * * JACVI

= IHDVI - 8 = IFDVI - 1 = IEDVI + 1 = I DDVI4

1 ,2) = IAC2K1 ,2)

(NUVI, 412) IHDVI

( / / 6 ( 1 1 0 / )

)

8 IGDVI IFDVI, IEDVI, IAC2K1.2)

412

413

(NUVI, 413)

( / /2X, 25HREAL

.0

. 0

BY INT, REAL BY REAL)

. 5E0

20.0E-1

)=1 .21 EO

1 ) = 300. E-2

ACVS** JACVI

BCVS** JACVI

D CVS * * I AC 1 1(2)

ACVS**ACVS

A C 1 S < 1 ) * * C CVS

(DCVS**1 )**(2.0**ACVS>

1 ) = (A2S(1 ,1 )'**DCVS)**BCVS

= HHDVS - 1.0

= FFDVS - 8.0

= EEDVS - 1.0

NBS FORTRAN Test Programs Version 1 57
DDDVS = DDDVS - 1.1 P04 1 0620

CCOVS = CCDVS - 4.0 P04 1 0630

A2S(2, 1 ) = A2S(2, 1 ) - 1.0 P04 1 0640

WRITE (NUVI, 414) HHDVS, GGDVS, FFDVS, EEDVS, DDDVS, CCDVS, A2S(2 , 1 )P0 4 1 065 0 414 FORMAT ( / /7( F1 1 . 1 / ) / / 3 5 H ALL ABOVE ANSWERS SHOULD BE 0 FOR

/

P041 0660

12X, 29HTHIS SEGMENT TO BE SUCCESSFUL) P041 0670

c * * * * * END OF TEST SEGMENT 041 P0 4 1 0680

C * * * * * WHEN EXECUTING ONLY SEGMENT 041, THE STOP AND END CARDS P041 0690

c * * * * * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P041 0700

c * * * * * 1 AND 2 REMOVED. P04 1 071 0 c= STOP P04 1 0 72 0

c = END P041 0730

STOP P 0 4 1 C 1 END P 0 4 1 C 2

c * * * * * ******************************************************************

c * * * *

P0420020

C * * * * * ARFEX - (042) P0420030

c * * * * * P0420040

C***********************************************************************P0420050

[ , t » i i GENERAL PURPOSE ASA REFP0420060

Q * ft A * * TEST EXPONENTIATION OF DOUBLE PRECISION ITEMS 6.1 P0420070

c * * * * * THE FOLLOWING TYPES OF DP EXPONENTIATION ARE TESTED - P0420080

r * * * * * DP BY REAL GIVING DP P0420090

c * * * * * REAL BY DP GIVING DP P04201 00

r1 *w * *w *w *w DP BY DP GIVING DP P04201 1

0

c * * * * * GENERAL COMMENTS P0420 1 20

ri * *k *x th *n * DP ADDITION AND SUBTRACTION ASSUMED WORKING. P04201 30

£ * * ft * * * VARIABLES, ARRAY ELEMENTS AND CONSTANTS ARE USED IN A P04201 40

VARIETY OF COMBINATIONS. P04201 50

c * * * * * RESTRICTION OBSERVED P0420160

p # * * # * NEGATIVE VALUED ITEMS ARE NEVER RAISED TO A REAL OR 6 . 4/ 1 2P0420 1 70

^ X X x * X DP EXPONENT r\/\ / ^ a d o/\ P0420 1 8 0

p * * * * + X IT X X X P 0 4 2 0 1 9 0

^ X X X X X SPECIFICATIONS SEGMENT 042 P0420200

c * * * * *

fl A A -1 -1 A / A P 0 0 1 1 0 4 0

Q # ft ft ft A

i i i i p ii p» * * p» i i «t- ; i>, u a. i w f=i i= a i>a p m ^° rt * =\ *tP i i r* p\p*p"p*fr*fp»»TTP\»i at i Tpiipiita WHEN EXECUTING ONLY SEGMENT 042, THE SPECIFICATION STATEMENTS POO 1 1 045

Q ft ft * * * uuTru WniLn ArHcAK a r> d c a d ac rnniMCMTC miict ua\/c tuc p- t m rniiiMMC As LUnnfcNIb, n U o 1 HAVt 1 he I- IN LULUnNb r U U 1 1 U j U

Q * ft * * * 1 AND 2 REMOVED. POO 1 1 0 5 5 c * * * * * P001 1060

C- DOUBLE PRECISION ACVD , BCVD . CCVD , EEDVD . FFDVD , GGDVD , HHDVD P001 1065

G- DOUBLE PRECISION AC 1 D ( 1 0 ) , B C2D ( 7 , 4 ) , C C3D ( 7 . 2 . 2

)

P001 1 070

DOUBLE PRECISION ACVD , BCVD . CCVD , EEDVD , FFDVD , GGDVD , HHDVD P042A1

DOUBLE PRECISION AC 1 D ( 1 0 ) , B C2 D ( 7 , 4 ) , C C3D ( 7 , 2 , 2

)

P042A2

C * * * * * P001 1 075

G * ft ft * * OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P042021

0

c * t * * * P0070780

[ t t t t t WHEN EXECUTING ONLY SEGMENT 042, THE FOLLOWING STATEMENT P0070785

0 t > * * A NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070790

C * * ft Sf ft POO 70 795

c= NUVI = 6 P0070800

NUVI = 6 P042B1-

c * * * * * P0070805

WRITE (NUVI, 420) P0420220

420 FORMAT ( 1 H1 , 1 X, 28HARFEX - (042) EXPONENTIATION// P0420230

16H ASA REF. - 6 . 1 / / 2X , 7HRESULTS

)

P0420240

C* 1 1 1HEADER FOR SEGMENT 042 WRITTEN P0420250

c * * * * * DEFINE VARIABLES AND ARRAY ELEMENTS P0420260

ACVS=1 .0 P0420270

BCVS=0 .0 P0420280

CCVS=0.5 P0420290

DCVS=20.0E-1 P0420300

ACVD = 1 . 0D0 P0420310

BCVD = 80.0D-1 P0420320

CCVD = 0.0 P0420330

AC1D( 1 ) = 1.0 P0420340

BC2D(2 . 4) = 3000. D-3 P0420350

HHDVD = ACVD**BCVS P0420360

GGDVD = ACVS**ACVD P0420370

58 NBS FORTRAN Test Programs Version 1
FFDVD = AC 1 D ( 1 ) * *BCVD P0420380

EEDVD = (DCVS* *ACVD) * * (2 . ODO* *ACVS> P0420390

CC3D ( 5 , 1 ,2) = BC2D(2,4)**(DCVS**BCVS) P0420400

HHDVD = HHDVD - 1 .ODO P042041

0

GGDVD = GGDVD - 1 . ODO P0420420

FFDVD = FFDVD - 1 . ODO P0420430

EEDVD = EEDVD

C C3D ( 5 , 1,2) =

421

C * * *

C * * *

C * * *

c * * * c=

c=

- 4. ODO

CC3D<5,1,2> - 3. ODO

WRITE (NUVI , 421 ) HHDVD, GGDVD, FFDVD, EEDVD. CC3D<5, 1 ,2)

FORMAT <//5(D22.10/)//35H THE ANSWERS ABOVE SHOULD BE 0 FOR

/

1 32H THIS SEGMENT TO BE SUCCESSFUL. / 3 6 H VALUES WITH EXPONENTS

2SS THAN / 3 1 H 1 0 * * < - 1 4 > ARE CONSIDERED 2ER0)

** END OF TEST SEGMENT 042

** WHEN EXECUTING ONLY SEGMENT 042, THE STOP AND END CARDS

'*'"*' WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

** 1 AND 2 REMOVED.

STOP

END

STOP

END

P0420440

P0420450

P 0 42 0 460

P0420470

LEP0 420 480

... P0420490

p042 0 5 00

P0420510

P0420520

P0420530

PO 420 5 40

P0420550

P042C1

P042C2

C * * *

C * * *

C * * *

c * * *

c * * *

c * * *

C * * *

C * * *

c * * *

C * * *

C * * *

C * * *

C * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * * c* * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

C * * *

c * * *

c * * t

c * * *

C * * *

C * * *

c =

** P0430020

* * ARBHI - ( 043 )'' P 0 43 0 030

* * P 0 43 0 0 40

t«itii(iiititMiiiiittitii«tiiMti(ntiittitiiit»iitiiiit»tuti«titiP0430050

** GENERAL PURPOSE

TESTS THAT HIERARCHY OF OPERATORS AND PARENTHESES

ARE HANDLED CORRECTLY. OPERATORS SHOULD FOLLOW

THIS ORDER ""- * * ( EXPONE NT I AT I ON

>""

* AND / (MULTIPLI CATION, DIVISION)

+ AND - (ADDITION, SUBTRACTION)

** GENERAL COMMENTS

* * * ON LY INTEGER EXP R ESS IONS ARE USED SINCE' T HIS f EST IS

** CONCENTRATING ON OPERATORS AND PARENTHESES

*"*

* ADDITION' SUBTRACTION, MULTIPLI CAT ION, D I VISION,

** EXPONENTIATION ASSUMED TO FOLLOW LAWS OF

ASSOCIATION AND COMMUTATION UNLESS PARENTHESES

REGROUP EXPRESSIONS

*" INTEGER DIVISION MUST BE EVALUATED FROM LEFT TO

RIGHT

** RESTRICTIONS OBSERVED

** * ALL ELEMENTS EVALUATED ARE MATHEMATICALLY DEFINED

*'*

* NO NEGATIVE VALUES ARE RAISED TO A REAL

** EXPONENT

*'*

* NO ZERO VALUED PRIMARY IS RAISED TO A ZERO

** VALUED EXPONENT

ASA REF P0430060

6. 1 /07P0430070

P0430080

6.4/41P0430090

P0430100

p 6 4 301 1 0 P0430120

P0430130

P0430140

6.4/49P0430150

P0430160

P 6430 1 7 6 P04301 80

6.4/56P0430190

P0430200

P04302 1 0 6.4/16P0430220

"" 6 . 4/12P0430230

P0430240

6.4/1 4P0430250

P0430260

P 6 43 0270

P0430280

P 0 0 1 1 080

P00 1 1 085

PO0 1 1090

P00 1 1 095

POO 11 100

P001 1 105

P043A1

P001 1 1 1 0 PO 43 0 290

P0070 8 1 0 PO 0 7 0 8 1 5 P0070820

P0070825

P0070830

P043B1

P0070835

P0430300

P0430310

P0430320

P0430330

* *

* *

* *

* *

* *

SPECIFICATIONS SEGMENT 043

WHEN EXECUTING ONLY SEGMENT 043, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

C * * *

C * * *

c * * *

C

*"*"*

c * * *

c * * *

c =

DIMENSION I AC 1 I ( 5 ) , I AC2 I ( 2 , 7

)

DIMENSION IAC1 I (5) . IAC2I (2.7)

* *

t * OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 043. THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

C * * *

430

WRITE (NUVI, 430)

FORMAT ( 1 H 1 , 1 X , 36HARBH I - (043) HIERARCHY, PARENTHESES/ /2X.

23HASA REFS. - 6.1 AND 6.4//

2X, 7HRESULTS)

NBS FORTRAN Test Programs Version 1 59
JACVI = 1 KBCVI = 2 P0430340

P0430350

LCCVI = -5

MDCVI = 0

P0430360

P0430370

NECVI = 36

IAC1 1(2) = 10

P0430380

P0430390

C t * * * * 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 P0430460P0430470

IHDVI = JACVI * KBCVI

IGDVI = KBCVI * JACVI

P0430480

P0430490

IFDVI = IHDVI - IGDVI

WRITE (NUVI.431) MRRVI, IFDVI

P0430500

P0430510

c * * * * * TEST THAT SUBTRACTION IS COMMUTATIVE (TEST 3)

MRRVI = 3 P0430520

P0430530

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 = (IAC1K2) + JACVI) + KBCVI

IGDVI = IAC1K2) * (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 P0430640

P0430650

IHDVI = CIAC1K2) * LCCVI) * KBCVI

IGDVI = IAC1K2) * (LCCVI * KBCVI)

P0430660

P0430670

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

P043071

0

MRRVI = 6

IHDVI = JACVI + KBCVI * LCCVI - 1 + IAC1K2)

P0430720

P0430730

c * * * * * WRITE (NUVI.431) MRRVI, IHDVIREGROUP TEST 6 EXPRESSION (SLIGHTLY CHANGED) WITH

P0430740

P0430750

c * * * * * PARENTHESES. ANSWERS SHOULD BE NON-ZERO (TEST7).

MRRVI = 7 P0430760

P0430770

IGDVI = (JACVI + KBCVI)* LCCVI + 9

IFDVI = JACVI + KBCVI * (LCCVI + 9)

P0430780

P0430790

IEDVI = (JACVI + KBCVI) * (LCCVI + 9)

I AC 1 I ( 1 ) = IGDVI + 6

P0430800

P043081

0

IAC1 1(3) = IFDVI - 9

IAC1K4) = IEDVI - 12

P0430820

P0430830

c * * * * * WRITE (NUVI. 432 ) MRRVI, IAC1K1), IAC1K3). IAC1K4)TEST THAT DIVISION IS DONE BEFORE ADDITION

P0430840

P0430850

C * * * * * AND SUBTRACTION (TEST 8). ANSWER SHOULD BE ZERO.

MRRVI = 8 P0430860

P0430870

LCCVI = - 6

IAC1 1(2) = 12

P0430880

P0430890

IHDVI = LCCVI + IAC1KZ) / KBCVI - LCCVI - 6

WRITE (NUVI.431) MRRVI. IHDVI

P0430900

P043091

0

c * * t * t

c * * * * * REGROUP TEST o EXPRESSION WITH PARENTHESES (TEST 9)ANSWER SHOULD BE ZERO, OTHERS NON-ZERO.

. SECOND P0430920

P0430930

MRRVI = 9 IGDVI = (LCCVI + IAC1K2)) / KBCVI - LCCVI - 6

P0430940

P0430950

IFDVI = LCCVI + IAC1K2) / (KBCVI - LCCVI - 6)

IEDVI = (LCCVI + IAC1K2)) / (KBCVI - LCCVI - 6)

P0430960

P0430970

I AC 1 I ( 1 ) = IGDVI - 3

IAC1 1(4) = IEDVI - 3 P0430980

P0430990

c * * * * * WRITE (NUVI.432 ) MRRVI. IAC1M1), IAC1K3), IAC1K4)

TEST THAT EXPONENTIATION IS DONE BEFORE

P0431 000

P0431 01

0

60 NBS FORTRAN Test Programs Version 1
Ctt.t* ANY OTHER OPERATION (TEST 10). ANSWERS SHOULD

C***tt BE ZERO.

MRRVI =

l"6 IHDVI = KBCVI + 3 ** 2 - 11

I GD V I = IAC1 I (2) * KBCVI ** 3 - 96

IFDVI = NECVI / LCCVI ** KBCVI - 1 WRITE (NUVI. 432) MRRVI , IHDVI , I GOV I C***»* REGROUP TEST 10 EXPRESSIONS WITH

C't'"*"*"t * ANSWERS SHOULD BE NON-ZERO

MRRVI = 11

IHDVI = (KBCVI + 3) «* 2 - 11

IGDVI = (IAC1K2) * KBCVI) ** 3 - 80

IFDVI = (NECVI / LCCVI ) ** KBCVI - 1 IAC1 1(1) = IHDVI - 14

IFDVI

PARENTHESES (TEST 11)

IAC1K3) = IGDVI - 1 3 744

IAC1 I (4) = IFDVI - 35

WRITE ( N U V I . 432 ) MRRVI, I A C 1 I ( 1 ) , IAC1 I (3) , I A C 1 1(4)

THE FOLLOWING STATEMENTS INCLUDE AN ADDITIONAL TEST

OF OPERATOR HIERARCHY. A VAR I ETY OF OPERATORS IS USED

BOTH VARIABLES AND ARRAY ELEMENTS ARE USED. ALL

ANSWE RS SHOULD BE ZERO (TES f 1 2 )

.' MRRVI = 12

LCCVI = -5

IAC1 I (2) = 10

JACV I +KBCV I * L C CV I - I AC 1 I ( 2 ) / 2- I AC 1 I (2) 111 5*1

5

KBCVI**3*4 + 162/(3**(KBCVI*2)) + MDCVI-34

K B CV ft ( JACV I +KBCVI * ( I AC 1 I ( 2 ) - K BCV I )"> - 3 4 IAC1I(2)/KBCVI+70/(LCCVI*(KBCVI**2+3))-3

K B CV I * ( K B C V I + I AC 1 I ( 2 ) * ( K B CV I +3 * ( J ACV I +K B C VI ) ) ) -224

IAC1K1) = KBCVI*(KBCVI+KBCVI*(KBCVI+KBCVI*(K8CVI+KBCVI*

-(KBCVI +KBCVI ) ) j ) - 92

IAC2K1.4) = IAC1 I <Z) + LCCVI + JACVI + KBCVI + K8CVI - JACVI - 9

IAC2K1 .2) = I A C 1 I ( 2 ) / ( L C C V I + J A C V I + K B C V I > * ( K B C V I «

1 (KBCVI-JACVI ) ) + 10

WRITE (NUVI ,433) MRRVI, IEDVI. IDDVI, IHDVI . IGDVI , IFDVI.

1 I AC 1 I ( 1 ) , IAC2I ( 1 , 4) , IAC2I ( 1 ,2)

P0431020

P0431030

p 6 4 3 1 0 4 6

P0431050

P0431060

P0431070

p Q 431080

P0431090

P 0 43 1 1 0 0 P0431 1 1

0

P 0 4 3 1 1 2 0 P0431 130

P 0 4 3 1 1 4 0 P0431 150

P0431 160

P0431 170

P0431 180

P0431 190

P0431200

P 0 4 3 1 2 1 0 P 0 43 122 0 P0431230

P0431240

P0431250

P 0 4 3 1 2 6 0 P0431270

P 0 4 3 1 2 8 0 P0431290

P 0 4 3 1 3 0 0

P 0 43 1 3 1 0 P 0 4 3 1 3 2 0 P0431330

P 6 431 340

P0431350

P0431360

P0431370

C * * t

c * * *

C * * *

c * * *

IEDVI = IDDVI = IHDVI = IGDVI = IFDVI =

C * * *

c * * * EVALUATION MAY PROCEED ACCORDING TO ANY VALID FORMATION

EVALUATION OF INTEGER TERM CONTAINING DIVISION

MRRVI =13

NECVI = 7 KBCVI

LCCVI

IGDVI

IFDVI

NECVI/KBCVI * LCCVI

LCCVI * NECVI / KBCVI

IAC1 i(i) = IGDVI - 12

IAC1 I (2) = IFDVI - 14

WRITE (NUVI , 43 4 ) MRRV I , I AC1 1(1), IACTil 2)

** FORMAT STATEMENTS FOR THIS SEGMENT

FORMAT ( / 2X , 4HTEST , 14, 16)

F0RMAT(/2X, 4HTEST, 14, 16/ 116/ 116)

FORMAT (/2X, 4HTEST , 14 , I 6/6( 11 6 / ) , 11 6

)

F0RMAT( /2X, 4HTEST. 14, I 6 / 1 1 6 / 2X . 3 5 H THE ANSWERS ABOVE SHOULD BE 0 1F0R/31H THIS SEGMENT TO BE SUCCESSFUL)

** END OF TEST SEGMENT 043

** WHEN EXECUTING ONLY SEGMENT 043, THE STOP AND

** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C

1 AND 2 REMOVED".

STOP

END

STOP

END

SEQUENCEP0 43 1 3 8 0 P0431390

P 043 1400

P0431 41

0

PO 43 1 42 0 P0431430

P0431 440

P0 43 1 4 5 0 P0431 460

P0431470

p 043 148 0 P0431490

P0431 500

PO 43 1 5 1 0 P 0 4315 2 0 P043 1 530

P043 1 5 40

P043 1 5 5 0 P 0 4 3 1 5 6 0 P0431 570

P0431 580

P0431 590

C * * * 431

432

433

43 4

C * * *

C * * *

c * * * END CARDS

IN COLUMNS

C * * * c=

c= P0431600

P043C1

P043C2

*****t**t*t***t*f*P0560010

PO 5 0 0 02 6 P0500030

PO 5 0 00 40

**t***»**ttt*t***tP0 50p050

ASA RE FPO 5 0 0060

5.1 .3.3P0 5 0 0 0 70

Z*ti * * * Zt*ir * * * C**ir * * * C**ii * * * c**<it**

Ct*tt * * * c**<i * * *

SBB67 - (050)

*************************************************

TEST FORMATION OF SUBSCRIPTS FOR INTEGER

NBS FORTRAN Test Programs Version 1 61
C«***»* AND SINGLE PRECISION ARRAYS IN FORM V,K FORMS

C * * * * *

C *'**'*"* S P E C I F I C A f 1 0 N S SEGMENT 0 5 0

C * * t * *

c * * * * *

c * * * t *

c * * * * *

c * * * * *

WHEN EXECUTING ONLY SEGMENT 050, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

1 AND 2 REMOVED.

P0500080

P0500090

P 0 5 0 0 1 00

P001 1 120

P0011 1 25

P001 1 130

POO 1 1 1 3 5 P001 1 HO

' P001 1 145

P001 1 1 50

POO 11155

P050A1

P 0 5 OA

2

P050A3

POO 11 160

P05001 1

0

POO 7 0 8 4 0 P0070845

POO 70 8 5 0 P0070855

POO 70 860

P050B1

' PO O 70 865

P05001 20

P 0 5 66 1 30

P05001 40

P 0 5 0 0 1 5 0 P05001 60

P0 5 00 1 70

P05001 80

p 6 5 00 1 9 6 P0500200

P 0 5 0 0 2 1 0 P0500220

P 0 5 0 0 2 3 0 P0500240

P 6 5 0 02 5 0 P0500260

PO 5 0 02 70

P0500280

P 0 5 0 0 2 9 0 P0500300

P 0 5 0 0 3 1 0 P0500320

PO 5 0 0 3 3 0 P0500340

PO 5 003 5 0' P0500360

PO 5 003 70

P0500380

PO 5 0 0390

P0500400

PO 5 0 0 4 1 0 P0500420

"' po 5 go

P0500440

) PO 5 0 04 5 0 P0500460

PO 5 00 4 70

P0500480

P 6 5 0 0 4 9 0 P0500500

OP 6 5 0 0 5 1 0 P0500520

P 0 5 0 0 5 3 0 P0500540

PO 5 0 0 5 5 0 P0500560

C= DIMENSION A3S(3,3,3)

C= DIMENSION IAC1 I (5) , IAC2I (2, 7) , AC 1 S ( 2 5 ) ,AC2S(5,6)

C= I NTEGER MCA3I (2,3,3)

DIMENSION A3S(3,3,3)

DIMENSION IAC1 1(5), IAC2I (2

INTEGER MCA3I (2,3,3)

7 ) , AC 1 S ( 2 5 ) , AC2S( 5 ,6)

C t * * *

C t * * *

c * * * *

c * * * *

c * * * *

C t * * * c=

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 (1H1 , 1X.36HSBB67 - (050) SUBSCRIPTS FOR INTEGER/

- 1 6X , 2 1 HAND REAL ARRAYS, V, K//2X.14HASA REF. 5.1.3//2X,

-7HRESULTS)

IAC1 1(5) = 3

I AC2 I ( 1 , 3 ) =4

MCA3I (2,2, 1

)

A C 1 S ( 2 0 > = 1 . 0 AC2S(4, 1 ) = -2. 1E1

-7

A3S(1 .2.2) = -22.

JACVI = IAC1H5)

H H C V S

""="" A C 1 S ( 2 0)

WRITE (NUVI, 502)

IAC2I (1 ,3) • A C 2 S ( 4.1) • JACVI, HHCVSMCA3I (2,2,1)

A3S( 1 ,2,2 )

502

504

FORMAT (// I9//F11 .1 ) JACVI=1

Acvs=i .

6

IAC1 I (JACVI )=10

IAC2I (JACVI ,3)=12

IAC2 I (2 . JACVI )=-6

MCA3 I ( JACVI , JACVI . 3 )

="

MCA3 I (2 , JACVI . JACVI ) = MCA3 I ( JACVI , 3 , JACVI ) = AC1 S( JACVI ) =ACVS

AC2S( JACVI ,2)=3.0

AC2S(5, JACVI ) =60 . OE-1

A3S( JACVI , JACVI ,3) = +1.0

A3S(2, JACVI, JACVI) = +1 .0

A3S ( JACV r, 3 , JACVi j = + 076

NECVI = IAC1 1(1) - IAC2I (1 ,3) - IAC2I (2, 1 ) + MCA3I(1,1, 3) +

1 MDCVIMCA3I (2, 1,1) + MCA3I (1,3,1)

IAC1 I (JACVI ) - IAC2I ( JACVI .3)

MCA3 I (JACVI . JACVT.T) + MCA3 1(2

MCA3 I ( JACVI . 3 , JACVI

)

IAC2I (2, JACVI ) + JACVI , JACVI ) +

HHCVS = AC1S(1) + AC2S(1,2) - AC2S(5,1) + A3S(1,1,3) + A3S(2,1.1

1 + A3S( 1 .3,1)

GGDVS = AC 1 S ( JACVI ) + AC2S ( JACVI , 2 ) - A C 2 S( 5 V JACVI) +

1 A3S( JACVI . JACVI .3) + A3S(2, JACVI, JACVI) + 2 A3S( JACVI . 3 , JACVI

)

WRITE (NUVI. 508) NECVI, MDCVI. HHCVS. GGDVS

FORMAT (// 2(19/) / 2 ( F 1 1 . 1 / ) / 35H THE ANSWERS ABOVE SHOULD BE

1 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 = I N COLUMNS

* 1 AND 2 REMOVED.

508

C * * * *

C * * * t

c * * * t

c * * * t

62 NBS FORTRAN Test Programs Version 1
c=

c = STOP

END

P0500570

P0500580

STOP

END

P050C1

P050C2

c* * * c*** *** P0510020

c* * * c*«*

*** SBB45 - (051)

* * * P051 0030

P051 0040

c* * * Ct**

»**»«*««»«»***t»**t*»*»t*i»«*«t*»««»»»t«**»t»t*»»tttt*ttt««ttit*»t»tP0510050

*** GENERAL PURPOSE ASA REFP0510060

c* * * *** TEST FORMATION OF SUBSCRIPTS FOR INTEGER 5.1.3

*** AND SINGLE PRECISION ARRAYS IN FORM V + K AND V-K

.3P0510070

P051 0080

c* * * * * ** SPECIFICATIONS SEGMENT 051

P0510090

P0510100

c***

c***

* * ** WHEN EXECUTING ONLY SEGMENT 051, THE SPECIFICATION STATEMENTS

P001 1 1 70

P001 1 1 75

C* * * c*«*

** WHICH APPEAR AS COMMENTS, MUST HAVE THE C= IN COLUMNS

** 1 AND 2 REMOVED.

P001 1 180

P001 1 185

c***

c=

* * DIMENSION IAC1I<5),IAC2K2,7>,AC1S<25),AC2S(5,6>,A3S<3,3,3)

P001 1 190

P001 1 195

c= INTEGER MCA3I (2,3,3)

DIMENSION IAC1I(5>.IAC2I<2,7) f AC1S<25),AC2S(5 f 6),A3S<3,3,3>

P00 1 1 200

P051A1

c * * * INTEGER MCA3I (2,3.3) P051A2

P001 1205

c * * *

c * * *

** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P05101 10

P0070870

c * * *

c * * *

** WHEN EXECUTING ONLY SEGMENT 051, THE FOLLOWING STATEMENT

** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P0070875

P0070880

c * * * c= NUVI = 6

P0070885

P0070890

NUVI = 6

c * * * * * P051B1

P0070895

511

WRITE (NUVI, 511)

FORMAT (1H1 , 1X.36HSBB45 - (051) SUBSCRIPTS FOR INTEGER/

PO 5 1 0 1 20

P0510130

-16X 1 U A ( L24HAND ~ M n n y REAL i \ L_ r\ i_ ARRAYS nH lin 1 w i V+K * IX | V-K//2X » FX / # fc» r\ § 16HASA lull # \ kJ / i REF i \ L. i 5 1 3 3//2X

-7HRESULTS)

PO 5 1 0 1 40

P0510150

JACVI =4

IAC1 I (JACVI+1 )=1

PO 5 1 0 1 60

PO 5 1 0 1 70

IAC1 I ( JACVI-1 )=2

IAC2I ( JACVI-2. 1 )=3

P051 01 80

PO 5 1 0 1 90

IAC2I ( JACVI-2. 2)=4

IAC2I (2. JACVI+ 3 )=5

P0510200

P0510210

IAC2K1 , JACVI -0 ) = -3

AC1S( JACVI+1 )=1 .0

P0510220

P0510230

AC 1 S ( JACVI-1 ) = 2.0

AC2S( JACVI+0. 1 )=3.0

P0510240

P0510250

AC2S( JACVI-2, 2)=4.0

AC2S(2. JACVI+ 2 )=5.0

P0510260

P0510270

AC2S(1 . JACVI -0 > = -3.0E0

NECVI=IAC1I(5)+IAC1I(3)+IAC2I(2,1)+IAC2I(2.2)

P0510280

P0510290

-+IAC2I(2.7)+IAC2I(1,4)-12

KBCVI = IAC1 I ( JACVI+1 ) IAC1 I (JACVI-1 ) + I AC2 I ( JACV 1-2,1) + P0510300

PO 5 1 03 1 0

1 IACZK JACVI-2, 2) + I AC2 I ( 1 , JACV I -0 ) + I AC2 I ( 2 , JACV I +3 ) - HHCVS = AC1S(5) + AC 1 S < 3 ) + AC2SU.1) + AC2S(2.2) + AC2S(2,6) + 12P0510320

P0510330

1 AC2S( 1 ,4) - 12.0

GGDVS = AC1 S( JACVI + 1 ) + AC 1 S ( J ACV I - 1 ) + AC2S ( JACVI +0 , 1 ) + P0510340

P0510350

1 AC2S( JACVI-2. 2) + AC2S ( 2 , JACVI +2 ) + AC2S ( 1 . J ACV I - 0 ) - 12

JACVI = 2 .0P0510360

P0510370

MCA3 I ( JACVI , JACVI +1 , 1 ) = 12

M CA3 1(1, JACVI + 1 .3) = -4

P0510380

P0510390

MCA3I (1 .2. JACVI+0) = +2

MCA3I (JACVI-1 . 1 , JACVI-1 ) = -6

P0510400

P051 041

0

MCA3I ( JACVI , JACVI-0,2) = 15

MCA3I (2. JACVI-1 , JACVI-1 ) = -11

P0510420

P0510430

MCA3I ( JACVI-0. JACVI+1, JACVI+0) = -8

MCA3I ( JACVI . JACVI + 1 , JACVI + 1 ) = M CA3 I ( J A C V I , J ACV I + 1 , 1 ) + P0510440

P0510450

1 MCA3I ( 1 . JACVI + 1 ,3) + MCA3K1 .2, JACVI + 0) + 2 MCA3 I ( JACVI-1 , 1 , JACVI -1 ) + MCA3 I ( JACVI , JACVI -0 , 2 ) + P0510460

P0510470

NBS FORTRAN Test Programs Version 1 63
3 MCA3M2, JACVI-1 . JACVI-1 ) MCA3 I ( JACVI -0 , JACVI 1 , JACVI + 0 ) P05 1 0480

A3S< JACVI+1 ,

1 f 1 > = 12.0 P0510490

A3S(1 . JACVI *1 .3) = -4.0 P0510500

A3S< 1 ,2, JACVI +0 > = +2.0 P05 1 05 1 0 A3S( JACVI-1 , 1 . JACVI-1 ) = -6.0 P0510520

A3S( JACVI+1 , JACVI-0,2) = 15.0 P0510530

A3S<2 . JACVI-1 , JACVI-1 ) = -11 . 0 P 6 5 1 0 5 40

A3SUACVI-0, JACVI + 1 .JACVI + 0) = -8.0 P0510550

A3S( JACVI + 1 , J A CVI + 1 , JACVI + 1 ) = A3S ( JACVI + 1,1,1) + P 0 5 1 0 5 6 0

1 A3S ( 1 , JACVI + 1 .3) + A3S(1 .2. JACVI + 0) + P0 5 1 0 5 70

2 A3S( JACVI -1 , 1 , JACVI-1 ) + A3S( JACVI + 1 .JACVI-0,2) + P 0 5 1 0 5 80

3 A3S<2, JACVI-1 , JACVI-1 ) + A3S(JACVI-0, JACVI+1 , JACVI+0) P0510590

WRITE ( NUVI ,51 5 ) ME CVI , K B C V I , M C A 3 I (2,3,3) ,HHCVS,GGDVS, A3S (3 , 3 , 3 ) PO 5 1 0600

515 FORMAT ( / / 3 ( I 9 / ) / 3 ( F 1 1 . 1 / ) / 3 5 H THE ANSWERS ABOVE SHOULD BE 0 F0R/P0 5 1 06 1 0

1 31 H THIS SEGMENT TO BE SUCCESSFUL) P0 5 1 062 0 C***** END OF TEST SEGMENT 051 P0510630 „.„..„_ WHEN EXECUTING ONLY SEGMENT 051, THE STOP AND END CARDS P05 1 0640

C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0510650

C

********

1 AND 2 REMOVED. PO 5 1 0660

C= STOP P0510670

C= END P 0 5 1 0 6 8 0 STOP P051C1

END P051C2

C***********************************************************************P0520010

C* *'*'* * PO 5 20 020

C***** SBB13 - (052) P0520030

C ******

* PO 520 040

C***********************************************************************P0520050

C « GENERAL PURPOSE ASA REFSP0520060

C** «** TEST FORMATION OF SUBSCRIPTS FOR INTEGER 5 . 1 . 3 . 3 P 0 5 2 0 0 7

0

C**'*"*"*** AND SINGLE PRECISION ARRAYS P0520080

C***** FORM C*V, C*V-K. C*V+K P0520090

C*'* '* *

'* p o 5 g o i 6 6 C***** SPECIFICATIONS SEGMENT 0 52 P 0 5 2 0 1 1 0

C * * * * * P 6 6 1 1210

C**«** WHEN EXECUTING ONLY SEGMENT 0 52, THE SPECIFICATION STATEMENTS P 0 0 1 1 2 1

5

C * * * * * WHICH APPEAR AS COMMENTS , MUST HAVE THE C= IN COLUMNS P 0 0 1 1 2 2 0 C***** 1 AND 2 REMOVED. P 0 0 1 1 2 2 5 C * * * * * POO 1123 0 C= DIMENSION I AC1 I ( 5 ) , I AC2 I (2 , 7) , AC1 S(25 ) , A3S(3 , 3 , 3) , AC2S( 5 . 6) P 0 0 1 1 2 3 5 C= INTEGER MCA3I (2,3,3) P 0 0 1 1 240

DIMENSION IAC1 I (5) , IAC2I (2, 7) , AC1S(25 > , A3S(3,3.3) ,AC2S<5 ,6) P052A1

INTEGER MC A3 I (2,3,3) P0 52A2

C***** POO 1 1245

C * * * * * 0 U f P U f t A P E ASSIGNMENT STATEMENT. NO INPUT TAPE. P 05 2 0120

C***** P0070900

C*«*** WHEN EXECUTING ONLY SEGMENT 0 5 2 , THE FOLLOWING STATEMENT P0070905

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070910

C*«*** POO 709 1 5 C= NUVI = 6 P0070920

NUVI = 6 P0 5 2B1

C***** P0070925

WRITE (NUVI ,520) PO 52013 0

5 20 FORMAT ( 1 H 1 , 1 X , 3 6HS BB 1 3 - ( 052 ) SUBSCRIPTS INTEGER AND / P0 520 1 40

-16X.23HREA L . C * V . C*V-K, C * V + K / / 2 X , 1 6 H AS A RE F . 5,1.3. 3//2X, P 0 5 2 0 1 5 0 -7HRESULTS) P0520160

JACVI =2 PO 5 20 1 70

KACVI= 1 P0520180

LCCVI = -2 PO 52 0 1 90

IAC1 I (2* JACVI )=1 P0520200

IAC2I (1 * JACVI , 1 ) = 2 PO 5202 1 0 IAC2I (1 ,3*KACVI ) = 3 P0 5 20220

AC1S(2* JACVI ) = 1 .6 p 6 52023 0 AC2S( 1 * JACVI , 1 ) = 2 . 0 P0520240

AC2S(3. 3*KACVI ) = 30 .E-1 PO 5 202 5 0 MDCVI = IAC1 I (2* JACVI ) + I AC2 I ( 1 * JACV I

, 1 ) + I AC2 I ( 1 , 3 * KACV I ) - 6 P0 5 20260

N E C V I = I A C 1 1(4) +IAC2I (2 , 1) + I A C 21 ( 1,3) - 6 P 0 5 2 0 2 7 0 GGDVS = AC 1 S ( 2 * JACVI ) + AC2S ( 1 * J ACV I . 1 ) + AC2 S ( 3 . 3 * K ACV I ) - 6.0 P0 52 028 0

64 NBS FORTRAN Test Programs Version 1
HHCVS = AC1 S ( 4 > AC2S(2, 1 ) AC2S<3,3) - 6.0 P0520290

WRITE ( NUVI . 524 > MDCVI. NECVI , GGOVS, HHCVS P0520300

524 FORMAT (//2( I9/)/2(F1 1 .1/))

IAC1 I (2* JACVI+1 ) = -6

P0520310

P0520320

IAC1 I (1 * JACVI-1 ) = -4 P0520330

IAC2I ( 1 * JACVI-1 ,2)=3 P0520340

IAC2I (2* JACVI-3, 1 ) = 4 P0520350

IAC2I (2. 1 * JACV I +4 ) =2 P0520360

IAC2I ( 1 .3* JACV I -2 > = 1 P0520370

AC1S(2*LCCVI+9) = -6.0 P0520380

AC1S(1*LCCVI+3) = -4.0 P0520390

AC2S(1*LCCVI+3,2) = 3.0 P0520400

AC2S(2*JACVI+0,3)=4.0

AC2S(3.1*JACVI+3)=2.0

"A C 2 S < 3 , 3 * J A C V I - 2 ) = 1 .6

MDCVI = I AC 1 I ( 2 * J ACV I + 1

)

1 IAC2I (

1 *KACVI+0, 1

)

2 IAC2I (1 . 3 * JACV I -2 > NECVI = IAC1 1(5) + IACii(1)

- + IAC2I ( 1,1) + IAC2I (2,6)

GGOVS = AC IS < 2 * JACVi + i

)' +

1 AC2S(2* JACVI+0.3)

HH C VS = AC I S ( 5 ) + A C 1 S ( 1

)

-+ AC2S(4,3) + AC2S(3.5) + WRITE (NUVI. 524) MDCVI

.

MCA3I (2*KACVI ,1.1) = -1

MCA3I (2,2*KACVI .2) = -2

MCA3 I ( 1 , 1 . 1 * KACV I ) = -3

MCA3I ( 1 * K A C V I + 1 ,2.3) =

1

M CA3 I ( 2 . 1 * KACV I +2 , Z ) = 2

• IAC1 I ( 1 * JACVI-1 ) + IAC2I ( 1 * JACVI-1 ,2)

IAC2I (2,2* JACV I +2 ) +

P0 5204 1 0 P0520420

P 0 5 2 0 4 3 0 +P0520440

P 0 5 2 0 4 5 0 P0520460

F> 0 5 2 0 4 7 0 P0520480

PO 520 490

P0520500

PO 520 5 1 0 P0520520

"" P 0 5 2 0 5 3 0 P0520540

" PO 5 20 5 5 0 P0520560

P 0 5 2 0 5 7 0 P0520580

P 0 5 2 0 5 9 0 P0520600

P 0 5 2 0 6 1 0 P0520620

P0520630

P0520640

2,3)P0520650

P0520660

"PO 5 206 70

P0520680

PO 5 20690

P0520700

PO 5207

1 0 P0520720

PO 520730

P0520740

P 6 5 20 7 5 0 P0520760

P 0 5 2 0 7 7 6 P0520780

+ P 6 520796

P0520800

+P052081

0

P0520820

P0520830

P0520840

p 6 5 208 5 0 P0520860

P0520870

P0520880

PO 520 890

P0520900

P0 5 2 09 1 0 P0520920

PO 5 2 0930

P052C1

P052C2

IAC2I (1 ,2)

+ IAC2I ( 1,4)

AC 1 S ( 1 * JACV I - 1 ) AC2S(i * JACVI-1 ,2)

+ AC2S(3. 1 * JACVI +3 ) + AC2S ( 3 , 3 * JACV

I

+ AC2S( 1 .2)

AC2S(3,4)

HHCVS

2)

NECVI. GGDVS

M C A3 I ( 1 .2,3 * KACVI +0 ) = 3 MCA3I ( 4 * KACV I - 2 , 1 ,3) = 40

M CA3 I ( 1 , 6 * K ACV I - 3 , 2 ) = 5 MCA3K2,3,10*KACVI-9> = -40

M CA3 I ( 2 * K A CVT, 5 *KACVT-4 , 2 * K A C V I + 0 ) = - 5 MCA3I (1 *KACVI-0,3,2*KACVI + 1 ) = M CA3 I ( 2 * KACV I

, 1 , 1 ) +

1 MCA3I (2,2*KACVI ,2 ) MCA3I ( 1,1, 1 *KACVI ) M C A 3 I <

1 « K A C V I + 1

,

2 + MCA3 I ( 2 , 1 * KACVI +2 , 2 ) + M CA3 I ( 1 , 2 , 3 * K ACV I + 0

)

3 + MCA3I (4*KACVI-2, 1,3) + M C A3 I ( 1 , 6 * KACV I - 3 , 2

)

4 + MCA3I (2,3, 10*KACVI-9) + M CA3 I ( 2 * KAC V I , 5 * KACV I - 4 , 2 * K ACV I + 0

)

A3S(3*KACVI , 1 ,1 ) = -1.0

A3S(2,2*KACVI ,2) = -2.0

A3S( 1 , 1 , 1 * KACV I ) = -3.0

A3S ( 2 * KACV I + 1 ,2,3) = 1.0

A3S(3. 1 * KACV I +2 . 2 ) = 2.0

A3S(1 , 2 , 3 * KACV I +0 ) = 3.0

: 40.0

5.0

= -40.0

4,2*KACVI+0) = -5.0

A3S ( 1 * K A C V I - 6 , 3 , 2 * KACV i + 1 ) = A3S < 3 * K ACV i .

i

1 A3S( 1 , 1 , 1 *KACVI ) + A3S(2*KACVI+1 ,2,3)

2 A3 S < 1 ,2,3* KACVI + 6 ) + A3 S ( 4 * KACV I - 2 , 1,3 ) + A 3 S ( 1 , 6 * K A C V I - 3

,

3 A3S(2,3. 1 0 * KACV I - 8 ) + A3 S ( 3 * K ACV I , 5 * K ACV I - 4 , 2 * K ACV I + 0

)

WRITE (NUVI ,525) MCA3I ( 1,3,3), A3S( 1 ,3,3)

525 FORMAT (//I9 // F11.1 ) WRITE (NUVI, 527)

527 FORMAT (// 35H THE ANSWERS ABOVE SHOULD BE 0 FOR/

1 31 H THIS SEGMENT TO BE SUCCESSFUL)

C***** END OF TEST SEGMENT 052

C**«** WHEN EXECUTING ONLY SEGMENT 052. THE STOP AND END CARDS

C*«*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS

C'****'* 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

A3S(4*KACVI-2, 1,3)

A3S ( 1 , 6* KACVI -3,2)

A3S(2 . 3 , 1 0 * K A C V I - 8 ) A3S(3*KACVI , 5 * KACV

I

1 ) + A3S(2,2*KACVI

,

A3S(3, 1 * KACVI + 2.2)

2 )

2 )

C********************t************************^

NBS FORTRAN Test Programs Version 1 65
C***** P0530020

C * * * * * SBF1 7 - (.0.5.3 ) P 0 5 3 0 03 0

C't"*"*"*"* P 0 5 3 0 0 4 0 C*****t**t**»*»*************«************************************»******P0530050

C

*"*"*"*"

* p 0530 0 6 0 C****» GENERAL PURPOSE ASA RE F P0 530 070

C:'*"*"*"'*"* TEST FORMATION OF SUBSCRIPTS FOR DOUBLE PRECISION 5.1.3.3 P 0 5 3 0 0 8 0 Ct**t* ARRAYS P0530090

C

*"*"*"*

* F 0 RMS V. K , C*"V",' C * V-K , C * V + K , V + K , V-K P0530100

C****« P 0 5 3 0 1 1 0

C *"*"*"*"* S P E C I F I C A f 1 0 N S SEGMENT 053 P 0 5 3 0 1 2 0 C*t**» P 0 0 1 1 2 5 0 C *"'*'*"** WHEN EXECUTING ONLY SEGMENT 053. THE SPECIFICATION STATEMENTS P 0 0 1 1 2 5 5 C*t*** WHICH APPEAR AS COMMENTS. MUST HAVE THE C= IN COLUMNS P 0 0 1 1 2 6 0

C

"*'"*"»'"*"»

1 AND 2 REMOVED'. POO 1 1 265

Ctt**t PO0 1 1 270

C"= DOUBLE PRE CIS i ON AC ID ( 1 0) . B C2D ( 7 , 4 ) , C C3 D < 7 . 2 , 2 ) , EP 1 D < 43 ) , POO 1 1 275

C= 1 VTAVD , WTAVD , AADVD P 0 0 1 1 2 8 0 DOUBLE PRECISION AC1D<10).BC2D(7,4),CC3D(7,2,2),EP1D(43), ' P053A1

„_1 VTAVD, WTAVD, AADVD P053A2

P 0 0 1 1 2 8 5 C***«* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0530130

CTttT* P0070930

C****» WHEN EXECUTING ONLY SEGMENT 053. THE FOLLOWING STATEMENT P0070935

C* *"*"*'* NUV I = 6 MUST HAVE THE C= I N COLUMNS 1 AND 2 REMOVED. PO 070940

C«**** P0070945

C'i NUV I = 6 P 0 0 709 5 0 NUVI = 6 P053B1

C * *"*'*» P 0 0 7 0 9 5 5 WRITE (NUVI, 530) P0530140

530 FORMAT ( 1 HI , 1 X , 33HSBF 1 7 - ( 053 ) SUBSCRIPTS FOR D . P . / P 0 5 3 0 1 5 0 -16X. 17HARRAYS, ALL F 0 R MS / / 2X , 1 8 H AS A REF. - 5 . 1 . 3 . 3 / / 2X . 7HRESULTS ) P0 530 1 60

NACVI = 10 P 0 5 3 0 1 7 0

J ACV I = 1 P0530180

KACVT=+2 PO 5301 90

LCCVI = -1 P0530200

EP1 0 ( 10) = 1 . 00 P 0 53 02 1 0 BC2D(6,3)=4.0D0 P0530220

CC 3D ( 4 , 1 , 1 ) = - 6 0.00- 1 P 0 5 3 0 2 3

0

AC1D( JACVI )=30 . OD- 1 P 0 5 3 0 2 40

B C 2 D ( J A CV I , 3 ) = 1 . 0 D 0 P 0 5 3 0 2 5 0 CC3D( JACVI . 1 , 1

) =2 . ODO P0530260

BC2D(3. JACVI ) = 5.0D0 P 6 5 3 02 70

CC3D(2,. JACVI , 1 ) = -2.0D0 P0 53 02 8 0

C C3D ( 3 . 2 . JACVI ) = . 40 1 P 0530290

VTAVD = EP1D(10) + BC2D(6,3) + CC3D(4,1,1) + AC1D(1) P0530300

- + BC2D (1,3) + CC3D( 1 . 1. 1 ) ' BC2D(3. 1 ) + CC 3D ( 2 . 1.1) P 0 5 3 0 3 1 0 - + CC3D(3,2. 1 ) - 12. ODO P0 5 3 03 2 0 AADVD = E P 1 D ( 1 0 ) + AC1D( JACVI ) B C2 D ( J ACV I . 3 ) + BC2D(6.3) + P0 5 3 0330

1 CC3D(4,1.1) CC3D( JACVI . 1 . 1 ) + BC2D(3, JACVI) + P0530340

2 CC3D(2, JACVI . 1 ) + C C3D ( 3 , 2 . J ACV I ) - 12. ODO P 6 5 3 0 3 5 0 AC1D(3*JACVI)=-0.6D+1 P0530360

A C 1 D ( 3 * JACVI -2 ) = 70 . OD-i ' P0 5 3 03 70

AC 1 D ( 5 * J ACV I +3 ) = 1.0D0 P0 5 3 03 8 0 AC 1 D (JACVI +3) = 1 . ODO PO 5 3 0390

AC 1 D (NACVI-3) = -1.0D0 P0 53 0400

BC2 D(6* JACVI .2*KACVI-T) = 2 . 000 P 0 5 3 0 4 1 0 BC2D(8*JACVI-2.1*LCCVI+5) = 10. ODO P0530420

CC3D (3 * J AC V I ,2 . 4 * K A C V I - 6 ) = -8 ODO PO 5 3 0430

CC3D ( 10* JACVI-3. 1 . 1 *LCCVI + 3> = -6. ODO P0 5 30 440

WTAVD = AC Wif) + AC1D( 1 ) + AC 1 0(8 ) * BC 20(6,3) P0 5 3 0 4 5 0 -BC2D(6.4) + CC3D(3.2,2) + CC3D(7,1,2) + AC1D(4) + AC1D(7) P0530460

CC3D(2*KACVI+1 , NACVI -8 . 2* JACVI ) = AC1D(3* JACVI ) P0530470

1 AC1 D ( 3 * JACVI -2 ) + AC 1 D ( 5 * JACVI+3) + AC 1 D ( J ACV I +3 ) P05 30 480

2 A C 1 D ( N ACV I -3 ) + B C 2D (6 * JACVI ,2 * K ACVI -T) P 0 5 3 0 4 9

0

3 BC20(8*JACVI-2. 1 * JACVI+3) + C C3D ( 3 * J A CV I . 2 . 4 * KACV I -6 ) + P0 530 5 00

4 CC3D( 10* JACVI -3,1,1* JACVI + 1) PO 5 30 5 1 0 WRITE (NUVI. 531) VTAVD. WTAVD. AADVD. CC30(5.2,2) P0530520

66 NBS FORTRAN Test Programs Version 1
531 FORMAT < / / 4 ( D 1 8 . 5 / ) / 35H THE ANSWERS ABOVE SHOULD BE 0 FOR/ P0530530

„..„.._

1 31H THIS SEGMENT TO BE SUCCESSFUL) P0530540

ENQ 0F TEST segment 053' P 0 53 05 50

C**«** WHEN EXECUTING ONLY SEGMENT 053, THE STOP ANO END CARDS P0530560

c * * * * * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = IN COLUMNS P0530570

c * * * * * 1 AND 2 REMOVED. P0530580

c= STOP P0530590

c= END P0530600

STOP P053C1

END P053C2

c*«*** ********************************************** * t * *************** * *P0 5 40 0 1 0 c«**** P0540020

c**«** SIMIF - (054) P0540030

c*«*** P0540040

c***** ******************************************************************P0540050

c****« GENERAL PURPOSE ASA REFSP0540060

C*«*** TO TEST ARITHMETIC IF STATEMENT 7.1.2. 2 P0540070

C***** AND LOGICAL IF FOLLOWED BY GO TO 7.1.2. 3 P0540080

C***** SO THAT THESE STATEMENTS MAY BE USED 4.2 P0540090

C***«* IN SUBSEQUENT TEST SEGMENTS. P05401 00

it**** P0 5 40 1 1 0 c***** ARITHMETIC EXPRESSIONS ARE - P0540120

c*«*** INTEGER VARIABLE P0540130

c«  INTEGER VARIABLE + OR - A CONSTANT P05401 40

c** **« LOGICAL EXPRESSIONS ARE - P0 5 40 1 5 0 C***** LOGICAL VARIABLE P0540160

c***** .NOT. LOGICAL VARIABLE P05401 70

c***** P0540180

c«  SPECIFICATIONS SEGMENT 054 P05401 90

c** «** P001 1 290

c***«* WHEN EXECUTING ONLY SEGMENT 054, THE SPECIFICATION STATEMENTS P001 1295

c***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = P001 1300

c***** IN COLUMNS 1 AND 2 REMOVED. P001 1305

c***«* P001 131 0 c= LOGICAL LVB, L1BC10), LNVB

LOGICAL LVB, L 1 B < 1 0 > , LNVB

P001 131 5 P054A1

c * * * * * P001 1320

c * * * * * OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0540200

c * * * * * WHEN EXECUTING ONLY SEGMENT 054. THE FOLLOWING STATEMENT P0070960

c * * * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0070965

C * * * * * P0070970

c= NUVI = 6 P0070975

NUVI = 6 P054B1

WRITE(NUVI ,7540) P054021O

IVI = -8 P0540220

JVI = 0 P0540230

KVI = 2 P0540240

MVI = -4 P0 5 402 5 0 LVB = .TRUE. P0540260

LNVB = .FALSE. P0540270

c * * * * * LOGICAL ARRAY L1B SHOULD CONTAIN ALL .TRUE.

NVI = 1

IF TEST IS CORRECT P0540280

P0540290

IF ( IVI ) 541 . 542. 542 P0540300

544 IF (JVI) 542. 541. 542 P0540310

545 IF (KVI) 542.542. 541 P0540320

C t * * * * 2ER0 IS NEITHER POSITIVE NOR NEGATIVE P0540330

546 NAVI = IVI * JVI

IF (NAVI) 542. 541. 542

P0540340

P0540350

547 NAVI = JVI * MVI

IF (NAVI) 542. 541. 542

P0540360

P0540370

548 NAVI = JVI / MVI

IF (NAVI) 542, 541. 542

P0540380

P0540390

549 IF (MVI + 4) 542, 541, 542 P0540400

7543 IF (KVI - 2 ) 542 . 541 . 542 P054041

0

c * * * * * LOGICAL IF FOLLOWED BY GO TO P0540420

7544 IF (LVB) GO TO 541 P0540430

GO TO 542 P0540440

7545 IF (.NOT. LNVB) GO TO 541 P0540450

NBS FORTRAN Test Programs Version 1 67
542 L 1 B C N V I > = .FALSE. P0540460

GO. TO 543 P0540470

541 LTbINVI) = .TRUE. PO 5 40480

543 NVI = NVI + 1 P0540490

GO TO (544,544 , 545 , 546 . 547 , 548 , 549 . 7543 , 7544 , 75 45 , 75 46 ) . NVI PO 5 40 5 66

7546 WRITE ( NUVI 7.541 ) L1B P05 40 5 1 0 WR if E (NUVI .75 42) P0540520

7540 FORMAT (2H1 f 3 0 H S I M I F - ( 054 ) SIMPLE ARITH. IF/19X.14HAND LOGICAL P0 5 40 530

IF//20H ASA REF. - 7.1.2.2/ 13X. 7H7.1.2.3 //9H RESULTS)

7541 FORMAT (/L4)

7542 FORMAT </36H THE TEN ANSWERS ABOVE MUST BE TRUE)

C***tt END OF TEST SEGMENT 054

P0540540

P0540550

p 6 5 AO 560

P0540570

P0540580

P0540590

PO 5 4 06 0 0 P0540610

P 0 5 4 0 6 2 0 P054C1

P054C2

*P0550010

C * * * * *

C t * * * *

c * * * * * c=c=

c * * *

c * * *

C * * *

c

',* * *

C * * *

c * * *

c * * *

c * * *

C * * *

c * * *

c *,**

c * * *

C * * * c=

WHEN EXECUTING ONLY SEGMENT 054. THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 A SO 2 REMOVED.

STOP

END

STOP

END

ttttltttttlltltHtttttitHttttillltHttttlitltlltltttiltHtilttnt

I FABS ( 0 5 5 ) P0550020P0550030

P 0 5 5 0 0 4 0 *tt»«»*t»*«*t«tt»*»it»*t»i*«*tt*«tt»*»*t*»t»t*tt«»i*««»«««»»»t»*t«P0550050

GENERAL PURPOSE ASA REF PO 5 50 060

TEST INTRINSIC FUNCTION ABS.IABS (ABSOLUTE VALUE) 8.2 P0550070

PO 5 5 00 80 OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE. P0550090

WHEN EXECUTING ONLY SEGMENT 055, THE FOLLOWING STATEMENT

P0070980

P0070985

P0070990

P0070995

POO 71 00 0 P055B1

P 6 07 1 005

P0550100

< p 6 5 5 6 i 1

6

P0550120

P 6 5 5 01 30

P0550140

NUVI MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

C * * * * * WRITE (NUVI ,05 50)

0 5 5 0 FORMAT (37H1 I FABS - ( 0 5 5 ) INTRINSIC FUN CT I 0NS-- / 1 OX , 26HABS , IABS

1 ABSOLUTE VALUE)//17H ASA REFS. - 8.2//9H RESULTS)

C*t**« HEADER FOR SEGMENT 055 WRITTEN

C***«* SINGLE PRECISION REAL ARGUMENT

MCGVI = 1 P0 5 5 0 1 5 0 CMAVS = 1.000789 P0550160

CMBVS = -0.2E2 P05501 70

CMCVS = -2.0 P0550180

CMDVS = 2.0 P0550190

CMFVS = -4.0 P0550200

CMEVS = ABS(CMAVS) P 0 5 5 0 2 1 0 CMEVS = CMEVS - 1 .000789 P0550220

WRITE (NUVI, 0557) CMEVS P0550230

CMBVS = ABS(CMBVS) P0550240

CMEVS = CMBVS - 0.2E2 P0550250

WRITE (NUVI. 0557) CMEVS P0550260

CMEVS = 2.0*CMCVS+ABS(2.0*CMFVS+ABS(CMCVS*CMDVS**MCGVI)> P0550270

WRITE (NUVI. 0557) CMEVS P0550280

CMEVS = CM FVS + CMD VS + ABS ( CM CVS + ABS( CMFVS )-ABS( CMDVS -CM CVS)

)

P0550290

WRITE (NUVI, 0557) CMEVS P0550300

0557 FORMAT (/2X.F15.1) P0550310

0558 FORMAT (/2X.37HTHE ABOVE ANSWERS SHOULD ALL BE 0 F0R/2X, P0550320

1 35HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0550330

C « INTEGER ARGUMENT P0550340

MCAVI = 25 P0550350

MCBVI = 4 P0550360

MCCVI = -129 P0550370

MCDVI = -2 P0550380

MCEVI = 2 P0550390

MCFVI = IABS(MCAVI) P0550400

MCFVI = MCFVI -25 P0 5 5 04 1 0 WRITE (NUVI. 0551) MCFVI P0550420

68 NBS FORTRAN Test Programs Version 1
MCFVI = IABS(MCDVI+IABS(MCBVI/MCDVI)-IABS(MCEVI** 2))-MCBVI P0550430

WRITE (NUVI.0551) MCFVI P0550440

MCCVi = iABS(MCCVi) P 0 5 50 450

MCFVI = MCCVI - 129 P0550460

WRITE (NUVI ,0551 ) MCFVI P 6 5 504 70

05 5 1 FORMAT < / 1 0 X t I 5 ) P0550480

WRITE (NUVI, 0558) P0550490

C****» END OF TEST SEGMENT 055 P0550500

C

**"*"*'* WHEN EXECUTING ONLY SEGMENT 0 5 5 , THE STOP AND END CARDS P 0 5 5 0 5 1 0 C****» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0550520

C* **"*"* IN COLUMNS 1 AND 2 REMOVED. P0 5 5 0 530

C= STOP P0550540

C= END P 6 5 5 0 5 5 0 STOP P055C1

END P 0 5 5 C2

C******t************************t***t**************t*************«***t**P0560010

C* '**"*"* P 6 5 60 0 2 6

C****» IFFLT - (056) P0560030

C * * * * * PO 5 600 4 0 C»*t»**«**»t**»tt***»t»**»tt*»**«»t*»««»«*»«t««*t«tt»»»*t**ttt*tt»ttt»»«po560050

C GENERAL PURPOSE ASA REF PO 560 060

C***»* TEST INTRINSIC FUNCTION FLOAT (CONVERSION FROM 8.2 P0560070

C"*"*'*** INTEGER TO REAL) (TABLE 3 ) P 0 5 6 0 0 8 0 C « P0560090

C«'»V.» 0 U T PUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P 6 5 6 0 1 00

C** *** P 0 0 7 1 0 1 0 C***T* WHEN EXECUTING ONLY SEGMENT 0 56 , THE FOLLOWING STATEMENT P 6 0 7 1 0 1 5 C*t*** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071020

C * * * * * POO 7 102 5 C= NUVI = 6 P0071030

NUVI =" 6 P0 5 6B1

C***** P0071035

WRITE (NUVI , 0560 ) PO 56 0 1 1 0 0560 FORMAT ( 1 H 1 , 1 X , 3 4H I F F LT - ( 056 ) INTRINSIC FUN CT I ON -

- / 1 6X , P0 560 1 20

1 5HFLOAT/ 2X, 14HASA REF . - 8 . 2 / 2X , 7HRESU LTS ) P 6 5 6 0 1 3 0 C***** HEADER FOR SEGMENT 056 P0560140

C *"**"*"* ARGUMENT IS INTEGER, FUNCTION IS REAL P0 560 1 5 0 MCAVI = 64 P0560160

M CSV I = -512 PO 560 1 70

MCCVI = 2 P0560180

MCDVI = 4 PO 5 60 1 90

MCEVI = 8 P0560200

CMAVS = FLOAT (MCAVI ) PO 5 602 10

CMBVS = CMAVS - 64.0 P0560220

WRITE (NUVI, 0561 ) CMBVS P 0 5 6 0 23 0 CMAVS = FLOAT(MCBVI) P0560240

CMBVS = CMAVS + 512.6 p 6 5 60250

WRITE (NUVI, 0561) CMBVS P0560260

CMB V S = FLOAT ( -2* MCE V I ) + FLOA T ( MCCVI *M CDVI ) * FLO AT (MCE VI / M C DV I ) - P0560 2 7

6

- FLOAT ( M CDV I * * M C CV I ) + 16.0 P0 56028 0 WRITE ( NUV I , 0561 ) CMBVS PO 560290

WRITE (NUVI, 0562) P0560300

WRITE (NUVI, 0563) P0560310

0561 FORMAT (/2X.F15.1) P0560320

0562 FORMAT ( / 2X , 3 7HTHE ABOVE ANSWERS SHOULD ALL BE 6 FOR) P 0 5 6 0 3 3

6

0563 FORMAT (2X.35HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P0560340

C *"t 1 1 * E ND O F TEST SEGM ENIT 056 PO 5 603 5 0 C****« WHEN EXECUTING ONLY SEGMENT 056. THE STOP AND END CARDS P0560360

C*'**»* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0 5 603 70

C***»* IN COLUMNS 1 AND 2 REMOVED. P0560380

C= STOP PO 5 6 0 3 9 0 C= END P0560400

STOP P 0 5 6 C

1

END ; , ; PO 5 6 C 2 C***********************************************************************P05 7 0010

C****« P0570020

C

'* "* ' *"* * I F F I X - ( 0 5 7 ) p 6 5 7 0 0 3 6

C****» P0570040

NBS FORTRAN Test Programs Version 1 69
c * * *

C * * *

c * * * c* * *

c * * *

c * * *

c * * *

C * * * c * * *

C * * * c=

»»»****t**t«**«»*t****»*******t*«t»***«*t»****»t «** »*t«*tt***»»»po570050

* *

GENERAL PURPOSE

TEST INTRINSIC FUNCTION

REAL TO INTEGER)

ASA

I FIX (CONVERSION FROM

RE F P05 70060

8.2 PO 5 700 70

(TABLE 3>P0570080

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

* *

* * ** WHEN EXECUTING ONLY SEGMENT 057, THE FOLLOWING STATEMENT

t"* NUVi = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

* * NUVI = NUVI =

C * * *

0 5 70

C * * *

C * * *

WRITE (NUVI, 0570)

FORMAT ( 1H1 , 1X, 34HI FF IX - ( 0 5 7 ) INTRINSIC

1HIFIX//2X. 14HASA REF. - 8.2//2X.7HRESULTS)

* HEADER FOR SEGMENT 057

* SINGLE PRECISION ARGUMENT , INTEGER FUNCTION

FUNCTI0N--/16X,

CMAVS = 2.4567

CMBVS = -0.2001E2

CM CVS = +5.61E-1

CMDVS = -123.456E0

CMEVS = 7 8 9 . 9 8 7 6 E - 2 CMFVS = 2.0

P0570090

P05701 00

PO O 71 0 40

P0071 045

POO 71 0 50

P0071055

P 0 0 7 1 0 6 0 P057B1

POO 7 106 5 P05701 1

0

4P05701 20

P0570130

P 0 5 7 0 1 4 0 P05701 50

PO 5 701 60

P05701 70

P 6 5 7 01 8 0 P0570190

P 6 5 7 0 2 0 0 P057021

0

PO 5 7 0220

P0570230

P 6 5 70 24 0 P0570250

P0570260

P0570270

PO 5 70280

P0570290

PO 5 703 00

P057031

0

PO 5 7032 0 P0570330

P 0 5 703 40

P0570350

CMGVS = -0.5

MCAVI = I F I X < CMAVS

)

MCBVi = MCAVI -2

WRITE (NUVI, 0571) MCBVI

MCAVI = I F I X ( CMBVS

)

MCBVI = MCAVI + 20

WRITE (NUVI , 0571 ) MCBVI

MCAVI = I F I X ( CM CVS

)

WRITE (NUVI, 0571) MCAVI

MCAVI = I F I X ( CMDVS

)

MCBVI = MCAVI 123

WRITE (NUVI, 0571) MCBVI

MCAVI = I F I X (CMEVS

)

MCBVI = MCAVI - 7 WRITE (NUVI, 0571) MCBVI

MCBVI = IFIX(CMBVS*CMGVS)*IFIX(CMDVS/CMFVS)

- I FIX ( CMBVS»* I FIX( CMFVS)) + 1010

WR I TE < NUVI , 0 5 7 1 ) MCBVI

0 5 7 1 0 5 72

0 5 73

C * t *

c * * t

C t * *

c * * *

C = c=

P0570360

P0570370

PO 5 7038 0 P0570390

WRITE (NUVI, 0572) PO 5 70 40 0 WRITE (NUVI, 0573) P0570410

FORMAT (7 1 OX, 16) PO 5 70 42 0 FORMAT (/2X.37HTHE ABOVE ANSWERS SHOULD ALL BE 0 FOR) P0570430

FORMAT (2X.35HTHIS TEST SEGMENT TO BE SUCCESSFUL.) P 6 5 70 4 4 0 ** END OF TEST SEGMENT 057 P0570450

** WH EN EXECUTING ON L Y SEGM ENT 0 5 7. THE STOP AND END CARDS PO 5 70460

** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0570470

** IN COLUMNS 1 AND 2 REMOVED. P 0 570480

STOP P0570490

P 6 5 70 5 00

P057C1

PO 5 7 CZ

END

STOP

END

C * * *

C * t *

C * * *

C * * *

C * * *

C * * "t

c * * *

c,* * *

c * * *

c * * *

c * * *

C * * *

c * * t

* * IFSGN - (058)

*******************************************t***********t************P0580 010

PO 5 8 0 0 2 0 P0580030

P 0580040

»t«»«»****»*«»»t*t»»»*«****«***t»*»t»t»*«»»*«t««t«««t*«»*»t«i»«i»*«*P05S00 50

* * GENERAL PURPOSE ASA REF P 0 5 8 0 060

** TEST INTRINSIC FUNCTION - SIGN. ISIGN - (TRANSFER 8 . 2 / 3 1 - 3 2 P 0 5 8 0 0 7

0

* * OF SIGN - SIGN OF AZ TIMES ABS(A1 ) ) (TABLE 3 ) P 0 5 8 0 6 8

6

** P0580090

P05801 00

P0071070

P 0 0 7 1 0 7 5 P0071 080

** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

** WHEN EXECUTING ONLY SEGMENT 058, THE FOLLOWING STATEMENT

** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

70 NBS FORTRAN Test Programs Version 1
c * * * * c= NUVI

NUVI

P0071085

P0071 090

P0 5 8B1

P0071095

P 0 5 8 0 1 1 0 P0580120

PO 5 80 130

P0 5 80 U0

PO 5 8 0 1 5 0 P0580160

P 0 5 8 0 1 7 0 P05801 80

P 0 5 8 0 1 9 0 P0580200

P 6 5 8021 0 P0580220

P0580230

P0580240

p 6 5 8 02 5 0 P0580260

p 6 5 8 6 2 70

P0580280

P0580290

P0580300

P 0 5 8 0 3 1 0 P0580320

P 0 5 8 0 33 6 P0580340

P 6 5 8 0 3 5 0 P0580360

PO 5 80370

P0580380

P058039C

P0580400

P 0 5 8 0 4 1 0 P0580420

P 6 5 8 0 4 3 0 P0580440

P0580450

P0580460

P0580470

P0580480

P0580490

P0580500

P0580510

P0580520

P 0 5 80 530

P0580540

PO 5 80 5 5 6 P0580560

P0580570

P0580580

P 0 5 8 0 5 9 0 P0580600

P 0 5 8 0 6 1 0 P0580620

P0580630

P0580640

P 6 5 80 65 0 P0580660

P0580670

P0580680

P0580690

P0580700

P 0 5 8 0 7 1 0 P0580720

P0580730

P058C1

C * * * *

0 5 8 0 WRITE (NUVI. 0 580 ) FORMAT (1H1 ,1X,35HIFSGN - ( 05 8 ) INTRINSIC FUN CT I ONS-- / 1 6X , 24

1 HSIGN, ISIGN (TRANSFER 0 F / 1 6X , 1 4HARGUME NT S I GN ) / / 2X , 1 4HASA RE

F

2- 8.2//2X.7HRESULTS)

C * * * *

C * * * * HEADER FOR SEGMENT 058

ARGUMENTS AND FUNCTION ARE ALL REAL-TYPE (SIGN)

CMAVS = 1.078

CMBVS = -23.0E1

CMCVS = -5.4567

CMDVS = 7.567E-1

CMGVS = +2.6

CMHVS = -4.0

CMI VS = +8.0

CMEVS = SIGN(CMAVS, CMBVS)

CMFVS = CMEVS + 1 .078

WRITE (NUVI, 0581) CMFVS

CMEVS = SIGN( CMAVS, CMDVS)

CMFVS = CMEVS - 1.078

WRITE (NUVI, 0581) CMFVS

CMEVS = SIGN(CMBVS, CMCVS)

CMFVS =" CMEVS" + 23 . OEf

'

WRITE (NUVI, 0581) CMFVS

CMEVS = SIGN( CMBVS. CMDVS)

CMFVS = CMEVS - 23.0E1

WRITE (NUVI, 0581) CMFVS

CMFVS = SIGN(CMGVS,CMHVS)*SIGN(CMHVS,CMIVS)+

: SIGN (SI G N ( CMI VS, CMBVS) ,SIGN( CMHVS , CMGVS ))

WRITE(NUVI ,0581 ) CMFVS

C t * t * * ARGUMENTS AND FUNCTION ARE ALL

MCAVI = 24

MCBVi =" +167

MCCVI = -5980

INTEGER-TYPE (ISIGN)

MCDVI

MCGVI

MCHVi

MCIVI

1 2345

8 MCEVI

MCFVI

WRITE

MCEVI

MCFVI

WRITE

MCEVI

MCFVI

= I S I G N ( M CAV I

, MCBVI

)

= MCEVI - 24

(NUVI, 0582) MCFVI

= I S I G N ( M C B V I .MCCVI

>

= MCEVI + 167

(NUVI, 0582) MCFVI

= ISIGN(MCCVI .MCDVI

)

= MCEVI + 5980

WRITE (NUVI, 0582) MCFVI

MCEVI = I S I G N < M CDV I, MCAVI

)

MCFVI = MCEVI - 12345

WRITE (NUVI ,0582) MCFVI

MCFVI = ISIGN( ISIGN(MCGVI *MCHVi+(2*MCivi ), MCIVI/ MCGVI+ MCCVI)*

1 ISIGN(+8,MCHVI/MCGVI+MCCVI). MCIVI) - MCHVI **Z

0581

0 582

0 5 83

0 5 84

C 1 1 * *

c * * * *

C t * t *

c * * * * c=

c=

WR I TE < NUV I ,0 5 82 )MCFVI

WRITE (NUVI, 0583)

WR I TE < NUV I , 0 5 84 ) FORMAT (/2X.F15.1)

FORMAT (/10X.I5)

FORMAT (/2X.37HTHE A80VE ANSWERS SHOULD ALL BE 0 FOR)

FORMAT (2X.35HTHIS TEST SEGMENT TO BE SUCCESSFUL.)

* END OF TEST SEGMENT 058

WHEN EXECUTING ONLY SEGMENT 058, THE STOP AND

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

I N COLUMNS 1 AND 2 REMOVED

.

STOP

END

STOP

END CARDS

NBS FORTRAN Test Programs Version 1 71
******************************************************************

* GENERAL PURPOSE ASA RE F

* TEST INTRINSIC FUNCTION DABS (ABSOLUTE VALUE OF 8.2

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C * * * *

c * * * *

c * * * *

c * * * *

C * * * *

C * * * *

C * * * *

c * * * *

c * * * *

C * * * *

c"=

END ******************************************************************

IFDAB - (059)

P058C2

• P05900 1 0 P0590020

P0590030

PO 5 90 0 40

*P0590050

PO 5 90060

P0590070

) P 6 5 9 0 0 S 0 P0590090

PO 5901 00

P00 1 1 330

POO 11335

P001 1340

P 0 0 1 1 3 4 5 P00 1 1 3 50

POO 113 5 5 P059A1

POO 1 1360

P05901 10

POO 7 11 00

P0071 1 05

POO 711 10

P00 7 1 1 1 5 P0071 1 20

P059B1

P 0 0 71 125

P0590120

PO 5 90 1 30

P05901 40

PO 590 1 5 0 P0590160

P 0 5 9 0 1 7 6 P0 5 90 1 8 0 PO 5 90 1 90

P0590200

P0590210

P0590220

PO 5 9 02 3

6

P0590240

PO 5 902 5 0 P0590260

P 0 5 9 0 2 7 0 P0590280

P0590290

P0590300

PO 5 90 3 1 0 P0590320

P 0 5 9 0 3 3 0 P0590340

PO 5 903 5 0 P0590360

PO 5 903 70

P0590380

P 0 5 9 0 3 9 0 P0590400

PO 5 9 0 410

P0590420

P0590430

P0590440

PO 5904 5 0 P0590460

PO 5904 70

P0590480

P059C1

P059C2

•P0600010

P0600020

A DOUBLE PRECISION ARGUMENT) (TABLE 3 SPECIFICATIONS SEGMENT 059

WHEN EXECUTING ONLY SEGMENT 059, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

DOUBLE PRECISION DPAVD , DPBVD , DPCVD , DPDVD , DPEVD , DPFVD , DPGVD

DOUBLE PRECISION DPAVD , DP BVD , DP CVD , DPDVD , DPEVD , DP FVD , DPGVD

C * * * *

c * * * *

c * * * *

C * * * *

C * * * *

c * * * * c=

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE.

* WHEN EXECUTING ONLY SEGMENT 059, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI

C * * * *

0590

WRITE (NUVI, 0590)

FORMAT (1H1.1X,34HIFDAB - ( 059 ) INTRINSIC FUN CT I ON- - / 1 6 X

,

1 23HDABS (ABSOLUTE VALUE 0F/16X.16HA D.P. ARGUMENT)/ 2X,

2 1 4 H A S A REF. - 8.2//

32X, 7HRESULTS)

C * * * *

c * * * * HEADER FOR SEGMENT 059 WRITTEN

ARGUMENT AND FUNCTION ARE DOUBLE PRECISION

DPAVD = 1.23 4567890 12 3400

DPBVD = -2.0D0

DPCVD ""= -39.46 8 02 468 1 3 5 7 D -

1

DPDVD = 2.0D0

0591

0 592

0593

C * * * *

c * * * *

c * * * *

c * * * *

c =

c * * * *

c * * * *

DPGVD = -4.0D0

DPEVD = 1 . ODO

DPEVD = DABS (DPAVD)

DPFVD = DPEVD - 1 . 234567890 1 234D0

WRITE (NUVI ,0591) DPFVD

DPEVD = 2.0DO*DPBVD+DABS(DPDVD*DPGVD+DABS(DPGVD/(2.0DO*DPDVD)

- *DPDVD* *2 )

)

WRITE (NUVI, 0591) DPEVD

DPEVD = 3. ODO

DPEVD = DABS(DPCVD)

DPFVD ""=" DPEVD - 3 9.468024681357D-1

WRITE (NUVI, 0591) DPFVD

dpevd = 4 .6 b 6 DPEVD = DPGVD +DPDVD+DABS ( DPBVD+DABS ( DPGVD ) -DABS ( DPDVD-DPBVD )

)

WRITE (NUVI, 0591) DPEVD

WRITE (NUVI, 0592)

WRITE (NUVI ,0593)

FORMAT (/ D22.10)

FORMAT <"/ 3 9 H THE A BO VE ANSWE RS S HO U L D ALL BE 0 FOR)

FORMAT (36H THIS TEST SEGMENT TO BE SUCCESSFUL)

* END OF TEST SEGMENT 059

* WHEN EXECUTING ONLY SEGMENT 059, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END ******************************************************************

72 NBS FORTRAN Test Programs Version 1
c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c=

IFTRN - (060) P0600030

: £0.600040

m»t»t*»tm»»»»«»*iit»»»»»»*««t«**»»»»tt*i»»«*iit»»*t»»ii»it»»t*t*»P06 0 0050

GENERAL PURPOSE ASA REF P0600060

TEST INTRINSIC FUNCTIONS A I NT , INT, AND I D I NT -- 8.2

TRUNCATION (SIGN OF A * LARGEST INTEGER LE ABS(A) ) (TABLE

P0600070

3)P0600080

P 0 6 0 0 0 9 0 P0600100

POO 1 1370

P00 1 1 3 75

POO 113 8 0 P00 1 1 385

POO i 1 390

P001 1 395

P060A1

P001 1 400

PO 60 0 1 1 0 P0 0 7 1 1 30

POO 71 135

P0071 1 40

P 0 0 71 1 4 5 P0071 1 50

P060B1

P0071 1 55

P 0 6 0 0 1 2 0 NT.P0600130

P06001 40

P0600 1 5 0 P 060 6 160

P06001 70

SPECIFICATIONS SEGMENT 060

WHEN EXECUTING ONLY SEGMENT 060, THE SPEC I F I CATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

DOUBLE PRECISION DPAVD , DPBVD . DP CVD , DPDVD

DOUBLE PRECISION DPAVD . DPBVD . DPCVD , DPDVD

C*

e*

c*

c*

c*

c*

c =

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 060, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI

C * * * *

0600

WRITE (NUVI, 0600)

FORMAT (1H1, 1X.34HIFTRN - ( 060 ) INTRINSIC F UN CT I ON -- / 1 OX , 2 9HA

I

1 INT, IDI NT ( f RUN CAT I ON ) / / 1 6H ASA REF. - 8 . 2 / / 2X , 7HRE SU LTS

>

* HEADER FOR SEGMENT 060 WRITTEN

* TEST OF A I NT - REAL ARGUMENT AND REAL FUNCTION

CMAVS = 1 . 999

C * * * *

c * * * *

CMBVS = 999.001 P06001 80

CMCVS = -0.45678 P0600190

CMDVS = -9876.0 P0600200

CMEVS = 1.0 P0600210

CMEVS = AINT(CMAVS) P0600220

CMFVS = CMEVS -1.0 P0600230

WRITE (NUVI, 0601) CMFVS P0600240

CMEVS = 2.0 P0600250

CMEVS = AINT(CMBVS) P0600260

CMFVS = CMEVS - 999.0 P0600270

WRITE (NUVI, 0601) CMFVS P0600280

CMEVS = 3.0 P0600290

CMEVS = AINT(CMCVS) P0600300

CMFVS = CMEVS P06003 1 0 WRITE (NUVI, 0601) CMFVS P0600320

CMEVS = 4.0 P0600330

CMEVS = AINT(CMDVS) P0600340

CMFVS = CMEVS + 9876.0 P0600350

WRITE (NUVI, 0601) CMFVS

WRITE (NUVI, 0603)

C't *"*'*"* TEST OF INT - REAL ARGUMENT BUT INTEGER FUNCTION

MCAVI = 5 MCAVI = INT (CMAVS)

MCBVI = MCAVI - 1

P0600360

P0600370

PO 6 0 0 38 0 P0600390

P 0 6 0 0 4 0 0 P060 04 1 0 WRITE (NUVI, 0604) MCBVI P0600420

MCAVI = 6 P0600430

MCAVI = I NT { CMBVS

)

P0600440

MCBVI = MCAVI - 999 P0600450

WRITE (NUVI, 0604) MCBVI P0600460

MCAVI = 7 P0600470

MCAVI = I NT < CMCVS ) P0600480

WRITE (NUVI, 0604) MCAVI P0600490

MCAVI = 8 P0600500

MCAVI = I NT ( CMDVS

)

P0600510

MCBVI = MCAVI + 9876 P0600520

WRITE (NUVI, 0604) MCBVI P0600530

WRITE (NUVI ,0605) P0600540

C****» TEST OF I D I NT - DOUBLE PRECISION ARGUMENT AND FUNCTION P0600550

NBS FORTRAN Test Programs Version 1 73
DPAVD = 1 . 9999999999999D

1

DPBVD = +99.000500189123D0

P0600560

P0600570

P 0 6 0 0 5 8 0 P0600590

P 0 6 0 0 6 0 0 P06006 1 0 P0600620

P0600630

P0600640

P0600650

P 0 6 0 0 6 6 0 P0600670

P060 0680

P0600690

P 0 6 0 0 7 0 0 P060071

0

P 06 0 0 72 0 P0600730

P 0 6 0 0 7 4 0 P0600750

P0 60 0 760

P0600770

P 0 6 0 0 7 8 0 P0600790

P 0 60 0 8 0 0 P060 08 1 0 P 0600820

P0600830

PO 6 0 0 8 4 0 P0600850

P0600860

P0600870

P 0 6 0 0 8 8 0 P0600890

P060 0900

P060C1

P060C2

* P 06 1 0 0 1 0 P061 0020

P061 0030

P 0 6 1 0 0 4 0 P0610050

PO 610 060

P061 0070

) PO 6 1 0080

P061 0090

P 0 61010 0 P061 01 1

0

P 0 61012 0 P0071 160

P0071 1 65

P0071 1 70

POO 71 1 7 5 P0071 1 80

P 0 6 1 B

1

P0 0 7 1 1 8 5 P061 01 30

. P061 01 40

P061 01 50

P0610160

P 0 6 1 0 1 7 0 P061 01 80

P 06 1 019 0 P061 0200

P 0 6 1 0 2 1 0 P06 1 0220

P06 10230

P061 0240

DPCVD

OPOVD

MCAVI

MCAVI

•0.9876543210198D0

•456.78909876514D1

= 9

I D I NT ( DPAVD ) MCBVI = MCAVI - 19

WRITE (NDVI.0606) MCBVI

MCAVI ="""1 0 MCAVI = I D I NT < DP B VD

)

MCBVI = MCAVI - 99

WRITE (NUVI.0606) MCBVI

MCAVI = 11

MCAVI = I D I N T < DP C VD > WRITE (NUVI.0606) MCAVI

MCAVI = 12

MCAVI' "=I D I NT ( DPDVD ) MCBVI = MCAVI + 4567

0601

06 0 3 0604

06 0 5 0606

0607

0608

WRITE (NUVI.0606) MCBVI

WRITE (NUVI.0607)

WRITE (NUVI .0608)

FORMAT C / F 1 1 .1 ) FORMAT ( 2X.16HEND OF AINT TEST)

FORMAT < / I 1 0 > FORMAT ( 2X.15HEND OF INT TEST)

FORMAT (/MO)

C * * *

c * * *

c * * *

c * * * c=

c=

1 * *

t t

t *

4 *

FORMAT ( 2X.17HEND OF I D I NT TEST)

FORMAT ( 40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/

31 H TEST SEGME NT TO BE SUCCESSFUL)

END OF TEST SEGMENT 060

WHEN EXECUTING ONLY SEGMENT 060, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE 0-

IN COLUMNS

STOP

END

STOP

1 AND REMOVED

END

C* * *

c * * *

C * * *

c * * *

c * * *

c * * *

C * * *

C t * *

c * * *

C * t *

C * * *

c * * * c**»

c * * *

c * * *

c * * * c=

* *

t *

* t

* *

» *

* *

* *

* «

t »

* *

* *

* *

* *

* *

I FMOD - (061 )

1 I t tl 1 I t t t > I I I I til 1 I t I I I t t I II t t t t t I t i I I I t t t I I • I I t I i > I I I > I I l I I t t I I GENERA L PURPOSE ASA RE F TEST INTRINSIC FUNCTION AMOD AND MOD - REMAINDERING. 8.2

WHICH IS DEFINED AS A 1 - ( A1 / A2 ) A2 WHERE (X) IS AN (TABLE 3 INTEGER WHOSE MAGNITUDE IS LE ABS(X) AND WHOSE SIGN

IS THE SAME AS X.

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 0 61. THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 • REMOVED

.

NUVI = 6

NUVI

C * * * * *

0610

c * * * c* * *

1

.,.2

* *

WRITE (NUVI. 0610)

FORMAT (1H1. 1X.34HIFMOD - (061) INTRINSIC FU N CT I 0

N -

- / 1 6X , 2 4HAM0D

MO r (REMAINDERING) /"/ 1 6 H ASA R EF . - 8.2//2X,

7»' A LTS)

HEADER FOR SEGMENT 061 WRITTEN

TEST OF AMOD - REAL ARGUMENTS AND REAL FUNCTION

CMAVS = 16.0625

CMBVS = -4.0

CMCVS = -8.125

CMDVS = 2.5

CMEVS = -1.0

CMFVS =1.0

74 NBS FORTRAN Test Programs Vers ion 1
CMFVS = AMOD ( CMAVS , CMBVS

)

P06 1 0250

CMGVS = CMFVS - 0.0625 P061 0260

WR I TE ( NUVI ,0611) CMGVS P061 0270

CMFVS = 2.0 P061 0280

CMFVS = AMOD ( CM CVS , CMDVS

)

P061 0290

CMGVS = CMFVS + 0.625 P06 1 03 00

WRITE (NUVI, 0611) CMGVS P06 1 03 1 0 CMFVS = 3.0 P06 1 032 0 CMFVS = AMOD ( CMBVS , CMEVS) P06 1 033 0 CMGVS = CMFVS + 0.0 P061 0340

WRITE (NUVI ,0611) CMGVS P06 1 035 0 CMFVS = 4.0 P061 0360

CMFVS = AMOD( CMBVS , CMAVS) P061 0370

CMGVS = CMFVS + 4.0 P061 0380

WRITE (NUVI. 0611) CMGVS P061 0390

WRITE (NUVI , 0612) P061 0400

C***«* TEST OF MOD - INTEGER ARGUMENTS AND INTEGER FUNCTION P061 04 1 0 MCAVI = 35 P061 0420

MCBVI = -5 . P061 0430

MCCVI = -998 P061 0440

MCDVI = 9 P06 1 0 4 5 0 MCEVI = 10 P061 0460

MCFVI = 1 P061 0470

MCFVI = MOD(MCAVI . MCBVI

)

P061 0480

MCGVI = MCFVI + 0 P06 1 0490

WRITE (NUVI, 0613) MCGVI P061 0500

MCFVI = 2 P06 1 0 5 1 0 MCFVI = MOO (MCCVI . MCDVI

>

P06 1 0 52 0 MCGVI = MCFVI + 8 P06 1 0 530

WRITE (NUVI, 0613) MCGVI P06 1 0 5 40

MCFVI = 3 P06 1 0 5 50

MCFVI = MOD(MCAVI .MCDVI

)

P06 1 0 560

MCGVI = MCFVI - 8 P061 0570

WRITE (NUVI.0613) MCGVI P06 1 0 5 8 0 MCFVI = 4 P06 1 0 5 90

MCFVI = MOD(MCBVI .MCEVI

)

P06 1 0600

MCGVI = MCFVI + 5 P061 061

0

WRITE (NUVI.0613) MCGVI P061 0620

WRITE (NUVI. 0614) P0610630

0611 FORMAT (/F11.1) P0610640

0612 FORMAT (77 2X. 1 7HEND OF AMOD TEST. ) P06 1 065 0 0613 FORMAT < / 1 1 0 > P06 1 0660

0614 FORMAT (//2X.16HEND OF MOD TEST. 111%, P06 1 06 70

1 3 8 HAL L ABOVE ANSWERS SHOULD BE 0 FOR THIS/2X, P06 1 0680

230HTEST SEGMENT TO BE SUCCESSFUL.) P0610690

C****» END OF TEST SEGMENT 061 P0610700

C * ***** WHEN EXE CUT I NG ONLY SEGMENT 061. THE STOP AND END CARDS P061 0 7 1 0 C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0610720

C * * * * * IN COLUMN S 1 AND 2 R E MOVED

C= STOP

C= END

STOP

P061 0730

P061 0740

P0610750

P061 C1

END P061 C2

c*** ************************»*******************************************P0620010

c*** P0620020

c**» *« I F MAX - ( 062 ) P0620030

c*«* P0620040

c*«* ********* ********************************************* **************P0620050

c*«* ** GENERAL PURPOSE ASA REF P0620060

c*«* ** TEST OF INTRINSIC FUNCTION AMAXO , AMAX 1 . MAXO . MAX 1 AND 8.2 P0620070

c**« ** DMAX1 -- CHOOSING LARGEST VALUE (TABLE 3)P0620080

c*** P0620090

c*«* ** SPECIFICATIONS SEGMENT 062 P06201 00

c*«* P001 1 41 0 c«** ** WHEN EXECUTING ONLY SEGMENT 062. THE SPECIFICATION STATEMENTS P0011415

c*«* ** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P00 1 1 420

c*«* ** IN COLUMNS 1 AND 2 REMOVED. P00 1 1 425

c*«* P001 1 430

NBS FORTRAN Test Programs Version 1 7 5
C= DOUBLE PRECISION H CAVO . M CBVD . H C CVD . M CDVD , H CE VD . M C F VD

DOUBLE PRECISION MCAVD , M CBVD , M C CVD , M CDVD ,M CEVD , MCFVD

P001 1435

P062A1

C * * * t * C»«*tt Q U T P U T T A P E ASSIGNMENT STATEMENT. NO INPUT TAPE

C * * * * * C***«* WHEN EXECUTING ONLY SEGMENT 062, THE FOLLOWING STATEMENT

C '«"*"*"** NUVi = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C * * * * * C= NUVI = 6

NUVI = 6

C * * * * * WRITE (NUVI ,0620)

P001 1440

P06201 10

PO 071 190

P0071 1 95

P0071200

P0071205

P 0 0 7 1 2 1 0 P062B1

P007121

5

P0620120

0620 FORMAT C1H1,

10.AMAX1 .M-AXO

1 X , 3 5 H I FMAX - ( 062 ) MAX1.DMAX1 / 2X

INTRINSIC FUNCTIONS--/

1 4HASA REF . - 8.2//2X,

C * * * t *

c * * * * * TEST OF AMAXO

TWO ARGUMENTS

0625 )

- INTEGER

FOR AMAXO

ARGUMENTS. REAL FUNCTION

WRITE (NUVI

MCAVI = 128

MCBVI

MCCVI

MCDVI

CMEVS

64

-8

-4096

1 . 0 CMEVS = AMAXO(MCAVI , MCBVI

)

CMFVS = CMEVS - 128.0

WRITE (NUVI ,0621) CMFVS

CMEVS = 2.0

1 3X, 28HAMAXP06201 30

7HRESULTS) P0620140

8.2/19P0620150

P0620160

P06201 70

P0620 1 8 0 P 0 6 2 0 1 9 0 P0620200

P06202 1 0 P0620220

P0620230

P0620240

P 0 62 02 5 0 P0620260

CMEVS = AMAXO(MCCVI , MCCVI ) CMFVS = CMEVS + 8.0

WRITE (NUVI ,062 1 ) CMFVS

CMEVS = 3.0

P0620270

P0620280

P0620290

P0620300

P 0 6 2 0 3 1 0 P0620320

CMEVS = AMAXO ( M C AV I , M C C V I ) CMFVS = CMEVS - 128.0

"WR IT E (NUVI , 0 62 1 ) CMFVS

CMEVS = 4.0

CMEVS = AMAXO ( MCCVI , MCDVI

)

CMFVS = CMEVS + 8.0

WRITE (NUVI ,0621) CMFVS

CMEVS = 5.0

CMEVS = AMAXO (MCDVI , MCBVI

)

CMFVS = CMEVS - 64.0

WRITE (NUVI, 0621 ) CMFVS

MCGVI = 2 WRITE (NUVI, 0622) MCGVI

C*«*** THREE ARGUMENTS FOR AMAXO

CMEVS = 6.0

CMEVS = AMAXO(MCCVI , MCBVI , MCAVI

)

CMFVS = CMEVS - 128.0

WRITE (NUVI ,0621 ) CMFVS

CMEVS = 7.0

CMEVS = AMAXO(MCDVI , MCBVI , MCCVI

)

CMFVS = CMEVS - 64.0

WRITE (NUVI, 0621) CMFVS

P0620330

P0620340

P0620350

P0620360

P 0 6 2 0 3 7 0 P0620380

P 062 03 90

P0620400

P0620410

P0620420

P 0 6 2 0 4 3 0 P0620440

P 6 62 6 4 5 0 P0620460

P0620470

P0620480

P0620490

P0620500

P 0 6 2 0 5 1 0 P0620520

P 06 2 6 5 3 6 P0620540

P0620550

P0620560

P0620570

P0620580

P 0620590

P0620600

P 0 6 2 0 6 1 0 P0620620

P0620630

P0620640

P0620650

P0620660

P0620670

P0620680

CMEVS = 8.0

CMEVS = AMAXO(MCDVI , MCCVI , MCCVI

)

CMFVS V CMEVS + 8.0

WRITE (NUVI, 0621) CMFVS

MCGVI = 3 WRITE (NUVI, 0622) MCGVI

C**« * * FOUR OR F I VE ARGUMENTS FOR AMAXO

CMEVS = 9.0

CMEVS = AMAXO (MCAVI , MCBVI , MCCVI .MCDVI ) CMFVS = CMEVS - 128.0

WRITE (NUVI , 0621 ) CMFVS

CMEVS = 10.0

CMEVS = AMAXO (MCAVI , M C BV I

, M C CV I . M CDV I , M CAV I

)

CMFVS = CMEVS - 128.0

WRITE (NUVI . 062 1 ) CMFVS

WRITE (NUVI. 0623)

76 NBS FORTRAN Test Programs Version 1
C***** TEST OF AMAX1 - REAL ARGUMENTS AND FUNCTION 8 . 2/20P0620690

Cttttt TWO ARGUMENTS FOR AMAX1 P0620700

WRITE

CMAVS

( NUV 1,0624)

= 102. OEO

P062071

0

P0620720

CMBVS

CMCVS

= +76.12

= -85.43E1

P0620730

P0620740

CMDVS

CMEVS

= -0.986

= AMAX1 ( CMAVS. CMBVS)

P0620750

P0620760

CMFVS

WRITE

= CMEVS - 102. OEO

(NUVI, 0621) CMFVS

P0620770

P0620780

CMEVS

CMFVS

= AMAX1 ( CMBVS , CMCVS ) = CMEVS - 76.12

P0620790

P0620800

WRITE

CMEVS

(NUVI ,0621) CMFVS

= AMAX1 ( CMDVS, CMCVS)

P062 08 1 0 P0620820

CMFVS

WRITE

= CMEVS + 0.986

(NUVI, 0621) CMFVS

P0620830

P0620840

MCGVI

WRITE

= 2 (NUVI, 0622) MCGVI

P0620850

P0620860

C***** THREE ARGUMENTS FOR AMAX1

CMEVS = AMAX1 ( CMCVS, CMBVS, CMAVS)

P0620870

P0620880

CMFVS

WRITE

= CMEVS - 102. OEO

(NUVI, 0621) CMFVS

P0620890

P0620900

CMEVS

CMFVS

= AMAX1 (CMDVS, CMBVS, CMCVS)

= CMEVS - 76.12

P062091

0

P0620920

WRITE

CMEVS

(NUVI, 0621) CMFVS

= AM AX 1 ( CMCVS, CMCVS, CMCVS)

P0620930

P0620940

CMFVS

WRITE

= CMEVS - CMCVS

(NUVI, 0621) CMFVS

P0620950

P0620960

MCGVI

WRITE

= 3 (NUVI, 0622) MCGVI

P0620970

P0620980

C***** FOUR OR FIVE ARGUMENTS FOR AMAX1

CMEVS = AMAX1 ( CMAVS , CMBVS, CMCVS, CMDVS)

P0620990

P0621000

CMFVS

WRITE

= CMEVS - 102. OEO

(NUVI, 0621) CMFVS

P062 1 0 1 0 P0621020

CMEVS

CMFVS

= AMAX1 ( CMAVS , CMCVS, CMDVS, CMBVS, CMAVS)

= CMEVS - 102. OEO

P062 1 030

P0621 040

WRITE

WRITE

(NUVI, 0621) CMFVS

(NUVI , 0623 ) P0621 050P0621 060

C***»* TEST OF MAXO - INTEGER ARGUMENTS AND FUNCTION

C***«* TWO ARGUMENTS FOR MAXO

8.2/21P0621070

P062 1 0 8 0 WRITE

MCEVI

(NUVI ,0628)

= MAXO (MCAVI , MCBVI ) P0621 090

P062 1 1 00

MCFVI

WRITE

= MCEVI - 128

(NUVI, 0626) MCFVI

P062 1 1 1 0 P0621 120

MCEVI

MCFVI

= MAXO ( MCCVI , MCDVI ) = MCEVI + 8 P0621 130

P0621 140

WRITE

MCEVI

(NUVI, 0626) MCFVI

= MAXO ( MCBVI , MCCVI ) P062 1 1 5 0 P0621 160

MCFVI

WRITE

= MCEVI - 64

(NUVI, 0626) MCFVI

P062 1 1 70

P062 1 1 80

MCEVI

MCFVI

= MAXO(MCCVI , MCCVI

)

= MCEVI - MCCVI

P0621 190

P0621200

WRITE

MCGVI

( NUV I, 0626 ) MCFVI

= 2 P062 1 2 1 0 P0621220

WRITE (NUVI, 0622) MCGVI

C***«* THREE ARGUMENTS FOR MAXO

P0621230

P0621240

MCEVI

MCFVI

= MAXO(MCCVI , MCBVI , MCAVI

)

= MCEVI - 128

P0621250

P0621 260

WRITE

MCEVI

(NUVI, 0626) MCFVI

= MAXO(MCDVI , MCDVI , MCCVI

)

P062U70

P0621280

MCFVI

WRITE

= MCEVI + 8 (NUVI, 0626) MCFVI

P0621290

P0621300

MCGVI

WRITE

= 3 (NUVI, 0622) MCGVI

P0621 31

0

P0621320

Ct***t FOUR OR FIVE ARGUMENTS FOR MAXO

MCEVI = MAXO(MCDVI ,MCCVI .MCBVI .MCAVI

)

P062 1 330

P0621 340

MCFVI

WRITE

= MCEVI - 128

(NUVI, 0626) MCFVI

P0621350

P0621360

NBS FORTRAN Test Programs Version 1 77
MCEVI = MAXO(MCAVI , MCCVI ,MCBVI . MCDV I .MCBVI ) P0621370

MCFVI = MCEVI - 128 P0621380

WRITE (NUVI, 0626) MCFVI P0621390

WRITE ( NUVI . 0623 ) P0621 400

C***»* TEST OF MAX 1 - REAL ARGUMENTS AND I NTEGER FUNCTION 8.2/22P0621410

C*t**t TWO ARGUMENTS FOR MAX 1 P062 1 420

WRITE ( NUVI ,0629) P0621 430

MCEVI = MAX1 < CMAVS , CMBVS ) P0621 440

MCFVI = MCEVI - 102 P0621450

WRITE (NUVI, 0626) MCFVI P0621460

MCEVI = MAX 1 ( CMBVS, CMCVS) P0621 470

MCFVI = MCEVI - 76 P0621 480

WRITE (NUVI, 0626) MCFVI P0621 490

MCEVI = MAX1 ( CMDVS, CMCVS) P062 1 5 0 0 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***** THREE ARGUMENTS FOR MAX 1 P062 1 5 5 0 MCEVI = MAX1 ( CMCVS , CMBVS , CMAVS) P0621 560

MCFVI = MCEVI - 102 P062 1 570

WRITE (NUVI, 0626) MCFVI P062 1 5 8 0 MCEVI = MAX1 (CMDVS, CMCVS, CMBVS) P0621 590

MCFVI = MCEVI - 76 P0621 600

WRITE (NUVI, 0626) MCFVI P062 1 6 1 0 MCGVI = 3 P0621620

WRITE (NUVI, 0622) MCGVI P0621630

C***t* FOUR OR FIVE ARGUMENTS FOR MAX 1 P062 1 640

MCEVI = MAX1 ( CMAVS, CMBVS. CMCVS, CMDVS) P0621650

MCFVI = MCEVI - 102 P0621660

WRITE (NUVI, 0626) MCFVI P0621670

MCEVI = MAX 1 (CMAVS, CMCVS, CMBVS, CMAVS, CMDVS) P0621680

MCFVI = MCEVI - 102 P0621690

WRITE (NUVI, 0626) MCFVI P0621700

WRITE (NUVI , 0623 ) P0621 71

0

C***** TEST OF DMAX1 - DOUBLE PRECISION ARGUMENTS AND FUNCTION 8.2/23P0621720

C*«*** TWO ARGUMENTS FOR DMAX1 P062 1 730

WRITE (NUVI ,9999) P0621 740

MCAVD = 23.0D-1 . P0621750

MCBVD = 1 1 1 .7897 89 D 0 P0621 760

MCCVD = -99.66D-1 P0621 770

MCDVD = -456. 123D0 P0621780

MCEVD = DMAX1 (MCAVD. MCBVD) P0621 790

MCFVD = MCEVD - 111 . 789789D0 P0621 800

WRITE (NUVI, 0627) MCFVD P062 1 8 1 0 MCEVD = DMAX1 ( MCAVD, MCCVD) P0621 820

MCFVD = MCEVD - 23.0D-1 P062 1 830

WRITE (NUVI, 0627) MCFVD P0621 840

MCEVD = DMAX1 (MCDVD, MCCVD) P0621850

MCFVD = MCEVD + 99.66D-1 P0621860

WRITE (NUVI, 0627) MCFVD P0621 870

MCEVD = DMAX1 (MCDVD, MCDVD) P062 1 88 0 MCFVD = MCEVD - MCDVD " P0621 890

WRITE (NUVI, 0627) MCFVD P0621900

MCGVI = 2 P0621910

WRITE (NUVI, 0622) MCGVI P0621920

C*«**» THREE ARGUMENTS FOR DMAX1 P0621930

MCEVD = DMAX1 (MCAVD. MCCVD.MCBVD) P0621 940

MCFVD = MCEVD - 1 1 1 . 789789D0 P062 1 950

WRITE (ffUVI. 0627 ) MCFVD P0621 960

MCEVD = DMAX1 (MCCVD. MCDVD. MCAVD) P0621970

MCFVD = MCEVD - 23.0D-1 P0621980

WRITE (NUVI. 0627) MCFVD P0621990

MCEVD = DMAX1 (MCCVD, MCCVD. MCDVD) P0622000

MCFVD = MCEVD + 99.66D-1 P062201

0

WRITE (NUVI. 0627) MCFVD P0622020

MCGVI = 3 P0622030

WRITE (NUVI, 0622) MCGVI P0622040

78 NBS FORTRAN Test Programs Version 1
c

* t * * * FOUR OR FIVE ARGUMENTS FOR DMAX1 P0622050

urcvn nLCVU -- nHAvi UnnAl^nLAVLI,nLLVL' ((trA\/n Mrrun MTRv/n m rnun >

( nLDVU > nLL'VU/ PPiA??PiAPi

1 1 l r v u — IILCVU III./O7/07L/V PPtA??f)7Pl r v 0 C 4 v / U U R T T F ICWIIV/I NUV 1

fl A? 7 1 MPEV/D , UOl / J nLrVU DPiA7?Pi8Pi

mII rpvn L l V U - UllnA! lllLLVU,IILLVU,nLUVU,nLDVL',nLnVU/ PPiA7?nQPi

ii i r v u

- MPFVn - 111 7*078000 P Pi A 7 7 1 nn

nw rn t1 t1 pl fMIIVI U V i

Pi A 7 7 ) MPFVPl f U O L M II L r V u PPiA7711Pi

U R T T F W r\ i 1 P

r m )I v T f) A 7 7 1 rP Pi A 7 7 1 7PI \J 0 c. L I C U U R I TP (\llUVl M 1 1 V T 0 0 0 X ) , 7 7 7 0 / PPiA??17Pl

Pi A 7 1 FORMAT Cv Fr 1

1 11 . 111 1 P Pi A 7 7 1 A fl U D L L 1 *U

Pivoce. A 7 7 FORMAT r u n nn

t

( 1 Sy OH FMD DP I? 1 SH- ARfillMFNT TFQT 1 \ i j a i v n c ii u ur , i l i

i jn nr\uuiiuiii i p o i / P Pi A 7 7 1 S Pi r u 0 4, L I JU

0623 V U L J rFORMAT u r\ i i n i ( 15X 31H END OF 4- OR 5-ARGUMENT TEST ) P0622 1 60

062 4 FORMAT < / 2 X , 1 5HTEST OF AMAX1 --

)

P06221 70

062 5 FORMAT ( /ZX, 1 5HTEST OF AMAXO -

-

)

P0622180

0626

0627

0628

0629

9998

FORMAT

FORMAT

110)

022. 1 0 )

9999

G * * * t

C * * * *

C * * * *

c * * * * c=

c=

FORMAT (2H1 , 1 4HTEST OF MAX0--)

FORMAT ( / 2X , 1 4HTEST OF MAX1--)

FORMAT (7 39H THE ABOVE ANSWERS SHOULD ALL BE 0 F0R/2X,

135HTHIS TEST SEGMENT TO BE SUCCESSFUL.)

FORMAT ( /2X, 1 5HTEST OF DMAX1 --)

* END OF TEST SEGMENT 062

* WHEN EXECUTING ONLY SEGMENT 062, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

" END

STOP

END

P06221 90

P0622200

P0622210

P0622220

P 0 6 2 2 2 3 0 P0622240

P 0 6 2 2 2 5 0 P0622260

P 0 6 2 2 2 7 0 P0622280

P 0 6 2 2 2 9 0 P0622300

P0622310

P062C1

P062C2

C

» * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

*******4***********«*t************t*t****t*tt****tt*»«*ti»*t«i***«tP0630010

* P063 0 02 0

* IFMIN - (063) P0630030

* P0630040

******************t***********************t***********t*tt*t*t****tP0630050

* GEN ERAL PURPOSE ASA RE F P 0 6 30060

* TEST INTRINSIC FUNCTIONS AMINO, AMIN1 , M I NO , M I N 1 AND 8.2 P0630070

* DM I N 1 -- CHOOSING SMALLEST VALUE . ( TABLE 3 ) P 0 6 3 0 0 8 0

* P0630090

* S P E C I F I C A f I O N S SEGMENT 063 P063 0 1 00

* P0011450

P00 1 1 45 5 P00 1 1 460

POO 1 1 46 5 P001 1 470

P0 011475

P001 1 480

P063A1

P06301 10

P 0 0 7 1 2 2 0 P0071225

P0071230

P0071235

P 0 0 7 1 2 4 0 P063B1

P0071245

WRITE (NUVI , 0630) P0630120

FORMAT (1H1 , 1X.35HIFMIN - ( 063 ) INTRINSIC F U N CT I 0 NS -

- / 1 3X, 2 7H AM I NO P 0 63 0 1 3

0

1 , AM I N 1 , M I NO , M I N 1 ,DMIN1/ 2X.14HASA REF. - 8 . 2 / / 2X , 7HRESU LTS ) P0630 1 40

* TEST OF AMINO - INTEGER ARGUMENTS, REAL FUNCTION 8 . 2/24P06301 50

* TWO ARGUMENTS FOR AMINO P0630160

WRITE (NUVI, 0635 ) P 0630170

MCAVI = 128 P0630180

MCBVI = 64 P0630190

MCCVI = -8 P0630200

MCDVI = -4096 P0630210

CMEVS = AM I NO ( MCAVI , MCBVI ) P0630220

CMFVS = CMEVS - 64.0 P0630230

WRITE (NUVI, 0631) CMFVS P0630240

* WHEN EXECUTING ONLY SEGMENT 063, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

IN COLUMNS 1 AND REMOVED

C= DOUBLE PRECISION M CAVD , M C B VD , M C CVD , M CDVD , M CE VD , M C F VD

C * * * * * DOUBLE PRECISION 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 D C*.*.*..*.* 0 U T P U T T A P E ASSIGNMENT STATEMENT., NO INPUT TAPE

C * * * * * C*«*** WHEN EXECUTING ONLY SEGMENT 063, THE FOLLOWING STATEMENT

C* * * « t NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C * * * * * C= NUVI =

6

NUVI = 6

C * » * * *

0630

C * t * *

c * * * *

NBS FORTRAN Test Programs Version 1 79
CMEVS = AMINO(MCDVI .MCCVI

)

P0630250

CMFVS = CMEVS 4096.0 P0630260

WRITE (N'JVI . 0631 ) CMFVS P0630270

CMEVS = AMIN0(MCBVI , MCCVI

)

P0630280

CMFVS = CMEVS + 8.0 P0630290

WRITE (NUVI.0631) CMFVS P0630300

MCGVI = 2 P06303 1 0 WRITE (NUVI ,0632) MCGVI P0630320

c * * * *

THREE-ARGUMENT TEST FOR AMINO P0630330

CMEVS = AMINO(MCAVI , MCCVI , MCBVI

)

P0630340

CMFVS = CMEVS + 8.0 P0630350

WRITE (NUVI, 0631) CMFVS P0630360

CMEVS = AM I N 0 ( M CB V I , MCBVI .MCDVI

)

P0630370

CMFVS = CMEVS + 4096.0 P0630380

WRITE F» l \ 1 1 L.. (NUVI.0631) \liWv*|V V ' » CMFVS will » W P0630390

MCGVI = 3 P0630400

WRITE (NUVI, 0632) MCGVI P063041

0

c * * 1 1 * FOUR OR FIVE ARGUMENTS FOR AMINO P0630420

CMEVS = AM I NO ( MCAVI , MCCVI , MCDVI , MCBV I

)

P0630430

CMFVS = CMEVS + 4096.0 P0630440

WRITE (NUVI, 0631) CMFVS P0630450

CMEVS = AMINO(MCCVI , MCBVI , MCCVI .MCAVI f M CD V I

)

P0630460

CMFVS = CMEVS + 4096.0 P0630470

WRITE (NUVI, 0631) CMFVS P0630480

WRITE (NUVI, 0633) P0630490

C * * * * * TEST OF AM I N 1 - REAL ARGUMENTS. REAL FUNCTION 8 .2/25P0630 5 0 0

c * * * * * TWO ARGUMENTS TEST FOR AM I N

1

P0630 5 1 0 WRITE (NUVI. 0634) P0630520

CMAVS = 26.5 P0630530

CMBVS =9.6666 P0630540

CMCVS = -1.65 P0630550

CMDVS = -10.001 P0630 560

CMEVS = AM I N 1 ( CMBVS , CMDVS

)

P0630570

CMFVS = CMEVS + 10.001 P0630580

WRITE (NUVI, 0631) CMFVS P0630590

CMEVS = AMIN1 ( CMAVS, CMBVS) P0630600

CMFVS = CMEVS - 9.6666 P06306 1 0 WRITE (NUVI, 0631) CMFVS P0630620

CMEVS = AMIN1 (CMCVS, CMDVS) P0630630

CMFVS = CMEVS + 10.001 P0630640

WRITE (NUVI, 0631) CMFVS P0630650

CMEVS = AMIN1 ( CMCVS, CMCVS) P0630660

CMFVS = CMEVS + 1.65 P0630670

WRITE ( NUV I , 063 1 ) CMFVS P0630680

MCGVI = 2 P0630690

WRITE (NUVI, 0632) MCGVI P0630700

c * * * * * THREE-ARGUMENT TEST FOR AM I N

1

P063071 0 CMEVS = AMIN1 ( CMBVS, CMCVS, CMDVS) P0630720

CMFVS = CMEVS + 10.001 P0630730

WRITE (NUVI.0631) CMFVS P0630740

CMEVS = AM I N 1 ( CMBVS , CMBVS , CMBVS

)

P0630750

CMFVS = CMEVS - 9\6666 P0630760

WRITE (NUVI.0631) CMFVS P0630770

CMEVS = AM I N 1 ( CMAVS , CMBVS , CMCVS

)

P0630780

CMFVS = CMEVS + 1.65 P0630790

WRITE (NUVI.0631) CMFVS P0630800

MCGVI = 3 P06308 1

0

WRITE (NUVI, 0632) MCGVI P0630820

c * * * » » FOUR OR FIVE-ARGUMENT TEST FOR AM I N

1

P0630830

CMEVS = AM I N 1 ( CMAVS , CMBVS . CMCVS , CMOVS

)

P0630840

CMFVS = CMEVS + 10.001 P0630850

WRITE (NUVI.0631) CMFVS P0630860

CMEVS = AM I N1 ( CMAVS , CMCVS , CMBVS , CMCVS , CMDVS j P0630870

CMFVS = CMEVS + 10.001 P0630880

WRITE (NUVI.0631) CMFVS P0630890

WRITE (NUVI, 0633) P0630900

c * * * * * TEST OF MINO - INTEGER ARGUMENTS, INTEGER FUNCTION 8 . 2/26P063091 0

c * * * * * TWO-ARGUMENT TEST FOR MINO P0630920

80 NBS FORTRAN Test Programs Version 1
1 1 D T T C WR I T t (NUVI ,0630) OAATAOTA P063 0 93 0 n l t v I _ MTftlA/MPDWT M P A V/ T \ DAi7 AO/

A

P063 0 940

urriii nLrvl - n L fc V 1 oh DAZ.7AOCA P 063 0 9 5 0 MO T TC W K I 1 fc /vNUVl.UOJV; HI II V/ T rtt 7Q \ MPCV/T nLrvl P 0 o 3 0 96

0

MCEVI _ MTMA/MPDWT M P P V/ T \ - H I N 0 ( H I B V I , n L L V I ) P0630970

M r c V/ T PILrVl -

- MPCV/T xfi n L t V 1 + 5 rOoiOVoO

lin 1 TP

W K 1 1 t

i fU 1 1 \l T fti7fl ^ MPCV/T I NUV 1 , Uo JV ; nLrvl rUoiUVVO

H L c V 1 — M T M A / M P P V/ T u f H W 1 ^ - nlNUvnLLVl,nLUVl/ DA£.71AAA P 0 6 3 1 000

M r r w T rlLrV 1 - D L t V 1 + hUVO Drti7 1 rt 1 A PU031U1U

LI D T T C W K J it 1 U 1 1 W T Ai 7 0 \ MPCV/T I NUV 1 , UO J7 / nLrvl n A £ 7 1 A ^ A P U O 3 1 OtO

M p C V/ T n Lc V I — MTMA/MPAV/T A \ - 1"! I N 0 ( M L A V 1 , 0 ) P 0 6 3 1 0 3 0

I.I D T T C W K I 1 t /MIIV/T (lilOl MPCV/T I NUV 1 , U03 7 ) n Lt V 1 D A A 7 1 A / A MII LUPf! VY I P0r>7 1 0 S 0 WRITE (NUVI, 0632) MCGVI P0631 060

c * * * * * FOR MINO

MC8VI ) THREE-ARGUMENT TEST

MCEVI = MINOCMCAVI ,MCCVI

MCFVI = MCEVI + 8 WRITE (NUVI, 0639) MCFVI

MCEVI = M I N 0 C M C CV I. MCAVI , MCDVI

)

MCFVI = MCEVI + 4096

P0631 070

P0631080

P0631 090

P063 1 1 00

P 0 6 3 1 1 1 0 P063 1 1 20

WRITE (NUVI, 0639) MCFVI P0631 130

MCGVI = 3 P0631 1 40

WRITE (NUVI, 0632) MCGVI P0631 1 50

C***** FOUR OR FIVE-ARGUMENT TEST FOR MINO P0631 160

MCEVI = M I NO ( MCBV I, MCAVI .MCCVI .MCDVI

)

P0631 1 70

MCFVI = MCEVI + 4096 P0631 1 80

WRITE (NUVI, 0639) MCFVI P0631 190

MCEVI = MINO ( MCAV I ,MCBVI , MCAVI -MCCVI

,

MCDVI

)

P0631200

MCFVI = MCEVI + 4096 P 063 1 2 1 0 WRITE (NUVI, 0639) MCFVI P0631220

WRITE (NUVI, 0633) P0631230

C**«** TEST OF MINI - REAL ARGUMENTS, INTEGER FUNCTION 8.2/27P0631240

C***«* TWO-ARGUMENT TEST FOR MINI P0631250

WRITE (NUVI, 0637) P0631260

MCEVI = MINI (CMAVS, CMBVS) P0631270

MCFVI = MCEVI - 9 P0631280

WRITE (NUVI. 0639) MCFVI P0631290

MCEVI = MINI (CMCVS. CMDVS) P0631300

MCFVI = MCEVI + 10 P063131

0

WRITE (NUVI. 0639) MCFVI P0631320

MCEVI = MINI (CMAVS, CMCVS) P0631330

MCFVI = MCEVI + 1 P0631340

WRITE (NUVI, 0639) MCFVI P0631350

MCGVI = 2 P0631360

WRITE (NUVI, 0632) MCGVI P0631 370

C**t** THREE-ARGUMENT TEST FOR MINI P0631380

MCEVI = MINI (CMAVS, CMCVS, CMBVS) P0631390

MCFVI = MCEVI + 1 P0631 400

WRITE (NUVI, 0639) MCFVI P0631410

MCEVI = MI N1 ( CMAVS , CMCVS , CMDVS) P0631420

MCFVI = MCEVI + 10 P0631 430

WRITE (NUVI, 0639) MCFVI P0631 440

MCGVI = 3 P0631450

WRITE (NUVI, 0632) MCGVI P0631460

C***»* FOUR OR FIVE-ARGUMENT TEST FOR MINI P0631470

MCEVI = MINI (CMAVS, CMBVS, CMDVS, CMCVS) P0631480

MCFVI = MCEVI + 10 P0631490

WRITE (NUVI, 0639) MCFVI P063 1 5 00

MCEVI = MI N1 ( CMAVS , CMBVS . CMCVS , CMCVS , CMDVS) P 0 6 3 1 5 1 0 MCFVI = MCEVI + 10 P0631 520

WRITE (NUVI. 0639) MCFVI P063 1 530

WRITE (NUVI, 0633) P0631 540

C****« TEST OF DM I N 1 - DOUBLE PRECISION ARGUMENTS, FUNCTION 8.2/28P0631550

C « TWO-ARGUMENT TEST FOR DM I N 1 • P0631 560

WRITE (NUVI, 0638) P0631 570

MCAVD = 61 . 1 234D0 P063 1 5 80

MCBVD = 2.0D1 P0631 590

MCCVD = -999.009D-1 P0631600

NBS FORTRAN Test Programs Version 1 81
MCOVO = -1 . 9D0

MCEVO = DM I N 1 (MCAVD , MCBVO

)

P0631610

P0631620

MCFVD = MCEVD - 2.0D1

WRITE < NUV I

, 9996 > MCFVD

P0631630

P0631640

MCEVD = DM I N 1 ( M C CVD , MCDVD

)

MCFVD = MCEVD + 999 . 009D1

P0631650

P0631660

WRITE ( NUV I , 9996 ) MCFVD

MCEVD = DMIN1 (MCAVD. MCDVD)

P0631 670

P0631680

MCFVD = MCEVD + 1 .9DO

WRITE < NUV I . 9996 ) MCFVD

P0631690

P063 1 70 0 MCGVI = 2 WRITE (NUVI.0632) MCGVI

P063 1 7 1 0 P063 1 72 0 C** *«* THREE-ARGUMENT TEST FOR DM I N

1

MCEVD = DMIN1 (MCAVD, MCBVD, MCDVD)

P0631 730

P0631 740

MCFVD = MCEVD + 1 . 9D0

WRITE ( NUV I . 9996 ) MCFVD

P0631 750

P0631 760

MCEVD = DMIN1 (MCAVD, MCCVD, MCBVD)

MCFVD = MCEVD + 999 . 009D1

P0631 770

P0631 780

WRITE (NUVI.9996) MCFVD

MCGVI = 3 P0631 790

P063 1 8 0 0 WRITE (NUVI.0632) MCGVI

C*«*** FOUR OR FIVE-ARGUMENT TEST FOR DM I N

1

P063 1 8 1 0 P0631 820

MCEVD = DMIN1 (MCAVD. MCCVD, MCBVD, MCDVD)

MCFVD = MCEVD + 999.009D-1

P06 3 1 8 3 0 P0631 840

WRITE (NUVI.9996) MCFVD

MCEVD = DMIN1 (MCBVD, MCAVD. MCBVD, MCDVD. MCCVD)

P0 63 1 8 5 0 P0631 860

MCFVD = MCEVD 999.009D-1

WRITE (NUVI.9996) MCFVD

P0631 870

P063 1 880

WRITE ( NUV I , 0633 ) WRITE (NUVI.9997)

P063 1 890

P0631900

0631 FORMAT ( F11.1)

0632 FORMAT ( 15X. 8H END OF , 12,1 5H-ARGUMENT TEST.)

P063 1 9 1 0 P0631 920

0633 FORMAT ( 15X, 30H END OF 4 OR 5- ARGUMENT TEST.)

0634 FORMAT ( / 1 6H TEST OF AM I N 1 ) P0631 930P0631940

0635 FORMAT ( / 1 6 H TEST OF AMINO ) 0636 FORMAT ( /16H TEST OF MINO ) P0631950

P0631 960

0637 FORMAT ( 16H1 TEST OF MINI ) 0638 FORMAT ( / 1 6H TEST OF DM I N 1 ) P0631 970

P0631 980

0639 FORMAT ( 110)

9996 FORMAT ( D22.10)

P0631 990

P0632000

9997 FORMAT ( /39H THE ABOVE ANSWERS SHOULD ALL BE 0 F0R/1X,

1 36H THIS TEST SEGMENT TO BE SUCCESSFUL.)

P0632010

P0632020

C « END OF TEST SEGMENT 063

C** *«* WHEN EXECUTING ONLY SEGMENT 063, THE STOP AND END CARDS

P0632030

P0632040

C****« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C***«* IN COLUMNS 1 AND 2 REMOVED.

P0632050

P0632060

C= STOP

C= END

P0632070

P0632080

STOP

END

P063C1

P063C2

C*************************************************************

c * * * * * ******** * * P 0 6 4 0 0 1 0 P0640020

C****» IFDSG - (064)

C * * * * * ,P0640030P0640040

C<»*«l(l«itltttltttt**tlt*«tl»ttll*Mtt«fittt«>lt«tttii)ttttt«tt

C****» GENERAL PURPOSE

**********P0640050

ASA RE F P0640060

C***»* TEST INTRINSIC FUNCTION DSIGN (TRANSFER OF SIGN WITH

C****« DOUBLE PRECISION ARGUMENTS AND FUNCTION)

8 . 2/33P0640070

(TABLE 3 ) P0640 0 8 0

c * * * * * C****« SPECIFICATIONS SEGMENT 064

P0640090

P0640100

c * * * * * C****» WHEN EXECUTING ONLY SEGMENT 064, THE SPECIFICATION STATEMENTS

P001 1 490

P001 1 495

C***«* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

C****» IN COLUMNS 1 AND 2 REMOVED.

P001 1500

P001 1505

c * * * »

C= DOUBLE PRECISION MCAVD . MCBVD , MCCVD , MCDVD , MCEVD , MCFVD

P001 1 5 1 0 P001 1 5 1 5 DOUBLE PRECISION MCAVD . MCBVD . MCCVD , MCDVD , MCEVD , MCFVD

C * 1 1 * t P064A1

PO 0 1 1 520

82 NBS FORTRAN Test Programs Version 1
C***«* OUTPUT TAPE ASSIGNMENT STATEMENT.

C * * * * * ONLY SEGMENT 0 64 , THE FOLLOWING

HAVE THE C= IN COLUMNS 1 AND 2

NO INPUT TAPE P06401 1 0 P0071250

P 6 071 2 5 5 P0071260

P 0 0 7 1 2 6 5 P0071270

P064B1

P0071 275

P06401 20

P0640130

P06401 40

P06401 50

WHEN EXECUTING

NUVI = 6 MUST

STATEMENT

REMOVED.

C * * * * *

c * * * * *

c * * * * * C= NUVI = 6

NUVI = 6

* WRITE (NUVI 70640 ) FORMAT ( 1 H 1 , 1 X , 3 4H I FDSG - ( 064 ) INTRINSIC F U N CT I 0

N - - / 1 6X , 2 4 HD S I G

N

1 (TRANSFER OF SIGN)/ 2X . 1 4 H AS A RE F . - 8 . 2 / / 2X . 7HRESULTS

>

* HEADER FOR SEGMENT 064 WRITTEN

fj * * * *

0640

C * * * * MCAVD = +9.5D0 P06401 60

MCBVD = 123.4567D1 P06401 70

MCCVD = -5.665D1 P0640 1 8 0 MCDVD = -75.57D-0 P0640190

MCEVD = DSIGN(MCAVD, MCBVD) P0640200

MCFVD = MCEVD - 9.5D0 P06402 1 0 WRITE (NUVI, 0641) MCFVD P0640220

MCEVD = DSIGN(MCBVD, MCCVD) P0640230

MCFVD = MCEVD + 123.4567D1 P0640240

WRITE (NUVI, 0641) MCFVD P0640250

MCEVD = DSIGN(MCCVD, MCDVD) P0640260

MCFVD = MCEVD + 5.665D1 P0640270

WRITE (NUVI, 0641) MCFVD P0640280

MCEVD = DSIGN(MCDVD, MCDVD) P0640290

MCFVD = MCEVD +75.57D0 P0640300

WRITE (NUVI, 0641) MCFVD P0640310

WRITE (NUVI ,0642) P0640320

0641 FORMAT (1H0.D30.18) P0640330

0642 FORMAT ( 1H0, 1X.38HALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/ P0640340

1 2X , 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

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0640380

C***** IN COLUMNS 1 AND 2 REMOVED. P0640390

C= STOP P0640400

C= END P0640 4 1 0 STOP P064C1

END P064C2

C***********************************************************************P0650010

C * * t * * P0650020

c * * * * * IFDIM - (065) P0650030

c * * * * * P0650040

c*********** ******************************************************** * ***P0650050

C***** GENERAL PURPOSE ASA REF P0650060

C***** TEST INTRINSIC FUNCTION DIM AND I D I M -

- PO S I T I VE 8. 2 P0650070

C***«* DIFFERENCE, WHICH IS DEFINED AS A1 - MIN(A1 ,A2) (TABLE 3)P0650080

c * * * * * P0650090

C * * * * * NO SPECIFICATIONS SEGMENT 065 P06501 00

C * * * * * 0 U TPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P06501 10

C***** WHEN EXECUTING ONLY SEGMENT 065, THE FOLLOWING STATEMENT P00 7 1 2 8 0 C***»* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071285

C * * * * * P0071 290

C= NUVI = 6 P0071295

NUVI = 6 P065B1

WRITE (NUVI ,0650) P0650120

0650 FORMAT (TH1 , 1X.39HIFDIM - (065) INTRINSIC FUNCTIONS - DIM/12X, P06501 30

130HAND IDIM (POSITIVE DIFFERENCE)/ 2X , 1 4 HAS A REF. - 8.2/ P06501 40

2/2X. 7HRESULTS) P065 0 1 5 0 C***«* HEADER FOR SEGMENT 065 WRITTEN P0650160

C*«*** TEST OF DIM - -EAL ARGUMENTS, REAL FUNCT+ON C2 / 3 4P06 5 0 1 70

CMAVS = -4.0 P0650180

CMBVS = 4.0 P0650190

CMCVS = 16.25 P0650200

CMDVS = -64.25 P0650210

CMEVS = DIM(CMAVS, CMBVS) P0650220

CMFVS = CMEVS + 0.0 P0650230

NBS FORTRAN Test Programs Version 1 83
WRITE (NUVI.0651) CMFVS

.CMEVS = D I M ( CMCyS ..CMDVS ).. CMFVS = CMEVS - 80.5

WRITE (NUVI.0651) CMFVS

CMEVS = DIM( CMCVS, CMBVS)

CMFVS = CMEVS - 12.25

P0650240

P0650250

P0650260

P0650270

P0650280

P0650290

WRITE (NUVI.0651) CMFVS P0650300

CMEVS = D I M ( CMDVS , CMAVS ) P0650310

CMFVS = CMEVS - o.O P0650320

WRITE (NUVI.0651) CMFVS P0650330

C«**** TEST OF IDIM

MCAVI = 02468

INTEGER ARGUMENTS, INTEGER FUNCTION

065 1 065 2 06 5 3

MCBVI = +36

MCCVI = -3

MCDVI = -23

MCEVI = IDIM(MCAVI .MCBVI

)

MCFV'i = MCEVI - 2432

WRITE (NUVI.0652) MCFVI

MCEVI = IDIM(MCBVI , MCCVI

)

MCFVI = MCEVI - 39

WRITE < N U V I .06 5 2 ) MCFVI

MCEVI = I D I M ( M C D V I .MCCVI

)

MCFVI = MCEVI + 0 (NUVI.0652) MCFVI

- I D I M ( M C C V I .MCCVI

)

(NUVI.0652) MCEVI

= IDIM(MCCVI , MCBVI

)

(NUVI.0652) MCEVI

( NUVI . 06 5 3 ) (1H0.F17.2)

C * * *

C * * *

C * * *

c * * * c=

c =

WRITE

MCEVI

WRITE

MCEVI

WRITE

WRITE

FORMAT

FORMAT MHO. 1 OX . 15)

FORMAT MH0.1X.34H ALL ABOVE ANSWERS SHOULD BE 0 F0R/2X,

135HTHIS TEST SEGMENT TO BE SUCCESSFUL. )

* END OF TEST SEGMENT 065

* WHEN EXECUTING ONLY SEGMENT 065 THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C-

"* I N COLUMNS 1 AN D 2 REMOVED

STOP

END

STOP

8.2/35P0650340

P0650350

P0650360

P0650370

P0650380

P0650390

P0650400

P065041

0

P0650420

P0650430

P0650440

P0650450

P0650460

P0650470

P0650480

P0650490

p 6 6 5 0 5 00

P06 5 0 5 1 0 p 06 5 0 5 20

P0650530

P0650540

P0650550

P 6 6 5 0 5 60

P0650570

P 0 6 5 0 5 8 0 P0650590

P0650600

P06 5 06 1 0

" P 06 5 0620

P065C1

END P065C2

******************************tt***********t************************P0660010

* * P 0 660 0 2 0 ** IFSGL - (066) P0660030

C * * *

c * * *

C * * *

c * * *

c * * *

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

C * * *

c * * *

c * * *

C = c=

** P0660040

******************t****************************(r********************P0660050

* * GENERAL PURPOSE ASA RE F P 066 0 0 60

** TEST INTRINSIC FUNCTION SNGL - OBTAIN MOST SIGNIFICANT 8 . 2 / 3 6 P 0 6 6 0 0 7

0

* * PART OF DOUBLE PRECISION ARGUMENT. (TABLE 3 ) P0660 0 8 0 ** GENERAL COMMENTS P0660090

** ASSIGNED GO TO STATEMENT ASSUMED WORKING. P 0 6 6 0 1 0 0 ** P 0 660 1 1 0 ** SPECIF I C A T I 0 N S SEGMENT 066 P 0 660 1 20

** P 0 0 1 1 5 3 0

* * WHEN EXE CU TING ONLY SEGME NT 066', THE SPECI F I CATI ON STATEMENTS P 0 0 1 1 53 5 ** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0011540

** IN COLUMNS 1 AND 2 REMOVED. P 0 0 1 1 5 4 5 ** P 0 0 1 1 5 5 0 DOUBLE PRECISION MCAVD , MCBVD , MCCVO , MCDVD , MCEVD , MCFVD , P 0 0 1 1 5 5 5

1 CMAVD. CMBVD.CMCVD P 0 0 1 1 5 6 0 DOUBLE PRECISION MCAVD, MCBVD . M C C VD , M CDVD , M CE VD , M C F VD , P066A1

1 CMAVD, CMBVD.CMCVD P066A2

** P 0 0 1 1 5 6 5 ** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0660130

* *

"' P 0 0 7 1 3 0 0 ** WHEN EXECUTING ONLY SEGMENT 066, THE FOLLOWING STATEMENT P0071305

* * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P 0 0 7 1 3 1 0 NUVI = 6 P 0 0 7 1 3 1 5

C * * *

c * * *

z * * * c* * *

c * * *

c.=

84 NBS FORTRAN Test Programs Version 1
NUVI = 6 P066B1

C*»»«* P0071320

WRITE (NUVI , 0660 ) P 066 01 40

0660 FORMAT ( 1 H 1 , 1 X , 3 9H I FSG L - ( 066) INTRINSIC FUNCTION SNGL--/16X,. P06601 50

126H0BTAIN MOST SIGNIFICANT PT/16X, F» 6 6 601 60

218H OF D.P. ARGUMENT. / / 2X , 1 5HASA REFS. - 8 . 2 / / 2X , 7HRESULTS ) P0660 1 70

C

*"'**"** HEADER FOR SEGMENT 066 WRITTEN P06601 80

MCAVD = .48748748748748D3+.57D-5+.5604645D-6+.31786509547D-7 P0660190

MCBVD =-39. 689539609539D1-.57D-5-.5604645D-6-. 3 1 786509547 D-7 P 0 66 0 2 0 0 MCCVD = .33333333333333D0+.57D-5+.5604645D-6+.31786509547D-7 P0660210

MCDVD = -.66666666666666D0-.57D-5+. 5 604645D-6-. 3178650 9 5 4 7 D - 7 P 0660 22 0 MCEVD = .48748748748748D3+.570-5+.56046450-6+.31786509547D-7 P0660230

MCFVD = -39.6895396095390+1 P0660240

AVS = 0.0 P0660250

BVS =0.0 P0660260

CVS =0.0 , P0660270

I VI = 2 P0660280

Ct***t EXPRESSION RESULTS ASSIGNED TO D.P. RESULT FOR VISUAL COMPAR I S0NP0660290

C * *'*"* * ARGUMENTS OF SNGL - VARIABLE. SIMPLE EXPRESSION P0660300

CMAVD = AVS + SNGL ( MCAVD ) - BVS P06603 1 0 WRITE (NUVI, 661) MCAVD. CMAVD P0660320

CMAVD = CVS + SNGL(MCBVD) + AVS P0660330

WRITE (NUVI, 661) MCBVD, CMAVD P0660340

CMAVD = SNGL(MCCVD) P0660350

WRITE (NUVI ,661) MCCVD, CMAVD P0660360

CMBVD = -MCBVD P0660370

CMAVD = -SNGL ( MCBVD - CMBVD) P 0 6 6 0 3 8 0 CMCVD = - (MCBVD + MCBVD) P0660390

WRITE (NUVI , 661 ) CMCVD , CMAVD PO 660 40 0 CMCVD = MCDVD * MCDVD P0660410

CMAVD = BVS + SNGL (MCDVD* * I V I ) "+" CVS P0660420

WRITE (NUVI, 661) CMCVD, CMAVD P0660430

C

*"*"*"

'*"* ARGli M E N T OF SNGL : INT R INS I C FUNCTION WITH DI F FERE NT NO. OF ARG PO 6 60440

CMAVD = -(CVS + SNGL(DABS(MCDVD) ) + BVS) P0660450

WRITE (NUVI, 661) MCDVD, CMAVD P0660460

CMAVD = AVS - BVS + S N G L ( DM I N 1 ( M CE VD , M C F VD ) ) P0660470

WRITE (NUVI , 661 ) M CFVD, CMAVD PO 6 6 0480

CMAVD = CVS + BVS + S N G L ( DMAX 1 ( M C CVD . M CE VD , M C F VD ) ) P0660490

WRITE (NUVI ,661 ) MCEVD, CMAVD P0660500

WRITE (NUVI, 662) P0660510

661 FORMAT MHO, 1X.6HLINE A , D2 5 . 1 4 / 2X , 6HL I NE B.D2 5. 14) P 6 6 6 0 5 2 0 662 FORMAT ( 33H0 LINE B SHOULD AGREE WITH LINE A /40H ONLY TO THE PRECP0660530

A I SI ON OF A REAL DATUM. /37H REMAINING DIGITS RESULT FROM OUTPUT /P0660540

B 33H CONVERSION WHEN A REAL VALUE IS / 32H ASSIGNED TO D.P. FOR P0660550

CPRINTING. ) P 0 6 6 0 5 6 0 C***** END OF SEGMENT 066 P0660570

C

*"*"*" *"* WHE N EXECUTING ONL Y SEGME N T 066. THE STOP AN D E N D CARDS P0660580

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN COLUMNS P0660590

C

*"*"*"*

* 1 AND 2 R EM 0 V E D . P 0660600

C= STOP P0660610

C= END PO 66 062 0 STOP P066C1

END P0 6 6 C2

[tiitii»ttiiittii»ttiiiniii»ititiiiii»itt(itii»it»iiiin»ttiiii»i»ti»iiP0670010

C*"*"*'"* * PO 6 70 02 0 C**** * IFREL - ( 067 ) PO 670 03 0

C * * * * * P 0 6 7 0 0 4 0 C««*«********«***tte«******«t««»tt«**««t*»*»*»»***«t««*«t*t»««*»tt**t**«P0670050

C*"*"* *"* GE N ERAL PUR POSE ASA RE F P 06 7 6 060

C****» TEST INTRINSIC FUNCTION REAL (OBTAIN REAL PART OF 8 . 2 / 39P0 6 70 0 7

0

C**"**"* COMPLEX ARGUMENT j (TABLE 3)P06 70 08 0 C* * * * * P06 70 090

C * * * * * S P E C I F I C A f I 0 N S SEGMENT 067 P06 7 0 1 00

C***** P 0 0 1 1 5 7 0

C * * * * * WHEN EXE CUT I NG ONLY SEGMENT 0b ? • T^ E SPEC if I CAT I ON STATE ME N TS P 0 0 1 1 5 75

Ztttt* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0 0 1 1 5 8 0

C * * * * * I N COLUMNS 1 AND 2 REMOVED . P00 1 1 5 8 5 C***** P 0 0 1 1 5 9 0

NBS FORTRAN Test Programs Version 1 85
C= COMPLEX CHAVC, CHBVC, CHCVC, CHDVC, CHEVC, CHFVC P 0 0 1 1 5 9 5 COMPLEX CHA V C , C H B V C , C H C V C , CHDVC , C H E V C , C H F V C

P 0 6 7 A

1

C

*"*"*"*

* POO 1 1 600

C»«**« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0670110

C"*"*"*** PO 071 33 0 C****« WHEN EXECUTING ONLY SEGMENT 067, THE FOLLOWING STATEMENT P0071335

C7_i NuvI _6 must HAVE THE C = IN COLUMNS 1 AND 2 REMOVED. P 0 0 7 1 3 4

0

C= NUVI = 6 P0071 345

NUVI = 6 P 0 6 7B1

C*«*** P0071350

WRI TE (NUVI . 06 70 ) PO 6 70 1 20

06 70 FORMAT ( 1 H 1 . 1 X , 3 4 H I F R E L - ( 067 ) INTRINSIC FUNCTION--/ 16X. 4 H RE A L / P 0 6 7 0 1 3 0

1 2 X ,14 HAS A RE F - 8 . 2/7 PO 670 1 40

2 2X , 7HRESULTS ) P0670150

C'* t * t V HEADER FOR SEGMENT 06 7 WRITTEN

CHAVC = (3.2.1 .86)

CHBVC = (2.1,0.0)

CHCVC = (3.7,-1.2)

=" (+45.1 ,+2.2)

= (-16.0. 0.0)

= (-32.0, -1.1)

= REAL ( CHAVC

)

CMBVS

"="' CMAVS - 3.2

CMAVS = REAL ( CHBVC

)

CMAVS - 2.1

REAL(CHCVC)

CMAVS - 3.7

REAL ( CHDVC)

CMAVS -' 45.1

ABS(REAL( CHEVC)

CMAVS - 48.0

"

AM AX 1 ( REAL ( CHAVC)

CMAVS - 16.0

WRITE (NUVI, 0671) CMBVS , CMCVS . CMDVS . CMEVS , CMFVS , CMGVS

REAL C o N sTANTS HAVING ONLY FRACTIONAL PARTS ( NO EXPONENT)

CHAVC = ( . 789 , . 1 2 ) CHBVC "=

( .13,1.2)

CHCVC = (.507.-2.2)

CHDVC = ( + . 5 4 0 1 , + . 5 ) CHEVC = (-.5,0.25)

CHFVC = ( - . 062 5 , 1.1 ) CMAVS = REAL ( CHAVC

)

CM3VS '= CMAVS - . 789

CMAVS = REAL (CHBVC

)

"' CMCVS = CMAVS -0.13

CMAVS = REAL(CHCVC)

CHDVC

CHEVC

CHFVC

CMAVS

CMCVS = CMAVS = CMDVS = CMAVS = CMEVS

CMAVS = CMFVS = CMAVS = CMGVS =

+ RE AL ( CHFVC) )

REAL(CHBVC), RE A L ( C H E V

C

- C H F V C ) )

P06701 60

P0670 1 70

P 0 6 7 0 1 8 0 P0670190

P 0 6 7 0 Z 0 0 P067021

0

P 0 6 7 0 2 Z 0 P0670230

P 0 6 7 0 2 4 0 P0670250

P0670260

P0670270

P0670280

P0670290

P 0 6 7 0 3 0 0 P067031

0

P0670320

P0670330

P 0 6 7 0 3 4 0 P0670350

P 0 6 7 0 3 6 0 P0670370

P0670380

P0670390

P0670 40 0 P067041

0

P06 70 420

P0670430

P 0 6 7 0 4 4 0 P0670450

P 0 6 7 0 4 6 0 P0670470

CMDVS = CMAVS -0.507 P0670480

CMAVS = REAL ( CHDVC

)

P0670490

CMEVS = CMAVS -0.5401 P0670500

CMAVS = REAL( CHEVC+CHFVC) P 0 67 0 5 1 0 CMFVS = CMAVS + 0.5625 P0670520

CMAVS = REAL ( CHEVC ) - REAL(CHFVC) P0670530

CMGVS = CMAVS + 0.4375 P0670540

WRITE (NUVI, 0671) CMBVS, CMCVS, CMDVS, CMEVS, CMFVS, CMGVS P0670550

C****» REAL CONSTANTS HAVING ONLY INTEGRAL PARTS(NO EXPONENT) P0670560

C * * * * * 5.1.1 .2/22P0670570

CHAVC = (23 . , 0 . 1 ) P0670580

CH3VC = (12. . + 1 .2) P0670590

CHCVC = (1 . ,-2.3) P0670600

CHDVC = (+45. .+.6) P 0 6706 1 0 CHEVC = (19.0. 1.0) P0670620

CHFVC = (-32.0, 2.0) P0670630

CMAVS = REAL ( CHAVC

)

P0670640

CMBVS = CMAVS - 23.0 P0670650

CMAVS = REAL(CHBVC) P0670660

CMCVS = CMAVS - 12.0 P0670670

CMAVS = REAL(CHCVC) P0670680

CMDVS = CMAVS - 1.0 P0670690

86 NBS FORTRAN Test Programs Version 1
CMAVS = REAL(CHDVC)

CMEVS = CMAVS - 45.0

CMAVS = S I GN ( D I M ( REAL ( CHEVC ) , REAL ( CHFVC) ), REAL < CHFVC ) ) CMFVS = CMAVS + 51.0

P0670700

P067071C

P0670720

P0670730

CMAVS = REAL(<16. 0,1.0) + CHEVC + CHFVC)

CMGVS = CMAVS - 3.0

WRITE (NUVI , 0671 ) CMBVS , CM CVS , CMDVS /CMEVS , CMFVS , CMGVS

WRITE (NUVI, 0672)

0671 FORMAT (/6CF20.4/))

0672 FORMAT ( /40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS /

1 32H TEST SEGMENT TO BE SUCCESSFUL.)

C***»* END OF TEST SEGMENT 067

C* * * * * WHEN EXECUTING ONLY SEGMENT 067 , THE STOP AND END CARDS

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C * * * * * IN COLUMNS 1 AND 2 REMOVED."

C= STOP

P0670740

P0670750

P06 7 0760

P0670770

P 6 670780

P0670790

P0670800

P067081

0

P0670820

P0670830

P0670840

P0670850

P0670860

P067C1

P067C2

END

STOP

END

***************************************t***************************P0680010

* P0680020

* IFIMG - (068) P0680030

* P06 8 00 40

***»***********************************4*************»*i**t****t*t*P0680050

* G ENERAL PUR P OS E ASA RE F P 0 6 8 0 0 6 0

* TEST INTRINSIC FUNCTION A I MAG (OBTAIN IMAGINARY PART 8 . 2 / 4 1 P 0 6 8 0 0 7

0

* OF COMPLEX ARGUMENT ) ( TABLE 3 )P0680080

P0680090

P 06801"00

P001 1 61 0 POO 1 1 61 5 P001 1620

P001 1625

P00 1 1 630

POO 1 1635

P001 1640

P068A1

P068A2

P001 1 645

P06801 1 0 POO 7 1 360

P0071365

P 0 071 370

P0071375

P068B1

P0071380

P0680120

P0680130

P 0 6 8 0 1 4 0 P0680 1 5 0 P 0 6 S 0 1 6 0 P0680170

P0680180

P0680190

P0680200

P0680210

P0680220

P0680230

P0680240

P0680250

P0680260

P0680270

P0680280

P0680290

PO 68 03 00

P0680310

P0680320

P0680330

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

* SPECIFICATIONS SEGMENT 068

*

* WHEN EXECUTING ONLY SEGMENT 068, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

* COMPLEX CHAVC. CHBVC, CHCVC, CHDVC, CHEVC ,CH FVC .CHGVC.CHHVC , CHI VC,

1 CHJVC, CHKVC, CHLVC

COMPLEX CHAVC, CHBVC, CHCVC, CHDVC, CHEVC, CHFVC, CHGVC, CHHVC, C HIVC,

1 CHJVC, CHKVC, CHLVC

*

* 0 jj T P U T T A P E ASSIGNMENT STATEMENT, NO INPUT TAPE,

*

* WHEN EXECUTING ONLY SEGMENT 068, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 NUVI = 6

* WR I TE ( NUVI , 068 0 ) FORMAT (1H1.1X.40HIFIHG - ( 068 ) INTRINSIC FUNCTION - A I MAG / 1 6 X f 119H0BTAIN IMAGINARY PT/16X, 19H0F COMPLEX ARGUMENT/ 2X,

2 1 3 HAS A REF . - 8 . 2 / / 2X , 7HRESULTS )

* HEADER FOR SEGMENT 068 WRITTEN

* IMAGINARY PARTS OF COMPLEX NUMBERS HAVING BOTH INTEGRAL

* AND FRACTIONAL PARTS. (NO EXPONENT)

CHAVC = (3.2,1 .86)

C =

C =

C » * * *

c * * * *

c * * * *

c * * t *

C * t * * c=

c * * * *

0680

c * * * *

c * * * *

c * * * *

CHBVC = (2.1,0.0)

CHCVC = (37.0,-1.2)

CHDVC = (+45.1 ,+2.2)

CMAVS = AI MAG ( CHAVC

)

CMBVS

CMAVS

CMCVS

CMAVS

CMDVS

CMAVS

CMEVS

C * * * *

c * * * *

CMAVS - 1.86

AIMAG( CHBVC)

CMAVS - 0.0

AIMAG(CHCVC)

CMAVS + 1.2

AIMAG( CHDVC)

CMAVS -2.2

WRITE (NUVI, 0681) CMBVS . CMCVS , CMDVS , CMEVS

* IMAGINARY PARTS OF COMPLEX NUMBERS HAVING ONLY FRACTIONAL

* PARTS (NO EXPONENT)

NBS FORTRAN Test Programs Version 1 87
CHAVC = ( .789, .00)

CHBVC = ( 1 .2,.. 789)

CHCVC = < +4 . 56 , - . 456 ) CHOVC = (-12. 3, + . 001 )

P0680340

P0680350

P0680360

P0680370

P0680380

P0680390

P0680400

P0 680 4 1 0 P068042 0 P0680430

P 06 804 40

P0680450

P 0 6 8 0 4 6 0 P0680470

P 0680480

P0680490

P 0 6 8 0 5 0 0 P068 0 5 1 0

P 06 8 0 5 2 6 P0680530

P0680 5 40

P0680550

P0680560

P0680570

P0680580

P0680590

P 0 6 8 0 6 0 0 P068061

0

P0680620

P0680630

P0680640

P0680650

P 0 6 8 0 6 6 6 P0680670

P0680680

P0680690

P0680700

P068071

0

P0680720

P068073Q

P 0 68 0 740

P0680750

P 0 6 8 0 7 6 0 P0680770

P 0 6 8 0 7 8 0 P0680790

P 0 6 8 0 8 0 0 P068081

0

p 0 6 8 0820

P0680830

P 0 6 8 0 8 4

0' P068085 0 P0680860

P0680870

P0680880

P0680890

P 068 0900

P068 09 1 0 P0680920

P0680930

P 06 8 0 94 0 P0680950

P 0 6 8 0 9 6 0 P0680970

P0680980

P0680990

P 0 6 8 1 0 0 0 P068 1 0 1 0

CMAVS = AI MAG ( CHAVC ) CMBVS = CMAVS - 0.0

CMAVS = A I MAG;< CHBVC ) CMCVS = CMAVS - .789

CMAVS = AIMAG(CHCVC)

CMDVS = CMAVS + .456

CMAVS '= AI MAG (CHOVC)

CMEVS = CMAVS - 0.001

WRITE (NUVI.0681) CMBVS , CMCVS , CMDVS , CMEVS

C***«* IMAGINARY PARTS OF COMPLEX NUMBERS HAVING ONLY INTEGRAL

C *"*'*'"*"* PARTS (NO EXPONENT)

CHAVC =(-12. ,12. ) CHBVC = CHCVC = CHDVC '= CMAVS = CMBVS '=' CMAVS =

C M C V S

="

( + 1 .23,0. ) (0.0, -16.0)

(-1.1, -32.0)

AIMAG(CHAVC)

CMAVS - 12.0

AIMAG( CHBVC)

CMAVS +0.0

CMAVS = ABS(AIMAG( CHCVC)+AIMAG( CHDVC)

)

CMDVS = CMAVS - 48.0

CMAVS = AMAX1 (AIMAG( CHAVC) , A I MAG (CHBVC ) . A I MAG ( CH CV C- CHDVC )

)

CMEVS = CMAVS - 16.0

WRITE (NUVI.0681) C M B VS , C M C VS , C M D VS , C ME VS

C * * * * * IMAGINARY PARTS OF COMPLEX NUMBERS HAVING A DECIMAL EXPONENT

CHAVC (2.3E0, 1 .2E0)

CHBVC

CHCVC

CHDVC'

CHEVC

CHFVC

CHGVC

CHHVC

CHIVC

CHJVC

CHKVC

CHLVC

CMAVS

CMBVS

CMAVS

CMCVS

CMAVS

CMDVS

CMAVS

CMEVS

WRITE

CMAVS

CMBVS

CMAVS

CMCVS

CMAVS'

CMDVS

CMAVS

CMEVS

W R IT

E"

CMAVS

CMBVS

CMAVS

CMCVS'

CMAVS

CMDVS

CMAVS

CMEVS

WRITE

(1 .2, .56E2)

( .24, 1 .El )

( 1 . , + 7 . 8 E + 1 ) (1.5, 16.0)

(1.0, -32.0)

(1 .E0,-7.99E-1 )

( 2 7.0 0 , .5 5E-1)

(1 .E0.2.E-0)

( 1 . 2 , 1 . E + 1 ) (1 .E-1 . + 7 . E 0 ) (1.7,-

A I M AG

(

CMAVS''

A I MAG

(

CMAVS

A I MAG

CMAVS

A I MAG

99 . E-1 ) CHAVC)

'- 1 . 2 E 0 CHBVC)

- . 56E2

CHCVC)

- 1 . E 1 CHDVC)

CMAVS - 7.8E+1

NUVI.0681) CMBVS, CMCVS

SIGN ( D I M ( A I MAG (CHEVC)

CMAVS + 48.0

AI MAG ( ( 1 . 0 16.0 ) +" CHEVC

CMAVS + 0.0

A I MAG ( CHGVC)

CMAVS + 7.99E-1

CMDVS, CMEVS

AI MAG( CHFVC)

)

AIMAG( CHFVC)

)

CHFVC)

A I MAG (CHHVC

)

CMAVS - .55E-1

NUVI , 06 81) CMBVS

AIMAG( CHIVC)

CMAVS - 2 . E

- 0 AIMAG(CHJVC)

CMAVS - f.E + 1 AIMAG( CHKVC)

CMCVS, CMDVS, CMEVS

CMAVS - 7.E0

AIMAG( CHLVC)

CMAVS + 99. E-1

NUVI , 0681 ) CMBVS, CMCVS. CMDVS, CMEVS

88 NBS FORTRAN Test Programs Version 1
WRITE (NUVI. 0682)

0681 FORMAT ( / 4<F20.5 / )>

0682 FORMAT " (' MOT ALL ABOVE ANSWERS SHOULD BE 0 FOR TH I S

7

132H TEST SEGMENT TO BE SUCCESSFUL.)

C*"**t* END OF TEST SEGMENT 068

C**t«* WHEN EXECUTING ONLY SEGMENT 068. 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

P0681020

P0681030

P 0 6 8 1 0 4 0 P0681050

P 06 8 1 060

P068 1 070

P 0 6 8 1 0 8 0 P0681 090

P068 1 100

P068 1 1 1 0 P068C1

P068C2

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * t * *

c * t * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * t

c * * * *

c

* * * *

C =

*******«r*«r*********************************tk***********************P0690010

* P0690020

* IFDBL - ( 069 ) PO 690 030

* P 069 0 0 4 0 t»**tt»*«»**»**»»it»«»tt*tttti*t*»t«tttttt»****«t»t»»t*««««»t*t«»»*P0690O5O

* GENERAL PURPOSE ASA REF P0690060

* TEST INTRINSIC FUNCTION DBLE (EXPRESS S.P. ARGUMENT 8 .2/4 3 P 0 6 9 0 0 7

0

* IN DOUBLE PRECISION FORM ) (TABLE 3 ) P0690 0 8 0

* INTRINSIC FUNCTIONS D AB S , DS I G N , D M I N 1 , D M AX 1 , AM AX 1 P 0 6 9 0 0 9 0

* ASSUMED WORKING. P0690100

* P 0 69 01 1 0 P06901 20

P 6 6 1 1 6 5 0 P0 0 1 1 6 5 5 POO 1 1 660

P00 1 1 665

P 0 0 1 1 6 7 0 P00 1 1 6 75

P069A1

P001 1680

P06901 30

P0071 390

P0071 395

P0071 400

POO 71 40 5 P069B1

SPECIFICATIONS SEGMENT 069

* WHEN EXECUTING ONLY SEGMENT 069, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

DOUBLE

DOUBLE

PRECISION

PRECISION

MCAVD

MCAVD

MCBVD

MCBVD

MCCVD

MCCVD

MCDVD

MCDVD

MCEVD

MCEVD

MCFVD

MCFVD

MCGVD

MCGVD

C * * * *

c * * * *

c * * t *

c * * * *

c * * * * c=

c * * * *

0690

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 06 , THE FOLLOW+NG STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI =6

NUVI - 6

WRITE (NUVI, 0690)

FORMAT (1H1 ,1X,39HIFDBL -,(069) INTRINSIC

126HS.P. ARGUMENT IN D.P. FORM / 2X , 1 3HASA

HEADER FOR SEGMENT 069 WRITTEN

CMAVS = 0.9765625E-3

CMBVS = -.1953125E-2

CMCVS = .5859375E-2

CMDVS = -. 1048576E+7

CMEVS = +114688.0

MCAVD = 0.0 DO

MCBVD = MCAVD * DBLE ( CMAVS

)

MCCVD = D MINI ( DBLE ( C M A V S ) , DBLE ( CMEV S )

)

MCDVD = MCAVD * MCBVD - D A B S ( D B L E ( C M B VS ) )

P0 0 7 1 4 1 0 P06901 40

FUNCTION - DBLE/16X, P 0690 1 5 0 REF.- 8.2//2X,7HRESULTS)P0690160

P 0 69 01 7 0 P0690 1 8 0

" P 0 6 90 1 9 0 P0690200

P 0 6 9 0 2 1 0 P0690220

P 6 6 9 0 2 3 0 P0690240

P "06 9 0 2 5 0 P0690260

"P 069 0 2 70

P0690280

P 6 6 9 0 2 9 0 P0690300

P 0 6 9 0 3 1 0 P0690320

p

0 69033 0 P0690340

P 6 69 0 3 5 0 P0690360

p"0 6'9 0 '370

P0690380

P 0 6 9 0 3 9 0 P0690400

P 0 6 9 0 41 0 P069C1

C * * * * *

691

692

C * t * *

c * * * *

c * * * *

c * * * *

C = c=

MCEVD = MCAVD - D S I G N ( D B L E ( C M C VS ) , D B L E ( C M B VS ) ) MCFVD = - DABS(DBLE( CMDVS) ) + MCAVD

MCGVD ""= DMAX1 (DBLE (AMAX1 (CMDVS. CMEVS) ), MCBVD)

WR I TE < NUV I ,691 ) CMAVS, MCCVD, CMBVS, MCDVD,

1 CMCVS, MCEVD, CMDVS, MCFVD, CMEVS, MCGVD

FORMATMHO, 1X.6HLINE A, E18.7/ 8H LINE B, D25.14)

WRITE (NUVI, 692)

FORMAT( 1 HO , 38H A COMPARISON OF LINE A AGAINST LINE B

1 4 OH IS NEEDED TO CHECK THE VALIDITY OF TEST)

* END OF TEST SEGMENT 069

/ 1X,

* WHEN EXECUTING ONLY SEGMENT 069, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* I N COL UMN S 1 AND 2 R E M 0 V E D . STOP

END

STOP

NBS FORTRAN Test Programs Version 1 89
END P069C2

C * * * * *

C

t * * »

c * * * * *

c * * * * *

c * * * * *

c' * * * * *

c * * * * t

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * t

C * * * * t

c * * * * *

c * * * * *

c'=

c * * * * *

c * * * * *

c * * * * *

c * * * * * c=

* * * t * t * t * t * t ******************** ****************** *************** *P 07 000\0

P0 70 0 02 0 IFCPX - (070) P0700030

PO 70 0 0 40

******************************************************************PQ700050

GENERAL PURPOSE

TEST INTRINSIC FUNCTION CMPLX (EXPRESS TWO REAL

'ARGUMENTS jfj COMPLEX FORM)

GENERAL COMMENTS

SUBTRACTION OF COMPLEX NUMBERS ASSUMED WORKING

SPECIFICATIONS SEGMENT 070

ASA REF P0700060

8.2/45P0700070

(TABLE 3 > P 6 7 0 0 0 8 0 P0700090

P 0 7 0 0 1 0 0 P0 700 1 1 0 P 0 7 0 0 1 2 0 POO 1 1 690

WHEN EXECUTING ONLY SEGMENT 070, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

COMPLEX C H A V C , CHBV C , C H C V C , C H D V C , C HE V C , C H F V C , C H G V C COMPLEX CHAVC, CHBVC, CHCVC, CHDVC, CHEVC , CHFVC , CHGVC

OUTPUT TAPE ASSIGNMENT STATEMENT . NO INPUT TAPE.

WHEN EXECUTING ONLY SEGMENT 070, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUV'i = 6

NUVI = 6 WRITE (NUVI, 0700)

0700 FORMAT (1H1, 1 X , 40H I F CPX - ( 0 70 ) INTRINSIC FUNCTION - CMPLX/16X,

f26 H EXPRE SS TWO REAL A RGUME NTS / 1 6X , 15HIN COMPLEX F0RM/15H AS A REF

2- 8.2//2X.7HRESULTS)

C *"**«'*" HEADER FOR SEGMENT 0 70 WRITTEN

CMAVS = 23.123

CMBVS

CMCVS

CMDVS

CMEVS

- .78

+ 17.

157. E-1

-.985E1

CMFVS = CHAVC = CHBVC = CHAVC = CHCVC -

E + 0 >

070 1

1 0702

C * * t * *

c * * * * *

c » * t * *

c * * * * * c=

c=

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * t *

+ 88 . E + 0 CMPLX(CMAVS, CMBVS)

CHAVC - ( 23. 1 23, -.78 ) CMPLX(CMBVS, 15.0)

CHAVC - (-.78,15.0)

CHAVC = CMPLX( CMDVS. CMFVS)

C H D V C = CHAVC - (157. E-1 , + 88

CHAVC = CMPLX(O.O.O.EO)

CHEVC = CHAVC

CHAVC = CMPLX( CMEVS, CMFVS)

CHFVC = CHAVC - ( - . 9 8 5 E 1 , + 8 8 . E + 0 ) CHAVC = CMPLX(CMCVS,-0.0E-1

)

CHGVC = CHAVC - ( + 1 7.0.0.0)

WRITE (NUVI, 0702) CHBVC, CHCVC. CHDVC. CHEVC, CHFVC. CHGVC

WRITE (NUVI, 0701)

FORMAT (//2X.37HTHE ABOVE ANSWERS SHOULD ALL BE 0 F0R/1X,

36H THIS TEST SEGMENT TO BE SUCCESSFUL.)

FORMAT (6(/F17.7.F17.7))

END OF TEST SEGMENT 0 70

WHEN EXECUTING ONLY SEGMENT 070, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

tlttlitlttHtttttliltHllltttHtltltltttllltttlllltttttMttltttll

I FCJG ( 071 ) tttllltfllltllltltlttltHttKltHttltlllltllittMtlttttHitttHtll

GENERAL PURPOSE ASA REF

P 0 0 1 1 69 5 P001 1700

P0 0 1 1 70 5 P001 1 71

0

p b b i 1715

P070A1

"PO 011 72 0 P0700130

P0071 420

P0 0 7 1 42 5 POO 7 143 6 P070B1

" PO 70 0 1 4 0 P 0 70 0 1 5 0

. P 0 7 0 0 1 6 0 P07001 70

P 0 7 0 0 1 8 0 P0700190

PO 7 0 0 2 0 0 P070021

0

PO 70 022 0 P0700230

PO 7 00240

PO 7 0 0 2 5 0 PO 70 6 260

P0700270

PO 70 02 8 0 P0700290

PO 7 0 0 3 0 0 P070031

0

P0700320

P0700330

PO 70 03 40

P0700350

PO 700360

P0700370

P 0 7 0 0 3 8 0 P0700390

P0700400

P070041

0

PO 7 0 0 4 2 0 P0700430

PO 7 00440

P0700450

P0700460

P0700470

P0 70C1

P070C2

* P 0 7 1 0 0 1 0 P071 0020

PO 7 1 0 0 30

P071 0040

* PO 7 1 0 0 5 0 P071 0060

90 NBS FORTRAN Test Programs Version 1
C t * * *

C t * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

* TEST INTRINSIC FUNCTION CONJG (OBTAIN CONJUGATE OF A 8 . 2 / 4 7 P 0 7 1 0 0 7

0

* COMPLEX ARGUMENT) (TABLE 3>P0710080

GENERAL COMMENTS

SUBTRACTION OF COMPLEX NUMBERS ASSUMED WORKING

P071 0090

P 0 7 1 0 1 0 0 SPECIFICATIONS SEGMENT 071

*

*

* WHEN EXECUTING

* IN COLUMNS '1

*

ONLY SEGMENT 071

AND 2 REMOVED.

THE SPECIFICATION STATEMENTS

P 0 7 1 0 1 1 0 P0710120

p b 6 i 173b

P0 0 1 1 73 5 POO 11740

P001 1745

COMPLEX CHAVC, CHBVC, CHCVC, CHDVC ,CHEVC

COMPLEX CHAVC, CHBVC , CHCVC, CHDVC , CHEVC

C * t * *

c * * * *

c * * * *

c * * * *

C t * t *

c =

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

P0 0 1 1 75 0 P071A1

P 0 0 1 1 7 5 5 P071 01 30

WHEN EXECUTING ONLY SEGMENT 071, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C = IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

P0071 440

P0071 445

POO 7 145 0 P0071 455

P 0 7 1 B 1 P0 0 7 1 460

P 0 71014 0 P071 01 50

P 0 7 1 0 1 6 0 P0710170

P 0 710180

P 0 7 1 0 1 9 0

NUVI = 6

C * * * *

0710

c * * * * *

WRITE (NUVI, 0710)

FORMAT (1H1, 1X.40HIFCJG - (071) INTRINSIC FUNCTION

11 9 H 0 B T A I N CONJUGATE 0F/16X. 16HA COMPLEX NUMBER/

217H ASA REFS. - 8 . 2 / / 2X , 7HRESULTS

)

HEADER FOR SEGMENT 071 WRITTEN

CHAVC = ( 1 . 1 , +2 . 1 )

CON JG/ 1 6X.

CHBVC = CHCVC = CHEVC

=

CHBVC = CHDVC

1 ) CON JG( CHAVC)

CHBVC - (1.1,-2

( - 2 . E 0 , - 3 . E - 1 ) CONJG ( CHEVC

)

CHBVC - (-2. E0.3.E-1 ) WRITE (NUVI, 0711) CHCVC, CHDVC

2 )

CHAVC = ( - . 2 , + . 3 ) CHBVC = CONJG(CHAVC)

CHCVC = CHBVC - ( - . 2 , 3 ) CHAVC = (23 . 1E-1 , 1 .E-2)

CHBVC = CONJG (CHAVC)

CHDVC = CHBVC - <23.1E-1.-1.EWR ITE ( NUVI , 071 1 ) CHCVC , CHDVC

CHBVC = CONJG((1 .2.2.2))

CHCVC = CHBVC - ( 1 . 2 . - 2 . 2 ) CHBVC = C0NJG((-1 .0.2.0E-D)

CHDVC =

" CHBVC - ( - 1 . 0 , -2 . OE - 1 ) WRITE (NUVI, 0711) CHCVC, CHDVC

CHBVC =" CON JG ( ( . 1 , . 2E0 ) ) CHCVC = CHBVC - ( . 1 , - . 2E0)

CHDVC = CON JG( (.0,-0. E 6 )

)

WRITE (NUVI, 0711) CHCVC, CHDVC

WRITE (NUVI, 0712)

FORMAT (4(/ F17.7, F10.7))

FORMA f (7 7 218 H ALL A B 0 V E A N S W E R S MUST BE 0 FOR TH I S 7 1

X

131H TEST SEGMENT TO BE SUCCESSFUL.)

* END OF TEST SEGMENT 071

* WHEN EXECUTING ONLY SEGMENT 071, THE STOP

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

0711

0712

C * * * *

c * * * *

c * * t *

c * * * *

c"=

c =

AND

C = END CARDS

P071

P071

P071

P071

PO 71

P071

P 0 71

P071

P 0 7 1 P071

P 0 7 1 P071

PO 71

P071

02 0 0 0210

02 2 0 0230

02 40

02 5 0 0260

02 70

0280

0290

030 0 0310

0320

03 3 0 P071

P071

P071

P071

P 0 7 1 P071

P 0 71

P071

03 40

03 5 0 0360

03 70

03 80

0390

0400

0410

P0 7 1 0420

P071 0430

P 07 1 0 4 4 0 P0710450

p 6 7 1 046 0 P071 0470

P0710480

P071 0490

P0710500

PO 7 1 0 5 1 0

P 0 7 1 C

1

P 0 7 1 C 2

* * t * * * * t * t * * f

"'6 7 2i o1 6 i 6

P0720020

PO 720036

PO 720040

* V * * * *

' * * *

'* "* * p 6 72 0 056

ASA REF P0720060

8.2/32P0720070

(TABLE 3)P0720080

STOP

END

C * * * t

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

IFBMS - (072)

*

*

**t«t<<««tt«ttt*««ttt«i>t«ttt»tttt»tt*t«t«<t<t*t«t«<*«t<

* GENERAL PURPOSE

* TEST THAT ALL INTRINSIC FUNCTIONS WOULD ACCEPT

» ANY EXPRESSION OF THE TYPE SPECIFIED IN THE

NBS FORTRAN Test Programs Version 1 91
m tiiTnvkiATr* r I I 11 r T 1 n 11 TABIC A C A OC CC 0 7 / A 1 1*7 C****« INTRINSIC FUNCTION TABLE - ASA RerS - o.t/Ui-4/ DATOAAftA P07Z0090

C***«* GENERAL COMMENTS H A *? "1 A 4 AA P07201 00

/> r* »* r- urn Arc T A A 7 4 A P P liy C n 1 1 A F) U T 11 T C****« SEGMENTS 055 TO 071 ASSUMED WORKING Pi A 7 *) ft 'I 4 A P 0 7 Z 0 1 10

c * * * * * P0720 1 20

c * * * * * 0 u tTPUT ri ii t tTAPE a iii c a c c t r> umc ki t ctatcmcwt m rt t m o i i t t a d c ASSluNnENI blAlcncNI. NU INrul 1 Arc • nA7*5A4 7A P07Z0130

c * * * t * n A 7 O A 4 / A P 0 72 0 1 4

0

C * * * * * WHEN EXECUTING ONLY SEGMENT 07Z, THE FOLLOWING STATEMENT H A A 7 4 / "7 A P 0 0 7 1 4 7 0

C * * * * * NUVI = 6 MUST HAVE THE L- IN LULUnNS T ANU c KEnUVEU. H A A 7 4 / 7 C P 0 0 7 1 4 7 5 C= NUVI = 6

n A A 7 4 / OA POG/i 4 8 0 NUVI - 6

n a f ~i n 4 P 0 72 B

1

c * * * * * n A A 7 4 / OC

WRITE (NUVI ,0720) n A O "i A 4 CA P0720 1 50

0720 FORMAT ( 1 HI , 1 X , 3 7H I FBMS - ( 072 ) BASIC FORTRAN I NTR I NS I C / 1 OX

.

H A 7 7 A 4 Z.A P 0 7 2 0 1 6 0 128HFUNCTI0NS ACCEPT EXPRESS I ONS / 1 OX , 3 OHO F TYPE SPECIFIED IN

¥

I C T*nA77A4"7A .F.TAP0720170

2BLE//1 5H ASA REF.- 8.2//2X.7HRESULTS) n A 7 7 A 4 OA P 0 7 Z 0 1 8 0 C***«* HEADER FOR SEGMENT 072 WRITTEN nA"7*}AiriA

P 0 7 2 0 1 9 0 C*«*** TEST ABS - ABSOLUTE VALUE OF REAL ARGUMENT aa .Z/11P0/Z0Z00

CMAVS = 0.5 P\ A O "1 A 1 4 A P 0 72 0 2 1 0 CMBVS = -.25 OA77A77A P07Z0ZZ0

CMCVS = 16.0 nA77A77A P07Z0Z30

CMDVS = -4.0 r\ f\ 7 7 t\ 7 1 f\ P07Z0Z40

CMEVS = ABS( CMAVS + CMBVS) +1.0 OA77A7CA P07Z0Z50

CMFVS = CMEVS - (0.5 - .25) - 1.0 P0/Z0Z60

CMEVS = ABS(0.0 -ABS(CMAVS - CMCVS+ CMDVS)) RAOTATOA P0720270

CMGVS = CMEVS + (0.5 - 16.0 - 4.0) OA77A70A

CMEVS = ABS(CMAVS + 1.0 - (CMCVS + CMDVS) + 0.5 * 8.0) nAOTAIAA P0720290

CMHVS = CMEVS + (0.5 + 1.0 - (16.0 - 4.0) + 4.0) PQ7Z0300

CMEVS = ABS ( 1 .0E0 + (1.0 * 1.0 / 1.0) **2) n A O 7 A 7 4 A P0 7203 1 0 CMIVS = CMEVS - 2.0 HA77A77A P07Z03Z0

WRITE (NUVI, 0721) CMFVS , CMGVS . CMHVS , CMIVS f\AO")A*77A P0720330

C*t*** TEST OF IABS - ABSOLUTE VALUE OF INTEGER ARGUMENT 08 7 /4 7I".A77A7/ A .Z/1ZP07Z0340

MCAVI = 2

P\ A O *1 A O C A P0720350

MCBVI = 10 nA77A7Z.A P07Z0360

MCCVI = IABS (MCAVI + MCBVI) HAOTAOOA P07Z0370

MCDVI = MCCVI - 12 HA77A70A P07Z0380

MCCVI = I ABS ( M CAV I * 2 + MCBVI / 2) +1 P0720390

MCEVI = MCCVI - 10 n A 7 7 A / AA P07Z0400

MCCVI = I ABS< -MCBVI /(-2) - MCBVI * * 1 + ( 1 * 2 * 3 / 2 - 3

)

-

4 A HA77A/4A 10 P07Z0410

1 + 10 + MCBVI / MCAVI - 5) n A 7 7 A / OA P07Z04Z0

MCFVI = MCCVI - 5 H A 7 7 A / 7 A P07Z0430

MCCVI = I ABS ( 0 - I ABS < - 5 * 1 / 5 - 5 * I ABS < - 1 > ) ) n A 7 7 A / / A P07Z0440

MCGVI = MCCVI - 6

H A 7 7 A / CA P07Z0450

WRITE (NUVI, 0722) MCDVI , MCEVI , MCFVI , MCGVI O A 7 7 A / L A P07Z0460

C***** TEST OF FLOAT - CONVERSION FROM INTEGER TO REAL A8 o / onnA^TA/ OA .2/29P0720470

CMEVS = FLOAT (MCAVI + MCBVI) OAOOA / OA P07Z0480

CMFVS = CMEVS - 12.0 nAOOA/ nA P07Z0490

CMEVS = FL0AT(MCAVI * 2 /4 + MCBVI ** 1) OAOTACAA P07Z0500

CMGVS = CMEVS - 11.0 P07Z0510

CMEVS = FL0ATU 23 + 46)/69 + 1 0 - MCBVI) *2.0 + 1.5 HAOOACOA P07Z05Z0

CMHVS = CMEVS - 3.5 nA"7"5AC7A P07Z0530

CMEVS = (76.5 * 1.0 - FLOAT (76 * 1 ) ) * 4.0 P0720540

CMIVS = CMEVS - 2.0 rtATTAC CA P0720550

WRITE (NUVI, 0723) CMFVS, CMGVS, CMHVS. CMIVS riAOTACilA P0720560

C»*t*» TEST OF I F I X - CONVERSION FROM REAL TO INTEGER 8

~% / ^AnA^OACOA .2/30P0720570

MCCVI = I F I X ( CMAVS - CMBVS) nAOOACOA P07Z0580

MCDVI = MCCVI r\A"7TACnA P0720590

MCCVI = I F I X ( CMAVS *1.0 + CMBVS/CMBVS - (CMCVS - CMDVS)) HAOOAilAA P07Z0600

MCEVI = MCCVI + 18 P0 72 06 1 0 MCCVI = 1 + IFIX(2.5 * 2.0) - IFIXdO.O /2.0) r\A*7TAZ. TA P07Z0620

MCFVI - MCCVI - 1 P07Z0630

MCCVI = 2 + IFIX(2.5 *» 1.0 + (10.65 + 3.45)) P07Z0640

MCGVI = MCCVI - 18 r^ATTA / CA P0720650

WRITE (NUVI, 0724) MCDVI. MCEVI, MCFVI, MCGVI HAOOA/iA P07Z0660

C***.t TEST OF SIGN - TRANSFER OF SIGN WITH REAL ARGUMENTS A8

^ / T^nAT^A^TA .Z/31P07Z06/0

CMEVS = SIGN(CMAVS+CMDVS, CMDVS-CMBVS) OAOOAZ OA P0720680

CMFVS = CMEVS - (CMAVS + CMDVS) I^AT^A / AA P0720690

CMEVS = SIGN(25.0 + 0.0 * 4.0,-24.4/6.1 * 1.0) I^ATOA*7AA P0720700

CMGVS = CMEVS + 25.0 nA77A71 A P0/Z0/1

0

92 NBS FORTRAN Test Programs Version 1
- DluNUU.5,5lljNlt.U,-*.))} PO 7Z 0 7Z 0

C M LI \t 0 LPInvb - mcwc i. 1 A Q P 0 7Z 0 7 3 0

LfltVs — c i r ii / 1 a c t r m i ? a c t r m / ~> a 1 au ^ - bluNU .U,sIuNi-t.U,bHiNu.U,-l ,0);; D A 7 *7> A 7 / A

P 0 7Z 0 74 0

P M T \/ C - Lrltvo + 1 . U P 0 7Z 0 7 D 0 W K 1 1 b \ nuv I , v / &j ) LflrVb , Lnbvb, LrlnVb, LnIVS Bft77A7I

A

P 0 7Z 0 76 0 C«*«t* TEST OF I SIGN - TRANSFER OF SIGN WITH INTEGER ARGUMENT O ^ /7^rtA7"5A77A

o . Z / 3 Z PO 7Z 0 7 70

MCCVI = ISIGN(MCAVI .MCAVI + MCBVI - 13) DA77A70

A

PQ7Z078Q

MCDVI = MCCVI + 2 AA77A7fiA P07Z0790

MCCVI = I S I G N < 1 0 . - 5 - 10/2 + 1**2) nA7*5A0AA PQ/Z0800

MCEVI = MCCVI + 10 P0/Z0810

MCCVI = I S I G N < 1 + 2 + 3 . ISIGN<-2,7 + 5)) nA77AOOA P0/Z08Z0

MCFVI = MCCVI - 6 DA77A87A

MCCVI = ISIGN(1 , I S I GN ( - 1 , I S I GN ( + 1 ,-1 ) ) ) MCGVI = MCCVI + 1 WRITE < N U V I .0726) MCDVI . MCEVI

C***** TEST OF COMBINATION OF ABS

CMEVS = FLOAT (IABS( I F I X ( A B S

( - 5 CMFVS = CMEVS - 4.0

MCFVI, MCGVI

IABS, FLOAT, I F I X

,

6 + SIGN(-1 .0.2

SIGN, ISIGN

0 ) ) ) ) )

P0720840

P0720850

P 0 7 2 0 8 6 0 P0720870

P 0 7 2 0 8 8 0 P0720890

P0720900

P0720910

P0720920

P0720930

P0720940

P0720950

P0720960

P0720970

9 0 72 098 0 P0720990

MCCVI

MCDVI

CMEVS

CMGVS

IFIX(FL0AT(ISIGN(1+2, I A 8 S < 1 + I S I G N ( 1 , - 1 ) ) ) ) ) MCCVI - 3 SIGN (ABS (1.6 + FLOAT (-20)) , F L0AT ( I FIX( 1V0T)

)

CMEVS - 19.0

MCCVI = ISIGNC I ABSC IFIXC 0) 2) -((1 + I F I X < - 1 .0)) +1))

1

MCEVI = MCCVI + 1 WRITE (NUVI ,0727) CMFVS, CMGVS, MCDVI, MCEVI

CMEVS = ABS(SIGN(1.0 + 2.0, F L0AT ( I ABS ( -2 ) ) ) ) CMFVS = CMEVS - 3.6

MCCVI = IABS( IFIX(SIGN(-2. 0,2.0)))

MCDVI = MCCVI - 2 P 0 7 2 1 0 0 0 CMEVS = 1.2 + FLOAT ( 1 + 5 - ISIGN(-1,6)) P0721010

CMGVS = CMEVS - 6 . 2 P0 7 2 1 0 2 6

MCCVI = 25 - ISIGN(IFIX(2.0).-IABS(-5)) P0721030

P 0 721 040

P0721 050

P 0 7 2 1 0 6 0 P0721070

P 0 7 2 1 0 8 0 P0721 090

P0721 100

P0721 1 1

0

P 6 72 112 0 P0721 130

P 0 721 1 40

MCEVI = MCCVI - 27

WRITE (NUVI. 0728) CMFVS, CMGVS, MCDVI, MCEVI

STATEMENTS

TEST OF ABS IN EXPRESSIONS -/

OF

OF

OF

OF

OF

COMBINATION

1 ) , 2(7 I 15))

FORMAT ( 2(F17.1/). 2(115/)/ 35H ALL ABOVE ANSWERS SHOULD BE 0 FOP0 72 1 1 5 0

1 R / 2X , 3 5HTH I S TEST SEGME NT TO BE SUCCESSFUL.)' P0 72 1 1 60

* END OF TEST SEGMENT 072 P 0 72 1 1 7

0

* WHEN EXECUTING ONLY SEGMENT 072 , THE STOP AND END CARDS P072 1 1 80

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0 7 2 1 1 9 0

* IN COLUMNS 1 AND 2 REMOVED. PO 72 1 200

STOP P 0 7 2 1 2 1 0 END

STOP

END P072C2

******t*t*******************»***************t***********«*tt****t**P0730010

* PO 73 6 02 0

* IFFMS - (073) P0730030

* P0730040

»<»t«it»»it»«itt»ti»iii»iiniinttutm»tiii»iiti«tii«tn«t»»t»*t«P0730050

* GENERAL PURPOSE ASA RE F PO 730 060

* TEST THAT ALL INTRINSIC FUNCTIONS IN FORTRAN WOULD 8 . 2 / 0 7P0 73 0 0 70

* ACCEPT ANY EXPRESSION OF THE TYPE SPECIFIED IN THE (PG 2 4 ) P 6 7 3 6 6 8 6

* INTRINSIC FUNCTION TABLE - ASA REFS - 8 . 2 /TABLE 3 P0730090

SEGMENTS 0 5 5 - 07 1 ASSUMED WORKING. P0730 1 00

P07301 10

P0730120

P001 1 760

P001 1 765

P001 1 770

c * * * * * END OF TEST

072 1 FORMAT ( / 30H

0722 FORMAT ( 31H

0723 FORMAT ( 32H

0724 FORMAT ( 31H

0725 FORMAT ( 31H

0726 FORMAT ( 32H

0727 FORMAT ( 40H

4(F17.1/))

IABS IN EXPRESSIONS -7 4(115/1)

FLOAT IN EXPRESSIONS -/ 4(F17.1/))

I FIX IN EXPRESSIONS -/' 4(115/))

SIGN IN EXPRESSIONS -/ 4(F17.1/))

ISIGN IN EXPRESSIONS -/ 4(115/))

OF ALL INTRINSIC FUNCTIONS,

TEST

TEST

TEST

TEST

TEST

1 2(/F17

0728

C * * * *

C * * * *

c * * * *

c * * * * c=

c= P072 1 220

P072C1

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

SPECIFICATIONS SEGMENT 073

* WHEN EXECUTING ONLY SEGMENT 073, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

NBS FORTRAN Test Programs Version 1 93
c * * * *

c * * * *

c = c=

c=

c=

* IN COLUMNS 1 AND 2 REMOVED.

* DIMENSION M C A 1 I ( 5 ) . AC2S ( 5.6)

INTEGER M C A 3 I (2.3.3)

P001 1775

P001 1 780

POO i 178 5 P00 1 1 790

DOUBLE PRECISION DPAVD , DPBVD . DPCVD . DPDVD . DPEVD . DPFVD . DPGVD , PO 0 1 1 79

5

1 DPA1 D < 5 ) ,FC2D(5,5> POO 1 1 800

DIMENSION MCA1 I (5 ) ,AC2S(5.6) P073A1

INTEGER MCA3I (2,3,3) P073A2

DOUBLE PRECISION DPAVD, DPBVD ,DPCVD, DPDVD, DPEVD, DPFVD, DPGVD, P 6 73 A3

1DPA1D(5).FC2D(5,5> P073A4

* POO 1 1 805

P07301 30

POO 71 490

P0071495

P 0 0 7 1 5 0 0 P0071 505

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c =

« OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 073, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

C * * * *

0 73 0 WRITE (NUVI, 0 730 ) FORMAT <1H1.1X.41HI FFMS - (073) FORTRAN INTRINSIC

1 26HACCEPT EX PRESS 10 NS OF TYPE / 1 6X , 22HSPE C I F I ED IN

223H ASA RE F

. - 8.2/TABLE 3 / / 2X , 7HRESULTS )

t HEADER FOR SEGMENT 073 WRITTEN

* TEST OF DABS IN EXPRESSIONS

C * * * *

c * * * *

P073B1

P007 1 5 1 0 P 0 73 014 0 FUNCTI0NS/16X, P0730150

"I . F .TABLE/ PO 7 3 0 1 6 0 P0730170

P 0 73 01 8 0 2/13P0730190

DPAVD = 1 .25D0 P0730200

DPBVD = - 10. ODO P0730210

DPCVD = DABS ( DPAVD + DPBVD) P0730220

DPDVD = DPCVD - 1 0 . ODO + 1 . 2500 P0730230

DPCVD = DABS ( 1 .000 + 2. DO - 3. ODO * 50 .0-1 ) P0730240

DPEVD = DPCVD - 12. DO P0730250

DPCVD = DABS ( DPAVO * 1 .DO - 1 .25D0 + DPBVD/2 .DO) + 1 .DO P0730260

DPFVD = DPCVD - 6. ODO P0730270

DPGVD = 1 .ODO DABS < 2.500 - 1 .5 00 * 1 .000) - 2. DO P0730280

WRITE (NUVI, 0731) DPDVD, DPEVD. DPFVD. DPGVD P0730290

C****» TEST OF AINT IN EXPRESSIONS 8.2/14P0730300

CMAVS = 1.23 P0730310

CMBVS = 27.998 P0730320

CMCVS = -9.007E0 P0730330

CMDVS = AINT(CMAVS + CMBVS - CMCVS) P0730340

CMEVS = CMDVS - 38.0 P0730350

CMDVS = AINTd. 0 + 2.0 / 1 . 0 - 3.0 * 2. EO) P0730360

CMFVS = CMDVS + 3.0 P0730370

CMDVS = AINT(4. + AI NT ( 2 . E 0 + CMCVS)) P0730380

CMGVS = CMDVS + 3.0 P0730390

CMDVS = AINT(AINT(AINT( 1.4 - 2.7))) P0730400

CMHVS = CMDVS + 1.0 P0730410

c * * * *

MCAVI

MCCVI

MCAVI

MCDVI

C * * * *

WRITE (NUVI, 0732) CMEVS, CMFVS, CMGVS, CMHVS

* TEST OF I NT IN EXPRESSIONS

MCAVI = I NT ( 1 . 0 + 2 .1 + 3. 2 - 8 . 4 / 2 . 5 * 2 . 6 ) MCBVI = MCAVI + 2

I NT (100 . 0/6 . 0 - (2 . 6

*"* 4.0) < < < 2.0-3.0 ) + 4 MCAVI - 6

INT ((100.2/ 6.1/5.0 + 4.10) / 2.6)

MCAVI - 3

' M C A V I = I NT (9. 6 7 2.0 ) + INT (5. 1/4.0)

MCEVI = MCAVI - 5 WRI TE ( NUVI . 0733 ) MCBVI , MCCVI, MCDVI . MCEVI

* TEST OF I D I NT IN EXPRESSIONS

D P A 1 0 < 1 ) = 2. 5D1

MCAVI = I D I NT ( DPBVD / 2. ODO + 1.5D0)

MCBVI = MCAVI + 3

MCAVI = IDINT( 1.0D1 + 5. DO * 2.01 / 49. D1) + 1 MCCVI = MCAVI - 11

MCAVI = I D I NT < DPA1 D < 1 ) ) MCDVI = MCAVI - 2 5 MCAVI = IDINT(DPA1D(1 ) + 0 P A 1 D ( 1 ) / 4 . 0 0 0 ) MCEVI = MCAVI - 31

WRITE (NUVI. 0734) MCBVI. MCCVI. MCDVI, MCEVI

0) * 2.0) )

P0730420

8.2/15P0730430

PO 73 6 440

P0730450

' P0730460

P0730470

P 6 73 0 48

6

P0730490

PO 7 3 0 5 0 0 P0730510

PO 73 6 5 20

2/16P0730530

P 0 7 3 6 5 4 6 P0730550

P 0 7 3 0 5 6 0 P0730570

PO 730 5 80 P0730590

P 0 7 3 0 6 0 0 P073061

0

P 0 7 3 0 6 2 0 P0730630

8

94 NBS FORTRAN Test Programs Version 1
C**«** TEST OF AMOD , HOD IN EXPRESSIONS 8 . 2 / 1 7 - 1 8 P 0 73 0 6 4

0

AC2S ( 1 . 1 ) = 27.0 P0730650

CMDVS =AM0D(25 . 0 AC2S( 1 . T> , 1.6 * 5.0) P 0 73 0 66 0 CMEVS = CMDVS - 2.0 P0730670

CMDVS =AMOD(99.0,AMOD<25.0+ 2 7 . 6 , 5 . 6')) P0730680

CMFVS = CMDVS - 1.0 P0730690

MCA3M 1,2,3) "=" 5 PO 730700

MCAVI = M0D(98 + 1 . MOD ( 2 5 + 27 , 5 )) P073071 0 MCBVI = MCAVI - 1 P 073 0720

MCAVI = MOD (MCA3I (1,2,3), 2) P0730730

MCCVi = MCAVI - 1 PO 730740

WRITE (NUVI, 0735) CMEVS. CMFVS, MCBVI, MCCVI P0730750

C • • * * * TEST OF AMAXO, AMAX1 .. MAXO. MAX 1 AND DMAX1 IN EXPRESSIONS "PO 73 0 760

C***»* 8.2/19-23P0730770

FC2D( 1 . 1 ) = 27. ODO P0730780

CMDVS = AMAX0(5 + 9. MAX0(14 * 2, MAX1 ( 2.0/1.0,1.0))) P0730790

CMEVS = CMDVS - 28.0 P0730800

CMDVS = AMAX1 ( (AMAXO( (MAX0 ( 29, - 1 00 ) ) , 5 + 1 0 )), 2 . 0 * 2 . 0 ) P0 73 08 1 0 CMFVS = CMDVS - 2 9.0 PO 73 0 82 0 MCAVI = MAX1 ( (AMAXO ( 2 5 , -( 1 * 5 ))), 1 00.0 ) P073 083 0 MCBVI =" MCAVI - 100 PO 73 0 8 40

DPCVD = DMAX1 (FC2D( 1 , 1 ) ,DMAX1 ( 1 .ODO, O.DO * FC2D(1,1))) P073 08 5 0 DPDVD = DPCVD - 27. ODO p 0 73 0 8 60

WRITE ( N U V I ,0 736 ) CMEVS, CMFVS, MCBVI, DPDVD P0730870

C

:'* TEST OF AMINO, AMI N1 , MI NO ,"" MINI AND D M I N 1 I N EXPRESSIONS PO 7 3 0 880

C***** 8 . 2 /24-27P0730890

CMDVS = AM IN 1(2. 5 + AC2S( 1 . 1 ) , AM I N 0

( - 5 , MINO(0, 1 ) ) ) PO 7 3 0 90 0 CMEVS = CMDVS + 5.0 P0730910

MCAVI = M I N 0 ( ( M I N 1 ( -99., 1 00.0 - 1.0 * 99. ) ) , 2 ) PO 73 0920

MCBVI = MCAVI + 99 P0730930

MCAVI = MINI ( 2.0, AM INK 5 . * 3.0, - 9.0 /'(- 9.6))) PO 73 09 40

MCCVI = MCAVI - 1 P0730950

DPCVD = DM I N 1 ( F C2 D ( 1 , 1 ) , DM I N 1 ( 2 . OD- 1 , 0. 000 ) ) PO 73 0960

DPDVD = DPCVD - O.ODO P0730970

WRITE (NUVI.0 73 7 ) CMEVS, MCBVI .MCCVI. DPDVD P 0 7 3 0 9 8 0 C***** TEST OF DS I GN , AND DBLE IN EXPRESSIONS 8 . 2 / 3 3 , 8 . 2 / 43 P 0 7 3 0 9 9

0

DP C VD = DSIGN(FC2D(1 , 1 ) * 1.001. - 1 . ODO) P 073 1 000

DPDVD = DPCVD + 27.0D1 P 0 73 1 0 1 0 DPCVD = DSIGN( (DSIGN(2.0D0, - 1 . 0 D 0 ) + O.ODO) , .000 ) P 6 73 1 0 2

6

DPEVD = DPCVD - 2. ODO P073 1 030

DPCVD = DBLE( 2.0 * 4.0 + AC2S( 1.1)) P 0 73 1 040

DP F VD = DPCVD - 35. ODO P073 1 0 5 0 DP C VD = D B L E

( - 3 2.00 7 876) * DBLE (-2.0) PO 73 1 060

DPGVD = DPCVD - 8. ODO P073 1 070

WRITE (NUVI , 0738 ) DPDVD, DPEVD, DPFVD. DPGVD P073 1 080

Ctt*** TEST OF DIM AND IDIM IN EXPRESSIONS 8 . 2 / 3 4 - 3 5 P 0 73 1 0 9

0

CMDVS = DIM( 2.0 * 3.5 17. 6, AC2S( 1 , 1 ) ) P073 1 1 00

CMEVS = CMDVS - 0.0 P 0 7 3 1 1 1 0 CMDVS = D I M ( DIM (9.6,-5.5), DIM (6.6,6.6)) P 6 731 1 20

CMFVS = CMDVS - 8.5 P 0 73 1 1 3

0

MCA1 I (1.) = 8 PO 731140

MCCVI = IDIMCHCA1 1(1 ) * 1, - (IDIh(0, -3))) P 0 73 1 1 5 0 MCDVI = MCCVI - 11 P0731 160

MCCVI = IDIM(((4 + 2 3)/3). - 2) PO 73 1 1 70

MCEVI = MCCVI - 5 P073 1 1 80

WRITE (NUVI. 9995) CMEVS. CMFVS, MCDVI. MCEVI P0731190

C * * * * * TEST OF SNGL. REAL , A I MAG , CMPLX AND CON JG IN EXPRESSIONS P073 1 2 00

C*»**« 8.2/36-47P0731210

CMEVS = SNGL ( 1 . ODO * 2 . D 1 + AC2S( 1 . 1 ) ) PO 73 1 22 0 CMFVS = CMEVS - 47.0 P0731230

CMEVS = REAL ( CON JG( (1.0, -2 .6) ) ) A I MAG ( (99.6, -7. 6) ) P0731 240

CMGVS = CMEVS + 6.0 P0731250

CMEVS = AIMAG(CMPLX(REA L ( ( 2 .0.1 . 0 ) ) , S N G L ( 1 .ODO))) P073 1 260

CMHVS = CMEVS - 1.0D0 P0731270

WRI TE ( NUVI ,07 39 ) CMFVS. CM G VS. C MHVS P073 1 280

C**t«* SOME COMBINATIONS OF ABOVE INTRINSIC FUNCTIONS P0731290

CMEVS = AM I N 1 ((FLO AT < I D I M ( 1+2 . 6 ) ) ) , ( A I MAG ( CMPLX ( 1 .6,2.6) ) ) ) P 0 7 3 1 3 0 0 CMFVS = CMEVS - 2.0 P 0 73 1 3 1 0

NBS FORTRAN Test Programs Version 1 95
CMEVS = REAL(CMPIX(SNGL(DABS(-DSIGN(DBLE(2.0> , 1 . 000 ) ) ) , CMAVS > ) P0731320

CMGVS = CMEVS - 2.0 P0731330

WRITE (NUVI .9994) CMFVS, CMGVS P 0 7 3134

0

C»***t END OF TEST STATEMENTS FOR SEGMENT 073 P0731350

073 1 0732

0733

0 73 4

0 73 5

FORMAT

FORMAT

FORMAT'

FORMAT

FORMAT

1 2(E19

(/ 30H TEST OF DABS IN EXPRESSIONS //4(D23.8/))

( 30H TEST OF AINT IN EXPRESSIONS //4(E19.6/>)

"< 30 H TEST OF INT IN EXPRESSIONS //4(il6/)

)

( 30H TEST OF I D I NT IN EXPRE SS I 0 NS / / 4 ( 1 1 0 / ) >

( 3 5 H

' TEST OF A MOD. MOD IN EXPRESSIONS //

6/ ) , 2(110/))

P0731360

P0731370

P 0 7 3 1 3 8 0 P0731390

P0 73 U00

P0 73 1 4 1 0 PO 73 1 42 0 P073 1 430

P0731 440

P0731 450

0736 FORMAT ( 40H TEST OF AMAXO

1 2(E19.6/) , 110/ D23.8)

0737 FORMAT ( 40H1 TEST OF AMINO

1 E19.6/ 2( L10/) , D23.8)

AMAX1 ,MAX0,MAX1 AND DMAX//

AM I N 1 ,MIN0,MIN1 AND DM I N / /

0738 FORMAT (/ 39H

0739 FORMAT ( 35H

12 3H CON JG IN

9994 FORMAT ( 36H

TEST OF DSIGN AND DBLE IN EXPRE SS I 0 N S / / 4 ( D23 . 8 / ) ) P0 73 1 460

TEST OF SNGL,REAL,AIMAG, CMPLX AND / P0731470

EXPRESSIONS / / 3 ( E 1 9 . 6 / ) ) P 0 73 1 4 8 0 TEST OF SOME COMBINATIONS OF ABOVE/ P0731490

9995

122H INTRINSIC FUNCTIONS / / 2 < E 1 9 . 6 / ) / 4 0 H ALL ABOVE ANSWERS SHOULP0731 500

2D BE 0 FOR THIS/27H SEGMENT TO BE SUCCESSFUL.) P 0 7 3 1 5 1 0 FORMAT ( /37H TEST OF DIM AND IDIM IN EXPRESS IONS / 2 ( E 1 9 . 6/ ) i P 6 7 3 1 5 2 0

1 2(110/)) P0731530

P 0 7 3 1 5 4 0 P0731 550

P 0 7 3 1 560

P0731 570

PO 73 1 5 80

P0731 590

END CARDS

C*«*** END OF TEST SEGMENT 073

C****» WHEN EXECUTING ONLY SEGMENT 073, THE STOP

C

*"'£*"«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C**"t*t IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C = END

AND

C =

STOP P073C1

END P0 73 C2

t***»**************ti**************<r*»*****t************t***«***t**P0800010

* P0800020

* EXPON - 080 P0800030

* PO 8 0 0 0 4 0 ************************************nr***t*********************t****P0800050

C * * * *

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c =

GENERAL PURPOSE

.TO TEST BASIC EXTERNAL FUNCTION - EXP - EXPONENTIAL

.USED IN SIMPLE ARITHMETIC EXPRESSIONS

.INTRINSIC FUNCTIONS ABS AND SIGN ASSUMED WORKING

ARGUMENTS ARE POWERS OF 2

NO SPECIFICATIO SEGMENT 080

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 080, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI =

6

WRITE(NUVI

ASA REFP0800060

8.3.3 P 6 a 0 0 0 7 0 TABLE 4P0800080

P0800090

P0800100

P 080 0 1 1 6 P0800120

PO 8 0 01 3 0 P08001 40

P0071 520

P0071 525

POO 7 i 53 0 P0071 535

P080B1

P08 00 1 5 0 P0800160

P08001 70

PO 800 180

P0800190

p 6 8 6 02 ob

P 0 8 0 02 1 0 P 6 8 00226

P0800230

p 0 8 6 02 4 0 P0800250

P0800260

P0800270

P0800280

P0800290

PO 8 00300

P 0 8 003 1 0 P 08 6 0320

P0800330

8 0 0 ) 800 F 0 RMAT ( 1 5 H 1 EXPON - ( 080W/31H BASIC EXTERNAL FUNCTION

1//26H (EXPONENTIAL -TYPE REAL)

2//27H ASA REF. - 8.3.3 (TABLE 4 ) / / 2 4 H LINE 1 OF EACH PA I

R

3 HOLLERITH I N F 0 RM AT I 0 N / / 9H RESULTS)

EXPIS/23H

C * * * *

C * * t *

* HEADER FOR SEGMENT

* ARGUMENT RANGE FROM

AVS = -16.

6

CVS = 4.0

BVS = EXP (AVS)

WRITE (NUVI, 801) BVS

BVS = EXP (2. * CVS + AVS)

WRITE (NUVI, 802) BVS

BVS = EXP (AVS + (3. * CVS)

)

WRITE (NUVI, 803) BVS

BVS = EXP (ABS (AVS) + AVS)

WRITE (NUVI, 804) BVS

BVS = EXP ( -AVS / CVS j WRITE (NUVI, 805) BVS

080 WRITTEN

16.0 TO +16

96 NBS FORTRAN Test Programs Version 1
801

8 02

803

8 04

805

806

807

808

BVS = EXP(SIGN(AVS * CVS * 2.0, CVS)) P0800340

WRITE (NUVI, 806) BVS P0800350

BVS = EXP ( CVS + ABS(AVS) - 4.0) P0800360

WR I TE ( NUV I . 807) BVS P0800370

P0800380

P0800390

P 0 8 0 0 4 0 0 P080041

0

P08 0 0 420

P0800430

P 0 8 0 0 4 4 0 P0800450

WRITE (NUVI. 808 ) FORMAT ( 9H0 X = - 1 6 . 0 , 5X , 2 5 H 0 . 1 1 2 5 3 5 1 7 4 7 1 92 5 9 1 1 4 5 E - 06 / E 2 7 . 7 ) FORM AT ( 9H0 X= -8.0, 5X.25H0.3354626279025118388E-03/E27.7)

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

)

FORMAT ( 9H0 X= 6.0.5X.25H0 .1000000000000000000E + 01/E 2 7.7)

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

)

FORMAT ( 9H0 X= 8 . 0 , 5X , 2 5 HO . 2 9 8 0 9 5 79 8 70 4 1 72 8 2 7 5 E + 0 4 / E 2 7 . 7 > 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 )

C * * *

C * * *

C * * *

C * * *

c'= c =

F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H C AL CUL AT I 0 NPO 8 0 0 460

1 PRINTED TO ,8H7 DIGITS) P0800470

*"* END OF TEST SEGMENT 080 PO 800 480

** WHEN EXECUTING ONLY SEGMENT 080, THE STOP AND END CARDS P0800490

* * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = P 0800500

** IN COLUMNS 1 AND 2 REMOVED. P0800510

STOP PO 8 0 0 5 2 0 END P0800530

STOP

END

P080C1

P080C2

C * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * t

C * * *

c * * *

C t * t

C * * *

C * * *

c * * *

c * * * c=

***********************************»*4*****t*********************t**P0810010

** P0810020

** DEXPO - 081 P0810030

* * P 0 8 1 0 0 4 0 ******************t**4**************4**********************»**«*t***po81005C

- EXPONENTIAL

SAME AS

GENERAL PURPOSE

TO TEST BASIC EXTERNAL FUNCTION - DEXP

USED IN SIMPLE ARITHMETIC EXPRESSIONS

SEGMENT 080 EXCEPT DOUBLE PRECISION

INTRINSIC FUNCTIONS DABS AND DSIGN ASSUMED WORKING

ARGUMENTS RANGE FROM -16.656 TO + 16 . ODO , POWERS OF

** SPECIFICATIONS SEGMENT 081

P081 0060

ASA REFP081 0070

8.3.3 P0810080

TABLE 4P081 0090

P 0 8 1 0 1 0 0 P 0 8 10110

P 0 8 1 0 1 2 0 PO 8 1013 0 P001 1 81

0

* *

WHEN EXECUTING ONLY SEGMENT 081, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

I N COLUMNS 1 AND 2 REMOVED

.

P001 1 81 5 P0 0 1 1 820

P 0 01 1 82 5 P001 1830

POO 1 183 5 P081 A1

POO 11840

P 0 8 1 0 1 40

PO O 715 40

P0071 545

P0071 550

P0 0 7 1 5 5 5

DOUBLE

DOUBLE

PRECISION

PRECISION

AVD

AVD

BVD

BVD

CVD

CVD

C * * * * *

C *,.*.*** 0 U T P U T T A P E ASS I GNMENT STATEMENT . NO I NPUT. TAPE

C * * * * *

c * * *

c * * *

c =

WHEN

NUV I NUVI =

EXECUTING

= 6 MUST

6

ONLY

HAVE

SEGMENT 081, THE FOLLOWING STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

C * * * 810

C * * * * *

NUVI = 6 P081B1

* P0071560

FO RM AT ( 1 5 H 1 DEXPO - ( 08 1 ) / /32H BASIC EXTERNAL FUNCTION -DEXP- P 0 8 1 0 1 5

0

1//38H (EXPONENTIAL -TYPE DOUBLE PRECISION) P 0 8 1 0 1 60

2//27H ASA REF . - 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS / 23 H P 0 8 1 0 1 70

3 HOLLERITH I N F 0 R M AT I 0 N / / 9 H RESULTS) P 0 8 1 0 1 8 0 WRITE (NUVI. 810) P 0 8 1 0 1 9 0 HEADER FOR SEGMENT 081 WRITTEN P0810200

AVD = -16. ODO P 6 8 1 02 1 0 CVD = 4. ODO P0 8 1 0220

BVD = DEXP (AVD) P08 10230

WRITE (NUVI, 811) BVD P0810240

BVD = DEXP (2"; * CVD + AVD) P 0 8 1 0 2 5 0 WRITE (NUVI, 812) BVD P0810260

BVD = DEXP ( AVD + (3 . * CVD) ) P08 102 70

WRITE (NUVI, 813) BVD P0810280

BVD = D EXP (DABS ( A VD j +' AVD ) P 0 8 1 0 2 9 0 WR I TE ( NUVI, 814) BVD P0810300

BVD = DEXP ( -AVD / CVD) P 6 8 1 6 3 1 0 WRITE (NUVI, 815) BVD P0810320

NBS FORTRAN Test Programs Version 1 97
BVD = DEXP(DSIGN(AVD CVO * 2.0D0, CV'D>)

WRITE (NUVI. 816) BVD

BVD = DEXP(CVD + DABS(AVD) - 4.6)

WRITE (NUVI, 817) BVD

P0 8 1 0330

P08 1 03 40

P08 1 03 5 0 P081 0360

811

812

813

814

815

816

817

818

WRITE (NUVI, 818)

FORMAT ( 9H0 X = -16. 0 , 5X.2 5H0 . 1 125351 7 471 9 259 1 1 4 5 D

• 06/D34. 14)

03/D34. 14)

01 /D34. 14)

01 / D34 . 1 4

)

02/D34. 14)

04/D34 . 1 4 ) 07/D34 . 14)

P081

P081

P 6 81

P081

P081

P08 1 P081

P08 1

03 70

03 8 0 0390

0 400

0410

0 42 0

0 43 0

0 440

0 4 5 0 0460

0 4 70

0 4 8 0

0 490

0 5 0 0 P 0 8 1 0 5 1 0 P0 8 1 0 5 20

P081 C1

P081 C2

* P 0 S 2 0 0 1 0 P0820020

P 0 8 2 0 0 3 0 P0820040

*P08200 50

.P0820060

PO 820 6 70

)P0820080

PO 82 0 090

P0 82 0 1 00

P 6 8 2 0 1 1 0 P0820120

P0 0 1 1 8 5 0 P0 0 1 1 8 5 5 POO 1 1 860

POO 1 1 865

POO 1 1 870

P001 1875

PObl 1880

P082A1

P082A2

P0 0 1 1 8 8 5 P08201 30

P0071 570

P0071 575

P0071 580

P0071 585

P082B1

PO O 7 15 90

P0 82 0 1 40

P 0 8 2 0 1 5 0 4P08201 60

RP0 82 01 70

P08201 80

P08201 90

P0820200

P 0 8 2 0 2 1 0 P0820220

PO 8 2 02 30

P0820240

P0820250

P0820260

PO 82 02 70

P0820280

PO 82 0290

P0820300

FORMAT ( FORMAT ( FORMAT ( FORMAT ( FORMAT (

F ORMAT

(

9H0

9H0

'9 HO

9H0

9 HO

9H0

X = x=x=

x=

x=

X= 16

0, 5X.25H0. 3354626279025 1 1 8388D0, 5X.25H0. 1831 5638888 7 341 8029D0 , 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.5X.25H0. 545981 500331 4423908D +

0 , 5X , 25H0 . 298 0 9 5 798 70 4 1 72 82 7 5 D + 0.5X.25H0. 88861 10520507872637D+

PAIR IS THE FUNCTION

C * * *

C * * *

c * * *

C * * *

c"=

c =

F0RMAT(//37H LINE 2 OF EACH

A PRINTED TO ,9H14 DIGITS)

"*' END OF TEST SEGMENT 081

:* WHEN EXECUTING ONLY SEGMENT 081, THE STOP

"* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

:* IN COLUMNS 1 AND 2 REMOVED.

/ 2 5 H

AND

C"= END

CAL CULAT I ONP08

1

P081

P081

CARDS P081

P081

P081

STOP

END

STOP

END

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

C * * *

c * * *

C * * *

c * * *

c * * *

c * * * c=

c=

* * *

* * * iiii(»titititiutimiitititiimmitiiiiitiiimiitiiiiiiiitmii

CEXPO ( 0 8 2 )

ASA REF

8.3.3

(TABLE 4

......... ** GENERAL PURPOSE

TQ TES j THE bXSIC EXTERNAL FUNCTION- CEXP

** .TESTING RANGE EXTENDS FROM 0 TO 16 FOR MODULUS

'*"* AND ARGUMENT, VARIES BY STEPS OF PI/3 MAGNITUDE

** .INTRINSIC FUNCTIONS CMPLX, SNGL, MOD ASSUMED WORKING

* * ** S P E C I F I C A T I 0 N S SEGMENT 0 82

* * ** WHEN EXECUTING ONLY SEGMENT 082. THE SPECIFICATION STATEMENTS

*'* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C =

* * I N C O L U M N S 1 AND 2 REM 0 V E D

t * COMPLEX EP 1 C ( 30 ) , AVC, BVCDOUBLE PRECISION AVD, BVD

COMPLEX EP1C(30), AVC. BVC

DOUBLE PRECISION AVD. BVD

C * * *

C t * *

c * * *

c * * *

C t * * c=

** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

ONLY

HAVE

SEGMENT 082, THE FOLLOWING STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

C * t *

820

** WHEN EXECUTING

** NUVI = 6 MUST

NUVI ""= 6

NUVI = 6

WRITE(NUVI ,820)

FORMAT < 1 5H1 CEXPO - ( 082)7/ 32 H BASIC EXTERNAL FUNCTION -CEXP1// 29H (EXPONENTIAL -TYPE COMPLEX) / /27H ASA REF.- 8.3.3 (TABLE

2W/20H (COMPLEX ARGUME NT ) / 8X , 1 5 HEXPE CTE D RESULT / 8 X , 1 5 H F U N CT I 0 N 3ESULT)

** LOG OF 10

BVD = 2.3025850929940D0

** SINE OF 60 DEGREES

AVD = .86602540378444D0

** INITIALIZE EP 1 C (EXPECTED VALUES)

EP1C(1) = CMPLX(0.5E-7.SNGL(-AVD*1 .D-7))

E P 1 C ( 2 ) = CMPLX(2.5E-7.SNGL(-AVD*5.D-7)

)

EP 1 C < 3 ) = (1 .E-6,0.0)

C 1 1 *

C * t *

c * * *

EP1C(4) = (5.E-6.0.0)

EP1C(5) = CMPLX(0.5E-5,SNGL(AVD*1 .D-5)

)

E P 1 C ( 6 ) = CMP LX ( 2. 5 E- 5, SNGL (AVD* 5. 0-5)1'

EP1C(7) = CMPLX(-.5E-4,SNGL(AVD * 1.D-4))

98 NBS FORTRAN Test Programs Version 1
EP1C<8> = CMPLX(-2.5E-4,SNGL(AVD*5.D-4>)

EP1C(9) = (-1 .E-3.0.0)

EP 1 C ( 1 0 ) = (-5. 1-3,6. 0)

EP1C(11) = CMPLX(-0.5E-2,SNGL(-AVD*1 .D-2>>

P0820310

P0820320

P0820330

P0820340

P 0 8 2 0 3 5 0 P0820360

P 08 203 70

P0820380

PO 82 0390

P0820400

P 08 20 41 0 P0820420

PO 820 430

P0820440

P082 04 5 0 P0820460

P 0 8 2 0 4 70

P0820480

P 08 2 0 4 9 0 P0820500

' P082051

0

P0820520

P0820530

P0820540

P08205 50

P0820560

P0820570

P0820580

P0820590

P0820600

P 6 8 2 0 6 1 0 P0820620

P 6 8 20 630

P0820640

P0820650

P0820660

PO 82 0 6 70

P0820680

P0820690

P0820700

P0820710

P0820720

PO 82 073 6 P0820740

P 0820750

P0820760

P0820770

P0820780

P0820 790

P0820800

P0 82C1

P082C2

* P 0 8 3 0 0 1 6 P0830020

PO 8 3 0 0 3 0 P0830040

P0830050

P0830060

P 0 8 3 0 0 7 0 P0830080

P0830090

P08301 00

P 0 8 3 0 1 1 0 P0830120

PO 83 0 1 3 0 P0071600

P 0 0 7 1 6 0 5 P007161

0

EP1 C( 12) =

E P 1 C ( 1 3 ) =

E P 1 C ( i 4 ) = EP 1 C ( 1 5 ) =

CMPLX(-2.5E-2,SNGL(-AV0

CMPLXCO . 5E-1 ,SNGL(-AVD*1

C M P L X ( 2 . 5E -1 , S N G L

( - AVD * 5 (1.0,0.0)

5 .0-2) ) D-1 ) ) D-1 > )

EP1 C( 16)

EP1 C( 1 7)

E P 1 C( 1 8)

EP 1 C(19)

E P I C ("20 ) E P 1 C ( 2 1 ) E P 1 C ( 2 2 ) E P 1 C ( 2 3 ) EPIC (24)

E P 1 C ( 2 5 ) EP 1 C ( 26)

E P 1 C ( 2 7 ) E P 1 C ( 2 8 ) EP 1 C ( 29 ) E P 1 C ( 3 0 ) IVI = 0

(5.0.0.

CMPLX(

0

CMPLX(2

CMPLX< - CMPLX("-

( -1 . E3 ,

( - 5 . E 3 , CMPLX(-

CMP L X

(

CMPLX(

0

CMPLX(2

(1 . E 6 . 0 (5.E6.0

CMPLX(

0

C M P LX (

2

0 ) .5E1 ,

. 5E1 , 0 . 5E2

5 E 2

0 ) 0 ) 5E4

5E4

.5E5,

.5E5.

.0)

. 0)

. 5E7.

. 5 E 7 ,

SNGL (AVD * 1 . D1 ) ) SNGL ( AVD * 5 . D 1 ) )

, S NG L ( AVD * 1.D2))

, SNGL (AVD * 5.D2))

. SNGL ( -AVD

, SNGL ( -AVD

SNGL ( -AVD

SNGL ( -AVD

1 .D4) )

1 . D5 ) )

5 . D5) )

SNGL (AVD * 1.D7))

SNGL (AVD * 5 . D7) )

821 IVI = IVI + 1 IF ( MOD( I VI . 2 ) . EQ . 0 ) XIVS = ((IVI + 1 )/2)

AVS = BVD * XIVS

GO TO 822

GO TO 823

C***** 1 .609 IS LOG OF 5 822 XIVS = (IVI / 2) - 8 AVS = BVD * XIVS + 1 6094379 1 2434 1 DO

C****t 1 .0 4 7 IS PI /3

823 AVC = CMPLX(AVS

BVC = CEXP(AVC)

WR I TE ( NUV I , 82 4 )

SNGL ( 1 .0 4 7 1 9 75 5 1 1 966D0 * XIVS) )

AVC, EP1CUVI), BVC

IF (IVI - 10) 825, 827, 825

825 IF (IVI - 20) 826, 827, 826

826 IF (IVI - 30) 821, 828, 828

827 WR I TE ( NUV I , 829)

828

829

824

C * * t *

C * * * *

c * * * *

c * * * * c=

c =

GO TO 821

CONTINUE

FORMAT ( 22H 1 CEXPO - (082) -CEXP-)

FORMAT ( 3H0 (,E14.7,1H,,E14.7,1H),2(/8X,2E16.7))

* END OF TEST SEGMENT 0 82

* WHEN EXECUTING ONLY SEGMENT 082, THE STOP AND END

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

CARDS

C * t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * *

«

« t M It > t t t t t • t t t « t t t I t t I I t * t I t * I I t t t I * t t t t t t • > t t t t t < t t • t > t * > t * > t t * t

* GENERAL PURPOSE

* .TO TEST BASIC EXTERNAL FUNCTION - A LOG - ASA RE

F

* NATURAL LOG -USED IN SIMPLE ARITHMETIC EXPRESSIONS 8.3.3

* INTRINSIC FUNCTIONS ABS , AM I N 1 , I NT , M I NO , FLOAT TABLE 4

* SIGN ASSUMED WORKING

*' ARGUMENTS ARE POWERS(OR SUMS) OF 2

LOGTM - 083

U T TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

E CUT I NG ONLY SEGMENT 083, THE FOLLOWING STATEMENT

NUVI 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NBS FORTRAN Test Programs Version 1 99
C= NUVI = 6 P0071615

NUVI = 6 P083B1

C"i"i"t"«"* POO 7 162 0 830 FORMAT < 1 5 H 1 LOGTH - (083 )//32H BASIC EXTERNAL FUNCTION -ALOG- P0830 H0

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 IN FORMATION/ /9H RESULTS) p 6 8 3 0 1 7 0 WRITE (NUVI, 830) P0830180

C*"i"*"«* HEADER FOR SEGMENT 083 WRITTEN P0830 1 90

AVS = .25 P0830200

CVS = 2.0 P0830210

MVI = -2 P0830220

BVS = AL0G(AVS / 2.0) P0830230

WRITE (NUVI, 831) BVS P0830240

BVS = ALOG(AVS) P0830250

WRITE (NUVI, 832) BVS P0830260

BVS = AL0G(AVS * CVS) P0830270

WRITE (NUVI, 833) BVS P0830280

BVS = ALOG(AVS * CVS ** 2) P0830290

WRITE (NUVI, 834) BVS P0830300

BVS = ALOG ( AM I N 1 (AVS * 2.0 + ABS ( F LOAT ( MV I ) / CVS), CVS)) P0830310

WRITE (NUVI, 835) BVS P0830320

BVS = ALOG ( S I GN < FLOAT(MI NO (MVI , I NT( CVS) ) ) , AVS) ) P0830330

WRITE (NUVI. 836) BVS P0830340

831

832

83 3 834

83 5 836

FORMAT ( 9H0 X = 0 . 1 2 5 , 5 X . 1 9H - 2 . 0 79 4 4 1 5 4 1 6 7 9 8 3 5 9 / 1 4X , F 9 . 6 ) P08303 5 0 FORMAT( 9H0 X = 0.25 , 5X , 1 9H- 1 . 3 862 943 6 1 1 1 9 890 6 / 1 4X . F 9.6) P0830360

FORMAT ( 9H0 X = 0 . 5 .5X.19H- 0.69314718 0 5599453/14X.F10. 7) PO 8 3 03 70

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 ) P0830380

FORMAT ( 9H0 X=1 . 5 .5X.19H 0.4054651081081644/1 4X.F10. 7) P0830390

FORMAT ( 9H0 X = 2.0 ,5X,19H 0 . 693 1 4 7 1 8 0 5 5 994 5 3 / 1 4X , F 1 0 . 7 ) P0830400

837

P083041

0

CALCULATIONP0830420

PO 830430

P0830440

WRITE (NUVI, 837)

F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTION/25H

1 PRINTED TO , 8H7 DIGITS)

»* END OF TEST SEGMENT 083

** WHEN EXECUTING ONLY SEGMENT 083, 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 It I t 1 t t 1 t t t H * H t I t t II I t t I t t II t t t I t t t t t t t t 1 1 i I t t I I I I t t I t t I I t t H I

1*1

III

III

P0830450

P0830460

P0830470

P0830480

P 0830496

P083C1

P083C2

P0840010

P0840020

P0840030

PO 8 40 0 40

*P0840050

P 08 AO 060

P0840070

PO 840080

P0840090

P 08 40 1 00

P08 40 1 1 0 P08 40120

P0840130

P08401 40

P001 1 890

POO 11 895

P001 1900

POO 1 190 5 P001 1910

POO 1 191 5 P084A1

P00 1 1 920

P0840 1 5 0 P 0 6 7 1 6 3 0 P0071635

PO 07 1640

P0071645

DPLOG - 084

iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

GENERAL PURPOSE

TO TEST BASIC EXTERNAL FUNCTION - DLOG - NATURAL LOG -TYPE DOUBLE PRECISION

USED IN SIMPLE ARITHMETIC EXPRESSIONS

INTRINSIC FUNCTIONS DM INI , DABS , DBLE , FLOAT, D S I GN , MINO.DINT, ASSUMED WORKING

ARGUMENTS ARE POWERS OF 2

ASA REF

8.3.3

TABLE 4

SPECIFICATIONS SEGMENT 084

WHEN EXECUTING ONLY SEGMENT 084, 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

1

1

1

1

1

1

1 OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

1

1

1

1

1

1

1

** WHEN EXECUTING ONLY SEGMENT 084, THE FOLLOWING STATEMENT

** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

100 NBS FORTRAN Test Programs Version 1
NUVI

C t * * 840

* * FORMAT ( 1 5 H 1 DPLOG - ( 084 ) / /32H BASIC EXTERNAL FUNCTION -DLOG'

1//38H (NATURAL LOG -TYPE DOUBLE PRECISION)

P084B1

P0071650

P0840160

P08401 70

2//27H ASA REF . - 8.3.3 (TABLE 4W/24H

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

WRITE (NUVI , 8 40 ) HEADER FOR SEGMENT 084 WRITTEN

AVD = .2500

CVD = 2.0D0

LINE 1 OF EACH PAIR IS/23H P0840180

P0840190

P0840200

P0840210

P0840220

P0840230

P0840240

P0840250

PO 8 40260

P0840270

P0840280

P0840290

P08 4030 0 P084031

0

p 08 4 "03 2*6 P0840330

P0840340

P0840350

P0840360

P0840370

P0840380

P0840390

P 0 8 4 0 4 0 0 P0 840 4 1 0 PO 8 40 420

P0840430

C

* * * * *

MVI = -2

BVD = D LOG ( AVD / 2.0D0)

WRITE (NUVI, 841) BVD

BVD = D LOG ( AVD ) WRTTET NUVI , 842) BVD

BVD = D L OG ( AVD * CVD)

** 2)

MR I TE < NUVI , 8 43 ) BVD

BVD = D LOG ( AVD * CVD

WRITE (NUVI , 844) BVD

BVD = DLOG ( DM I N 1 (AVD * 2.0D0 +DABS ( DB LE ( F L OAT ( MV I ) ) / CVD ) , CVD))

WRITE (NUVI, 845) BVD

BVD = DLOG(DSIGN(DBLE(FLOAT(MINO(MVI

WRITE (NUVI , 8 46 ) BVD

WRITE (NUVI, 847)

I D I NT ( CVD ) >.,)..)„« AVD ) )

841

842

843

844

8 45

846

8 47

FORMAT

(

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

9H0 X=0.125,5X,23H-2.0794415416798359D+00/1PD34.13)

9H0 X = 0 . 2 5 , 5X.23H- 1 . 386294361 1 1 9 8 9 0 6D + 0 0 / 1 PD3 4 . 13)

9 H 0 X = 0 . 5 , 5 X , 2 3 H - 0 . 6 9 3 1 4 7 1 8 0 5 5 9 9 4 5 3 D + 0 0 / D3 5 . 14)

9H0 X=1.0 ,5X,23H 0.000000000000000 / D35.14)

9 H 0 X=T. 5 , 5 X , 2 3 H 0.405465 1 08 1 08 1 6 44 D + 00 7 035 .1 4 ) 9H0 X=2.0 ,5X,23H 0.69314718055994530+00/ D35.14)

C * * *

c * * *

c * * *

C * * *

c"= c=

F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H

A PRINTED TO ,9H14 DIGITS)

'*"* END OF T EST SEGMENT 0 84

** WHEN EXECUTING ONLY SEGMENT 084, THE STOP AND END

**"."' WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = ** IN COLUMNS 1 AND 2 REMOVED.

STOP

END

CALCULATI0NP0840440

P0840450

PO 8 40 460

CARDS P0840470

""P'08 4 0 4 80

P0840490

"" P 0 8 4 0 5 0 0 P0 8 40 5 1 0 STOP

END

P084C1

P084C2

C * * *

c * * *

c * * *

C * * *

c * * *

c * * *

c * * *

p. * *

*

c * * *

c * * *

c * * *

c * * *

c * * *

C * * *

c * * * c* * *

c * * *

c * * * c=

c =

* *

* *

* t

* *

* *

* *

* *

* *

* *

* *

* *

* t

* *

* *

CXLOG - (085)

GENERAL PURPOSE ASA REF

.TO TEST BASIC EXTERNAL FUNCTION - CLOG - ASA REF

(COMPLEX LOG) 8.3.3

TESTING RANGE EXTENDS FROM 0 TO 5 .E7 FOR MODULUS TABLE 4 AND ARGUMENT VARIES BY STEPS OF PI/3 MAGNITUDE

INTRINSIC FUNCTIONS CMPLX, SNGL . MOD ASSUMED WORKING

SPECIFICATIONS SEGMENT 085

*******«*»********«*******»*****************»»************»*******ii*P0850010

** P0850020

P08 50030

P0850040

"P0850050

P0850060

P0850070

P0850080

P08 5 0090

P08501 00

P08 5 0 1 1 0 P0850120

P 0 8 5 0 1 3 0 P00 1 1 930

P00 1 1 93 5 P00 1 1 940

P 0 0 1 1 94 5 P00 1 1 95 0 POO 11955

P00 1 1 960

? 0 8 5 A

1

P085A2

PO0 11965

P08501 40

POO 7 1660

P0071665

POO 7 16 7 0 P0071675

WHEN EXECUTING ONLY SEGMENT 085, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED .

COMPLEX EP 1 C ( 3 0 ) , AVC, BVC

DOUBLE PRECISION AVD. BVD

COMPLEX E P 1 C ( 3 0 ) . AVC, BVC

DOUBLE PRECISION AVD, BVD

C * * *

c * * *

c * * *

c * * *

c * * * c=

t *

* *

* *

* *

* *

OUTPUT-TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 085, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NBS FORTRAN Test Programs Version 1 101
NUVI = 6

C * * * * * P085B1

P0071 680

850

WRITE (NUVI , 850) P0850150

FORMAT ( 15H1 CXLOG - (085) //32H BASIC EXTERNAL FUNCTION -CLOG- P0850160

Ml 2 9H (NATURAL LOG -TYPE COMPLEX) /"/ 27 H ASA REF . - 8.3.3 (TABLE 4P08501 70

2)//20H (COMPLEX ARGUMENT)/ 8 X , 1 5 HEXPE CTED RESULT /8X. 1 5HFUNCTION P0 8 5 0 1 80

3 RESULT > P0 8 5 0 1 90

C«**** LOG OF 10 P0850200

BVD = 2.302 585092 9940D0 P 0 8 5 0 2 1 0 C***** SINE OF 60 DEGREES P0850220

AVD = . 8660 2 5 4 0 3 7 8 4 4 4 D 6 P 0 8 5 0 2 3 0 C***»* INITIALIZE EP1C (EXPECTED VALUES) P0850240

EP 1 C( 1 ) EP 1 C ( 2 ). EPIC ( 3

)

EP 1 C ( 4 ) EP 1 C ( 5 ) EP 1 C ( 6 )

= CMPLX(0.5E-7

= CMPLX(2.5E-7

= ( 1 . E-6 , 0.0)

= ( 5 . E-6 , 0 . 0 ) "= CMP L X ( 0 . 5 E - 5 = CMPLX(2.5E-5

SNGL(-AVD*1 .D-7))

SNGL(-AVD*5.D-7))

SNGL ( AVD*

1

SNGL(AVD»5

D-5 ) ) D-5 ) )

EP1C(9) = (-1 .E-3,0.0)

EP1CM0) = (-5. E-3,0.0)

E P 1 C ( 1 1 > = CMPLX( -0 . 5 E

-

2

EP1C(12) = CMPLX( -2 . 5E-2

SNGL ( SNGL ( AVD*1

AVD * 2) ) D-2) ) EP1CM3) = CMPLX(0 . 5E-1 , SNGL(-AVD* 1 . D-1 ) ) EP1C(14) = CMPLX(2 . 5E-1 , SNGL ( -AVD*5 . D-1 ) )

P0850250

P0850260

PO 8 5 02 70

P0850280

P0850290

P0850300

EP1C(7) = CMPLX( -. 5E-4 , SNGL (AVD * 1.D-4)) P 0 8 5 0 3 1 0 EP1C(8) = CMPLX(-2.5E-4,SNGL(AVD*5.D-4)> P0850320

P0850330

P0850340

P0850350

P0850360

P0850370

P0850380

P0850390

P0850400

P 0 8 5 0 4 10

P0850420

P0850430

P0850440

P0850450

P0850460

P 0 8 5 0 4 7 0 P08 50480

PO 8 5 0490

P0850500

PO 8 5 0 5 1 0 P0850520

EP1 C(29) = CMPLX(0.5E7,SNGL(AVD * 1 . D 7 ) ) P 0 8 5 0 5 3 0 EP1C(30) = CMPLX(2.5E7,SNGL(AVD * 5.D7)) P0850540

C*»*** YVS COMPENSATES FOR -2 PI AND +2PI GENERATED BY USE OF XIVS*PI/3 P 0 8 5 0 5 5 0 C»*»*« FOR EXPECTED IMAGINARY VALUES, TAKES VALUES +6,0,-6 DURING R ANGE P 0 8 5 0 5 6

0

E P 1 C ( 1 5 ) = EP1CM6) = EP1 C( 1 7)

EP1C(18) =

E P 1 C ( 1 9 ) = EP1C(20) = EP 1 C ( 2 1 ) = EP1C(22) =

E P 1 C ( 2 3 ) = EP1C(24) = EPIC < 2 5 ) = EP1C(26) =

E P 1 C ( 2 7 ) =

E P 1 C ( 2 8 ) =

(1.0,0.0)

(5.0,0.0)

CMP LX < 0 . 5 E 1 , SNGL (AVD * CMPLX(2 . 5E1 , SNGL (AVD * CMPLX(-0.5E2,SNGL(AVD ' CMPLX( -2 . 5E2 , SNGL ( AVD ' (-1 . E3 , 0 .0)

(-5.E3.0.0)

CMPLX(-0.5E4,SNGL(-AVD

CMPLX(-2.5E4,SNGL(-AVD

CMPLX(0.5E5,SNGL(-AVD

CMPLX(2.5E5.SNGL(-AVD

(1 .E6.0.0)

(5.E6.0.0)

1 . D1 ) )

5 .D1 ) )

1 . DZ) )

5 .02) )

1 . D4) )

5 .D4) )

1 .05) )

5 . D5 ) )

851

YVS = 6.

IVI = 0

I VI = I VI +1

IF ( MOD < I V I

,

2) .EO. 0) GO TO 852

XIVS : AVS = GO TO

C * * * * * 1 8 52 XIVS ' AVS =

((IVI + 1)/2) - BVD * XIVS

8 53

609 IS LOG OF 5

( IVI / 2 ) - 8 (BVD * XIVS) + 1

P0850570

P0850580

P0850590

P0850600

P0 8 5 06 1 0

C * * * * * 1 853 AVC = BVC"

"= WRITE

P0850620

PO 8 5 063 0 P0850640

PO 8 5 06 5

6

P0850660

0 47 IS PI/3 PO 8 5 06 70

CMPLX (AVS, SNGLd .047197551196600 * (XIVS + YVS))) P0850680

CLOG (EP1 C( IVI ) ) P 0 8 5 0 6 9 0 (NUVI, 854) EP1 C( IVI ) , AVC, BVC P0850700

6094379 1 2434 1 DO

855

I F ( IVI

IF (IVI

856 IF (IVI

857 IF (IVI

858 YVS = 0.0

859 WRITE (NUVI

22)

30)

8 5 7 , 851 ,78 5 0,

78 5 1 ,

857

78 5 1

GO TO 851

7850 YVS - -6.0

GOTO 851

7851 CONTINUE

10) 855, 858, 855 P0850710

20) 856, 859, 856 P0850720

PO 8 5 0 7 3 0 P0850740

P08 5 075 0 P0850760

PO 8 5 0 7 70

P0850780

P 0850790

P0850800

78 5 2 )

102 NBS FORTRAN Test Programs Version 1
854

78 52

C * * * *

C * * * *

c * * * *

c * * * *

c = c=

FORMAT ( 3H0 ( , E 14 . 7 . 1 H , , E 14 . 7 , 1 H ) , 2 ( / 8X , 2E 1 6 . 7 ) ) P0850810

........ FORMAT (22H1 CXLOG - (085) -CLOG-) P0850820

EN[) QF j£2j segment 6 8

5 P 0 & 5 0 8 30

* WHEN EXECUTING ONLY SEGMENT 085, THE STOP AND END CARDS P0850840

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0 8 5 0 8 5 0

* IN COLUMNS 1 AND 2 REMOVED. P0850860

PO 8 50 870

P0850880

P 0 8 5 C 1 P085C2

STOP

END

STOP

END

******t******************t**********************t**t**t t** *****P0860050

C * * * *

C * * * *

C * * * t

C * * * *

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C * t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

******************************t*****t************t***tt*******t*tttP0860010

* P0860020

COLOG 086 P0860030

P0860040

GENERAL PURPOSE

TO TEST B AS I C EXTERNAL FUNCTION

COMMON LOG - TYPE REAL

USED IN SIMPLE ARITHMETIC EXPRESS IONS

ALOG10 - P0860060

ASA REF PO 8600 70

8.3.3 P0860080

TABLE 4 P 0 8 6 0 0 9

0

INTRINSIC FUNCTIONS ABS , A I NT , AHAX 1 . S I GN . . ASSUMED WORKING P0 860 1 00

ARGUMENT RANGE 0.5 TO 16.0 , POWERS OF 2 P 6 8 6 0 1 1 0 P0860120 OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 086, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = NUVI =

P0860130

P0071690

PO 0 7 1 69 5 P00 7 1 700

POO 717 0 5 P086B1

P 0 0 7 1 7 1 0 P0860140

PO 860 1 5 0 P0860160

PO 860 170

P0860180

C * * * * 860 FORMAT ( 1 5H 1 COLOG - ( 086 W/34H BASIC EXTERNAL FUNCTION -AL0G1J1//25H (COMMON LOG -TYPE REAL)

2//27H ASA REF.- 8.3.3 (TABLE 4W/24H LINE 1 OF EACH PAIR IS/23H

3 HOLLERITH I N F ORMAT I ON / / 9H RESULTS)

WRITE (NUVI, 860)

+ 1.0))

2.0 - CVS) )

* CVS, CVS * 2.0))

C***«* HEADER FOR SEGMENT 086 WRITTEN

AVS = -2.0

CVS = -4.6

BVS = AL0G10(AVS / CVS)

WRITE (NUVI, 861) BVS

BVS = AL0G10(ABS(AVS

WRITE (NUVI . 862) BVS

BVS = ALOG 1 0 ( -AVS)

WRITE (NUVI, 863) BVS

BVS = AL0G1 0 ( AI NT(AVS

WRITE (NUVI , 864) BVS

BVS = ALOG1 0 (AMAX1 (AVS

WRITE (NUVI, 86 5 ) BVS

BVS = ALOG10(SIGN(CVS, ( WRITE (NUVI, 866) BVS

WRITE (NUVI, 867)

FORMAT ( 8H0 X= 0.5, 5 X . 2 5 H - 0 . 3 0 1 0 2 999 5 6 63 9 8 1 1 9 5 2 1 3 7/ 8 X

.

FORMAT ( 8H0 X= 1.0.5X.25H 0 . 00000 0000000 0000000000 / «X f 8H0 X= 2.0,5X,2 5H 0 . 3 0 1 02999 5 66398 1 1 9 5 2 1 3 7 / 8X

,

8H0 X= 4.0.5X.25H 0 . 6 0 2 0 5 9 99 1 3 2 796 2 3 9 0 4 2 7 5 / 8X

,

8H0 X= 8.0.5X.25H 0.903089986991 943585641 2/ 8X,

8H0 X=16.0,5X.25H 1 . 2 0 4 1 1 99 8 2 6 5 5 92 4 7 8 0 8 5 5 0 / 8X

.

LINE 2 OF EACH PAIR IS THE FUNCTION/25H

8H7 DIGITS)

P0860190

P0860200

P08602 1 0 P0860220

PO 8602 30

P0860240

P0860250

P0860260

•AVS)) **2)

861

862

863

864

865

866

86 7

F1 5 F1 5

7)

7)

P0860270

P0860280

P0860290

P0860300

P 68 6031

6

P0860320

P0860330

P0860340

P0860350

P0860360

FORMAT

(

FORMAT

FORMAT

(

FORMAT

FORMAT (77 3 7H

1 PRINTED TO

F1 5 . 7)

F1 5 . 7)

F15.7)

F15.7)

P0860370

P0860380

P0860390

P0860400

C*t*«* END OF TEST SEGMENT 086

C****« WHEN EXECUTING ONLY SEGMENT 086, THE STOP

C**t»* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C***«* IN COLUMNS 1 AND 2 REMOVED.

AND

C = END

C =

C = STOPEND

STOP

END

CALCULATI0NP0860410

P0860420

P0860430

CARDS P0860440

P0860450

P0860460

P0860470

P0860480

P086C1

P0 86C2

* * t * t * * * t * t * p b s 7 6 0 i 0 P0870020

c * * * *

c * * * * lt«Ht*tlttttltttHmtttltltttllttlttl»ltlttl«lititHtl

NBS FORTRAN Test Programs Version 1 103
£>**** DCLOG - 087 P0870030

C * * * * * PO 8 700 4 0

C * * * * * t*»ii**»t»«»*i»*»*»t*it*i*t***«t*t*t»«tt«i*it*t<t**»»»t»t»M***t»*POi70b50

C«**** GENERAL PURPOSE P0870060

C"*T*T* TO TEST BASIC EXTERNAL FUNCTION - D LOG 1 6 - ASA REFP0870070

C«**** COMMON LOG - TYPE DOUBLE PRECISION 8.3.3 P0870080

C "**"*'** SAME AS SEGMENT 086 EXCEPT FOR TYPE TABLE 4P 0 8 70 0 90

C***** INTRINSIC FUNCTIONS DABS , IDI NT, FLOAT, DBLE f P08 70 1 0 0 C DMAX1 .DSIGN ASSUMED WORKING PO 8 70 1 1 0 C**t*« ARGUMENT RANGE 0.5 TO 16.0 POWERS OF 2 P 0 8 7 0 1 2 0

C * * * * * P08 70 1 30

C***** SPECIFICATIONS SEGMENT 0 8 7 P08 70 1 40

C * * * *"* P 6 0 1 1 9 7 0 C***** WHEN EXECUTING ONLY SEGMENT 0 8 7 , THE SPECIFICATION STATEMENTS P 0 0 1 1 9 7 5 C

*"*"*"** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PO0 1 1 98 0 C* *** * IN COLUMNS 1 AND 2 REMOVED. P 0 0 1 1 98 5 C* * * * * POO 11 99 0 C= DOUBLE PRECISION AVD, BVD, CVD P 0 0 1 1 99 5 DOUBLE PRECISION AVD, BVD, CVD P0 8 7A1

C***** P0012000

C * * * * * 0 U T P U f t A P E ASSIGNMENT STATEMENT. NO INPUT TAPE PO 8 70 1 5 6 C****« P0071720

£***"*"* WHEN EXECUTING ONLY SEGMENT 0 8 7 , THE FOLLOWING STATEMENT POO 71 72 5 C****« NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0071730

C= NU V I = 6 POO 7 1 73 5 NUVI = 6 P087B1

C* * * * * PO 07 1 740

8 70 FORMAT ( 1 5 H 1 DCLOG - < 0 8 7 )// 3 4H BASIC EXTERNAL FUNCTION -DL0G10- P0 8 70 1 60

1 7 / 3 7 H (COMMON LOG - T YPE DOUBLE PRECISIO N ). P 0 8 7 0 1 7 0 2//27H ASA REF . - 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H P0 8 70 1 8 0

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P0 8 70 1 90

WRITE (NUVI, 870) P0870200

C * tYt * HEADER FOR SEGMENT 0 8 7 WRITTEN P08 7021 0 AVD = -2.0D0 P0870220

CVD = -4.0 DO PO 8 7023 6 BVD = D LOG 1 0 ( AVD / CVD) P0 8 702 4 0 W R I TE ( N U VI , 87 1 ) B V D P 6 8 7 0 2 5 0 BVD = DLOG10(DABS(AVD + 1.0D0)) P0870260

WRITE (NUVI , 8 72 ) BVD PO 8 702 70

BVD = D L 0 G 1 0 ( -AVD) P0 8 7028 0 W RITE ( N UVI , 8 73 ) BVD PO 8 70290

BVD = DLOG 1 0 ( DBLE ( FLOAT < I 0 I NT ( AVD + 2.0D0 - CVD)))) P08 703 0 0 WRITE (NUVI, 8 74 ) BVD P 6 8 7 03 1 0 BVD = DL0G1 0 (DMAX1 (AVD * CVD, CVD * 2.0D0)) P0870320

WRITE (NUVI, 8 7 5 ) BVD P 08 70336

BVD - DLOG10(DSIGN(CVD, ( -AVD ) ) «*2) P08 703 40

WRITE (NUVI, 8 76 ) BVD P0870350

WRITE (NUVI, 877) P0870360

871 FORMAT ( 8H0 X= 0 . 5 , 5 X , 2 9H- 0 . 3 0 1 0 2 999 5 66 3 9 8 1 1 9 5 2 1 3 7D + 0 0 / D3 4 . 1 4 ) PO 8 7 03 70

872 FORMAT ( 8H0 X= 1.0.5X.29H 0.0000000000000000000000 /D34.14) P0870380

8 73 FORMAT ( 8 HO X= 2.0.5X.29H 0.301029995663981 1952137D + 00/D34. 14) P 0 8 7 0 3 9 0 874 FORMAT ( 8H0 X= 4.0,5X,29H 0 . 6 0 2 0 5 999 1 3 2 7 9 62 3 9 0 42 7 5 D + 0 0 / D3 4 . 1 4 ) P08 70 40 0

8 7 5 FORMAT ( 8 HO X= 8 . 0 , 5X, 29H 0. 90308 9986 99194358564 12 D + 6o/b34. 14) P 6 8 7 0 41 0 876 FORMAT ( 8H0 X= 1 6 . 0 , 5X , 29H 1 . 2 0 4 1 1 99 8 2 6 5 5 92 4 7 8 0 8 5 5 0 D + 0 0 / 1 PD33 . 1 3 ) P0 8 70 420

8 77 FOR MAT (7 7 3 7 H LINE 2 OF EAC H PAIR IS THE FU NCTION/ 2 5 H C A L CU L AT I 0 NP 0 8 70 4 3 0 A PRINTED TO ,9H14 DIGITS) P0870440

C * * * * * END OF TES t SEG M E NT 0 8 7 PO 8 704 5 0 C***»* WHEN EXECUTING ONLY SEGMENT 087, THE STOP AND END CARDS P0870460

C****» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0870470

C » IN COLUMNS 1 AND 2 REMOVED. P0870480

C= STOP P 0 8 7 0 4 9 0 C= END P0870500

StOP P08 7C1

END P08 7 C2

C** **************************t*****************************t*t**********P0880010

C**«** P0880020

C* * * * * S I NUS " 0 8 8 PO 88 003

6

C****« P0880040

104 NBS FORTRAN Test Programs Version 1
c * * *

c * * *

c * * *

C * * *

c * * *

C * * *

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * * c=

****t»(t»«*******»********t*«»*******t******t***»**««****************pog80050

GENERAL PURPOSE

TO TEST BASIC EXTERNAL FUNCTION - SIN - TRIGONOMETRIC SINE - TYPE REAL

INTRINSIC FUNCTION SNGL ASSUMED WORKING

ARGUMENTS FROM 0 TO 2 PI

ASA REFP0880060

8.3.3 P 088007 0 TABLE 4P0880080

P0880090

P08801 00

* *

* *

* * ** P0880110

** SPECIFICATIONS SEGMENT 088 P0880120

** POO 1 20 10

** WHEN EXECUTING ONLY SEGMENT 088. THE SPECIFICATION STATEMENTS P0012015

*"*"" WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PO 0 1 2 02 0 ** IN COLUMNS 1 AND 2 REMOVED. P0012025

*"* POO 1 203 0 DOUBLE PRECISION AVD , BVD , CVD, DVD , EVD, PIVD P0012035

DOUBLE PRECISION AVD, BVD , CVD, DVD, EVD, PIVD P088A1

** P 0 0 1 2 0 4 0 ** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0880130

** P0071750

C * * *

c * * *

c * # *

c * * *

C * * * c=

** WHEN EXECUTING ONLY SEGMENT 088, THE FOLLOWING STATEMENT

** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 NUVI = 6

P0071 755

P0071 760

PO 07

1 765

P088B1

C * * *

880

C * * * * *

c * * *

c * * *

WRITE (NUVI , 880)

FORMAT (1 5 HI SINUS - ( 08 8 ) // 3 1 H BASIC EXTERNAL

1//33H (TRIGONOMETRIC SINE -TYPE REAL)

2 7 / 2 7 H ASA REF . - 8.3.3 (TABLE 4>7/24H LINE 1 OF

3 HOLLERITH I N F 0 R M AT I 0 N / / 9H RESULTS)

HEADER FOR SEGMENT 088 WRITTEN

AVD = 3.140625D+0

96 1 3037 1'093 7 5 0-3

57220458984375D-5

596046447753906D-6

3 1 78 6 5 095 470 56D-7

SUM OF AVD TO EVD. PARTS ARE EXPRESSED IN SUMS

PERMIT A POSSIBLE 20 DECIMAL DIGIT ARGUMENT TO

FUNCTION -SINEACH PAIR IS/23H

BVD = CVD = DVD = EVD =

* * p i is

**2, TO

OF

BE

POWERS OF

CREATED

P 0 0 7 1 7 7 0 P08801 40

P C 8 8 0 1 5 0 P08801 60

P088 01 7 0 P08801 80

P08801 90

P0880200

P 0 8 8 0 2 1 0 P0880220

P0880230

P0880240

PO 8 8 02 5 0 P0880260

PO 8 8 02 70

P0880280

P 0 8 8 0 2 9 C P0880300

PIVD : AVS = CVS = BVS = WRITE'

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

BVS = WRITE

WRITE

EVD + DVD + CVD + BVD + AVD

1 .0

2.0

S I N ( C VS - 2 (NUVI, 881)

SI N(AVS)

(NUVI, 882)

SIN (CVS)

(NUVI, 883) BVS

SIN(AVS + CVS)

(NUVI, 884) BVS

SIN(SNGL(PIVD)

)

(NUVI , 8 8 5 ) BVS

SIN(2. * CVS)

0BVS

* AVS)

BVS

P0 8 803 1 0 P0880320

P 0 8 8 0 3 3 0 P0880340

P0880350

P0880360

PO 8 8 0370

P0880380

(NUVI, 886) BVS

SIN(2.0 + CVS + AVS)

(NUVI, 887) BVS

S I N ( CVS * (AVS + CVS))

(NUVI, 888) BVS

SIN(SNGL(2.0D0 * PIVD))

(NUVI ,889) BVS

(NUVI, 7880)

P0880390

P0880400

P 0 8 8 0 4 1 0 P0880420

P0880430

P0880440

P08 8 04 5 0 P0880460

P08 80 470

P0880480

P 6 8 8 0 4 9 0 P0880500

P 0 8 8 0 5 1 0 P0880520

P 0 8 8 0 5 3 0 P0880540

P08805 50

P0880560

P0880570

CALCULATIONP0880580

881 FORMAT ( 9H0 X= 0.0 , 5X, 1 5H 0 882 FORMAT ( 9H0 X= 1.0 ,5X,15H+0

8 83 FORMAT ( 9H0 X= 2.0 , 5 X ,1 5 H + 0 884 F 0 RMAT ( 9H0 X= 3.0 .5X.15H + 0

8 8 5 FORMAT ( 9 H 0 X = ( P I > , 5 X » 1 5 H

" 6'

886 FORMAT ( 9H0 X= 4.0 .5X.15H-0

8 8 7 FORMAT ( 9 H 0 X"= 5.0 , 5 X , 1 5 H - 0 888 FORMAT ( 9H0 X= 6.0 ,5X,15H-0

8 89 FORMAT ( 9H0 X= ( 2 P I ) , 5X , 1 5 H 6 7880 F0RMAT(//37H LINE 2 OF EACH

000000000000

841470984808

9 0 92 97426 826

1 41 1 20008060

0000 00000000

756802495308

958924274663

27941 54981 98

000000000000

/14X, F10.7)

/14X, F10.7)

7HX, F 1 0.7)

/14X, F10.7)

714X, F10 . 7)

/14X, F10.7)

714X, F10.7)

/14X, F10.7)

714X, F10.7)

PAIR IS THE FUNCTION/25H

NBS FORTRAN Test Programs Version 1 105
1 PRINTED TO ,8H7 DIGITS) P0880590

C****« END OF TEST SEGMENT 088 P0880600

ftTiTii WHEN EXECUTING ONLY SEGMENT 088, THE STOP AND END CARDS P0880610

C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0880620

C IN COLUMNS 1 AND 2 REMOVED. P08 8 0630

C= STOP P0880640

C = END P 0 8 8 0 6 5 0 STOP ' P088 C1

END P 0 8 8 C 2 C***********t***********************************************************P0890010

C *'*'*"*"* PO 8 9 0 02 0 C***«* DPSIN - 089 P0890030 „„„...._

p' 0890040

C**************************************************************'*********P089 0 05 0 C *"*"*"** GENERAL PURPOSE ASA RE F P 0 89 0 060

C***«* TO TEST BASIC EXTERNAL FUNCTION - DSIN - 8.3.3 P0890070

C *"*"**"* TRIGONOMETRIC SINE - TYPE DOUBLE PRECISION TABLE 4 P 0890080

C****« SAME AS SEGMENT 088 EXCEPT D.P. P0890090

C* * *"*"*' INTRINSIC FUNCTION DSIGN ASSUMED WORKING P0890100

C***«* ARGUMENTS FROM 0 TO 2 PI P 0 8 9 0 1 1 0

C * * *

C * * *

C * * *

C * * *

C * * *

c * * *

c * * *

c =

SPECIFICATIONS SEGMENT 089

C * * *

C * * *

c * * *

c * * *

C * * * c=

* *

** WHEN EXECUTING ONLY SEGMENT 089, THE SPECIFICATION STATEMENTS

*'"*' WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C

= ** IN COLUMNS 1 AND 2 REMOVED

* * DOUBLE PRECISION AVD, BVD, CVD, DVD, EVD, PIVD, XVD, FVD, GVD

DOUBLE PRECISION AVD, BVD, CVD, DVD, EVD, PIVD, XVD, FVD, GVD

* *

*"*' 6 U TP U f T A P E ASSIGNMENT STATEMENT. NO IN PL) T TAPE.

WHEN EXECUTING ONLY SEGMENT 089, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI =

6

NUVI = 6

C * * * 1

1

890 FORMAT ( 1 5H 1 DPSIN - ( 089 W/32H BASIC EXTERNAL FUNCTION -DSIN1/7 33H (TRIGONOMETRIC SINE -TYPE D.P.)

2//27H ASA RE F . - 8.3.3 (TABLE 4W/24H LINE 1 OF EACH PAIR IS/23H

3 HOLLERI TH I N FORMAT I ON / / 9H RESULTS ) WRITE (NUVI, 890)

C

*"«"*"*"*' HEADER FOR SEGMENT 0 8 9 WRITTEN

AVD = 3.U062 5D + 0 BVD = 0. 9613037 1 093750-3

CVD = 0 . 5 72204 5 898 43 7 5 D-5

DVD = 0 . 5960 4644 7 7 5 3 906D-6

EVD = 0 . 3 1 7865 095 4 70 5 6D-7

C ***** P I IS SUM OF AVD TO EVD, PARTS ARE EXPRESSED IN SUMS OF POWERS OF

C*****2, TO PERMIT A POSSIBLE 20 DECIMAL DIGIT ARGUMENT TO BE CREATED

PIVD : FVD = GVD = XVD = WRITE

XVD = WRITE

XVD = WRIT

xvn - W

r E XV D = jRITE

XVD = WRITE

XVD = WRITE

XVD =

EVD + DVD + CVD + BVD + AVD

1 . 0D0

2 . 6 DO

DS I N ( GVD - 2.0D0

(NUVI, 891 ) XVD

DSIN(FVD)

FVD)

(NUVI, 892) XVD

DSIN(GVD)

' UV'i, 893 ) XVD

j IN ( GVD FVD)

<. NUVI . 894 ) XVD

DSIN(PIVD)

(NUVI , 895) XVD

DSIN(2. * GVD)

(NUVI, 896) XVD

DSIN(2.0 +FVD + (NUVI, 897) XVD

DSIN (GVD * (FVD

GVD)

GVD) )

P08901 20

P0890130

POO 1 20 5 0 P001 2055

POO 1 2 060

P001 2065

POO 1 2 0 70

POO 1 2075

P089A1

POO 1 2 0 8 0 P0 8 90 1 4 0 P0071 780

P0 0 7 1 78 5 P0 0 7 1 790

POO 7 1 79 5 P089B1

P0 0 7 1 8 0 0 P 0 890 1 5 0 P 0 8 9 0 1 6 0 P08901 70

P0 890 1 8 0 P0890190

PO 89020 0 P0 8902 1 0 PO 89022 0 P0890230

P0890240

P0890250

PO 8 9 0 2 6 0 P0890270

P0890280

P0890290

PO 8 9 0 3 0 0 P0 890 3 1 0 P0890320

P0890330

P0890340

P0890350

P 6 890360

P0890370

P0890380

P0890390

P0890400

P08904 1

0

P0890420

P0890430

P 0 8 9 0 4 4 0 P0890450

106 NBS FORTRAN Test Programs Version 1
WRITE (NUVI, 898) XVD

XVD = DS I N < DS I GN ( 2 . 000

WRITE (NUVI. 899) XVD

WRITE (NUVI, 7890)

* PIVD, GVD )

)

P0890460

P0890470

P0890480

P0890490

891

892

893

894

89 5 896

89 7 898

899

7890

C * * *

C * * *

c * * *

c * * * c=

c=

FORMAT ( 9H0 X= 0 FORMAT( 9H0 X= 1 'FORMAT <9H 6 X

=

' 2 FORMAT ( 9H0 X= 3,

FORMAT (9H0 X= ( P I

)

FORMAT ( 9H0 X= 4.0

FORMAT ( 9H0 X= 5.0

FORMAT ( 9H0 X = 6.0

31H

31H

31 H 31H

31H

31H

31H

31 H

0

+ 0

+ 6

+ o

0 -0

-0

-0

00000000000000000000000

84147098480789650665250D+00

9 0 9 2 9 7 4 2 6 8 2 5 6 8 1 6 9 5 3 9 6 0 2 6 + 66

1411 200080598672221 0074D+00

00000000000000000000000

75680249530792825137264D+00

9589242746631 384688931 5D+ 0 0 27941 549819892587281 156D+00

/ D31 . 1 4)

/ D 3 1 . 14)

/ D 3 1 .14)

/ D 3 1 . 14)

7 b3f."i 4)

..... /D31......................... .14)

/ D31 . 1 4)

P0890500

P0890510

P 0 8 9 0 5 2 6 P0890530

P08905 40

P0890550

P0890560

P0890570

FORMAT (9H0 X=(2PI>, 31H 0.00000000000000000000000 / D31.14) P0890580

CARDS

A PRINTED TO .9H14 DIGITS)

*t END OF TEST SEGMENT 089

** WHEN EXECUTING ONLY SEGMENT 089, THE STOP AND END

** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

*"i IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END *******************************************************************

* *

F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H CAL CU L AT I 0 N P 0 890 5 9

0

PO 8 906 00

P089061 0 P 0 8906 2 0 P0890630

PO 8 9 06 4 0 P0890650

" PO 890660

P089C1

P0 89 C2

P09000 1 0 P0 9 0 0 0 2 0 P0900030

P 0900040

P0900050

P0900060

P0900070

4P0900080

P0900090

P 0 90 6 1 o'o P09001 1

0

POO 1 2090

P0012095

P 0 0 1 2 1 0 0 P 0 0 1 2 1 0 5 poo 12 iib

P001 21 1 5 P 0 0 1 2 1 2 0 P090A1

P090A2

P0012125

P0 900120

P0071810

POO 71815

P007 1 82 0 P0071 82 5 P090B1

POO 7 1830

P0900130

CP 0 90 6 1 40

. P0900 1 50

P090 0 1 60

P09001 70

P 0 90 0 1 8 0 P0900190

P0900200

P09002 1 0 PO 90 02 20

P0900230

P0900240

P0900250

P0900260

P0900270

P 0 9 0 0 2 8 0 P0900290

H ( I I I I I I I t I I I I I t > I I I I t . I I I I ! I • I I I I I I I I I I I I I I III ! I I I t I I I I I ! I I I I I I I i

C * * *

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

C t * *

c * * *

c * * *

c * * *

C * * *

c * * *

c = c=

CSI CO ( 090 )

** GENERAL PURPOSE

** TO TEST BASIC EXTERNAL FUNCTIONS -CSIN- AND -CCOS-

** ' COMPLEX SINE AND COSINE

** INTRINSIC FUNCTION CMPLX ASSUMED WORKING

ASA RE

F

8.5.3

TABLE

* * SPECIFICATIONS 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 L 1 I (10)

COMPLEX AVC, BVC

DIMENSION L 1 I (10)

COMPLEX AVC, BVC

C * * *

c * * *

c * * *

c * * *

c * * *

c"=

** 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

C * * *

900

WRITE (NUVI. 900)

FORMAT ( 1 5H 1 CSI CO 1 (090) //40H BASIC EXTERNAL FUNCTIONS -CSIN

1 COS- //39H (TRIG. SINE AND COSINE -TYPE COMPLEX )// 26H ASA REF 8 23.3 ( TABLE 4) 77 1 OH F U NCTION, 1 OX. 7HRESULTS / / ) DATA LA2VI , LB2VI , L C2 V I , L D 2 V I / 2 H 0 ( ,2H, .2H1/.1H)/

DATA L 1 I ( 1 ) . L I I ( 2 ) . L1 I ( 3 ) , L 1 I ( 4 ) , L 1 I ( 5 ) / 2H1 , 2H2 . 2H3 . 2H4 . 2H5 /.

L 1 I ( 6 ) , L 1 I ( 7 ) , L 1 I ( 8 ) , L 1 I ( 9 ) . L 1 I ( 1 0 ) / 2H6 , 2H7 , 2H8 , 2H9 , 2H10 /

905

AVC = (1.0,1.0)

BVC = CSIN (AVC)

WRITE(NUVI, 901) BVC

BVC = CCOS(AVC)

WRITE (NUVI . 90 2) BVC

IVI = 0 ivi = iv i + 1 AVS = IVI

NBS FORTRAN Test Programs Version 1 107
BVS = 1 . / AVS P0900300

AVC = CMPLX (AVS,BVS) P0900310

BVC = CSiN(AVC) ** 2 + C COS (AVC) » * 2 P0900320

WR I TE ( NUVI . 904 ) LAZVI, L 1 1 ( I V I )

,. LBZV

I

( L CZV I , L 1 I ( I VI

)

f LOZVI , BVC P0900330

904 FORMAT < A 2 , A 2 , A 2 , A 2 , A 2 , A 1 , 4 X , 2 F 1 2 . 7 ) P 0 9 0 0 3 4 6 IFUVI - 1 0 ) 905 ,. 906 ,. 906 P0900350

906 CO NT IN UE PO 90 0360

901 FORMAT ( / 1 3H TABLE VALUE, 4X.22H 1.2984576 0.6349639 /17H CS I N ( 1 P090 03 70

i""."7'l ) = .F10.7.F12. 7) P 0900386

902 FORMAT ( / 1 3H TABLE VALUE , 4X., 22H 0 . 8337300 -0.9888977 / 1 7H C COS ( 1 P 0 9 0 03 90

1 . , 1 . )

,fT6.7, F12. 7 ///35H CSIN(X) **2 + CCO'sTX) **Z = 1.6,6.0 / P0900400

2 40H0 ARGUMENT RESULTS SHOULD BE 1.0,0.0 ) P0900410

C"*"»"*"*"* END OF TEST SEGMENT 090 P 090 6 42 6 C***«* WHEN EXECUTING ONLY SEGMENT 090, THE STOP AND END CARDS P0900430

C"*'«"*"** WHICH APPEAR AS COMMENT CAR D S MUST HAVE THE C= P 0 9 0 04 4

0

C**«** IN COLUMNS 1 AND 2 REMOVED. P0900450

C"= STOP PO 90 6 46

6

C= END P0900470

STOP " P 0 90 C I

~ END ; ; ...P0.90C2

c***********************************************************************p69io6i6

C***«* P0910020

C"*"*"*"*"* COSNS - 091 P091 0030

C*..* *.*..* P..P.;?;1.Q;HP. C»«*««t***t*«***«***»**«**«t«*t»**t«*t*»««»t*»****»»*«it»*****«********»P0910050

C***«* GENERAL PURPOSE ASA REFP0910060

C *"«"*** TO TEST BASIC EXTERNAL FUNCTION - COS - 8.3.3 P 6 9 i 0 0 7 0 C***** TRIGONOMETRIC COSINE - TYPE REAL TABLE 4P0910080

C * * * * * SAME AS SEGMENT EXCEPT FOR COSINE "" P 6 9 1 0 0 9 0 C***** INTRINSIC FUNCTION SNGL ASSUMED WORKING P0910100

C

*"*"*'** ARGUMENTS FROM 0 TO 2 PI P 0 9 1 01 1

0

C**«** P0910120

C"*"*"*"»* S P E C i F

I

C'""A f I 6 N S SEGMENT 091 P 0 91013 0 C***«* POO 1 2 130

C * WHEN EXECUTING ONLY S EG MEN T 091 f HE SPEC I F I CAT I ON STATEMENTS PO0 12 1 3 5 C****» WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P0012140

C'*'**** IN COLUMNS 1 AND 2 REMOVED . P 0 0 12145

C****« P 0 0 1 2 1 5 0 C= DOUBLE PRECISION AVD , BVD, CVD, DVD , EVD, P'iVD P 0 0 1 2 1 5 5 DOUBLE PRE C I SI ON AVD , BVD, CVD, DVD, EVD, PIVD P091A1.

C * * * * * POO 1 2 1 60

C***«* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P0910140

C***»* P 0 6 7 1 8 4 0 C*»*** WHEN EXECUTING ONLY SEGMENT 091, THE FOLLOWING STATEMENT P0071845

C*«*** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED POO 718 50

C= NUVI = 6 P0071855

NUVI = 6 p 6 9 1 B 1 C * * * * * POO 71 8 60

910 F ORM AT < f 5 H 1 COSNS - ( 091)7 /31 H BASIC EXTERNAL FUNCTI ON -COS- P09101 50

1//35H (TRIGONOMETRIC COSINE -TYPE REAL) P0910160

2//27H ASA RE"¥7- 8"'."3'"!"3 (TABLE 4)7/24H LINE 1 OF EACH PAIR IS'fz" 3 H P09101 70

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P0910180

WRITE (NUVI, 910)' P091 0196

C***»* HEADER FOR SEGMENT 091 WRITTEN P0910200

AVD = 3.1 466250 + 6 P09 1 02 1 0 BVD = 0.9613037109375D-3 P0910220

CVD = 6 . 5 7220458984375b - 5 P 6 9 1 6230

DVD = 0.5960464477539060-6 P0910240

EVD = 6.3 1 786 569547 6 5 6 D - 7 P09 1 6 2 5 6

C ***** P I IS SUM OF AVD TO EVD, PARTS ARE EXPRESSED IN SUMS OF POWERS OF P091 0260

C*****2, TO PERMIT A POSSIBLE 20 DECIMAL D I G if A R G U M E NT f 0 B E CREAT ED P 0 9 1 0 2 7

0

PIVD = EVD + DVD + CVD + BVD + AVD P0910280

AVS = 1.6 ' P 09 1 0290

CVS = 2.0 P0910300

BVS = CbS(CVS - 2.6 * AVS) p 6 9 1 0310

WRITE (NUVI, 911) BVS P0910320

BVS = COS (AVS) PO 91 03 30

WRITE (NUVI, 912) BVS P0910340

108 NBS FORTRAN Test Programs Version 1
BVS = COS(CVS)

WRITE (NUVI, 913) BVS

BVS = COS (AVS + CVS)

WRITE (NUVI , 914) BVS

P0910350

P091 0360

P091 03 70

P091 0320

BVS = COS C SNGL < P I VD ) ) P09 1 0390

WRITE (NUVI, 915) BVS P0910400

BVS = COS C 2 . * CVS ) P0910410

WRITE (NUVI. 916) BVS P0910420

BVS = COS < 2 . 0 + CVS + AVS)

WRITE (NUVI, 917) BVS

BVS

"" = '"COS (CVS * (AVS CVS) > WRITE (NUVI, 918) BVS

BVS = COS (SNGL (2.0 DO * PIVD) ) WRITE (NUVI, 919) BVS

P091 0430

P09 1 0 440

P 0 910 4 5

0

P091 0460

P 0 9 1 0 470

P091 0480

911

912

913

914

915

91 6

917

918

919

7910

C * * *

P. * *

*

C * * *

C t * *

c"= c=

WRITE (NUVI

FORMAT ( 9H0

FORMAT

<

FORMAT

(

FORMAT

F 0 R M AT

(

9H0

9H0

9H0

9H0

5X

5X

5X

5X

5X

1 5H + 1

1 5H + 0

1 5H-0

1 5 H - 0

1 5H-1

000000000000

540302305868

416146836547

989992496600

000000000000

7910)

X= 0.0

X = 1.6

X= 2.0

X= 3.0

X= (PI ) FORMAT ( 9H0 X= 4.6

FORMAT ( 9H0 X= 5.0

FORMAT ( 9H0 X= 6.6

FORMAT ( 9H0 X=(2PI ) F0RMAT(//37H LINE 2 OF EACH

1 PRINTED TO ,8H7 DIGITS)

** END OF TEST SEGMENT 091

** WHEN EXECUTING ONLY SEGMENT 091, THE STOP

*"* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

** IN COLUMNS 1 AND 2 REMOVED.

STOP

END

/ 1 4X

5X, 1 5H-0 . 653643620864

,5X,15H+0. 283662185463

. 5X, 15H + 0. 960170286650

5X, 1 5H + 1 .0 0 0 0 0 00 0 0 0 00

/14X

/14X

/ 1 4 X

/ 1 4X

/ 1 4X,

/ 1 4X

"/

1 4 X

/ 1 4X

F1 0

F 1 0 F1 0

F 1 0 F1 0

7)

7)

7)

7)

7)

F1 0 . 7)

F10.7)

F 1 0 . 7 > F10.7)

PAIR IS THE FUNCTION/25H

AND

C"= END

P091 0490

P09 1 0 5 0 0 P 0 9 1 0 5 1 0 P091 0520

PO 9 1 0 5 3 0 P09 1 0 5 40

P 0 9 1 0 5 5 0 P09 1 0 5 60

P091 0570

P0910580

CALCULATIONP091 0590

P09 1 060 0

P 09 1 06 1 0 CARDS P0910620

P 0 9 1 0 6 3 0 P091 0640

PO 9 1 06 5 0 P091 0660

STOP

END

P 0 9 1 C

1

P 0 9 1 C 2

C * t *

c * * *

c * * *

C * * *

c * * *

c * * *

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * * c=

c * * *

c * * *

c * * *

c * * *

c * * *

c =

****************************************************************»***P0920010

** P0920020

** DPCOS - (092) P0920030

** P 0 9 2 0 0 4 0 **t******************************t******************t************t**P0920050

** GENERAL PURPOSE ASA REFP0920060

P0920070

4P0920080

PO 9 2 0 0 9 0 P09201 00

P0 92 0 1 1 0 P0920120

* *

TO TEST BASIC EXTERNAL FUNCTION - DCOS - TRIGONOMETRIC COSINE -TYPE DOUBLE PRECISION

SAME AS SEGMENT 091 EXCEPT D . P

.

INTRINSIC FUNCTION DMAX1 ASSUMED WORKING

ARGUMENTS FROM 0 TO 2 PI

8.3.3

TABLE

** SPECIFICATIONS SEGMENT 092

WHEN EXECUTING ONLY SEGMENT 092, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED

DOUBLE PRECISION AVD, BVD, CVD, DVD, E VD , FVD, GVD, PIVD, XVD

DOUBLE PRECISION AVD, BVD, CVD, DVD, EVD, FVD, GVD, PIVD, XVD

* * OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

** WHEN EXECUTING ONLY SEGMENT 092, THE FOLLOWING STATEMENT

*"* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

C * * * 920 FORMAT < 1 5 H 1 DPCOS - ( 092 W/32H BASIC EXTERNAL FUNCTION -DCOS1//35H (TRIGONOMETRIC COSINE -TYPE D.P.)

2//27H ASA REF . - 8.3.3 (TABLE 4)//24H LINE 1 OF EACH PAIR IS/23H

3 HOLLERITH I N FORMAT I 0 N / / 9H RESULTS)

WRITE (NUVI, 92 0)

AVD = 3.140625D+0

P09201 30

P00121 70

POO 12175

P001 21 80

P 0 0 1 21 8 5 P 0 0 1 2 1 9 0 POO 1219 5 P092A1

POO 1 22 0 0 P09201 40

POO 71 8 70

P0071 875

POO 71 8 80

P0071 885

P092B1

P0071 890

PO 92 0 1 5 0 P09201 60

P 0 9 2 0 1 7 0 P092 0 1 8 0 P 0 92 0 1 90

P0920200

NBS FORTRAN Test Programs Version 1 109
BVD = 0.961 30371 09375D-3 P0920210

CVD- = 0 . 57220458984375D-5 P0920220

DVD " ="" 0 59 60464477539060-6 P0 920 236

EVD = 0 . 31 786509547056D-7 P0920240

C.V.tVpi IS SUM OF AVD TO EVD, PARTS ARE EXPRESSED IN SUMS OF POWERS OF P0920250

C**t**2, TO PERMIT A POSSIBLE 20 DECIMAL DIGIT ARGUMENT TO BE CREATED P0920260

P'YVD = EVD + DVD + CVD + BVD + AVD P 09202 7 0 FVD = 1 . 0D0 P0920280

GVD = 2 . 0 D 0 p 092 6 2 90

XVD = DC0S(GVD - 2.0D0 * FVD) P0920300

WRITE (NUVI, 921) XVD " P 0 9 2 0 3 1 0 XVD = DCOS(FVD) P0920320

WRITE (NUVI, 922) XVD P0920330

XVD = DCOS(GVD) P0920340

WRITE (NUVI, 923 ) XVD ' P 092 03 5 0 XVD = DCOS(GVD + FVD) P0920360

WRITE (NUVI, 924) XVD P0920370

XVD = DCOS(PIVD) P0920380

WRITE (NUVI, 925) XVD P0920390

XVD = D COS ( 2 . * GVD) P0920400

WRITE (NUVI, 926 ) XVD ' P 0 9 2 0 4 1 0 XVD = D COS ( 2 . 0 + FVD + GVD) P0920420

WRITE (NUVI, 92 7 ) XVD P 0 9 2 0 4 3 6 XVD = DC0S(GVD * (FVD + GVD)) P0920440

WRITE (NUVI, 928) XVD P0920450

XVD - DCOS ( DMAX1 ( 2 . 0D0 * PIVD, GVD)) P0920460

WRITE (NUVI, 929) XVD P0920470

WRITE (NUVI, 7992) P0920480

921 F0RMAT(9H0 X= 0.0 , 3 1 H + 0 . 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 + 6 1 / D31 .14) P0920490

922 FORMAT(9H0 X= 1.0 ,31H +0.5403023058681 3971 740094D + 00 /D31.14) P0920 5 0 0 923 FORMAT ( 9H0 X= 2.0 ,'31 H -0.41 61 468365471 4238699757D + 00 / 03 1.1 4 ) PO 9205 10

924 FORMAT (9H0 X= 3.0 ,31H - 0 . 9 8 9 9 9 2 4 9 6 6 0 0 4 4 5 4 5 7 2 7 1 5 7 D + 0 0 / D31.14) P0920520

9 2 5 F 0 R M AT ( 9 H 0 X = ( P I ), 3 1 H - 0 . 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 D + 0 1 / D31 . 14 ) PO 9 2 0 5 3 0 926 FORMAT ( 9H0 X= 4.0 . 3 1 H -0.65364362086361 1 91 46391 7D + 00 / D31.14) P0920540

92 7 F0RMAT(9H0 X= 5.0 , 3 1 H + 0 . 2 8 3 6 6 2 1 8 5 4 6 3 2 2 6 2 6 4 4 6 6 6 4 D + 0 0 / D 3 1 .14) P0920 5 5 0 928 FORMAT ( 9H0 X= 6.0 ,31H + 0 . 9 6 0 1 7 0 2 8 6 6 5 0 3 6 6 0 2 0 5 4 5 6 5 D + 0 0 / D31.14) P0920560

929 FORMAT(9H0 X= ( 2P I ) , 3 1 H +0 . 1 00000000000000000000000*0" / D 3 1 .14) P 0920570

7992 F0RMAT(//37H LINE I OF EACH PAIR IS THE FUNCTI0N/25H C A L C U L AT I 0 N P 0 9 2 0 5 8 0 A PRINTED TO , 9H14 DIGITS) P 0926 5 90

C***«* END OF SEGMENT 092 P0920600

C* * * « * WHEN EXECUTING ONLY SEGMENT 0 92, THE STOP AND END CARDS P 0 9 2 0 6 1 0 C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0920620

C***"»* IN COLUMNS 1 AND 2 REMOVED. P092 0 63 0 C= STOP P0920640

C= END P 0 9 2 0 6 5 6 STOP P092C1

END P092C2

C***************************************************»********»**********P0940010

C* * * * * P094 0 02 0 C***** TANGH - 094 P 09 4003 0 C* * * * * p 0

0

0**********************************************t************************P0940050

C *"**"*

' * GEN ERA L P U R P OS E A S A RE F P 0 9 4 0060

C*»*** TO TEST BASIC EXTERNAL FUNCTION - TANH - 8.3.3 P0940070

C* * * * * HYPERBOLIC TANGENT -TYPE REAL P0940 08 0 O**** USED IN SIMPLE ARITHMETIC EXPRESSIONS P0940090

C***** INTRINSIC FUNCTIONS ABS , F LOAT , AM I NO , AMAXO , I NT P094 0 1 0 0 C***»* ASSUMED WORKING P 0 9 4 0 1 1 0

C"

;* *"*"*"* ARGUMENTS FROM 0.0 TO 8.0 P 0 9 4 0 1 2 0 C***** P0940130

C* * * * * 0 U T P U T TAP E ASSIGNMENT STATEMENT. NO INPUT TAPE. P 0 9 4 0 1 4 0 C*»*** WHEN EXECUTING ONLY SEGMENT 094, THE FOLLOWING STATEMENT P0071900

C * * * * * NUVI - 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0 0 7 1 90 5 C*«*** P 0 0 7 1 9 1 0 C= NUVI = 6 POO 71 91

5

NUVI = 6 P094B1

9 4 6 FORMA T( 1 5 H 1 TANG H

: ('694 )// 32 H BASIC EX T E RNAL FUNCTION -TANH- P094 0 1 5 0 1//33H (HYPERBOLIC TANGENT -TYPE REAL) P0940160

NBS FORTRAN Test Programs Version 1
2//27H ASA REF . - 8.3.3 (TABLE 4W/24H

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

WRITE ( NUVI . 940)

HEADER FOR SEGMENT 094 WRITTEN

LINE 1 OF EACH PAIR IS/23H P0940170

P09401 80

P 09 4 0190

P0940200

P0940210

P0940220

P 0 9 4 0 2 3 0 P0940240

P 094 02 5 0 P0940260

PO 940"2 7 0 P0940280

P 0940290

P0940300

p 094031 0 P0940320

P09 4 0330

P0940340

p 0940 '3 50

P0940360

C * * * * * AVS = 2.0

CVS = -0.5

IVI = 6

BVS = TANH( FLOAT( IVI ) 3.0 AVS)

WRITE (NUVI, 941) BVS

BVS = TANH(AVS)

WRITE (NUVI, 942) BVS

BVS = TANH ( AVS + ABS(CVS))

WRITE (NUVI , 9 43 ) BVS

BVS = TANH ( AM I N 0 ( I V I , 8 ) - AVS)

WRITE (NUVI, 944 ) BVS

BVS = TANH(AMAXO( IVI , INT(AVS) )

)

WRITE (NUVI , 945) BVS

BVS = TAN H ( AVS ** 4 / AVS)

WRITE (NUVI , 9 46 ) BVS

WRITE (NUVI, 947)

941 FORMAT ( 7H0 X= 0 . 0 . 5X, 1 2H0 .0000000000 /F21 .7) P0940370

942 FORMAT( 7H0 X= 2 . 0 , 5X, 1 2H0 .9640275801 /F21 .7) P0940380

943 F0RMAT( 7H0 X= 2 . 5 , 5X, 1 2H0 .98661 42982 /F21 .7) P0940390

944 FORMAT ( 7H0 X= 4 .0.5X.12H0 .9993292997 / F 2 1 .7) P0940400

945 FORMAT ( 7H0 X= 6 .0.5X.12H0 .99998771 1 7 / F 2 1 .7) P 09 4 0 4 1 0 946 FORMAT ( 7H0 X= 8 . 0 , 5X, 1 2H0 . 9999997749 / F 2 1 .7) P0940420

947 FORMAT ( / / 3 7H LINE 2 OF EACH PAIR IS THE FUNCTION/25H CALCULATIONP0940430

1 PRINTED TO , 8H7 DIGITS ) P0940440

c * * * t

c * * * *

c * * * *

c * * * *

c"= c=

* END OF TEST SEGMENT 094

* WHEN EXECUTING ONLY SEGMENT 094, THE STOP AND

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

"STOP

END

STOP

END

END CARDS

C * * * *

C * * * * c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * t

c * * * * c=

c * * * * 950

c * * * *

P0940450

P0940460

P 0 9 4 0 4 7 0 P0940480

P0940 490

P0940500

P 0 9 4 C 1 P 0 9 4 C 2 **»tt*n*t«**iitttt«ittt***«ii*tt(tti*t»niM»iiiiiti«nittt»ii«ittiiP0950010

* P0950020

* SQROT - ( 095") P0 9 5 0 0 3 0

* P 0 9 5 0 0 4 0 **************************************t***t »** t**t*t****t******P0950050

* GENERAL PURPOSE ASA REFP0950060

* TO TEST BASIC EXTERNAL FUNCTION - SORT - 8.3.3 P0950070

* (SQUARE ROOT - TYPE REAL) TABLE 4P0950080

* USED IN SIMPLE ARITHMETIC EXPRESSIONS P0950090

* INTRINSIC FUNCTIONS F L OAT , I NT , AM I N 0 , MAXO P095 0 1 0 0 P 09 5 dilO

P09 5 0 1 2 0 P 09 5 0 1 3 6 P09501 40

POO 71 92 0

* WHEN EXECUTING ONLY SEGMENT 095, THE FOLLOWING STATEMENT P0071925

*' NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI = 6

* FORMAT ( 15 HI SQROT - ( 09 5 )7/3 2 H BASIC EXTERNAL FUNCTION -SORT- P 0 9 5 0 1 5 0 1//26H (SQUARE ROOT -TYPE REAL) P0950160

2//27H ASA REF . - 17575 (TABLE 4) / / 2 4 H LINE 1 OF EACH PAIR IS/23H P09 5 0 1 70

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS) P09 5 0 1 8 0 WRITE (NUVI , 9 5 0 ) P 0 9 5 0 1 9 0

* HEADER FOR SEGMENT 095 WRITTEN P0950200

AVS = 2.0 P09 5 0210

IVI = 3 P0950220

CVS = 1 7.6 PO 9 5 02 3 0 BVS = SQRT(FLOAT(( IVI INT(AVS)) / 2)) P0950240

WRITE (NUVI , 951) BVS P 0 9 5 0 2 5 0 BVS = SQRT(AMINO(MAXO( IVI ,2) , INT(CVS))) P0950260

* ASSUMED WORKING

* ARGUMENTS ARE ALL PRIME NUMBERS

*

* 0 U T P (J T T A P E ASSIGNMENT STATEMENT NO INPUT TAPE.

P0071 930

P0071935

P095B1

P0071940

NBS FORTRAN Test Programs Version 1
951

952

953

954

955

9 56

C * * * *

C

* * * *

c * * * *

c * * * * c=c=

WRITE (NUVI, 952) BVS P0950270

BVS = SORT(CVS) P09502S0

WRITE (NUVI, 953) BVS P0950Z90

BVS = SQRT(2.0 * CVS - FLOAT(IVI)) P0950300

WRITE (NUVI, 954) BVS ' P0950310

BVS = SORT ( FLOAT ( I V I + 1) 5.0 * CVS) P0950320

WRITE (NUVI, 9 5 5 ) BVS P0950330

WRITE (NUVI, 956) P0950340

FORMAT ( 8H0 X = 2 . 0 , 4X , 1 6H 1 . 4 1 42 1 3 5 6 2 3 7 3 1 6 / F21.7) P 09 5 03 5 0 FORMAT ( 8H0 X= 3 . 0 , 4X , 1 6H 1 . 7 3 2 0 5 0 8 0 7 5 6 8 8 8 / F21.7) P0950360

FORMAT ( 8H0

FORMAT ( 8H0

FORMAT ( 8H0

FORMAT ( / / 3 7H

1 PRINTED TO

X=1 7 . 0 , 4X, 1 6H4 . 12310562561766 / F21.7)

X=31 .0.4X.16H5. 56776436283002 / F21.7)

X = 8 9 . 0 , 4X , 1 6H9 . 4 3 3 9 8 1 1 320566 0 / F 2 1.7)

LINE 2 OF EACH PAIR IS THE FUNCTION/25H

8H7 DIGITS ) END OF TEST SEGMENT 095

WHEN EXECUTING ONLY SEGMENT 095. THE STOP

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

IN COLUMNS 1 AND 2 REMOVED.

STOP

AND

C = END

C * * * *

C * 1 1

1

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * t * *

c * * * *

c * * * * c=

P0950370

P0950380

P 09 5 0 390

CALCULATIONP0950400

p 6 9 5041 0 P0950420

CARDS p 09 5 6 43 6

P0950440

p 095 04 so P0950460

P0950470

P095C1

P095C2

END

STOP

END

«*«tttittttt»*»**»»«tt«t*»t«tt»t»ttt««tttt«t»»t**»t««***««»«i«*«»ttP0960010

* P 0 960 020

* DSQRO - (096) P0960030

t P 0 9 6 0 0 4 0 »«*t»»«t«»««t*«**t«t»«ttt«»t»«*»*i*»*«*t»t«»*t»*»t*t«**t«»»«t«t«»«tP0960050

ASA REFP096 0 0 60

8.3.3 P0960070

TABLE 4P0960080

P0960090

GENERAL PURPOSE

TO TEST BASIC EXTERNAL FUNCTION - DSQRT - (SQUARE ROOT - TYPE D.P. ) USED IN SIMPLE EXPRESSIONS

INTRINSIC FUNCTIONS DBLE . I ABS , FLOAT ASSUMED WORKING

ARGUMENTS ARE ALL PRIME NUMBERS

SPECIFICATIONS SEGMENT 096

*

t

* WHEN EXECUTING ONLY SEGMENT 096, THE SPECIFICATION STATEMENTS

» WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C="""

* IN CO LUMN S 1 AND 2 RE MOVE D , * DOUBLE PRECISION BVD

DOUBLE PRECISION BVD

P0960100

P09601 10

p 096 0120

P0960130

POO 122 10

P0012215

POO 1 2220

P0012225

P0012230

P0012235

P096A1

P0012240

P 0 9 6 0 1 4 0

P0071 950

POO 7 195

5

P0071960

POO 7 1 96

5

P096B1

P0071970

P0960150

P0960 160

P0960170

P0960180

P0960190

P0960200

P0960210

P0960220

P0960230

P0960240

P0960250

P0960260

P0960270

P0960280

P0960290

P09603 00

P0960310

C * * *

c * * *

c * * * *

c * * * *

c * t * *

« OUTPUT TAPE ASSIGNMENT STATEMENT.

*

* WHEN EXECUTING ONLY SEGMENT 0 96, THE FOLLOWING STATEMENT

NO INPUT TAPE.

G STATE ME

NUVI 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C- NUVI = 6

NUVI = 6

[ « « » * 960 FORMAT ( 1 5H 1 DSQRO - ( 096 W/33H

1//26H (SQUARE ROOT -TYPE D.P.)

2//27H ASA REF.- 8.3.3 (TABLE 4W/24H

3 HOLLERITH I N FORMATION // 9H RESULTS)

WRITE (NUVI, 960)

C«*»** HEADER FOR SEGMENT 096 WRITTEN

AVS = 3.0

I VI = -2

CVS = 17.0

BVD = DSQRT ( DBLE!( FLOAT ( I ABS ( I VI ) ) + AVS

WRITE (NUVI, 961) BVD

AVS)

BASIC EXTERNAL FUNCTION -DSQRTLINE 1 OF EACH PAIR IS/23H

3.0) )

BVD = DSQRT(0.0D0

WRITE (NUVI, 962) BVD

BVD = DSQRT (CVS - AVS + 3.000)

WRITE (NUVI, 963) BVD

BVD = DSQRT ( 2 . ODO * CVS

WRITE (NUVI, 964) BVD

DBLE(AVS) )

112 NBS FORTRAN Test Programs Version 1
BVD = DSQRT(DBLE(FLOAT(-IVI)+

WRITE (NUVI,, 965 ) BVD

WRITE (NUVI, 966)

AVS) * CVS FLOAT < I V I ** 2)

) P0960320

P0960330

P 0 9 6 0 3 4 0 P0960350

P 0 9 6 0 3 6 0 P0960370

P0960380

P0960390

961

962

963

964

965

966

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

8H0

8H0

8H0

8H0

8H0

X = 2 X = 3

X= 1 7 X = 3 1 X = 89

0 , 5 X

,

25H1

5X.25H1

5 X f 2 5 H 4 5X.25H5

5 X f 2 5 H 9

4 142 13 5623 73095 04880+00 /8X f 1PD2 4. 13)

7 3 2 0 5 6 8 0 7 5 6 & 8 7 7 2 9 3 5 D + 0 0 / S X . 1PD24. 13)

1231 0562561 7660 5 498D+ 00 / 8X , 1 PD24 . 13)

567764362 830021 92 21 D+00/8X, 1PD24. 13)

433981 13205660381 13D+00/8X.1P024. 13)

0,

0,

0,

0,

F0RMAT(//37H

A PRINTED TO , C * * *

C * * *

c * * *

c * * * c=

c =

END CARDS

CALCULAT I ONP0960400

P0960410

P0960420

P0960430

PO 960 446

P0960450

P 0960460

P0960470

P096C1

P096C2

C * * *

c * * *

c * * *

C * * *

c * * *

c * * * c* * *

c * * *

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * * c=

LINE 2 OF EACH PAIR IS THE FUNCTI0N/25H

9H14 DIGITS)

*» END OF TEST SEGMENT 096

** WHEN EXECUTING ONLY SEGMENT 096, THE STOP AND

*'* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = ** IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

itttttitiititiii»tiiittiiiiii(i(itii<tiiniiiiiiiiiintitniiit>titiP09?0010

'*.**' P0970020

t * CSQRO - ( 097 ) P 09 7 0 030

t * P 0 9 7 0 0 4 0 ******************t********************t***»*********«*tt****«***t**P0970050

** GENERAL PURPOSE ASA REFP0970060

* * P 0970070

** TO TEST BASIC EXTERNAL FUNCTION -CSORT- 8.3.3 P0970080

*"« ."" (SQUARE ROOT OF A COMPLEX NUMBER ) ** ARGUMENTS ARE EP1C(11) TO E P 1 C ( 2 0 ) ** EXPECTED RESULTS ARE EP 1 C ( 1 ) TO EPUdO)

** SPECIFICATIONS SEGMENT 097

TABLE

WHEN EXECUTING ONLY SEGMENT 097 THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

* *

* *

COMPLEX

COMPLEX

E P 1 C ( 3 0 ) EP 1 C ( 3 0 ) AVC

AVC

BVC

BVC

C * * * * * C» * * *

« 0 U T P U f - t A P E ASSiGNM ENT STATEMENT

C * * *

c * * *

c * * *

c"=

NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 097, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = NUVI =

C * * * * *

970

WRITE (NUVI, 970)

FORMAT ( 1 5 H 1 CSQRO - ( 097 )// 33H BASIC EXTERNAL FUNCTION • 1//29H (SQUARE ROOT -TYPE COMPLEX) / /27H ASA REF.- 8.3.3

CSQRT-

(TABLE

4P0970090

P09701 00

P 0 9 7 0 1 1 6 P0970120

POO 1 22 5 0 P0012255

POO 1 2260

P0 0 1 226 5 POO 1 22 70

P001 2275

P097A1

P0012280

P 0 9 7 0 1 3 0 P0071 980

POO 7 198 5 P0071 990

PO 0 7 1 9 9 5 P097B1

POO 720 00

P09701 40

P 09 7

0 1 5 0

4 > P09 70 1 60

2//24H LINE 1 OF EACH PAIR IS /20H THE EXPECTED VALUE //9H RESULP0970 1 70

3T ) P09701 80

C***«* INITIALIZE EP 1 C (EXACT VALUES) P0970190

EP 1 C ( 1 ) = (0.9950042,0. 0998334) P0970200

EP 1 C < 2 ) = (0.9800666,0. 1986693) P0970210

EP1C(3) = (0.9553365,0. 2955202) P0970220

EP1C(4) = (0.9210610,0. 3894183) P0970230

EP1C(5) = (0.8775826,0. 4 7942 5 5 ) P0970240

EP 1 C < 6 ) = (0.8253356,0. 5 64642 5 ) P0970250

EP 1 C < 7 ) = (0.7648422,0. 6442177) P0970260

E P 1 C < 8 ) = (0.6967067,0. 71 7356 1 ) P0970270

EP1C(9) = (0.5403023,0. 8414710) P0970280

EPUdO) = (0.4161468,- 0 .9092974) P0970290

EP 1 C ( 1 1

)

= (0.9800666,0 .19 8 6 6 9 3) P0970300

EP1CM2) = (0.9210610,0 .3894183) P097031

0

E P 1 C C 1 3 ) = (0.8253356,0 . 5 64642 5 ) P0970320

EP1 C( 1 4) = (0.6967067,0 .7173561) P0970330

EP 1 C ( 1 5

)

= (0.5403023,0 .8414710) P0970340

EP1 C( 16) = (0.3623577,0 . 9320391 ) P0970350

EP1 C( 1 7) = (0.1699671,0 .9854497) P0970360

NBS FORTRAN Test Programs Version 1 113
EP1C(18) = (-0.0291995.0.9995736)

EP1C(19> = (-0.4161468,0.9092974)

P0970370

P0970380

EP1C(20) = (-0.6536436,-0.7568025)

IVI = 0 P0970390

P0970400

971 JVI = 1 972 IVI = IVI + 1 P0970410

P0970420

JVI = JVI + 1 AVC = CSQRT ( EP 1 C( IVI + 10) * (10. ** ((2 * JVI) - 8)))

P0970430

P0970440

BVC = EP1 C( I VI ) * 10. * * (JVI - 4)

WRITE (NUVI, 973) BVC , AVC

P0970450

P0970460

973 FORMAT ( 2H0 2E 1 4 . 7 / 2X , 2E 1 4 . 7

)

IF (JVI - 6) 972. 974. 974

P0970470

P0970480

974 IF (IVI - 10) 971, 975. 975

975 WRITE (NUVI , 976)

P0970490

P0970500

976 F0RMAT(//37H LINE 2 OF EACH PAIR IS THE FUN CT I ON / 1 3H C A L CU L AT I 0 N P 0 9 7 0 5 1 0 1) P0970520

C***t» END OF TEST SEGMENT 097

C***** WHEN EXECUTING ONLY SEGMENT 097 THE STOP AND END CARDS

P0970530

P0970540

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C****« IN COLUMNS 1 AND 2 REMOVED.

P0970550

P0970560

C= STOP

C= END

P0970570

P0970580

STOP

END

P097C1

P097C2

[ttmiiiiiimiiintioiMttiiiiitiiiiiuiittttiiiiitiiiiitiiititittti

c * * * * t

* P 0 9 S 0 0 1 0 P0980020

C****» ARCTG - (098)

C t * * * * P0980030

P0980040

C***************t*t**************t****************t*********************P0980050

G*«*** GENERAL PURPOSE ASA REFP098 0060

C***** TO TEST BASIC EXTERNAL FUNCTION - ATAN - 8.3.3

C***«* (TRIGONOMETRIC ARCTANGENT, SINGLE ARGUMENT -TYPE READTABLE

P0980070

4P0980080

C****t USED IN SIMPLE ARITHMETIC EXPRESSIONS

C***** INTRINSIC FUNCTION ABS , F LOAT , AMAX1 , I NT

P0980090

P09801 00

C***«* ASSUMED WORKING

C****» ARGUMENTS ARE POWERS (OR SUMS) OF 2 P09801 1

0

P09801 20

c * * * * * C*t*** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P09801 30

P09801 40

c * * * * * C****« WHEN EXECUTING ONLY SEGMENT 098, THE FOLLOWING STATEMENT

P007201

0

n A A T A <1 C P 0 0 72 0 1 5 C***«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C= NUVI = 6

P0072020

P0072025

NUVI = 6

c

* * * * * P098B1

P0072030

WRITE (NUVI, 980)

980 FORMAT < 1 5H 1 ARCTG - ( 098 W/32H BASIC EXTERNAL FUNCTION -ATANP09801 50P0980160

1//25H (ARCTANGENT -TYPE REAL)

2//27H ASA REF.- 8.3.3 (TABLE 4W/24H LINE 1 OF EACH PAIR IS/23H

P09801 70

P0980180

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

C***** HEADER FOR SEGMENT 098 WRITTEN

P0980190

P0980200

AVS = .125

CVS = -.25

P0980210

P0980220

IVI = 2 BVS = ATAN(AMAX1 (AVS, CVS) ) P0980230

P0980240

WRITE (NUVI, 981) BVS

BVS = AT AN ( AVS * 2.0)

P0980250

P0980260

MR I TE ( NUVI . 9 82 ) BVS

BVS = ATAN (ABS(CVS) + AVS)

P0980270

P0980280

WR I TE < NUVI , 983 ) BVS

BVS = ATAN(-CVS * AMAXOdVI. INT(AVS)))

P0980290

P0980300

WRITE(NUVI, 984) BVS

BVS = ATAN (FLOAT(IVI) * CVS - (2.0 * AVS))

P09803 1 0 P0980320

WRITE (NUVI, 985) BVS

BVS = ATAN ( 1 .0)

P0980330

P0980340

WRITE (NUVI, 986) BVS

WRITE (NUVI, 987)

P0980350

P0980360

981 FORMAT ( 1 OHO X= 0.125,5X,15H 0 . 1 2 43 5 4994 5 4 7 , / 1 OX , F 1 5 . 7

)

982 FORMATdOHO X= 0.2 5 0.5X.1 5H 0 . 2 4 49 78 663 1 2 7 , / 1 OX , F 1 5 . 7 ) P0980370

P0980380

114 NBS FORTRAN Test Programs Version 1
983 FORMAT ( 1 OHO X= 0 984 FORMAT (1 OHO X = 0

3 75 , 5X, 1 5H 0

5 0 0.5X, 1 5 H 0 358770670271

463647609001

/ 1 OX . F15

/ 1 OX, F1 5

7 ) 7)

P0980390

P0980400

98 5 FORMATdOHO X = - 0 . 7 5 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 FORMAT ( 1 OHO X= 1 . 0 0 0 , 5 X 1 5 H 0 . 78 5 398 1 63 39 7 , / 1 OX . F 1 5 . 7

)

987 FORMAT ( / /37H LINE 2 OF EACH PAIR IS THE FUNCTION/2 5H

1 PRINTED TO ,8H7 DIGITS ) 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.

P098041

0

P0980420

CAL CUL AT I 0 N P 09 8 0 43 0 P0980440

PO 98 0 45 0 P0980460

P 0 9 8 0 4 70

P0980480

CARDS

C= STOP P0980490

C= END P0980500

STOP P 6 98.CI

END P0 98 C2

(;***********************************************************************P0990010

C* * * * * P0990020

C * * * * *

c * * * * * DACTG - (099) P0990030

P 0 9 9 0 0 4 0

C ***********************************************************************P0990050

C***** GENERAL PURPOSE

C***** TO TEST BASIC EXTERNAL FUNCTION - DAT AN - C***** (TRIGONOMETRIC ARCTANGENT .SINGLE ARGUMENT -TYPE D.P.)

C"*"*"*"*"* USED IN SIMPLE A R if H ME TIC EXP RE SSI 0 N S C***** INTRINSIC FUNCTIONS DS IGN , FLOAT , OBLE ASSUMED WORKING

C * * * * t

c * * * * *

C * * * * *

c * * * * *

ARGUMENTS ARE POWERS (OR SUMS) OF 2

"S P E C I F I C A f 1 0 N S S E G M E N T 0 9 9

C * * * * *

c * * * * *

C * * * * *

c * * * * *

WHEN EXECUTING ONLY SEGMENT 099, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS i AND"' 2 REMOVED.

C= DOUBLE PRECISION AVD, BVD, CVD

DOUBLE PRECISION AVD, BVD , CVD

C * * * * *

C *.*»** 0 U T P U T T A P E ASSIGNMENT STATEMENT

C ***** C****« WHEN EXECUTING ONLY

C

*"*"'*"*'* " liiuv'i = 6 MUST HAVE

C= NUVI = 6

NO INPUT TAPE

SEGMENT 099, THE FOLLOWING STATEMENT

THE C= IN COLUMNS 1 AND 2 REMOVED.

ASA REFP0990060

8.3.3 P0990070

TABLE 4P0990080

P0990090

P09901 00

p 09 90 T 10

P09901 20

P 0 9 9 0 1 3 0 P 0 0 1 22 90

P 0 0 1 2 2 9 5 P0 0 1 23 0 0 P 0 0 1 2 3 0 5 P 0 0 1 2 3 1 0 POO 1231

5

P099A1

POO 1 23 2 0 P09901 40

POO 72 0 40

P0072045

P 6 6 72 0 5 0 P0072055

NUVI = 6

C * * * * *

c * * * * *

990

HEADER

WRITE(NUVI

,

FORMAT ( 1 5H1

FOR SEGMENT 099 WRITTEN

990 ) DACTG - (099) 7 /33H BASIC EXTERNAL FUNCTION -DATAN1//25H (ARCTANGENT -TYPE D.P.)

LINE 1 OF EACH PAIR IS/23H

P099B1

P0072060

PO 99 015 0 P0990160

P 0 9 9 0 1 7 0 P09901 80

P0990 1 9 0 P0990200

P 0 9 9 0 2 1 0 P0990220

IV I = 2 P 0990 23 0 BVD = DATAN(DSIGN(AVD f CVD) ) P0990240

WRITE (NUVI, 991 ) BVD P0990250

BVD = DATAN (2.0 * ( -AVD ) ) P0990260

P0990270

P0990280

P 0990 290

/ 4.0)) P0990300

2//27H ASA REF . - 8.3.3 (TABLE 4W/24H

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

AVD = - . 125D0

CVD = .25D0

WRITE(NUVI, 992) BVD

BVD = DATAN ( CVD - AVD)

WRIT E( NUVI, 993) BVD

BVD = DATAN(DBLE(FLOAT( IVI

)

WRITE (NUVI, 994) BVD P0990310

BVD = DATAN (DSIGNd.ODO - CVD. AVD)) P0990320

WRITE (NUVI, 99 5) BVD P0990330

BVD = DATAN(DBLE(FLOAT( IVI ** 2)) * CVD) P0990340

WRITE (NUVI. 996) BVD P0990350

WRITE (NUVI, 997) P0990360

991 FORMAT ( 1 0HO X= 0.125.5X.19H 0 . 1 243549945 470 + 66 /10X.D24. 12) P0990370

992 FORMAT ( 1 OHO X= 0 . 250 . 5X. 1 9H 0 . 244978663 1 27D + 00 /10X.D24.12) P0990 3 8 0 9 9 3"' FORMAT ( 1 OH 6 X = 07375 , 5 X . 1 9H 0 . 358770670271 D + 00 /1 OX . 02 4 . 1 2 ) P0990390

994 FORMAT ( 1 0HO X= 0.5 00.5X. 1 9H 0 . 46364760900 1 D + 00 /10X.D24.12) P0990 40 0

NBS FORTRAN Test Programs Version 1
995 FORMAT ( 1 OHO X = -0 . 750 , 5X, 1 9H-0 . 643501 1 087930 + 00 /10X.D24.12) P0990410

996 FORMAT ( 1 OHO X= 1.000 f 5X,19H 0 . 78 5 398 1 63 397D + 0 0 /10X.D24.12) P0990420

997 FOR MAT ( //37H LINE 2 OF EACH PAIR IS THE F UNCTION/ 2 5 H CAL CULAT I ONP0990430

1 PRINTED TO ,9H12 DIGITS ) P0990440

C * * t *

C * * * *

C t * * *

c * * * * c=

c=

END OF TEST SEGMENT 099

* WHEN EXECUTING ONLY SEGMENT 099, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C =

* IN COLUMNS 1 AND 2 REMOVED.

P0990450

P0990460

P 0 99 0 4 70

P0990480

STOP P0990490

END P0990500

STOP P 0 9 9 C

1

END P.Q.99C2.

« * « » » * » t » » » » t « t * » t » t * * » « » « « » * » t * t * » 1 1 » i « » t

* i * * t » * * * * * t * * * » t » « « » t » * »P1 00001

0

* P1000020

"* ACT G2 - (100) P1 000030

* Pipp.00.40

*" *"*"•"* *********** ******** ************ ******************************* pi 000050

* GENERAL PURPOSE ASA REFP1000060

* TO f EST BASIC EXTERNAL FUNCTION - AT AN 2 - 8.3.3 P 1 000070

* (TRIGONOMETRIC ARCTANGENT, TWO ARGUMENTS -TYPE REAL) TABLE 4P1000080

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c"=

USED IN SIMPLE ARITHMETIC EXPRESSIONS

INTRINSIC FUNCTIONS AM I N 1 , F LOAT , AMAXO

ARGUMENTS ARE POWERS (OR SUMS) OF 2 ASSUMED WORKING

P 1 00 0090

P1 0001 00

P 1 0 0 0 1 1 0 P 1 00 0 1 20

P1 000130

P0072070

P0072075

P0072080

P0072085

P100B1

P0072090

P1000140

P 1 0 0 0 1 5 0 P 1 00 0 1 60

P1 0001 70

P 1 00 0 1 8 0

* OUTPUT TAPE ASSIGNMENT STATEMENTS.

*

* WHEN EXECUTING ONLY SEGMENT 100, THE FOLLOWING STATEMENT

NO INPUT TAPE

STATE ME I

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = NUVI =

C * * * *

1000

MRITECNUVI . 1000)

FORMAT < 1 5H 1 ACTG2 - ( 1 00 ) // 33H BASIC EXTERNAL FUNCTION -ATAN2-

1//37H (ARCTANGENT, 2 ARGUMENT -TYPE REAL)

2//27H ASA RE F . - 8.3.3 (TABLE 417/2 4 H LINE 1 OF EACH PAIR I S / 2 3 H

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

AVS = .125 P1000190

CVS = -.25 P1000200

IVI = 2 P1 0002 1 0 BVS = ATAN2(ABS(AMIN1 (AVS, CVS) ) , FLOAT < IVI) ) P1000220

WRITE (NUVI, 1001) BVS P1 000230

BVS = ATAN2(CVS ** 2, AVS * 2.0) P1000240

WRITE (NUVI, 1002) BVS P1000250

BVS = ATAN2 (AVS - CVS, -(4.0 * CVS)) P1000260

WRITE (NUVI, 1003) BVS P1000270

BVS = ATAN2(-CVS/AVS, AMAXO ( I V I , 4 ) ) P1000280

WRITE (NUVI, 1004) BVS P1000290

BVS = ATAN2(-. 09375, AVS) P1000300

WRITE (NUVI, 1005) BVS P 1 00 03 1 0

BVS = ATAN2(FL0AT( IVI ) , 2.0) P1 000320

WRITE (NUVI, 1006) BVS P1000330

WRITE (NUVI, 1007) P1000340

1001

1002

1003

1004

1005

1006

1 0 0 7

F0RMAT( 1 OHO

FORMAT( 1 OHO

FORMAT ( 1 OHO

F0RMAT( 1 OHO

FORMAT ( 1 OHO

F0RMAT( 1 OHO

X= 0.125,5X,15H 0. 124354994547, /10X.F15. 7) P1000350

X = 0 . 2 50, 5X. 1 5 H 0 . 2449 78663 1 27 , / 1 OX, F1 5 . 7) P 1 000360

X= 0 . 3 75 , 5X. 1 5H 0 . 3 5 8 7 706 702 7 1 , / 1 OX , F 1

5

X= 0.500.5X.15H 0.463647609001 ,/10X,F15

X = - 0 . 7 5 0 , 5 X . 1 5 H -0 . 643 5 0 1 1 0 8 7 93 . /10X. F15

X= 1.0 00 . 5X. 1 5H 0 . 785398 1 63397 , / 1 OX, F1

5

OF EACH PAIR IS THE FUNCTION / 25H

7)

7)

7)

7)

C * * * *

C * * * *

c * * * *

c * * * *

F0RMATW/37H LINE 2 OF EACH

1 PRINTED TO ,8H7 DIGITS )

* END OF TEST SEGMENT 100

* WHEN EXECUTING ONLY SEGMENT 100, THE STOP AND

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C": * IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

END

P1000370

P1000380

P 1 6 0 0 3 9 0 P1000400

CALCULATTONP1 0 004lb

P1000420

P1000430

CARDS P1000440

Pi 000450

P1000460

P1 000470

P1000480

P100C1

P100C2

16 NBS FORTRAN Test Programs Version 1
Ct*»t*tt»ii«t«*»«»*ttt»tt»t**t»t*t«t«t«»»««ttt«tttttt*tt»ttitt«tt««ttt»t«pioiooio

C****t „........_ P1010020

0ATN2 - (101) P 1 0 1 003 0 C**.**.* P1 0.1 00 40

[»t*«t»«»t»*t»»*»*«t»*t»t*t**»t«*»t*i»t»«*t»»»t»ts»*t*»*»t»**t»»t»«***»»pi010050

C*«*** GENERAL PURPOSE ASA REFP 1 0 1 0 060

C * * *"*"* TO TEST BASIC EXTERNAL FUNCTION - DAT AN 2 - 8.3.3 PI 0 1 0 0 70

C***** (TRIGONOMETRIC ARCTANGENT. TWO ARGUMENT -TYPE D.P.) TABLE 4P1010080

C*'*T*'t USED IN SIMPLE ARITHMETIC EXPRESSIONS P1 01 0090

C****« INTRINSIC FUNCTIONS D M I N 1 , D M AX 1 , D S I G N , D B L E , F L 0 AT P 1 0 1 0 1 0 0 C*

"*"*"*'* ASSUMED WORKING P1 01 01 10

C****« ARGUMENTS ARE POWERS (OR SUMS) OF 2 P1010120

C * * * * * ^ PI 01 01 3 0 C***»* SPECIFICATIONS SEGMENT 101 P1010140

C * * * * *

c * * * * *

c * * * * *

c * * * * *

WHEN EXECUTING ONLY SEGMENT 101. THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = IN COLUMNS

1 AND 2 REMOVED.

C t * * * t

c = DOUBLE PRECISION AVD, BVD, CVD

DOUBLE PRECISION AVD, BVD, CVD

c * * * * *

c * * * * t 0 U T P U T - T A P E ASSIGNMENT STATEMENT. NO INPUT TAPE

c * * * * *

c * * * * * WHEN EXECUTING ONLY SEGMENT 101, THE FOLLOWING STATEMENT

c * * * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED . c= NUVI = NUVI =

6

6

c * * * * t WRITE (NUVI, 1010)

1010 FORMAT ( 1 5 H 1 DATN2

1//37H (ARCTANGENT

2 7 / 2 7 H ASA REF .

BASIC EXTERNAL

TYPE D.P.)

FUNCTION -DATAN2

8 . 3

( 1 0 1 ) / /36H

2 ARGUMENT

?3 (TABLE 4>//24H LINE 1 OF EACH PAIR IS/23H

3 HOLLERITH I N FORMAT I ON / / 9H RESULTS)

AVD = CVD = 125

.25

P0012330

P001 Z335

P 0 0 1 2 3 4 0 P0012345

P O O i '2 3 5 6 P0012355

P 1 0 1 A

1

P0012360

pi bi 0150

P00721 00

POO 72 105

P0 0 72 1 1 0 P0 0 72 1 1 5 P101B1

POO 72 1 20

P1 01 01 60

P'T 0 1 01 7 0 P1010180

P1 01 0190

P 1 0 1 0 2 0 0 P 1 01 0210

P1 01 0220

Pi 0 1 0 23 0 P 1 0 1 0 2 4 0 P 1 0 1 0 2 5 0 P1 01 0260

P1 01 0270

0D0) )P 1 0 1 0 2 8 0

IVI = 2 BVD = DATAN2 ( DMINK AVD,

WRITE (NUVI, 1011) BVD

BVD = DATAN2 ( AVD, F L OAT

(

WRITE (NUVI, 1012) BVD

BVD = DATAN2 (DSIGN(2.0D0

CVD) , 2 .000 / .0 B L E ( F L 0 AT ( IVI ) ) )

IVI) * (-CVD))

CVD + AVD, AVD), D M AX 1 ( AVD , C VD 1 W R I T E ( N U V I , 1013) BVD P 1 0 1 0 2 9 0 BVD = DATAN2(DMIN1 (AVD, . 0625D0) , DMAX 1 (AVD, CVD) ) P 1 0 1 0 3 0 0 WRITE (NUVI , 1014) BVD P

1 01 031 0 BVD = DATAN 2 ( DAB S ( C VD ) * DS I G N ( AVD , CVD) * 6. DO, . 2 5 D 0 ) P 1 0 1 0 3 2 0 WRITE (NUVI, 1015) BVD P 1 0 1 0 33 0 BVD = DATAN2 (DBLE( F L 0 AT ( IVI ) )

, AVD * FLO AT (IV I * * 4 ) P 1 0 1 0 3 40

)

WRITE (NUVI

WRITE (NUVI

1011 FORMAT ( 1 OHO

1012 FORMAT (1 OHO

1013 FORMAT ( 1 OHO

1014 FORMAT (1 OHO

1015 FORMAT ( 1 OHO

1016 FORMATdOHO

1017

5X,

5X,

5X,

5.X. 5X,

5X.

FORMAT < / / 3 7 H LINE 2 OF

1 PRINTED TO ,9H12 DIGITS

C * * » * * END OF TEST SEGMENT

1016)

1017)

X = 0.125

X= 0.250

X= 0.375

X= 0.500

X = -0 . 750

X= 1.000

BVD

1 9H

1 9H

1 9 H 19H

1 9 H

-

1 9H

EACH

) 101

0 . 1 2 4 3 5 499 4 5 4 7D + 00 /10X.D24.12)

0.244978663127D+00 /10X.D24.12)

6.3 5 8 7 7 0 6 7 0 2 7 1 D + 0 0 7 1 0 X , 024 .12 ) 0.463647609001D+00 /10X.D24.12)

b7643 5bii0 8 793D+0 0 /10X.D24. 12)

0 . 78 5 398 1 63 3 9 7D + 00 /10X.D24.12)

P1 01

P101

P 1 01

P1 01

P1 01

P1 01

P 1 01

P1 01

PAIR IS THE FUNCTI0N/25H CALCULATIONP1 01

P101

PI 01

CARDS P101

P 1 01

P101

C***** WHEN EXECUTING ONLY SEGMENT 101 THE STOP AND END

C * * * * * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = C****« IN COLUMNS 1 AND 2 REMOVED.

c= stop''

C= END

STOP

END

C***********************************************************************P1020010

C***«* P1020020

0 3 5 0

0 360

03 70

03 8 0 0390

0 40 0 0410

0 420

0 43 0

0 440

0 45 0 0460

0476

0 4 8 0 P 1 0 1 0 4 9 0 PI 0 1 0 5 0 0 pi bid

P1 01 C2

NBS FORTRAN Test Programs Version 1
C***** DMODA - (10Z) P10Z0030

C * * * * * P 1 02 0 040

c

* * * * * ****** ************************************ * **************** * ***** tt p ] 026656

C***** GENERAL PURPOSE ASA REFP1020060

C'"* *"*"*"* TO TEST BASIC EXTERNAL FUNCTION - DM 6 6 - 8.3.3 P 1020 0 70

C****» (REMAINDERING -TYPE DOUBLE PRECISION) TABLE 4P1020080

C ***** I NT R IN SI C FUNCTI 0 N S DBLE, FLOAT, IDINT, ASSUMED WORKING P 1 020090

C * * * * * P1020100

C

* * * * * S P E C I F I C A T

I" 0 N S SEGMENT 102" " P 1 0 2 0 1 1 0 C***** P0012370

C * * * * * WHEN EXECUTING ONLY SEGMENT 102, THE SPECIFICATION STATEMENTS P0 0 1 23 75

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0012380

C* * * * « IN COLUMNS 1 AND 2 REMOVED. PO0 1 23 8 5

C * * * * * P0012390

C= DOUBLE PRECISION AVD , BVD , CVD , DVD , EVD , FVD , GVD POO 1 2395

DOUBLE PRECISION AVD , BVD , CVD , DVD ...EVD, FVD . GVD , P102A1

C***«* P001 2400

C***** OUTPUT-TAP E ASSIGNMENT STATEMENT, NO INPUT TAPE, P1 0201 2.0

C * * * * * P0 0 72 1 30

C***** WHEN EXECUTING ONLY SEGMENT 102 THE FOLLOWING STATEMENT P0072135

C *"*"*"** NUVI ""= 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. ' PO 0 72 1 40

C.= NUVI = 6 P00721 45

N U V 1=6 P 1 0 2 B 1 C***** P0072150

WRITE (NUVI , 1 02 0 ) P 1 020 1 30

1 02 0 F 0 R M AT ( 1 5H1 DMODA - (102W/32H BASIC EXTERNAL FUNCTION -DMOD- P 1 020 1 40

1//39H (REMAINDERING -TYPE DOUBLE PRECISION W/27H ASA REF . - 8 . 3 . 3 P 1 0 2 0 1 5 0

2 (TABLE 4)// 9H RESULTS) P 1 0 2 0 1 6

0

AVD "=

1 6.062 5 DO " P 1 020 1 70

BVD = -4.0D0 P 1 020 1 80

CVD =

" -8'. 1 2 5 DO PI 02 0 1 90

DVD = 2.5D0 P1020200

EVD = - 1 . ODO

"' P 1 0 2021 0 FVD = 1 . ODO P 1 02 0220

FVD = DMOD (AVD, BVD) P 1 0 2 0 2 3 0 GVD = FVD - 0.0625D0 P1020240

WRITE (NUVI, 1021) GVD

"' P 1 02 02 5 0 FVD = 2. ODO P1020260

FVD = DMOD ( CVD , DVD) ' P1 020270

GVD - FVD + 0.625D0 P1020280

WRITE (NUVI, 1021) GVD P1 020290

FVD = 3 .ODO P 1 0 2 0 3 0 0

FVD - DMCD ( BVD , EVD) P 1 0 2 0 3 1 0 GVD = FVD + O.ODO P1020320

WRITE (NUVI, 1021)' GVD P 1 020330

FVD = 4. ODO P 1 0203 40

FVD = DMOD (BVD , AVD) P 1 0 2 0 3 5 0 GVD = FVD - (BVD-(DBLE(FLOAT( IDINT(BVD/AVD) ) ) ) * AVD) P 1 020360

WRITE (NUVI , 1021) GVD P1 020370

WRITE (NUVI, 1022) P1020380

1021 FORMAT( //D25 . 14) P1 020390

1022 FORMAT ( / / 1 8H END OF DMOD TEST//40H ALL ABOVE ANSWERS SHOULD BE 0P1020400

1 FOR THIS/32H TEST SEGMENT TO BE SUCCESSFUL.") P 1 0 2 0 4 1 0 C***«* END OF TEST SEGMENT 102 P1020420

C***** WHEN EXECUTING ONLY SEGMENT 102 THE STOP AND END CARD S P 1 02 0 4 3 0 C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1020440

C* * * * * IN COLUMNS 1 AND 2 REMOVED. P 1 02 0 4 5 0 C= STOP P1020460

C= END P 1 02 0 4 70

STOP P102C1

C***********************************************************************P1030010

C* * * * * P 1 0 3 002 0 C* * * * * CABSA -(103) P 1 03 0 03 0 C« * « * * P 1030040

C***********************************************************************P1030050

C * * * * * GENERAL PURPOSE ASA RE F P 1 0 3 0 060

C* * * * * .TO TEST BASIC EXTERNAL FUNCTION -CABS- 8.3.3 P 1 0 3 0 0 70

NBS FORTRAN Test Programs Version 1
(MODULUS OF A COMPLEX NUMBER)

ARGUMENTS ARE ARRAY EP1 C< 30 ) . FUNCTIONS FROM

ODD NUMBERED ARGUMENTS PRINTED AS SET 1 AND

FROM EVEN NUMBERED ARGUMENTS

SET 1 RESULTS SHOULD BE

"'. 1 E-6 TO .1 E + 8 SET 2 RESULTS SHOULD BE .5 E-6 TO .5 E+8

C * * * * *

C * * * * *

c * * * * *

c * * * * *

C * * * * *

c * * * * *

C * * * * * C***** SPECIFICATIONS SEGMENT 103

TABLE 4P1030080

P 1 03 0090

P 1 03 0 1 0 0 P 1 03 0 1 1 0 P 1 0 3 0 1 2 0 P 1 03 0 1 30

P 1 0 3 0 1 40

P 1 03 0 1 5 0 P 0 0 1 2 4 1 0 P 0 0 1 2 4 1 5 P0 0 1 2 42 0 P 0 0 1 2 42 5 P0 0 1 2 430

P0 0 1 2 43 5 P 1 0 3 A

1

P0 0 1 2 440

p 1 03 0 1 60

P 0 0 72 1 60

P00721 65

P00721 70

P 0 0 72 1 7 5 P 1 0 3 B 1 P 0 0 7 2 1 SO

P 1 0 3 0 1 7 0

P 1 0 3 0 1 8 0 P1 0301 90

P 1 0 3 02 0 0 P 1 03 02 1 0

P 1 03 022 0 P 1 03 02 3 0

P 1 0 3 0 2 40

P1 030250

C * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * * C= COMPLEX

COMPLEX

C * * * * *

c ***** o u f

c * * * * *

WHEN EXECUTING ONLY SEGMENT 103 THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

E P 1 C ( 3 0 ) E P .1 C ( 3 0 ) PUT-TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

EXECUTI NG

= 6 MUST

6

6

ONLY

HAVE

SEGMENT

THE C = 103 THE FOLLOWING STATEMENTN COLUMNS 1 AND 2 REMOVED.

C****» WHEN

C***** NUVI

C= NUVI = NUVI =

C * * * * * WRITE (NUVI, 1030)

1 0 3 0 FORMAT ( 1 5 HI CABS A - ( 1 03 ) / / 32 H BASIC EXTERNAL FUNCTION - CABS - 1//31H (MODULUS OF A COMPLEX NUMBER)//27H ASA REF . - 8.3.3 (TABLE

Z 4 )7 79 H R E SU L T S 7 7 1 OX, 5HSET 1 , 1 5X, 5HSET 2 ) C***** INITIALIZE EP1C(EXACT VALUES)

E P1 C ( 1 ) = ( 0 . 5E- 7 , - 0 .86 6 0 2 5 E - 7

)

EP1C(2) = (2.5E-7.-4.330125E-7)

EP 1 C ( 3 ) = ( 1 ". E -6 , 0 . 0

)""" EP1C(4) = (5. E-6, 0.0)

E P 1 C ( 5 ) =

E P 1 C ( 6 ) = EP1 C( 7) = EP1C(8) = EPIC (9) = EPU(IO) = EP 1 C ( 1 1 ) =

E P 1 C ( 1 2 ) = EP1 C( 13) = EP1 C( 1 4) = EP 1 C ( 1 5 ) = EP1 C( 16) = EP1 C( 1 7) = EP1C(18) -

E P 1 C ( 1 9 ) - EP1C(20) =

E P 1 C ( 2 1 ) = EP1C(22) = EP 1 C ( 23 ) =

E P 1 C ( 2 4 ) = EPIC (25) =

(0.5E-5,0.866025E-5)

(2.5E-5.4.330125E-5)

( - 0 . 5 E - 4 , 0 . 8 6 6 0 2 5 E - 4 ) (-2.5E-4.4.330125E-4)

( - 1 . E - 3 , 0 . 0 ) (-5.E-3/6.0)

(-0.5E-2.-0.866025E-

(-2.5E-2.-4.330125E-

( 0 . 5E - 1 . - 0 . 8 66 0 2 5 E - 1 (2.5E- 1 .- 4.33 0 1 2 5 E-1

(1 .0,0.0)

(5.0,0.0)

(0.5E 1 .0.8660 2 5 E1 ) (2 . 5E 1 , 4 . 3 3 0 1 2 5 E1 )

( -0 . 5E 2 , 0 . 86602 5 E2

)

(-2.5E2.4.330125E2)

( - 1 . E3 , 0 . 0 ) (-5.E3.0.0)

(-0.5E 4,-0. 86602 5E4)

(-2.5E4.-4.330125E4)

(0 . 5E 5 , - 0 . 8 66 02 5 E5 )

2)

2)

)

)

EP 1 C < 26 ) = (2.5E 5 .- 4 . 3 3 0 1 2 5 E5)

EP1 C(27) = (1.E6.0.0)

EP1C(28) = (5.E6.0.0)

E P 1 C ( 2 9 ) = (0 . 5E7 . 0 . 86602 5 E 7 > EP1C(30) = (2.5E7.4.330125E7)

IVI = - 1 1031 IVI = IVI + 2 AVS = CABS (EPU(IVD)

BVS = CABS (EP1 C( I VI + 1 )

)

WRITE ( NUVI , 1 03 2 ) AVS , BVS

1 032 FORMAT ( 1 HO , E17.6, 2X, E17.6)

IF (IVI - 29 ) 1 0.3.1 , 1 033, 1 033

1033 WRITE (NUVI, 1034)

1 6 3 4 FORMAT ( / / 3 9 H VALUES I N EACH SET SHOULD BE P 0 S I T I VE 7 3 9

H

1ET 1 (.5 FOR SET 2), EXPONENT / 3 5 H RANGE FROM -06 TO +08

. 1

I N

PIP1

P1

P1

P1

P1

P1

P1

P 1 P 1 PIP1

P1

P1

P1

P1

P1

P1

P1

PI

PI

P1

P1

P1

P1

P 1

p'i p 1 p 1 pi

p'i pi

p'i pi

FOR SP

1

SEQUEP1

030260

030270

030280

030290

030300

030310

030320

030330

030340

030350

030360

030370

030380

030390

030400

0304 10

030420

030430

030440

030450

030460

030470

030480

030490

030500

030510

030520

030530

030540

030550

030560

030570

030580

030590

030600

030610

NBS FORTRAN Test Programs Version 1
2N CE ) Q 1 A 7 A £ ^ A rl Q 3 O 6 Z 0

c * * * * * END OF TEST SEGMENT 105 hia^az^a P1030630

c * * * * *

1 1 1 r ii cvc riu i nr n m i \/ ccpmcmt 1 a 7 tuc othd a m n run r a o r\ c WHEN EXECUTING ONLY bcGMtNi I He blUr ANU bNU LAKOb PI 030640

c * * * * * ituTru a n n r a d ac r n m m c m t r A D r\ c miict u a w c tuc r — WHICH APrbAK Ab I U rl n b N 1 LAKUb nubl HAVt Int L- n 4 A *? A i C A PI 030650

c * * * * * IN COLUMNS I AND C KbMUVbU. Q 1 A. 7 A Z. Z. A PI 0 3 0 6 6 0

c - o t n n STOP Pi 030670

p —

c = run END D 1 A7 A Z 0 A Pi 0 3 0 6 6 0 c T n n

b I 0 P

Pi 1 A 1 P 4 P I 0 3 1

1

f~ m r\ END D 1 A. "7 p 9 r I U 5 I L

c * * * * * _<_^j.j_j.j.^ ftftft#ft*ftft*ftftft****x*ft****xx**x ftft** ********ft x** ***** kLj< xa.^a.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ***** * *

. . n 1 1 A A A 1 A

* * P I 100010

c * * * * *

P» 1 1 A A A A PI 1 0 0 0 2 0

c * * * * * Bono V I I U J HI 1 A A A 7 A P 1 1 0 0 0 3 0

c * * * * * n 1 1 A A A / A C***********************************************************************P1100050

r * + + + * GENERAL PURPOSE ASA REF PI 1 0 0060

r[ *ft *ft *ft *ft *ft TEST OF ALL STATEMENT FUNCTIONS THAT HAVE BEEN DEFINED P 1 1 0 0 0 7 0

Q * * * * * IN TEST SEGMENT 005 8 . 1 ? P 1 1 0 0 0 0

r *ft *ft *ft *ft *ft GENERAL COMMENTS P 1 1 0 0 0 9 0

£ * * * * * INTRINSIC AND EXTERNAL FUNCTIONS ASSUMED WORKING P 1 1 0 0 1 0 0

Q X * x ft x INTRINSIC AND BASIC EXTERNAL FUNCTIONS DECLARED IN A 1 0 . 1 . 7 P 1 1 0 0 1 1 0

c * * * * * TYPE STATEMENT OF SAME TYPE AS TABLES 3 AND 4 5 . 3 P 1 1 0 0 1 ? 0

rl *ft *ft *ft *ft *n P 1 10 013 0

X X « Jt X SPECIFICATIONS SEGMENT 1 1

0

P1 1 00H0

r +ft *ft *« +ft *ft POO 1 2450

r + * * + * ^ ft ft « * b WHEN EXECUTING ONLY SEGMENT 110, THE SPECIFICATION STATEMENTS P0012455

r * * + * + ^ X ft ft H ft LI U I P 14 ADDCAO AC POMMCMT TARnC MIIQT UAV/P TUC P - Wnlln ArrtAn AO L U n n C IM 1 LnKUO nUol tlAVC 1 fit L - P0012460

p x x x x x ^ X X X X X TM rnillMMC 1 AHIfl 7 DCMn\/Cn IN LULUnNo I ANU L KtnUVtU . P0012465

£ X X X X it P0012470

r -

L - IMTCPCD 1 N 1 tbtK 1TCIY r 1 a P0012475

p -

L - REAL ABS, SORT P0012480

INTEGER I F I X P 1 1 OA 1 REAL ABS, SORT P1 1 0A2

P X X X X ib x x x x x P0012485

Q X X ft ft X WHEN EXECUTING ONLY SEGMENT 110, THE SEGMENT 005, WHICH P1 1 001 50

L

X X X X X CONTAINS THE STATEMENT FUNCTIONS BEING TESTED HERE MUST BE P1 100160

P X X X X X

L, x x x x x INSERTED AFTER THE SPECIFICATION STATEMENTS OF SEGMENT 110. P1 1 001 70

Q ft ft ft ft ft ********************************************************* *********P0050010

P X X X X X ^ X X ft X X P0050020

£ X X X X X BSFDF - (005) P0050030

P X X X X X ^ X X X X X P0050040

c * * * * * ********************************************************* * * * * * * * * *P0 0 5 00 5 0

c * * * * * GENERAL PURPOSE ASA REF P0050060

C * * * * * DEFINING STATEMENT FUNCTIONS THAT ARE TO BE TESTED P0050070

c * * * * * IN SEGMENT 110 (BASIC FORTRAN) AND 111 (FULL FORTRAN) 8 . 1 . 1 P0050080

c * * * * * HEADER FOR SEGMENT 005 P0050090

C * * * * * DEFINING EXPRESSION CONTAINS CONSTANTS AND VARIABLES P0050100

CMAFS(CAWVS, CBWVS) = CAWVS * 2. + CBWVS P00 5 0 1 1 0 CMBFS ( MAWVI , MBWVI , MCWVI ) =(MAWVI + MBWVI + MCWVD/3 P0050120

MCAF I (MAWVI , MBWVI ) = MAWVI ** MBWVI P0050130

MCBF I ( CAWVS , CBWVS , CCWVS ) = (CAWVS + CBWVS + CCWVS) * 2.0 P00501 40

c * * * * * DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES AND P00 5 0 1 5 0

c * * * * * INTRINSIC FUNCTIONS P0050160

CM C F S ( CAWVS, CBWVS, CCWVS) = ABS(CAWVS**2 - (CBWVS + CCWVS)** 2) P00501 70

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 ) ) P00501 80

MCCFI (MAWVI ,M8WVI , CAWVS) =. MAWVI,**2 + MBWVI**2 + I F I X ( C AW VS ) * * 2 P0 0 5 0 1 90

MCDFI ( CAWVS, CBWVS, CCWVS, CDWVS, CEWVS) = (CAWVS + CBWVS + CCWVS + P0 0 5 020 0 1CDWVS + C E W VS ) ** (ABS(CAWVS)) P0 0 5 02 1 0 C***.* DEFINING EXPRESSION CONTAINS PREVIOUSLY DEFINED STATEMENT P0050220

C*»*** FUNCTIONS AND/OR EXTERNAL FUN CT I ON" RE FERE N CES POO 5 02 3 0 CMEFS( r.AWVS, CBWVS) = CMBFS (1,2,3) + SQRT((CAWVS + CBWVS)) P00 5 0240

CM F F S ( MAWVI , MBWVI , MCWVI ) = M C C F I ( M A W V I , M B W V I , 3 . 0 ) + MCWVI **l P 0 0 5 0 2 5 0 MCEFI (MAWVI , MBWVI ) = M CAF I ( MAWV I , M BW V I ) ** M CAF I ( MAWVI , MBWV I ) P00 5 0260

MCFFI ( CAWVS, CBWVS, CCWVS) = SQRT( CAWVS) + SORT ( CBWVS ) + EXP ( CCWVS) P0050270

C***«* DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES, INTRINSIC P0050280

C***** OR EXTERNAL FUNCTION REFERENCES AND PREVIOUSLY DEFINED p 6 05 02 90

C*«*** STATEMENT FUNCTIONS. P0050300

CMGFS(MAWVI, MBWVI, CAWVS, CBWVS) "= F L 0 AT ( M AW V I * * 2) - CMAFS ( CAWVS , POO 5 0 3 1 0

1 CBWVS) + SORT ( ( F LOAT ( MAWV I + MBWVI))) P0 0 5 0320

120 NBS FORTRAN Test Programs Version 1
MCGFI (MAWVI .MBWVI .MCWVI , CAWVS) = M CE F I < MAWV I , MBWV I ) - M CE F I ( M AW V I , P 0 0 5 03 3 0 1MCWVI) + IFIX(EXP(CAWVS)) P0050340

C't'it"*"* END OF TEST SEGMENT 0 0 5 P 0 0 5 0 3 5 0 C**t*t P1 1 001 80

C * * *"* * 0 U f P U f t A P E ASSIGNMENT STATEMENT. NO INPUT TAPE P 11 00190

C**«** P0072190

C*» * * * WHEN EXECUTING ONLY SEGMENT 110, THE FOLLOWING STATEMENT P0072195

C***»* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072200

C= NUVI = 6 POO 722 0 5 NUVI = 6 P1 1 0B1

C* * * * * P 0 0 7 2 2 1 0 WRITE (NUVI. 1100) PI 1 0 0 2 0 0 fid 6 FORMAT ( 3 9H1 BSFTS - (110) STATEMENT FUNCTION TEST/23X, 16HINTEGER AP 1 1 0 02 1 0 1ND REAL / / 1-8 H ASA REF. - 8.1.2// 9H RESULTS) P 1 1 0 0 2 2 0

C*"*"*"*"*' ' HEADER FOR SEGMENT 110 WRITTEN P 1 1 0 0 23 0 CMAVS = 9.0 - CMAFS(2.0, 3.0 + 2.0) P 1 1 0 0 2 4 0 CMBVS = CMBFS(2/2, 1 + 1, 1*3) -2.0 P 1 1 0 0 2 5 0 MCAVI = M CAF I ( I F I X ( 5 . 0 ) , 5 ) - (5 ** 5) P 1 1 0 0 2 6 0 MCBVI = MCBFI(1. 0,2. 0,3.0) - M C A F I (6,2) + 24 P 1 1 0 02 70

WRITE (NUVI, 1108) CMAVS , CMBVS, MCAVI, MCBVI P 1 1 0 0 2 8 0 CMAVS = CMCFS(4. 0,2. 0,2.0) P 1 1 0 0 2 9 0 CMBVS = CMDFS(-1,-4) - 5.0 P 1 1 0 0 3 0 0 "MCAVI = MCCF I (9*2/ 1 8 , (4**2)/8, 3.0) - 14 P 1 1 0 0 3 1 0 MCBVI = MCDF I ( 1 . , 2 . 1 , 3 . , 4 . , 5 . ) -15 P 1 1 0 0 3 2 0 WRITE (NUVI, 1108) CMAVS, CMBVS , MCAVI, MCBVI P 1 1 0 0 3 3 0 CMAVS - CMEFS(2 . 0 , 1 . 0 * 2.0) - 4.0 P 1 1 0 03 4 0 MCAVI = 3 P 1 1 0 0 3 5 0 CMBVS = CMFFS(1,2, MCAVI) - 23. P 1 1 0 0 3 6 0 MCAVI = MCEFI (2,2) - (4 ** 4) P 1 1 0 0 3 7 0 MCBVI = MCFF I (9 . 0 , 4 . 0 , CMBVS * CMBVS * 0.0) - 6 PI 1 0 0 3 8 0 WRITE (NUVI, 1108) CMAVS, CMBVS, MCAVI, MCBVI P 1 1 0 0 3 9 0 CMAVS = CMGFS(3,13,2.0,5.0) - 4.0 P1100400

CMBVS = CMGFS ( I F IX(SQRT( CMAFS (2 . , 5 . ) ) ) , I F IX( CMFFS( 1 , 2 , 3 ) -10.), P 1 1 0 0 4 1 0

1 CMBFS ( 1 ,2,3) , CMDFS(-1 , -4) ) - 4.0 P 1 1 0 0 4 2 0 MCAVI = MCGFI (2,2,2,0.0) - 1 P 1 1 0 0 4 3 0 MCBVI - MCGFI (MCAFI (2, 1 ) , M C B F I ( 1 . 0 , 0 . , . 0 ) , I F I X ( SORT ( CMG F S ( 3 , 1 3 , P 1 1 0 0 4 4 0 12.6,5. 0 ) ) ) , EXP (6.0) - 1 . 0 ) - 1 P 1 1 0 0 4 5 0 WRITE (NUVI, 1108) CMAVS, CMBVS, MCAVI, MCBVI P 1 1 0 0 4 6 0 WRITE (NUVI, 1109)' P 1 1 0 0 4 7 0 1108 FORMAT ( /2(F20.10 /),2(I19/ )) P 1 1 0 0 4 8 0 1109 FORMAT 77361 ALL ABOVE ANSWERS SHOULD BE 0 FOR"/"" P 1 1 0 0 4 9 6 137H THIS TEST SEGMENT TO BE SUCCESSFUL.) P 1 1 0 0 5 0 0 C'***»* END OF TEST SEGMENT 110 P 1 1 0 0 5 1 0 C***** WHEN EXECUTING ONLY SEGMENT 110, THE STOP AND END CARDS P 1 1 0 0 5 2 0 C* * * * * WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C= P 1 1 0 0 5 3 0 C***t* IN COLUMNS 1 AND 2 REMOVED. P 1 1 0 0 5 4 0 c= STOP P1' 0 0 5 5 0 C= END P 1 1 0 0 5 6

0

STOP P 1 1 0 C

1

END P 1 1 0C2

C***** P 1 1 1 0 0 2 0

C"*"* "*"*"* FSFTS - ( 111) Pi 1 1 0 0 3 0 C *.*.*.** P 1 1 1 0 0 40

c*****************************************************************

C***«* GENERAL PURPOSE ASA REF PI 1 1 0 0 6 0 C "*"*"'*"*"* TEST STATEMENT FUNCTIONS THAT HAVE BEEN DEFINED ! N 8 . 1 . 2 P 1 1 1 0 0 7 0 C***«* SEGMENT 0 06 (FOR FULL FORTRAN TEST ONLY) P 1 1 1 0 0 8 0 C* * * * * GENERAL COMMENTS P 1 1 1 0 0 9 0 C***»* INTRINSIC AND EXTERNAL FUNCTIONS ASSUMED WORKING P1110100

C * * * * * INTRINSIC AND BASIC EXTERNAL FUNCTIONS DECLARED IN A 10.1.7 P 1 1 1 0 1 1 0 C**«** TYPE STATEMENT OF SAME TYPE AS TABLES 3 AND 4 5.3 P1110120

C* * * * * P 1 1 1 0 1 30

C«**** SPECIFICATIONS SEGMENT 111 P1 110140

C'*****' P0012490

C***** WHEN EXECUTING ONLY SEGMENT 111, THE SPECIFICATION STATEMENTS P0012495

C * * * * * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0 0 1 2 5 0 0 C***«* IN COLUMNS 1 AND 2 REMOVED. P0012505

NBS FORTRAN Test Programs Version 1 1 2 1
C * * * * * rUUl t ) 1 U C= DOUBLE PRECISION DPAFD , DP B F D , DP C F D . DPD F 0 , DP F F D , DPG FO . DPE F D , OPH FO PO 0 1 2 5 1

5

Cr DOUBLE PRECISION DPAVD. DPBVD, DPCVD, DPDVD . DAWVD , DBWVD , DCWVD ' PO0 1 2 520

C = DOUBLE PRECISION DPA1 D ( 5 ) , F C2D ( 5 . 5 ) P0012525

C= DOUBLE PRECISION DBLE , DEXP PO0 1 2 530

C= COMPLEX CMPLX, CEXP P0012535

C'= COMPLEX- CHAVC , CHBVC, CHCVC, CHDVC, CHEVC. CHFVC PO0 12540

C= COMPLEX CHAFC, CHBFC, CHCFC, CHDFC.CAWVC. CBWVC P0012545

C= LOG I CAL A3B(2, 2,2) PO0 1 2 5 5 0 C= LOGICAL MCFVB, MCHVB, ABFB, BCFB, IEFB, KLFB P0012555

C- - , MCEVB , MCI VB , MCKVB , AT VB , AWVB , BWVB , CWVB , DWVB , EWVB , SWVB , TWVB POO 1 2 5 60

DOUBLE PRECISION DPAVD , DPBVD, DPCVD, DPDVD , DAWVD , DBWVD , D CWVD P111A1

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 , DPHFD P 11 1 A

2

DOUBLE PRECISION DPA1D(5), FC2D(5,5) P 1 1 1 A3

"'COMPLEX' CHAVC. CHBVC. CHCVC. CHDVC, CHEVC. CHFVC P 1 1 1 A 4 COMPLEX CHAFC, CHBFC, CHCFC, CHDFC.CAWVC, CBWVC P111A5

L0GICALA3B(2,2,2) P1 1 1 A

6

LOGICAL MCFVB, MCHVB, ABFB, BCFB, IEFB, KLFB P111A7

'- ,MCEVB,MCIVB, MCKVB, ATV3, AWVB, BWVB, CWVB, DWVB, EWVB, SWVB, TWVB P 11 1 A 8 COMPLEX CMPLX, CEXP P111A9

DOUBLE PRECISION DBLE, DEXP P 1 1 1 A A

C* * * * * P0 0 1 2 5 65

C '**'*'*'* WHEN EXECUTING ONLY SEGMENT 111, THE SEGMENT 006 . WHICH P1 1 10150

C***** CONTAINS THE STATEMENT FUNCTIONS BEING TESTED HERE MUST BE P1110160

C INSERTED AFTER THE SPECIFICATION STATEMENTS OF SEGMENT 11 1 P 1 1 1 0 1 70

Q****************************«*****************************************tP0060010

C * * * * « PO 060 020

C* * * * * FSFDF - ( 006 ) POO 60 0 30

C*

*"* * * P 0 0 6 0 0 4 0 C*****************************************************************t***t*P0060050

C* * « * * GENERAL PURPOSE ASA REF P 0 0 6 0 0 6 0 C***** DEFINING STATEMENT FUNCTIONS THAT ARE TO BE TESTED 8 . 1 . 1 P 0 0 6 0 0 7

0

C*"*"*"*"* IN SEGMENT 111 (FULL FORTRAN STATEMENT FUNCTION TEST) P0060080

C***»* HEADER FOR SEGMENT 006 P0060090

C * * * * * D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS AND VARIABLES P 0 0 6 01 66

DPAFD ( DAWVD , DBWVD ) = (DAWVD + DBWVD) ** 2 P 0 0 6 0 1 1 0 DP BFD( DAWVD, DBWVD, DCWVD) - (DAWVD t DBWVD - DCWVD) *'* 3 POO 60 1 2 6 DPCFD(DAWVD, DBWVD, DCWVD) = 3.0D0 * (DAWVD + DBWVD + DCWVDW2.D0 P0 060 1 3 0

C * * * * * D. P. STATEMENT FUNCTIONS CONTAINING CONSTANTS, VARIABLES PO 06 0 1 46

C****» AND INTRINSIC FUNCTION REFERENCES P0060150

DPDFD ( DAWVD , DBWVD ) - DS I GN ( DAWVD , -(DBWVD)) P 6 0 60 1 6

6

DPEFD(DAWVD, DBWVD, CAWVC, CAWVS) = DBLE(CAWVS + A I MAG ( CAWVC ) ) P0060 1 70

1+ DMAX1 (DAWVD, DBWVD + 1 .DO) P 0 0 6 0 1 8 0 C***»* D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS, VARIABLES. P0060190

C***** INTRINSIC FUNCTION AND PREVIOUSLY DEFINED STATEMENT FUNCTION P0060200

C***«* REFERENCES P0060210

DP F F D ( DAWVD , DBWVD , CAWVS) = DPAFD ( DAWVD , DBWVD) - (2 .DO * DAWVD * P00602 20

1 DBWVD) + (DBLE(CAWVS) * 2. DO ) P0060230

DPGFD(DAWVD, DBWVD, CAWVS, CAWVC) = DPBFD ( DAWVD , DBWVD , DBLE (CAWVS )) PO 0602 40

1 - DBLE(AIMAG( CAWVC) ) + 5.0D0 P0060250

C* * * * * D.P. STATEMENT FUNCTIONS CONTAINING CONSTANTS, VARIABLES, PO 06 6260

C***** INTRINSIC FUNCTION, PREVIOUSLY DEFINED STATEMENT FUNCTION P0060270

C* * * * * AND EXTERNAL FUNCTION REFERENCES P0 060 2 8 0 DPHFD(DAWVD, DBWVD, CAWVS) = D P F F D ( D AW VD , D B W VD +1.0D0, CAWVS) * 2.D0P0060290

1 + DEXP (DAWVD) - ( DB LE (CAWVS) * 2 DO ) - DEXP ( DAWVD ) PO 0603 0 0 C***»* COMPLEX STATEMENT FUNCTIONS CONTAINING CONSTANTS AND VAR I AB L E S P 0 0 6 0 3 1

0

CHAFC ( CAWVC, CBWVC) =^ CAWVC * (2.0,2.0) + CBWVC + (2.0,2.0) " P 0 0 6 0 3 2 0 C**t** COMPLEX STATEMENT FUNCTION CONTAINING CONSTANTS, VARIABLES, P0060330

Z***t* AND INTRINSIC FUNCTION REFERENCES P0060340

CHBFC( CAWVC, CBWVC, CAWVS) = CAWVC - CBWVC + CMP LX ( CAWVS , CAWVS ) P0060350

C****« COMPLEX STATEMENT FUNCTION CONTAINING CONSTANTS, P0060360

C****« VARIABLES. INTRINSIC AND EXTERNAL FUNCTION REFERENCES P0060370

CHCFC( CAWVC, CBWVC , CAWVS . CBWVS ) - (CAWVC - CBWVC) + CEXP (CMPLX P0 060 3 8 0

1 ( CAWVS, CBWVS) ) - CMPLX( CAWVS , CBWVS ) P0 060390

C* * * * * CO v PLEX STATEMENT FUNCTION CONTAINING CONSTANTS, VARIABLES-, P0 06 0 40 0 C***** INTRINSIC, EXTERNAL AND PREVIOUSLY DEFINED STATEMENT FUNCTION P0060410

C*.*** REFERENCES P0060420

CHDFC( CAWVC, CBWVC. CAWVS, CBWVS) = CH C F C ( C AW V C , C B W V C , C AW VS +CAWVS, P 0 0 60 43 0

122 NBS FORTRAN Test Programs Version 1
1 2.0 * CBWVS) + CMPLXM .0,2.0) P0060440

C***»* STATEMENT FUNCTION CONTAINING LOGICAL VARIABLES P0060450

A B F B ( A W V B , BWVB ,"" OWVB )"""= A W V B .AND. BWVB .OR. . FALSE . .AND . DWVB 'P 0060460

C****» STATEMENT FUNCTION CONTAINING CONSTANTS, VARIABLES AND P0060470

C * *"*"** I NT R IN SI it FU NCT'i ONS ' P 0 0 6 0 4 8 0 BCFB(EWVB, CWVB, BAWVS, BCWVS) = EWVB .AND.(BAWVS * ABS(BCWVS) .GT. P0060490

1 0. 5) .AN D . . NOT'. CWVB P 0 0 6 0 5 0 0 Ct**** STATEMENT FUNCTION CONTAINING PREVIOUSLY DEFINED STATEMENT P0060510

C*"*"*V* FUNCTION AND AN INTRINSIC FUNCTION REFERENCE ' P 0 0 6 0 5 2 0 IEFB(EWVB,ATVB , CWVB, BAWVS , BCWVS) = ATVB .AND. EWVB .AND. CWVB .OR. P0060530

1 AMAXK BAWVS , BCWVS ) .GT. 60 0. .OR. BCFB (EWVB, CWVB, BAWVS, BCWVS) P 0 0 60 5 40

C****« STATEMENT FUNCTION CONTAINING BASIC EXTERNAL FUNCTION REFERENCE P0060550

KLFB ( SWVB . TWVB , AT V B , BAWVS ) "=" SWVB .AND. .NOT. TWVB. OR. (SQRT(BAWVS)P 006056 0

1 .GT. 9.0) .OR. ATVB P0060570

C* *"*"*"* END O F TES T SE GM E NT 0 06 P 0 0 6 0 5 8 0 C* * * * * P1110180

C"*'*"*"** 0 U T P U f f A P E ASSIGNMENT STATEMENT. NO INPUT TAPE. P 1 11019 0 C***** P0072220

C" *"** "*"* WHEN EXECUTING ONLY SE GMENT 111 , THE F 61 L 0 W I N G STATEMENT POO 722 2 5 C*«*** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072230

C = NUV I ""= 6 POO 72 2 3 5 NUVI = 6 P 1 1 1 B 1

C

*'* *" *"* P 0 C 7 2 2 4 0 WRITE ( NUVI , 1 1 1 0) P 1 1 1 0 2 0 0 11 1 0 FORMAT ( 39H 1 FSFTS - (111) STATEMENT FUNCTION TEST// P 1 1 1 0 2 1 0

1 39H DOUBLE PRECISION, COMPLEX AND LOGICAL// P 1 1 1 0 2 2

0

2 1 8H ASA RE F . - 8 . 1 . 2/ / 1 OH RESULTS ) P 1 1 1 0 23 0 C***«* HEADER FOR SEGMENT 111 WRITTEN P 1 1 10 2 4 0

C"*"*'*"t* CONSTANTS USED IN THIS SEGMENT P 1 1 1 0 2 5 0 CHAVC = (1 .0.2.0) P 1 1 1 0 2 6 0 CHBVC = (-2.0,3.0) PI 1 1 0 2 7 0 DPA1D(2) = 3.5D0 P 1 1 1 0 2 8 0

' ATVB = . FALSE . P 1 1 1 0 2 9 0 PPDVS = 18. PI 1 1 0 3 0 0 RRDVS = 21.0 P 1 1 1 0 3 1

0

ATVS = 18.0 P 1 1 1 0320

MCFVB = .TRUE PI 1 1 0 33 0 FC2D(2,2) = 1 . 75 DO P 1 1 1 0 3 A 0

C *"*"**

» TEST OF D.P. STATEMENT FUNCTIONS P 1 1 1 0 3 5 0 DPAVD = DPAFD(3.5D0,DPA1D(2)) - 49.0D0 P 1 1 1 0 3 6

0

DPBVD = DPBFD ( 1 . D 0 , D P A 1 D ( 2 > - 2.5D0 , DBLE ( 1 . 0 ) ) - 1 . 0D0 PI 1 1 0 3 70

DPCVD = DPCFD(0.D0,1 . 0D0 , DPA1 D ( 2 ) + 0.5D0) - 7.5D0 P1110380

DP DVD = DPDFD ( DBLE (A! MAG ( CHAVC) ) , FC2 D ( 2 , 2 ) ) + 2 . 0 D 0 P 1 1 1 0 3 9 0 WRITE (NUVI, 1118) DPAVD, DPBVD, DPCVD, DPDVD P 1 1 10 4 0 0 DPAVD = DPEFD( 1.000, FC2D(2, 2) *2. DO, (1.0, -4.), AM AX 1(2. 0,4.0)) P 1 1 1 0 4 1 0

1 - 4 . 5D0 P 1 1 1 0 42 0 DPBVD = DP F FD ( DP A 1 D ( 2 ) , FC2D(2 , 2) -1 . 7 5 D 0 , 5.0 0 ) - 2 2 .2 5 00 PI 1 1 0 43 0 DPCVD = DPGFD(2.D0/ .2D1 ,DPA1D(2) - 2 . 5D0 , 1 . 0 , CHAVC ) - 4.0D0 P 1 1 1 0 4 4 0 DPDVD= DPHFD ( 3 .5 00, F C 2 D ( 2 , 2 ) - 2 . 7 5 0 0 , 5 . 0 ) - 3 4 . 5 D 0 PI "

1 0 4 5 0 WRITE (NUVI.1118) DPAVD, DPBVD, DPCVD, DPDVD P 1 1 1 0 4 6 0

C*"*'*"*"* TEST OF COMPLEX STATEMENT FUNCTIONS P 1 1 1 0 4 70

CHCVC = CHAFC( (2 . 0 , 2 . ) , CHAVC) - (3.0,12.0) P1110480

CHDVC = CHBFC( (4 .0,-8.5), CHBVC , 1.0) - (7.0,-10.5) P 1 1 1 0 4 9

0

CHEVC = CHCFC( ( 1 . 0 , 1 . 0 ) **2, CHAVC, 0.0 0 0, AIMAG(CHAVC) -2.0) P 1 1 1 0 5 0 0 CH FVC = CHDFC( (0 . 0,0. 6) , CHAV C , 0.0 0 0, S N G L ( D M I N 1 ( 0 . D 0 , 4 . D 0 ) ) P 1 1 1 0 5 1 0 1)-(1. 0,0.0) P 1 1 1 0 5 2 0 WRITE (NUVI , 111 7) CHCVC, CHDVC, CHEVC, CHFVC P 1 1 1 0 5 3 0 WRITE (NUVI ,1119) PI 1 1 0 5 40

C * tt * t TEST OF LOGICAL STATEMENT FU N CT ION P 1 1 1 0 5 5 0 MCEVB = PPDVS .GT. 60.0 P 1 1 1 0 5 6 0 A3 B ( 1

, 1 , 1 ) = ATVS LE 20.9 AND. A B F B ( . TRUE., .TRUE. ..FALSE.) P 1 1 1 0 5 70

MCHVB = BCFB( .TRUE. . .FALSE. , PPDVS, 21 .0) . AND .. NOT . PPDVS . GE . RRDVS P 1 1 1 0 5 8 0 MCI VB = .NOT. ( I EFB ( .FALSE. , ATVB , .TRUE. , 6 5 0 . , - 5 . 1 1 ) .AND. ATVB) P 1 1 1 0 5 90

MCKVB = MCFVB. AND. KLFB(. TRUE., .TRUE., .TRUE. ,100.). AND. .NOT. MCEVB P 1 1 1 0 6 0 0 WRIT E ( N y V 1,1116) A3 B ( 1 ,1 , 1 ) , MCHVB, M C I V B , MCKVB P 1 1 1 0 6 1 0 1116 F0RMAT(//4(L4)//38H THE FOUR ABOVE ANSWERS SHOULD BE TRUE/ P1110620

1 35 H FOR ' THIS SEGMENT TO BE SUCCESSFUL) P 1 1 1 0 6 3 0 1117 FORMAT ( / 4(F16.7,F14.7/)) P 1 1 1 0 6 4 0

NBS FORTRAN Test Programs Version 1 123
1118

1119

C * * *

c * * *

c * * *

c * * * c=

c=

END CARDS

FORMAT (/ 4 < D3 0 . 1 8 / ) ) FORMAT (/ 40H ALL ABOVE ANSWERS SHOULD BE 0 FOR THIS/

1 40H TEST SEGMENT TO BE SUCCESSFUL. VALUES /4 0H WITH EXPONENTS

2SS THAN 10**(-H> / 22H ARE CONSIDERED ZERO ) END OF TEST SEGMENT 111

WHEN EXECUTING ONLY SEGMENT 111, THE STOP

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END , ***************************************************************

AND

C"=

P1 1 1 0650

P 1 1 1 0660

LEP'i 1 1 0670

P 1 1 1068 0 Pi 1 1 0690

P 1 1 1 0 700

PI 1 10 710

P 1 1 1 0 720

P1 1 1 073 0 P 1 1 1 0 740

p'i'ii ci

P 1 1 1 C2

* * * P 1 4 0 0 0 1 0 P14000Z0

P 1 4 0 0 0 3 0 P1 400040

# * * p 1 40 00 5 0 P1 400060

REFP140007 0 P1 400080

P1 40 0 090

P 1 40 0 1 00

P1 400 1 1 0 P1400120

Pi 40,6130

P0012570

P 0 0 1 2 5 7 5 P0012580

PO0 1 2 5 85

P0012590

, POO i 2 595

P00 1 2600

',' P1 40 A

1

P1 40A2

POO 1 260 5 P1 4001 40

PO 0 72 2 5 0 P0072255

P0072260

P0072265

Pi 40 B

1

P1 400 1 50

P I 400 160

P1 4001 70

P 1 4 0 0 1 8 0 P1 400190

P 1 400200

P1 4002 1 0 PI 400220

P1400230

P1 400240

P1400250

PI 400260

P 1 40 02 70

P 1 4 0 0 2 8 0 P1 400290

Pi 40 03 0 0 P 1 40 03 1 0 Pi 40 03 2 0 P1400330

P1 400340

P 1 4003 50

Pi 400360

P1 400370

P1 400380

P1 400390

P1 4 0 0 4 0 0 P 1 4004 1 0

***************************************************************

GENERAL PURPOSE

TO TEST ADDITION AND SUBTRACTION OF COMPLEX NUMBERS ASA

INCLUDES OPERATIONS WITH UP TO 9 TERMS 6.1

DOES NOT TEST FOR ACCURACY

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c = c=

CPXAD (140)

ADDITION AND SUBTRACTION OF 2 TERMS

S P E C I F I C A f I 0 N S SEGMENT 140

WHEN EXECUTING ONLY SEGMENT 140, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

COMPLEX AVC, BVC, CVC, DVC, EVC, FVC, GVC, HVC, IVC, JVC, AAVC

ABVC.BAVCBBVC, CCVC, CDVC , B CVC , D CVC

COMPLEX AVC, BVC, CVC, DVC , EVC, FVC, GVC, HVC, IVC, JVC, AAVC

1 ABVC.BAVCBBVC, CCVC, CDVC. BCVCDCVC

* *

* *

* *

* *

* *

c * * *

c * * *

c * * *

c * * *

c * * *

c =

1401

c * * * * *

c * * *

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

WHEN EXECUTING ONLY SEGMENT 140, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6 NUVI = 6

WRITE (NUVI, 1401)

FORMAT (1 Hi ri X . 3 4H CPXAD - (14 0) COMPLEX ADDITION AND/ 16X,

1 1HSUBTRACTI0N//2X, 14HASA REF. - 6 . 1 / / 2X , 7H RE S U L T S / / ) AVC= ( 1 . 467 , 2 . 560 ) BVC=(3.568,7.480)

CVC=AVC+BVC

DVC=AVC+(3.568.7.480)

EVC=(1 .9467, 2. 95 60)+ BVC

FVC=(1.467,2.560)+(3.568,7.480)

GVC=AVC-BVC

HVC = ( . 1 467E + 1 , .2 560E1 ) - BVC

IVC = AVC - ( 3 568E-3 , . 7480E + 1 ) J VC=( 1 . 4 6 7 , 2. 5 60 ) -( 3 . 5 68 , 7 . 480 ) ADDITION AND SUBTRACTION OF 3 TERMS

AAVC=AVC+BVC-CVC

ABVC=AVC+ (3 . 568 , 7 . 480 ) -DVC

BAVC=(1 .467,2.560)+BVC-CVC

BBVC=(1.4 67,2.560)+(3 .568 ,7.480 )-FVC

BCVC=AVC-BVC-GVC

CCVC=( 1 . 467,2 . 560) -BVC-HVC

CDVC=AVC-(3.568,7.480)-IVC

DCVC = (1.467,2.560)-(3 .5 6 8 , 7.4 8 0 )- JVC

WR I TE ( NUVI ,1402) AAV C , AB V C . B AV C , B 8 V C , B C V C , C C V C , CD V C , D CV

C

ADDITION AND SUBTRACTION OF 5 TERMS

AAVC=AVC-( 1 .89,6.48)-AAVC-BVC+(0.0,9.8 30)

ABVC = AVC-( 1 .89 , 6 . 4 8 ) - AAV C

- B V C + ( 0 . 0 , 9 . 8 3 6 ) WRITE(NUVI , 1 402 ) ABVC

124 NBS FORTRAN Test Programs Version 1
1402 F0RMAT(2X.2F8.4)

AAVC=AVC-(1 .89, 6. 48) -BVC* (O.O,.9. 83)* CVC

C t

•'* 1 1 ADD I f I ON AND SUBTRACT I ON OF 6 TERMS

ABVC=AVC-( 1 .89, 6.48)- BVC+( 0.0 ,9.83)+ CVC-AAVC

P1400420

P1400430

"P1 400440

P1 400450

P1 400460

P1 400470

P 1 4 0 0 4 8 0 P1 400490

P 1 40 0 5 0 0 P 1 400 5 1 0 P1 400520

P1400530

pi 400 540

P1 400550

P 1 400 560

P1 400570

Pi 400 5 80

P1 400590

p'i 4 6 ci

P1 40C2

**'*P1 41 001 0 P1 41 0020

Pi 4 1 0 0 3 0

t * tPU 1 00 40

PI 4 1 0 0 5 0 REFP 1 4 1 0060

P1 4 1 0 0 70

P1 41 0080

" Pi 4 1 0 090

P1 41 01 00

Pi 41 01 10

P00 1 261 0 POO 126 15

P0012620

P0012625

P0012630

P 6 0 1 2 6 3 5 P0012640

P 1 4 1 A

1

P1 41 A2

POO 1 264

5

P 1 4 1 0 1 2 0 P0072270

P0072275

p 6 672280

P0072285

P0072290

P141B1

POO 72295

P 1 4 1 0 1 3 0 P 1 41014 6 P1 41 01 50

P 1410160

P 1 4 1 0 1 7 0 P 1 4 1 0 1 8 0 P1 41 01 90

P 1 4 1 02 00

P 1 4 1 0 2 1 0 P 1 4 1 0220

P1 41 0230

PI 4 1 0240

P 1 4 1 02 5 0 P1 41 0260

P1 41 0270

P 1 4 1 0 280

PI 4 1 0290

P 1 4 1 03 0 0 P 1 4 1 0 3 1 0

WR I TE < NUV I , 1 402 ) ABVC

* ADD I T I ON AND SUBTRACTION OF 8 TERMS

AAVC = AVC + BVC- CVC+ ( 6 . 34 . 6 . 45 ) - T4 . 5 4 , 6 . 85 ) +DVC + ( 1 . 6 , 6 . 0

) -EVC

ADDITION AND SUBTRACTION OF 9 TERMS

ABVC=AVC*BVC- CVC+ ( 6 . 34,6. 45 ) - (4 .54.6. 85 ) +OVC+ ( 1.6, 6 . 0

) -EVC-AAVC

WRITE < NUV I . 1 403 ) ABVC

C * * * *

c * * * *

1403 FORMAT(2X.2F8.4//2X.35HTEST IS POSITIVE IF NUMBERS PRINTED/2X

1 1 7HAB0VE ARE 0.0,0.0)

t END OF TEST SEGMENT 140

t WHEN EXECUTING ONLY SEGMENT 140, THE STOP AND END CARDS

C * * * *

c * * * *

c * * * *

c * * * * c=c=

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C- IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

...END l««tiHt«ltttttlHtt*ttllltttltl«*ttlltttHtltttttHI«t*itlttltl

*

* CPXMU - (141)

MltMttttttltttlttttltMtttltltttlttitltltltlttllllttttdtlltlt

« GENERAL PURPOSE

* TO TEST MULTIPLICATION OF COMPLEX NUMBERS ASA

C * * * *

C t * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * t *

c * * * *

c=

INCLUDES OPERATIONS WITH UP TO 10 TERMS

DOES NOT TEST FOR ACCURACY

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.

COMPLEX AVC, BVC, CVC. DVC, EVC. FVC, GVC, HVC, IVC, JVC

,AAVC, ABVC, BAVC, BBVC

COMPLEX AVC, BVC, CVC > DVC, EVC, FVC, GVC, HVC, IVC. JVC

,AAVC, ABVC, BAVC, BBVC

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * t c=

OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 141, THE FOLLOWING STATEMENT

NUV I = 6 MUST HAVE THE C = IN COLUMNS 1 AND 2 REMOVED

NUVI = 6

NUVI = 6

C * * * * * WRITE (NUVI, 1411)

Hi i FORMAT ( 1 H 1,1 X , 36HCPX MU - (141) C CIMPLEX MULT I PL I CAT I ON / / 2X

,

114HASA REF. - 6 . 1 / / 2X , 7HRESULTS / /

)

C * * * * * MULT I PL I CAT I ON OF TWO TERMS

AVC = (-0.5,0.86602)

BVC = (-6.5. -0.86602)

AAVC = (AVC * BVC ) ABVC = AVC * (-0.5,-0.86602)

BAVC = (-0.5,0.86602) * BVC

BBVC = (-6 . 5 , 0. 8 6 6 6 2 ) *

( - 6 . 5 , -0 . 86602 ) WRI TE( NUVI . 1412) AAVC , ABVC , BAVC . BBVC

MULTIPLICATION OF 3 TERMS

AVC = (0.0, 1 .0)

c * * » t *

1412

BVC=(1 .0,0.0)

CVC=(0.0,-1 .0)

AAVC=AVC*BVC*CVC

ABVC=(0.0,1.0)*BVC*(0. 0,-1.0)

WR I T E ( N U V I, 1 41 2 ) A AVC , A B V C FORMAT(2X,2F8.3)

NBS FORTRAN Test Programs Version 1 125
C*****MULTIPLI CATION OF 4 TERMS

AVC=(0. 30901 ,0.95105)

PU103Z0

P1 41 0330

BVC=(-0 . 80901 ,0.58778)

CVC=(-0. 80901 ,-0.58778)

PU10340

P141 0350

DVC=<0. 30901 ,-0.95105)

AAVC=AVC*BVC* CVC*DVC

P1 41 0360

P1 41 0370

ABVC=AVC*(-0. 80901, 0. 58778)* CVC*(0. 30901, -0

WR I TE ( NUV I , 1412) AAVC ( ABVC

.95105) P1410380

P1 41 0390

C * * * * * MULT I P LIC AT I ON OF 5 TERMS

AVC=(0. 5, 0.86602)

P1410400

P1 41 041 0 BVC=(-0. 5, 0.86602)

CVC = (1.0,0.0)

P1 4 1 0420

P1 41 0430

DVC=(-0. 5, -0.86602)

EVC= (0.5,-0.36602)

P1 41 0440

P1 4 1 0450

AAVC=AVC*BVC* CVC*DVC*EVC

ABVC=AVC*(-0.5.0.86602)*CVC*(-0.5.-0.86602) *EVC

P1 4 1 0460

P1 4 1 0470

WR I TE ( NUV I

, 1412) AAVC, ABVC

C*****MULTIPLI CATION OF 6 TERMS

P 1 4 1 0480

P1 4 1 0490

AVC = (0.98480,0. 17364)

BVC=(-0. 17364.0.98480)

P1 41 0500

P1410510

CVC= ( -0 . 86602 , 0.5)

DVC= ( -0 . 93969 , -0 . 34202

)

P1 41 0520

P1 41 0530

EVC=(0. 34202, -0.93969)

FVC=( 0 .86602,-0. 5

)

P1 41 0540

P 1 4 1 0 5 50

AAVC=AVC*BVC* CVC*DVC*EVC* FVC

ABVC=AVC*(-0. 17364,0. 98480)* CVC*(-0. 93969,- 0 . 34202 ) *EVC*

P1410560

(0.86602, P1410570

1-0.5)

WR I TE ( NU V I , 1412) AAVC, ABVC

P 1 4 1 0 5 80

P1 41 0590

C*****MULTIPLI CATION OF 7 TERMS

AVC=(0. 70710, 0.70710)

P 1 4 1 0600

P1 41 061 0 BVC= ( 0.0.1 .0)

CVC=(-0. 70710. 0.70710)

P1 41 0620

P1 41 0630

DVC= ( 1.0.0.0)

EVC=(-0. 70710, -0.70710)

P1 41 0640

P1 41 0650

FVC= ( 0.0.-1 .0)

GVC=(0. 70710, -0.70710)

P1 41 0660

P1 41 0670

AAVC=AVC*BVC* C V C * D V C * E V C * F V C * G V

C

ABVC=AVC* (0 . 0 , 1 .0)*CVC*( 1.0,0.0)*EVC*(0.0, -1 . 0 ) *GVC

P1 41 0680

P 1 4 1 0690

WR I TE < N U V I , 1412) AAVC, ABVC

C*****MULTIPLI CATION OF 8 TERMS

P1 41 0700

P1 41 071 0 AVC= ( 0 . 76604 , 0 . 64278

)

BVC= ( 0 . 1 7364 , 0.98480)

P1 41 0720

P1 41 0730

CVC= ( -0 . 5,0.86602)

DVC= ( -0 . 93969 , 0 . 34202

)

P1 4 1 0740

P1 41 0750

EVC= ( -0 . 93969 ,-0.34202)

FVC= (-0.5,-0.8 66 02)

P 1 4 1 0760

P1 41 0770

GVC= ( 0.17364,-0.98480)

HVC= ( 0 . 76604,-0.64278)

P1 4 1 0780

P1 41 0790

AAVC = AVC*BVC* CVC*DVC*EVC* FVC*GVC*HVC P1 41 0800

ABVC=AVC*(0. 17364, 0.98480)*CVC*DVC*(-0. 93969, -0.34202)*FVC*GVC*HVCP1410810

WR I TE < N U V I , 1412) AAVC, ABVC

C*****MULTIPLI CATION OF 9 TERMS

P1 41 0820

P1 41 0830

AVC=(0. 80901 ,0.58778)

BVC=(0. 30901 ,0.95105)

P1 41 0840

P 1 4 1 08 5 0 CVC=(-0. 94832, 0.31730)

DVC=(-0 . 80901 ,0.58778)

P1 41 0860

P1 41 0870

EVC = (1.0,0.0)

FVC=(-0. 80901 ,-0.58778)

P1 41 0880

P1 41 0890

GVC=(-0. 94832, -0.31730)

HVC=(0. 30901 ,-0.95105)

P1 41 0900

P1 41 091 0

I V C= < 0 . 8090 1 ,- 0.5 8 778 ) AAVC = AVC*BVC* C V C * D V C * E V C * F V C * G V C * H V C * IVC

P 1 4 1 0 92 0 P 1 4 1 0930

ABVC=AVC*(0. 30901, 0. 95105)* CVC*(-0. 80901, 0.

1GVC*HVC* IVC

58778)*( 1.O. 0.0)*FVC* P1410940

P 1 4 1 09 5 0 WR I TE ( NUV I , 1412) AAVC, ABVC

C*****MULTIPLI CATION OF 10 TERMS

P1 41 0960

P1 41 0970

AVC=(0. 86602, 0.5)

BVC=(0. 5, 0.86602)

P1 41 0980

P1 41 0990

126 NBS FORTRAN Test Programs Version 1
C V C = < 0 . 0 . 1 .0)

DVC=(-0. 5, 0.866020

EVC=( -0 . 866 02 , 0 . 5 ) FVC=(-1 .0,0.0)

PHI 1 000

PHI 101 0 PI 4110 2 0 PU1 1 030

GVC=<-0. 86602, -0.5)

HVC=(-0 . 5 ,-0.86602)

I V C= ( 0 . 0

. - 1 .0 ) JVC=(0.0, 1 .0)

AAVC = AVC*BVC*CVC*DVC*EVC*FVC*GVC*HVCMVC*JVC

'

ABVC = AVC* ( 0 . 5,0. 86602)* CVC* < - 0 . 5,0. 86602)*EVC«FVC*GVC*HVC*(0

PHI 1 040

PHI 1 050

PHI 10 6 0 PHI 1 070

PI 4 11 0 8 0 P 1 4 1 1 0 9 0

1413

1 0 ) * JVC

WR I TE ( NUV I

, 1412) AAVC.ABVC

W R 1 1 E < N U V I .1413)

FORMAT ( 1 HO , 3 5HTEST IS POSITIVE IF NUMBERS PR I NTED / 1 X

,

P1 41 1 1 00

P1 41 1 1 1 0 PI A 11 12 0 P1 41 1 1 30

0 )

1414

C * t *

«

c * * * *

c * t * *

c * * * t c=

c'=

1 1 7HAB0VE ARE 1.0,0

WR I TE < NUVI . HH)

FORMAT (//39H ERROR SHOULD NOT EXCEED + OR - .001 )"

* END OF TEST SEGMENT 141

* WHEN EXECUTING ONLY SEGMENT 1 41, THE STOP AND END CARDS

t WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

"i IN CO LU MNS 1 AND 2 R E M 0 V ED.

'

STOP

P1 41 1 1 40

P1 41 1 1 50

PI 4 1116 0 P141 1 170

P 1 4 111 8 0 P1 41 1 190

P 1 4112 0 0 P1 41 1 21 0 END

STOP

END

P 1 4 1 12 2 0 P1 41 C1

P HiC 2

C * * t * C»ttt

C t * * t

c * * *

»

c * * * *

c * * * *

C * t * *

C t * * *

c * * * *

c * * * *

C t * »

t

[tit*

c * * 1

1

C t * t *

C 1 1 * * c=

tt*tt<tttt<ti*l«ttttt«ttt«tttttlltlt«tt*titltttlitttt«ttttttttt*tttPU2O010

* P 1 420 0 2 0

* CPXOV-(UZ) P1 420030

* pf 420040

tt*tt>ttt<ttttttttt**ttttittt*ttit<ttiti<*itttiititiititiittittt<itPHZ0D50

* GENERAL PURPOSE P 1 4 2 0 0 6 0

* TO TEST DIVISION OF COMPLEX NUMBERS ASA REFP1420070

* 6.1 P 1 4 2 0 0 8 0

* P1420090

P 1 4 2 0 1 0 0 P00 1 26 5 0 P 0 0 1 2 6 5 5 P0012660

P0 0 1 2 66 5

* P0012670

COMPLEX NUMVC,DENVC,QAVC,QBVC,OCVC,QDVC P 0 0 1 2 6 7 5 COMPLEX NUMVC,DENVC,OAVC,OBVC,OCVC,QDVC P142A1

* P 0 0 1 2 6 8 0

* OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1420110

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.

C * * *

»

c * * * *

c * t * *

c * * t *

c * * * *

C t * » *

* WHEN EXECUTING ONLY SEGMENT 142, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED,

t NUVI =

6

NUVI = 6

C =

C * » * *

1421

C * * «

WRITE (NUVI, 1421)

FOR MAT (1 HI X , 2 5H CP X CIV - (142) DI VISION 0 F/1 6X,

1 1 5HCOMPLEX NUMBERS//15H ASA RE F . - 6 . 1 / / 2X , 7HRE SU LTS / /

)

* TEST NUMBER 1 NUMVC=(0. 36602,1 .36602)

P0072300

P0072305

P 0 0 7 2 3 1 0 P0 0 723 1 5 P 0 0 7 2 3 2 0 P 1 4 2 B 1 P 6 072325

P 1 420 1 20

P 1 4 2 0 1 3 0 P 1 4 2 0 1 4 0 P 1 4 2 0 1 5 0 P 1 42 0 1 60

DENVC = ( 0. 86602, 0.5 ) OAVC=NUMVC/DENVC

QBVC=(0 .36602, 1 .3660)

QCVC=NUMVC/ ( 0 . 86602 ,

0

/DENVC

5 )

P14201 70

P14201 80

P 1 42 0 1 9 0 P1420200

C * * * *

QDVC=<0. 36602, 1 .36602)/ (0.86602, 0. 5) PH20210

WR I TE < NUVI , 1 422 ) QAVC , QBVC , QCVC , QDVC P 1 42 0 22 0

• TEST NUMBER 2 P 1 4 2 0 2 3

0

NUMVC=( 0 . 0 , 1 .41 420 ) PH20240

DENVC = (6 . 7071 0 , 0 . 7071 0 ) PH 202 5 0 QAVC=NUMVC/DENVC P1420260

Q B V C = ( 0 . 0 , 1 . 41 420 ) /DENVC P 1 4 2 0 2 7 0 QCVC = NUMVC/(0. 70710, 0.70710) PI 42 028 0

NBS FORTRAN Test Prtigrams Version 1 127
^ a i . A i A A 4 jdj^AVi/A "J A "5 4 A A ~» A T 4 A \ QDVC = (0.0,1.41420)/(0. 70710, 0.70710) P1 420290

WR I T E ( NUVI , 1 422 ) QAVC ( QBVC,QCVC,QDVC P1 420300

1422 F 0 RM AT ( 2X , 2 F 8 . 4 )

At A J A A ^ 4 A P 1 4203 1 0 C*****TEST NUMBER 3 P1 420320

NUMVC=(-0. 36602,1 .36602) At A i A A "5 » A P1 420330

DENVC= ( 0 . 5 , 0 . 86602 ) P1 420340

0 AV C = N UM V C / D E N V C

At A I A f- —) f <S P 1 4203 5 0 QBVC=(-0. 36602,1 .36602)/DENVC P1 420360

QCVC=NUMVC/(0. 5, 0.86602) A A / A A A A P1 420370

.- i-\ n i ,-- y A -? y y A A 4 ^//A^\i/A f* A A / y A A \ ODVC=(-0. 36602, 1.36602)/(0. 5, 0.86602) P1 420380

ii^tti- / ii 1 1 w t a / a a \ rt*%/iA n n \ f ^ rti^v/o a. a i , a W R I T E ( N U V I , 1422) OAVC,QBVC,QCVC,QDVC At A j A A *» Ai A P1 420390

C* * * * *TEST NUMBER 4

A A t A A i f\ A P1 420400

li i i a a . j a y A "7 "7 A A / ^ ^ ^ A A / \ NUMVC=(0. 73204, 2. 73204) n<i # —i a # a a P 1 42 0 4 1 0 DENVC= ( 1.73204,1.0) P1 420420

QAVC=NUMVC/DENVC Ai A j A A i ^ A P1 420430

A. A. t j a yA ^ A A / A ~» ^ A A / \ / A. A* 1 1 i j A QBVC=(0.73204,2.73204)/DENVC a a ; A a / yA P1 420440

a a i / a ii i i ii w r i / i "i *v TMi A ' <i A \ 0CVC=NUMVC/(1 .73204, 1 .0) P 1 420 4 5 0

A A i , A yA ^ ^ A A * A T^"1A J \//«I T ^ ^ A / A A \ QDVC=(0.73204,2.73204)/(1 .73204,1 .0) A4 yAA/yA P1 420460

WRITE(NUVI , 1422) QAVC,OBVC,QCVC,QDVC A, t / A A / ^ A P1 420470

C* * * * * TEST NUMBER 5 A it , A A / A A P 1 420480

II I I II i r yA A A ft ^ O / A \ NUMVC= ( 0 . 0,2. 8 2 8 40 )

A. 4 / ~1 A / lA A P 1 42 0 49 0 DENVC=(1 .41420,1 .41420) A A , A A A A A P 1 420 5 00

QAVC=NUMVC/DENVC n a / A A A * A P 1 420 5 1 0 QBVC=(0. 0,2. 82840)/ DENVC P1 420520

A A i , A iiiiuirAfy'l / -i / A A 4 / 1 / A A \ QCVC^NUMVC/ ( 1 .41420,1 .41420) At A i A A f*

- A P 1 420 5 3 0

Q 0 V C = ( 0 . 0 , 2. 8 2 8 40 ) / ( 1 . 41420, 1.41420) A it y A A P y A P 1 420540

i i a* * AyiiiiiiT 4 y a A \ ai I i j A A. a* i i a A A i , A Ai A V / A W R I T E ( N U V I , 1422) QAVC,QBVC,QCVC,QDVC A a i A A A A A P1 420550

WRITE (NUVI, 1423) A. #1 , A A iTM t A P1 420560

A r ^ A A A* ft i a T y f , A v y A 1 i T A A T Y A. A. A J T 1 I.JP Y A Kill U A A* A} A A. A. f n ^ fTM #x , ^ »/ 1423 FORMAT ( / / 2 X , 3 5 H T E S T IS POSITIVE IF NUMBERS PRINTE0/2X, A. /I / A A P ^ A P1 420570

A A 1 | A A A I , A" A r~\ A A] A 4 A \ • 1 1 7HAB0VE ARE 1.0,1.0) At 4 / A A r ft A P1 420580

1 1 A* T A -.t i i

\ , T 4 / A y \ WRITE (NUVI, 1424) A 4 > A A A A. A P 1 42 0 5 90

1424 FORMAT (//39H ERROR SHOULD NOT EXCEED + OR - .0001 ) P1 420600

A r II r\ A A -T" A A T A A A A J A II T -] / A C***** END OF TEST SEGMENT 142 A, 4 * A A / 4A P1 4206 1 0 C****« WHEN EXECUTING ONLY SEGMENT 142, THE STOP AND END CARDS n A / A A / A A P1 420620

A IIIITAIj lAiAiAIA, A A A A ft 1 ft J A ft 1 T A 1 A. A. A* 11 1 1 A T II 1 i j A* ^ | i r A C*«*** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

A> 4 / A A / -TJ A P1 420630

C***«* IN COLUMNS 1 AND 2 REMOVED. A^dl / A A / yA P1 420640

C= STOP At4 ; A A / P A P1 420650

C= END A. A t A A ' yA

P 1 420660

STOP P 1 42 C

1

END P 1 42 C2

C***********************************************************************P1430010

c * * * * * P1 430020

C****» CPXEX(143) P1430030

c * * * * * P1 430040

C***********************************************************************P1430050

C***»* GENERAL PURPOSE P1430060

C*«*** TO TEST EXPONENTIATION OF COMPLEX NUMBERS ASA REFP1 430070

C**«** BY INTEGERS 6 .1 P1430080

Ct**** EXPONENT VALUES VARY FROM 3 TO 100 P1430090

c * * * * * P 1 43 0 1 0 0 C****» SPECIFICATIONS SEGMENT 143 P1430110

c * * * * * P001 2690

C*«*** WHEN EXECUTING ONLY SEGMENT 143, THE SPECIFICATION STATEMENTS P0012695

C»  WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012700

Ct** *« IN COLUMNS 1 AND 2 REMOVED. P 0 0 1 2 7 0 5 £= INTEGER AVI PO0 1 27 1

0

C= COMPLEX AVC.BVC.CVC.DVC.EVC P00V27.5

COMPLEX AVCBVC.CVCDVC.EVC P143A1

INTEGER AVI "PT43A'2"":

C****» OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P 1 430 1 20

c * * * * * 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 P143B1

C * * * * * P0072355

WRITE (NUVI, 1431) PI 430 1 30

128 NBS FORTRAN Test Programs Version 1
1431 FORMAT < 1 H 1 , 1 X , 36H CPXEX - (143) COMPLEX EXPONENTIATION//

1 2X.11HASA.REF.6.1//2X,29HRESULTS BASED ON THE FUNCTION//

2 2X, 25H1 . 0 = SiN**2(X)*COS**2(X)//)

C**«** EXP0NENT=3

AVC = (-6.5,0.8660254)

AVI=3

BVC = AVC* *3

CVC = (-0.5,0.8660254) ** 3

P1 4301 40

P1 4301 50

p 1430 1 60

P1 4301 70

P 1 4 3 0 1 8 0 P1430190

P 1 43 020 0 P 1 43 02 1 0 P1 430220

P1430230

PI 430 2 40

P1 430250

' P 1 43 0 2 6 0 P1 430270

PT4 3 0 2:8b

P1 430290

P 1 43 03 0 0 PU3 03 1 0 P1 43 0 32 0 P 1 43 0 33 0

P 1 4 3 0 3 4 0 P1430350

P 1 43 0 3 60

P 1 43 0 3 70

P1 430380

P 1 43 03 90

P 1 43 0 4 00

P 1 43 0 4 1 0 P 1 43 0 420

P 1 43 0 43 0 P 1 43 0 440

P1 430450

Pi 43 0 460

PU3 0 4 70

P 1 4 3 0 4 8 0 P1 430490

P 1 43 0 5 00

P 1 4 3 0 5 1 0 P 1 43 0 5 2 0 P 1 43 0 53 0

p 'i 4 3 0 5 4 0 P 1 430 5 5 0 P 1 43 0 5 60. PI 43 0 5 70

"P 1 43 0 5 8 0 P1 430590

PI 43 0 60 0 P 1 43 06 1 0

P 1 4 3 0 6 2 0 P1 430630

P1 430640

P 1 43 06 5 0 Pi 43 0 66 0 PI 43 0670

P1 43 068 0 P1 430690

P 143 0 70 0 P 1 430 7 1 0 P1 430720

P1 430730

P 143 0 740

P1 430750

P 143 0 760

P1 430770

P 1 43 0 78 0 P 1 43 0 790

PI 43 0 8 0 0 PI 43 0 8 1 0

DVC = (-0.5,0.8660254) *« AVI

EVC = AVC* *AVI

WRITE ( NUVI ,1432) BVC , CVC , DVC , EVC

C*t*»* EXP0NENT=4

AVC=(0.0.1 .0)

AVI =4

BVC = AVC* *4

CVC=(0.0, 1 .0>**4

DVC=(0.0, 1 .0>**AVI

EVC = AVC* *AVI

WRITE ( NUVI , 1 432) BVC, CVC, DVC, EVC

1432 FORMAT (2X.2F8.4)

C***** EXP0NENT=6

AVC = ( 0.5,0.8660254)

AVI =6

BVC = AVC* *6

CVC = ( 0.5,0.8660254) ** 6 DVC =( 0.5 , 0 .86602 5 4 ) * * AVI

EVC = AVC * * AV

I

WR I TE ( NUV I

, 1432) BVC , CVC . DVC , EVC

C***«* EXP0NENT=8

AVC = (0.7071068,0.7071068)

AVI =8

BVC = AVC* *8

CVC = (0.7071068,0.7071068) ** 8 DVC = (0.7071068,0.7071068) ** AVI

EVC=AVC**AVi

WR I TE ( NUV I

, 1 432 ) BVC , CVC , DVC . EVC

c«**»* exponent's i

6

AVC = (0.8090170,0.5877853)

AVI =10

BVC = AVC* * 1

0

CVC = (0.8090170,0.5877853) ** 10

DVC = (0.8090170,0.5877853) ** AVI

EVC=AVC* *AVi

WR I TE ( NUV I , 1 432 ) BVC f CVC,DVC,EVC

C*****EXPONENT=20

AVC = (0.9510565,0.3090170)

AVI =20

BVC=AVC**20

CVC = (0.9510565

DVC = (0.9510565

EVC = AVC* *AVI

WR I TE ( NUV I ,1432)

C * * * * * EXPO NE NT = 40

AVC = (0.9876883

AVI =40

BVC = AVC* *40

CVC = (0 .9876883

DVC = (0.9876883

EVC = AVC** AVI

WR I TE < NUV I , 1 432 ) C

*'*''*'** EXPONENT: 60

AVC = (0.9945219

AVI =60

BVC=AVC**60

CVC = (0.9945219

DVC = (0.9945219

EVC = AVC* *AVI'

WR I TE < NU V I ,1 432 )

,0.3090170) ** 20

,0.3090170) ** AVI

BVC, CVC, DVC,

,0,1 564345

)

EVC

, 0 . 1 5643 4 5 )

, 0 . 1 5643 4 5 )

* * 40

** AVI

BVC, CVC, DVC,

,0.1045285)

EVC

,0.1045285)

.0.1045285)

* * 6 0 ** AVI

BVC , CVC , DVC , EVC

NBS FORTRAN Test Programs Version 1 129
C*t«t*EXP0NENT=80

AVI = 80

AVC = ( 6.99691 73

BVC = AVC* *80

PU30820

P1430830

P1 430840

P1430850

0 .0 78 4 5 9 1 )

CVC = (0.9969173.0.0784591) ** 80 P1430860

DVC = (0.9969173.0.0784591) ** AVI P1430870

EVC=AVC**AVi P 1 430880

WRITECNUVI , 1432) BVC, CVC,DVC f EVC P1430890

* EXPONENT = 1 00 P1 430900

AVC = ( 0.9980267 , 0.062790 5 ) P 1 43 0 9 1 0 AVI = 1 00 P 1 4 3 0 9 2 0 BVC=AVC**100 P1430930

CVC = ( 0.998026 7 . 0.062 790 5 ) ** 1 00 P 1 430940

DVC = (0.9980267.0.0627905) ** AVI P1430950

E V

; "C = AVC * * AV I P 1 43 0960

WR I TE ( NUV I

. 1 432 ) BVC . CVC , DVC . EVC P1 430970

WRITE (NUVI, 1433) P1 430980

FORMAT (// 37H TEST IS POSITIVE IF NUMBERS PRINTED/2X, P1430990

1 2 6 HABCVE ARE CLOSE TO 1.0,0.0) P 1 4 3 1 00

0

WRITE (NUVI, 1434) P1431010

FORMAT (77 39H ERROR SHOULD NOT EXCEED + OR - .0001 ) P1 431 02 0

* END OF TEST SEGMENT 143 P1431030

* WHEN EXECUTING ONLY SEGMENT 143, THE STOP AND END CARDS P1431040

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1431050

* IN COLUMNS 1 AND 2 REMOVED. P1 43 1 060

STOP P 1 4 3 1 0 7

0

C * * * *

1 433

1 434

C * * * *

C * * * *

c * * * *

c * * * *

c =

c"= END P 1 4 3 1 0 8 0 STOP P143C1

END P143C2 ************************************************* '*»**************«*P1440010

* P 1 440 020

* CPXOP - (144) PU40 0 3 0

* P1440040

***********t*a*»********t************************************»*****pi440050

* GENERAL PURPOSE ASA RE F P1 440060

* TO TEST ARITHMETIC OPERATIONS ON COMPLEX NUMBERS. 6.1 P1440070

C * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * t

c * * * *

c * * * *

c * * * *

c * * * * c=

c =

* OPERATIONS INCLUDE ALL BASIC OPERATORS (+,-,*,**) ACTING

* ON COMPLEX NUMBERS

* S P E C I F I C A T 1 0 N S SEGMENT 1 4 4

*

* WHEN EXECUTING ONLY SEGMENT 144. THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENTS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED,

INTEGER AVI

COMPLEX AVC, BVC, CVC, DVC, EVC, FVC, GVC . HVC , PVC , RVC . SVC . TVC , INTEGER AVI

COMP LE X AVC, BVC, CVC, D V C, EVC, FVC, G V C , H V C , P V C , R V C , SVC. TVC

,

*

P1 440080

P 1 440090

P 1 4 4 0 1 0 0 P1 440 1 1 0 pOb 12 73 o P0012735

P 0 0 1 2 7 40

P0012745

P0012750

P0012755

UVCP0012760

P1 44A1

UVCP144A2

P001 2765

PI 440 1 20

P0072360

P 6 6 7 2 3 6 5 P0072370

P 0 0 7 2 3 7 5 P0072380

P 1 4 4 B

1

P0072385

P 1 4 40 1 30

P1 4401 40

P 1 440 1 5 0 P 1 4 4 0 1 6 0 P 1 4 4 0 1 7 0 P1 4401 80

P1 4401 90

P1 440200

PI 44 0 2 1 0 )- PU 4 022 0

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

« OUTOUT TAPE ASSIGNMENT STATEMENT

* NO INPUT TAPE

» WHEN EXECUTING ONLY SEGMENT 144, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI

NUVI

C * * * *

1441

WRITE (NUVI, 1441)

FORMATMH1 , 1X.32HCPX0P - (144) COMPLEX OPERAT I ONS / / 2X ,

1 1 1 HAS A REF 6 . 1 / / 2X , 7 H R E S U L T S

/

'/ ) AVC = (0.9396926,0.3420201

)

BVC = ( 1 .2 8 1 7 1 2 7,0.5 9 7672 5 ) CVC = ( 0.0, 1 .41 42 1 36 ) DVC = (0.7071068. 0.7071068)

EVC = ( 1 .09868 4 1 . 0 .45 5 0899 ) AVI = 2 RVC=(AVC*BVC+(0. 9396926. 0 . 3 42 02 0 1

) * BVC* AVC * ( 1 . 2817127, 0.5976725

130 NBS FORTRAN Test Programs Version 1
1 (0.9396926,0.3420201 >*<1 .28171 27,0. 5976725) +CVC/DVG+( 0.0, 1 . 41421 3 6P 1440230

3 0.7071068)+EVC**2-EVC*

4 0.4550899)**AVI >**2/<0

* AVI + ( 1 . 0986841 ,0.4550899)**2+(1. 0986841,

.0, 72.0)

PH402 50

P1 440260

FVC=(0. 0.4.0)

GVC=< 0 . 4330 1 ,0 . 3 ) PK40270

PU 402 8 0

1442

1 443.

C * * * *

c * * * *

C * * * *

c * * * *

c'= c=

PH40 290

P 1 44 03 0 0 P1 440316

P1 440320

PI 4 40330

P1 440340

P1 4403 5 0 P1 440360

P 1 4 4 0 3 7 0 P 1 4403 8 0 P 1 44 0 3 90

PI 4 40 40 0 PI 4404 1 0 P1 440420

p 1 44 0 43 0 P1 440440

P 1 4 4 CI

P 1 4 4 C 2 ***t***************»***************»***t«*»***»***************«t*«*pi450010

* P1450020

* CREAD- (145) PU50030

* P 1 4 5 0 0 4 0 **»**********«*******»************t»**»t**»***t*»**«**t«(rt»*****t*»pi450050

* GENERAL PURPOSE ASA RE F P 1 4 5 0 0 60

* TO TEST ADDITION AND SUBTRACTION OF COMPLEX 6.1 P 1 4 5 0 0 70

* AND REAL NUMBERS P1 450080

* P 1 4 5 0 0 9 0

* SPECIFICATIONS SEGMENT 145 P1450100

* P00 12770

* WHEN EXECUTING ONLY SEGMENT 145. THE SPECIFICATION STATEMENTS P0012775

* WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012780

* IN COLUMNS 1 AND Z REMOVED. P0012785

* POO 1 2790

COMPLEX AVC.BAVC, CAVC , DAVC , ASVC . BSVC , CSVC.AAVC P0012795

2 . DSVC,AAAVC.ABAVC,ACAVC,ADAVC,AASVC,A8SVC,ACSVC, ADSVC P0 0 1 2 8 0 0 COMPLEX AVC.BAVC. CAVC, DAVC. ASVC. BSVC, CSVC.AAVC P145A1

2

,"' DSVC. AAAVC. ABAVC, A CAVC, ADAVC, AASVC, ABSVC, ACSVC, ADSVC PU5A2

« P0012805

« 6 U f 0 U t t A P E ASS IGNMENT STATEM ENif NO I N P Of TAPE.' P 1 4 5 0 1 1 0

* P0072390

WHEN EXE CUT I NG ONLY S E G ME NT 145 , THE FOLLOW I NG STATE ME NT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

HVC = ( 0. 43 3 0 1 ,0.2 ) PVC = ( 1 .73204 , 1 . 0 ) SVC = FVC/ < (GVC+HVC) * (PVC* *2 ) ) TV C=(0.0, 4. 0)/(((0. 43301, 0 . 3) + < 0 . 43301. 0 . 2 ) ) * ( < 1 . 73204, 1 . 0 ) * * 2 ) ) UVC = FVC/((GVC+( 0.4 330 1 , 0 . 2 ) ) * ( PVC * * 2 ) ) WRITE (NUVI, 1442) RVC , SVC , TVC , UVC

FORMAT ( 4<2X, 2F8 . 4 / > /37H TEST IS POSITIVE IF NUMBERS PRINTED / 12X. 1 7HAB0VE ARE 1.0,0.0 ) WRITE (NUVI , 1 4 4 3 ) FORMAT ( / / 39H ERROR SHOULD NOT EXCEED + OR - .0001 )

» END OF TEST SEGMENT 144'

* WHEN EXECUTING ONLY SEGMENT 144. 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 * * * *

c * * * *

c * * * *

c * * * t

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c

* » * *

c * * t *

c * * * *

c * * * * c=

c=

c * * * *

c * * * *

c * * t *

C t * * * *

c * * * * * P0072395

P0072400

c * * * * * P0072405

C= NUVI = 6 P007241

0

NUVI = 6 P 1 4 5 B 1 c * * * t * P007241

5

WRITE (NUVI . 1450) P 1 4 5 0 1 20

1 450 FORMAT ( 1 H 1 , 1X.38HCREAD - (145) ADDITION AND SUBTRACTION/ P 1 4 5 0 1 3 0

1 10X.27H0F COMPLEX AND REAL NUMBERS//2X, PI 4 5 0 1 40

1 12HASA RE

F

. 6.1//2X.7HRESULTS//) P1 4501 50

AVC=(5.4.7. 5) P1 4501 60

AVS = 4.2 P1 4501 70

C«t*«* ADDITION AND SUBTRACTION OF 2 NUMBERS

AAVC=AVC-AVS

BAVC=(5 . 4, 7. 5)-AVS

CAVC=AVC-4.2

DAVC= ( 5 . 4 . 7 . 5)-4. 2 ASVC=AVC+AVS

BSVC=(5.4,7.5)+AVS

CSVC=AVC+4.2

DSVC=(5.4, 7. 5y*4.2'

C*t*t* ADDITION AND SUBTRACTION OF 3 NUMBERS

P1 4501 80

P1 450190

P1 45 02 00

P 1 45 02 1 0 Pi 4 5 0 2 2 0 P1 450230

P 14 5 0 2 4 0 P1 450250

P 14 5 02 6 0 P1450270

NBS FORTRAN Test Programs Version 1 131
AAAVC=AVC-AVS-AAVC

ABAVC=(5.4.7.5)-AVS-BAVC

P1450280

P 1 450290

ACAVC = AVC-4.2-(1 .2 , 7. 5)

ADAVC = (-5 4.7 5 ) - 4 . 2 - ( 1 . 2 . 7 . 5 ) P1450300

P1 45031 0 AASVC=AVC+AVS-ASVC

AHSVC=(5 4 7 5)+AVS-BSVC

P1450320

P1 450330

ACSVC=AVC+4.2-(9.6,7.5)

ADSVC=(5.4,7.5)+4.2-(9.6,7.5)

P1450340

P1 450350

1 4 "5

1

WRITE ( NUVI , 1451 ) ABAVC . ACAVC , ADAVC , AASVC . ABSVC . ACSVC , AOSVC , AAAVC

FORMAT ( 2X , 2 F 8 . 4 ) P1450360

P1 450370

c * * * * * ADDITION AND SUBTRACTION OF 7 NUMBERS

ADSVC=AVC-(5.4,7.5)+AVS-4.2+ASVC-3.2-(6.4,7.5)

P1450380

P1 450390

14 5 2

WR I TE ( N UV I , 1 452 ) ADSVC

F0RMAT(2X. 2F8 . 4/ /37H TEST IS POSITIVE IF NUMBERS PRINTED/2X,

P1450400

P1 45041

0

1 c « * * * *1 7HAB0VE ARE 0.0,0.0)

END OF TEST SEGMENT 145

P1450420

P1 450430

c * * * * *

c * * * * * WHEN EXECUTING ONLY SEGMENT 145. THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

P1 450440

P1 450450

c * * * * * c=

IN COLUMNS 1 AND 2 REMOVED.

STOP

P1450460

P1 450470

c= END

STOP

P1450480

P145C1

c***»*

END P145C2

«**»»»«**»t«»**«»»«**«t»««***t**»tt*«*«««»**»*»ttt«*t*»«*««*««»»*tPi460010

c***»*

c* * * * * CREMU - (146)

P1460020

P1460030

c****»

c * * « * * P1460040

t«>t«i<iitt<t«ttitt>tiitt><»ittntittttii«t>ittt<titiitittttit>itt«pU60050

c***»*

c* * * * * GENERAL PURPOSE ASA REF

TO TEST MULTIPLICATION OF COMPLEX NUMBERS BY 6.1

P1460060

P1 460070

c****«

c*« ** * REAL NUMBERS P1460080

PI 460090

C**t*»

c* * * * * SPECIFICATIONS SEGMENT 146 P 1 460 1 00P00 1 281 0

c* * * t * WHEN EXECUTING ONLY SEGMENT 146, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS MUST HAVE THE C=

P0012815

P0012820

c****«

c* * * t * IN COLUMNS 1 AND 2 REMOVED. P0012825POO 1 2830

c= COMPLEX AVC.BVC, MAVC , MBVC , MCVC , MDVC

COMPLEX AVC.BVC. MAVC . MBVC . MCVC . MDVC

P0012835

P 1 46A1

c*.«*«

Ct * * * t OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P0012840

P 1 460 1 1 0

C**t«*

c* * * * * WHEN EXECUTING ONLY SEGMENT 146. THE FOLLOWING STATEMENT

P0072420

P0072425

c*«***

c* * * * * NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072430

P0072435

c= NUVI = 6

NUVI = 6

P0072440

P146B1

c * * * * * WRITE (NUVI. 1461)

P0072445

P 1 460 1 20

1461

1 F0RMAT(1H1 .1X.39HCREMU - (146) MULTIPLICATION OF COMPLEX/ 1 6X,7HBY REAL //2X.

P 1 460 1 30

P 1 460 1 40

2 1 1HASA.REF.6. 1 / / 2X . 7HRESULTS / /

)

C»**«*MULTIPLI CAT ION OF A COMPLEX NUMBER BY A REAL NUMBER

P 1 460 1 50

P1 460160

AVC=( 1 .6.3.2)

AVS=0.625

P1 4601 70

P1 4601 80

MAVC=AVC*AVS

MBVC=(1 .6.3.2)*AVS

P 1 460 1 90

P1460200

MCVC-AVC*0.625

MDVC=(1 .6,3.2)*0.625

P 1 4602 1

0

P1460220

1463

WRITE (NUVI. 1463) MAVC. MBVC, MCVC, MDVC

F0RMAT(4(2X.2F8.4/)//37H TEST IS POSITIVE IF NUMBERS PRINTED/, 2X

P1460230

, P 1 460240

4 1 7HAB0VE ARE 1.0.2.0 ) C***t«MULTIPLICATION OF 4 TERMS

P1460250

P1 460260

AVS=4.0

BVS=0.25

P1460270

P1460280

AVC=(0. 93969, 0.34202)

BVC=(1 .28168,0.59764)

P1460290

P1460300

132 NBS FORTRAN Test Programs Ver s \ on 1
MAVC=AVS*AVC*BVS*BVC

MBVC=4.0*BVS*AVC*BVC

MCVC=4 . 0 * BVS'V'fO . 93969 , 6 .34202 ) * BVC

M D V C = 4 . 0 * 0 . 2 5 * ( 0 . 9 3 9 6 9 0 . 3 4 2 0 2 > * < 1

, PH6031 0 PH60320

PI 460330

28168,0.59764) PH60340

WRITE (NUVI, 1462) MAVC . MBVC , M CVC , MDVC P1460350

F0RMAT(//4(2X, 2F8.4/W/37H TEST IS POSITIVE IF NUMBERS PRINTED/ P1460360

12X, 1 7HAB0VE ARE 1.6,1.0) PH60370

WRITE (NUVI , 1 464) P1460380

1462

1464

C * * * *

c * * * *

c * * * *

C t * * * c=

c=

FORMAT ( / / 39H ERROR SHOULD NOT EXCEED + OR - .0001 ) END OF TEST SEGMENT 146

WHEN EXECUTING ONLY SEGMENT 146, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

P 1 46 0390

P1 460400

P 1 460 4 1 0 P1 460420

P 1460 43 0 P1 460440

PI 46 04 5 0 P 1 46 C

1

END P146C2

***************«***************************************************P1470010

* P 1 4 7 0 0 2 0 PU 70 03 0

» IN

STOP

END

STOP

COLUMNS 1 AND REMOVED

* PU 70 0 40

***********************t*****t*t****t*******t*********t**t*********pi470050

C * * * *

C * * * *

C * * * *

C * t * *

c * * * *

C * t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c"=

CREDV - (147)

GENERAL PURPOSE

TO TEST DIVISION OF REAL (COMPLEX) NUMBERS BY

ASA RE F 6.1

P 1 4 70060

P 1 470 0 70

COMPLEX (REAL) NUMBERS

s

p

e c

i

f i c a f i

o

n S SEGMENT 147

WHEN EXECUTING ONLY SEGMENT 147, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENTS MUST HAVE THE C=

I N COLUMNS i AND 2 REMOVE D .

COMPLEX AVC, DAVC. DBVC, DCVC, DDVC

COMPLEX AVC , D AV C . D B V C , D C V C , D D V C OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

C * * * *

c * * * *

c * * * * *

C * * * * * WHEN EXECUTING ONLY SEGMENT 147, the FOLLOWING STATEMENT

C * * r t

C * * t * c=

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND REMOVED

NUVI = 6

NUVI = 6

C * * * *

1471

C * * * *

WRITE (NUVI, 1471)

FORMAT (1H1 , 1 X , 33HCREDV - (147) DIVISION OF COMPLEX/ 1 6X , 1 6HAND

1L NUMBERS/ /2X, 1 1 HASA REF 6 . 1 / /2X, 7HRESULTS/ /

)

DIVISION OF REAL BY COMPLEX

AVS = 2 . 0 Avc=( 1 .0 , -1.6)

DAVC=AVS/AVC

DBVC=2 . 0/AVC

DCVC=AVS/ ( 1 . 0 , -1.0)

DDVC=2.0/(1 .0. -1 .0)

WRITE (NUVI. 1473) DAVC , DBVC . DCVC , DDVC

PU 70 0 8 0 P 1 470 0 90

P1 4 701 0 0 P001 2850

POO 1 2 8 5 5 P0 0 1 2 860

POO 1 2 86 5 P0012870

PO 0128 7

5

P 1 4 7 A 1 P 0 0 1 2 8 8 0 P 1 470 1 1 0 P0072450

P0072455

POO 72 46 0 P0072465

POO 7 2470

P 1 4 7 B 1 P00 72 4 7 5 P1 4701 20

REAP 1 470 1 3 0 P14701 40

PI 4 7 015 6

P 1 4 7 0 1 6 0 P1 4 701 7 0 P1 4701 80

P1 470190

P1 470200

P 1 4 702 1 0 P1470220

P 1 4 7023 0 P1 470240

P 1 4 7 0 2 5 0 P 1 470260

P1 470270

P1 470280

P1 4702 90

P 1 4 70 3 0 0 Pi 4703 1'

6

P 1 4 7032 0 P 1 4 7 0 3 3 0 P1 470340

P1470350

PU 70360

1473

C * * * * FORMAT ( 2X, 2F8.4)

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 . 5463

DDVC=(2.5463,2.5463)/2.5463

WRITE (NUVI ,1472) DAVC , DBVC , DCVC, DDVC

FORMAT (4(2X,2F8.4/)//37H TEST IS POSITIVE IF NUMBERS PRINTED/

1 2X , 1 7HAB0VE ARE i .6, 1 .6)

WRITE (NUVI, 1474)

FORMAT (// 39H ERROR SHOULD NOT EXCEED + OR - .0001 )

* END OF TEST SEGMENT 147

1 472

1474

C * * * *

NBS FORTRAN Test Programs Version 1 133
c * * * *

C * t * *

C

* * » *

C =

C =

* WHEN EXECUTING ONLY SEGMENT 147, THE STOP AND END CARDS P1470370

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1470380

* IN COLUMNS 1 AND 2 REMOVED. P1 470390

STOP P1470400

END

STOP

END

P147041

0

P1 47C1

P1 47C2

C t * * *

C t * * *

c * * * *

c * * »

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c = c=

c * * * *

c * * * *

C * * * *

c * * * *

c * * * *

c * * * *

t*tttttt»«itit«M*tiMttit«*t*ttttt*ttitt*«««tt*t*itttit*t*««tti*itpnsooio

* WHEN EXECUTING ONLY SEGMENT 148, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENTS MUST HAVE THE C=

* P1480020

* CREOP - (148) P1480030

* PI 4 8 0 0 4 0 tt*«*«*»ttt**************t*******t***************t*****************pi480050

t GENERAL PURPOSE ASA REF P 1 4 80 060

* TO TEST COMBINED OPERATIONS ON COMPLEX AND REAL NUMBERS 6.1 P1480070

* D I VISION OF TWO POLYNOMIALS P 1 4 8 0 0 8 0

* P1480090

* S P E C I F f CATIONS SEGMENT 148 P 1 48 0 1 00

* P0012890

PO0 1289 5 P0012900

POO 1 290 5 P00 1 291 0 POO 12 915

P0012920

P1 48 A

1

P1 48A2

PO 01 292 5 P 1 480 1 1 0 POO 72480

P0072485

POO 72 490

P0072495

IN COLUMNS 1 AND REMOVED

INTEGER AVI

COMPLEX, AVC, BVC, CVC, DVC,

INTEGER AVI

COMPLEX AVC, BVC. CVC, DVC, RVC

RVC

OUTOUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 148, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C = IN COLUMNS 1 AND 2 REMOVED.

NUVI = NUVI =

C * * * * * WRITE (NUVI, 1481)

1481 FORMAT (1 HI ,1 X ,3 6HCRE0P- (148)

1 EX NUMBERS// 2X, 12HASA REF. 6

P0072500

P 1 4 8 B 1 P 007250

5

P1480120

OPERATIONS 0 N REAL AND / 1 6X , 1 5HC0MPLP 1 4 80 1 30

1//2X, 7HRESULTS//) P1480140

AVC= ( 1 . 0 , 1 . 0

)

AVS=1 .

0

BVS = 2.6

BVC=(1 .0,-1.0)

PI

PI

pi

pi

pi

pi

pi

PR I P 1 pi

pi

pi

pi

pi

pi

p

1

... pi.....

pi

pi

pi

pi

pi

'"pi

, pi

p'i pi

""p'i p 1

p'i pi

480150

480160

480170

480180

4 8 019 0 480200

480210

480220

480230

480240

480250

480260

480270

480280

480290

480300

4 8 0 310

480320

480330

480340

480350

480360

480370

480380

480390

480400

4 8 0 410

480420

480430

480440

1483

RVC = (BVS + AVC *(1 . +AVC * (-1

1 (4.0+BVC*(2.0+BVC*(-AVS+BVC*<0

WRITE (NUVI, 1483) RVC

FORMAT ( 2X, 2F8 . 4/ / 3 7 H

+ ( 1 . 0, 1 . 0) * (

5 + BVC) ) )

)

1 . + AV C ) ) ) ) /

TEST IS POSITIVE IF NUMBERS

C * * * * 3NTED/2X, 1 8HABOVE ARE 2.0,-1.0//)*COMPLEX ARITHMETIC EXPRESSION

AVC = '('i .60,3.2)

AVS=0 . 625

0.45508)

BVS = 2 . 0 BVC=( 1 .0,-1.0)

CVS = 2 . 5 CVC=(2. 5,2.5)

DVC = (1.09866

AVI = 2 R V C = ( AV C * A VS + ( 1.6,3.2) * AVS-AVC * 0 . 6 2 5 - < 1 . 6 . 3 . 2 > « 0 . 62 5 + BVS / BVC

1-BVS/U .0,-1 .0) + 2.0 /BVC + 2.0/(1 .0,-1 . 0 ) + CVC / CVS- (2.5, 2.5)/ CVS + 2CVC/2.5+(2.5,2.5)/2.5+DVC**AVi-(1.0986 6,0.45508)**2+DVC**2+

3 ( 1. 09866,0. 45508)** AVI)**2/(0. 0,72.0)

WRITE (NUVI, 1482) RVC

F0RMAT(2X,2F8.4// 37H TEST IS POSITIVE IF NUMBERS PR I NTED/2X

1 1 7HABOVE ARE 1.0,0.0)

WRITE (NUVI, 1484)

FORMAT (77 39H ERROR SHOULD NOT EXCEED + OR - .000 1

)

* END OF TEST SEGMENT 148

* WHEN EXECUTING ONLY SEGMENT 14 8. "f HE ST OP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

1482

1484

C * * * *

C * * * *

c * * * *

134 N B S FORTRAN Test Programs Version 1
C * * * * * IN

C= STOP

C = END

STOP

COLUMNS 1 AND 2 REMOVED P1 480450

P1 480460

P 1 48 0 470

P1 48C1

END P148C2

C*«*«*t«t«t«ritt«*«*«»»«ttt»t»tt«»«t«»»tt««««*«i(»t»t*»«»»t«««»«»«*«««tt»«pi490010

C't"*"*"*"* P 1 490 02 0 C****« MISC3 - (149) P1490030

C* * * * * P 1 490 0 4 0 [ t i i i 1 1 1 1 i • i i i « 1 1 1 i i 1 1 i i i 1 1 i » 1 1 i t i t i i i< i i i i t « i 1 1 i t i i 1 1 n i i i i i i i i i i i i t < i i p ] ( 9 (} J 5 5 C* *"**"* GENERAL PURPOSE ASA RE F P 1 49 0 0 6 0 C***«* TO TEST EFFECT OF BLANKS WITHIN STATEMENT, 3.1.4.1 P1490070

C*»*** CONTINUATION OF STATEMENT TO MAX. NO. OF LINES, 3. 2. 4, 3. 3P1 49 0 080

C***«* AND USE OF SPECIAL CHARACTERS TO INDICATE CONTINUATION 3.2.4 P1490090

C *'*'*"*"* LINE " P 1 490 1 0 0 C***«* FOR BASIC INTEGERS AND REAL NUMBERS P1490110

C * * * c* * *

c * * *

c * * *

c * * *

c * * *

c * * * c=

c=

SPECIFICATIONS 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 A 1 S < 5 ) ,A2S(2,2)

I NTEGER 1 1 I ( 5 ) , I 2 I ( 2 . 2 ) DIMENSION A1S(5) ,A2S(2,2)

INTEGER I 11 (5) .121 (2.2)

C * * * * t

C"*'"*"*"** 0 U f 0 U f T A P E AS SI GN ME N T STATE M E NT

C * * *

c * * *

c * * *

C * t *

c

NO INPUT TAPE

* * WHEN EXECUTING ONLY SEGMENT 149. THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI

NUVI

C * * *

1 490

WRITE (NUVI. 1490)

FORMATMH1 , 1X.37HMISC3 - (149) EFFECT OF BLANKS WITHIN/16X,

122HSTMNT AND CONT I NUAT I ON / 1 6X , 20HOF STMNT TO 20 LINES//

239H ASA REFS. - 3.1.4.1 3.2.4.3.3 3 . 2 . 4 / / 2X , 7HRESULTS ) j a c v i =

i

I = 1 + 1 -(

*2

/

)

IA

A

A

K

*

(

)%

-I

21 ( 2

CV S

1 S (

1

)

2)

3

1 .0 E -2

( 1 )

0 00 . E

- .0 3

CVI

J A

C V

I

/

P1 4901 20

P1 4901 30

P 0 0 1 2 9 3 0 P0012935

POO 1 2 940

P001 2945

P0012950

P0012955

POO 1 2960

P 1 49A1

P 1 4 9 A 2 P0012965

P1 490 1 40

P0 0 72 5 1 0 P 0 0 7 2 5 1 5 P0072520

POO 72 52 5 P0072530

P 1 49 B

1

P0072535

P1 4901 50

P 1 4 9 0 1 6 0

P 1 4 9 0 1 7 0

P 1 490 1 8 0 P 1 4 9 0 1 9 0 P 1 4902 0 0 P 14 90210

P 1 490220

P 1 49023 0

P 1 4902 40

P 1 4902 5 0

P 1 490260

P 1 4 9 0 2 7 0 P1 490280

P 1490 290

P 1 4903 00

P1 49 0 310

P1 490320

P1 49033 0 P1 490340

P 1 4 9 0 3 5 0 P 1 490360

P 1 4903 70

P 1 4903 8 0 P 1490 39 0 P 1 49 0 4 0 0 PI 4 9 0 4 1 0 P1 490420

P1 490 430

P1 490440

P 1 490 4 5 0 P 1490 460

135

123i

4

56

7

8

NBS FORTRAN Test Programs Version 1
9A

)/

12

342)

56

9)

A

B W RI (NU VI 1 49 1 ) KB CVI CMA VS

P1490470

P1490480

P 1 490490

P1490500

P 1490510

P1 490520

P 1 490 5 3 0 P1490540

p 1 490 550

P1 490560

SP 1490 5 70

P1490580

P 1 4 9 0 5 9 0 P1 490600

( P 1 4906 1 0

+ P 1 490620

P 1 49063 0 P1 490640

P 1 49065 0 P1 490660

P 1 490670

P1 490680

P 1 490690

P1 490700

1 491 F 0 RM A T ( / / 1 1 0 / / F 1 1 . 1 / / 2 X, 35HTEST IS POSITIVE IF NUMBERS PRIP1 49071 0

1 NTED / 2 X, 1 1HAB0VE ARE 0) P1 490720

* END OF T E ST SEGMENT 1 49 '

' PI 490730

* WHEN EXECUTING ONLY SEGMENT 149, THE STOP AND END CARDS P1490740

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PI 490750

* IN COLUMNS 1 AND 2 REMOVED. P1490760

C * * * *

c * * * *

c * * * *

c * * * *

........

c= STOP

END

STOP

END

P1 490770

P1490780

Pi 49 CI

P 1 49 C2

C * t * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c = c=

***t*************t****************t*****t*t************************P1500010

* P1500020

* MISC4 - (150) P1 500030

* P 1 5 0 00 40

t ! j s » t i » t s i i i t i t i « i i i i n » » t t » n m• i * i i i < t i i « u t < * t » t i » « t » «n i < i » » » p 1 5 0 0 0 5 0

* GENERAL PURPOSE ASA RE F P1 500060

* TO TEST EFFECT OF BLANKS WITHIN STATEMENT, 3.1.4.1 P1 500070

* 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 PI 500090

* CONTINUATION LINE CAN CONTAIN FORTRAN CHARACTERS P1 5001 00

* (OTHER THAN C IN COLUMN 1) IN COLUMNS 1 THRU 5 (CLARIFICATION 3 ) P 1 5 0 0 1 1 6

* P 1 5 0 0 1 2 0

* S P E C I F I CAT 10 N S SEGMENT 150 P 1 500 1 3

6

* P0012970

* WHEN EXECUTING ONLY SEGMENT 15 0, THE SPE C I F I CATION STATEMENTS PO0 1 2975

* WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0012980

* IN COLUMNS 1 AND 2 REMOVED. POO 1298

5

* P0012990

INTEGER AVI P 0 01 299 5 COMPLEX AVC,BVC,CVC,DVC,RVC P0013000

INTEGER AVI

"' P150A1

COMPLEX AVC, BVC, CVCDVC.RVC P150A2

* P0013005

* OUTOUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P1 5001 40

* P0072540

* WHEN EXECUTING ONLY SEGMENT 150, THE FOLLOWING STATEMENT P0072545

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND : 2 REMOVED. POO 72 5 5 6

* P0072555

P0072560

P 1 5 0 B

1

P0072565

P 1 5 0 0 1 5 0 P1 500 1 60

C * * * *

c * * * t

c » t * *

c * * * *

c * * »

C * * 1

1

c= NUVI = 6

NUVI = 6

c * * * *

1 500

WRITE (NUVI, 1500)

F 0 RM A t (

1

H1 1 13 HMISC4 (150)

X , I X , 2 3 HE F F EC T OF B LAN K S WITHIN / 1 6 X , 2 2HSTMNT AND CO N PI 5 00 1 70

136 NBS FORTRAN Test Programs Version 1
Y T I N U AT ION/ 16X, 20HOF STMNT TO 20 LINES//

I39H ASA REFS . - 3.1.4.1 3.2.4.3.3 3 . 2 . 4 / / 2X , 7HRESU LTS / / > AVC = (1 .0 . 1 .6)

AVS = 1 . 0

" B V S = 2 • 0 BVC = (1 .0 ,.- 1 .0)

RVC = (B VS + A V C*(

T. 0 ) *( - 1

P1

P1

PI

P1

PI

P1

PI

P1

P1

P1

pi

......... pi

pi

pi

pi

"pi

pi

pi

pi

pi

pi

p'i pi

pi

pi

"p'i' pi

"p'i

pi

'p'i pi

p'i pi

p'i pi

p'i pi

p'i pi

"p'i

pi

p'i pi

p'i pi

"p'i pi

p'i pi

p"i pi

"p'i' pi

"p'i pi

"p"i pi

"p'i pi

pi

pi

"pi

pi

p'i pi

"p

1 pi

500180

500190

500266

500210

5 0 0 2 2 0 500230

5 0 0 2 4 0 500250

5 0 0 2 6 0 500270

500280

500290

5 0 0 3 0 0 500310

500320

500330

5 0 0 3 4 0 500350

500360

500370

500380

500390

500466

500410

500420

500430

5 0044 0 500450

5 0 0 4 6 0 500470

5 0 0 4 8 0 500490

5 0 0 5 0 0 500510

500520

500530

500540

500550

5 0 0 5 6 0 500570

5 0 0 5 8 0 500590

5 0 0 6 0 0 500610

5 0 062 0 500630

500640

500650

5 0 066 0 500670

5 0 068 0 500690

5 00700

500710

500720

500730

50 0 740

500750

5 0 0 7 6 0 500770

5 0 0 7 8 0 500790

506800

500810

5 0 0 8 2 0

5 0 0 8 3 0 5008 40

500850

1 A

0 + VC

A

* ( V

1 .+

C )

(

1

)

)

)

.0,

/ (

1

U4 .

0

V(wv c RVC

8V

V

j

c * S +

) ) RV

(2.0+ BVC

V C *( 0.5+ B

.0)

) +(-2.0, + 1 uv I 1502

W R I T E (N

FORMAT ( 2X, 2F8.4)

t COMPLEX ARITHMETIC EXPRESSION

* STATEMENT LABEL NOT REFERENCED

1 5 02 VC

C * * t * c* * * * 1503

VC = 1 .

3.4

A

+ V

-C"

*

/(1

) . ,6

.0

I , J3

K . L2

M ) CONTINUE STATEMENT WITH NO LABEL

CONTINUE

C * * * * * 3.4

AVS = 0.625

BVS = 2.0

BVC = (1.6,-1.0)

CVS = 2.5

CVC

DVC

AVI

RVC

(2

(

1

2

5,2.5)

0986841 0.4550899)

B(AVC*AVS

C+(1 .6,3.2)

0*AVS-AVC

E * 0 . 625

F-(1 .6.3

G * 0 . 62 5 H+BVS/BVC

I-BVS/(1 .0

2)

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"+ Q( 1 .0986841 , 0 .4550899)

R * * AV I ) S * * 2 / ( 0 . 0.72.0)

t -(1.0,0.0)

W R I T E ( N U V I 1 5 0 1 ) R 15 01 FORM AT ( / II X , 2 F 8 1501 " 111 3 7H TEST IS POSITIVE IF NUMBERS PRINTED/ 2X

' = , i 7 H ABOVE ARE 0.0,0.6 '" ) C*t**» END OF TEST SEGMENT 150

C"«'« "*'*'* WHEN EXECUT I NG ONLY SEGMENT 1 50 • THE STOP AND END CARDS

C****» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C?

C****» IN COLUMNS" 1 AND 2 REMOVED.

C= STOP

NBS FORTRAN Test Programs Version 1 137
c= END

STOP

END

P1 500860

P150C1

P 1 5 6 C Z

C * t * t *

c * * * * *

c

* * * t *

c * * * * *

c * * * * *

c * * * * *

C * * * * *

c * * * * *

C * t * * *

c * * * * *

C * * * * *

c * * * * *

c * t * * *

c * * * * *

C * * * * *

c * * * * *

c * * * * *

c * t * * *

c

* « * * * £***«*

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * * c=

8.3

WHICH

c * * * * *

c * * * * *

c

* * * * *

c * * * * *

c * * * * *

c"=

M**»tM«tt*t*t«t*t*«»t*ttt**t«t**ttMt««ttt«M«tt*t»tttttllttttttP1600010

PHOOOZO

BRFCP - (160) P1600030

P 1600040

***«*****»**************« «** ********************« »** ***»**P1600050

RE FP 1 600060

3 . 1 P1 600070

PI 606680

P1600090

pi 6001 66

P 1 6 0 0 1 1 0 P1 600120

2P1600130

P1 600 1 40

P16001 50

P1 600 1 60

P1 600 1 70

P 1 6 0 0 1 8 0 P 1 600 1 90

P 1 60 020 0 P 1 60 02 1 0 POO 13010

P00 1 30 1 5 POO 1 3020

P0013025

PO0 1 3030

P0013035

P160A1

P0013040

Pi 600220

P0072570

POO 72 5 75

P0072580

PO 072585

P 1 6 0 B

1

P 1 60 023 0 P1600240

Pi 600250

P1600260

P 1 6 0 02 70

P1600280

P 160 0290

P1600300

GENERAL PURPOSE ASA

1 .TO TEST REAL FUNCTIONS 8

2 . DUMMY ARGUMENTS ARE REAL OR INTEGER VAR I ABLES , OR

ARRAY NAMES

3. FUNCTIONS CONTAIN UP TO 20 ARGUMENTS

4. IN REFERENCE, ACTUAL ARGUMENTS ARE VARIABLE NAME

,

ARRAY NAME, ARRAY ELEMENT NAME, OR AN ARITHMETIC

EXPRESSION

RESTRICTIONS OBSERVED

1 . ITEMS(2) , (3) . (4) , (5) , (6) OF PARAGRAPH 8.3.1

2 . LAST SENTENCE OF PARAGRAPH 3.2

THIS SEGMENT IS TO BE RUN WITH SEGMENTS

400, 420, 430, 440. 450, 460

CONTAINS ALL F (J NCT IONS BEING TESTED HERE.

SPECIFICATIONS SEGMENT 160

WHEN EXECUTING ONLY SEGMENT 160, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE "C = IN COLUMNS 1 AND 2 REMOVED.

DIMENSION A1S(5) .A2SC2.Z)

DIMENSION A iS < 5 ) . A2S(2,2>

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 160, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

1604

NUVI = 6 NUVI = 6

WRITE (NUVI

FORMAT ( 1 H

1

1 / 2 X , 1 6 H A S A RE F

I AV I =2

A 1 S ( 1 ) = 1 . 0 A 1 S C 2 ) = 1 .0

A2S(2.2) = 1 .0

A2S(2, 1 ) = 1

1 604 ) 1X.37HBRFCP - (160) REAL EXTERNAL FUNCTIONS/

- 8.3.1//28H RESULTS SHOULD BE POSITIVE)

AVS = 1 . 0 P 1 6003 1 0 BVS=2.0 P1600320

CVS = 1 .

0

P1600330

DVS = 1 . 0 P1 600340

EVS=1 .0 P1600350

I VI =AFS < 2 . 0

) -8 .

0

P1600360

1605

1601,1600

B V S

) - 4.6

MAVI =1

IF( IVI > 1 600

I V I = B F S ( 2 . 0 MAVI=2

I F < IVI ) 1 600 , 1 60 1 , 1 600

IVI CFS(2) -16.0

MAV 7 IF .V. 1600,1601,1600

.=DFS(2, I AV I

) - 1.6

,AVI=4

I F ( I VD HOO . 1 60 1 . 1 60 0 IVI=EFS(A1S)-2.0

P1600370

P1600380

P 1 6 0 0 3 9 0 P1600400

PI 600 410

P1600420

" P 1600430

P1600440

PI 6 0045 0 P1600460

P 1 600470

P1 600480

P1 600490

P1600500

DVSP 16005 10

P1600520

1606

1607

160

1609

1

MAVI = 5 IF(IVI)1600,1601 ,1600

IVI = F F S ("I AVI, A V S , + 2 ( - 1 . 0 , A 1 S , I AVI 7 C V S . A IS, 1 ,A1S( 1 ) ,A2S, A2S.A2S.EVS+1 . 0, IAVI-1 ) + 1.0

0. IAVI .A1S.A1S, BVS

138 NBS FORTRAN Test Programs Version 1
HAVI =6 P1 600530

IF(IVI) 1600,1601,1600 P 1 60 0 5 40

1600 WRITE ( NUVI , 1 602 ) MAVI P1600550

GO TO 7001 P 1 600 5 60

1601 WRITE (NUVI , 1603) MAVI P1600570

1602 FORMAT (//2X,5HTEST ,I1,12H IS NEGATIVE) P1 600580

1603 FORMAT (//2X.5HTEST ,I1,12H IS POSITIVE) P1 600590

70 01 ft ft T ft / 1 £ A C 1 L. A L 11A1 1 i A 0 iiAO *7 A A A \ MAV/T GO TO (1605,1606,1607,1608,1609,7000 )

f MAVI P 1 6 0 0 6 0 0 7000 CONTINUE 1 P 1 6 0 0 6 1 0 C****t END OF TEST SEGMENT 160 P1600620

£>"*"*"* t WHEN EXE CUT I NG ONL Y SEGMENT 160 , THE STOP AND E ND CARDS P 1 60 063 0 C»**»* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN P1600640 „.„...._. .. ^ N D 2

" REMOVED. ' P 1 6 0 0 6 5 0 C= STOP P1600660

C= END P 1 6 0067 0 STOP P160C1

'END P160C2

[ I u l n m i i I » I t i < t u n u t i t H I t I i t i i < i . t i « » i i i i i t i ii i i i t . i . i i t i i . i t i it i i C , K }

; J C"»"*"*"«* P 4 0 0 0 0 2 0 C***»* AFS - ( 400 ) P400 003 0

C"«"*" *

*

'» P4000040

C » i » • » « • » « t » I « « I t n t * » t t « ( »« H I I * i • « « t ( » t 1 K » I t 1 I » H < t 1 I t t I 1 I t • « • > » I » 1 t I p i, o o 0 0 5 0 C**«* tREAL FUNCTION OF REAL ARGUMENT (TEST 1 ) P 40 0 0 060

FUNCTION AFS(AWVS) P4000070

AFS=4. 0*AWVS P4 0 00 08 0 RETURN P4000090

END ' P40 00 1 0 0 Ctt******t*t»t****« t** «*»***»***4*»***«*»*******t*******<t*****»**»**P4200010

C"*'* « *"*

' P 4 2 0 0 0 2 0 C***«* BFS - (420) P4200030

C* *'*"»"* P 4200040

Ciittt<tit«tttit«tittt»itM«tii«ttttittttttttit»Mti«ttttttt«t«tttt«tit<P4200030

FUMCTr0M Qp r EAL ARGUMENT'S (TEST 2) P420 0060

FUNCTION BFS(AWVS, BWVS) P4200070

BFS=AWVS+BWVS P4200080

RETURN P4200090

END P420 0 1 0 0 C***tt*************ttt***t************t*t******t***t***********'*****t***P4300010

C»"*"*"*"« P43 00 020

C *.*.**.« CFS : (.43 0.) P43 0 003 0 C»* * * * p 4 3 66 04 0 C**t*t**************i»***t*****t**t**»********t****t*»*t***4t»t******»**«P4300050

C*"* t"*"*'RE AL FUNCTION OF INTEGER ARGUMENT (TEST 3") P43 0 0 060

FUNCTION CFS(IWVI) P4300070

CFS=4.0«*iWVI P4300080

RETURN P4300090

END P 4 3 0 0 1 0 0 C**tt**t*t*****************t»*t**t*t»t**********«*t*t»*»**»*«t****tt*4**P4400010

C iii't't"'* t P 4 4 0 0 02 0 C » t * t * DFS ' ( 44 0 ) P4 4 0 0 0 3 0

C'"t"t"t"»"» P4400040

C*t«*«»**t**«t«t»»*t*t»*«t»*t*«**«»«t***ttttt«*tt***«««»t*t»*t«»««»tt*««P4400050

C"t'iT t tR E A L FUNCTI ON OF I NTEGER ARGUMENTS (TEST 4 ) P440 0 060

FUNCTION DFS( IWVI , JWVI ) P4400070

K V I = iWVi - J U V I P4400080

DFS=4.6*»KVI P4400090

RETURN P 4 4 0 0 1 0 0 END P44.001.1.0

C *t»»«»»**t»*tit«t«»«»t»tt»»t»tt*»t«t*«»tt«««»*«ttt»*tit**t«»»«t*»««»»t«P4500010

C****« P4500020

C*"*"t"'** EF'S

-' ('4 5 0 ) P45 00030

tM.f.tt P 4 5 0 0 0 4 0 ^tt»tlt*M«tttlttMltltlltttttM«llttltltt«<ttMlttltt<><ltttltltltlt«ttP4500050

C* * t * tREAL FUNCTION OF ARRAY NAME (TEST 5) P45 0 0060

FUNCT ION EFS(AWiS) P 4 5 0 0 0 7 0 DIMENSION AW1S(2) P4500080

EFS = AWiS( 1

) A W 1 S ( 2 ) P 4 5 0 0 0 9 0 RETURN P4500100

NBS FORTRAN Test Programs Version 1 139
END P4500110

[*it«««t«tt«i«t<t«t**«t*tt«ttttt««t«««tttttt*titi«tit>tttttttt«titt<i«ttP4600010

C*"*"*"*»

'

" P4600020

C***«* FFS - (460) P4600030

C*"*"*"*« P460'0040

C******t******tt*****»*t*»t»*****»***»**«t»*»**t**t***.»t»*t**tt**t*t**»*P46000S0

C t

"* .'* « REAL FUN CT I ON OF DIFFERENT TYPES OF ARGUMENTS ( TEST £">' P 46 00 060

FUNCTION FFS < I MV I ,. AWVS , JWV I, BWVS , AW 1 S f K WV I , CWVS,BW1S ( DWVS,LWVI, P46000 70

i'CW I S . bW I S , EWVS , FWVS , GWVS , BW2S , CW2S , DW2S , HWVS , MWV I )

' P 4600680

DIMENSION AW1S(2) , BW 1 S < 2 )

, CW 1 S ( 2 >, DW 1 S < 2 ), BW2S ( 2, 2 >

f CW2S<2,2) ,. P4600090

iOW2S(2, 2) P46001 0 0 FFS=AWVS**IWVI-BWVS**JWVI+AW1S(1 ) - CWVS * * K WV I + BW 1 S ( 2

) -DWVS + CW 1 S ( 1 ) P46001 1 0

1 * * l w V I D W 1 S < i )"- E w v S + F iij V

S - G W V S + B W 2 S < 2,1) - CM2S C2 , 2

)"+ 0

? 2"iS (• 2 /2T- H WVS * * P 460 01 2 0

2MWVI P4600130

RETURN P 4 6 6 0 1 4 6

E NO P46001 50

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * . * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * t * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * t * *

c * * * *

c * * * *

c * * * *

C * * * *

c * * * * c=

c=

ii»tH»t(*tttimHiiHH(itHiHtHtiiiiiiit»ttiit(tmtt*tntm( ***P1610010

P 1 6 1 0020

P1 61 0030

P1 61 0040

* * * p 1 6 i d 6 5 6

REFP161 0060

3 . 1 P 1 6 1 0 6 7 6

P1 61 0080

3. 1 P1 61 0090

P 1 6 1 0 1 00

p'uiafio

P 1 6 1 0 1 20

3 . 2 P 1 6 1 6 1 3 6 P 1 6 1 0 1 40

P 1 6 1 0 1 5 6 P 1 6 1 0 1 60

P1 61 01 70

P 1 6 1 0 1 80

P1 61 01 90

P1 61 0200

P1 61 021

6

P0013050

POO f 3 05

S

P0013060

PO0 1 306 5 P0013070

PO0 1 30 75

P0013080

P 1 6 1 A

1

P161A2

P0013085

P1 61 0220

66672590

P0072595

P0072600

P0072605

POO 7261 6 P161B1

p 6 67261 5 P1 61 0230

P1 61 0240

P1 61 0250

Pi 61 0260

P 1 6 1 0270

' P1 61 0280

P 1 61 0290

P1 61 0300

P 1 6 1 03 1 0

Pi 61 0320

P1 61 0330

PI 61 0340

P 1 6 1 0 3 5 0

BIFCP (161 )

****************************************************************

* GENERAL PURPOSE ASA

* 1 -TO TEST INTEGER FUNCTIONS 8.

* 2 - DUMMY ARGUMENTS ARE REAL OR INTEGER VARIABLES OR

* ARRAY NAMES

* 3-FUNCTIONS CONTAIN UP TO 20 ARGUMENTS

*' 4 - I N REFERENCE, ACTUAL ARGUMENTS ARE VARIABLE NAME,

* ARRAY NAME. ARRAY ELEMENT NAME , OR AN ARITHMETIC

* "EXPRESSION

RESTRICTIONS OBSERVED

* i- ITEMS (2 ) . (3 ) » ( 4) , (5 ) , (6) OF PARAGRAPH

* 2-LAST SENTENCE OF PARAGRAPH 3.2

8

8.3.1

* THIS SEGMENT IS TO BE RUN WITH SEGMENTS

* 401, 421, 431, 441, 451, 461 WHICH

* CONTAINS ALL FUNCTIONS BEING TESTED HERE

SPECIFICATIONS SEGMENT 161

* WHEN EXECUTING ONLY SEGMENT 161, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND REMOVED

DIMENSION A1S(5)

INTEGER 111(5)

DIMENSION A1S(5)

INTEGER 111(5)

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 161, THE STATEMENT NUVI

* MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

* NUVI =

6

NUVI = 6

= 6

C * * * * * WRITE (NUVI ,1614)

1614 F0RMAT(1H1 , 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)

I AVI =2

A1S( 1 )=i .6

A1S(2) = 1 .0

1 1 1 ( 1 ) = i

I I I ( 2 ) = 1 AVS = 1 .0

BVS=2.0

cvs=i .o DVS=1 .0

140 NBS FORTRAN Test Programs Version 1
EVS=1 .0

IVI=IAFI(2.0> - 8 HAVI=1

IF < I V I > 1610,1611,1610

P1 6 1 0360

P1 61 0370

P 161 0380

P 1 6 1 0390

P1 61 0400

P1610410

' P 1 610 420

P1 61 0430

P 1 6 1 0440

P 1 6 1 0 4 5 0 P1 61 0460

P1 61 0470

PI 61 0 4 8 0 P161 0490

P1 61 0500

P 1 6 1 0 5 1 0 P1 61 0520

P1 61 0530

P 1 610 5 4 0 P1 61 0550

P 1 6 1 0 5 6 0 P 1 6 1 0 5 70

P 1 6 1 0 5 80

P1 61 0590

P 1 6 1 0 6 0 0 P 1 6 1 0 6 1 0 P1 6 1 0 6 2 0 P1 61 0630

P1 61 064 0 P1 61 0650

P 1 6 1 0660

P1 61 0670

P 1 6 1 06 8 0 P 1 6 1 C 1 P161C2

***P4010010

P 4 0 1 0 0 2 0 P401 0030

P 4 0 1 0 0 4 0 ***P4010050

P 40 1 0 060

P401 0070

P4 0 1 0 0 8 0 P401 0090

P4010100

***P4210010

P 4 2 1 0 0 2 0 P421 0030

P 4 2 1 0 0 4 0 ***P4210050

P 4 2 10 060

P42 1 0 0 70

P42 1 0 080

P421 0090

P 4 2 1 01 0 0 ***P4310010

P 4 3 1 0 0 2 0 P43 1 0 030

P 4310040

***P4310050

P 43 1 0 060

P431 0070

P 4 3 1 0 0 8 0 P4310090

P 4 31010 0 ***P4410010

P 4 4 1 0 0 2 0 P4410030

1615 I V I = I B F I (2.0,BVS)-4

MAVI=2

IF ( IVI ) 1610,1611,1610

1616 IVI = ICFI (2) - 16

MAVI=3

IF (IVI) 1610.1611.1610

1617 I V I = I D F I (2. IAVI )-1

MAVI=4

1618

IF (IVI) 1610.1611.1610

IVI -I EF I ( 1 11) -2

MAVI =5

IF (IVI) 1610.1611,1610

1619 I VI = IFF I ( IAVI . AVS, 2, -1 .0, A1S, IAVI . CVS. A1S. 1 .0, IAVI .A1S.A1S, BVS.

1 DVS , A1 S ( 1 ) , A1 S , A1 S . A1 S , EVS+ 1 . 0 , I AVI - 1 ) + 1 MAVI =6

I F ( I V I ) 1610,1611. 16 1

0

1610 WR I TE ( NUV I

, 1612) MAVI

GO TO 7002

1611 WR I TE ( NUV I

. 1613) MAV

I

1612 FORMAT (./,./2X, 5HTEST ,1.1., 1 2 H IS NEGATIVE)

1613 FORMAT ( / /2X , 5HTEST ,I1.12H IS POSITIVE)

7002 GO TO (1615, 1616, 1617, 1618, 1619,7003), MAVI

'70 0

3' 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*Y*"*"* IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

C********************»«*************t**t«***»***«**»***»***i*«*»«*»**

C * * * * * C*.*.*** I A F I : (.401.)

c * * * *.t [ * t « * * * * * t * t t • t * II * * * * t t « * * « « t 1 1 * « « * t t 1 1 t < t > * t « * t t » t I * « t * 1 1 1 t 1 1 > * t « « * t

C ***** I N T EGER FUN CT I ON OF REAL ARGU M E NT (TEST 1

)

FUNCTION IAFKAWVS)

I A F I = 4 . 0 * A W V S RETURN

END

C********************************************************************

C * * * * *

C».».**.* : IB.Fl : (.4.2.1 ) c * * * * * c********************************************************************

C*« ** . INTEGER FUNCTION OF TWO REAL ARGUMENTS (TEST 2)

FUNCTION I BF I (AWVS , BWVS)

IBFI=AWVS+BWVS

RETURN

END

C********************************************************************

c * * * * *

C*.»..*..*.* ICFI : (431 ) C * * * * * C***********»*****t**************************************************

C***** INTEGER FUNCTION OF INTEGER ARGUMENT (TEST 3)

FUNCTION ICFKIWVI)

icFi=4.6**iwvi

RETURN

END

C********************************************************************

C * * * * * C***** IDF I - (441)

NBS FORTRAN Test Programs Version 1 141
C***»* P4410040

[t«»»M*»tMt»**»*M«»*l*t*ttMt»«t»*M*t*»»»»»»*H«tt»t**»t»t»t«M»ttt»Pm0050

C

*'"*'"*"*"*' INTEGER FUNCTION OF I NTEGER ARGUMENTS (TEST 4) P 441 0060

INTEGER FUNCTION IDFI (IHVI, JHVI) P4410070

REAL KUVS P 4410 080

IDFI = IWVI - JWVI P4410090

IDFI = KUVS * * IDFI P 4 4 1 01 0

0

RETURN P4410110

DATA KUVS /4 . 6/ P4 4 1 0120

E N D P441013..Q

fj * * *************** t't****t*tt**********t***>'*tt**«***t*t**t*t*t'*tt'*****t*p.4 510dl'0

C**«** P45100Z0

C"*"*

"*"*"*' IEFI - (451) P45 1 0030

C* * * * * P451 0040

C *************************************************** **********t** ****** *p 45 10050

C***«* INTEGER FUNCTION OF ARRAY NAME (TEST 5) P45 1 0060

F U N C T 10 N I E F I ( I AW 11 ) P 4 5 1 0 076

DIMENSION IAW1K2) P45 1 0080

I E F I = I AW 1 1(1 ) + I AW 1 1(2) P45 1 0090

RETURN P4510100

END P 4 5 1 0 1 1

0

C***********************************************************************P4610010

C"*"*"'*"

:*"* p 46 1 0 02 6

C *..*.*.** I FF I - ( 461.) P4.6..1 0.030

C* * * * * P461 0040

^tt*»tt*»*«t»»it««t«»t*tt*tt««»«*t*««tt»»«»ttt«ttt*tt«t»«tt«t«ttt»*«tt*»P46i0050

C*"'*"*"«" * I "NT EG E R FUNCTION OF D IF FERE NT TYPES OF ARGUMENTS (TEST 6) P461 0060

FUNCTION IFF I ( IWVI ,AWVS, JWVI . BWVS , AW 1 S

, KWV I , CWVS , BW 1 S , DWVS , LWV I ,. P46 1 00 70

1 CW1S.DW1S, EWVS , FWVS , GWVS , EW1 S , GW1 S , HW1 S , HWVS , MM VI ) P4610080

DIMENSION AW 1 S < 2 ) ,BW1S(2) , CW1S(2) ,DW1S(2) ,EW1S(5) , GW1S(5), P461 0090

1 HWi S( 5) " P 4 6 1 0 1 0 0 IFFI=AWVS**IWVI-BWVS**JWVI+AW1S(1)-CWVS**KWVI+BW1S(2)-DWVS+CW1S(1)P4610110

1 * * LWVi +DW1 S ( 1

) -EWVS + FW VS - G W V S + E W 1 S ( 1 ) -GW1 S ( 2 ) H W 1 S ( 2

) -HWVS * * P 46 1 0 1 20

2MWVI P 46 1 0 1 3 0 RETURN P461 0140

END Pi6.1p150 C*t***************t**t*t**********t**************************t**********Pl620010

C»  P1620020

C" ** *** FRF CP - (162) P 1 620030

C * .* * *.•*

P. 16 2 0 04 0

f : u i i it i > > i i i«i i < i i m I i > i i i i i .

•. i i i i i i i t i < i i ill i i t< i i it i < I i I < I lit )i I I tP1fi2 0 0 5 (l C***«* GENERAL PURPOSE ASA REF P1620060

C* * * * « 1 .TO TEST REAL FUNCTIONS IN FULL FORTRAN P 1 6 2 0 0 7 0 C**«** 2. THIS SEGMENT COMPLETES SEGMENT (160) IN ORDER TO TEST P1620080

t t FOR ALL FEATURES REQUIRED IN FULL FOR T RAN

"" 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 ST E D IN 1 6 0 ) , RE AL ( TE STE D IN P 1 62 0 1 0

0

C* * « * * 160), ARRAY NAME ( TESTED IN 160) .DOUBLE PRECISION, COMPLEX, PI 6 2 0 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 SUBPROGRAM ( ITEM 4) 8 .3 .1 P 1 6 2 0 1 3 0 'C***** 5. IN REFERENCE, ACTUAL ARGUMENTS MAY BE AS IN (160) AND P 1 6 2 0 1 4

0

C * * * * * BESIDES EXTERNAL PROCEDURE.' IN THIS CASE, EXTERNAL 8 . 3 . 2 P 1 62 0 1 5 0 X***** PROCEDURE IS REFERENCED BY AN EXTERNAL STATEMENT P 1 6 2 0 1 6 0 C*»*** 6.USE CAN BE MADE OF ADJUSTABLE DIMENSION P 1 620 1 70

[••RESTRICTIONS OBSERVED P 1 62 0 1 8

0

C

*'*"*"'*"* 1. ITEMS (1), (2), (3), (5) OF 8.3.1 P 1 62 0 1 90

C*«*** 2. PARAGRAPH 8.3.2, LINE 18 TO END OF PARAGRAPH P1620200

C* * * * * THIS SEGMENT USES 5 REAL FUNCTIONS PI 6 2 0 2 1 0 C*«*** THIS SEGMENT IS TO BE RUN WITH SEGMENTS P1620220

C* * * * » 402, 422, 432, 442, 4 5 2 WHICH PI 62 0 23 0 C*»*** WHICH CONTAINS ALL FUNCTIONS BEING TESTED HERE P1620240

C * * * * * pi 6202 5 0 C***«* SPECIFICATIONS SEGMENT 162 P1620260

C* * * * * POO 1 3090

C****» WHEN EXECUTING ONLY SEGMENT 162, THE SPECIFICATION STATEMENTS P0013095

C **'*:* * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0 0 1 3 1 0 0 C«**** IN COLUMNS 1 AND 2 REMOVED. P 0 0 1 3 1 0 5 e

*>"*-' P 0 0 1 31 1 0 C= DIMENSION A1S (5) ,A2S(2,2) ,A3S(3,3,3) P 0 0 1 3 1 1

5

NBS FORTRAN Test Programs Version 1
C= INTEGER 111(5). 121(2,2). 131(2,2,2)

C= REAL JRFS.IRFS

C= LOG I CAL A 1 B ( 2 ) , A 2 B ( 2 , 2 ) , A3 B ( 2 , 2 , 2 ) . AVB , BVB

C= DOUBLE PRECISION AVD , A1 D ( 4 ) , A2D ( 2 . 2 ) . A3D ( 2 . 2 , 2

)

C= COMPLEX AVC , BVC.A1 C(12),A2C(2.2), A3 C (2,2,1)

C= COMMON AXVS.CXVS

C= EXTERNAL GFS

DIMENSION A1S(5),A2S(2.2).A3S(3,3.3)

INTEGER I 1 I ( 5 ) , I 2 I ( 2 . 2 ) , I 3 I ( 2 , 2 , 2 > REAL JRFS.IRFS

POO 1 3 1 20

P0013125

PO0 1 3130

P0013135

POO 131 40

P0013145

P 0 0 1 3

1"5 0 P162A1

P 1 6 2 A 2 P1 62A3

P 1 6 2 A 4 P1 62A5

PI 62A6

P 1 62 A7

P162A8

P 0 0 1 3 1 5 5 pi 620270

P0072620

P 0 0 7 2 6 2 5 P0072630

P0072635

P0072640

P 1 6 2 B 1 P0072645

PI 62 02 8 0

, P 1 62 0290

P 1 6 2 0 3 0 0 P 1 6 2 0 3 1 0 P 1 62 0320

P 1 62 03 3 0 P 1 62 03 40

P 1 6203 5 0 P 1 6 2 0 3 6 0 P 1 62 03 70

P 1 6 2 0 3 8 0 P1620390

P 1 6 2 0 4 0 0 P162041

0

P 1 62 042 0 P1620430

P1 620440

P1620450

P1 620460

P1620470

P 1 6 2 0 4 8 0 P1 620490

PI 6 2 0 5 0 0 P 1 6 2 0 5 1 0 P 1620 5 20

P1620530

P1620540

P1620550

P 1 6 2 0 5 6 0 P1620570

P1620580

P1620590

P1 620600

P 1 62 06 1 0

P 1 620620

P1620630

P1 620640

P1620650

P1 620660

P1620670

P1 62 0 68 0 P1 620690

P 1620700

P 1 62 0 7 1 0

LOG I CAL A1 B(2 )

, A2B(2 , 2) , A3B(2 , 2 , 2 ) . AVB. BVB

DOUBLE PRECISION AVD,A1D(4) , A2D ( 2 , 2 ) , A3 D ( 2 , 2 , 2 ) COMPLEX A V C , B V C , A 1 C ( 1 2 ) , A2 C ( 2 , 2 ) , A3 C ( 2 , 2 , 1 ) COMMON AXVS.CXVS

EXTERNAL GFS

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c =

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 162, THE STATEMENT NUVI = 6

MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI = 6

C t * * *

1624

WRITE (NUVI . 1624)

FORMAT( 1 H1 , 1X. 33HFRFCP - (162) REAL FUNCTIONS W I TH / 1 OX , 3 1 H L OG

I

1 DP., AND COMPLEX ARGS//16H ASA REF. 8.3.1//

CAL

228H RESULTS SHOULD BE POSITIVE)

C * * * * * TEST 1 AVD = 1 . ODO

m a v i

"

'=

i

IVI = 1 .O-GFS(AVD)

IF ( IVI ) 1 620, 1 62 1 ,1 620

C*****TEST 2

1 62 5 MAV'i = 2 AVC = (1.0.-1.0)

C * * * * 1626

BVC = (1.0,1.0)

IVI = HFS(AVC.BVC)

IF (IVI) 1 6 20,1 621 ,1 620

*TEST 3 MAVI =3

AVB = .TRUE.

IVI = IRFS(AVB)*2

AVB = .FALSE.

C * * * * 162 7

JVI = IRFS(AVB)*4.0

LVI = IVI + JVI - 4 "IF (LVI) 1 620, 1 621 ,1 620

TEST 4 MAVI =4

IVI = JRFS(AVD.GFS)

IF (iVI-1) 1626.1621,1626

C * * * * *TEST 5.6.7

1628 AXVS = 1.0

AVS = 1.0

Aisd) = i.o

A2S( 1 . 1 ) = 1.0

A3S(1 , 1 , 1 ) = 1.0

AVB = .FALSE.

A1 B( 1 ) = . FALSE

A2B(1.1) = .FALSE

A3B( 1 . 1 . 1

)

I AVI = 1

i i i ( i ) = i 121(1,1) =1

FALSE

131(1,1.1) =1

A1C(1) = (1 .0.1 .0-)

A2C( 1 , 1 ) = (1.6,1.0)

A3C(1 ,1,1) = (-2.0.-2.0)

NBS FORTRAN Test Programs Version 1 143
AVD = 1 . ODO P1620720

A1 D( 1 ) = 1 . ODO P1620730

A2D( 1 , 1 ) = 1 . ODO P1620740

A3D( 1 ,1,1) = 1 .ODO P 1 62 0 7 5 0

I V I = RFS(AVS, IAVI , AVB,AVC,AVD,A1S,A2S,A3S,J1 I , 121 , 131 ,A1B,A2B,A3B,P1620760

1 A1 C,A2C.A3C,A1D,A2D,A3D,GFS> P1620770

MAVI = 5 P1620780

IF (IVI) 1 620, 1 621 , 1 620 P1620790

1629 MAVI = 6 P1620800

BVB = AVB . AND . A1 B( 1 ) . AND . A2B(

1

, 1 ) . AND . A3B( 1 , 1

, 1

)

P1620810

IF (BVB) GO TO 1621 P1620820

GO TO 1620 P1620830

7010 IVI=REAL(AVC) P1620840

JVI = A I MAG ( AVC

)

P1620850

MAVI = 7 P1620860

BVB = IVI .EQ.O.AND. JVI .EQ.O P1620870

IF (BVB) GO TO 1621 P1620880

1620 WRITE (NUVI.1622) MAVI P1620890

GO TO 7011 P1620900

1621 WRITE (NUVI.1623) MAVI P 1 6209 1

0

1622 FORMAT( //2X, 5HTEST ,I1,13H IS NEGATIVE.) P1 620920

1623 FORMAT (//2X.5HTEST .I1.13H IS POSITIVE.) P1620930

7011 GO TO (1625, 1626, 1627, 1628, 1629. 7010, 7012). MAVI P1 620940

7012 CONTINUE P1620950

C***«* END OF TEST SEGMENT 162 P 1 620960

C****» WHEN EXECUTING ONLY SEGMENT 162, THE STOP AND END CARDS P1620970

C***»* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1620980

C****» IN COLUMNS 1 AND 2 REMOVED. P1620990

C= STOP P 1 62 1 000

C= END P 1 62 1 0 1 0 STOP P162C1

END P162C2

C«****»t»»»»»t»it*«»«*»*t«««tt«s»*«*«*««*t*»*»*»*»t*«»»t»*»***t*««**»t*«P4020010

c * * * * * P4020020

C***»* GFS - (402) P4020030

C * * * * * P4020040

C«t»*t«*«*«t»»»»itt«t*«««««*«*«***»*»»«*tt««*«»*»«**«t**»«**»*t**t**t*t«P4020050

C***»* REAL FUNCTION OF DOUBLE PRECISION ARGUMENT (TEST 1) P4020060

FUNCTION GFS(AWVD) P4020070

DOUBLE PRECISION AWVD P4020080

GFS = AWVD P4020090

RETURN P4020100

END P40201 10

C*tt****tt***t*****t*»t***t********t tt** t*tlr*t*tt**t t**t*****t*t*»**P4220010

c * t * * * P4220020

C*«*** HFS - (422) P4220030

c * * * * * P4220040

t««*««t»**«*«*t*P4220050

C*****REAL FUNCTION OF COMPLEX ARGUMENT (TEST 2) P4220060

FUNCTION HFS(AWVC. BWVC) P4220070

COMPLEX AWVC , BWVC , CVC P4220080

CVC = AWVC * BWVC P4220090

HFS = AIMAG(CVC) P4220100

RETURN P42201 1 0 END P4220120

C*ttt*tt«l*t*>t*tl«t*lil»*lltttt*tltttttlt*tittlt«tt«t«t(t tt»t»«*«t*tt**ttP4320010

C i * * * * P4320020

C**««* IRFS - (432) P4320030

c * * * * * P4320040

Ct*t*««»«t>«t<t-tt<t«*««<t<ttt*ttttt<tttt<<«t«»*t»t«tt«t *t*«ttt******tt*P4320050

C*****REAL FUNCTION OF LOGICAL ARGUMENT (TEST 3) P4320060

REAL FUNCTION IRFS(AWVB) P4320070

LOGICAL AWVB P4320080

IF (AWVB) GO TO 4321 P4320090

4320 IF (.NOT. AWVB) GO TO 4322 P4320100

RETURN P43201 10

4321 IRFS = 2.0 P4320120

GO TO 4320 P4320130

144 NBS FORTRAN Test Programs Version 1
4322 IRFS = 0.0

RETURN

END

P43201 40

P43201 50

P 4 3 2 0 1 6 0

JRFS - (442)

[tt<iitt<<»<ttitt«tt<ttit«ttt*t>t«<ititt>ttit«<tiitit«tttitttttiinit<tiP4420010

c * * * *

c * * * *

C * * * * : C*»t««*»t«»«*t«*«*t»«*tt»»»»*»*tt»«*««*ttt»*tt**t»**»tttt*t»*tt»»t»«t»t»P4420050

c * * * *

P4420020

P4420030

P 4 4 2 0 0 4 0

* RE AL FUNCTION OF EXTERNAL PROCEDURE (TEST 4)

REAL FUNCTION JRFS( BWVD.BWFS)

DOUBLE PRECISION 8WVD

JRFS = BWFS(BWVD)

P4420060

P4420070

P 4 4 2 0 0 8 0 P4420090

P 4 4 2 0 1 0 0 P442 0 1 1 0 RETURN

END

C * * * *

C * *• * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

***************************t*****t******************ttt***t**t*****P4520010

* P4520020

* R F S - ( 4 5 2 ) P 4520030

* P4 5 2 0 0 4 0 ***************************************'**«*************************P4 5 20050

* RE AL FUNCTION OF DIFFERENT TYPES OF ARGUMENTS. USE IS MADE OF P4 5 2 0 060

ADJUSTABLE DIMENSION (TEST 5, 6, 7) P4520070

FUNCTION RFS(AWVS,IWVI , AWVB , AWVC . AWVD , AW 1

S

AW2S , AW3S I Ml I . IW2I

1 IW3I , AW1B,AW2B,AW3B,AW1 C , AW2 C , AW3 C , AW 1 D , AW2 D , AW3 D , AW F S ) LOGICAL AWVB.AW1B.AW2B.AW38

COMPLEX AWVC , AW 1 C , AW2 C , AW 3 C DOUBLE PRECISION AWVD, AW 1 D , AW2D , AW3D

DIMENSION AW2S( IWVI

IW2I ( IWVI

AW2B( IWVI

AW2C( IWVI

AW2D( I WVI

IWVI)

IWVI)

IWVI)

IWVI)

IWVI )

AW3S( IWVI

I W 3 I < IWVI

AW3B( IWVI

AW3C( IWVI

AW3D ( IWVI

IWVI

IWVI

IWVI

IWVI

IWVI

I WVI ) IWVI ) IWVI ) IWVI ) IWVI)

AW1S( IWVI

)

IW1 I ( IWVI ) AW 18 ( IWVI ) AW 1 C ( IWVI ) A W 1 D ( I W V I ) COMMON BXVS

RFS = A W V S * * I W V I + A W 1 S ( I W V I ) « * I W 1 I ( I W V I ) - AW 2 S ( I W V I , I W V I ) * * I W2 I

1 ( I WVI , I WVI ) +AW3S( I WVI , I WVI , I WVI ) * * I W3 I ( I WVI , I WVI , I WVI ) -AWVD+

2 A W 1 D ( IWVI )-AW2D( IWVI , IWVI )-AW3D( IWVI , IWVI . IWVI j"+ AW F S ( AWVD >- BXVS

AWVB = IWVI.E0.1

AW1B( IWVI ) = IWVI . EO . 1 AW2B( IWVI , IWVI ) = IWVI .EQ. 1

C * * * *

P4520080

p 4 52009 0 P45201 00

P 4 5 2 0 1 1 0 P45201 20

P 4 5 2 0 1 3 0 P4520 1 40

P 4 5 2 0 1 5 0 P4520160

P 4 5 2 0 1 7 0 P45201 80

P 4 5 2 0 1 9 0 P4520200

P 4 5 2 0 2 1 0 P4520220

P 4 5 2 0 2 3 0 P4520240

P 4 5 2 0 2 5 0 P4520260

P 4 5 2 0 2 7 0 P4520280

P4520290

C * * * *

C * t * *

c * * * *

C * t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * * *

c

* * t *

c * * * *

c * * * *

P1

P1

* P1

• * t » U 1 t t t 1 1 t t * t » t t 1 t t t t 1 t I t t n l * H I 1 t I I I t t 1 I t t t I I t t t l t t I t 1 » 1 i t i I ( 1 P 1

F I F CP (163)

AW3B( IWVI , IWVI .IWVI ) = IWVI .EQ. 1 AWVC = AWU(IWVI) +AW2C( IWVI , IWVI )+AW3C( IWVI , IWVI , IWVI ) RETURN

* END OF TEST SEGMENT 402

END

*******************************************************************PT630010

63 0 02 0 630030

630040

630050

630060

630070

630080

630090

630100

630110

630120

630130

6 3 014 0 630150

630160

630170

* GENERAL PURPOSE

* 1.T0 TEST INTEGER FUNCTIONS IN FULL FORTRAN

* 2 .THIS SEGMENT COMPLETES SEGMENT (161) I N ORDER

* FOR ALL FEATURES REQUIRED IN FULL FORTRAN. 8

* 3. DUMMY ARGUMENTS CAN BE I N T E G E R ( TE S T E D IN 161 ) , REAL ( f EST ED

TO TEST

ASA REF P1

P1

pi

1 P1

P1

IN 161). DOUBLE PRE C I S I ON , COMPLEX , LOG I CAL , OR EXTERNAL PRO CEDUREP

1

* 4 . DUMMY ARGUMENTS MAY BE RED I F I NED I N SUBPROGRAM (ITEM 4 ) P1

* 5. IN REFERENCE .ACTUAL ARGUMENTS MAY BE AS IN (161) AND BESIDES P1

* EXTERNAL PROCEDURE. IN THIS CASE , EXTERNAL PROCEDURE IS PI

* REFERENCED BY AN EXTERNAL STATEMENT. P1

* 6. USE CAN BE MADE OF ADJUSTABLE DIMENSION. P1

•RESTRICTIONS OBSERVED P1

* 1 . ITEMS ( 1 ) , (2) , (3) , ( 5 ) , OF 8.3.1

* 2 PARAGRAPH 8.3.2. LINE 18 TO END OF PARAGRAPH

* THIS SEGMENT USES 5 INTEGER FUNCTIONS

* THIS SEGMENT IS TO BE RUN WITH SEGMENTS

* "403 , 423 , 433, 443 , 453 WHICH

* WHICH CONTAINS ALL FUNCTIONS BEING TESTED HERE

*

* SPECIFICATIONS SEGMENT 163

P1630180

P 1 6 3 0 1 9 0 P 1 63 02 0 0 P 1 6 3 0 2 1 0 P 1 63 0 22 0 P1630230

P 1 6 3 0 2 4 0 P1630250

NBS FORTRAN Test Programs Version 1 145
C**t*t PO0 1 3 1 60

C****» WHEN EXECUTING ONLY SEGMENT 163, THE SPECIFICATION STATEMENTS PO0 1 3 1 65

C"*"«"*"*"« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 6 01317 0 C«tt*« IN COLUMNS .1 AND 2 REMOVED., PO0 1 3 1 75

c P 6,0 1 3 1 80

C= EXTERNAL IFI P 0 0 1 3 1 8

5

C"= DIMENSION A1S(5) ,A2S( 2,2) ,A3S( 3,3,3) P 66 13 190

C= INTEGER I1I(5) f 121(2, 2) t I3I(2, 2,2) PO 0 1 3 1 9

5

C s LOGIC A L AV B . b V b , A 1 B ( 2 ) , A2 B ( 2 , 2 ) , A3 B ( 2 , '2

, 2

') PO 0 1 32 00

C= DOUBLE PRECISION AVD , A 1 D ( 4 ) , A2 D ( 2 , 2 > , A3 D < 2 , 2 2 ) P00 1 3205

C= COMPLEX AVC. BVC.A1 C< 12) ,A2C<2, 2) ,A3C<2,2, 1 > POO 13210

C= COMMON AXVS.CXVS P0013215

EXTERNAL IFI P163A1

DIMENSION A 1 S < 5 ) ,A2S(2 f 2) ,A3S(3,3,3) P163A2

INTEGER 111(5), 121(2,2), 131(2,2,2) P 1 6 3 A 3 LOGICAL AVB,BVB,A1B(2),,A2B<2,2),.A3B<2,2,2) P163A4

DOUBLE PRECISION AVD.A1DU) ,A2D(2,2) , A3 D ( 2 , 2,2) P163A5

COMPLEX AVC,BVC,A1C(12>,.A2C(2,2),A3C(2,2,.1> P163A6

COMMON AXVS.CXVS PI 63 A

7

C**«** P0013220

Cft * Ti't 0 U TP U f T A P" E ASSIGNMENT STATEMENT. NO INPUT TAPE. P 1 63 0 2 60

C***»* P0072650

C* '*"*** WHEN EXECUTING ONLY SEGMENT 163, THE STATEMENT NUVI =' 6 POO 726 5 5 Cttttt MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P0072660

C * * *"* * P O O 7 2 6 6 5 C= NUVI = 6 P0072670

NUVI = 6 P163B1

C***«* P0072675

WRITE (NUVI, 1 634 ) " P 1 630270

1 634 FORMAT ( 1 H 1 . 1 X , 33HF I F CP - (163) INTEGER FUNCTION IN/ 16X, P1 630280

' 1 12HFULL FORTRAN/ / 2 X , p 1 630296

214HASA REF. 8.3.1//28H RESULTS SHOULD BE POSITIVE) P 1 6 3 0 3 0

0

C'tit*"* TEST 1 P I 6303 1 0 AVD=1.0D0 P1630320

MAV I = 1 Pi 630336

I V I = 1 - I F I (AVD) P 1 630340

IF ( ivi) 1 630 , 1 63 1 , 1 630 P 1 6303 5

6

Zttttt TEST 2 P1630360

1 63 5 MAV I =2 P I 63 6 3 70

AVC=(1.0, 1.0) P1630380

BVC = (1 .0,-1 .0) PI 630396

I V I = J F I (AVC.BVC) P1 630400

IF (IVI) 1636,1631,1636 P1 630410

C*****TEST 3 P1630420

1 636 MAVI =3 P1 630430

AVB= . TRUE . P1630440

IVI=KFI (AVB)*2 P 1630450

AVB=. FALSE. P1630460

J V I = I V I + K F I (AVB)-4 P 1 6 3 0 4 7 0 IF (JVI) 1630,1631,1630 P1630480

C* * * * * TEST 4 P 1 6 3 0 4 9 0 1637 MAVI=4 P1630500

IVI = LFI (AVD, IFI )-i P 1 63 0 5 1 0 IF ( IVI ) 1630, 1631 ,1630 P1630520

C* * * * * TESTS 5 ,6 ,7 P 1 630 530

1638 AXVS=1 . 0 P1630540

AVS "=

i f P 1 630 5 5 0 A1S(1)=1.0 P1630560

A2S( 1 , 1 ) = i . 0 P 1 63 0 5 70

A3S( 1 , 1 , 1 ) = 1 .0 P 1 63 0 5 8 0

I AV I = 1 P1630590

111(1) = 1 P1630600

i2 I ( 1 , 1 ) = 1 P 1 63061 0 131(1 ,1 .1 ) = 1 P 1 630620

Ai C( 1 ) = (1 .6,1.0) P 1 63 0 6 30

A2C(1 , 1 ) = (1 .0, 1 .0) P 1 630640

A 3 C ( 1 , 1 , 1 ) = (-2.6, -2.6) P 1 6 3 0 6 5 0 AVD=1.0D0 P1630660

146 NBS FORTRAN Test Programs Version 1
A 1 D < 1 > = 1 .000

A2D(1,1)=1.0D0

A3 0( 1 .1,1 ) = 1 .000

IVI=MFI (AVS, IAVI , AVB, AVC, AVD, A1S, A2S, A3S, 1 1 I , 12 I , 131 , A1 B, A2B , A3B , 1A1 "C". A2 C , A3 C , A 1 D , A2 D , A3D , I FlT

MAVI=5

IF ( I V I ) 1 630,1 631,1 630

1639 MAVI=6

BVB=AVB . AND . A1 B ( 1 ) . AND . A2B ( 1 , 1 ) . AND . A3B ( 1 , 1 , 1

)

IF (BVB) GO TO 1631

IF ( .NOT. BVB) GO TO 1630

7007 IVI=REAL(AVC>

JVI=AIMAG(AVC>

MAVI=7

IF ( I V I + J V I ) 1 630 , 1 63 1 , 1 630

1630 WR I TE ( NUV I ,1632) MAVI

GO TO 7008

1631 WR I TE ( NUV I

, 1633) MAVI

1632 FORMAT (//2X.5HTEST ,I2,12H IS NEGATIVE)

1633 FORMAT (//2X.5HTEST , I2.12H IS POSITIVE)

7008 GO TO (1635, 1636, 1637, 1638, 1639, 7007, 7009), MAVI

7009 CONTINUE

C****» END OF TEST SEGMENT 163

£>**** WHEN EXECUTING ONLY SEGMENT 163, THE STOP AND END CARDS

C*"t*"*"« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = C****t IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

C * *

c * *

c * *

c * * IFI - (403)

P1630670

P1630680

P1 630690

P1630700

P 1 6 3 0 7 1 6 PI 630720

P 1 63 0 73 0 P1 630740

P1 630750

P1 630760

P 1-63 0 770

P 1 63 0 7 8 0 P 1 6 3 0 7 9 0 P 1 63 0 8 0 0 P 1 6 3 0 8 1 0 P 1 63 0 82 0 P 1 6 3 0 8 3 0 P 1 630 8 40

PI 63 0 8 5 0 P 1 63 0 860

P 1 63 0 8 70

PI 63 0 8 8 0 P1 63 0 8 9 0 P 1 63 0 90 0 P 1 63 09 1 0 P 1 630920

P1 630930

P1630940

P163C1

P 1 6 3 C 2 P 4 0 3 0 0 1 0 P4030020

P4030030

P4030040

P 4 0 3 0 0 5 0 P4030060

P4030070

P4030080

P4030090

P40301 00

P 4 0 3 0 1 1 0 P423001

0

P42300Z0

P4230030

P4230040

P4230050

P4230060

P4230070

P4230080

P4230090

P4230 1 00

P42301 1

0

P42301 20

P433001

0

P 4330020

P4330030

P4330040

P4330050

P4330060

P4330070

P4330080

P4330090

P43301 00

P43301 1

0

P433 0 1 2 0 P4330130

P4330140

P4330 1 5 0

CtttlltittttlH«t*ttltllttiltlttl«ttlttitittttltiltliittlHttHI**tttiltt

C****t INTEGER FUNCTION OF DOUBLE PRECISION ARGUMENT ( TEST 1)

FUNCTION I FI (AWVD)

DOUBLE PRECISION AWVD

IFI=AWVD

RETURN

END

ttttlHIIIttlttttltttlltlltlitllttlltllttlttttlttlllltlltlllltlltll

JFI - (423)

llltttllttHMtttlttttttlttlltlttttttlltllllttliltltlttlltltltiliit

INTEGER FUNCTION OF COMPLEX ARGUME NT ( TE ST 2)

FUNCTION JFI (AWVC. BWVC)

COMPLEX AWVC. BWVC. CVC

CVC =AWVC«BWVC

J F I = A I MAG < CVC

)

RETURN

END

C * *

C * *

c * * C*»

c * *

tttlHttttlttttlttHltllltttlllttHlttillltttlitlllltitttlltlttlllt

KFI - (433)

*«tllMtttttHtltt*tllltttlltltttttltlltlitllt*ttIllttlltlttl*lt<tt

INTEGER FUNCTION OF LOGICAL ARGUMENT ( TEST 3)

FUNCTION KFKAWVB)

LOGI CAL AWVB

IF (AWVB) GO TO 4331

4330

4331

4332

IF (.NOT. AWVB) GO TO 4332

RETURN

K F I = 2

GO TO 4330

KFI = 6

RETURN

NBS FORTRAN Test Programs Version 1 147
END P4330160

t**tttl«tttltlttttMtttM<ttM«<>t«tlttttttitttM«itt»t«tttt«ltttttP4430010

* P 4 43 0 020

t LFI - (443) P4430030

C * t * t

c * * * *

c * * * *

C * * * * * P4 43 6 6 40

t ****** ******************************** ****************************** tPit^/SOQ^Q

C * * * * * I NTEGER FUNCTION OF EXTERNAL PRO CEDURE ( TEST 4)

FUNCTION LFI (BWVD, I W F I ) P4430060

P4430070

DOUBLE PRECISION BWVD

L F I = I W F I (BWVD)

RETURN

END

P4430080

P4430090

P 4 4 3 0 1 0 6 P44301 10

***************************t***************************t***********PU^'iQQ'\Q

* P4530020

* M F I - ( 453 ) P4530030

* P4530040

C * * * *

c * * * *

c * * * *

c * * * * *********************************************************************** p i^^^Q q ^ q

c * * * *

c * * * *

* I NTEGER FUNCTION OF DIFFERENT TYPES OF ARGUME NTS . USE IS MADE OF P4530060

* ADJUSTABLE D I MENS I ON (TEST 5,6,7) P4 5 3 00 70

FUNCTION MFI (AWVS, IWVI , AWVB . AWVC , AWVD , AW 1 S . AW2S , AW3S , I W 1 I.IW2I, P4530080

1 I W 3 I ,AW1B,AW2B.AW3B,AW1C.AW2C.AW3C,AW1D

DOUBLE PRECISION AWVD . AW 1 D , AW2 D . AW3D

LOGICAL AW V B , AW I B , AW2 B , AW3B

COMPLEX AWVC , AW 1 C , AW2 C , AW3 C

AW2D , AW3D , IWFI ) P4530090

P4530100

P 4 5 3 0 1 1 0 P4530120

DIMENSION AW1S( IWVI ) ,AW2S( IWVI . IWVI ) ,AW3S( IWVI , IWVI , IWVI )

1 IW1 I ( IWVI ). IW2I ( IWVI , IWVI >, IW3I ( IWVI , IWVI , IWVI ) 2 AW1 B( IWVI ) ,AW2B( IWVI , IWVI > ,AW3B( IWVI , IWVI , IWVI)

3 AW1 C( IWVI ) ,AW2C( IWVI , IWVI ) , AW3C< IWVI , IWVI , IWVI

)

P4530130

P4530140

P 4 5 3 0 1 5 6

P4530160

AW1D( IWVI ) ,AW2D( IWVI , IWVI ) , AW3D( IWVI , IWVI , IWVI ) COMMON BXVS

M F I = AWVS * * I WVI + AW1 S ( I WV I ) * * I W 1 I ( I WV I ) -AW2S (IWVI

P4530170

P4530180

P 4 5 3 6 1 9 0

1 ( I WVI , I WVI ) *AW3S< I WVI , I WVI , I WVI ) * * I W3 I ( I WVI , I WVI P4530200

I WVI ) * * I W2 I

, IWVI )-AWVD+

2 AW1D( IWVI )-AW2D( IWVI . IWVI )-AW3D( IWVI , IWVI , I WV I ) * BXVS * * I WF I ( AWVD ) P4 5 3 02 1 0

3 -1.0 P4530220

AWVB=IWVI .EO. 1 p 45 3 ©23

§

AWIB(IWVI) = IWVI .EO. 1 P4530240

AW2B< IWVI . IWVI ) = IWVI.E0.1

AW3B< IWVI , IWVI . IWVI ) = IWVI.E0.1

AWVC = AW1 C( IWVI ) +AW2C( IWVI , I WV I

) AW3 C < I WV I , IWVI ,Twv7)

RETURN

END ****************************************************************

*

* C F C C.P - < 16.4 ) ; *

i t t i I t i tt I I t I I i I t I t I I t t I I I I t t I I t I I I It t I I I H I I t I I t I t I t i I I t I I it t I I

* GENERAL PURPOSE ASA

* 1.T0 TEST COMPLEX FUNCTIONS IN FULL FORTRAN 8.3

P4530250

P4530260

P 4 5 3 0 2 7 0

P4530280

P4 5 3 02 90

**tpi640010

PI 6 4 0 620

P1640030

PI 640 0 40

***P1640050

RE FP1 640060

.1 P1640070

P1 640 680

P1640090

P1 6401 66

P16401 10

P 1 640120

P 1 640 1 30

P 1640 1 40

P1 6401 50

PI 640160

P1 6401 70

P1 640 180

P 1 640 1 90

P1 640200

P1 64021 0 P1 640220

P1640230

Pi 640240

P0013230

PO0 1 323 5 P0013240

C * * * *

C * * * *

c * * * .* c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * t *

c * * «

c * * * *

c * * * *

c * * * t

C t * «

c * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

2. DUMMY ARGUMENTS ARE REAL . I NTEGER . COMPLEX , LOG I CAL

,

DOUBLE PRECISION, EXTERNAL PROCEDURE, ARRAY NAME.

3. FUNCTIONS 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 DIMENTION

* 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 USES 8 COMPLEX FUNCTIONS

* THIS SEGMENT IS TO BE RUN WITH SEGMENTS

* 404, 414, 424, 434, 444, 454, 464

WHICH CONTAIN ALL FUNCTIONS BEING TESTED HERE

S P E C I F I C A f I 6 N S SEGMENT 164

* WHEN EXECUTING ONLY SEGMENT 164, THE SPECIFICATION STATEMENTS

* WHICH- APPEAR AS COMMENT CARDS MUST HAVE THE C =

NBS FORTRAN Test Programs Version 1
Ct*»*t IN COLUMNS 1 AND 2 REMOVED.

C t * * * * POO 1 3245

P0013250

C= DIMENSION A1S(5) ,A2S(2,2) ,A3S(3,3,3)

C= INTEGER 1 1 I (5) , 121 (2,2) , 131 (2,2,2)

P0013255

P0013260

C= LOGICAL AVB.A1B(2) ,A3B(2,2.2) ,A2B(2,2) ,BVB

C= DOUBLE PRECISION AVD , A1 D ( 4 ) , A2D ( 2 , 2 ) , A3 D ( 2 . 2 , 2 ) POO 1 3265

P00 1 32 70

C= COMPLEX AFC , BFC , CF C , DF C , EF C , F F C , HF C , AVC , BVC

C= 1.A1C(12).A2C(2.2).A3C<2,2.1>

P001 3275

P0 0 1 328 0 C= COMMON AXVS.CXVS

C= EXTERNAL BFC

POO 1 328 5 P001 3290

DIMENSION A1S(5),A2S(2,2),A3S(3,3,3)

INTEGER 111(5), 121(2,2). 131(2,2,2)

P 1 6 4 A

1

P164A2

LOGICAL AVB,A1B(2),A3B(2,2,2),A2B(2,2).BVB

DOUBLE PRECISION AVD , A 1 D ( 4 ) , A2 D ( 2 , 2 ) , A3 D ( 2 , 2 , 2 )

P 1 64A3

P1 64A4

COMPLEX AFC,BFC,CFC,DFC,EFC,FFC,HFC,AVC,BVC

1 , A1 C( 12) . A2C(2. 2 ) , A3C(2, 2 , 1 )

P 1 64A5

P164A6

COMMON AXVS.CXVS

EXTERNAL BFC

P 1 64A7

P 1 64A8

C * * * * * C***«* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

POO 1 3295

P 1 6402 5 0 c * * * * * C***** WHEN EXECUTING ONLY SEGMENT 164, THE STATEMENT NUVI = 6

P0072680

P0072685

C***** MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED,

c * * * * * P0072690

P0072695

C= NUVI = 6

NUVI = 6

P0072700

P164B1

c * * * * * WRITE(NUVI . 1641

)

P0072705

P1 640260

1641 FORMAT ( 1 H 1 ,1X,31HCFCCP - (164) COMPLEX FUNCTI0NS//2X,

1 2 1 H ASA REFS. 8 . 3 . 1 , 8 . 3 . 2 / / 2X , 7HRESULTS)

P1 640270

P1640280

C* * * * * TEST 1 BVC=AFC( 1 .0)

P 1 640290

P1640300

MAVI = 1 WRITE(NUVI , 1642) BVC, MAVI

P 1 6 4 0 3 1 0 P1 640320

1 642 FORMAT ( 1 HO . 2F5 . 1 ,9H -- TEST .I2.20H POSITIVE IF 0 C* * * * * TEST 2 .0.0.0) P 1 640330

P1 640340

MAVI=2

BVC= BFC(1 )-(1 .0,1.0)

P1640350

P1640360

WR I TE < NUV I , 1 642 ) BVC , MAVI

C* * * * * TEST 3

P1 640370

P1640380

MAVI =3

A1S(1 ) = 1 .0

PI 640390

P1640400

A1S(2) = 1 .0

BVC=CFC(A1S)

P1640410

P1 640420

WR I TE ( NUV I . 1642)BVC,MAVI ' C****» TEST 4P 1 640 43 0 P 1 640 440

MAVI=4

BVC = DF C (1 .DO)

P 1 640 4 5 0 P1 640460

WR I TE ( NUV I . 1642)BVC,MAVI

C*****TEST 5

P1 640470

P 1 640 480

MAVI = 5 AVC=(1 .0,1.0)P1 640490

P1 640500

BVC=EFC(AVC)

WR I TE ( NUV I , 1642)BVC,MAVI

P 1 640 5 1 0

. P1640520

C ***** TE ST 6

MAVI =6

P 1 640530

P 1 640 5 40

AVB= . TRUE . BVC = FFC(AVB)-( 1 .0,1 .0)

P 1 640 5 5 0 P 1 640 56 0 WR I TE ( NUV I , 1642)BVC,MAVI

C* * * * * TEST 7

P 1 640 5 70

P 1 640 5 8 0 MAVI=7

AVB= . FALSE .

P 1 640 590

P 1 6 4 0 6 0 0 BVC=FFC(AVB)

WR I TE ( NUV I

, 1642)BVC,MAVI

P1 64061 0 P1640620

C* * * * * TEST 8,9,10

I V I = 1

P1 640630

P1 640640

AVD=1 . 0D0

A1D(1 )=1 .000

P 1 64065 0 P 1 640660

NBS FORTRAN Test Programs Version 1 1 49
A2D< 1 , 1 > = 1 .ODO P1640670

A3D( 1 , 1 . 1 ) = 1 .000 P1640680

AVS=1 .

0

P1640690

A 1 S < 1 ) = 1 . 0 P1640700

A2S( 1 , 1 ) = 1 .0 P1640710

A3 S < 1 , 1 , 1 ) = 1 .0 P1640720

A1 C( 1 ) = ( 1 . 0 , 1 . 0) P1640730

A2C( 1 , 1 ) = ( 1 . 0 , 1 . 0) P1640740

A3C( 1 , 1 , 1 ) = ( 1 . 0 , 1 . 0) P 1 640750

111(1) =

1

P1640760

121 ( 1 , 1 ) = 1 P1640770

I 3 I ( 1 , 1 , 1 ) = 1 P1640780

AVC = (0.0,0.0) P1 640790

BVC= HFC(AVS, I VI , AVB , AVC , AVD ( A1 S , A2S A3S, I 1 I , 121 , 131 ,A1B,AZB f A3B, P1640800

1A1 C, A2C,A3C,A1D,A2D,A30, BFC) P 1 6408 1 0 MAVI = 8 P1640820

WRITE (NUVI,1642) BVC.MAVI P1640830

MAVI =9 P1640840

IF(AXVS) 1643,1644,1643 P1640850

1648 MAVI = 10 P1640860

BVB=AVB.AND.A1B(1).AND.A2B(1,1).AND. A3B( 1 , 1 , 1 ) P1640870

IF (BVB) GO TO 1644 P1640880

1643 WR I TE ( NUVI , 1645) MAV I P1640890

GO TO 1647 P1640900

'1 644 W R I TE ( N U V I , 1 646 ) MAVI P1 64 09 1 0

1 64 5 FORMAT < / 1 5X , 5 HTEST .I2.12H IS NEGATIVE) P1 640920

1 646 FORMAT ( / 1 5 X , 5 HTEST , 12, 12H IS POSITIVE) " P 1 6 4 0 9 3

0

1647 IF (MAVI - 9) 16 4 9,1648,1649 P1640940

16 4 9 CONTINUE P 1 6 4 09 5 0 C***** END OF TEST SEGMENT 164 P1640960

C*"*"*"t"*' WHEN EXECUTING ONLY SEGMENT 164, THE STOP AND END CARDS P1 6 4 0970

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1640980

C* "*"*"** I N COLUMNS 1 AND 2 REMOVED . P1 640990

C= STOP P1 641 000

C= END PI 641 01 6 STOP P164C1

END P164C2

C*********************************************t*********t***************P4040010

C"*"*"*"*"* P 4 0 4 0 0 2 0 Z***t* AFC - (404) P4040030

C * * * * * P 4040040

C******************************************************

C * COMPLEX FUNCTION OF REAL ARGUMENT (TEST 1 ) P4040060

COMPLEX FUNCTION AFC(AWVS) P4040070

AFC = (-1.0,0.0 ) + A W V S P 40 4 00 80

RETURN P4040090

E N D P 4 040 1 00

C****t*itt*tttttt*tt*ttttttttt**tttitttttttttt*ttitttt*ttttttttttttttttttttPb]itQQ'\Q

C"*"* *"*"» P 4 1 4 0 020

C****» BFC - (414) P4140030

C» * * * * p 4 1 4 0 0 4 0 [!-.ii»»i»ti(M»mttt»>tttiitittii«nitinit»tiim»!n»<it»«ttttt»it»»»P4H0050

C* * * * * COMPLEX FUN CT I ON OF I NTEGER ARGUMENT ( TEST 2 ) P4 1 40 060

COMPLEX FUNCTION BFC(IWVI) P4140070

B F C = ( 1 . 0 , 1 . 6 ) * * I W V I P4 1 4 00 8 0 RETURN P4140090

END P 4 140100

C*t*******************************t*************************************P4240010

C* "i "* "* « p 42 40 o 20

C***»*- CFC-(424) P4240030

C. * * P 4 2 4 0 0 4 0 Ct*******************t***************t**********************************P4240050

C * * * * * COM PL E X FUNCTION OF ARRAY NAME (TEST I") P 4 240 060

COMPLEX FUNCTION CFC(AW1S) P4240070

DIMENSION AWTS(2) P 42 40 0 80

CFC = (2.0,0.0)-AW1S(1 )-AW1S(2) P4240090

RETURN P 4 2 40 1 0 0 END P 4 2 4 0 1 1 0

150 NBS FORTRAN Test Programs Version 1
C******t*t******»*****»t********t t** **************»******«**4*******P4340010

C***** P4340020

C * * * * * D F C - ( 434 ) P4340 03 0 C* *.* * * P43 4P04P

C*********************t*********»***********4**********t**t**********»**P4340050

C*****COMPLEX FUNCTION OF DOUBLE PRECISION ARGUMENT (TEST 4). P43 40 0 60

CO MP LEX F U NCf'i 0 N D FC(AWVD) ""' P 4 3 4 0 0 7 0 DOUBLE PRECISION AWVD P4340080

AVS

DFC

= AWVD

: (1.0.1 0) AVS (1.0,1.0)

P4340090

f*U£ P4340 1 00

P 4 3 4 0 1 1 0 P 43 40 1 20

[H«HHlltt*tHttttt*lltttI**ttttt*«ilt«««ttli*tlt**(ltttttt*ll>*lllll*«ttttlllP4U0010

RETURN

END

C * * * * * P4440020

C****» EFC - (444) P4440030

C* * * « * P 4 4 4.0 04

0

C***********************************************************************P4440050

C*****COMPLEX FUNCTION OF COMPLEX ARGUMENT (TEST 5) P4440060

""COMPLEX FUNCTION EFC(AWVC) P4440070

COMPLEX AWVC P4440080

E F C = AWV C - ( 1.0, 1.0) P 4 4 4 0 0 9 0 RETURN P4440100

END P4440110

Q***********************************************************************p^.540010

C P4 5 4 0 02 0 C***** FFC-(454) P4540030

C* *"*'* P4 5 400 4 0 C*****COMPLEX FUNCTION OF LOGICAL AR G U M E N T ( TE STS 6.7) P4540050

COMPLEX FUNCTION FFC(AWVB)

LOGICAL AWVB

IF (AWVB) GO TO 45 4 1 4540 IF (.NOT. AWVB) GO TO 4542

RETURN

4541 FFC = (1.0.1.0)

GO TO 4540

4542 FFC = (0.0.0.0)

RETURN

END

P4540060

P4540070

P4540080

P4540090

P4 5 401 0 0 P 4 5 4 0 1 1 0 P45 401 20

P45401 30

P 4 5 4 0 1 4 0 P45401 50

C************t**»**t***»**********)i***t********«**********»***«»t «** P4640010

C***«* P4640020

C * * * * * HFC - (464)

C * * * * * C***************t**************«***t*»***»

C*****COMPLEX FUNCTION OF DIFFERENT TYPES

COMPLEX FUN Cf I ON HFC (AW V S . IWVI , AWVB

1 IW1 I , IW2I . IW3I .AW1B.AW2B.AW3B.AW1 C.

D I MENS I ON AW 1 S ( IWVI), AW 2 S ( IWVI , IWVI

1 IW1 I ( IWVI ). IW2I ( IWVI , IWVI

2 AW1B( IWVI ) ,AW2B( IWVI , IWVI

3 AW1 C( IWVI ) ,AW2C( IWVI , IWVI

" 4' AW1D( IWVI ) ,AW2D( IWVI , IWVI

COMMON BXVS

*************************

OF ARGUMENTS (TESTS 8.9,1

, AWVC, AWVD, AMI S. AW2S, AW3S

AW2C.AW3C. AW1D.AW2D.AW3D,

) ,AW3S( IWVI , IWVI , IWVI )

,

) , IW3I ( IWVI . IWVI , IWVI )

,

) ,AW3B( IWVI , IWVI , IWVI)

,

) ,AW3C( IWVI , IWVI , IWVI ) ,

) ,AW3D( IWVI , IWVI , IWVI )

P4640030

P4640040

* * * * * P46400 5 0 0 P4640060

P 4 6 4 0 0 7 0 AWFOP4640 08 0 P4640090

P4640 1 00

P 4 6 4 0 1 1 0 P4640 1 20

P4640 1 3 0 P4640 1 40

LOGICAL AWVB,AW1B,AW2B,AW3B P4640150

COMPLEX AWVC.AW1 CAW2C.AW3C, AWFC P4640 1 60

DOUBLE PRECISION AWVD . AW1 D . AW2D , AW3D P46401 70

HFC = AWVC P4640180

BXVS = AWVS* * IWVI + AW 1 S ( I WV I ) « * I W 1 I ( I W V I ) - AW2 S ( I WV I , I W V I ) * * I W2 I P4640 1 90

1 ( IWVI , IWVI ) +AW3S( I WVI , I WVI , I WVI ) * * I W3 I ( I WVI , I WVI , I WVI ) -AWVD+ P464020 0 2 AW 1 D ( IW V I) - AW 2 0 ( I W V I, I WVI ) -AW 3D(I W V 1,1 WVI, IWVI) P 4640210

AWVB = IWVI .EO. 1 P4640220

AW 1 B( IWVI ) = IWVI .EQ. 1 P4640230

AW2B( IWVI , IWVI ) = IWVI .EQ. 1 P4640240

AW3B( IWVI

RETURN

IWVI , IWVI

)

IWVI .EO.

1

C * * • 1

1

END OF TEST SEGMENT 464

END

P4640250

P4640260

P4640270

P4640280

C************»******************t*******t»************»***tt**«**»**ttt*pi650010

C*t*«* P1650020

NBS FORTRAN Test Programs Version 1 151
c * * * *

c * t * *

c * * * *

c * * * t

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

c = c=

c'= c=

c=

c=

c =

DPF CP- ( 165

)

ItttlHittttiHttltltlttlHllltttltllittlltltlttttlttlllttlttttltt

* GENERAL PURPOSE

* 1 .TO TEST DOUBLE PRECISION FUNCTIONS IN FULL FORTRAN 8.3.

* 2. DUMMY ARGUMENTS ARE REAL, INTEGER, COMPLEX, LOGICAL,

* DOUBLE PRECISION, EXTERNAL PROCEDURE , ARRAY NAME

* 3. FUNCTIONS CONTAIN UP TO 20 ARGUMENTS

* On reference, ACTUAL ARGUMENTS are variableiname,

* array name, array element name, or ARITHMETIC EXPRESSION. 8.3.

* RE STRICT I ONS OBSERVED

* 1 . ITEMSC2) , (3) , (4) , (5) , <6> OF PARAGRAPH 8.3.1

* 2 LAST SENTENCE OF PARAGRAPH 3.2

* THIS SEGMENT IS TO BE RUN WITH SEGMENTS

* 40 5, 4 1 5, 42 5 . 43 5, 44 5 , 45 5 , 46 5 , 475

* WHICH CONTAINS ALL FUNCTIONS BEING TESTED HERE.

SPECIFICATIONS SEGMENT 165

when executing only segment 165, the specification statements

"which appear as comment cards must have the c=

in columns 1 and 2 removed.

P1650030

P1650040

* P 1 6 5 0 0 5 0

P1650060

1 P 1 6 5 0 0 7 0 P1650080

P I 650096

P 1 6 5 0 1 00

P 1 6 5 0 1 1 0 2P 1 6 5 0 1 20

P 1650 fib"

P1650140

P 1 6 5 0 1 5 0 P 1 6 5 0 1 60

P1 650 170

P 1 65 0 1 80

PI 6 5 0 1 9

6

P1650200

P 0 0 1 3 3 0 0 P0013305

P 6 C11 3310

P 0 0 1 3 3 1 5 POO 1 3320

P0013325

POO 1 3330

P0013335

P0013340

P0013345

P0013350

P0013355

P 0 0 i 3 3 6 0

. P165A1

pi65A2

P165A3

P165A4

P165A5

P165A6

P165A7

P165A8

P0013365

PI 65-0210

P0072710

P0072715

P0072720

P0072725

P165B1

P1650220

P1650230

Pi 650240

P1650250

P 165 0260

P1650270

P1 6 50280

P1650290

P1650300

P1650310

Pi 6 5 0320

P1650330

P 1 6 5 0 3 4 0 P1650350

PI 6 50360

P1650370

pi 6's 03 id

P1650390

P1 65 0400

P 1 6 5 0 4 1 0 P 1 6 5 0 4 2 0 P1650430

DIMENSION A 1 S ( 5 ) ,A2S(2,2) ,A3S(3

INTEGER M I ( 5 ) , I 2 I ( 2 , 2 ) , I 3 I ( 2 , 2 LOGICAL A1B(2) ,A2B(2,2) ,A3B(2,2

DOUBLE 'PRECISION AFD , BFD, CFD,

1 , A1D(4) ,A2D(2,2) ,A3D(2,2,2>

COMPLEX AVC,A1C<12) ,A2C(2,2) ,A3C(2

COMMON AXVS, CXVS

3,3)

2)

2) ,AVB, BVB

DFD, EFD, FFD GFD, HFD.AVD

2,1)

EXTERNAL CFD, AFD

DIMENSION A1S(5) ,A2S(2,2> ,A3S(3

INTEGER 1 1 I ( 5 ) , I 2 I ( 2 , 2 ) , I 3 I ( 2 , 2 LOGICAL A1B(2) ,A2B(2,2) ,A3B(2,2

DOUBLE PRECISION AFD, BFD. CFD,

1 , A1D(4) ,A2D(2,2) ,A3D(2,2,2)

.3,3)

,2)

,2) ,AVB, BVB

DFD, EFD, FFD, GFD, HFD.AVD

COMPLEX AVC,A1C(12),A2C(2,2),A3C<2,2,1)

COMMON AXVS, CXVS

EXTERNAL .CFD, AFD

C * * * *

c

* t * *

c * * * t

c * * * *

c * * * *

c"=

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 165, THE FOLLOWING STATEMENT

NUVI MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = 6 NUVI = 6 WRITE (NUVI , 1650)

F 0 RMAT ( 1 H 1 ,1X,30HDPFCP - (165) DOUBLE PRECISION/ 16X, 9HFUNCTI0NS

1 //2X.21HASA REFS. 8 . 3 . 1 , 8 . 3 . 2 / / 2X , 7HRESULTS)

* TEST 1

1650

C * * * * MAVI = 1 IVI = A F D ( 1 .0) - 1 .000

IF (IVI) 1652,1653,1652

TEST 2 MAVI =2

I V I = B F D ( 1 )-1 .000

I F ( I V I ) 1 6 5 2, 1 6 5 3 , 1 65 2 TEST 3 MAVI =3

AVD=1 . ODO

I VI = CFD( AVD)-1 . ODO

IF( IVI ) 1 652 , 1 653 , 1 652

* TEST 4 .ONE ARGUMENT IS ARRAY

MAVI =4

a v c = ( i . b , i rd ) A1 C(1 ) = (1 .0,-1 .0)

IVI=DFD(AVC, A1 C(1 ) ) IF (IVI) 1652,1653,1652

C * * * * 16 5 7

C * * * t * 16 5 8

C * * * * 1659

ELEMENT NAME

152 NBS FORTRAN Test Programs Version 1
rtttti TEST 5 6 P1650440

7014 # V 1 ~ IIHAVI * v 4 =5ar P 1 6 5 0 4 5 0 AVB = TRUE pir i 650460 u j v t u v

I4 VIv 1 =EFD(AVB)-1 W 1 la* \ n ¥ W / I o ODO V \f V pi 65 04 70

I F (I Vi ) 1 652 1653 1652 Pr 11 6\J 5J 0y 4*t 8o 0w 7015 MAVI = 6 P1 11 6W 5J 0V 490 ~ / V/ AVB= . FALSE

.

P 1 6 5 0 5 00

IVI =EFD(AVB) P 1 6 5 0 5 1 0

I F ( I VI ) 1 652 . 1 653 . 1 652 p i 6 5 0 5 2 0 [itttt TEST 7 IP 11 6W 5J 0V 5af 3J 0V 7016 MAVI = 7 P 1 65 0 5 40

IVI if* = FFD 1 1 V (\ 11 •. E0ha V J, AFD ' 1 1 1/ )/ - 11 • ODO V V V P 1 6 5 0 5 5 0 IF (IVI) 1652.1653.1652 P 1 6 5 0 5 60

C***t* TEST 8 P 1 6 5 0 5 70

7017 MAVI = 8 P 1 6 5 0 5 80

A1I i I D\J <\ 1\ )/ = 1lavODOW V P1 650590

A1D(2)=-1 ODO P1 1I 6VJ 5J 0V 6tj 0V 0V IVI = GF D < A 1 D

)

P 1 6 5 06 1 0 IF (IVI) 1652.1653.1652 P 1 6 5 0 62 0 r*W * * * * TESTS IIh W 1 w 9,10.11.12 /JIVfllJI 4h P1 650630

7018 I AV I = 1 P 1 6 5 0 6 40

AVD=1 ODO P11 1 650650 V J V v/ J V A1 D ( 1 r\ 1 \ l/) = 1l a ODO V 1/ V Pi 1i 6\j 5j 0\j 6\j 6\j 0\/ A2D n L 1/ (\ 11 f

. 11 r) = 11 • ODO V la* V P 1 6 5 0 6 70

A3D ( 1 1 1)= 1 ODO P 1 6 5 0 6 X 0 AVS = 1 . 0 P 1 650690

A1 S ( 1 ) = 1 . 0 P 1 6 5 0 700

A2S ( 1 . 1 ' * '— w V 1

(j 1 )/ = 1laV0 P 1 6 5 0 7 1 0 A3 S ( 1 1 1 ) = 1 0 p i 6 5 0 7 2 0 A1 C ( 1 l\ 1 \ 1 )' = (\ 11 • 0.1 V f

1 a 0)V / P 1 6 5 0 73 0 A2n C— Cw (* 1If. 11/) = (\ 11 o 0.1 v q lav/0 ) P 1 6 5 0 74 0 A3f\ ^ Cw (\ 1' ,0 1' ,0 11') = (* 1lawj0.11 a 0V )/ P 1 6 5 0 7 5 0

I 1 I ( 1 ) = 1 P 1 6 5 0 76 0

I 2 I ( 1 1 ) = 1 P1 11 6w 5J 0V 7* 7/ 0V 13 1(1 1 1 ) =

1

p1 i1 6W 5J 0V 7/ 8tj 0w MAVI = 9 P 1 6 5 0 790

IVI=HFD(AVS i ¥ i Ni y \ # * * w f IAVI.AVB i n ¥ i | n * u f AVC ** v w f AVD /» ¥ Lr f A1S *» i w / A2S.A3S.I1I. n ! w |

» » «/ w f i i • $ 121. i c i f 131 . A1 B . A2B . A3 B . P 1 6 5 0 8 0

0

1^1 ffvlUfrtaaUfri^Ufl 1 w \/ w V v 1A1C A2C A3C A1D.A2D A3D CFD) P 1 6 5 08 1 0 IF (IVI) 1652 1653 1652 P1 650820

7019 r v i / MAV ii n ¥ 1=10 1 IV P 1 6 5 0 83 0

IA V¥ I1 = AXVS f \ /\ ¥ W P1 11 6w 5-/ 0V 8t—' 40* v IF (IVI) 1652 1653 1652 P 1 6 5 0 8 5 0 7020 ' W (_ V MAV 1 In T i1=11ii P1 11 6\J 5J 0V 8\J 6\J 0V WRITE n it i i u. (NUVI >nw¥if 1656) i \j j \j / AVC n ¥ w f MAVI i i n ¥ i P1 11 6w 5^ 0V 8V 70I V 1656 1 \J J V F0RMAT(//2F5 1 W l \ 1 I fl l\fft»l^al//W'\f^llll»wl 1//2X 5HTEST a I2.31H b (— 6 J III ISi w POSITIVE 1 w w 1 i v I F NUMBERS PRINTED/ P1650880

11 2X.17HAB0VE l— f\ o 1 / 1 1 M U W ¥ ha ARE f \ l \ L 0VaWfVaV/ 0 0 0) P1 650890

7021 J V S— 1 MAV II f > ¥11=121 t_ P1 11 6W 5J 0W 9/ V0 0V BVB u ¥ u = #AVB \ i u AND n i*k/ • A1B(1) n u » i / AND n n 1/ A2B(1 ' » t_ u v if 1)i / * ANDn i/ t nA3B(1.1 ^ u \ if i . 1 ) P 1 6 5 09 1 0

IIF (\ BVB LJ v U )/ GOUw TOIW 1653 1 U J J P1 650920

1652 WR I TE ( NUV I . 1 65 4 ) MAV

I

1 w V t— ¥¥l\ll^\l¥U¥lf 1 W -J • / 1 1 ' 1 ¥ 1 P 1 6 5 093 0 GO TO 16 5 1 P 1 6 5 0 9 4 0 1653 WR I TE ( NUV I . 1 65 5 ) MAV

I

1 \J J -J ¥¥l\ill_\l¥W*lf 1 V V ^ ' 1 1 M ¥ 1 P1 650950

1654 1 *d J * F0RMAT(/2X I U M 1 1 n 1 \ /t./\ i)_flllL_OI 5HTEST flkf I2.12H 1 i— 1 1 IS1 w NEGATIVE) 11 U U / > 1 i V 1— ' P1I 1 650960 w J V / W V 1655 FORMAT (/2X.5HTEST ,I2,12H IS POSITIVE) P1650970

1651 GO TO (1657,1658,1659,7014,7015,7016,7017,7018,7019,7020,7021, P1650980

1 7022) ,MAVI P1650990

7022

C * * * *

c * * * * c * * * *

c * * * * c=

c=

CONTINUE

* END OF TEST SEGMENT 165

* WHEN EXECUTING ONLY SEGMENT 165, THE STOP

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

* I N COLUMNS 1 AND 2 REMOVED

STOP

END

STOP

END

»t*>*ttt>tf<tt>«*ttt»ttt*t*t*ttt»ttttt!t»*t<»tttt><<i»«<a»!t*>Kt*9

P 1 6 5 1 0 0 0 P 1 6 5 1 0 1 0 PI 6 5 1 0 2 0 P 1 6 5 1 0 3 0

" "P 1 6 5 1 0 4 0 P 1 65 1 0 5 0 P 1 6 5 1 0 6 0 P165C1

P165C2

*P4050010

P4050020

P4050030

AND

C = END CARDS

C t * * *

ii * * * *

c * * * * AFD - (405)

NBS FORTRAN Test Programs Version 1 153
C****» P40 50040

C*t***t»*ttt««t*******t*tttttttttt»ttt*»ttt»tt*«t***tt***t****tit«tttt*tP4050P50

C*****D0UBLE PRECISION FUNCTION OF REAL ARGUMENT (TEST 1) P4050060

DOUBLE PRECISION FUNCTION AFD(AWVS) P4050070

AFD=AWVS P4050080

RETURN P4050090

END P40501 00

»***t**t* *»****«t»»» »** »t**»»****t*»t*»*tt«**P4i50010

c * * * * * P41 50020

c * * * * * BFD -(415) P4150030

c * * * * * P41 50040

[tt*tt«*<t*Mtttt**«ttti**tttttt«tl**t**tt<tMMtttt«ittlll«tttt*t«tttMP^150050

C*****D0UBLE PRECISION FUNCTION OF INTEGER ARGUMENT ( TESTZ ) P4150060

DOUBLE PRECISION FUNCTI ON BFD(IWVI) P4150070

B F D = 1 . 0D 0 * * I WV

I

P41 50080

RETURN P4 1 5 0 090

END P41 50100

P4250020

c * * * * * CFD - (425) P4250030

c * * * * * P4250040

FUNCTION OF DOUBLE PRECISION ARGUME NT ( TEST 3) P4250060

DOUBLE PRECISION FUNCTION CFD(AWVD) P4250070

DOUBLE PRECISION AWVD P4250080

CFD=AWVD P4250090

RETURN P4250100

END P42501 1

0

P4350020

C t * t * * DFD -(435) P4350030

c * * * t * P4350040

FUNCTION OF COMPLEX ARGUMENT ( TEST 4) P4350060

DOUBLE PRECISION FUNCTION DFD (AWVC . BWVC) P4350070

COMPLEX AWVC , BWVC , CVC P4350080

CVC =BWVC*AWVC P4350090

DFD=AIMAG( CVC) P4350100

RETURN P43501 1 0 END P4350120

P4450020

c * * * * * EFD - (445) P4450030

c * * * * * P4450040

t*t*t*t** »*t***t*t*«tt****t»**********t«tt*»*****P4450050

C*****D0U8LE PRECISION FUNCTION OF LOGICAL ARGUMENT(TEST 5,6) P4450060

DOUBLE PRECISION FUNCTION EFD(AWVB) P4450070

LOGICAL AWVB P4450080

4 4 5 0

445 1

4452

IF(AWVB) GO TO 4451

I F ( . NOT. AWVB) GO TO 4452

RETURN

EFD = 1.000

GO TO 4450

EFD = 0.0D0

RETURN

END

P4450090

P4450100

P 4 4 5 0 1 1 6 P44501 20

P 4450130

P44501 40

P 4 4 5 0 1 5 0 P44501 60

C*********t***************t*********t*******t***********t*t****t**t*t***P4550010

C***«* P4550020

C * * *"*"* FFD - ( 45 5 ) P 4 5 5 0030

C** * ** P45500.40

C*****» t** *t«***ttt*»t**»***t**«*******»*****tt»*tt****t*******« P4550050

C** ***DOUBLE PRECISION FUNCTION OF EXTERNAL PROCEDURE (TEST 7) P4550060

" P4550070

P4550080

P4550090

P4 5 5 0 1 0 0 P4 5 5 0 1 1 0 C*t****************************t**t t** ***ttt t** t****************P4650010

litttHttittttltiltlttttltltlHtiHlllltliltttllilllttltlllllit

**DOUBLE PRECISION FUNCTION OF EXTERNAL PROCEDURE (TEST 7)

DOUBLE PRECISION FUNCTION FFD(BWVS.BWFD)

DOUBLE PRECISION BWFD

FFD = BWFD (BWVS)

RETURN

END

»ttttllltt(*tttt*t*ltltttttittttlttttllt»**l*i*«Htt*t*ttltltl

154 NBS FORTRAN Test Programs Version 1
C«**** P4650020

C****« GFO - ( 465 ) P4650030

C"*"*

"*'*" * P 4650040

C*****t t** **t*****«t**********t#**********i»tt t** ***t**«»*»**4j(**P4650050

C* * * * *DOUBLE PRECISION FUNCTION

DOUBLE PRECISION FUNCTION

DIMENSION AW 1 D ( 2 ) DOUBLE PRECISION AW 1

D

OF ARRAY

G F D ( AW 1 D ) NAME (TEST 8) P4650060P4650070

P 4 6 5 0 0 8 0 P4650090

P46501 00

P46 5 0 1 1 0 P 4 6 5 0 1 2 0

GFD = AW1D( 1 )+AW1D<2)

RETURN

END

C*»»»*******«*»********************************************»******ir*****P4750010

C '*"*"*"*"* P475 00Z0

C****« HFD - (475) P4750030

C"*" *'"*"*"* P 4 7 5 0 0 4 0 [ i n 1 1 « 1 1 » » i i < i i 1 1 1 1 i 1 1 i i i i i 1 1 i i 1 1 i n i t > i 1 1 i i i i i i n < i i i i ! i t i i i i i i i i 1 1 i i i p / s ij ; 5 5

IWVI

I WVI

I WVI

I WVI

I WVI

IWVI)

IWVI)

IWVI)

IWVI)

IWVI)

C*****DOUBLE PRECISION FUNCTION OF DIFFERENT TYPES OF AR G U M E N T S . U S E CAN

C* * * * * BE MADE OF ADJUSTABLE D I MENS I ON . SOME ARGUMENTS CAN BE PASSED

C ***** THRO U GH A COMMON STATEMENT.

DOUBLE PRECISION FUNCTION H F D ( AWVS . I WV I , AWVB , AWV C , AWVD , AW 1 S , AW2 S

,

1 AW 3 S , I W 1 I' . I W 2 1 , I W 3 I , A W 1 B , A W 2 B , A W 3 B . A W 1 C , A W 2 C , A W 3 C , A W 1 D , A W 2 D , 2 AW3D.CWFD)

DIMENSION AW1S( IWVI ) ,AW2S( IWVI , IWVI ) ,AW3S( IWVI

1 IW1 I ( IWVI >, IW2I ( IWVI . IWVI ) , IW3I ( IWVI

2 AW1 C( IWVI ) ,AW2C( IWVI , IWVI ) ,AW3C( IWVI

3 AW1D( IWVI ) ,AW2D( IWVI , IWVI ) ,AW3D( IWVI

4 A W 1 B ( I W V I ) , A W 2 B ( IWVI , IWVI )

, A W 3 B ( IWVI

DOUBLE PRECISION AWVD , AW 1 D , AW2D , AW3D , CWFD

COMPLEX AWV C. AW1 C , AW2 C , AW3

C

REAL AW 1 S , AW2S , AW3S

LOG I CAL AWVB , AW 1 B . AW28 , AW3B

COMMON BXVS

HFD = AWVD - A W 1 D ( IWVI )+AW2D( IWVI , IWVI )-AW3D( IWVI , IWVI , IWVI )

1 CWFD(AWVD) - 1.0D0

AWVC = AW1 C( IWVI ) +AW2C( IWVI , IWVI ) -AW3C( I WV I. I W V I , I WV I ) - ( 1 . 0 , 1 .6)

BXVS = AWVS* * IWVI -AW1S( I W V I ) * * I W 1 I ( I W V I

) + AW 2 S ( I W V I . I W V I ) * * I W2 I

i ( I W V I , I W V I ) - A W 3 S ( I W V I , I W V I , IWVI ) *"*

I W 3 I ( IWVI , IWVI , IWVI ) AWVB=IWVI . EQ .

1

AW 1 B ( I WV I ) = I WV I . EO . 1 AW2B( IWVI , IWVI ) = I W V I .EO. 1 A W 3 B ( IWVI . I W V I , I WVI ) = IWVI

RETURN

EO . 1

END

P4750060

P4750070

P47500 80

P4750090

P 475 01 0 0 P 47 5 0 1 1 0 P 47 5 01 2 0 P47501 30

P 4 7 5 0 1 4 0 P47501 50

"P 4 7'50160

P47501 70

P47 5 0 1 8 0 P47501 90

P 475 020 0 P475021

0

P47 5 022 0 P4750230

P 4750240

P4750250

P4750260

P4750270

P 4 7 5 0 2 8 0 P4750290

P475 03 00

P 47 5 03 1 0 P4750320

C***********************************************************************P1660010

C '*"**'*"*' P 1 6 6 0 0 2 0 C***** BFCCP-(166) P1660030

C"*"*"*"*"* P 1 660040

C*******************t*********t**tt********t**t*tt***t**t*t*t*t**t*****tpi660050

C***«* GENERAL PURPOSE

C«**** 1.TO TEST LOGICAL FUNCTIONS IN FULL FORTRAN

C

*'*"*"*"* 2 DUMMY AR G U M E NT S ARE REAL , I NTEGER. COMPLEX. LOGICAL.

C***«* DOUBLE PRECISION, EXTERNAL PRO CEDURE . ARRAY NAME.

C * * * * *

C * * * * *

c * * * * *

c * * * * *

c * * * * *

c * * * * *

3. FUNCTIONS 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 ME NT I ON

7. ARGUMENTS CAN BE PASSED THROUGH COMMON

C * * * * *RESTR I CT I ONS OBSERVED

C****« 1 . ITEMS(2) , (3) , (4) , (5) , (6) OF PARAGRAPH

Ct*»*« 2. LAST SENTENCE OF PARAGRAPH 3.2

C***«* THIS SEGMENT IS TO BE RUN WITH SEGMENTS

C

*"*"*"*'* 4 06 , 41 6 . 426 , 43 6 , 4 46 . 4 56 , 4 66 , 4 76

C***«* CONTAINS ALL FUNCTIONS BEING TESTED HERE

C ***** LOG I CAL FUNCTION OF REAL ARGUMENT ( TEST 1)

C * * * * * C

*"*'"*" t"t S P E C I F I C A f 1 0 N S S E G M E N T 16 6

C * * * * *

WH I CH

P1 660060

P1 660070

P1 660080

P1 660090

PI 66 0 1 0 0 P1 660 1 1 0

P 1 660 1 20

P1 6601 30

P 1 660 1 40

P1 660 1 50

P 1 6 6 0 1 6 0 P16601 70

P 1 660 1 80

P1 6601 90

P1 660200

P1 66021

0

PI 660220

P1 660230

P1 660240

P001 3370

NBS FORTRAN Test Programs Version 1 155
C***»* WHEN EXECUTING ONLY SEGMENT 166, THE SPECIFICATION STATEMENTS

C***«* WHICH APPEAR AS COMMENTS MUST HAVE THE C=

P0013375

a* A a m mm a a a P001 3380

C***** IN COLUMNS 1 AND 2 REMOVED.

c * * * * * P0013385

ff^ A A A *» »J 4% A P001 3390

C= DIMENSION A1S(5) ,A2S(2,2) ,A3S<3.3.3>

C= INTEGER I 1 I ( 5 )

, I 2 I ( 2 , 2 )

, I 3 I ( 2 , 2 , 2 ) P0013395P001 3400

C= LOGICAL AVB,AFB,BFB,CFB,DFB,EFB,FFB,GFB,HFB

C= 1, A1 B ( 2 ) , A2B ( 2 , 2 ) , A3B ( 2 , 2 , 2 ) P0013405

A AAA t A A POO 1 34 1

0

C= DOUBLE PRECISION AVD , A 1 D ( 4 )

, A2 D ( 2 , 2 ) , A3 D ( 2 , 2 , 2

)

C= COMPLEX AVC , A1 C ( 1 2 ) , A2 C ( 2 , 2 ) , A3 C ( 2 , 2 , 1 ) P001341

5

POO 1 3420

C= COMMON AXVS.CXVS

C= EXTERNAL AFB

P0013425

r\ a a a am * w a POO 1 3430

DIMENSION A1S(5),A2S(2,2),A3S(3,3,3)

INTEGER 111(5). 121(2, 2), 131(2. 2,2)

P166A1

P1 66A2

LOGICAL AVB,AFB,BFB,CFB,DFB,EFB,FFB,GFB,HFB

1, A1 B ( 2 ) , A2B ( 2 . 2 ) , A3B ( 2

, 2 , 2

P166A3

P1 66A4

DOUBLE PRECISION AVD , A1 D ( 4 ) , A2D ( 2 , 2 ) , A3D ( 2 , 2 , 2

)

COMPLEX AVC,A1C(12),A2C(2,2),A3C(2,2 < 1)

P166A5

P1 66A6

COMMON AXVS.CXVS

EXTERNAL AFB

P166A7

P1 66A8

c * * * * * C**«tt OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P0013435

P1 660250

c * * * * * C****« WHEN EXECUTING ONLY SEGMENT 166, THE FOLLOWING STATEMENT

P0072730

P0072735

C***** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

.

C= NUVI = 6 P0072740

P0072745

NUVI = 6 MAV I = 1 P166B1

n 4 / / A O / A P 1 660260

WRITE(NUVI ,1 662 ) 1662 FORMAT ( 1 H 1 .1X.31HBFCCP - (166) LOGICAL FUN CT I ONS / / 2X

,

P1660270

n A / t A A A P1 660280

1 13HASA REF 8 . 3 . 1 / / 2X , 7HRESULTS

)

AVB = AFB( 1 . 0 ) P1660290

r\ A / / A ~f A A P1 660300

IF (AVB) GO TO 1664

WR I TE ( NUV I, 1661 ) MAVI

P1660310

P1 660320

GO TO 1665

1660 FORMAT (/7H TEST ,I2 f 12H IS POSITIVE)

P1660330

P1660340

1661 FORMAT (/7H TEST ,I2,12H IS NEGATIVE)

1 664 WR I TE ( NUV I , 1 660 ) MAVI

P1660350

P1 660360

GO TO (1665,1666,1667,1668,1669,7030,7031,7032,7033,7034), MAVI

C***** LOGICAL FUNCTION OF INTEGER ARGUMENT (TEST 2)

P1660370

P\ M * A A A* A A P1 660380

1665 MAVI=2

AVB = B F B ( 1 ) P1660390

A A * / A J A A P1 660400

IF (AVB) GO TO 1664

WR I TE ( NUV I, 1661 ) MAVI

P 1 6604 1

0

P1 660420

C*****LOGI CAL FUNCTION OF DOUBLE PRECISION ARGUMENT ( TEST 3)

1666 MAVI=3

P1660430

P1 660440

AVD = 1 . 0D0

AVB=CFB(AVD)

P1660450

n a t § A t / A P1 660460

IF (AVB) GO TO 1664

WR I TE ( NUV I , 1661 ) MAVI

P1660470

AS / A J A A P1 660480

C**«** LOGICAL FUNCTION OF LOGICAL ARGUMENT(TEST 4)

1667 MAVI=4

P1660490

ft4//AC°AA P1 660500

AVB = DFB( .TRUE. ) IF (AVB) GO TO 1664P 1 660 5 1 0 n4 / / APIA P1660520

WR I TE < NUV I

, 1661 ) MAVI

C*t*t*LOGI CAL FUNCTION OF COMPLEX ARGUMENT ( TEST 5)

P1660530

n<t / / AC / A P1 660540

1668 MAVI=5

AVB = EFB((1 .0,1 .0))

P1660550

P1 660560

IF (AVB) GO TO 1664

WR I TE ( NUV I

, 1661 ) MAVI

P1660570

A* /j , / AFAA P1660580

C****« LOGICAL FUNCTION OF ARRAY NAME (TEST 6)

1669 MAVI=6

P1660590

P1 660600

A 1 S ( 1 ) = 1 .0

A1S(2)=0.0

P 1 6606 1

0

n i / / A/ OA

P1 660620

AVB=FFB(A1S)

IF (AVB) GO TO 1664

P1660630

n a / / A/ / A P 1 660640

WR I TE < NUV I

, 1661 ) MAVI

C****« LOGICAL FUNCTION OF EXTERNAL PRO CEDURE ( TEST 7)

P1660650

r\«i//A//A

P1 660660

156 NBS FORTRAN Test Programs Version 1
7030 MAVI =7

AVB= G F B ( A F B f

1 .0)

IF (AVB) GO TO 1664

WRITE(NUVI 1661 ) MAVI

P1660670

P1 660680

P1 660690

P1660700

Pi 66071 6

P1660720

PI 660730

P1 660740

PI 660750

P1660760

P1 660770

P1 660780

P1 660790

P 1 660 8 0 0 PI 6608 1 0 P1 660820

P 1 660 830

P1 660840

P 1 6 6 0 8 5 0 P1660860

P 1 660870

P1 660880

P 1 6 6 0 8 9 0 P 1 66090 0 Pi 66091 0 P1 660920

P 1660930

P1 660940

"P 166095 0 P1660960

P 1660 9 70

P1 660980

P 1 660990

P 1 66 1 0 0 0 PI 6610 1

6

P1 66 1 020

"Pi 661 03 0 P1 661 040

P1 661 050

P 1 66 1 06 0 P1 6 6 1 0 7 0 P 1 66 1 0 8 0 P1 6 61 090

P1661 1 00

P 1 6 6 1110

P1661 120

pi 66 ii 36

P1661 140

Pi 661 1 50

P166C1

P166C2

P4060010

P4 060 020

P4060030

P 4060040

*P4060050

p 4 060 06 0 P4060070

P4060 0 80

P4060090

" P 4 0 6 0 1 0 0 *P4160010

P4 1 60 0 20

P4160030

P41 60040

*P4160050

P41 60060

P4 1 60 0 70

C * * * * 7031

LOGICAL FUNCTION OF DIFFERENT TYPES OF ARGUMENTS

MAVI =8

AVD "=1 .000

AVC = (1.0.1.0)

IAVI = 1 AVB= .TRUE.

A1 B ( 1 > = . TRUE

A2B < 1

f. 1 ) = . TRUE

A38(1, 1,1) = . TRUE.

A1C(1)=(1.0,T.O)

A2C(1,1)=(i.0,i.6)

A3 C <

1

f 1 ,1 ) = ( -2. 0,-2.0)

A 1 D ( 1 ) = 1 . 0D0

A2D( 1 , 1 ) = 1 . 0D0

A3D(i,i , i T=-2.6d6

I 1 I ( 1 ) = 1 121 ( 1 . 1 ) = 1 131(1,1, 1) = 1 A 1 S ( 1 ) = 1 . 0 A2S(1 . 1 ) = 1 .0

A3S(1 , 1 , 1 ) = 1 .0

AXVS = 1 .0

AVB = H F B ( AVS , IAVI , AVB , AVD , AVC . A1 S . A2S , A3S , 11 I , I 21 , I ST .A1B.A28,

1A3B. A1 C, A2CA3C.A10, A20.A30.AFB)

IF (AVB) GO TO 1664

WR I TE < NUV I

, 1661 ) MAVI

MAVI = 9

IAVI=AVD

7032

IF( IAVI .EO.O) GO TO 1664

WR I TE ( NUV I , 1661 ) MAVI

i av i = i MAV 1 = 10

7033

IAVI =AVS

IFUAVI .EO.O) GO TO 1664

WRITE(NUVI , 1661 ) MAVI

7034 MAVI = 1 1 WR I TE ( NUV I . 1663) AVC, MAVI

FORMAT (//2F8.4//7H TEST ,I2,31H IS POSITIVE IF NUMBERS PRINTED/

119H ABOVE ARE 6 . 0 . 6 . 0 / / 2X , 1 2HE ND OF (166))

* END OF TEST SEGMENT 166

1663

C * * * *

C * * * *

c * * * *

c * * * * c=

c=

* WHEN EXECUTING ONLY SEGMENT 166. THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN

* COLUMNS i AND 2 REMOVED.

STOP

END

STOP

C * * * *

c * * * *

c * * * *

c * * t *

C t * * *

c * * * *

END ******************************************************************

*

*

*******************************************************************

AFB - (406)

LOGICAL FUNCTION OF REAL ARGUMENT (TEST 1)

LOGICAL FUNCTION AFB(AWVS)

A F B = AWVS.GT.0.0

RETURN

END

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

******************************************************************

*

* BFB - (416.)

*******************************************************************

LOGICAL FUNCTIONQp i N T E G E R ARGUMENT (TEST 2)

LOGICAL FUNCTION BFB(IWVI)

NBS FORTRAN Test Programs Version 1 157
B F B = IHVI.GT.O P4160080

RETURN P4160090

END p 4 1 6

0 1 0

6 [tt«Mlti«t«l«>ttt<tt>t>t(tt<l>lltlMMIItllM«IMMttttlltttl*ll>t«ttt<tP4260010

C* "*"*"*"* P 42 6 00 2 0

C mil CFB - (4.2 6) P 42 6003 0

C * * * * * P 42 60 0 4 0 C***********************************************************************

C

*'**'*'* LOG"I CAL FUNCTION OF DOUBLE PRECISION ARGUMENT ( TEST 3) P426 0 0 60

LOGICAL FUNCTION CFB(AWVD) P4260070

DOUBLE PRECISION' AWVD P4260 0 80

CFB= AWVD.GT.0.0D0 P4260090

RETURN P 4 2 6 0 1 0 0 END P4260 1 1 0 £t*ttt**tt*itttt*it*ittit*t*ttt*ttttttttttt*iitiiii!tiitiiittltlittttttitittttttttttttpii^bQQYQ Cum P4360020

C* * * * * DFB - ( 436 ) P 4360030

C * * * * * P 43 60 0 40

C***********************************************************************P4366056

C* * * * * LOG I CAL FUNCTION OF LOGICAL ARGUMENT (TEST 4) P4360060

LOGICAL F UNCTION DFB(AWVB) P436 0 070

LOGICAL AWVB P4360080

D F B = A W V B P436 0 0 90

RETURN P4360100

END P 4 3 60 1 1 0 C***'»*«****Mi******************»i*****M Mi** ************t»»*tt»i**P4460010

C

*'* * *'* 1 P4460020

C* * * * * E FB -

( 446 ) P 4 4 6 0 0 3 0

C * * * * * P 4 460 040

C********************************************.********* *****4************P4460050

C* * * * * LOGICAL FUNCTION OF COMPLEX ARGUMENT (TEST 5 ) P 4 4 60060

LOGICAL FUNCTION EFB(AWVC) P4460070

COMPLEX AWVC P 4 4 6 0 0 8 0 AVS =AIMAG(AWVC> P4460090

E F B

""="" A V S . GT .0.6 P 446 0 1 0 6 RETURN P4460110

END P 4460 1 20

C*************************************************************t*********P4560010

C * * * * * P 4 5 6 0 0 2 0

C *.*.*.** FFB - ( 456 ) P4560030

C * * * * * P 4 5 6 0 0 4 0

C ***** LOG I CAL FUNCTION OF ARRAY NAME (TEST 6 ) P 4 5 6 0 0 6 0 LOGICAL FUNCTION FFB(AW1S) P4560070

DIMENSION AW 1 S (2 )" P4 5600 80

BVS =AW1S( 1 ) +AM1 S < 2 ) P4560090

FFB= BVS . GT . 0 . 0 P4560 1 00

RETURN P 4 5 6 0 1 1 0 E N D P 4 5 6 0 1 2 0 C***********************************************************************P4660010

Co'i'ii P 4 6 6 0 0 2 0 Coil * GFB - ( 466 ) P 4660030

C i 1 1 1 * P 4 6 6 0 0 4 0 C***********************************************************************P4660050

C * *'*i i LOG I CAL FUNCTION OF EXTERNAL PROCEDURE (TEST 7) P 4660 060

LOGICAL FUNCTION G F B ( AW F B , AWVS ) P4660070

LOGICAL AW F B

' P4 66008 0 GFB= AWFB(AWVS) P4660090

RETURN P 4660 1 00

END P 4 6 6 0 1 1 0 Ci**********************************************t***********************P47606lO

C* * * * * P4760020

C * * * i

* HFB - ( 476 ) p 4 7 6 00 30

C i

1 1 P4760040

C************.*****»*«t***»******r»***tt*«(i*«*****t»**«*t»**t*»*«*«***»***P4760050

C*****LOGICAL FUNCTION OF DIFFERENT TYPES OF ARGU ME NTS ( TE ST 8,9,10,11) P4760060

LOGICAL FUNCTION' H F B ( AWVS , I WV I , AW VB , AW VD , AWVC , AW 1 S , AW2S , AW3S , P 4 7 6 0 0 7

0

1 I W 1 I , I W2 I , I W3 I ,AW1 B, AW2B.AW3B.AW1 C, AW2CAW3CAW1D, AW2D.AW3D.AWFB) P4760080

158 NBS FORTRAN Test Programs Version 1
COMMON BXVS

COMPLEX AWVC,AW1 C,AW2C, AW3C

P4760090

P4760100

DOUBLE PRECISION AkVO , AW 1 D , AW3D , AW2D

LOGICAL AWVB f AW1B,AW2B,AW3B«AWFB

P47601 10

P4760120

DIMENSION A W 1 C( I W V I ) , A W 2 C ( I W V I ,2) ,AW3C( I W V I ,2,

1 AW1B( I W V I ) ,AW2B< I WV I ,2) ,AW3B( IWVI , 2,

2),

2)

P4760130

P47601 40

AW2S( IWVI

f AW2D( IWVI

2) , AW3S( IWVI ,2,

2) ,AW3D( IWVI , 2,

IW2I ( IWVI ,2) , iW3i ( IWVI

AND . AW2 B ( IWVI .IWVI)

2)

2)

2,2)

AND. AW3B( IWVI

P47601 50

P4760160

P4 7601 70

Pf 760 1 80

P4-760 1 90

P*f60200

P4760210

P4760220

P4760230

P4760240

P4760250

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

p. * *

*

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

c * * *

C * * *

c * * *

c * * *

c * * *

c * * *

c * * *

p. * *

*

C t * *

c * * *

c * * * c=

c=

c=

c=

2 AWIS(IWVI)

3 AW1DUWVI)

""4 iwii(iwvi)''

HFB = AWVB. AND. AW 1 8 ( IWVI

)

"i I WV I , IWVI ) . AND . AWFB ( 1 .6)

AWVC = AW1 C( IWVI )+AW2C( IWVI , IWVI )+AW3C( IWVI , IWVI , IWVI

)

AWVD=AW1D( IWVI )+AW2D( IWVI , IWVI) +AW3D ( I WV I , IWVI , IWVI)

AWVS=BXVS+AW1S< IWVI ) ** IW1 I ( I WV I ) - AW2 S ( I WV I , I WV I ) * * I W2 I ( I WV I < I WV I

)

1 -AW3S ( IWVI , IWVI , I WV I ) * * I W3 I ( IWVI , IWVI , i wvi

)

RETURN

END

*****»*******ii**********t***»******t*t***»t*****t**t»***t*t*t»****ttPl670010

t* PI 6 7 0 0 2 0 ** SBRTN - (167) P1670030

* * P 1 6 7 0 0 4 0 ********tttt»****tii*t*t**.**««**t**t**»*****tt tir»** *»*t*«t***»t*pi670050

*"* GENERAL PURPOSE ASA REFSP 1 6 70 060

** TO TEST SUBROUTINE SUBPROGRAMS 8.4.1 P1670070

* * RE ST R I CT IONS OBSERVE D P 1 670 080

SYMBOLIC NAME OF A SUBROUTINE MAY NOT APPEAR IN ANY 8 . 4 . 1 . / / 1 9P1 670090

STATEMENT IN THIS SUBROUTINE EXCEPT IN THE

SUBROUTINE STATEMENT ITSELF

* SYMBOLIC NAMES OF DUMMY ARGUMENTS MAY NOT APPEAR 8.4.1.1

IN EQUIVALENCE OR COMMON STATEMENTS IN THE SUBPROGRAM

* SUBROUTINES MAY NOT CONTAIN A FUNCTION STATEMENT, 8.4.1./

ANOTHER SUBROUTINE STATEMENT, OR ANY STATEMENT THAT

DIRECTLY OR INDIRECTLY REFERENCES THE SUBROUTINE

BEING DEFINED.

* AT LEAST ONE RETURN STATEMENT MUST BE IN A SUBROUTINE

8.4.1.1

GENERAL COMMENTS

THIS SEGMENT IS TO BE RUN WITH SEGMENT 407, 417, 427

S P E C I F I C. A T 1 0 N S SEGMENT 16 7

WHEN EXECUTING ONLY SEGMENT 167, THE SPECIFICATION STATEMENTS

P1 670 1 00

P 1 670 1 1

0

/23P1670120

P 1 6 7 0 1 3 0 /29P1670140

P16701 50

PI 670 1 60

P 1 670 1 70

P1 670 1 80

/33P1670190

PI 670200

P 1 6702 1

0

P1 6 70220

P1670230

P 6 0 1 3 4 4 0 P0013445

P0013450

P0013455

P 0 0 1 3 4 6 6 P0013465

POO 1 3 4 70

PO013475

P0013480

P167A1

P167A2

P167A3

PI 6 7A4

P0013485

P 1 6 7 6 2 4 6 P0072750

P0072755

P0072760

P0072765

P167B1

P0072770

P1670250

P1 670260

P1670270

P 1 6 7 0 2 8 0 P1670290

PI 670366

P1 6703 1 0

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

DIMENSION IAB1K4). IAB2M3.3), AB1SU), AB2S(3,3)

COMMON AXVS, CXVS, I XV I . I AX 1 1(4) . IAX2I (3,3) , IAX3I (2,2,2) , BXVS, AX1S(4) f AX2S(3,3)

EXTERNAL SORT

DIMENSION IAB1K4), IAB2K3.3), AB1S(4), AB2S(3 f 3)

COMMON AXVS, CXVS, IXVI , IAX1 1(4), IAX2I (3,3) , I AX 3 I (2,2,2)

,

BXVS, AX1SU), AX2S(3,3)

EXTERNAL SORT

C * * *

C * * *

c * * *

c * * *

c * * * c=

t *

* * OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 167, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI

C * * *

C * 1

1

* * WRITE HEADING

WRITE (NUVI ,1670)

FORMAT(1H1 , 1X, 35HSBRTN - (167) SUBROUTINE SUBPROGRAM/

/ 2X , 1 6HASA RE F . - 8.4.1// 2X , 7HRESULT S ) SET ALL VARIABLES AND SOME ELEMENTS IN ARRAYS TO 2ER0

IAVi = 4 AVS = 0.0

1670

C * * *

NBS FORTRAN Test Programs Version 1 159
TAQ1W1N - ft I AD 1 1 \ U - U IAB1 K3) = 0

rl 0/ u Jt

U

P1670330

T A Q 9 T M 9 ^ - ft

T A R 7 T ( 7 7 ) = 0

D1A7ft7Aft

r I u / y J J V

P * * * * *

L, X V W K V D1r I A7ft7Aft 0 / U J 0 v ADIOVI/ AD1CM ) = A U.v r I O / \J J f U

A D 1 C / / \ A A O D 1 0 \ f * v . U D1A7ft7*ft r I 0 / U j o U AR7QM 7) = ft 0 P 1 n 7 ft 7 Qft P 1 A 7 ft 4 ft ft r * t * * t P 1 f\ 7 ft 4 1 ft

1 Y\/I - fl

I A V 1 - \J P1A7ft£?ft

RYV^ = ft 0 P1 6704^0

TIMAA Y 1

1 1

T \t( 7 }

/ -~ AU P 1 A 7 ft L L ft

T AV ? I M 7 ) z 0 P 1 ft 7ft A S ft r t a # * j P1ft7ftAAft

AV 1 9 f ? } = fl ft r 1 V r V 7 r v AY7Q M ? } - ft fl P1A7ft4XA

r # # # * * P 1 A7ft40ft

r****t «!FT FLFMFNTS IN INTEGER AND REAL ARRAY TO 1 TO TEST P1A7ftSflft

(****** cypRccciON^ TN SliRRGlJT I NF ARfillMFNT P 1 A 7 ft S 1 ft IAD I 1 y L J — \ P1A7ftS?ft

p 1 a 7ft 5 7 ft

T A R 7 T ( 7 1 ) z 1 P1r 1 ft7flS O / v J Afl *r v

I A R 7 T (7 7 ) z 1 P1 ft7ft SSft

P # * * * * P 1 ft 7 fl S ft ft A R 1 <? ( 7 ) - 1 0 rP 1i ftu 7fl / v Sj 7ft / v ADICf 7) " 1 0 P1ft7flSAfl

AD7CM ? ) = 1 0 P1 ft70SQfl noiPKf? CO ? ^ - 1 ft \ C i c. J - 1 . U

P 1 A 7 ft ft ft ft

f, * t * * * P 1 ft 7ft ft 1 0 CALL AAQHAVI AVS IAR1I IAR2I AR1S AR2S SORT w U r\ 1 t pi A7QA20

1 I AR 1 I ( 2 ) + I AR 1 I (

4

) * I AR2 I ( 2 1)-IAR2I(2 2) P1r 1 670610 U / w w J v

7 A R 1 S ( 7 ) + A R 1 <? ( 7 ) * AR ? ( 1 ?}-AR7 <5(7 ?i 1 ft x PiA7flAi:ft

PAN APfl

rtitti URTTF R F 9 II 1 T 9 P 1 A 7ft A Aft UIR1TF (WIIVT 1 A 7 1 > T AV T AV^ TAR1TM) ! AR 1 I t 5 ) 1 AR? T M 7) Pr 11 UA 7/ ftV AD 70/ v A IAB2I (3,3) , AB1S(1 ) , AB1SU) , r i u / v \j o w B AB2S(1,3), AB2S(2,3), I XV I . BXVS, P 1 A70AO0

C IAX1 1(2), IAX2I (1 ,2) , AX1S(2) t P 1 A 7 ft 7 ft ft D AX2S(1,2) P 1 A 7 ft 7 1 ft 1671 FORMAT (//I10/F11. 1/4(110/), 4(F11.1/),I10/F11. 1/2(110/). 2 < F 1

1

• 1/1/ P1A70770 r 1 U / V / C V A) ) P1A70770

WRITE (NUVI.1672) P1A70740

1672 FORMAT ( / /2X, 38HTEST SUCCESSFUL IF ALL RESULTS EQUAL Ml) pi A70750

C***«* END OF TEST SEGMENT 167 pi A70760

C****t WHEN EXECUTING ONLY SEGMENT 167. THE STOP AND END CARDS P1 670770

Z*t*t* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C = P1ft7ft7Xfl r I o / w / o v C**ttt IN COLUMNS 1 AND 2 REMOVED. P1ft7fl7<5fl r 1 D/ v< 7U

C= STOP pi A70800

C= END Pr 11 670 U / v 8U 11 0V STOP P1 ft7T1

END P167C2

C«ttt*t***tiiMttt****ttiM*«ttt«<ti**ttttti«t*ttt«*«tit«ttttt««ttttiittP4070010

c * * * * * P4070020

C***»* AAQ - (407) P4070030

c * * * * * P4070040

Ct*ttlt«tttttt«lttlttttllt*lt*Ht«ltltHt*ttl*t«ttttt ttiiittiitttiit *tttP4070050

C»t*** THIS SUBROUTINE IS TO BE RUN WITH SEGMENT 167 P4070060

SUBROUTINE AAQ (IWVI, AWVS, I AMI I . IAW2I. AW 1 S

,

AW2S . SQFI. P4070070

1MWVI, BWVS. CWVS) P4070080

DIMENSION IAW1K4). IAW2K3.3). AW1S(4). P4070090

1 AW2S(3,3) P4070100

IWVI = I NT ( SQF I ( FL0AT( IWVI) + .5)) - 1 P40701 10

AWVS = AWVS + 1.0 P4070120

IAVI = 5 P4070130

IAW1 1(1) = MWVI P4070140

IAW1 1(3) = IAW1 1(3) + 1 P4070150

IAW2K3.3) = IAH2K3.3) + 1 P4070160

160 NBS FORTRAN Test Programs Version 1
AM1S(1) = BHVS

A.W2S< i.f.3) = cwys

P4070170

P40701 80

P4 0 70 1 9 0 P4070200

C * * * *

c * * * * CALL A SUBROUTINE FROM ANOTHER SUBROUTINE

CALL ABO ( I AW 2 I , AW 1 S , AW2S)

RETURN

END

P4070210

P4070220

P 4 0 7 0 2 3 0

P41 70020

P41 70030

P4 170 0 40

C*t****t******t*t*t************t t** *t*»t*******************tt*******P4l70010

C * * t * * C» » «M AB.Q - (417)

C * * * * * [«**M»«««»**»*»»*ttt»*t**»»t»«*»*t«tt*t»«t«»«»*»»t*t«*««»nM»**t«*»«»iiP4l70050

SUBROUTINE ABQ( ICW2I , C W 1 S , CW2S) P 4 1 7 0 0 6 0 DIMENSION ICMZK3.3). CW1SU), CW2S(3,3) P4 1 70 0 70

ICW2i(i ,2) = ICW2I (1 ,2) + 1 P4 170 08 0 C**«** P4170090

P 4 1 7 0 1 0 0 P41 701 1 0 P4 170120

P41 70 1 30

CW1S(4) = CW1SC4) + 1.0

CW2S(2,3> = CW2S(2.3) + 1.0

RETURN

END

*)r****************)r***««i*t***»**» t** *»*»*»********«******«***«tP4270010

* P4270020

* ACQ - ( 427 ) P 4 2 7 0 0 3 0

* P4270040

SUBROUTINE ACO

DIMENSION IDX1 1(4) . 16X21(3,3). 10X31(2,2,2)

1 ,AAX1S(4), AAX2S(3,3)

COMMON ABXVS, ACXVS, IAXVI, IDX1I, IDX2I, IDX3I.

1 AAXVS. AAX1S, AAX2S

IAXVI = IAXVI + 1 AAXVS = AAXVS +1.0

P4270060

P4270070

P4270080

P42 70090

P42701 00

P42701 10

P42701 20

P 42 70 1

"3 0 P42701 40

P42701 50

P4270160

P 42 7 01 7 6 P42701 80

P42 70 1 9 0 P4270200

P 4 2 7 0 2 1 0

IDX1 I (2) = IDX1 I (2) + 1 IDX2I (1 ,2) = IDX2I (1 ,2) + 1 C * * * t * AAX1S(2) AAX1S(2) * 2. + 1.0

AAX2S(1.2) = AAX2S(1,2) + 4.0 - 3.0

C * * * *

c * * * * RETURN

* END OF TEST SEGMENT 427

* P1680040

*t**«*******»******************»**»********» «»** »*»**»******»**Pi680050

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C * t * *

c * * * *

c * * t *

c\* * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

END

*******************************************************************P1680010

* P 1 68 0 02 0 FSBRT (168) P1680030

GENERAL PURPOSE

TO TEST SUBROUTINE SUBPROGRAM IN FORTRAN

ASA REFSP1680060

8.4.1 P1680070

680080

680090

680100

6 8 0110

680120

680 130

680140

680150

6 8 016 0 680170

* * AT LEAST ONE RETURN STATEMENT MUST BE IN A SUBROUTINE P 1 6 8 0 1 8 0

* 8.4.1 . 1 /49P 1 68 0 1 90

* GENERAL COMMENTS P 1 68 02 0 0

* THIS SEGMENT IS TO BE RUN WITH SEGMENT 408 , 41 8 , 428 P 1 6 8 0 2 1 0

i P 1 6 8 0 2 2 0

* SPECIFICATIONS SEGMENT 168 P1680230

* PO0 1 3490

P0 0 1 3 49 5 P 0 0 1 3 5 0 0 P001 3505

RESTRICTIONS OBSERVED

SYMBOLIC NAME OF A SUBROUTINE MAY NOT APPEAR IN ANY 8.4.1

STATEMENT IN THIS SUBROUTINE EXCEPT IN THE

SUBROUTINE STATEMENT ITSELF.

P1

1 / 5 6 P 1 P1

P1

* * SYMBOLIC NAME OF DUMMY ARGUMENTS MAY NOT APPEAR 8.4.1.1/39P1

* IN EQUIVALENCE OR COMMON STATEMENTS IN THE SUBPROGRAM P1

* i SUBROUTINES MAY NOT CONTAIN A FUNCTION STATEMENT,' ' " 8

'. 4 . 1 . 1 / 4 5 P

1

* ANOTHER SUBROUTINE STATEMENT, OR ANY STATEMENT THAT P1

* DIRECTLY OR INDIRECTLY REFERENCES THE SUBROUTINE PI

* BEING DEFINED. P1

* WHEN EXECUTING ONLY SEGMENT 168, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENTS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

NBS FORTRAN Test Programs Version 1 161
c * * * c=

c=

c=

c=

c=

c=c=

c = c=

c = c=

c=

DIMENSION IAB1K4), IAB2I(3,3) f

. I A B 3 1 (2,2.2), A81S(4) f AB2S<3

A AB3S(2, 2, 2)

COMMON AXVS. CXVS. I XV I , IAX1K4), IAX2K3.3), I AX3 I ( 2 , 2 , 2 )

, A BXVS, AX 1 S ( 4 ) , AX2S (3 , 3 ) , AX3S (2,2, 2 ) , AXVD . AX1D(2),

B AX2D(2,2), AX3D(2,2.2>, AXVC, AX1C(2). AX2C(2.2),

C AX3C(2 ,2 . 2), AXVB, AX1B(2), AX2B(2,2>, AX3B(2, 2.2)

DOUBLE PRECISION AXVD. AX 1 D , AX2D. AX3D

DOUBLE PRE C I S I ON A V D , A 1 D ( 4 ) , A 2 D ( 2 , 2 ) , A3 0(2,2,2)

COMPLEX AXVC, AX 1 C , AX2C, AX3C

P0013510

,3). PO0 1 3 5 1

5

PO0 1 3 520

P0013525

PO0 1 3530

P0013535

POO 1 3540

P0013545

POO 1 3 5 5 0 P0013555

COMPLEX AVC,A1C(12),A2C(2,2),A3C(2,2,1)

LOGICAL AXVB. AX 1 B , AX2B, AX3B

LOGICAL A1B ( 2 ) , A2B ( 2 , 2 > . A3 B ( 2 , 2 , 2 ) , AVB

DIMENSION IAB1K4), IAB2K3.3). I AB3 I ( 2 , 2 . 2 )

, AB1SU), AB2S(3

A AB3S(2.2, 2)

COMMON AXVS, CXVS. I XV I . IAX1K4). IAX2K3.3), I AX3 I ( 2 , 2 , 2 )

, A BXVS. AX1S(4) , AX2S(3,3), AXIS (2,2,2) , AXVD, AX1D(2>

,

B AX2D(2,2). AX3D(2,2,2). AXVC, AX1C(2). AX2C(2,2).

C AX3C< 2,2,2), AXVB, AX 1 B ( 2 ) , AX2B(2,2) . AX3B(2, 2,2)

DOUBLE PRECISION AXVD, AX 1 D , AX2D. AX3D

DO U BL E PRECISION AVD , A 1 D ( 4 ) , A 2 D ( 2 , 2 ) , A 3 D ( 2 , 2 , 2 ) COMPLEX AXVC, AX1C, AX2C, AX3C

COMPLEX AVC , A1 C ( 1 2 ) , A 2 C ( 2 . 2 ) , A 3 C ( 2 , 2 , 1 ) LOGICAL AXVB, AX 1 B , AX2B, AX3B

LOGICAL A 1 B ( 2 ) , A2 B ( 2 , 2 ) , A3 B ( 2 . 2 , 2 ) , A V B

P0013560

P0013565

PO0 13 570

,3), P168A1

P168A2

P168A3

P1 68A4

P168A5

"' P168A6

P168A7

P168A8

P168A9

P168AA

P168AB

P168AC

P0013575

P1 68 02 4 0 P0072780

P0 0 7278 5 P0072790

POO 72 79

5

P168B1

P 1 6802 5 0 P1680260

PI 680270

P1680280

P 1 680290

P1680300

' PI 68 03 1 0 P1680320

P 1 6 8 0 3 3 0 P 1 680340

PI 68 03 5 0 P1680360

P1 6803 70

P1680380

C * * *

c * * *

c * * *

c * * *

c * * * c=

c * * *

c * * *

1680

** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

* * ** U HEN EXE CUT I NG ONLY SEGMENT 16 8, THE FOLLOWING STATE ME NT

** NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI =

6

NUVI = 6

tt" SET INTEGER VARIABLES AND SOME ELEMENTS IN ARRAYS TO ZERO

** WRITE HEADING

WRITE (NUVI ,1680)

FORMAT ( 1 HI , 1 X , 36HFSBRT - (168) SUBROUTINE SUBPROGRAMS/

A/18 H ASA RE F . - 8.4 .1 //2X.7H RESULT S ) IAVI = 0

i a b i i ( 1 ) = 6 IAB2I (1,2) =

I A B 3 I (1 , 1i . 2)

IXVI = 0

I AX 1 I ( 1 ) = 0 IAX2I (1,2) = 0

I AX3 I ( 1 , 1 , 2 ) = 6 ** SET REAL VARIABLES

0

= 0

c * * * AND SOME ELEMENTS IN ARRAYS TO ONE

AVS = 1 . P1680390

AB1S(1 ) = 1 . P1680400

AB2S(1 ,2) = 1 . P1680410

AB3S( 1 ,1,2) = 1 . P1680420

BXVS = 1 . P1680430

AX1S(2) = 1. P 1 68 0440

AX2S( 1 ,2) = 1 . P 1 68 0 45 0 AX3SM ,1.2) = 1 . P1680460

C**t«* SET DP VARIABLES AND SOME ELEMENTS IN ARRAY TO TWO P1680470

AVD = 2. ODO P1680480

A 1 0 < 1 ) = 2.000 P1680490

A2D(1 ,2) = 2. ODO P1680500

A3D(1.1,2) = 2. ODO P 1 6 8 0 5 1 0 AXVD = 2. ODO P1680520

AX1DM ) = 2. ODO P1680530

AX2D(1 ,2) = 2. DO P1680540

AX3D(1,1.2) = 2. ODO P1680550

C***»* SET COMPLEX VARIABLES AND SOME ELEMENTS IN ARRAYS TO (3.0,3.0)P1680560

AVC = (3.0,3.0) P1680570

A1C(1) = (3.0,3.0) P1680580

A2C(1 ,2) = (3.0,3.0) P1680590

A3C(1,2,1) = (3.0.3.0) P1680600

162 N8S FORTRAN Test Programs Version 1
AXVC = (3

AX1C(1> = AX2C(i ,2)

0,3.0)

(3.0,3.0)

= (3.0,3.0)

P1680610

P1680620

P 1 68 063 0 P1680640

PI 6806 5 0 P1 680660

P 1 6 8 06 70

P1680680

P1680690

P1680700

P 1 6 8 0 7 1 0 P1680720

PI 680730

P 1 68 0 7 40

PI 6 8 0 7 5 0 P 1 68 0 760

P 1 6 8 0 770

PI 68 0 78 0 Pi 68 0 790

P 1 68 0 8 0 0 P 1 68 0 8 1 0 P 1 6 8 0 8 2 0 P1 680830

P1 680840

P 1 6 8 0 8 5 0 P 1 68 0 8 60

P 1 68 0 8 70

P 1 68 0 8 8 0 P 1 68 0 8 90

P 1 68 09 0 0 PI 68 09 1 0 PI 68 092 0 P1 680930

P1680940

P 1 6 8 09 5 0 P1680960

P 1 6 8 0 9 7 0 P1680980

, P 1 68 0990

P 1 68 1 0 0 0 P 1681010

P1 68 1 020

P1 68 1 030

P 1 6 8 1 0 4 0 P1681050

PI 68 1 060

P 1 6 8 1 0 7 0 P 1 68 1 0 8 0 P1681090

P1 681 1 00

P 1 6 8 1 1 1 0 P1681 120

P1681 130

P1681 140

P 16 8115 0 P1681 160

PI 68 CI

P168C2

* P 4 0 8 0 0 1 0 P4080020

P4080030

P4080040

*P4 0 8 0 0 5 0 P4080060

P40800 70

P4080080

P4080090

P40 8 0 1 0 0

AX3C( 1 , 1 ,2) (3.0,3.0)

C * * * »* SET LOGICAL

AVB = .FALSE.

A IB C 1 ) = .FALSE

VARIABLES AND SOME ELEMENTS IN ARRAYS TO .FALSE

A2B(1 ,2) FALSE

A3B(1,1,2) = .FALSE

AXVB = .FALSE.

AX 1 8 C 1 ) = .FALSE.

AX2B(1,2) = .FALSE.

AX3B(1 ,1,2) = .FALSE.

C*»*«* SET INTEGER AND REAL

C**"t DUMMY ARGUMENT

IAB1 1(4) = 0

VARIABLES FOR EXPRESSION USAGE IN

IAB1 1(2) : AB1S(4) = AB1S(2)

=

JAVI = 1

0

0 . 0

6 . o

KAVI

LAVI

MAVI

NAVI

ABVS = 1 ACVS = 1 ADVS = 2 AEVS = 2 AFVS

CALL

A

B

ADO ( I AV

I

f I AB 1 I , IAB2I, IAB3I

AID, A2D , A 3D , AVC, A1C,

JAVI +KAVI * LAVI -MAVI /NAVI

AVS. AB1S, AB2S , AB3S, AVD,

A2C, A3 C , AVB, A1B, A2B, A3 B

,

1,ABVS+ACVS*ADVS-AEVS/AFVS,2.)

WRITE (NUVI.1681)

CALL AFO

FORMAT ( /2 8H TEST ' IS SUCCESSFUL IF EACH/

A28H GROUP CONTAINS SAME VALUES)

WRITE (NUVI. 1682) IAVI. I AB 1 I ( 1 ) , IAB1 I (2) , I A B 1 I ( 4 ) , IAB2I (1 ,2) , A IAB3I(1.1,2), I XV I , IAX1K1), IAX2K1.2),

B IAX3I ( 1

, 1 .2) , AVS, AB1S( 1 ) , AB2S( 1 , 2) , AB3S( 1

,

1

C2) ,AB1S(2) ,AB1S(4) . BXVS, AX1S(2), AX2S(1,2), AX3S(1,1,2), AVD,

D A1D( 1 ) , A2D( 1 , 2) , A3D(1 ,1,2), AXVD, AX1D( 1 )

,

E AX2D(1.2), AX3D(1,1,2), AVC. A1C(1), A2C(1,2),

F A3C(1 ,2,1), AXVC, AX 1 C( 1

')", AX2C ( 1 , 2 ) , G AX3C(1,1,2), AVB, A1B(1), A2B(1,2), A3B(1,1,2),

H AXVB, AX1B(1 ) , AX2B( 1 , 2 ) , AX3B(1 ,1,2)

FORMAT ( 10(110/)/

1681

1682

CARDS

1 10(F11 .1/)/

2 8( 1PD1 5 . 1 / ) / 3 8 ( 0 P F 5 . 1 , F 5 . 1 / ) / 4 8(L10/) ) * t END OF TE ST SEGMENT 168

** WHEN EXECUTING ONLY SEGMENT 168. THE STOP AND END

*"* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= IN ** COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

c * * *

c * * *

c * * *

c * * * c=

C =

c * * t

c * * t

c * * *

c * * t

c * * *

c * * t

* * ADO - (408)

** SUBROUTINE ADO CALLED BY SEG. FSBRT(168)

SUBROUTINE ADO ( I WV I, I AW 1 I , IAW2I , IAW3 I

, AWVS , AW1 S , AW2S , AW3S

.

A AWVD.AW1D.AW2D,AW3D,AWVC,AW1 C.AW2C.AW3C.

B AWVB . AW 1 B , AW2 B , AW3B , KWV I

, MWV I , BWVS , CWVS

)

DIMENSION IAW1K4), IAW2K3.3). I AW3 I ( 2 . 2 . 2 ) . AW1S(4), AW2S(3 3)

NBS FORTRAN Test Programs Version 1 163
A AW3S(2,2,2>, AW1D<2), AW2D(2,2). AW3D<2,2,2), AW1C(2), P4080110

B AW2C(2,2), AW3C<2 .2,1 ) ,. AW1B<2>, AW2B<2,2>,, P4080 1 20

C AW3B(2,2.2) P 40 8 01 3

6

DOUBLE PRECISION AWVD, AW1D, AW2D, AW3D P4080140

COMPLEX AWVC, AW1C, AW2 C , AW 3 C P4bi0150

LOGICAL AWVB ,, AW1B.,. AW2B « AW3B P4080160

C'*'*"*"*"* STORE INTEGER AND REAL EXPRESSIONS P 4 08 0170

I AMI I (4) = KWVI P40801 80

I AM 1 I ( 2 ) = MWVI P40 80 1 90

AW 1 S ( 4 ) = BWVS P4080200

AW1S(2) = CWVS p 4 08 021 0

CALL AEQ ( IWVI . IAW1 I , IAW2I , IAW3I .AWVS, AW1S.AW2S, AW3S) P4080220

C"*"*"*"*'i INCREMENT DOUBLE PRECISION P 4 0 8 0 2 30

AWVD = AWVD AWVD P4080240

Awib(T) = Awi'D(i> + AiiBxi > p 46 8 62 5 6

AW2D(1,2) = AW2DM.2) + AW2D(1,2) P4080260

A W 3D (1.1 .2 ) "'= AW3D( 1 .1.2) + AW3D ( 1,1.2) "" P 4 6 8 02 7 6

C«**** INCREMENT COMPLEX P4080280

AWVC = AWVC + AWVC P4080290

AW 1 C < 1 ) = AW1C(1) + AW1C(1) P4080300

AW2C( 1 .2) = AW2C( 1 ,2) + AW2C( 1 ,2) P 4 0 80 31 0

AW3C(1,2,1) = AW3C(1,2,1) + AW3C(1,2.,1) P4080320

C CHANGE LOGICAL P 4 0 8 033

6

AWVB = .NOT. AWVB P4080340

AW1 B ( 1 ) = .NOT. AW 1 B ( 1 ) P 4 0 8 0 3 5

6

AW2B(1,2) = .NOT. AW2B < 1,2) P4080360

AW3B( 1.1.2) = .NOT. AW3B ( 1 ,1 ,2) P4086376

RETURN P4080380

END P 4 6 8 6 3 9 6 C*»»»**********i>**4**«******«*****t*»**t***t*t«**********t« it** t*****P4iS0010

C* * * * * P4 1 8 0020

C***«* AEQ - (418) P4180030

C * *****

* P4 1 80 040

Q***«*»«**t)tlt*<:«;ll**«it»t*t*tt*«**» t** t*t«*******«**»***»t****ii*»*«**«P4130050

C*'"*"*'**"* SUBROUTINE AEQ CALLED BY SEG ADO ( 408 ) WHICH IS P4 180060

C****« CALLED BY SEG. FSBRT ( 1 68 ) P4180070

SUBROUTINE AEO(KWVI , K AM 1 1 , k AH 2 I , KAW3 I , AAWVS , AAW 1 S , AAW2S , P41 80080

A AAW3S) P4180090

DIMENSION K AW 1 I ( 4 ) , K AW2 I ( 3 , 3 ) , K AW3 1(2,2,2), AAW 1 S ( 4 ) , AAW2 S (3,3), ' P4 1 8 6 1 66

A AAW3S(2,2,2) P4180110

C***«* INCREMENT INTEGERS P 4 1 8 0 1 2

6

KWVI = KWVI + 1 P4 1 80 1 30 .. _ KAW1 j (

1

j +

1

P4180140

KAW2K1.2) = KAW2K1.2) + 1 P4180150

KAW3 1(1,1,2) = KAW3 I ( 1 , 1 , 2 ) + 1 P41 80160

C***** INCREMENT REAL P4180170

AAWVS = AAWVS + 1 . P 4 1 8 6 1 8 6

AAW1S(1) = AAW1S(1) + 1. P4 1 80 1 90

AAW2S(1 ,2) = AAW2S( 1.2) ' 1 P4 1 8 0200

AAW3S ( 1,1,2) = AAW3S(1.1,2) + 1. P4180210

RETURN P4 18 022 0 END P41 80230

C* * * t t * « * * « * * * * * * « * s

t *

t

* » * * * * * * * * u * * « » * » * * a * * 1 1

1

* * * * t * * * * * * * * * * 1

1

a » *

t

* *p 4280010

C*»*** P4280020

C * * * * * AFQ - ( 428 ) p 42 J 0 03 6

C *.* * * * P 42 8 00.4 0

C*t>ttt«ttt«»*titttii«««tMiitttttttttiittttittit. *****t*t*t*t******t*«*tp 428 0050

C***»* SUBROUTINE AFQ CALLED BY SEG. FSBRT(168) P4280060

SUBROUTINE AFQ P428d0 70

COMMON ABXVS. ACXVS. IAXVI. IAX1K4), IAX2K3.3), I AX3 I ( 2 , 2 , 2 ) , P4280080

A AXVS, AX1S(4) , AX2S(3, 3) , AX3S(2,2,2) , AXVD, AX1D(2) , P4280090

2 AX2D(2,2), AX3D(2,2,2) ,AXVC, AX1C(2), AX2C(2,2), AX3 C ( 2 , 2 , 2 ) P4280 1 00

3 .AXVB, AX1B(2), AX2B(2, 2) , AX3B(2.2,2> P 4 2 8 0 1 1 6

DOUBLE PRECISION AXVD, AX 1 D , AX2D , AX3D P4280120

COMPLEX AXVC, AX 1 C , AX2C, AX 3 C P 4 280130

LOGICAL AXVB, AX 1 B , AX2B , AX3B P42801 40

C***»* SET INTEGERS TO 1 P 4 2 8 6 1 5

0

IAXVI = 1 P4280160

164 NBS FORTRAN Test Programs Version 1
IAX1K1) = 1 P4280170

I AX2 I < 1 „ 2 ) = 1 P4280180

IAX3I ( 1

. 1,2) = 1 P 4 2 8 0 1 90

C*t*t* SET REAL TO 2 P4280200

AXVS = 2. P42 8 02 1 0 AX1S(2) = 2. P4280220

AX2S( 1 ,2) = 2. P 4 2 8 0 2 3 0 AX3S(1 . 1,2) = 2. P4280240

C'ttt** SET DP TO 4 P4280250

AXVD = 4.0D0 P4280260

AX1D( 1 ) = 4. 0D0 P 4 2 8 0 2 7 0 AX2D(1 f 2) = 4.0D0 P4280280

AX3D( 1 . 1 ,2) = 4.0 00 P4280290

C*tt«t SET COMPLEX TO 6 P4280300

AXVC = (6.0,6.0) P 4 2 8 0 3 1 0 AX1C(1) = (6.0,6.0) P4280320

AX2C< 1 ,2) = (6.6,6.6) P42 8 0 33 0 AX3C(1,1,2) = (6.0.6.0) P4280340

C**«** CHANGE LOGICAL P4280350

AXV8 = .TRUE. P4280360

AXIBTi") = .TRUE. P4280370

AX2B(1,2) = .TRUE. P4280380

AX3Bd ,1,2) = .True . P4ZS0390

RETURN P4280400

END P 4 2 8 0 4 1 0 C*t******»********»*»»i*i»t************t**««ti»**»*«t»****t**«»******t««P'i690010

C Ti P 1 6 9 0 0 2 0 C *.*.** * B L K D T z

< 169 ) P 1 6 9 0 0 3 0 C *"*"*"** P 1 6 9 0 0 4 0 (|; t** t**********« «** «*******»*«*»«»**«*»***»*«*tt*«t**«*» + **«****pi69O05O

C

*'**"*

* GE NERAL PURPOSE ASA REFSP 1 690 060

Ct**»* TO TEST BLOCK DATA SUBPROGRAM 8.5 P1690070

C

*"*'*"*

* GENERAL C OM ME NTS P 1 6 9 0 0 8 0 C****« ....._„ THIS SEGMENT IS TO BE RUN WITH SEGMENT 409. THIS P1690090

SEGMENT WR ITES OUT THE DATA FORMED I N SEGMENT 409 P 1 690 1 0 0 C***«* P 1 6 9 0 1 1 0 C

*'»

"*"'** S P E C I F I C A f 1 0 N S SEGM E NT 16 9 P 1 6 9 0 1 2 0 C « P0013580

e"**  *"* * WHEN EXECUTING ONLY SEGMENT 169, THE SPECI F I CATION STATEMENTS P 0 0 1 3 5 8 5 C»**** WHICH APPEAR AS COMMENTS MUST HAVE THE C= P0013590

C * * * * * I N COLUMNS 1 AND 2 RE MOVE D . P 0 0 1 3 5 9 5 C****» P0013600

C"= COMMON / BLK 1 / J XV I , JAX1 I (2) , J AX 21(3,3) P 0 0 1 3 6 0 5 C= A / BLK2 / DXVS , DX1S(2), DX2S(2,2) P 0 0 1 3 6 1 0 C= B / BLK3 / DXVD , DX1 D ( 2 ) , DX2D ( 2 . 2 ) P 0 0 1 3 6 1 5 C= C /BLK4/DXVC, DX1C(2), DX2C(2,2) P0013620

C = D / B L K 5 / D X V B , D X 1 B ( 2 ) , D X 2 B ( 2,2) P 0 0 1 3 6 2 5 C= E /BLK6/JAX3I (2,2,2) . DX3S ( 2,2.2), DX3D ( 2,2,2), P0013630

C= F DZ3C(2, 2,2), DX3 8(2.2.2) PO0 1 363 5 C= DOUBLE PRECISION DXVD, DX1D. DX2D , DX3D P0 0 1 36 40

C= " COMPLEX DXVC, DX1C. 0X2C. DZ3C P0013645

C= LOGICAL DXVB, DX1B. DX2B , DX3B P0 0 1 36 5 0 COMMON / BLK 1 / J X V I , J AX 1 1(2), JAX2I (3,3) P169A1

A / BLK2 / DXVS , DX1S(2), DX2S(2,2) P169A2

B / BLK3 / DXVD , DX1D(2) , DX2D(2.2) P169A3

C /BLK4/DXVC, DX1C(2), DX2C(2,2) P169A4

D / BLK 5 / DXVB i D X 1 B < 2 ) . DX2B ( 2 , 2 ) P1 69A5

E /BLK6/JAX3I (2,2,2) , DX3S(2,2,2). DX3D ( 2,2.2). P169A6

F DZ3C(2, 2,2) , 0X38(2,2,2) P169A7

DOUBLE PRECISION DXVD, DX1D, OX2D, DX3D P169A8

COMPLEX DXVC, DX1C. DX2C, D 23 C P169A9

LOGICAL DXVB, DX1B, DX2B, DX3B P169AA

C *

*"*'"*'"* "" P 0 0 1 3 6 5 5 Ct**t* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P 1 6 9 0 1 3 0 G

'*'* *'* * P0072800

C*«*** WHEN EXECUTING ONLY SEGMENT 169, THE FOLLOWING STATEMENT P0072805

C * * t * * N U VI = 6 MUST HAVE THE C= IN COLU MNS 1 A NO 2 REM OVED. P 0 0 7 2 8 1 0 C= NUVI = 6 P0072815

NBS FORTRAN Test Programs Version 1 165
1691

NUVI = 6

C****« WRITE HEADING FOR SEGMENT 169

WRITE (NUVI ,1690)

1690 FORMAT ( 1 H 1 , 1 X , 3 5 H B L K DT - (169) BLOCK DATA SUBPROGRAM//

A 1 6 H ASA RE F . - 8. 5//2X.7H RESULTS)

WRITE (NUVI, 1691)

FORMAT ( /28H TEST IS SUCCESSFUL IF EACH/

A28H GROUP CONTAINS SAME VALUES)

WRITE (NUVI, 1 692 ) JAX2I (1 , 1 ) , J AX 1 I ( 2 ) , JAX2I (2, 1 ) , JAX3I (2,2,

A , DX3S ( 1 . 2 , 1 ) , DX1S(1), DX2S(1,1), DX3S(2,2 f 1), DX2D(2,2)

B ,DX1D(2) , DX2D<2, 1 ) , DX3D(2,2, 1 ) , DX2C(2, 2) , DX 1 C(2)

C ,DX2C(2,1), DZ3C(2,1,1), DX2B(2,2), DX1B(2), DX2B(2.1)

D ,DX3B(2,2, 1 ) , JAX2I (3, 1 )

,

E DX3B(2,1,2). DX2S(2,2)

FORMAT (// 4(110/)//

A 4(F12.1/)//

4 ( 1 P D 1 6 . 1 / ) / / 4(0PF6 . 1 , F6 . 1 / ) /

/

4 <!"Ll"67") / / 3(2H ,A2/))

END OF TEST SEGMENT 169

* WHEN EXECUTING ONLY SEGMENT 169, THE STOP AND

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C

* COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

1 )

1692

C * * * *

C * * * *

C * * * *

C * * * * c=

c=

END

: IN

CARDS

P169B1

P1690H0

P16901 50

P 1 690 1 60

P 1690170

P 1 690 1 SO

P1690190

P1690200

P 16902 10

P1690220

P 1 6 9 0 2 3 0 P1 690240

P 1 6 9 6 2 5 6 P1690260

PI 6902 70

P1690280

P1690290

P1690300

P 1 6903 1 0 P1690320

PI 696330

P1 690340

P 1 6 9 0 3 5 0 P1 690360

PI 6 90370

P1690380

P1 69 CI

P1 69C2

c * * * * * ********************************************************* *********P4090010

C * * * * * P4090020

C * * * * * BLOKD - (409) P4090030

C * * * * * P4090040

[ t t * t t im t t t t t i i i i t » t t t t t t i n t t t t * t t t * t i t i * t t t t t < ( n i t t t t t i t » « i *********P4090050

c * * * * * GENERAL PURPOSE P4090060

c * * * * * THIS SEGMENT CONTAINS ONE BLOCK DATA SUBPROGRAM. P4090070

c * * * * * IT IS TO BE RUN WITH SEGMENT 169 P4090080

£***«* GENERAL COMMENTS P4090090

£**«** THIS SEGMENT USES ALL THE PERMISSIBLE STATEMENTS IN A P40901 00

C * * * * * BLOCK DATA SUBPROGRAM . THE DATA STATEMENT CONSISTS OF ALL P4090 1 1 0

C * * * * * TYPES OF VARIABLES AND ARRAYS. A HOLLERITH CONSTANT P4090120

c * * * * * IS ASSIGNED TO INTEGER, REAL AND LOGICAL P40901 30

BLOCK DATA P40901 40

COMMON /BLK1/JXVI, J AX 1 I ( 2 ) , JAX2I(3,3) P4090 1 5 0 A /BLK2/DXVS, DX1S(2), DX2S(2,2) P4090160

B /BLK3/DXVD, DX1D(2), DX2D(2,2) P40901 70

C /BLK4/DXVC, DX1C(2), DX2C(2,2) P40901 80

D /BLK5/DXVB, DX1B(2), DX2B(2,2) P4090190

E /BLK6/ JAX3 I (2 , 2 , 2 ) , DX3S(2,2,2), DX3D(2,2,2), P4090200

F DZ3C(2,2,2) , DX3B(2,2,2) P409021

0

DIMENSION CY3C(2,2,2) P4090220

DOUBLE PRECISION DXVD

COMPLEX DXVC

LOGICAL DXVB

INTEGER JXVI

DX1D, DX2D, DX3D

DX1C, DX2C, DZ3C, CY3C

DX1B, DX2B, DX3B

REAL DXVS

EQUIVALENCE ( DZ3 C ( 1 , 1 , 1 ) , CY3C(1,1,1))

DATA JAX2 1(1,1), J AX 1 1(2), JAX2 1(2,1), JAX3 1(2,2,1), DX3S ( 1 ,2,1

A DX1S(1), DX2S(1,1), DX3S (2,2,1), DX2D(2,2), DX1D(2),

B DX2D ( Z , 1 ) , DX3D ( 2 , 2 , 1 ) , DX2 C ( 2 , 2 ) , DX 1 C ( 2 ) , DX2 C ( 2 '".Tf,

C DZ3C(2,1,1), DX2B(2,Z), DX 1 8 ( 2 ) , DXZB(Z,1), DX3B(2,2,1),

D J A X 2 I ( 3 , 1 ) , DX3B( 2 , 1 , 2 ) , DX2S( 2 , 2 ) / 4 * 2 . 4 * 3 . 0 . 4 * 4 . 0 D 0 , 4 * ( 4 . , E 4*. TRUE., 2HAB, 2HAB, 2 H AB

/

* END OF TEST SEGMENT 409

END

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

***************************************************************

*

* BLKDA - (179)

P4090230

P4090240

P 4 09 02 5

6

P4090260

p 4 6 9 02 70

P4090280

P4 09 0290

P4090300

p 4090 3 1 0 P4090320

P4090330

P4090340

P 4090350

P4090360

* * * * p 1 7 9 0 0 1 0

P 1 790020

P 1 7 9 0 0 3 0 P 1 790 0 40

5 . )

1 66 NBS FORTRAN Test Programs Version 1
C«»»«»»t»«»««»««t«*«»«»t«t»«««t«t»*t»««»t««»»f»t«t*»*»»t*»»*«*»*«tt«t«»«pi790050

C«**** GENERAL PURPOSE ASA RE F P 1 790060

C * * * * *

C * t * * *

c * * * * *

c * * * * *

TO TEST BLOCK DATA

THIS SEGMENT IS TO

SEGMENT WRITES OUT

SUBPROGRAMS

BE RUN WITH

a SEGMENTS 419, 429 439 . 429

. 5THIS

439

P1 790070

P1 790080

PI 790090

P1 7901 00

P 1 7 9 0 1 1 0 P0013660

P 0 01 366 5 P0013670

POO 1 3675

P001 3680

P001 3685

P001 3690

POO 1 369 5 P0013700

P0013705

P 0 0 1 3 7 1 0 P 0 0 1 3 7 1 5 P0 0 1 3 720

"P 0 0 1 3 7 2 5 P0013730

PI 7 9 A

1

P1 79A2

P 1 79 A3

PI 79A4

PI 79 A 5 P1 79A6

P1 79A7

PI 79A8

P1 79A9

PI 79AA

P 0 0 1 3 7 3 5 PI 790 1 20

>' 0 0 72 8 2 0 P0072825

P 0072830

P0072835

P 1 7 9 B 1 PI 79 0 1 3 0 P1 790140

P 1 790 1 5 0 P1 79 01 6 0 PI 790 1 70

THE DATA FORMED IN SEGMENT 419

C * * * * *

c * * * * *

c * * * * *

c * * * * *

SPECIFICATIONS SEGMENT 179

WHEN EXECUTING ONLY SEGMENT 179, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

C**«** IN COLUMNS 1 AND 2 REMOVED.

C * * * * * C= DOUBLE PRECISION DXVD, DX1D, DX2D, DX3D

C= COMPLEX DXVC. DX1C, DX2C, D23C

C= COMMON /BLK1 / JXVI , JAX1 1(2), JAX2I (3,3)

C= A /BLK2/DXVS, DX1S(2), DX2S(2,2)

C="" B /BLK3/DXVD, DX1D(2) , 0X20(2.2)

C= C /BLK4/DXVC, DX1C(2), DX2C(2,2)

C= D /BLK5/DXVB, DX1B(2), DX2B(2,2)

C= E /BLK6/JAX3I (2,2,2) , DX3S(2,2,2),

C= F DZ3C(2, 2,2), DX3B(2,2,2)

C= LOGICAL DXVB, DX1B, DX2B, DX3B

DX3D(2,2,2)

DOUBLE PRECISION DXVD, DX1D,

COMPLEX DXVC, DX1C,

COMMON /BLK1 / JXVI , JAX1 1(2),

DX2D , DX3D

DX2C, D23C

JAX2I (3,3)

A /BLK2/DXVS, DX1S(2), DX2S(2,2)

B" /BLK3/DXVD. 0X10(2) , DXZb<2.2)

C /BLK4/DXVC, DX1C(2), DX2C(2,2)

"D /BLK5/DXVB, DX1B(2) , DX2B(2,2)

E /BLK6/JAX3I (2,2,2) , DX3S(2,2,2),

"F DZ3C(2,2,2). DX3B(2,2,2)

LOGICAL DXVB , DX1B, DX2B, DX3B

DX3D(2,2,2)

C * * * * *

C * * * * t

c * * t * *

c * * * * *

c * * * * *

OUTPUT T WHEN EXECUTING

NUVI = 6 MUST

APE ASSIGNMENT STATEMENT. NO INPUT TAPE

ONLY SEGMEN T 1 79, T HE F 61 LOWING STATEME NT

HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI = 6

C**«t* WRITE HEADING FOR SEGMENT 179

WRITE (NUVI, 1790)

1790 FORMAT ( 1 H 1 , 1 X , 32HB LKDA - (179) SEVERAL BLOCK DATA/ 16X,

1 1 1HSUB P ROGRAMS / 2 X , 14 HASA RE F - 8.5 / / 9.H RESULTS)

WRITE (NUVI, 1791)

1791 FORMAT (//28H TEST IS SUCCESSFUL IF EACH/

A28H GROUP CONTAINS SAME VALUES)

WRITE (NUVI ,1 792 ) JXVI , J AX1 I ( 1 ) . J AX 2 I ( 1 , 2 ) , J AX3 I ( 1 ,

1

, A DX1S(2), DX2S(1,2), DX3S(1,1.2), DXVD

B DX2D( 1 , 2 ) , 0X30(1.1, 2) . DXVC , D X 1 C ( 1 ) C DZ3C(1,1,2). DXVB, DX1B(1), DX2B(1,2)

D DX3B< 1,1,2), JAX2I ( 1,3),

E DX3B(2.2,2). DX2S(2,1)

1 792 FORMAT (// 4(110/)/ / A 4(F12.1/)//

2), DXVS,

DX1 D ( 1 )

,

DX2C( 1 .2)

B

C

D

E

4(1PD16.1/)//

4(0PF6.1 ,F6.1/>//

4(Li0/ ) /

7

3(2H ,A2/))

END CARDS

C****« END OF TEST SEGMENT 179

C**«** WHEN EXECUTING ONLY SEGMENT 179, THE STOP

C««*»* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C»**** IN COLUMNS 1 AND 2 REMOVED.

AND

C=

P 1 790 1 8 0 P 1 790 1 90

P 1 7902 0 0 P 1 7902 1 0

P 179022 0 P1 790230

P 1 7 9 0 2 4 0 P 1 7902 5 0 P 1 7 9 0 2 6 0 P1 790270

PI 790 2 8 0 P1 790290

P 17 9 0 3 0 0 P1 7903 1 0 P1 790320

P1 790330

P 1 7 9 0 3 4 0 P 1 7903 5 0 PI 790360

P1 790370

P 1 79 C

1

P1 79C2

C =

C = STOPEND

STOP

END

C*«»«»**«»***««»«tt»«*«*t»*»»t»«»«»t»««»««tt«*«»**«i«»««*»t««»««it«t»»»«P4i90010

C*«*** P4190020

NBS FORTRAN Test Programs Version 1 167
C***»* BLAKD - (419) P4 1 90030

C*,*;*** P4 190040

C

; '*

' *" *' ****************************************** * * * * * * t * * « * * t * * 1 1 * » * * t * * * * p 4 i 9 o o 5 6

C****« GENERAL PURPOSE P4 1 90060

C"*"*"*"*"*' THIS SEGMENT CONTAINS THE FIRST OF THREE BLOCK DATA S UBPROGRAMSP 41 90 0 70

C***** TO BE RUN WITH SEGMENT 179 P4190080

C *"*'"*"*"*' THESE SEGMENTS USE ALL THE PERMISSIBLE STATEMENTS IN A P4 1 90090

C.****,* BLOCK DATA SUBPROGRAM. THE DATA STATEMENTS CONSIST OF ALL P4190100

C

'*"*"*" *"*' TYPES OF VAR I ABLES AND ARRAY S. A HO LLERITH C ON ST ANT IS P 4 1 90 1 10

C***** ASSIGNED TO INTEGER , REAL, AND LOGICAL P4190120

BLOCK DATA P4 190 130

DOUBLE PRECISION DXVD. DX1 D . DX2D P4190140

COMMON /BLK 1 / JXV I , J AX 1 I ( 2 ) , JAX2I (3,3) P4 1 9 0150

A / BLK2 / DXVS, DX1S(2), DX2S(2.2) P4190160

B / B L K 3 / DXVD, D X 1 D ( 2 ) . 0X20(2.2) P41901 70

INTEGER JXVI P4 1 90 1 80

REAL DXVS . P4 190 190

DATA JXVI, JAX1 I ( 1 ) , JAX2K1.2). DXVS, DX1S(2) P41 90200

A ,DX2S(1 ,2), DXVD, 0X10(1 ) , DX2D(

1

,1)1 3 * 1 P 4 1 9 0 2 1 0

B ,3 * 2.0,3*4.000/, J AX2 I ( 1 . 3 ) , DX2 S ( 2 , 1 ) / 2HHP , 2HHP / P4190220

C

**'*'* * END OF TEST SEGMENT 419 P41 90230

END P4 1902.40

C *********************************************************************** P 4 2900 1 ^ C****« P4290020

C * * * * * BLBKD - (429) P4290030

t* *•*"»« P 4 2 9 0 0 4 g

C ***********************************************************************P4290b^

C****» TO BE RUN WITH SEGMENT 179 P4290060

C* * * * * THIS SEGMENT CONTAINS THE 2ND OF THREE 8L0CK DATA SUBPRbGRAMS P4290 0 70

C***** TO BE RUN WITH SEGMENT 179 P4290080

BLOCK DATA * P4290090

COMPLEX DXVC, DX1C. DX2C P4290100

COMMON /BLK 4 7 DXVC.DX1 C(2) , DX2C(2,2) P42901 1 0

C /BLK5/DXVB. DX1B(2). DX2B(2,2) P4290120

LOGICAL DXVB. 0X18, DX2B P4290130

DATA DXVC, DX1C(1), DX2 C ( 1 , 2 ) , DXVB , DX1 B ( 1 ) , DX2B ( 1,2)/ P4290140

D 3 * (3. ,4.), 3 * . FALSE. / P42901 50

C***** END OF TEST SEGMENT 429 P4290160

END P42901 70

Q***********************************************************************P4390010

C**»** P4390020

C***** BLCKD - (439) P4390030

C * * * * * P4390040

C***********************************************************************P4390050

C* * * ** THIS SEGMENT CONTAINS THE THIRD OF THREE BLOCK DATA S U B P R 0 G R A M S P 4 39 0 06 0 C***** TO BE RUN WITH SEGMENT 179 P4390070

BLOCK DATA P4390080

COMMON /BLK6/ JAX3I (2,2,2) ,DX3S(2,2,2) ,DX3D(2,2,2) P4390090

E ,D23C(2.2,2) . DX3B(2.2,2) P43901 00

DOUBLE PRECISION DX3D P4390110

DIMENSION CY3C(2,2,2) P4390120

COMPLEX D23C.CY3C P4390130

EQUIVALENCE (D23C (1 , 1 , 1 ) . C Y 3 C ( 1 , 1 , 1 ) ) P4390U6

LOGICAL DX3B P4390150

DATA JAX3I ( 1 , 1 ,2) , DX3S( 1 , 1 ,2) ,DX3D(1 , 1 ,2) , CY3C( 1 , 1 ,2) .0X38(1 , 1 , 2 ) / P4390 1 60

F 1, 2.0. 4.0D0, (3 . ,4. ) , . FALSE . / , 0X3B ( 2,2.2)/ P4390170

G 2 HHP / P4390 1 80

C « END OF TEST SEGMENT 439 P4390190

END P4390200

C** *********************************************************************P1800010

C* * * * * PI 800020

C***«* UNFRW - (180) P1800030

C***«* P 1 80 0 040

C*****************t*t******t********************tt*****«****************P1200050

C *

*' * *'* GEN ERAL PURP OSE ASA RE F P I 80 00 60

C«**** TEST OF UNFORMATTED READ AND WRITE STATEMENTS 7 . 1 . 3 . 2 . 4P 1 8000 70

C * * * * * 7. 1.3.2. 5P1 800080

C***«* SPECIFICATIONS SEGMENT 180 P1800090

168 NBS FORTRAN Test Programs Version 1
c

» * * t

C 1 1 * *

C * t * *

c * * * *

C * t * * c=

t WHEN EXECUTING ONLY SEGMENT 180, THE SPECIFICATION STATEMENTS

« WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

DIMENSION

DIMENSION

CMA1S(5)

CMA1S(5>

CMB1S(5) ,. CMB1S(5) ,AC 1 S < 2 5 > AC1SC25)

P0013740

P0013745

POO 1 3 75 0 P0013755

P001 3760

P0013765

PI 8 OA 1 P0 0 1 3 770

PI 8 0 0 1 0 0 P0072840

P 0 0 7 2 S 4 5 P0072850

P 0 0 7 2 8 5 5 P0072860

P0072865

P1 80B1

P 1 8 0 3 2 P0072870

P 1 8 0 0 1 1 0 P 1 80 0 1 2 0

5 P 1 8 0 0 1 3 0 P 1 8 0 0 1 40

P 1 80 0 1 5 0

P 1 8 0 0 1 60

C * * * *

c * * * *

C * t * *

c * * * *

c * * * *

c * * * * c=

c=

* OUTPUT TAPE ASSIGNMENT STATEMENTS. NO INPUT TAPE.

*

* WHEN EXECUTING ONLY SEGMENT 180, THE FOLLOWING STATEMENTS

NUV I =6 AND I NVI =9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI = INVI = NUVI =

I NVI =

c * * * *

180

WRITE (NUVI, 0180)

FORMAT ( 1 H1 , 1X f 30HUNFRW - (180) UNFORMATTED READ/ 14X,

1 2 2 H AND WRITE STATEMENTS/ /36H ASA RE FS - 7.1.3.2.4 AND 7.1

2//10H RESULTS > C

*"*"*"** HEADER FOR SEGMENT 180 WRITTEN

CMAVS = 1 . 5E01

3 . 2

CMBVS = -2.75E-0 P 1 MCAVI = 5 P 1 MCBVI = -10 P 1 DPAVS = 1 . 02E0 P 1 DPBVS = 9876. OE-2 P 1 CMA1SM ) = 1 . 0E0 P 1 CMA1S(2) = 2.0E0 P 1 CMA1S(3) = 3.0E0 P 1 CMA1S(4) = 4.0E0 P 1 CM A1 S < 5 ) = 5.0E0 rP 1t C**«** WRITE AND READ VARIABLES OF THE SAME TYPE p 1 REWIND INVI pr 1i WRITE (INVI) CMAVS, CMBVS P 1 r I WRITE (INVI) MCAVI, MCBVI D 1 r I WRITE (INVI) DPAVS. DPBVS P 1 r I WRITE (INVI) CMA1S D 1 r I WRITE (INVI) (CMA1SUVI). IVI = 1,5,1 ) D 1 r I REWIND INVI P 1 r I READ (INVI) CMCVS, CMDVS D 1 r I READ (INVI) MCCVI, MCDVI P1

READ (INVI) DPCVS, DPDVS P1

READ (INVI) CMB1S P1

READ ( INVI ) < AC 1 S ( IVI ) , IVI = 1,5,1 ) P1

C***«* CHECK RECORDS BY SUBTRACTING CORRESPONDING VALUES. P1

CMEVS = CMAVS - CMCVS P1

CMFVS = CMBVS - CMDVS P1

MCEVI = MCAVI - MCCVI P1

MCFVI = MCBVI - MCDVI P1

DPgVS = DPAVS - DPCVS P1

DPFVS = DPBVS - DPDVS P1

ACVS = CMA1 S < 1 ) - CM B 1 S < 1 ) P1

BCVS = CMA1S(2) - CMB1S(2) P1

CCVS = CMA1S(3) - CMB1S(3) P1

DCVS = CMA1S(4) - CMB1SU) P1

FFCVS = CMA1 S < 5 ) - CM B 1 S ( 5 ) P1

CMGVS = CM A 1 S < 1 ) - AC1S(1) P1

CMHVS = CMA1S(2) - AC 1 S < 2 ) P1

CMIVS = CM A 1 S < 3 ) - AC1S(3) P1

CMJVS = CMA1S(4) - AC 1 S ( 4 ) P1

CMKVS = CMA1 S ( 5 ) - AC 1 S ( 5 ) P1

WRITE (NUVI. 181) CMEVS, CMFVS, MCEVI, MCFVI, DPEVS, DPFVS, P1

1 ACVS, BCVS, CCVS, DCVS, FFCVS, CMGVS, CMHVS, CMIVS, CMJVS, P1

2 CMKVS P1

560

0181 FORMAT ( / / 2 ( F 2 0 . 1 0 / ) , 2 ( I 1 9 / ) , 7 ( F2 0 . 1 0 / ) ) P1 800600

NBS FORTRAN Test Programs Version 1 169
c * * t * * READ AND WRITE VARIABLES OF DIFFERENT TYPES

REMIND INVI

WRITE (INVI)

WRITE (INVI) CMA1SM),. CMA1 S < 2 > WRITE OWn CMA1S(3) , CMA1SU)

REWIND INVI

READ (INVI) CMCVS, MCCVI

READ (INVI) CMB1S(1>, CMB1S(2),

READ (INVI) CMB1S(3) , CMEVS = CMAVS - CMCVS

CMBVS 1 CMDVS

MCAVI - MCCVI

P 1 8006 1 0 P1800620

P1 800630

P1800640

P1 800650

P1 800660

P1 800670

P1 800680

P1 8 0 0690

P1800700

P 1 8 0 0 7 1 0 P 1 80 0720

P1 800730

P 1 800 740

PI 800 7 5 0 P1 800760

PI 800 770

P 1 800 780

P 1 8 00 790

P 1 8 00 800

P 1 8 0 0 8 1 0 P1 800820

P1 800830

P 1 80 08 40

P1 8008 5 0 P1 800860

P1 8 00870

P1 800880

P 1800 890

PI 8 00900

PI 8 009 1 0 PI 800920

Pi 8 0 0 9 3 0 P1 800940

"P 18 0 0 9 5 0 PI 800960

P 1 800970

P 1 800980

P 18 0 0 9 9 0 P 1 80 1 000

pi 8 bi

6 ib

P 1 8 0 1 020

CMAVS , MCAVI

CMBVS, MCBVI

CMA1S(5) , DPAVS, DPBVS

CMDVS, MCDVI

CMB1S(4) CM81S(5> , DP CVS DPDVS

CMFVS = MCEVI = MCFVI = DPEVS = DPFVS = CMGVS = CMHVS = CMIVS = CMJVS = CMKVS =

MCBVI

DPAVS

DPBVS

CMA1 S CMA1

CMA1

CMA1

CMA1

- MCDVI

- DPCVS

- DPDVS

0182

C * * * *

WRITE (NUVI

CMHVS

FORMAT

( 1 ) (2)

(3)

(4)

(5)

0182)

CMIVS, CMJVS

( "/ II

X

F 2 0 . 10 / )

CMB1S( 1 )

C M B 1 S (2)

CMB1S(3)

C M B 1 S ( 4 ) CMB1S(5)

CMEVS, CMFVS

CMKVS

2 (1 19 / ) , 7( F20

MCEVI, MCFVI, DPEVS, DPFVS, CMGVS

C * * * *

c * * * *

C * * * *

c * * * *

TEST UNFORMATTED

REWIND' INVI

WRITE (INVI)

WRITE ( INVI ) WRITE (INVI)

WRITE (INVI)

ENDFI LE

READ WITH NO

.10/))

LIST

CMAVS MCAVI

CM A IS

CMBVS, MCBVI

CMA1S(5) , CMA1 S ( 4

)

CAN NOT BE TESTED,

CMA1S(3) , CMA1S(2) , CM A 1 S < 1 ) BUT INCLUDED FOR ACCEPTANCE AS

A STATEMENT.

ENDFILE INVI

REWIND INVI

CHECK THAT A RECORD IS READ

VALUES OF THE THIRD RECORD

READ (INVI) CMCVS, MCCVI

READ (INVI)

READ (INVI) CMDVS, MCDVI

CMEVS = CMAVS - CMCVS

CMFVS = CMBVS - CMDVS

MCEVI = MCAVI - MCCVI

MCFVI = MCBVI - MCDVI

WHEN NO LIST IS SUPPLIED BY COMPARING

WRITE (NUVI, 0183) CMEVS, CMFVS, MCEVI . MCFVI P 1 8 0 1 030

183 F0RMAT(//2(F20. 10/), 2(119/)) P 1 80 1 0 40

WRITE (NUVI, 0184) P 1 80 1 0 5 0 184 FORMAT(37H0 ALL ABOVE ANSWERS SHOULD BE ZERO IF / P 1 8 0 1 060

1 37H THE READ AND WRITE RECORDS COMPARE. ) P1801070

REWIND INVI P1801080

c * * * * * END OF TEST SEGMENT 180 P 1 8 0 1 090

c * * * * * WHEN EXECUTING ONLY SEGMENT 180, THE STOP AND END P1 801 100

c * * * * * CARDS WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= P1S01110

c * * * t * IN COLUMNS 1 AND 2 REMOVED. P1801 120

C =

c =

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

c*

* *

* *

* *

* *

t

STOP

END

STOP

END *****************************************************************

BACUP (182)

** *************************************************************

* uENERAL PURPOSE ASA REF

WRITE A BLOCK, 1 02 4 WOR DS I N LENGTH, LI N F ORMATTED , 7 . 1 . 3 . 2

'." TO TAPE , BACKSPACE , READ TO MEMORY 7.1.3.3.

* 7.1.3.2.

* S P E C I F I C A T 1 0 N S SEGMENT 182

*

* WHEN EXECUTING ONLY SEGMENT 182, THE SPECIFICATION STATEMENTS....

P 1 8 0 1 1 3 0 P1801 140

P180C1

P180C2

* P 1 8 2 0 0 1 0 P1820020

" P T 8 2 do 30

P1 820040

* pi 82 00 5 6 P1 820060

5P1 82 0070

2P 1 82 008 0 4 P 1 8 2 0 0 9 0 P1 8201 00

POO 1 3 780

P0013785

1 70 NBS FORTRAN Test Programs Version 1
C****» WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0013790

C****» IN COLUMNS 1 AND 2 REMOVED. P0013795

c * * * * * P0013800

C= DIMENSION IV1K 1 024 ) P0013805

DIMENSION I VI I ( 1 024 ) P1 82A1

c * * * * * P 0 0 1 3 S 1 0 C***»* OUTPUT TAPE ASSIGNMENT STATEMENTS. NO INPUT TAPE . P 1 8 2 0 1 1 0

C * t * * * P0072880

C****» WHEN EXECUTING ONLY SEGMENT 182, THE FOLLOWING STATEMENTS P0072885

C***«* NUV I =6 AND I RV I =9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

.

P0072890

c * * * * * POO 72 8 9 5 C= NUVI = 6 P0072900

C= INVI = 9 P0072905

NUVI = 6 P1 82B1

INVI = 9 P 1 S 2 B 2

c * * * * * P007291

0

1820 F0RMAT( 1 H1 , 1 X , 28HBACUP - (182) BACKSPACE TAPE / / 2X , 1 8HASA RE F . 7

.

1 . P1 8201 20

33.3.2//9H RESULTS) P1 8201 30

WRITE (NUVI , 1820) P1 820140

C * * * * * HEADER FOR SEGMENT 182 WRITTEN P 1 82 0 1 5 0

c * * * * * P 1 S 2 0 1 6 0 REWIND INVI PI 82 0 1 70

C***«* CREATE A LIST, 1024 WORDS IN LENGTH, CONTAINING P 1 82 0 1 80

C***»* THE INTEGERS 1 TO 1024, ONE INTEGER PER WORD. P 1 8 2 0 1 9 0 ISVI = 0 P 1 8 2 02 0 0 MRRVI = 1 P 1 8 2 0 2 1 0 1821 ISVI = ISVI + 1 P 1 8 2 022 0

I V1 I ( I SV I ) = ISVI P 1 8 2 0 2 3 0 IF (ISVI - 1024) 1821, 1822, 1823 P 1 82 0 2 40

C«**** WRITE THE LIST TO AN INTERMEDIATE TAPE P 1 8 2 0 2 5 0 1822 WRITE ( INVI ) IV1

I

P1 820260

WR I TE ( NUVI , 1 828 ) MRRVI, (IVII(JCVI), JCVI=1,9), P 1 82 0 2 7 0

1 ( I V 1 I ( K C V I ) , K C V I = 1 0 1 6 , 1 0 2 4 ) P 1 8 2 0 2 8 0 C***«* CHANGE MEMORY VALUES TO 5 TIMES THE ORIGINAL VALUES P 1 82 029 0

ftft n n i / ; MRRVI = 2 P 1 8 2 0 3 0 0 ISVI = 0 PI 82 03 1 0 1825 ISVI = ISVI + 1 P 1 8 2 0 3 2 0

I V1 I ( I SVI ) = 5 * I SVI P 1 8 2 0 3 3 0 IF (ISVI - 1024) 1825,1826,1823 P 1 82 0 3 40

1826 BACKSPACE INVI P 1 82 0 3 5 0 Z****t WRITE THE CHANGED VALUES P 1 8 2 0 3 6 0 WR I TE ( NUV I , 1 828 ) MRRVI, (IV1KJCVI), JCVI = 1,9), P1 820370

1 ( IV1 I (KCVI ) ,KCVI=1016, 1024) P 1 82 03 8 0 MRRVI = 3 P 1820390

Ct.*«* READ INTERMEDIATE TAPE WHICH HAS BEEN BACKSPACED P 1 8 2 0 4 0 0 READ (INVI) I V 1 I P 1 82 0 4 1 0 REWIND INVI P 1 8 2 0 42 0 Zttttt WRITE INITIAL VALUES FROM BACKSPACED TAPE. P 1 82 0 4 3 0 WR I TE ( 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 ) , K V I = P1 820440

1 1016, 1024) P 1 8 2 0 4 5 0 1823 WRITE (NUVI. 1829) P 1 8 2 0 460

1 828 FORMAT ( / / 7H GROUP . I 3 , 3 ( / 2X . 3 ( I 6 ) ) . 3 ( / 2X , 3 ( I 6 ) ) ) P1 820470

1829 F0RMAT(//2X.33HGR0UPS 1 AND 3 SHOULD BE THE SAME/ P 1 8 2 0 4 8 0

I 30H AND GROUP 2. 5 TIMES GROUP 1) P 1 820490

C***»* END OF TEST SEGMENT 182 P1 820500

C***»* WHEN EXECUTING ONLY SEGMENT 182. THE STOP AND END P 1 82 0 5 1 0 C***«* CARDS WHICH APPEAR AS" COMMENT CARDS, MUST HAVE THE C = PI 8 2 0 5 2 0 C**t«* IN COLUMNS 1 AND 2 REMOVED. P 1 820 5 3 0 C= STOP P 1 820 5 40

C= END P 1 82 0 5 5 0 STOP P 1 8 2 C 1 END PI 82C2

C#*********3***»****t*i>t*t***«**»t***«»4» »** ******»***it*ts*t****»!«*«pi900010

c * * * * * P1 900020

C**»*» DOTRM - (190) P1 900030

c * * * * * P1900040

C««t«tlM«lltttt*lt«tt*ttttt*tl*««**«t«t<tt«ttttttt»«l«ttt*«tt ****t**t**pi900050

C * 1 1 1 * P1 900060

NBS FORTRAN Test Programs Version 1 171
GENERAL PURPOSE

DO LOOPS TESTEO WITH ALL ALLOWABLE

ASA REF P1900070

7.1.2.8 P1900080

TERMINAL STATEMENTS (I/O TESTED SEPARATELY)

CONTINUE, ASSIGN, LOGICAL IF

P1900090

P1900100

RESTRICTIONS OBSERVED

* Ml.,. M2 AND M.3 ARE .GREATER THAN ZERO,

P19001 10

7.1 .2.8/23P19001 20

* TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7 . 1 . 2 . 8 / 0 8P 1 900 1 30

THE DO AND IS IN THE SAME PROGRAM UNIT P1 900 H0

* TERMINAL STATEMENT IS EXECUTABLE BUT NOT A

GO TO, ARITHMETIC IF, RETURN., STOP.., PAUSE OR

7.1 .2.8/07P1 900 1 50

7.1 .2.8/10P1 9001 60

DO STATEMENT P1900170

* M1 f M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 . 1 . 2 . 8 . 2 / 5 4P 1 900 1 80

"t BRANCHES TO TERMINAL STATEMENT FOR MORE THAN ^- .

.

ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1900200

* CONTROL IS NEVER PASSED INTO RANGE OF DO FROM

OUTSIDE ITS RANGE

7.1 .2.8.2/44P1900210

P1900220

SPECIFICATIONS SEGMENT 190

P1900230

P 1 90 02 40

PO0 13820

WHEN EXECUTING ONLY SEGMENT 190, THE SPECIFICATION STATEMENTS P0013825

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

P0013830

P0013835

P 0 0 i 3 8 4 0 DIMENSION IAC1K5) POO 1 3845

DIMENSION IAC1M5)

0 U t P U f T A P E ASSIGNMENT STATEMENT. NO INPUT TAPE

P190A1

P0013850

P1 900250

P0072920

WHEN EXECUTING ONLY SEGMENT 190, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P0072925

P0072930

P0072935

P0072940

Cc= NUVI = 6

NUVI

="""6

C * * * * * WRITE (NUVI, 8906)

8906 FORMAT ( 1 H 1 , 1 X , 2 5 HDOTRM - (190) DO TERM I N AL / / 2X

,

-17HASA REF - 7.1 . 2 . 8 / / 2X , 7HRESU LTS ) C***»* HEADER FOR SEGMENT 190

P190B1

P0072945

P 1 900 260

P1900270

P1900280

P1900290

"8 p i 9 0 0 3 0 0 P 1 9003 1 0 C»**«* CONTINUE WITH

WRITE (NUVI. 8905)

FORMAT (//2X.23HTEST1

HEADER FOR CONTINUE

EXPLICIT IN CREMENT******  ««« «** tt***t7. 1.2

890 5 C * * * * CONTINUE

EXPLI CIT

EXPLICIT)

TEST

P1900320

P1900330

P1900340

P1900350

DO 1901 JACVI = 1,4,1

I AC1 I ( JACVI ) = JACVI

CONTINUE

IF ( I AC 1 I ( 1

) - 1 ) 1 909,1 902,1 909

IF ( I AC 1 I (2 ) -2 ) 1 909, 1 903, 1 909

IF (IAC1I(3)-3) 1909,1904,1909

1901

1902

1903

1904

C * * * * 19 0 9

P1900360

P1900370

P 1 9 0 0 3 8 0

P1900390

IF ( IAC1 I ( 4

) -4 ) 1909, 1905, 1909

* WRITE OUT ERROR MESSAGE

MRRVi = 1 WRITE (NUVI , 8904)MRRVI

FORMAT (/2X,6H**TEST, 11 , 1 X , 1 7H I ND I CATES ERROR * *

)

* ERROR FOR CONTINUE EXPLICIT TEST

P1900400

P1900410

P1 900420

P1900430

8904

C * * * t P1900440P1900450

P1 900460

P1900470

GO TO 8909

C***»* NO ERROR

C *

*'* t

'*

"' WRITE OU t CO NT 1 161 EXPLI CIT TEST IS SUCCESS

1905 MRRVI =

1

8903

P1900480

P1900490

P I 900 5 00

P 1 9 0 0 5 1 0 WRITE (NUVI ,8903)MRRVI

FORMAT ( /2X. 6H**TEST, I 1 , 1X, 1 2HSUCCESSFUL* *

)

* SUCCESS FOR CONTINUE EXPLICIT TEST

* CONTINUE TERMINAL IMPLIED TEST******»*******»**«»»*»*«7.1.2,

C * * * *

C * * * * P1900520P1900530

P1 9 00540

P 1 9 0 0 5 5 0 WRITE (NUVI, 8902)8902 FORMAT ( / / 2X , 22HTEST2 CONTINUE IMPLIED)

C***t* HEADER FOR CONTINUE IMPLIED TEST

8909 L CCV I =2

DO 7900 KBCVI = LCCVT,

4

7900 I AC 1 I ( K B CV I ) = KBCVI + 1

P1900560

P1900570

PI 9 b 05 80

P1900590

1 72 NBS FORTRAN Test Programs Version 1
C****« CHECK VALUES IN I AC 1 I ARRAY

IF (IAC1I(2)-3) 7909,8900,7909

8900 1 F ( I AC 1 I ( 3

) -4 ) 7909 . 8901 , 7909

8901 IF <IAC1IU>-5> 7909,7901 , 7909

P1900600

P1 90061 0 P 1 900620

P1900630

7909 MRRV I =2

WRITE (NUVI ,8904)MRRVI

C****» ERROR IN CONTINUE IMPLIED TEST

GO TO 8908

P1900640

P1900650

P 1 9 0 0 6 6 0 P1 900670

C * * * * 7901

WRITE OUT CONTINUE IMPLIED IS SUCCESS

MRRVI=2

WRITE (NUVI , 8 903 ) MRRV

I

SUCCESS IN CONTINUE IMPLIED TEST

P1900680

P1900690

P 1 900 700

C * * * * P1 90071 0 C * * * * * ASSIGN TERMINAL TEST * * * *** * ****** * *** * * * * *** * ** t *

WRITE (NUVI, 9908)

FORMAT ( //2X, 12HTEST 3 ASSIGN)

* .HEADER FOR ASSIGN TEST

***7.1 .2 8 P1900720

P1 900730

P 1900740

P1900750

9908

C * * * * 890 8 MDCVI = 0 ASSIGN 7904 TO JFCVI

DO 7 90 2 NECVI =2,5,2

MDCVI = MDCVI +1

P 1 900760

P1 900770

PI 900780

P 1 900790

7902 ASSIGN 7903 TO JFCVI

GO TO JFCVI , (7903 , 7904, 7904)

C****« AN ERROR IN ASSIGN TEST

7904 MRRV I =3

P1900800

P 1 9008 1 0 P 1 9 0 0 8 2 6 P1900830

P 19008 40

C * * * * P1 900850

WRITE (NUVI , 8904 ) MRRV

I

* ERROR FOR ASSIGN TEST

GO TO 8907

7903 IF (MDCVI -2) 7904,7905,7904

C * * * * 7905

P1900860

P1900870

PI 90 08 8 0 P1 900890

P 1 90 090 0 PI 9009 1 0

* ASSIGN TEST IS SUCCESS

MRRV I =3

WRITE (NUVI , 8903 ) MRRV

I

C * * * * * SUCCESS FOR ASSIGN TEST

c * * * * LOGICAL IF TERMINAL TEST*************************** * * * 7 . 1 . 2 WRITE (NUVI, 9905)

9905 FORMAT (7/2X . 1 6HTEST4 LOGICAL IF)

C***** HEADER FOR LOGICAL IF TEST

8907 KG CV I = 1 LHCVI = 3

ASSIGN 7908 TO K CV

I

DO 7906 JCVI = 1,3

8 P1900920

P 1 90 0930

P 19 0 0 9 4 0 P1900950

P1 900960

P1900970

7906

KGCVI = KGCVI +1

IF (KGCVI . EQ . LHCVI) ASSIGN 7907 TO KCVI

GO TO K CV I , ( 7908 , 7907 , 7908 )

* TEST IS SUCCESS

P1 900980

P1 900990

P 1 9 0 1 0 0 0 P1 901 01 0

C * * * * 79 0 7

P 1 9 0 1 02 0 P 1 90 1 030

P1 901 040

P 1 9 0 1 0 5 0 P 1 9 0 1 0 6 0

P 1 90 1 070

MRRVI =4

WRITE (NUVI , 8903 ) MRRVI

* SUCCESS FOR LOGICAL IF TEST

GO TO 9902

C * * * *

c * * * * 7908

* LOGICAL IF IS NOT SUCCESS

MRRVI =4

'WRITE (NUVI , "l190 4 ) MRRVI

* ERROR FOR LOGICAL IF TEST

P 1 9 0 1 0 8 0 P 1 90 1 090

P 1 9 0 1 1 0 0

c * * * * P1901 1 1 0 9902

C * * * * CONTINUE

* END OF TEST SEGMENT 190

P1901 120

P1901 130

P1 901 140

P1 901 1 50

P1 9011 60

P1 901 1 70

C***«* WHEN EXECUTING ONLY SEGMENT 190, THE STOP AND END

C**«** WHICH APPEAR AS. COMMENT CARDS MUST HAVE THE C=

C****« IN COLUMNS i

' AND 2 REMOVED

C= STOP

C =

CARDS

END

STOP

END

C*

c*

c*

c*

c*

c*

c*

***********t*******************************************

P1901 1 80

P190C1

P 1 90 CZ ******* it * * * p 1 9 1 Q .0 1 0 PI 91 0020

DOLMT - ( 191 P 1 9 1 0 0 3 0

)

*******************************************************

P1 91 0040

***********P1910Q5 0 ASA RE F P 1 91 006 0 7.1 .2.8/18P1910070

GENERAL PURPOSE

TEST DO LOOPS WHERE

NBS FORTRAN Test Programs Version 1 173
c * * * *

c * * * t

c * * * *

c * * * *

c * * * *

c * * * *

C * * * *

C * * * *

C * * * *

c * * * *

C * * * *

c * * * *

c * * * *

C * * * *

t * * * *

c * * * *

t * * * *

C * * * *

c * * * *

c * * * *

c * * * *

C * * * *

c"=

INITIAL

TERMINAL

INCREMENT VALUES

ARE COMPUTED AND SET AT OBJECT TIME

P 1 9 1 0080

P 1 9 1 0090

PI 91 0 1 00

P19101 10

P 1 9 1 0 1 20

.8/2 1 PI 91 01 30

. 8 / 0 8 P 1 9 1 0 1 4 0 P1910150

.8 / 0 7P 1 91 01 60

.8/10P1910170

P 1 9 1018 0 .2/54P1910190

. 2/01 P1 91 020 0 P 1 9 1 0 2 1 0 .2/44P1910220

P 1 91 0230

P1 91 02 40

P 1 9 1 0 2 5 0 POO 7295 0 P0072955

P0072960

P0072965

P0072970

P191B1

P0072975

P 1 9 1 0260

Pi 91 0270

P 1 9 1 0 2 8 0 P 1 9 1 0 290

PI 91 0300

PI 9 1 03 1 6

P 1 9 1 0320

P1 91 033 0 P1 91 0340

P 1 9 1 03 5 0 PI 91 0360

P 1 9 1 0370

PI 91 0380

P1 910 390

P 1 9 1 0400

PI 91 0410

P 1 9 1 0 42 0 P I 91 043 0 P 1 9 1 0 4 4 0 P 1 9 1 0 4 5 0 P191 0460

P1 91 0470

P1 91 0480

P 1 91 0 4 9 0 PI 9 1 0 5 00

P1 91 05 10

P1 91 0520

P 1 9 1 0 5 3 0 P1 91 C1

P 1 9 1 C 2 *****P1920010

P 1 9 2 0 0 2 0 P1 920030

Pi 92 0 0 40

*****P1920050

RE F P1 920060

.8/28P1920070

P 1 9 2 0 0 8 0 P1920090

P 1 9 2 0 1 0 0 P 1 92 0 1 1 0

. 8 / 2 1 P 1 92 0 1 2 0 .8/08P1920130

RESTRICTIONS OBSERVED

* M1, M2 AND M3 ARE GREATER THAN ZERO 7.1.2

* TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7.1.2

THE DO AND IS IN THE SAME PROGRAM UNIT

* TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7.1.2

GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR 7.1.2

DO STATEMENT

* M1, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7.1.2.8

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 . lT2 . 8 ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST

* CONTROL IS NEVER PASSED INTO RANGE OF DO FROM 7.1.2.8

OUTSIDE ITS RANGE

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 191, THE F 0 L L 0 W I N G

" STATE ME NT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI

C * * * *

1 914

WRITE (NUVI. 1914)

C * * * * *

FORMAT (1H1.1X.27HD0LMT - (191) DO SET LIMITS//2X,

1 8 HAS A REF. - 7 . 1 . 2 . 8 / /2X , 7HRESULTS ) HEADER FOR SEGMENT 191 WRITTEN

JACVI = 1

1911

KBCVI = 3 LCCVI = 1 NEC VI = 0 DO 1911 MDCVI = JACVI, KBCVI, LCCVI

NECVI = NECVi + JACVI + KBCVI + MDCVI + LCCVI

CONTINUE

C * * * * 1913

1915

C * * * *

C * * * * 1912

1916

C * * * *

i 91 7

c * * * *

c * * * *

c * * * *

c * * * *

c =

c =

IF (NECVI-21 ) 1913, 1912, 1913

ERROR

WRITE (NUVI ,1915)

FORMAT (/2X,24H**TEST INDICATES E R RO R * * / / 2 X , 1 0 H * * * * * * * * * *

)

DOLMT TEST FAILS, LIMIT VALUE SET INCORRECTLY

GO TO 1917

C 0 RRECT

WRITE (NUVI, 1916)

FORMAT ( /2X.1 9H* *TEST SUCCESSFUL** ) DOLMT TEST IS SUCCESSFUL

CO NT IN UE

END OF TEST SEGMENT 191

WHEN EXE CUT I N G 0 NL Y SEGMENT 191, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

I N COLUMNS 1 AND 2 REMOVED

STOP

END

STOP

END

C * * * * a************************************************************

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

DONSC - (192)

GENERAL PURPOSE ASA

TEST NESTED DO LOOPS 7.1.2

WITH 2, 3, 4,

5

levels

SPECIAL CONSIDERATION

5 LEVELS ARB ITRARILY ASSIGNED AS MINIMUM REQUIREMENT

RESTRICTIONS OBSERVED

* Ml. M2 AND M3 ARE GREATER THAN ZERO 7.1.2

* TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7.1.2

NBS FORTRAN Test Programs Version 1
Ctttti

C*«*»*

THE DO AND IS IN THE SAME PROGRAM UNIT

* TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7. 1 . 2.

P1 9201 40

8/07P1920150

C****«

c*«**«

GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE

DO STATEMENT

OR 7. 1 . 2 . 8/1 0P1920160

P 1 92 0 1 70

c «

C** *t*

* HI, M2 AND M3 ARE NOT REDEFINED WITHIN DO

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN

7

7

. 1 .

. 1 .

2.

2.

8 . 8 . 2/54P1920180

2/01P1920190

c****«

c***«*

ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1920200

P1 9202 1 0 c***«*

C**«**

SPECIFICATIONS SEGMENT 192 P1920220

P001 3860

c « WHEN EXECUTING ONLY SEGMENT 192, THE SPECIFICATION STATEMENTS P0013865

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P0013870

C** **«

c «

IN COLUMNS 1 AND 2 REMOVED. P001 3875

P0013880

c= INTEGER MCA3I (2,3,3)

INTEGER MCA3I (2,3,3)

P0013885

P 1 9 2 A

1

C** ***

C***** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE . P0013890PI 920230

c*****

c***«* WHEN EXECUTING ONLY SEGMENT 192, THE FOLLOWING STATEMENT

P0072980

P0072985

c****«

c*****

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED P0072990

P0072995

c= NUVI = 6

NUVI = 6

P0073000

P 1 9 2 B 1 c * * * * * WRITE (NUVI, 8920)

P0073005

P 1 920240

8920 FORMAT (1H1 . 1X.26HD0NSC - (192) NESTED LOOPS//

18HASA REF. - 7 . 1 . 2 . 8 / / 2X , 7HRESU LTS

)

2X, PI 92 02 5 0 P1920260

c * * * * *

c * * * * * HEADER FOR SEGMENT 192 WRITTEN

TWO LEVELS OF NESTING********************* * * * * * t * * * P1920270

********tt»pi920Z80

MRRVI =2

WRITE (NUVI ,8921 )MRRVI

P1920290

P 1 9203 0 0 8921

c * * * * * FORMAT ( / / 2X , I 1 , 1 X , 1 7HLEVELS OF NESTING)

HEADER FOR TWO LEVELS

P 1 9 2 0 3 1 0 P1 920320

JACVI = 0 DO 1922 KBCVI = 1, 2, 1 P1920330

P 1 92 0 3 4 0 JACVI = KBCVI *3 + JACVI

DO 1921 LCCVI = 1,5, 2

P1 920350

P1 920360

1921

JACVI = JACVI + LCCVI

CONTINUE

P1920370

Pi 9^0380

1922

C * * * * * CONTINUETEST JACVI FOR VALUE OF 27

P1920390

P1 920400

c * * * * * IF < JACVI -27 ) 1 924,1 923,1 924CORRECT

P1 9204 1 0 P1920420

1923

8922

WRITE (NUVI, 8922 ) FORMAT (2X, 19H**TEST SUCCESSFUL**)

P1920430

P1920440

c * * * * t TWO LEVELS OF NESTING IS CORRECT

GO TO 7927

P1920450

P1920460

c * * * * * 1924

ERROR

WRITE (NUVI, 8923)

PI 920 4 70

P 1 920 480

8923

c * * * * * FORMAT (2X,24H**TEST INDICATES ERROR**)TWO LEVELS OF NESTING IN ERROR

P 1 920490

P1920500

c * * * * * 7927

THREE LEVELS OF NESTING*******************

MRRVI=3

t * * t * * * 1

1

* * t *

«

* * ****P1920510

P1920520

C * * t * * WRITE (NUVI , 8921 )MRRVI

HEADER FOR THREE LEVELS

P1920530

P1920540

MDCVI = 0 DO 1927 LCCVI = 6,7

P1920550

P1920560

DO 1926 KBCVI = 8,10,2

DO 1925 JACVI = 1,3,1

P1920570

P1920580

1925

MDCVI = MDCVI + JACVI + KBCVI + LCCVI

CONTINUE

PI 920 5 90

P1920600

1926

1927

CONTINUE

CONTINUE

P1920610

P1920620

c * * * * * TEST MDCVI FOR VALUE OF 210

IF (MDCVI - 210) 1928,1929,1928

P1920630

P1920640

C * * * *

1

1928

ERROR

WRITE (NUVI, 8923)

P1920650

P1920660

NBS FORTRAN Test Programs Version 1 175
C * * * * * THREE LEVELS OF NESTING IN ERROR P1920670

60 TO 7928 P1920680

c * * * * * CORRECT P1920690

1929 WRITE (NUVI, 8922) P1920700

c * * * * * THREE LEVELS OF NESTING IS CORRECT P 1 9207 1

0

c * * * * * FOUR LEVELS OF NEST I NG **************************************** P 1 92 0 72

0

7928 MRRVI =4 P1 920730

WRITE ( NUVI , 892 1 > MRRV

I

P1920740

c * * * * * HEADER FOR FOUR LEVELS P1920750

IHDVI = 0 P1 920760

IGDVI = 0 P1920770

IFDVI = 0 P1920780

IEDVI = 0 P1 920790

ICVI = 1 P1920800

DO 7920 MDCVI = 2,3 P1920810

IHDVI = IHDVI + MDCVI IEDVI P1920820

DO 7920 LCCVI = 3,5,3 P1920830

IGDVI = IGDVI + LCCVI + IHDVI P1920840

DO 7920 KBCVI = 1 , 2 , I CVI P1920850

IFDVI = IFDVI + KBCVI + IGDVI P1920860

DO 7920 JACVI = 4,5,2 P1920870

IEDVI = IEDVI + JACVI + IFDVI P1920880

7920 CONTINUE P1920890

c * * * * * TEST IEDVI FOR VALUE OF 185 P1920900

IF (IEDVI - 185) 7921,7922,7921 P 1 9209 1

0

c * * * * * ERROR P1 920920

7921 WRITE (NUVI, 8923) P1920930

c * * * * * FOUR LEVELS OF NESTING IN ERROR P1920940

GO TO 7929 P1920950

C * t * * * CORRECT P1920960

7922 WRITE (NUVI, 8922) P1920970

c * * * * * FOUR LEVELS OF NESTING IS CORRECT P1920980

c * * * * * FIVE LEVELS OF NESTING*** *************************************P1920990

7929 MRRV I = 5 P 1 92 1 0 0 0 WRITE ( NUVI , 8921 )MRRVI P 1 92 1 0 1

0

c * * * * * HEADER FOR FIVE LEVELS P 1 92 1 020

IGDVI = 0 P 1 92 1 030

DO 7923 NECVI = 10,11,1 P 1 92 1 0 40

DO 7923 MDCVI = 4,5,1 P 1 92 1 0 5 0 DO 7924 LCCVI = 1,2,3 P 1 92 1 060

DO 7924 KBCVI = 6, 8, 4 P 1 92 1 0 70

DO 7924 JACVI = 1,3,2 P 1 92 1 0 80

IGDVI = IGDVI + JACVI -KBCVI +LCCVI -MDCVI +NECVI P 1 92 1 090

7924 CONTINUE P1921 100

7923 CONTINUE P1921 1 10

c * * * * * TEST IGDVI FOR VALUE OF 24 P1921 120

IF (IGDVI - 24) 7925, 7926,7925 P1921 130

C * * 1 1 * ERROR P 1 92 1 1 40

7925 WRITE (NUVI. 8923) P1921150

c * * * * * • FIVE LEVELS IN ERROR P1921 160

GO TO 9923 P1921 1 70

7926 WRITE (NUVI, 8922) P 1 92 1 1 80

c * * * * * FIVE LEVELS CORRECT P1921 190

C * * 1 1 * CONTROL VARIABLES FOR 3 DO LOOPS USED IN SUBSCRIPT EXPRESSIONS P1921200

c * * * * * FOR A 3 DIMENSIONAL ARRAY P 1 92 1 2 1 0 9923 WRITE(NUVI, 9920) P 1 92 1 220

9920 FORMAT( //2X.34HC0NTR0L VARIABLE USED IN .SUBSCRIPT ) P 1 92 1 230

IVI = 1 P1 921240

KVI = 0 P 1 92 1 2 5 0 8924 KVI = KVI + 1 P 1 92 1 260

JVI = 0 P 1 92 1 270

8925 JVI = JVI + 1 P 1 92 1 280

MCA3 I ( I VI , JV I , KVI ) = IVI 2*(JVI-1)+ 6«(KVI-1

)

P1921290

HCA3KIVI + 1.JVI.KVI) = IVI + 1 + 2 * ( J V I -

1 )+6*(KVI-1 ) P1 92 1 300

IFUVI-3 ) 8925.8926,8929 P 1 92 1 3 1 0

8926 I F < KVI -3 ) 8924 , 8927, 8929 P 1 92 1 320

8927 I IVI = 1 PI 92 1 330

DO 8928 KVI =1,3 P 1 92 1 3 40

176 NBS FORTRAN Test Programs Version 1
DO 8928 JVI = 1,3 P1921350

DO 8928 IVI = 1,2 P1 921 360

IAVI =HCA3I(IVI,JVI,KVI> - I I V

I

P 1 92 1 3 70

IF (IAVI) 8929, 8928. 8929 P1921380

8928 1 1 V I = 1 1 V I 1 P 1 92 1 3 90

WRITE (NUVI, 8922). P 1 92 1 4 0 0 GO TO 9921

8929 WRITE (NUVI, 8923)

P1 921 41 0 P 1 92 1 420

9921 CONTINUE P 1 92 1 43 0 C«**»* END OF TEST SEGMENT 192 P 1 92 1 440

C***«* WHEN EXECUTING ONLY SEGMENT 192, THE STOP AND END CARDS P 1 92 1 4 5 0 C***«* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 1 92 1 460

C****t IN COLUMNS 1 AND 2 REMOVED. P 1 92 1 470

C= STOP P 1 92 1 4 8 0 C= END P 1 92 1 490

STOP P 1 9 2 C 1 END P192C2

c*********************************************************** **«*********P1930010

C * t * * t P1 930020

C***** DONSI - (193) P1 930030

c * * * * * P1 930040

* * * * * * t * ****P1930050

C***«* GENERAL PURPOSE ASA REF P1930060

C***«* TESTS INCOMPLETE DO LOOP 7 . 1 . 2 . 8

.

1/19P1930070

C«**** RESTRICTIONS OBSERVED P 1 93 0 080

C****« * M1, M2 AND M3 ARE GREATER THAN ZERO 7. 1 . 2 . 8/21P1930090

C****« * TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7. 1 . 2 . 8/08P1930100

C*«*** THE DO AND IS IN THE SAME PROGRAM UNIT P 1 930 1 1 0 C****« * TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7. 1 . 2 . 8/07P1930120

C*«*** GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR 7. 1 . 2 . 8/10P1930130

C***«* DO STATEMENT P1 9301 40

C****« * M1. M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 . 1 . 2 . 8

.

1 /54P19301 50

C***«* * BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 . 1 . 2 . 8 . 1 /01P1930160

C****» ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1 9301 70

c * * * * * P 1 93 0 1 8 0 C***** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE • P1 930 1 90

c * * * * * P0 0 73 0 1 0 C***** WHEN EXECUTING ONLY SEGMENT 193, THE FOLLOWING STATEMENT P00 73 0 1 5 C***«* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED P0073020

c * * * * * P0073025

C= NUVI = 6 P0073030

NUVI = 6 P 1 9 3 B

1

c * * * * * P0073035

WRITE (NUVI, 1935) P 1 93 02 00

1935 FORMAT ( 1 H 1 , 1 X , 2 7HD0NS I - (193) INCOMPLETE D0//2X, P 1 9302 1 0 - 18HASA REF. - 7 . 1 . 2 . 8 / / 2X , 7HRESU LTS ) P 1 93 02 2 0 C**»** HEADER FOR SEGMENT 193 WRITTEN P1930230

KBCVI = 0 P1 930240

DO 1931 JACVI = 1,5,1 P 1 93 02 5 0 KBCVI = KBCVI + JACVI P1930260

IFUBCVI - 6) 1 931 , 1 930, 1 931 P1930270

1930 GO TO 1932 P1930280

1931 CONTINUE P1930290

C***t* ERROR EXIT P1930300

WRITE (NUVI, 1936) P 1 93 0 3 1 0 1936 FORMAT (1H0,2X,28H** INCOMPLETE LOOP IN ERROR**) P1930320

C***** INCOMPLETE LOOP TEST IN ERROR P1930330

GO TO 1937 P1930340

C***«* TEST JACVI FOR VALUE OF 3 7 . 1 . 2 .8. 1 /21P 1 9303 5 0 1932 IF (JACVI - 3) 1933,1934,1933 P1930360

C****» ERROR IN INDUCTION VARIABLE P1930370

1933 WRITE (NUVI, 1938) P1930380

1 938 FORMAT ( 1 HO , 2X , 3 1 H * * I NDU CT I 0 N VARIABLE IN ERROR**) P1930390

C***** INDUCTION VARIABLE SET INCORRECTLY OUTSIDE LOOP P1930400

GO TO 1937 P1 93041 0 1934 WRITE (NUVI, 1939) P1 930420

1 939 FORMAT ( 1 HO , 1 X , 3 OH * * I N COMP L ETE LOOP SUCCESSFUL**) P1 930430

C****« INCOMPLETE LOOP TEST SUCCESS P 1 930440

NBS FORTRAN Test Programs Version 1 177
1l 937 7 J 1

fj * * * * * CONTINUE

END OF TEST SEGMENT 193

P1 930450

P1930460

c

* * * * *

C * * * * * WHEN EXECUTING ONLY SEGMENT 193, THE STOP AND END

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

CARDS P1 930470

P1930480

c « * * * * c=

IN COLUMNS 1 AND 2 REMOVED.

STOP

P1 930490

P1930500

r = END

STOP

P 1 930 5 1 0 P193C1

c****«

END

«t »** »««««*««*»««**««*«*««*««****«**«*«t««t»***t*** *******

P1 9~3C2

* * * *P1 9400 1 0

r * * * * * c***«* DONSX - (194)

P1 940020

P1940030

c * * * * * c****«

P 1 940 0 40

t«««»««**t*t*««t*t*«**»*t*t»****»**»**»**tt*»«»**t»ttt«*»t*»****t»pi940050

r « * * * * c*****

GENERAL PURPOSE

TESTS EXTENDED RANGE OF DO LOOP VARIABLE

ASA

7.1.2

REF P1940060

.8.2P1940070

c * * * * * c*****

RESTRICTIONS OBSERVED

* M1, M2 AND M3 ARE GREATER THAN 2ERO 7.1.2.

P1940080

8/21P1940090

c * * * * * c*****

* TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS

THE DO AND IS IN THE SAME PROGRAM UNIT

7.1.2. 8/08P1940100

. P19401 10

c * * * * * c****«

* TERMINAL STATEMENT IS EXECUTABLE BUT NOT A

GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR

7.1.2.

7.1.2.

8/07P1940120

8/10P1940130

c * * * * * c****«

DO STATEMENT

* M1, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 .1.2.8.

P1 9401 40

2/54P1940150

c * * * * * c*****

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST

.1.2.8. 2/01P1940160

P1 9401 70

c * * * * * c*«***

* THE EXTENDED RANGE OF A DO DOES NOT CONTAIN A 7 DO OF THE SAME PROGRAM UNIT THAT HAS AN

.1.2.8. 2/48P1940180

P 1 940 1 90

c * * * * * c****«

EXTENDED RANGE. P1940200

P 1 94 02 1 0

c * * * * * c****«

SPECIFICATIONS SEGMENT 194 P1 940220

P00 1 3900

c * * * * * c****«

WHEN EXECUTING ONLY SEGMENT 194, THE SPECIFICATION STATEMENTS P0013905

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= PO0 1 39 1

0

c* * * * * c*****

IN COLUMNS 1 AND 2 REMOVED. P00 1 39 1 5 P0013920

c=

c= DIMENSION IAC1K5)

INTEGER 131(2,2,2)

P0013925

P00 1 3930

DIMENSION IAC1K5)

INTEGER 131(2,2,2)

P194A1

P1 94A2

C* * * * * c***** OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

P0013935

P 1 940230

C* * * * * c****« WHEN EXECUTING ONLY SEGMENT 194, THE FOLLOWING STATEMENTP0073040

P0073045

c* * * * * c****«

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED P0073050

P0073055

c= NUVI = 6

NUVI = 6

P0073060

P1 94B1

c * * * * * WRITE (NUVI, 8944)

P0073065

P1940240

8944 FORMAT ( 1 H 1 , 1 X . 3 1 HDONSX - (194) EXTENDED DO RANGE//2X,

1 2 0 HAS A REF. - 7 . 1 . 2 . 8 . 2 / / 2X , 7HRESULTS )

P1 940250

P 1 940260

c * * * * *

C * * * * * HEADER FOR SEGMENT 194 WRITTEN P1940270EXTENDED RANGE FROM SINGLE LE VE L ****************************** P 1 94 02 8

0

MRRVI=1

WRITE (NUVI ,8942)MRRVI

P1 940290

P1940300

8942

c * * * * * FORMAT ( / / 2X , 26HEXTENDED RANGE FROM LEVEL ,11)

HEADER FOR SINGLE LEVEL WRITTEN

P1 9403 1 0 P1940320

DO 1941 JACVI = 1,4,2

I AC 1 I ( J ACV I ) = JACVI

P1 940330

P1940340

1943

GO TO 1942

IF(JACVI-I) 1945,1941,1945

P1 940350

P1940360

1941 CONTINUE

GO TO 1949

P1940370

P1940380

C * t * * t 1942TEST JACVI FOR VALUE OF 1 IF (JACVI - 1) 1946,1943,1946PI 940390

P1 940400

c * * * * * 1946TEST IAC1K1) AND IAC1M3) FOR VALUES OF 1 AND 3 IF (IAC1KD-1 ) 1 947.7946, 1 947

P1 94041

0

P1 940420

1 78 NBS FORTRAN Test Programs Version 1
7946 IF < I AC 1 I < 3

) -3 ) 1 947,1 943,1947

C***tt ERROR

1947 WRITE (NUVI , 794 7)

7947 FORMAT ( / 2X , 2 4H * * TEST INDICATES ERROR**)

C****» ERROR IN SETTING OF I AC 1 I ARRAY. LOOP NOT WORKING

GO TO 8940

C"*"*"*"V* TEST JACVI FOR VALUE OF 3 1945 IF (JACVI - 3) 1948,1941,1948

C***«* ERROR

1948 WRITE <NUVI f 7947)

C"*"*"*'"*"* ERROR IN SETTING OF INDUCTION VARIABLE

GO TO 8940

P1940430

P1 940440

P 1 9404 5 0 P1 940460

P 1 940470

P1940480

P1 940490

P1 940500

P 1 940 5 1 0 P1 940520

PI 940 5 3 0 P1 940540

P 1 9 4 0 5 5 0 PI 94 0 5 60

P1 940570

P1 940580

>P1 940590

P 1 94060 0 P 1 9 4 0 610

P1 940620

P 1 9 4 0 6 3 0 P 1 940640

P 1 9406 5 0 P1 940660

P 19406 70

P1 940680

"P 1 9 4 0 6 9 0 P1 940700

P 1 9407 1 0 P1 940720

P1 940 73 0 P1940740

P 1 9 4 0 7 5 0 P 1 9 4 0 760

P 1 940 770

P 1 9 4 0 7 8 0 P 1 9407 9 0 P 1 940 8 0 0 P 1 9 4 0 8 1 0 P 1 940 82 0 P1 940 830

P1 940840

P 1 940 8 5 0 P1 940860

P 1 9 4 0 8 7 0 P 1 940 8 8 0 P 1 9 4 0 8 9 0 PI 940 90 0 P 1 9 4 0 9 1 0 P1 940920

P 194093 0 P 1 940940

P 1 9 4 0 9 5 0 P 1 940960

"p

1 9409 70

P1 940980

P 1940990

P1 941 000

P 194101 6

P1 941 020

P1 94 1 03 0 P1 941 040

P1 941 050

P1 941 060

P 1941 0 70

P 1 9 4 1 0 8 0 P 1 9 4 1 0 9 0 P1 941 1 00

1949

79 4 9

C * * * * 8940

C « * * *

WRITE (NUVI, 7949)

FORMAT (/2X,19H**TEST SUCCESSFUL**)

* EXTENDED RANGE SUCCESS FOR SINGLE LEVEL

MRRVI=2

* EXTENDED RANGE FROM DOUBLE LEVEL*************************

WRITE (NUVI , 8942 ) MRRV

I

C * * * * * HEADER FOR DOUBLE LEVEL WRITTEN

DO 7940 KBCVI = 3,4

DO 7940 JACVI = 1,2,3

GO TO 7941

8947

7 9 40

C t * * * 7941

C * * * * 7942

I GOV I = 1 CONTINUE

TEST JACVI FOR VALUE OF 1 IF < JACVI -1 ) 7942 , 7943 , 7942

* ERROR

WRITE (NUVI, 7947)

C****t DOUBLE LEVEL NESTING IN ERROR

GO TO 8946

C * * * * 7943

7944

C * * * * 7945

C * * * * 8946

* TEST KBCVI FOR VALUE OF 3 OR

IF (KBCVI-3) 7942,8947,7944

IF (KBCVI -4) 7942,7945,7942

* CORRECT

WRITE (NUVI ,7949)

* DOUBLE LEVEL TEST CORRECT

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

8952

131(2,2,2) = -2

FORMAT(//2X,40HEXTENDED RANGE CONTAINING A DO STATEMENT)

WRITE (NUVI , 8952)

DO 8948 IVI = 1,2

131(1, 1.IVI) = 131(1,1, IVI) + 1 DO 8948 JVI = 1,2

13 1(1, J VI, I VI) = 131(1, J VI , IVI > + 2 GO TO 8949

895 1 8948

8950

8949

8954

8953

C * * * *

C * * * *

c * * * *

c * * 1

1

c=

CONTINUE

CONTINUE

WRITE (NUVI , 8950 ) 13 1 FORMAT ( 8 ( / 1 5 ) /30H THE ABOVE 8 VALUES SHOULD BE/

.. „.„.„. ...» DESCENDING ORDER FROM 8 TO 1 ) GO TO 8953

DO 895 4 KVI = 1 ,2

131 (KVI , JVI , IVI ) = 131 (KVI , JVI , IVI ) + 3 CONTINUE

GO TO 8951

CONTINUE

* END OF TEST SEGMENT 194

« WHEN EXECUTING ONLY SEGMENT 194, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

NBS FORTRAN Test Programs Version 1
C= END

STOP

END

itttttttttitHlltitttitttillttltlHittttttHltllltiltllHttttl

P1941110

P 1 9 4 C

1

p 1 9 4 C 2

* * * *P 1 95001 0

DONML (195)

P1950020

P1950030

PI 9500 40 ********** « *******************************************************pi950050

GENERAL PURPOSE

TESTS TWO INDEPENDENT LOOPS NESTED

WITHIN LARGER ONE

RESTRICTIONS OBSERVED

ASA

7.1.2,

REF P1950060

8/28P1 950070

P1950080

P1950090

* M1, M2 AND M3 ARE GREATER THAN 2ERO 7.1.2

* TERMINAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7.1.2

THE DO AND IS IN THE SAME PROGRAM UNIT

* TERMINAL STATEMENT IS EXECUTABLE BUT NOT A 7.1.2

8/21P1950100

8/08P1 950 1 1 0 PI 95 01 20

8/07P1950130

GO TO, ARITHMETIC IF, RETURN, STOP, PAUSE OR

DO STATEMENT

TUT, M2 AND M3 ARE NOT REDEFINED WITHIN DO

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN

ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST

7.1.2 8/10P1950140

P19501 50

1 / 5 4 P 1 9 5 0 1 6 0

1/01P1950170

7.1.2.8

7.1.2.8

P1950180

P 1 9 5 0 1 9 0 PI 950200

P0073070

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

WHEN EXECUTING ONLY SEGMENT 195, THE FOLLOWING STATEMENT

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

P0073075

P0073080

P0073085

NUVI = 6 P0073090

NUVI = 6

C * * * * * WRITE (NUVI, 1950)

1 95 0 FORMAT ( 1 H 1 , 1 X , 3 OHDONML - (195) MULT-LEVEL L00PS//2X,

- 1 8HASA REF. - 7.1 . 2. 8//2X,7H RESULTS)

C***** HEADER FOR SEGMENT 195 WRITTEN

P195B1

P0073095

P I 9502 1 0

P1950220

P1950230

P1950240

P1950250

P1950260

IHDVI = 1 IGDVI = 2 IFDVI = 3

DO 1951 JACVI = 1.2

P1950270

P1950280

P1950290

P1950300

IFDVI = IFDVI JACVI

DO 1952 KBCVI = 2.4,1

IGDVI = IGDVI + i 1952 CONTINUE

IFDVI = IFDVI IGDVI

DO 1953 LCCVI = 6,7,3

IHDVI = 1 IHDVI

CONTINUE

P1950310

P1950320

P 1 9 5 033 0

P1950340

1953

P1950350

P1950360

P1950370

P1950380

IFDVI = IFDVI + IHDVI

1951 CONTINUE

C * * *

*' * TEST IFDVI FOR VALUE OF 24

IF (IFDVI - 24) 1954,1955,1954

P1950390

P1950400

P 1 9 5 6 4 1 0 P1950420

C****» ERROR

1954 WRITE (NUVI, 1956)

1 956 FORMAT ( /2X, 24H* *T EST I NO I CAT ES ERROR**

)

C » MULTI-LEVEL TEST IN ERROR

P1950430

P1950440

P1 950456

P1950460

GO TO 1958

C** *«* CORRECT

WRITE (NUVI. 1 95 7 ) FORMAT ( /2X. 19H**TEST SUCCESSFUL**)

1955

19 5 7

C * * * 1958

P1950470

P1950480

P1 9 50496

P1950500

** MULTI-LEVEL TEST CORRECT

CONTINUE

*« END OF TEST SEGMENT 195

** WHEN EXECUTING ONLY SEGMENT 195. THE STOP AND END CARDS

C * * *

c * * *

P 1 95 0 5 1 0

P1950520

P 1 9 5 0 5 3 0

P1950540

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

C « IN COLUMNS 1 AND 2 REMOVED.

STOP

C= END

STOP

END

C =

P1950550

P1950560

P195C1

P195C2

80 NBS FORTRAN Test Programs Version 1
C** »*«t******»*t******«**t*t**«******t*t««**t«*tt***i»t*»t*t*t»t»**tt«»*pi960010

C***»* P1960020

C **'*'*'* DON 1*0 - (196) P 1 9 60030

C* **** P1 960.0 4 0 [i ti«i*tiiti«n tttiitimitii ti tt t»t*) t»< tt« tti ttntttittt tttiittit tttn tf'1 9 60056

C***«* GENERAL PURPOSE ASA RE F P1 960060 TM~

TE sf DO LOOPS WHI CH HAVE 1/0 TERMINAL 7.1.2.8 PI 9 60 0 70

C***** STATEMENTS (FORMATTED READ, FORMATTED WRITE 7 . 1 . 3 . 2 . 2 P 1 960 0 8 0 C*V AND REWIND ARE USED AS TERMINAL STATEMENTS

)

7 .1. 3.2 .3 P 1 96 00 9 0 C***«* 7. 1 .3 .3 . 1P1 960 1 00

C * * * * * RESTRICTIONS OBSERVED P1 9601 1 0 C****« * M1, M2 AND M3 ARE GREATER THAN 2ER0 7 . 1 . 2 . 8 / 2 1 P 1 96 0 1 2

0

_....„..„ .... TERM I NAL STATEMENT OF EACH DO PHYSICALLY FOLLOWS 7.1 . 2 . 8/ 0 8 P 1 9 6 0 1 3

0

C***«* THE DO AND IS IN THE SAME PROGRAM UNIT P 1 960 1 40

C

********

* TERM I NAL STATEMENT IS EXECUTABLE BUT NOT A 7 .T72 . 8 / 0 7P 1 96 0 1 5 0 C****« GO TO. ARITHMETIC IF, RETURN. STOP, PAUSE OR 7 . 1 . 2 . 8 / 1 OP 1 960 1 60

C * * * * * DO STATEMENT P 1 960 1 70

C**«** * M1, M2 AND M3 ARE NOT REDEFINED WITHIN DO 7 . 1 . 2 . 8 . 2 / 5 4P 1 960 1 8

0

C

*'* * *"*

* BRANCHES TO TERMINAL STATEMENT FOR MORE THAN 7 . 1 . 2 . 8 . 2 / 0 1 P 1 960 1 9 0 C***** ONE DO ARE CONTAINED IN INNERMOST DO OF A NEST P1960200

C*"*'*"* * PI 9602 1 0 C**«** S P E C I F I CATIONS SEGMENT 196 P1960220

C * * * * * POO 1 3940

C***** WHEN EXECUTING ONLY SEGMENT 196, THE SPECIFICATION STATEMENTS P0013945

C

* ****** **** WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C= PO0 1 39 5 0

C * * * * * IN COLUMNS 1 AND 2 REMOVED. POO 1 39 5 5

C*'***« * * * P O O 1 3 960

C= DIMENSION IAC1 I (5) ,AC2S(5.6) P0013965

C= LOGICAL MCAVB.MCBVB.GH2B(1 ,2) POO 1 39 70

C= DOUBLE PRECISION CC3D ( 7 , 2 , 2 ) , DPAVD , DPBVD P00 1 3975

C= COMPLEX NUMVCDENVC, LL1 C(32) PO0 1 398 0 DIMENSION I AC 1 I ( 5 ) , AC2S ( 5 , 6 ) P196A1

LOGICAL MCAVB , M CBVB , GH2 B ( 1 , 2 ) P196A2

DOUBLE PRECISION C C3D ( 7 , 2 , 2 ) , DPAVD , DPBVD P196A3

COMPLEX NUMVC,DENVC,LL1C(32) P196A4

C***** P0013985

C

*'**"*"*"* 0 li f P U f

T" A P E ASS IGNMENT STATEMENTS . NO I NPUT TAPE. PI 96023 0 C***** P0073100

£*«*'*'* WHEN EXECUTING ONLY SEGMENT 196, THE FOLLOWING STATEMENTS PO 0 73 1 0 5 C***** NUV I =6 AND I N V I = 9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. P 0 0 7 3 1 1 0

C

***** ****** POO 73 11 5 C= NUVI = 6 P0073120

C= IN V I = 9

' P 0 0 7 3 1 2 5 NUVI = 6 P196B1

INVI = 9 P196B2

C***** P0073130

WRITE ( NUVI . 1 96 0 ) PI 960240

1 960 FORMAT ( 1 H 1 , 1 X , 3 1 HDON I 0 - (196) DO LOOPS WITH I/0/16X, P 1 9602 5 0 119HTERMINAL STATEMENTS/ 20H ASA REF. -7.1.2.8/ 9H RESULTS) P 1 96 0 260

C***«* HEADER FOR SEGMENT 196 WRITTEN P1960270

KCAVI ""=

1 P 1 960280

CKAVS = 1.0 P1 960290

DPBVD = 1.6 DO P 1 9603 00

DENVC = (1.0.1.0) P 1 96 0 3 1 0 MCBVB = .TRUE. P 196032 0 IAC1K2) = 1 P 1 960330

AC2S(4,3) = 1. P 1 9 6 0 3 4 0 CC3D( 5, 1 ,2 ) = 1 .000 P 1 9603 5 0

L L 1 C ( 2 ) = (1.6,1.0) P 1 9 6 0 3 6 0 GH2B(1,1) = .TRUE. P1960370

WRITE ( I NVT, 1 965 ) KCAVI, CKAVS, DPBVD, DENVC, MCBVB, IAC1K2) , P 1 9 6 0 3 8 0

1 AC2S(4,3), CC3D(5,1,2), LL1C(2), GH2B(1,1) P1960390

RE W I ND INVI P 1 960 40 0 DO 1 964 JACVI = 1,3,1 P 1 960 4 1 0 C * * * * * P1 960420

DO 1961 KBCVI = 1,1,1 P1960430

1961 READ < INVI . 1 965 ) MCAVI , CMAVS, DPAVD, NUMVC, MCAVB, I AC 11 (KBCVI), P1 960440

1 AC2S(5,4), CC3D(6,1,2), LL1C(3), GH2 B ( K B CV I , 2 ) P1960450

NBS FORTRAN Test Programs Version 1 181
c * * * * * P1960460

1 962

UU ITOC L b L V 1 REWIND INVI

.!...»..*. ... .! P1960480

c * * * * * P1960490

DO 1963 MDCVI = 1,1,1 P1 960500

1963 WRITE (NUVI , 1966) MCAVI, IAC1I(1), CMAVS, AC2S < 5 , 4 )

, DPAVD

,

P1960510

1 CC3D(6,1,2), NUMVC, LL1C(3), MCAVB, P1 960520

2

a i 1 ^ n * Wk\ A. A \ j k A A. A t 1 * A h GH2B(MDCVI , MDCVI+1

)

P1 960530

1964 CONTINUE P1960540

WRITE ( N U V I , 1 9 6 7 ) P 1 9605 50

C * * t * * FORMAT STATEMENTS FOR THIS SEGMENT P1960560

1 965 FORMAT (2( 15. F5 . 1 .08. 1 ,2(F5 . 1 ) , L5)

)

P1960570

1966

1 967

FORMAT ( // 2< I 1 0/ ) , 2( F1 1 . 1 / ) , 2(01 5 . 1 / ) ,2( F5 . 1 , F6. 1 / ) ,2(L10/ ) ) P1 960580

FORMAT <//30H THIS TEST IS SUCCESSFUL IF 3/38H IDENTICAL GR0UPP1 960590

IS OF OUTPUT HAVE BEEN / 1 2 M GENERATED.) P 1 96060 0

* END OF SEGMENT 196 P 1 9606 1

0

* WHEN EXECUTING ONLY SEGMENT 196. THE STOP AND END CARDS P 1 9 60620

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P1960630

* IN COL UMNS 1 AND 2 REMOVED. PI 9 60640

STOP P1960650

END PI 960660

STOP P196C1

END P196C2

iiiii<*tinttti<«ttittitttiititt«itnt«iiiiii>tiinii»tttniiitttt»Pi970010

* P1 970020

* M0RD0 - (197) P1970030

* PI 9700 40

»t«**«******»»tt***********»*»»a*4*t«*»*t««**«»»»»«**t«t(r»**t«»*»»»P1970050

* GENE R A L PURPOSE ASA RE F

* A MO R E CO M P L I CATE D S EG M E NT TEST I NG THE DO STATEMENT 7 .1 ,2.... *

* SPECIFICATIONS SEGMENT 197

C * * * *

c * * * *

c * * * *

c * * * * c=

c=

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c

* * * t

c * * * *

c * * * *

c * * * *

c * * * * c=

WHEN EXECUTING ONLY SEGMENT 197 THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C = IN COLUMNS 1 AND 2 REMOVED.

DIMENSION

DIMENSION

IAC1 1(5), MCA1 1(5)

I AC 1 I ( 5 ) , M CA'i I ("5 ) c * * * *

c * * * *

c * * * *

c

* t * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

* WHEN EXECUTING ONLY SEGMENT 197, THE SEGMENT 005, WHICH

* CONTAINS THE STATEMENT FUNCTIONS BEING USED HERE, MUST BE

* I NSERTED A FT ER TH E SPECI F I CATION ST AT EM EN T S OF SEGMENT 19 7.

*A*****************************************************************

* BSFDF " ( 0 0 5 )

t t t t t t t I t t t i I I 1 t i i i t 1 1 I U t t t I 1 I I I t I t I t I t I t I t t i I t I I 1 t « t 1 t I t t t t t I I t I

* GENERAL PURPOSE ASA REF

* DEFINING STATEMENT FUNCTIONS THAT ARE TO BE TESTED

* I N SEGMENT 1 97 .8.1.

* HEADER FOR SEGMENT 005

* DEFINING EXPRESSION CONTAINS CONSTANTS AND VARIABLES

CMAFS( CAWVS, CBWVS) = CAWVS * 2. + CBWVS

CMBFSCMAWVI ,MBWVI ,MCWVI ) =(MAWVI + MBWVI + MCWVD/3

MCAFi ( MAWVI , MBWVI ) = MAWVI * * MBWVI

MCBF I ( CAWVS , CBWVS , CCWVS) = (CAWVS + CBWVS + CCWVS) * 2.0

* DEFINING EXPRESSION CONTAINS CONSTANTS, VARIABLES AND'

* INTRINSIC FUNCTIONS

CMCFS( CAWVS , CBWVS, CCWVS) = ABS ( CAWVS * * 2 - ( C BWVS + CCWVS ) *"* T)

CMDFS(MAWVI , MBWVI ) = I S I G N ( ( M AW V I + M B W V I ) , ( M A W V I - M B W V I ) ) MCCF I (MAWVI , MBWVI , CAWVS) = MAW V I * * 2 + MBWVI * * 2 + "l F I X ( CAWVS ) * *2

MCDFI ( CAWVS, CBWVS, CCWVS, CDWVS, CEWVS) = (CAWVS + CBWVS + CCWVS + 1CDWVS + CEWVS ) * * ( ABS ( CAWVS )

j

* DEFINING EXPRESSION CONTAINS PREVIOUSLY DEFINED STATEMENT

* FUNCTIONS AND/OR EXTERNAL FUN CT I ON REFERENCES

CMEFS( CAWVS, CBWVS) = CMBFS(1,2,3) + SQRT((CAWVS + CBWVS))

P1970060

8P1 970070

P1 970080

P1970090

POO 1 3990

P0013995

POO 1 4000

P001 4005

POO 140 10

P00 1 40 1 5 P1 97A1

P0014020

P 1 9 7 0 1 0 0 P19701 10

P 1 970 1 20

P1 9701 30

* POO 5 0 500

P0050510

POO 50520

P0050530

* P 0 6.5 0 5 40

P0050550

POO 5 0 560

1P0050570

P0050580

P0050590

POO 56600

P0050610

PO 05 0620

P0050630

POO 50640

P0050650

POO 50660

P0050670

P 6 65 0686

P0050690

P 0 0 5 0 7 0 0 P0050710

POO 5 0720

P0050730

182 NBS FORTRAN Test Programs Version 1
CM F FS ( MAWV I .MBWVI .MCWVI ) = MCCFI (MAWVI , MBWV I ,3 .0) + MCWVI **2 P0050740

HCEFI (MAWVI , MBWVI ) = MCAF I ( MAWVI , MBWVI ) ** MCAFI (MAWVI , MBWVI ) P0050750

MCFFI ( CAWVS , CBWVS , CCWVS) = SORT ( CAWVS ) SORT < CBWVS) + EXP(CCWVS) P 0 6 5 0 7 6

0

C » DEFINING EXPRESSION CONTAINS CONSTANTS. VARIABLES, INTRINSIC P0050770

C«** ** OR EXTERNAL FUNCTION REFERENCES AND PREVIOUSLY DEFINED P 0 0 5 0 7 8 0 C***«* STATEMENT FUNCTIONS. P0050790

CMGFS ( MAWV I, MBWVI , CAWVS. CBWVS) = F LOAT ( MAWVI « * 2) - CMAFS ( CAWVS , P0050S00

1 CBWVS ) + SORT ( ( FLOAT ( MAWVI + MBWVI))) P 0 0 5 0 8 1 0

' MCGFI (MAWVI , MBWVI , MCWVI , CAWVS) = MCE F I ( MAWV I

, MBWVI) - MCEFI (MAWVI .P0050820

1MCWVI) + I F I X ( EXP ( CAWVS ) ) P0050830

C**"**"* END OF TEST SEGMENT 00 5 POO 5 0 8 4 0 C***»* „.„.._.„ OUTPUT TAPE ASSIGNMENT STATEMENTS. NO INPUT TAPE. P 1 9 70 H0

pbo 73 1 40

C****» WHEN EXECUTING ONLY SEGMENT 197, THE FOLLOWING STATEMENTS P0073 U5

C **"*"**" NUVI =6 AND I NVI =9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED. POO 73 15 0 C**»** P0073155

C= NUVI = 6 POO 73 160

C= INVI = 9 P0073165

NUVI = 6 P197B1

- INVI = 9 P197B2

C ***** * POO 7 3170

WRITE (NUVI, 1 970 ) P 1 9 7 0 1 5 0

1 970 FORMAT ( 1 HI , 1X, 37HM0RD0 - (197) A MORE COMPLI CATED SEG . / 1 6X. P 1 97 0 1 60

1 16H0F DO STATEMENTS// P 1 9 70 1 70

2 3 5H ASA RE FS - 7.1.2.8 AND 7.1.2 .8.1 // 9H RESULTS ) P 1 970 1 80

C***** HEADER FOR SEGMENT 197 WRITTEN P 1 970 1 90

e"*"*"*"*"* TEST OF DO W I TH STATE M EN T FUN CT I ONS AND I NTR I N S I C FUNCTION S P 1 9 7020 0 C***** REFERENCED WITHIN ITS RANGE. TO BE RUN WITH SEG. 0 0 5 AND 412 P 1 9 70 2 1 0 ASSIGN 9190 TO MVI P 1970220

MCBVI = 0 P1970230

MCHVI = 1971 P 1 9 702 40

DO 1971 MCAVI = 4.8,4 P1970250

CMAVS = CMAFS ( 1 '."6. FLOAT (MCAVI ) ) P 1 970260

1971 MCBVI = MCBVI + M CAF I ( M CAV I , I F I X ( CMAVS ) - (MCAVI+2)) P 1 970270

I F (MCBVI - 2 ) 9966 , 91 90 , 9966 P 1 9 702 8 0 9190 MCHVI = 1973 P1970290

C

*'*'*"*

* TEST OF DO W I TH CALL STATEMENTS RE F ERENCED WITH I N ITS RANGE PI 970300

IVI = 0 P 1 9 7 0 3 1 0 ASSIGN 9968 TO MVI P 1 9 7 0 3 2 0 DO 1973 MCAVI = 1,3 P1970330

1 973 CALL MDQ ( MCAVI, IVI) P 1 970340

IFdVI - 6) 9966, 9968, 9966 P 1 9703 5 0 C****» TEST OF DO WITH THE FOLLOWING FEATURES COMBINED - P 1 9 7 0 3 6

0

C»**** 1. AN EXIT FROM THE RANGE OF A DO BY THE EXECUTION OF A P1970370

C * * * * * GO-TO STATEMENT, THE CONTROL VARIABLE OF THE DO IS P 1 9703 80

C***** DEFINED 7.1 . 2 . 8 . 1 / 1 9-23P 1 970390

C » 2. A GO TO STATEMENT CAUSES CONTROL TO PASS FROM AN PI 9 70 400

C** *»* INNER DO TO THE OUTER DO (WITHIN THE NESTED RANGE) P 1 9 7 0 4 1 0 9968 MCHVI = 1976 P1 970420

ASSIGN 9191 TO MVI P1970430

MCBVI = 0 P 1 9 7 0 4 4 0 DO 1976 MCAVI = 1,1,1 P1970450

9192 MCBVI = MCBVI + 1 PI 9 70460

DO 1975 MCCVI = 1,3,1 P1970470

MCBVI = MCBVI * 1 P1 970480

I F (MCBVI - 4) 91 97, 91 92, 1975 P1 970490

9197 GO TO ( 1 975, 1975, 9966). MCCVI P 1 9 7 0 5 0 0

1 975 CONTINUE P 1 970 5 1 0 1976 CONTINUE P1970520

IF (MCBVI - 8) 9966, 9191, 9966 P1970530

C * * * * * TEST THAT THE STATEMENT LABEL OF THE TERM I NAL STATEMENT P I 9 70 5 40

C***«* OF MORE THAN ONE DO CAN BE USED IN ANY GO TO OR ARITHMETIC P1970550

C**»*« IF STATEMENT THAT OCCURS IN THE RANGE OF THE MOST DEEPLY P1 970560

C*«*«* CONTAINED DO WITH THAT TERMINAL STATEMENT. 7.1.2.8.2/1-6 P1970570

C****« ALSO THE CONTROL VARIABLE IS DEFINED WHEN EXIT IS MADE BY THE P1970580

C « EXECUTION OF AN ARITHMETIC IF STATEMENT. P1970590

9191 ASSIGN 919 4 TO MVI P 1 9 7 0 6 0

0

MCHVI = 1977 P 1 9706 1 0

NBS FORTRAN Test Programs Version 1 183
DO 1977 MCAVI = 1,2

Olr 9 7 ft A ? ft

1 7 / V 0 L V P1970630

III C V 1 - 1 1 L. u V i 1 DO 1977 MCBVI =1,2

Ol 07 ft A A ft r 1 7/ VOHU

P1970650

I I L C V 1 - II LC ¥ 1 1 DO 1977 MCCVI = 1,5,1

PIr Q 7 ft A A ft

1 T f w 0 0 v P 1 970670

MTFVI IILCV1 -— MPPVT I + 1 1 LL V 1 T 1

I F ( M CE V I ) 1 977, 1 977, 1 978

P107ftA«ft r 1 7/ UOgU

P1970690

1977 CONTINUE

C** *** ERROR IF LOOP TERMINATES THRU CONTINUE

P197ft7ftft

P1970710

GO TO 9966

C****» CONTROL VARIABLE DEFINED ON FIRST LEVEL ON ARITH. IF

Pr 1 9 7 ft 7 7 ft

1 7 1 V '/ C U P1970730

1978 MCEVI = MCAVI + MCBVI + MCCVI

MCHVI = 1978 P1970750

9194

IF(MCEVI -8) 9966 9194.9966

MCHVI = 1974

P197ft7Aft

P1970770

MCEVI = 0 ASSIGN 9961 TO MVI

piQ7ft7«ft r 1 7 / W 0 U P1970790

DO 1974 MCAVI = 1,2

DO 1974 MCBVI = 1,2,1

piQ7ft«ftft r 1 7/ UOUU

P1970810

DO 1974 MCCVI = 4,5,1

DO 1974 MCDVI = 2,3

Pi970*t?o r i 7 , u o L. v P1970830

9195

GO TO 9193

GO TO 1974

r 1 7 / U OtV

P1970850

9193 MCEVI = MCAVI + MCBVI MCCVI + MCDVI + MCEVI

GO TO 9195

PF 11 9It7 0V R0 AOO V P1970870

1974 CONTINUE

IF(MCEVI - 160) 9966, 9961, 9966

P107ft»*ft r I 7 / U 0 o U P1970890

C * * * *

c * * * *

* TEST OF DO WITH I/O STATEMENTS REFERENCED WITHIN ITS RANGE.

* REWIND, UNFORMATTED READ AND WRITE ARE REFERENCED. THE

P1r 1 970900 7( U7UV

P1970910

C****» FOLLOWING 3 DOS MUST BE KEPT TOGETHER FOR SE L

F - CHE CK I NG

C***»* PURPOSES

Pr 1I 970970 7 1 \) 7 L. V P1970930

Q 9 A 1 MTHVT - 19 7?

ASSIGN 9196 TO MVI

Pr 11 7/970940 U7tU

P1970950

REWIND INVI

DO 9963 MCAVI =1.4

rP 11 9709A0 7 / V 7 O v P1970970

M CA 1 I (MCAVI ) = MCAVI

WRITE ( INVI) (MCA1 I (MCBVI ) . MCBVI = 1. MCAVI, 1)

P19709A0 r 1 7 f \J 7 O v P1970990

9963 CONTINUE

DO 9964 MCCVI = 1,4

P1971000 r I 7 / 1 UvU

P 1 97 1 0 1

0

9964 REWIND INVI

DO 1972 MCDVI = 1,4

P1971070 v \ 7 1 1 v C v P1 971 030

READ (INVI) ( IAC1 I (MCEVI ), MCEVI = 1, MCDVI)

DO 1972 MCFVI = 1, MCDVI

P1971040 r 17/ 1 UtU

P1 971 050

MCGVI = IAC1KMCFVI) - MCA1KMCFVI)

IF (MCGVI) 9966, 1972. 9966

P1r 1 971 7 / 1 060 v U v P1 97 1 070

1972

9196

CONTINUE

WR I TE ( NUV I . 9969)

P1071ft*ft r 1 7/ i you

P1 971 090

c * * * * GO TO 9198

* ERROR MESSAGES IF DO STATEMENT IS EXECUTED IN ERROR

P1971100 r 1 7 / I 1 V V P1971 1 10

9966

9967

WRITE (NUVI.9967) MCHVI

FORMAT (// 36H DO RANGE ENDING AT STATEMENT LABEL, 15,

Pr 117/97 11 1l 2t. 0v P1971 130

9969

1 14H IS IN ERROR. ) F ORMAT ( / / 35H THIS SEGMENT SUCCESSFULLY TESTED /

Pr 1I 97 7/ 11 11 40t V P1971 1 50

222H IF NO ERROR MESSAGES)

GO TO MVI , (9190,9968,9191 ,9194,9961 ,9196)

pi 971 1 Aft r 1 7 / 1 1 SJ V P1971170

9198

C * * * t REWIND INVI

* END OF TEST SEGMENT 197

P1971 r 1 7 / 1 1X0 1 0 V P1971 190

c * * * *

c * * * *

* WHEN EXECUTING ONLY SEGMENT 197, THE STOP AND END

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

CAROS P1r 1 971 7 / I 200 4. v v P 1 97 1 2 1 0

c * * * * c=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

P1r 1 971 7 / 1 770 L C v P1 971 230

c= END

STOP

P19712 r 1 7 / 1 t 40tw

P197C1

c * * * * END

* t t * t *:* * * * * * * t * * * t * * * t * t * '* * * * * * t t'i t t * * t * * * *,* t * t i~t *.* t * * * • P197C2

-* * * * t * 1 1 1 1 *P4 1 200 1 0

c * * * * * C****« MDQ - (412)

P4120020

P4120030

184 NBS FORTRAN Test Programs Version 1
C»**»* P41 20040

Cittiiti««i«t«ttiiti<i«««itttit««i*«iiitttttti>*i«ittttt»tiit«tn««««*ttp^20050

C*tt«* GENERAL PURPOSE

C*»*»* THIS SUBROUTINE IS USED WITH SEGMENT 197 TO

C-M*'*« SHOW THAT SUBROUTINES MAY BE CALLED FROM DC- SUBROUTINE MDQ(MWVI . IWVI

)

ASA RE F

LOOPS

P4 1 20060

P41 20070

P 4 12 00 8 0 P41 20090

IWVI = RETURN

MWVI IWVI

C * 1 1 1 * END OF TEST SEGMENT 412

END

P 4 1 2 0 1 0 0 P41 201 1

0

P4 12012 0 P 4 1 2 0 1 3 0 C»*t»t*»*»t»**tt»t«ttt«t«*«»t*t«t«tttt*ttt»tttt*t*ttt«t*tttttt«tt«t«»t»«P2000C10

C*tt*t P 2000 0 20

C SUBR1 - ( 200 ) P2 0 0 0 0 3 0

e,*.*-;*,»* P20 000 40

[ittttliltlttllltlltitltlttttltltltlltKllttlttltitlttlttltltttlttlltlttP^OOO^O

C***«* GENERAL PURPOSE ASA REF.P2000060

C«"*t"*"i TO TEST SUBROUTINE SUBPROGRAM WITHOUT AN ARGUMENT LIST 8 .4 . 1 . 1 P2 0 000 70

C**«*t GENERAL COMMENTS P2000080

C"i"i"tt"i if IS TO BE RUN WITH SEGMENT 410 P 2 0 0 0 0 9

0

C***«* RESTRICTIONS OBSERVED P2000100

C * * * * *

C t * t * *

c * * * * *

c * * * t *

c * * * * *

C t * * * t

c * * * * t

c * * * * *

4.1

SYMBOLIC NAME OF A SUBROUTINE MAY NOT APPEAR IN ANY 8.4.1

STATEMENT IN THIS SUBROUTINE EXCEPT IN THE

SUBROUTINE STATEMENT ITSELF

SYMBOLIC NAMES OF DUMMY ARGUMENTS MAY NOT APPEAR 8,

IN EQUIVALENCE OR COMMON STATEMENTS IN THE SUBPROGRAM

SUBROUTINES MAY NOT CONTAIN A FUNCTION STATEMENT, 8 ANOTHER SUBROUTINE STATEMENT, OR ANY STATEMENT THAT

DIRECTLY OR INDIRECTLY REFERENCES THE SUBROUTINE

4 . 1

1 / 56P2 0 0 0 1 1 0 P20001 20

P 2 0 0 0 1 3 0

1 /39P2 0 0 0 1 40

P 2 0 0 0 1 5 0 1/45P2000160

P 2 0001 70

P2 0 0 0 1 8 0

c * * * * t

c * * « * *

c * * * * *

c * * * * *

c * * * * *

c * * * *

«

£•****

c * * t * *

BEING DEFINED

AT LEAST ONE RETURN

S P E C I F I C A T I

STATEMENT MUST BE

I

0 N S SEGMENT 200

N A SUBROUTINE

8 4 . 1

P2000 1 90

P2000200

1/49P200021 0 P2000220

POO 1 4030

WHEN EXECUTING ONLY SEGMENT 200, THE SPECIFICATION STATEMENTS P00U035

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= PO0 1 4040

IN COLUMNS 1 AND 2 REMOVED. P00U045

C =

C * * * *

C * t * *

c * * * *

c * * * *

c * * * * c=

C =

OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

WHEN EXECUTING ONLY SEGMENT 200, THE FOLLOWING STATEMENTS

NUV I =6 AND I N V I = 9 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED

NUVI

i n v i NUVI

200

INVI = 9

WR I TE ( NUV I . 0200)

FORMAT ( 39H1 SUBR1 - (200)

1 24HW I THOUT AN ARGUMENT LIST

SUBROUTINE

//18H ASA

SUBPROGRAM

REF. - 8.4

/ 1 5X,

1 / /9H RESULTS)

IXVI = NUVI

I AX1 I ( 1 ) = I NVI

C * * * t

c * * * *

c * * * *

C 1 1 * *

C =

C t * t *

C * t * *

c * * * *

C * t * *

G * * 1

1

c * * * *

COMMON AXVS, CXVS, IXVI, IAX1K4) P00U050

COMMON AXVS, CXVS. IXVI, IAX1K4) P2 0 0A1

POO 1 40 5 5 P2000230

POO 73 1 8 0 P0 0 73 1 8 5 POO 731 9 0 P0073195

P0073200

P200B1

P200B2

P2000240

P2 0 0 02 5 0 P2000260

P 2 0 0 0 2 7 0 P2000280

P2000290

P2000300

P 2 0 0 0 3 1 0 P2000320

P2 0 0 033 0 P2000340

P2000350

P2000360

P 2 0 0 CI

P200C2

P 4 1 0 0 0 1 0 P41 00020

P41 00030

P41 00040

p 410005 0 P41 00060

CALL SUBRQ

CONTI NUE

END OF SEGMENT 200

WHEN EXECUTING ONLY SEGMENT 200, THE STOP AND END CARDS

WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

tt***t*tt****tt*tt******t*tt***t*tttttt**t**t**iitt*tt*t***t*iit**t*t

t

* SUBRQ (410)

tltlttltlHtt*tMtltttt<t«llttHtttlitttl*tlllHHIMtttHHt)ttitlt

* THIS SEGMENT TESTS THAT A VARIETY OF FORTRAN STATEMENTS

NBS FORTRAN Test Programs Version 1 185
c * * * * * CAN BE USED IN A SUBROUTINE. IT IS TO BE RUN WITH SEGMENT 200 P41 00070

SUBROUTINE SUBRQ P41 00080

8867 FORMAT <//36H DO RANGE ENDING AT STATEMENT LABEL, 15, 14H IS IN ERP41 00090

1ROR.

P41 001 00

DIMENSION KCA1 1(5), KAC1 1(5) P41 001 1 0 COMMON BXVS, DXVS, NXVI, IXVI P4100120

c * * * * * DEFINE ARITHMETIC STATEMENT FUNCTION P4100130

CKAFS(CEWVS, CFWVS) = CEWVS*2. + CFWVS P41 001 40

8 868 FORMAT C / / 3 5 H THIS SEGMENT SUCCESSFULLY TESTED / P41 001 50

1 23H IF NO ERROR MESSAGES.) P41 001 60

KCAF I (KEWVI , KFWVI ) = KEWVI**KFWVI P41 001 70

C t * * * * TEST OF DO WITH STATEMENT FUNCTIONS P41 001 80

KCHVI = 4101 PA 1 0 0 1 90

ASSIGN 4102 TO MVI P4 1 00200

KCBVI = 0 P41 0021

0

DO 4101 KCAVI = 4.8,4 P41 00220

CKAVS = CKAFSd.O, F LOAT ( K CAV I ) ) P41 00230

4101 KCBVI = KCBVI + KCAFI (KCAVI , I F I X ( CKAVS ) - (KCAVI + 2)) P41 00240

IF(KCBVI - 2) 8866, 4102, 8866 P41 00250

c * * * * * TEST OF DO WITH THE FOLLOWING FEATURES COMBINED - P41 00260

C t * * * * 1. AN EXIT FROM THE RANGE OF A DO BY THE EXECUTION OF A P41 00270

c * * * * * GO-TO STATEMENT, THE CONTROL VARIABLE OF THE DO IS P41 00280

c * * * * * DEFINED P41 00290

c * * * * * 2. A GO TO STATEMENT CAUSES CONTROL TO PASS FROM AN P41 00300

C***»* INNER DO TO THE OUTER DO (WITHIN THE NESTED RANGE) PA 1 0 03 1 0 4102 KCHVI = 4106 P4 1 00320

ASSIGN 8870 TO MVI P4100330

KCBVI = 0 P41 00340

DO 4106 KCAVI = 1,1,1 P41 00350

8 8 72 KCBVI = KCBVI + 1 P41 00360

DO 4105 KCCVI = 1.3,1 P41 00370

KCBVI = KCBVI + 1 P4 1 003 80

IF (KCBVI - 4) 8873. 8872, 4105 P41 00390

8 8 73 GO TO (4105,4105,8866), KCCVI P41 00400

4105 CONTINUE P41 0041

0

4106 CONTINUE P41 00420

IFUCBVI - 8 ) 8866 , 8870, 8866 P4100430

C***»* TEST THAT THE STATEMENT LABEL OF THE TERMINAL STATEMENT P41 00440

C * * * * * OF MORE THAN ONE DO CAN BE USED IN ANY GO TO OR ARITHMETIC P41 00450

C***** IF STATEMENT THAT OCCURS IN THE RANGE OF THE MOST DEEPLY P41 00460

c * * * * * CONTAINED DO WITH THAT TERMINAL STATEMENT P4 1 00470

8 8 70 ASSIGN 8876 TO MVI P41 00480

KCHVI = 4107 P41 00490

KCEVI = -24 P4100500

DO 4107 KCAVI = 1,2 P41 0051

0

KCEVI = KCEVI + 1 P41 00520

DO 4107 KCBVI = 1,2 P4 1 00 530

KCEVI = KCEVI + 1 P41 00540

DO 4107 KCCVI = 1,5,1 P4100550

KCEVI = KCEVI + 1 P4100560

I F ( K CEV I ) 4 1 07 . 4 1 07 , 41 04 P4100570

4107 CONTINUE P41 00580

C*****ERROR IF LOOP TERMINATES THRU CONTINUE P41 00590

GO TO 8866 P41 00600

C * * t * "CONTROL VARIABLE DEFINED ON FIRST LEVEL ON ARITH. IF P41 0061 0 4104 KCEVI = KCAVI + KCBVI + KCCVI P41 00620

KCHVI = 4104 P41 00630

I F < K C E V I - 8 ) 8866,8876,8866 P41 00640

8 876 KCHVI = 4103 P41 00650

KCEVI = 0 P41 00660

ASSIGN 8871 TO MVI P41 00670

DO 4103 KCAVI =1,2 P41 00680

DO 4103 KCBVI = 1,2,1 P4 1 00690

DO 4103 KCCVI = 4,5,1 P4 1 0 0 700

DO 4103 KCDVI = 2,3 P4 1 0 0 7 1 0 GO TO 8878 P41 00720

8 8 77 GO TO 4103 P41 00730

88 78 KCEVI = KCAVI KCBVI + KCCVI + KCDVI + KCEVI P41 00740

1 86 NBS FORTRAN Test Programs Version 1
4103

GO TO 8877

CONTINUE

IFUCEVI - 1 60 ) 8 866

TEST OF DO WITH

P4100750

P4 1 00760

P 4 1 00 770

P4 1 0078 0 P4 1 00 790

P41 00800

P 4 1 0 0 8 1 0 P41 00820

P 4 1 0 0 8 3 0 P41 00840

P 410 0 8 5 0 P41 00860

P4 100 870

P4 1 0 0 8 8 0 P4 1 0 0 8 90

P4 1 0 090 0

' P 4 1 0 0 9 1 0 P41 00920

P 4 1 0 0 930

P41 00940

P 4 1 0 09 5 0 P 4 1 0 096 0 P 4 1 0 09 70

P 4 1 0 09 8 0 P 4 1 0 099 0 P41 01 000

P41 01 0 1

0

P3000010

P 3 0 0 0 0 2 0 P3000030

P3000 040

P3000050

P3000060

3P3000070

P3000080

P3000090

P3 0 0 0 1 0 0 P3 0 0 0 1 1 0 P3 0 0 012 0 P001 4060

P001 4065

P001 4070

P 0 0 1 4 0 7 5 POO 1 4 0 8 0 P001 4085

P001 4090

P 3 0 0 A

1

P300A2

P001 4095

P3000130

P007321 0 P0 0 732 1 5 P0073220

P0073225

P300B1

P30001 40

P 3 0 0 0 1 5 0 P3000160

P30001 70

P3 000 1 80

P3000190

P3000200

P30 0 0210

P3000220

P3000230

1P3000240

P3000250

P3000260

C * * * * * 8871 ,8866

I/O STATEMENTS

88 7 1 ASSIGN 8860 TO MVI

KCHVI = 4108

REWIND I XV

I

DO 8863 KCAVI =1,4

8863

8864

KCA1 I (KCAVI ) = KCAVI

WRITEC I XV I ) (KCA1 I (KCBVI ) .KCBVI

CONTINUE

DO 8864 KCCVI =1.4

1 , KCAVI , 1

)

REWIND IXVI

DO 41 08 KCDVI = 1 , 4 READ ( IXVI ) ( K A C 1 I (KCEVI > , KCEVI

DO 4108 KCFVI = 1 , KCDVI

= 1, KCDVI

4108

8860

KCGVI = KAC1 I (KCFVI )-KCA1 I (KCFVI

)

IF(KCGVI) 8866,4108.8866

CONTINUE

WRITE(NXVI ,8868)

GO TO 8869

8866 WRITE(NXVI , 8867) KCHVI

GO TO MVI , (8860.4102, 8870,8871 ,8876)

8869 REWIND IXVI

RETURN

* END OF TEST SEGMENT 410

END ******************************************************************

C t * * *

1 < t * * * t * t t t * t > t I t t t t t t t t t * t t » I t 1 t « 1 t t t t t t I t * t t i t t I t » I t I t * t t t * I t I 1 t

c * * * *

c * * * *

c * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C t * * *

C * * * t

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * *

C * * * * c=

c=

LOGI F ( 300 )

* GENERAL PURPOSE

* TEST LOGICAL IF STATEMENT

* GENERAL COMMENT

* ASSIGNED GO TO, INTRINSIC FUN CT I ON , AR I THMET I C IF, CALL,

* COMPUTED GO TO AND I/O STATEMENTS ASSUMED WORKING.

ASA REF

7.1.2.

SPECIFICATIONS SEGMENT 300

* WHEN EXECUTING ONLY SEGMENT 300, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

* LOGICAL MCAVB,MCBVB.MCA1B(7)

DOUBLE PRECISION DPAVD, DPBVD , DPCVD , DPDVD , DPEVD , DPFVD

LOGICAL MCAVB. MCBVB,MCA1B(7>

DOUBLE PRECISION DPAVD. DP B VD . DP CVD , DPD VD . D PE VD , DP F VD

C * * * i

c * * * *

c * * * *

c * * * t c * * * * c=

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

« WHEN EXECUTING ONLY SEGMENT 300 . THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE TH E C = I N COLUMNS 1 AND 2 REMOVED

.

* NUVI = 6

3000

C * t * * t

NUVI = 6

WRITE (NUVI, 3000)

FORMAT ( 1H1 , 1X, 34HL0GI F - (300) LOGICAL IF STATEMENT//

120H ASA REF. - 7.1.2.3//10H RESULTS //

2/37H TEST E X P L I C I f LY WR I TTE N SIGNED 2ER0/2X)

HEADER FOR SEGMENT 300 WRITTEN

MAC V I =

0

MCAVB = .TRUE.

MCBVB ""=

. FALSE . MCA1B(1) = .TRUE.

M C A 1 B ( 2 ) = .FALSE.

TEST THAT MINUS ZERO AND PLUS ZERO ARE TREATED

AS EQUAL VALUES

IVI = -8

C * * * *

c * * «

4.2/1

NBS FORTRAN Test Programs Version 1 187
I I V I = -8

JVI = +0

J jvi = -6

KVI = 8

P3000270

P3000280

P3 68 0296

P3000300

P3000310

P3000320

P3000330

P3000340

P 3 0 0 03 5 0 P3000360

P 3 0 6 0 3 7 0 P3000380

P3000390

P3000400

P 3 6 0 6 4 1 0

P3000420

P3000430

P3000440

P3000450

P3000460

P3000470

P3000480

P 3 0 0 0 4 9 6 P3000500

P 3 0 6 0 5 1 0 P3000520

P 3 0 0 6 5 3 6

P3000540

P 3 6 0 0 5 5 0 P3000560

P 3 6 0 0 5 7 0 P3000580

P 3000 59 0

P3000600

P3 00 06 1 0

P3000620

P3000630

P3000640

P 3 0 0 0 6 5 0 P3000660

P3000670

P3000680

P3000690

P3000700

P 3 0 0 0 7 1 0

P3000720

P 3 0 0 0 7 3 b

P3000740

P3000750

P3000760

P3000770

P3000780

P3000790

P3000800

p 30 6 b * ib

P3000820

P3000830

P3000840

P 3 0 0 0 8 5 0

P3000860

P3000870

P3000880

p 3 b b b 8 9 b

P3000900

P 3 0 0 0 9 1 0 P3000920

p 3 o b b 9 3 b

P3000940

KKVI

AVS : AAVS

BVS

: 8 -0.5

: -0.5

: +0.0

BBVS = -0.0

CVS = 0.5

CCVS = 0.5

DPAVD = -0.500

DPBVD = -0.500

DPCVD = +0.0D0

DPDVD = -0.000

DPEVD = 0.5D0

C * * * * * DPFVD = 0.5D0

TEST FOR EXPLICITLY WRITTEN -0 EQUAL TO +0

I F C < JVI) .EG. C J JVI ) VMACVi = MACVI 1 IF((JJVI) .EQ. (JVI)) MACVI = MACVI + 1 IF(<+0> .EQ

IF((-0) .EQ

I F (MACVI - WRITE (NUVI

(-0)) MACVI = (+0)) MACVI = 4) 9951, 9954,

9953 )

MACVI

MACVI + 995 1 995 1

9952

9953

9954

995 5 C * * * *

GO TO 9955

FORMAT ( 1 4H

FORMAT (1 7H

WRITE (NUVI

+0 EQUALS -0)

+0 NOT EQUAL -6)

9952 ) MACVI = 0 TEST EXPLICITLY WRITTEN +0.0 EQUALS -0

I F ( (BVS) .EQ. (BBVS) ) MACVI = MACVI + 1 IF ((BBVS) .EQ. (BVS)) MACVI = MACVI + 1 0)) MACVI = 0)) MACVI = 9947, 9944

IF ((+0.0)

IF ((-0.0)

IF (MACVI - WRITE (NUVI

GO TO 99 4 8 FORMAT (18H +0.0 EQUALS -0.0)

EQ. (-0

EQ. ( 0 4) 9944

9946 )

MACVI + MACVI +

9 9 4 4

9945

9946

9947

C * * * * 9948

FORMAT (21H +0.0 NOT EQUAL -0.0)

WRITE (NUVI, 9945)

TEST EXPLI "ci'TL Y W R I f TEN +0 . 0 DO E QUALS -67 66 0

MACVI = 0

I F ((DPCVD) .EQ. ( DPDVD ) ) M AC VI = MACVI

IF ((DPDVD). EQ. (DPCVD)) MACVI = MACVI

+ 1

1

C * * * * * IF ((+0.000) .EQ. (-0.0D0)) MACVI = MACVI 1 IF ( (-0.0D0) .EQ. (O.ODO)) MACVI = MACVI + 1 IF (MACVI - 4) 9949, 9957, 9949

9949 WRITE (NUVI, 9960)

GO TO 9958

9959 FORMAT (22H +0 . ODO EQUALS -O. ODO)

9960 FORMAT (25H +0.0D0 NOT EQUAL -O.ODO)

9957 WRITE (NUVI, 9959)

9958 MACVI = 0 WRITE (NUVI , 7950 ) 7950 FORMAT (33H0 TEST COMPUTATIONAL SIGN OF 2ER0/2X)

C * * * * * TEST FOR COMPUTATIONALLY CREATED +0 AND -0

IF((IVI * JVI) .EQ. (JVD)MACVI = MACVI + 1

.................. ... ... .... ........... .. j j v j

y

) H^ c

v

j = MACVI + 1

I F C < J V I / I V I ) .EQ. (+0) )MACVI = MACVI + 1

I F < < I V I + KVI) .EQ. (JVD)MACVI = MACVI + 1 IF((KKVI + I I V I > .EQ. (JVD)MACVI = MACVI + 1

I F ( ( I I V I - ivi) .EQ. ( JVI )) MACVI = MACVI + 1

I F ( (KVI - KKVI) .EQ. (JVD)MACVI = MACVI 1 IF (MACVI - 7) 9956, 9940. 9956

9956 WRITE (NUVI, 9953)

GO TO 79 5 5 9940 WRITE (NUVI, 9952)

188 NBS FORTRAN Test Programs Version 1
c * t * * 7955

< TEST FOR COMPUTATIONALLY CREATED *0.0 AND -0.0

MACVI = 0

IF ( (AVS * BVS) .1*0". (BVS) ) MACVI = MACVI 1 IF (<BVS) .EQ. (BVS * AAVS)) MACVI = MACVI 1

P3000950

P3000960

P3000970

P3000980

IF ((BVS / AVS) .EQ. ( 0.0)) MACVI = MACVI + 1 IF ((AVS CVS) .EQ. (BVS)) MACVI = MACVI 1 IF ((CCVS + AAVS) .EQ. (BVS)) MACVI = MACVI + 1 IF ((AAVS - AVS) .EQ. (BVS)) MACVI = MACVI + 1

P3000990

P3001 000

P 3 0 0 1 0 1 0 P3001 020

IF ((CVS - CCVS) .EQ. (BVS)) MACVI

IF (MACVI - 7) 7951, 7952, 7951

WRITE (NUVI . 9946)

GO TO 7953

MACVI 1 P3001030

P3001 040

P 3 0 0 1 0 5 0 P3001 060

P 3 0 0 1 0 7 0 P30 0 1 0 80

7951

7952

C t * * * 7953

WRITE (NUVI, 9945)

TEST FOR COMPUTATIONALLY CREATED +0.0D0 AND -0.0D0

MACVI = 6 IF ( ( DPAVD * DPCVD) .EQ. (DPCVD)) MACVI = MACVI + IF ((DPCVD) . EQ. (DPCVD * DPBVD) > MACVI = MACVI + IF ((DPCVD / DPAVD) .EQ. (0.0D0)) MACVI = MACVI +

P300 1 090

P3001 1 00

P 3 0 0 1 1 1 0 P300 1 1 2 0 IF ((DPAVD DPEVD) .EQ. (DPCVD)) MACVI = MACVI + IF ( ( DPFVD + DPBVD) .EQ. (DPCVD)) MACVI = MACVI + P30 0 1 1 30

P3001 1 40

P3 00 1 1 5 0 P3001 160

IF ((DPBVD - DPAVD) .EQ. (DPCVD)) MACVI = MACVI

IF ((DPEVD - DPFVD) .EQ. (DPCVD)) MACVI = MACVI

IF (MACVI - 7) 7954, 9939, 7954

7954 WRITE (NUVI, 9960)

GO TO 9941

9939 WRITE (NUVI, 9959)

P3001 1 70

P3001 180

P30 01 190

P3001200

9941 MCAVI = 0 WRITE (NUVI, 9942)

FORMAT ( 3 1 HO TEST -LOGICAL IF- FOLLOWED BY/

131H DIFFERENT KINDS OF STATEMENTS )

P3001210

P3001220

P 3 00 1 23 0 P3001240

9942

C***t* TEST 1 C**tt* LOGICAL IF FOLLOWED BY SIMPLE ASSIGNMENT STATEMENT

C"» *"«"*'* CORRECT RESULT = 0, OTHERWISE RESULT = 1 IF (MCA1B(2)) MCAVI = 1

P3001250

P3001260

P3001 270

P3001280

WRITE (NUVI, 3009) MCAVI

Ct*t*« TEST 2

C LOGI CAL I F FOLLOWED BY USE OF INTRI NSI C FUNCTION

C****t CORRECT RESULT =0, OTHERWISE RESULT =2

P3001290

P3001300

P3001310

P3001320

P3001330

P3001340

MCAVI = 2 IF (MCAVB) MCAVI = I F I X ( 5 .

0

WRITE (NUVI ,3009) MCAVI

MCAVI = 0

4 . 0 1.0)

P3001350

P3001360

P3001370

P3001380

C***t* TEST 3 C*»*t. LOGICAL IF FOLLOWED BY ARITHMETIC STATEMENT

C***»* CORRECT RESULT =0, OTHERWISE RESULT =3

IF (MCAVB .AND. MCBVB) MCAVI = 3* 2 / 2 P3001390

P3001 400

P3 00 1 4 1 0 P3 00 1 420

WRITE (NUVI, 3009) MCAVI

C« * * * * TEST 4

C *'**'t* LOGICAL IF FOLLOWED BY GO TO STATE ME NT

C***t* CORRECT RESULT =0 f

. OTHERWISE RESULT =4

P3001 430

P3001440

P3001450

P3001 460

MCAVI = 0 IF (MCAVB .AND. MCBVB .OR. MCA1B(1>) GO TO 300 1 MCAVI = 4 3001 WRITE (NUVI, 3009) MCAVI

P30 0 1 470

P3001 480

P 3 0 0 1 490

P3 0 0 1 5 00

C***t* TEST 5 C***»* LOGICAL IF FOLLOWED BY CALL STATEMENT

C't**** CORRECT RESULT =0# OTHERWISE RESULT =5

MCAVI =0

IF (MCBVB .OR. (1 .GE. 2) . AND .. FALSE . ) CALL SMCQ(MCAVI)

WRITE (NUVI, 3009) MCAVI

- TEST 6

LOGICAL IF FOLLOWED BY NESTED USE OF INTRINSIC FUNCTIONS

P3 0 0 1 5 1 0 P3001 520

P3 00 1 530

P3001 540

C * * * *

C * t * *

c * * t *

P3001 550

P3001 560

P30 0 1 5 70

P3001 580

CORRECT RESULT =0, OTHERWISE RESULT =6

MCAVI = 6

IF (.TRUE. .OR. ((1. . LE . (0.1 + 1.5)) .AND. (MCAIB(i)

1.)) .AND. MCBVB) MCAVI = I F I X ( REAL ( ( 0 . 0 , 1 . 0 ) ) ) WRITE (NUVI ,3009) MCAVI

Ctt*** TEST 7

OR. .TRUE P3001 590

P3001600

P3 0 0 1 6 1 0 P3001620

NBS FORTRAN Test Programs Version 1 1 89
C»  LOGICAL IF FOLLOWED BY ASSIGNED GO TO STATEMENT

C«** ** CORRECT RESULT =0, OTHERWISE RESULT = 7 ASSIGN 30 02 TO HCBVi

MCAVI = 7

P3001630

P3001 640

P 3 0 0 1 6 5 0 P3001660

IF (.NOT. (MCAVB .AND. MCBVB .AND. .FALSE. .OR. (.NOT. .TRUE.))) P3001670

1G0 TO HCBVI j, ( 300 1 , 300,2 , 3003 ) P3001680

GO TO 3 003 P3 0 0 1 690

3 002 MCAVI = 0 P3001700

3 0 03

Co*

C * * *

C * * *

WRITE (NUVI, 3009) MCAVI P3001710

** TEST 8 , P3001720

** LOGICAL IF FOLLOWED BY ARITHMETIC IF STATEMENT P3 00 1 730

** CORRECT RESULT =0, OTHERWISE RESULT =8 P3001740

MCAVI = 0 P3001750

IF (.NOT. ( .NOT. ( .TRUE. .OR. MCAVB .AND. (8. .NE. 7.)))) P300 1 760

1 I F (MCAVI) 3 00 4 , 360 5 , 3 00 4 P3 00 1770

30 04 MCAVI = 8 . P3001780

3 0 0 5 C * * *

C * * *

c * * *

WRITE (NUVI

** TEST 9

* * LOGI CAL

** CORRECT

MCAVI =

0

IF ( (8.0D0

3009) MCAVI P3001 790

P3 00 1 80 0 P3001 81

0

P3001 820

P 3 0 0 1 830

P3001840

IF FOLLOWED BY I/O STATEMENT

RESULT =0, OTHERWISE RESULT :

EQ . ( 1 . + 7. ) ) .AND. ( . NOT. (3 . NE . 3) )

)

C * * *

C * * *

c * * *

1WRITE (NUVI

** TEST 10

* * L0 G I CAL

** CORRECT

MCAVI = 2 IF ( .TRUE.

3009) MCAVI P3001 850

P3001 860

P3001 870

P3001 880

P3 00 1890

P3001900

IF FOLLOWED BY COMPUTED GO TO STATEMENT

RESULT =0. OTHERWISE RESULT =10

AND. (8 .GE. 6) .OR. (.FALSE.)) GO TO (9950,3006)

995 0

30 06

30 0 7

1 MCAVI

MCAVI = 10

GO TO 30 0 7 MCAVI = 0

P3001910

P3001 920

P 3 001 930

P3001940

WRITE (NUVI, 3009) MCAVI P3001950

WRITE (NUVI, 3008) P3001960

TEST EXPRESSIONS IN LOGICAL IF STATEMENTS P300 1 970

TEST 11 .LT. EXPRESSION, RELATION, EXPRESSION (TRUE) P3001980

MCAVI = 11 p 3 0 01 990

I F( < SNGL ( DABS ( -DSIGN ( DBLE ( 2 . 0 ). 1 . 0D0 ) ) ) > . LT . AMI N1 < ( FLOAT( I DIM P3002000

C * * *

C * * *

1 (1 + 2, 0))), ( A I MAG ( CMP LX ( 1 .0,2.0)))) + 1.0) MCAVI = WRITE (NUVI, 3009) MCAVI

TEST 12 ' . LT. ' EXPRESSION, RELATION, CONSTANT (TRUE)'

MACVI = 12

P300201

0

P3002020

P3002030

P3002040

C * t * * *

I F ( ( AMI N1 ( FLOAT( I DIM( 4 - 1,0)) , A I MAG ( CMP LX ( 1 . 0 , 2 . 0 ) ) ) ) . LT . 4.0) P3 0 020 5 0 1MACVI = 0 P3002060

WRITE (NUVI", 3009 ) MACVI P3 0 02 0 70

C ** TEST 13 .LT. CONSTANTS. P. ) .RELATION, EXPRESSION ( R E AL ) ( TRUE ) P 3 0 0 2 0 8 0

* * * MACVI = 13

C ***** I F (1.(D0).LT. (SNGL (DABS ( DS IGN(DBLE ( 4 . 0 ) , 1 . 0D0) ) ) ) ) MACVI = 0 C*****WRifE (NUVI, 3009) MACVI

C***** TEST 14 . LE . .AND. .LE. (SHOULD BE LESS AND EQUAL) (TRUE)

MACVI = 14

IF((REAL(CONJG((1 .0,-2.0))) +

1 A I MAG Ft ON J G ( (1 .0,-2.0)))

2 (AIMAG(C0NJG((2. 0,-4.0)))

3 REAL(C0NJG((4. 0,-2.0)))

WRITE (NUVI, 3009) MACVI

A I MAG ((16.0,-4.0) ) LE

+ REAL ( (-4.0,16. 6) >

+"." 1.0) AND

+ REAL ( (-8.0,16.0)) .LE.

A I MAG ( ( 1 6 . 0, -8 . 6 ) ) ) ) MACVI = 6

P3002090

P30021 00

P3002110

P3002120

P3 0 0213 0 P30021 40

P 3 0 6 21 5 0 P3002160

P30021 70

P30021 80

P 3 6 0 2 1 9 0 P3002200

P3002210

P3002220

P3 0022 3 0 P3002240

P3002250

P3002260

P 3 0 02 2 70

P3002280

P 3 0 0 2 2 9 0 P3002300

C****» TEST 15 .LE. (FALSE)

MACVI = 0

I F ( MAX 1 ( (AMAX0U.2, - ( 1

WRITE (NUVI, 3009) MACVI

C * * * * * TEST 16 .NE. .AND.

MACVI = 16

!F(( ( A I NT ( A I NT ( A I NT ( 1 .4 + 2 . 9 ) + 1 . 6

) - 8 . 1 ) ) . NE

1AINT(AINT(AINT(2.6 + 4.8) + 1 . 4 ) -9 . 2 ) ) ) MACV

I

WRITE (NUVI, 3009) MACVI

C***»* TEST 17 .GT. (TRUE)

MACVI =17

I F ( ( FL0AT( I ABS( I F IX( ABS(-5 . 0+ SIGN (-1.0, 2.0)))))) .GT. 2.0D0)

4))), 16.0) .LE. 2 ** 3 ) M A C V

I

1 5

.EQ. (TRUE)

(-8.0)) .AND. ( = 0

1 . 0 . EQ

190 NBS FORTRAN Test Programs Version 1
1MACVI = 0 WRITE (NUVI., 3009) HACVI

C * * * * * TEST 18 . GE . EQUAL (TRUE ) MACVI = 18

P30023 1 0 P3002320

P3002330

P3002340

P3002350

P3002360

P3 0 023 7 0 P3002380

P3 0 02 390

P3002400

p 3 6 0 2 41 0 P3002420

P3002430

P3002440

P30024 5 0 P3002460

P3 002470

P3002480

P 3 0 0 2 4 9 0 P3002500

P3002510

P3002520

P 3 0 0 2 5 3 0 P3002540

P 3 0 0 2 5 5 0 P3002560

P 3 0 0 2 5 7 0 P3002580

P300C1

P300C2

* P A 1 10 010

P41 10020

P4 11 0030

P41 1 0040

*P 4110050

P 4 1 1 0 0 6 0 P 4 1 1 0 0 7 0 P4 1 1 0 0 8 0 P 4 1 1 0 0 9 0 P 4 1 1 0 1 0 0 p 4 11 0 1 10

P41 10120

* P 3 0 1 0 6 1 0 P301 0020

P 3 0 1 0 0 3 0 P301 0040

* P 3 010 0 5 0 P301 0060

2P30 1 0 0 70

P3 0 1 0 08 0 P 3 0 1 0 0 9 0 P3 0 1 0 1 0 0 P 3 0 1 0 1 10

P001 41 00

P 0 01410 5 P001 41 1 0 PO0 14 115

P001 4120

PO0 14 125

P301 A1

P301 A2

P001 41 30

P 3 0 1 0 1 2 0 P0073230

P0073235

P0073240

P0073245

P0073250

I F ( ( 8 . 0 ) . GE . ( FLOAT( IABS ( I F IX( ABS( -4 . 0 + S I GN < 4 . 0 , - 2 . 0 ) > ) ) ) > ) MACVI =0

WRITE (NUVI, 3009) HACVI

C***«* TEST 19 .GE. GREATER (TRUE)

MACVI = 19

I F ( (MACVI ) . GE . ( IABS( I FIX(ABS(-4 . 0 S I GN ( 8 . 0

. -4 . 0 ) ) ) ) ) ) MACV

I

WRITE (NUVI, 3009) MACVI

C * * * * * TEST 20 .GT. (FALSE) .OR. . EQ . (TRUE)

MACVI = 20

IF <

< -MACVI > .GT. ( MAX 1 ( AMAXO (8, -(2*4), 4) ,16.0)). OR

1 (-20) .NE. MACVI))MACVI = 0 WR I TE ( NUVI

,"" 3 0 09 ) MACVI

WRITE (NUVI, 9943)

9943 FORMAT ("28 NO ALL VALUES SHOULD BE "ZERO .7

137H A VALUE OTHER THAN 2ER0 WILL BE THE / 23 4H NUMBER OF THE TEST WHICH FAILED.

)

3008 FORMAT ( 3 4H0 THERE SHOULD BE 10 VALUES ABOVE. / 131 H IF ONLY 9, TEST 9 HAS FAILED.)

3009 F0RMAT(12X, 110)

C*"*"*"*"* END OF TEST SEGMENT 300

C***«* WHEN EXECUTING ONLY SEGMENT 300, THE STOP

NOT . ( I ABS

AND END CARDS

C***»* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE G= C***** IN COLUMNS 1 AND 2 REMOVED.

C = c= STOP

END

STOP

END

C * * * *

c * * * *

c * * * *

c * * * *

c * t * *

c * * * *

c * * * *

SMCQ - (411)

t

* GENERAL PURPOSE

* TO DEFINE SUBROUTINE SMCQ WHICH IS USED IN SEGMENT 300

SUBROUTINE SMCO(MWVI)

C * * * *

MWVI = MWVI + 5 RETURN

* END OF TEST SEGMENT 411

END

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

c * * * *

c * * * *

c * * * t

c * * * *

C t * * *

c * * * *

C = c=

ttlltlttlHitiHttlttlttllllltllllltttltltlllllHitltttltlltttHlt

t

* BARIF - (301)

GENERAL PURPOSE

TEST BASIC FORTRAN ARITHMETIC IF STATEMENT

GENERAL COMMENTS

ASA REF

7.1 .2.

BASIC INTRINSIC FUNCTIONS ASSUMED WORKING

* SPECIFICATIONS SEGMENT 301

*

* WHEN EXECUTING ONLY SEGMENT 301 , THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS. MUST HAVE THE C=

*' I N C 0 LUMN S 1 AND 2 REMOVE D . DIMENSION L1 I (10)

DIMENSION MCA1 1(5), CMA1S(5)

DIMENSION L1K10)

C * 1 1 *

c * * * *

c * * * *

c * * * * C * t * *

c * * t * c=

DIMENSION MCA1 1(5), CMA1S(5)

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE

*

* WHEN EXECUTING ONLY SEGMENT 301 , THE FOLLOWING STATEMENT

• NUVI = 6 MUST have T.H.E C= I N COLUMNS 1 AND 2 REMOVED

* NUVI = 6

NBS FORTRAN Test Programs Version 1 191
c * * * *

3010

NUVI = 6 P301B1

* P0073Z55

WRITE (NUVI ,3010) P3010130

FORMAT (1H1 , 1X, 27HBARI F - (301) BASIC FORTRAN/ 1 5X„ 24HP3010H0

1 ARITHMETIC IF STATEMENT/2X. 1 8 HAS A REF . - 7.1 . 2 . 2 / 2X , 7HRESULtS > P30101 50

HEADER FOR SEGMENT 301 WRITTEN P3010160

MCA1K1) = 5 P3 0 1 0170

MCAVI = 0 P3010180

C * * * * *

c * * * *

8335

MCBVI = 21

JACVI = -0

CM A1 S < 1 ) = 10.5

CMAVS = -0.0

CMBVS = -15.E0

TEST FOR SIGN OF

DO 83 3 5 I VI = 1,9

L1 I ( I VI ) = 0

ZERO - TYPE INTEGER 4.2/11

P3010190

P3010200

P 3 0 1 6 2 1 6 P3010220

P3010230

P3010240

P 3 6 1 0 2 5 0 P3010260

P3010270

P3010280

P 3 0 1 0 2 9 0 P3010300

P30 10310

P3010320

P30 10330

P3010340

P30 10350

P3010360

P 3 0 1 0 3 7 0 P3010380

P30 10390

P3010400

P3010416

P3010420

P 3 0 1 0 4 3 6

P3010440

P3010450

P3010460

P 3 0 1 0 4 7 6 P3010480

P3010490

P3010500

P 3 6 i 0 510

P3010520

P 3 6 1 0 5 3 0 P3010540

P3010550

P3010560

P30 105 70

P3010580

pf010590

P3010600

P 3 6 1 0 6 1 b P3010620

P 3 0 1 6 6 3 0 P3010640

MVI

KVI

J VI

BVS

0

0 . 0

8300 ) 8314, 8317

8315, 8318

NVI = 1 WRITE (NUVI,

IF (-6) 8311

IF (0) 8312,

IF (+0) 8313

NVI = 10

IF ( J V I (-0 )) 83 1 1 . 83 1 4 , 83 1 7 IF (-IABS(JVI)) 8312, 8315, 8318

IF (- JVI + (+0 ) ) 83 1 3 , 83 1 6 , 83 1 9

WRITE (NUVI, 8303) (L1 I ( IVI ) , IVI = 1 TEST FOR SIGN OF ZERO - TYPE REAL

MVI = 2

8320

832 1 8322

8316, 8319

8323

8324

8 32 5 C * * * * * 9)

8336

KVI = 0 NVI = 1 DO 8336

L1 I ( IVI

)

IVI 1.9

= 0

WRITE (NUVI. 8304)

IF (-0.0) 831 1 , 8314

IF (6.6) 8312, 8315,

IF (+0.0) 8313, 8316,

NVI = 10

IF (BVS +(-0.0)) 8311, 8314, 8317

IF (-ABS(BVS) ) 8312. 8315, 8318

IF ( - BVS + (+0.0)) 8313, 8316, 8319

WRITE (NUVI, 8303 ) ( L1 I ( I VI ) . IVI = 1 WRITE (NUVI, 8337)

GO TO 8305

SWITCH FOR INTEGER AND REAL TESTS

KVI = KVI + 1

8317

8318

8319

8326

8327

8328

8329

8330

8 33 1 9)

C * * * * 8332

GO TO (8333, 8334) MVI

C » t * *

8333

C * * * * * 8334

RETURNS FOR TEST SIGN OF INTEGER ZERO

GO TO (8320, 8321, 8322, 8323, 8324. 8325),

RETURNS FOR TEST SIGN OF REAL ZERO

KVI

KVI

c * * * * * TALLY RESULTS OF CONTROL TRANSFERS P3010650

8311 L 1 I ( 1 ) = L 1 I ( 1 ) + NVI P3010660

GO TO 8332 P3010670

8312 L1 I (2) = L1 I (2) + NVI P3010680

GO TO 8332 P3010690

8313 L1 I (3) = L1 I (3) + NVI P3010700

GO TO 8332 P3010710

8314 L1 I (4) = L1 I (4) + NVI P3010720

GO TO 8332 P3010730

8315 L1 I (5) = L1 I (5) + NVI P3010740

GO TO 8332 P3010750

8316 L1K6) = L1M6) + NVI P3010760

GO TO 8332 P3010770

8317 L1 I (7) = L1 I (7) NVI P3010780

192 NBS FORTRAN Test Programs Version 1
83.1.8

8319

GO TO 8332 P3010790

L1 1(8) = L1 I (8) NVI P3010800

GO TO 8332 P 3 0 1 08 1 0 L1 I (9) = L1 1(9) NVI P3010820

GO TO 8332 P3 010 83 0 FORMAT^/ 38H TEST FOR SIGN OF ZERO - TYPE INTEGER// 29H PATH * FP3010840

1 ORM OF EXPRESSION */ 29H OF IF * -0 * 6 * +

0 '*""")""" P3 0 1 0 & 5 0 FORMAT ( 1H ,7(4H****>/ 1H ,4(6X,1HO/ 8H NEG. * ,3( I4.3H *>/1H .4P3010860

8.300.

8303

1 < 6X . 1 H * > / 8 H ZERO *,3(I4,3H *>/1H , 4 ( 6X, 1 H * >7 8H POS. *,3(I4, P301

8304

8 33 7

Z3H • *)/1H , 4(6X,1H*)/1H ) FORMAT </735H TEST FOR' SIGN OF ZERO - TYPE REAL /"/ 29H PATH

1 RM OF EXPRESSION */ 29H OF IF * -0.0 * 0.0 * +0.0 * ) F0RMATC/34H ALL ENTRIES SHOULD BE 6 EXCEPT /36H THE ZERO

1 WHICH SHOULD BE 11 /33H IN EACH COLUMN. OTHER TESTS MAY

2 FAIL IF THESE RESULTS DIFFER. / //37H TEST EXPRESSIONS IN

3ATEMENTS /1H ) C * * * * *

C * * * * * 83 05

C * * * * * 301 1

C * * * * * 3012

C * * * * * 3013

C * * * * *

c * * * * *

3 0.1 4

C * * * * * 3015

C * * * *

3.0.1.6... C * * * * 3017

3018

I F

I F

IF

IF

ARITHMETIC IF WITH EXPRESSIONS OF TYPE INTEGER

TEST 1 - SHOULD TAKE ZERO BRANCH

(MCA1 1(1) - 5) 9981 ,3011 ,9981

TEST 2 - SHOULD TAKE ZERO BRANCH

(MCA1I ( 1 > +" 5 - I F I X ( C M A 1 S ( 1 >") ) 9 9 8 2,30 1 2 , 9982

TEST 3 - SHOULD TAKE MINUS BRANCH

( (MCBVI * 2 / 7) - I ABS ( I F I X ( 1 6 . 5 - 10.4)) - 7)

TEST 4 - SHOULD TAKE PLUS BRANCH

( (MCA1 1(1) - 4) ** 99 / (MCBVI - 4 ARITHMETIC IF WITH EXPRESSION OF

TEST 5 - SHOULD TAKE ZERO BRANCH

IF (CMA1SM) - 1 0.5 ) 998 5 , 30 1 5,998 5 SHOULD TAKE MINUS BRANCH

* 2.0 - ( F LOAT (MCBVI ) **1 ) - SHOULD TAKE PLUS BRANCH

(-2.0) ** (MCBVI - 4 * MCA1KD) - SHOULD TAKE ZERO BRANCH

9980

P301

* F0P3 01

P301

PATH, P3 01

/ 31HP301

IF STP3 01

P301

P301

P301

P301

P301

3013,9983

P301

P301

9983 P301

P301

0 8 70

08 8 0

0 890

0900

0910

0920

0930

0940

095 0 0960

09 7 0 098 0 0990

1000

1010

1020

* MCA1 1(1)))

TYPE REAL

9984,9984,3014 P301

P301

P301

P301

1030

1040

10 50

1060

1070

1080

1090

1 100

I F TEST 6

-

( CMA1 S ( 1 )

* TEST 7

- IF (CMBVS *

* TEST 8

- IF (MCAVI) 9988,3018

WRITE (NUVI ,3019)

GO TO 9980

FORMAT ( 18H TESTS

MCAVI = 1 IF ( IABS(MCA1 1(1) - 5)

)

WRITE (NUVI, 9989) MCAVI

GO TO 3011

WRITE (NUVI, 8306) MCAVI

FORMAT ( / /2X, 1 4HERR0R IN TEST , I2.23H

1 30H TREATED AS A NEGATIVE NUMBER)

1.0)

P301

3016,9986,9986 P301

P301

29 . 0 ) 9987 , 9987 , 30 1 7P301

P301

P301

P301

P301

1110

1120

1 130

1 140

3019

998 1 SUCCESSFUL ) P301

P301

P301

P301

1 150

1160

1170

1180

83 0 1 ,8 302 , 830 1 830 1

8302

8306 BECAUSE MINUS ZERO WAS

/

GO TO 3011

9982 MCAVI = 2

I F "(7ABS CMCA'i I ( 1 ) 8307 WRITE (NUVI, 9989)

+ 5 - MCAVI

IFIX(CMA1S(1)))) 8307,8308,8307

8.3 0 8

9983

GO TO 3012

WRITE (NUVI ,8306). MCAVI

GO TO 3012

MCAVI = 3 WRITE (NUVI, 9989) MCAVI

GO TO 3013

P301

P301

P3 01

P301

P3 01

P301

P3 01

P301

P301

P301

1 190

1200

1210

1220

1230

1240

1 2 5 0 1260

1270

1280

9984 MCAVI = 4 WRITE (NUVI, 9989 ) MCAVI

GO TO 3014

9985 MCAVI = 5 IF (ABS(CMA1S(1)

8309 WRITE (NUVI, 9989 ) 10.5))MCAVI

8309,8310,8309

GO TO 3015

8310 WRITE (NUVI, 8306) MCAVI

GO TO 3015

9986 MCAVI = 6

P301

P301

P3 01

P301

P301

P301

P301

P301

P3 01

P301

P301

P301

P301

P301

1290

1300

1310

1320

1330

1340

1350

1360

1370

1380

1390

1 400

1410

1420

WRITE (NUVI ,9989) MCAVI P3 0 1 1 430

GO TO 3016 P301 1 440

9987 MCAVI = 7 P30 1 1 4 5 0 WRITE (NUVI ,9989) MCAVI P301 1 460

NBS FORTRAN Test Programs Version 1 193
9988

GO TO 3017

MCAVI = 8 WRITE (NUVI ,9989) MCAVI

FORMAT ( 6H TEST, 12, 7H FAILED)

P301 H70

P301 1480

P 3 6 1 1 4 9 6

P301 1 500

P301 1 510

P301 1 520

P 3 0 1 1 530

P301 1 540

P 3 0 1 1 5 5 0 P301 1 560

P301 1 570

P 3 0 1 CI

P301 C2

* P30200 1 0 P3 02 0020

P3020030

P3 02 0 040

*P3020050

P 3 0 Z 0 0 6 0 2 P-3 0 2 0 0 7 0 P3 02 6680

P3020090

P 3 0 2 0 1 0 0 P30201 10

P 6 014140

PO 0 1 4 1 4 5 POO 1 41 50

P001 41 55

POO 1 41 60

P001 4165

POO 1 4 1 70

P00U1 75

P 3 0 2 A

1

P302A2

P302A3

P001 41 80

P 3 02 0 1 2 6 P0073260

POO 73265

P0073270

P0073275

P0073280

P302B1

P0073285

P 3 0 2 0 1 3 0 IP30201 40

P3 020 1 50

P3020160

P30201 70

P3 020 1 80

P 3 0 2 0 1 9 0 P3020200

P3 02 02 1 0 P3020220

P 3 0 2 0 2 3 0 P3020240

1 P3020250

P3020260

P3 0 2 02 70

P3020280

P 3 0 2 0 2 9 0 P3020300

P3 02 03 1 0 P3020320

P3020330

P3020340

P 3 0 2 0 3 5 0 P3020360

9989

9980

C * * * *

C * * * *

c * * * *

c * * * *

CARDS

CONTINUE

* END OF TEST SEGMENT 301

* WHEN EXECUTING ONLY SEGMENT 301, THE STOP AND END

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

C= STOP

C= END

STOP

END

ltttlltHtllttitltMHttHltHilttttlllttl*lttltiH*ttHtttttHHtt

C * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * * c=

c = c=

FARIF - (302)

GENERAL PURPOSE

TEST OF FULL FORTRAN ARITHMETIC IF STATEMENT

GENERAL COMMENTS

INTRINSIC FUNCTIONS ASSUMED WORKING

ASA REF

7.1.2.

* S P E C I F I C A T 1 0 N S SEGM ENT 3 0 2

*

* WHEN EXECUTING ONLY SEGMENT 302, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C =

* I N COLUMN S 1 A N D 2 R E M 0 V E D

* DIMENSION MCA1 1(5) ,AC2S(5,6)

DOUBLE PRECISION MCAVD , MCBVD

COMPLEX CHAVC

DIM E N SI ON MCA1 I (5) ,AC2S(5,6)

DOUBLE PRECISION M CAVD , M CBVD

COMPLEX CHAVC

C

* * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c.=

c * * * *

3 02 0

OUTPUT TAPE ASSIGNMENT STATEMENT NO INPUT TAPE

* WHEN EXECUTING ONLY SEGMENT 302, THE FOLLOWING STATEMENT

* NUVI =6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

* NUVI = 6

NUVI =6

C * » * *

WRITE (NUVI, 3020)

FORMAT ( 1 H1 , 1X, 26HFAR I

F

i"F STATEMENTS/

220H ASA REF. - 7.1 .2.2/2X.7HRESULTS)

* HEADER FOR SEGMENT 302 WRITTEN

MCA1 I ( 1 ) = 5

(302) FULL FORTRAN/ 1 6X , 2 4HAR I THMET I

C

MCAVI = 0 AC2S( 1 , 1 ) = 10.5

MCAVD "= - 15 . 6 DO

CHAVC = (1.0.2.0)

MCBVD = -0 .ODO

* ARITHMETIC IF WITH EXPRESSION OF TYPE DOUBLE PRECISION

* TEST THAT MINUS 2ER0 IS TREATED AS ZERO 4.2/1

IF (MCBVD) 9301,9303,9301

WRITE (NUVI, 9302)

FORMAT ( / /2X, 37HERR0R . MINUS 2ER0 TREATED AS NEGATIVE/

1 36H NUMBER - OTHER TESTS MAY FAIL AS A/

2 8H RESULT)

C * * * t

C * * * *

930 1 9302

C * * * * 93 0 3

C * * * * 302 1 C * * * *

MCAVI = 0

* TEST 1 - SHOULD TAKE 2ER0 BRANCH

IF (MCAVD + 15. ODO) 3 0 2 8 , 302 1 , 3028

* TEST 2 - SHOULD TAKE MINUS BRANCH

IF (MCAVD / DBLE( FLOAT ( MCA1 I ( 1 > ) ) * 2. DO) 3 02 2 , 3 0 29 , 3 029

* TEST 3 - SHOULD TAKE MINUS BRANCH

194 NBS FORTRAN Test Programs Version 1
3022 IF (MCAVD/(-15.0D0) + 6.0D0 - 2. 000 »* 3 ) 3 023,997 1 , 9971 P3020370

C**t.« TEST 4 - SHOULD TAKE PLUS BRANCH P3020380

3023 I F ( DS I GN ( 1 . 0D0 , OB LE ( REAL ( CHAVC ) ) ) ) 9972 , 9972,3024 P 3 0 2 0 3 9 0 C**t*t TEST 5 - SHOULO TAKE ZERO BRANCH P3020400

3024

3 0 2 5

IF (2.0D0 ** 2 - 4.0D0/ 1.0D0) 9973, 3025. 9973

/ U T A 11 f \ ft ft "7 1 "7 A 1 /_ ft ft "7 A IF (MCAVI) 9 9 7 4,3026,9970

P302041

0

F\ ^ A ~» A 1 A P3020420

3 026 WRITE < N U V I ,3 0 27 )

ft ft T ft ft ft "7 A GO TO 9970

P3020430

P3020440

3 02 7

T A "5 0 3 0 2 8 FORMAT (//34H SEGMENT 302 TESTED SUCCESSFULLY.)

MCAVI - 1 P3020450

P3020460

rt ^ a i 93 0 4

IF ( DABS ( M CAVD + 1 5 . 0 D 0 ) ) 93 0 4 , 93 0 5 , 93 0

4

WRITE (NUVI.9975) MCAVI

P3020470

P3020480

ft a c 93 0 5 GO TO 3021

WRITE (NUVI.9306) MCAVI

P3020490

P3020500

9306

1 FORMAT ( / /2X, 14HERR0R IN TEST .I2.23H BECAUSE MINUS ZERO

30H TREATED AS A NEGATIVE NUMBER)

WAS/ P302 0 5 1 0 P302 0 5 20

3029

GO TO 3021

MCAVI = 2 P3020530

P3020540

WRITE (-NUVI.9975 ) MCAVI

GO TO 3022

P3020550

P3020560

9971 MCAVI = 3 WRITE ( N U V I ,997 5 ) MCAVI

P3020570

P3020580

9972

GO TO 3023

MCAVI = 4 P3020590

r^^A^A / AA P3020600

WRITE (NUVI.9975) MCAVI

ft ft t n "7 a y GO TO 3024

P30206 1 0

A "7 A T A / T A P3020620

9973 MCAVI = 5 ?r / r\ k n ft / ~i Ar\A t / a rv a / 1 a r» a \ \ a ? a ^ a "7 a o IF (DABS(2.0D0 ** 2 - 4.0D0 / 1.0D0)) 9307, 9308, 93 0 7 P3020630

A 7 A O A /i / A P3020640

9307 WRITE (NUVI.9975) MCAVI

ft ft T ft "7 A "3 C GO TO 3 0 Z 5 P3020650A 7 A O A £ L A P3020660

9308 WRITE (NUVI.9306) MCAVI

GO I U 5 0 Z j P3020670

A "7 A T A Z OA P3020680

9974 MCAVI = 6

MDTTC f M 1 1 \ / T QQ7C \ MPA\/T

P30Z0690

A"7A"5A"7AA P3020700

9975

ft ft ~7 A 99 7 0 FORMAT (//6H TEST. 13, 8H FAILED.)

rniiT t m II C

I U N 1 1 N U t P302071

0

n^ATA^TA P3020720

c * * * * t

c * * * * * END OF TEST SEGMENT 302

Wntli t At LU 1 Nb UINLT OtuntNl J [} c , Int OlUr AND END CARDS

P3020730

A "7 A T A 7 / A P30Z0740

c * * * * *

C t * * t * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=IN COLUMNS 1 AND 2 REMOVED.

P3020750

A 7 A T A 7 Z A P3020760

c=

LSTOP

END

P3020770

P3020780

STOP

END

P302C1

P302C2

c * * t * t

c * * * * *

>.t * 1 t « t 1 t « * » t * « t t M « 1 t I * * * t t 1 1 t * t 1 1 « t t t t t * * t t * t t t 1 ********t******«P3100010

P31 00020

c * * * * t

c * * 1 1 * IOFMT - (310) P3100030

P31 00040

c * * t * *

C * t * 1

1

Itl < t 1 tt 1(1 1 1 1 1 I* I tt 1 1 1 » 1 t 1 • 1 1 t t it t t 1 1 1 i H t t III 1 t 1 GENERAL PURPOSE* * * * * t * * * t * * ASA

* * * * P3 1 0 00 5 0 REFSP31 00060

c * * * * t

c * * * * * TO TEST ADDITIONAL FEATURES OF FORMATTED READAND WRITE STATEMENTS AND FORMAT STATEMENTS

7.

7 .

1 .3

1 .3

.2.2 P 3 1 00 0 70

.2.3P3100080

c * * t * *

C * t * t * RESTRICTIONS OBSERVED

t ALL FORMAT STATEMENTS ARE LABELED 7 .Z .3

P3100090

/57P3100100

c * * * * *

c * * * * *

* H AND X DESCRIPTORS ARE NEVER REPEATED

* FOR W.D DESCRIPTORS. D IS ALWAYS SPECIFIED AND

7

7

.Z

.Z

.3.

.3.

3/54P3100110

1/31P3100120

c * * » * *

c * * * * *

W IS EQUAL TO OR GREATER THAN D

* FIELD WIDTH IS NEVER ZERO

7

7

.Z

. 2

.3.

.3

1/3 3 P 3 1 0 0 1 3 0 /18P3100140

C * 1 1 * *

c * * * * *

* IF THERE IS AN I/O LIST. THE FORMAT STATEMENT

CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER

7 . 2 .3 . 4/22P3 1 001 50

P3 1 0 0 1 6 0

c * * * t *

C 1 1 * * * THAN H OR X)

* ITEMS IN I/O LIST CORRESPOND TO FORMAT DESCRIPTORS 7 .2 .3.

P31 001 70

4/36P31 001 80

c * * * t *

c * * t * *

* NEGATIVE OUTPUT VALUES ARE SIGNED

» FIELD WIDTH NEVER EXCEEDED BY OUTPUT

7

7

.2

.2

.3.

.3 . 6/56P31 00190

6/01P3100200

C 1 1 * t *

C * * 1 1 *

* FOR I CONVERSION, EXTERNAL INPUT FIELDS ARE

INTEGER CONSTANTS

7. Z .3 .6. 1 /07P3 1 0 02 1 0 P31 00220

C INPUT DATA TO THIS SEGMENT CONSISTS OF 38 CARD IMAGES

C COLS. 22 25 31 34-35 40-43 55 67 69

IN COL

74-76

1 - 80 P3100230

P3 1 002 40

NBS FORTRAN Test Programs Version 1 195
CARD

CCARD

CCARD

CCARD

CCARDS

CCARDS

CCARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

CARD

C * * * *

C * * * t

c * * * *

c * * * *

c * * * t

c * * * *

c * * * *

c * * t *

c * * * *

c * * * *

c * * * *

c * * * *

C t * * *

c * * * *

C * t * *

c"= c=c=

c=

c=

c=

1 COLS.

2 COLS. 1

1.6.+3.1+ -14

33

0. E + 00

42-45 50 59-60

b+66 . do

1 8 26 28 38

E00 P3100250

P3100260

P3 100270

42- 58 P3100280

3 1.23456987654

COLS. 69 78

3 - . 1 09876-4

COLS 1---5

+1.234E-0 -98.7654E+0 +2345.67891011+2 P3100290

P3100300

P3100310

P3100320

4,5,6,7,8 12345

COLS. 1-3

9,10,11,12 1.1

COLS. 1

•

P3100330

P3100340

P 3 1 0 0 3 5 0 58 P3100360

13 +0.339567E+02

14 + .339567+2

15 + 3.395670E1

16 0.96295134244D+04

P3100370

P3100380

P 31 0039 6

P3100400

17 . 96295 1 34244D04

18 0.96295134244+4

19 0.962951342440+04

20 31 .23+0. 14E+04+0. 20+02

P3100410

P3100420

P31 00430

P3100440

21 31.23 .14E+04

22 -0. 13579E+054444

23 4 4 4 4 24 4444

2 + 2 P3100450

P3100460

P 310 04 70

P3100480

25 4444

26 4444

27 -333 5.555+6. 45451-0

4

28 -6.666 .9989E+12

P3100490

P3100500

P 3 1 0 0 5 1 0 P3100520

29 7.77-0.747E-02 +0.549E022

30 +0.662E-00 0.468-1011

3 1 6 . 59 5 42D + 04-44. 6666-0 . 1 2345678966-63

32 54.9327-0. 1 395624534D+00

P3100530

P3100540

P 3 1 0 0 5 5 0

P3100560

33 65432.1

34 +0.848E+03 .848E3 + . 1 290D7+0 . 1 29D+07 0.412D21

35 222 222222222222222222222222222222222^

36 -.987E0-0.987E+00 +0.6D0 + 0. 60+00 .3680-5

P3100570

P3100580

P3 166596

P3100600

37 5 5 5 5 38 987654 8647.86 987.654

COLS. NOT MENTIONED ARE BLANK

P3100610

P3100620

P3i 100630

P3100640

READ AND WRITE STATEMENTS FOR ENTIRE SEGMENT FOLLOW P3100650

P3100660

6 / 4 5 P 3 1 6 6 6 7 6

P3100680

TEST THAT COMPLETELY BLANK FIELDS IN THE INPUT

ARE TREATED AS 2EROS . (ALL VARIABLES AND ARRAY

7.2.3

* ELEMENTS USED IN THIS TEST ARE FIRST SET TO

* N0N-2ER0 VALUES. I, E, F AND D DESCRIPTORS

* APPEAR IN THE CORRESPONDING FORMAT STATEMENT

P3100690

P3100700

P 3 1 6 071 0

P3100720

PJT00731

POO 1 4 1 90

P 0 0 1 4 1 9 5 P0014200

PO0 14205

PO0 1 42 1 0

P 6 0 1 4 2 1 5 P 0 0 1 4 2 2 0

POO 1 4225

P0014230

PO0 1 423 5 P0014240

P 3 1 0 A

1

P310A2

P 3 1 0 A3

P310A4

P3 1 OAS

P310A6

PO0 1 4245

P3100740

* SPECIFICATIONS SEGMENT 310

* WHEN EXECUTING ONLY SEGMENT 310, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

IN COLUMNS 1 AND 2 REMOVED,

DIMENSION A1S(5).A2S(2,2),A3S(3,3,3),EP1S(33)

DIMENSION IAC1 I (5) , IAC2I (2, 7) .ACTS (25 )

, AC2S ( 5 . 6

)

INTEGER MCA3I (2,3,3)

REAL MVS

DOUBLE PRECISION M CAVD . M CBVD . M C CVD . A1 D ( 4 ) . A2D ( 2 , 2 ) , A3D ( 2 , 2 , 2 > DOUBLE PRECISION DPAVD . DPBVD , DP CVD , DPDVD , DPEVD , DPFVO , DPHVD , AAAVD

DIMENSION A1S(5) ,A2S(2,2) ,A3S(3,3,3) ,EP1S(33)

DIMENSION IAC1 I (5) , IAC2I (2,7) , AC1S<25) , AC2S(5 f 6)

INTEGER MCA3K2.3.3)

REAL MVS

DOUBLE PRECISION M CAVD , M CBVD ,MC CVD , AID ffyj^j^gp^ffi ( 2,2.2)

DOUBLE PRECISION DP A VP , DP B VD , DP C V D , D PDVD , DP EVO , D P F V p , 0 P H V D , A A A V Q. C * t * * * C».»'*** I N PUT - 0 U T P U T TAPE ASSIGNMENT STATEMENTS

196 NBS FORTRAN Test Programs Version 1
C***«« P0073290

C*»*** WHEN EXECUTING ONLY SEGMENT 310, THE FOLLOWING STATEMENTS P0073295

C***»* NUVI = 6 , I R V I = 5 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED . POO 733 00

C= NUVI = 6 P0073305

C= ' IRVI = 5 POO 733 1 0 NUVI = 6 P310B1

IRVI = 5 P310B2

P007331

5

C * * *

C t * t 3100

** HEADER FORMAT STATEMENT P3100750

FORMAT (1H1 , 1X,.38HI0FMT - (310) ADDITIONAL FORMATTED I/O P3100760

1 //2X.38HASA REFS - 7.1 . 3 . 2 . 2 7 . 1 . 3 . 2 . 3 7 . 2 . 3 / / 2X , 7HRESULTS ) P 3 1 0 0 7 7

0

WRITE (NUVI, 3100) P3100780

J AC VI = 111*11 P3 100 790

I AC 1 I ( 1 ) = -2345 P3 1 0 08 0 0 IAC2 1(1,1) = 9999

MCA3I (1 , 1,1) = 2 A CVS = 1.2

BCVS = - . 3 4

E

-

3

P3 1 0 08 1 0 P3100820

P31 00830

P31 00840

A1 S( 1 ) = 34.56

A1S(2) = 456.789E+02

A2S(1,i) = -7899.3

P3 1 00 8 5 0 P3100860

P3 100870

P3 1 0 08 8 0

" P31 00890

P31 00900

P310091

0

P3100920

P 3 1 0 0 9 3 0 P31 00940

'6/45 P3 1 0 09 5 0 P31 00960

-

p 3 1 0 09 70

P31 00980

A2S(2, 1 ) + 9876. 543E-01

A3S( 1 , 1 , 1 ) = .543

A3S<2, 1 . 1 ) = 4.33E+1

AAAVD = +2 .220+01

A1D(1) = -.334560-01

C * * *

C * * *

c * * * 3101

A2D( 1 , 1 ) = 9987.76D+2

A3D<1,.1,1> = 44.D-2

t* FORMATS TO TEST THAT

** TREATED AS ZEROS. I,

*"* CARDS 1 AND 2 FORMAT (4(15), 4(F3.1), 4(E11.4)/ 4(D15.8))

BLANK INPUT FIELDS ARE

E, F AND D FIELDS ARE TESTED

7.2.3

READ

3102

(IRVI, 3101) JACVI. IAC1K1), IAC2K1.1), M CA3 I ( 1 , 1 , 1 ) , ACVS, P3 1 0 0990

1 A1S(1), A2S(1,1) f A3 S( 1,1,1), BCVS,. ATS(2), A2S(2,1), P3 101 000

2 A3S(2 , 1 , 1 ) , AAAVD, A 1 D ( 1 ) , A2D( 1 , 1 )', A3D( 1 . 1 , 1 ) P 3 1 0 1 0 1 0 FORMAT ( /2X, 16HTEST BLANK INPUT /2X.26HEACH ANSWER SHOULD BE ZERO , P3 1 0 1 020

P31 01 030

P3101040

P 3 1 0 10 5 0 P 3 1 0 1 0 6 0

1 4( / 16) / WRITE (NUVI

1 A 1 S ( 1 )

4(/F8. 1 ) / 4(/E12. 1 ) / 3102) JACVI, IAC1K1),

A2S( 1 ,1) , A3 S ( 1 , 1 , "l )",'

4(/D12.1 ))

IAC2K1.1), MCA3K1

BCVS, A1S(2) , A2S<2

1,1)

1),

ACVS

A3S(2.1,1), AAAVD, A1D(1), A2D(1,1), A3D(1.1,1)

C * * *

C * * *

c * * * 3103

TEST THAT DECIMAL POINTS APPEARING IN INPUT FIELDS 7.2.3

** OVERRIDE THE SPECIFICATIONS SUPPLIED BY E, F AND

** b FIELD DESCRIPTORS

FORMAT (/34H TEST DEC. PT. SPECIFIED BY INPUT/ 36H 3 LINES

1CH GROUP SHOULD MATCH / 26H * LINE IS HOLLERITH DATA ) WRITE (NUVI, 3103)

CMAVS = CMBVS = CMEVS = CMFVS =1 . 23 4 56

987654.

0. 1 23 4E + 01

-0.987654E+02

.6/47P31

P31

P31

IN EAP31

P31

P31

P31

P31

P 31

P31

01070

01080

010 9 0 01100

0 1 1 1 0 01120

0113 0 01140

01 15 0 01160

0117 0 01180

01190

01200

01210

01220

01230

01240

012 5 0 01260

01270

01280

01290

01300

01310

01320

01330

01340

C * * * 3104

DPAVD = DPBVD :

* * CARD

FORMAT

0.23456789101 10+06

-0 . 1 09876D-04

3

(2(F7.3), 2(E12.5), 2(D20.11))

P31

P31

P31

P31

3105

READ (IRVI, 3104)

FORMAT (/12H *

1 / 1 5 H i 2 /23H i

ACVS, BCVS, FFCVS, GGCVS

1 .23 4 5 6 , 2 (/F12.5)//13H

MCAVD, MCBVD

98 76 5 4. 0,2 (/F13 . 1 ) / 0.1 23 4E + 01 ,2(/E15.4)//17H * - 0 . 9 8 76 5 4E + 0 2 , 2 ( / E 1 7 . 6 ) / 0 . 234567891 0 1 1 0 + 06 , 2 ( / D23 . 1 2 ) / / 1 7H * -0 . 1 09876D-04

,

P31

P31

P31

P31

3 2(/D17.6) ) P31

WRITE (NUVI, 3105) CMAVS, ACVS, CMBVS, BCVS, CMEVS, FFCVS, CMFVS, P31

1 GGCVS, DPAVD, MCAVD, DPBVD, MCBVD P31

C * * * TEST SIMPLE REPETITION OF FORMAT DESCRIPTORS 7.2.3.4/ P31

C t * *

c * * *

C t * t 3106

*

»

** WHEN ADDITIONAL ITEMS REMAIN IN AN I/O LIST

** AND THE LAST RIGHT PARENTHESIS HAS BEEN REACHED

* * I N THE CORRESPONDI NG FORMAT STATEMENT

FORMAT ( 35H1 TEST FORMAT DESCRIPTOR REPETITION/ 32H

1 IN EACH GROUP SHOULD/ 1 4H BE IDENTICAL)

WRITE (NUVI ,3106)

7.1.3.2.1/ P31

P31

P31

ALL LINES P31

P31

P31

NBS FORTRAN Test Programs Version 1 197
JACVI = +12345 P3101350

K8CVI = 3 P31 01 360

CMAVS = 1.1 P3101370

CMBVS = 1.23 P3101380

CMEVS = 33.9567 P3101390

CMGVS = 1 . 4E + 03 P31 01 400

DPAVD = 96295 1 342 . 44D-5 P31 01 41 0 DPBVD = 2.0D1 P31 01 420

c * * * * * CARDS 4, 5, 6, 7, 8 P3101430

3107 FORMAT (15) P3101440

READ (I RV I, 3107) I A C 1 I P3 1 01 450

c * * * t * CARDS 9 , 10, 11, 12 P3 1 0 1460

3108 FORMAT (F3.1)

READ ( I RVI , 3 1 08 ) A2S

P3 1 0 1 470

P3101480

C***»* CARDS 13, 14, 15 P31 01 490

9320 FORMAT (E13.6) P3 1 0 1 500

n r a n /tdwt Pi "? 9 a \ a 1 o / 1 \ li u p \/ o A 1 o / 9 \ READ (IRVI,9320) A1b(1), HHLVb, A1b(Z) P3101510

c * * * * * CARDS 16, 17, 18, 19 P3101 520

9 3 Z 1 C Pi D M A T r |M { 11\ r (J K n A I (LMo.M)

READ (IRVI.9321) A2D

P31 01 530

P31 01 540

c

* * * * ^ PADHC ? fl 91 * LAKuo lv , L\ P31 01 550

9322 FORMAT ( I 1 , F4 . 2 , E9 . 2 , D8 . 1 ) P31 01 560

DEAR M D\/ 1 Q7 T ? \ 1 P P W T PiP\/C AP9G/S L \ A 7 Pi / 1 KbAU ( 1 K V 1 , V 5 L C ) LLLVI, ULVb, Aub( 5 , 0 ) , A 5 L) ( 1 ,2,2) , MDCVI

,

FFCVS , P3 1 01 570

1 GGCVS, AAAVD P3101580

9 3 2 3 FORMAT ( / i 0 H * 12 3 4 5)

WRITE (NUVI, 9323)

P 3 1 0 1 5 9 0 P3 1 0 1 600

9324 FORMAT (110)

lip. T TP" /IklllWT /"l T "1 / \ 1 A ^ \ / I T A P 1 T WRITE (NUVI.9324) JACVI, IAC1I

P 3 1 0 1 6 1 0

P 3 1 0 1 6 2 0 93 2 5

r n pi H A T is Oil j. A A \ FORMAT ( / 8H * 1.1)

WRITE ( N U V I ,932 5 ) P3101630P31 01 640

9326 FORMAT (F8.1)

WRITE (NUVI ,9326) CMAVS, A2S

P3101650

P31 01 660

9329 FORMAT (/17H * 0 . 3 39 5 6 7E + 02 ) WRITE (NUVI, 9329)P3101670

P31 01 680

9330 FORMAT (E17.6)

WRITE (NUVI, 9330) CMEVS. A1S(1), HHCVS, A1S(2)

P31 01 690

P31 01 700

93 3 1 FORMAT (/22H * 0 . 9 6 2 9 5 1 3 4 2 4 4 D + 0 4 ) WRITE (NUVI. 933 1 )P 3 1 0 1 7 1 0 P3 1 0 1 720

9332 FORMAT (D22.11)

WRITE (NUVI, 9332) DPAVD, A2D

P3101 730

P3 1 0 1 740

9333 FORMAT ( / 3 1 H * 3 1.23 0.1 4E + 04 0. 20 + 02 ) WRITE (NUVI, 9333)P31 01 750

P3 1 0 1 760

9334 FORMAT ( I 6 , F6 . 2 , E1 0 . 2 , D9 . 1 ) P3 1 0 1 770

WRITE (NUVI, 9334) KBCVI, CMBVS, CMGVS. DPBVD, LCCVI

,

DCVS

,

P3 1 0 1 780

1

c * * * *

c * * * *

c * * * *

AC2S(5,6), A3D(1,2,2), MDCVI, FFCVS, GGCVS, AAAVD

TEST THAT FORMAT CONTROL PASSES TO THE GROUP

ENCLOSED BY THE LAST PRECEDING RIGHT PARE N . ) WHEN THE I/O LIST CONTAINS MORE ELEMENTS THAN

P31 01 790

7.2.3.4/03P3101800

1.3.2. 1 /39P31 01 81 0 P3101820

C * * * * * THE NUMBER OF DESCRIPTORS IN THE FORMAT STMNT. P3101830

JACVI = + 4 444 P31 01 840

KBCVI = -333 P31 01 850

LCCVI = 22 P3101860

MDCVI = 1 1 P3101870

ACVS = 5.555 P3101880

BCVS = -6.666 P3101890

CCVS = + 7.77 P3 1 0 1 9 0 0 DCVS = 65432 . 1 P 3 1 0 1 9 1 0 CMAVS - - 0 . 1 3 5 79E + 5 P3101920

CMBVS = 0.4545E-04 P3 1 0 1 93 0 CMCVS = 0 . 9989E1 2 P3101940

CMDVS = -0 . 747E-2 P3 1 0 1 9 5 0 CMEVS = + 0 . 5 49E + 00 P3 1 0 1 960

CMFVS = 0 . 662E-0 P31 01 970

CMGVS = 0 . 468 E- 1 0 P3101980

DPAVD = + 5 9 . 5 42D02 P3101990

DPBVD = -0 . 01 23456789D -2 P3102000

DPCVD = - 1 39 5 62 4 5 34 . D- 1 0 P3102010

DPDVD = + 129. D4 P3 1 02 020

198 NBS FORTRAN Test Programs Version 1
DPEVD = 4.12D+20

OPFVD = 36.8D-7

DPHVD = 0.6000

FFCVS = -44.6666

P3 1 02030

P31 02040

P 31020 5 0 P3 1 02060

P3 1 02070

P3 1 0208 0 P31 02090

P3102100

P 3 1 6 2 1 1 0 P 3 1 0 2 1 2 0 P3 102 130

P31 021 40

P 3 10 215 0 P31 021 60

P 3 10 217 0 P31 021 80

P 3 1 0 2 1 9 0 P3 1 02200

GGCVS = HHCVS = MVS =

- CMHVS =

+.549327E+2

848 . 98 7

1 .23E-1

24, 25, 26

CMIVS = 646. E-2

Ct**«* CARDS 22. 23,

933 5 FORMAT (

' E 1 2 . 5 . (14))

READ (IRVI.9335) A1S(2), IAC1 I C***«* CARDS 27, 28

9336 FORMAT (14

READ ( I R V

I

C***»* CARDS 29

9337 FORMAT ( F4

READ (IRVI

(F6.3), E11

93 36) MRRVI

,

30

2, (2(E10.3>),

9337) A2S(2,2)

4)

AC1S( T) EP1SM), A3S(1.1,1), AC2S(2,2)

12)

A3S ( 2 , I..,.,!.).,.. EP1S(2) , MCA3I ( 1,1,1)

1 BVS, AC2S(2,1), NECVI

C***** CARDS 31 , 32

933 8 FORMAT (01 2. 5, (F8.4,

READ (IRVI, 9338) MCAVD

C* * * * * CARDS 33 , C****» THIS READ

9339 FORMAT ( F 7.1

017.10))

EP1 S (3) , A1D(1 ) 34, 35, 36

CAUSES AN INPUT DATA CARD TO

. ( / 2

(

e 1 o . 3 ) , 2 ( b 1 o . 3 ) ) , bib

A2S( 1 ,2) A2D(2, 1 )

READ (IRVI, 9339) CVS, A2S(2,1), A3S(1,2

BE

3)

2)

SKIPPED

A3D( 1 , 1 , 1 )

1 A3D(1,2,1), A2D(2,2), A3S(1.2,1), EP1S(4)

2 A1D(2), MCBVD , MCCVD

9340 FORMAT </16H * - 6 . 1 3 5 7 9 E + 0 5 , 2 ( / E 1 6 . 5 ) / / 9 H * WRITE (NUVI.9340 ) CMAVS, A1S(2), JACVI, I A C 1 I 4444, 6 ( / 1 9 ) )

5 5 5 , 6 .666

9341 FORMAT (/ 8H * -333, 2(/I8)/ 10H1 * 5 115H * 0.4545E-04, 2(/E15.4)// 10H * 21 5 H * 679 9 8 9 E 12", 2 ( / E 15 . 4 ) )

"

WRITE (NUVI.9341 ) KBCVI. MRRVI, ACVS, AC 1 S < 1

)

1 BCVS , A3S( 1 ,T, 1) , CMCVS , AC2S(2 , 2

)

2(/F10.3) //

2 < / F 1 0 . 3 ) //

CMBVS, EP1SM)

9342 FORMAT (/9H 7.77 ,2(/F9.2)//14H * -0.747E-02, 2(/E14.3) //

P3 1 0 2 2 1 0 P31 02220

P3 10223 0 P31 02240

P3 1 022 5 0 P31 02260

P3 10 2 2 7 0 P3 1 022 8 0 P3 102290

P3 1 023 0 0 P 3 1 0 2 3 1 0 P3102320

P 3 1 0233 0 P3 1 0 23 40

P 3 1 0 2 3 5 0 P3 1 02360

P 3 1 023 70

P3 1 0 23 8 0 P 3 1 0 2 3 9 0 P31 02400

P 3 1 0 2 41 0 P3102420

"P 3 1 0 2 4 3 0 P3102440

9343 FORMAT (/16H » 0 . 5 9 5 4 2 D + 0 4 , 2 ( / D 1 6 . 5 ) / / 1 2 H * - 4 4 . 6666 , 2 ( / F 1 2 . 4 ) / P3 1 0 2 4 5 0 1/21H * -0.1 234567890D-03 , 2 (/02 1 . 1 0 ) / 1 2 H 1 * 5 4 . 93 2 7 , 2 ( / F 1 2 . 4 ) / / P3 1 02460

2 21 H * - 0 . 1 3 9 5 62 4 5 3 4 D 0 0 , 2 ( / D 2 1. 1 0 ) ) P3 1 02470

WRITE (NUVI.9343) DPAVD, MCAVO, FFCVS, EP1S(3), DPBVD, A1D(1), P3102480

P3 1 02490

P3102500

P3 1 02 5 1 0 P3 1 02 5 2 0 P3 1 02 5 3 0 P31 02540

P 3 1 0 2 5 5 0 P3 1 02 560

P31 02570

P3 1 02 5 8 0 P31 02 5 90

9346 FORMAT (/ 22H * -333 0.595420+04/18, D14.5 ) P3102600

1 14H * 0.549E+00, 2WE14.3)

2 14H * 0.662E+00, 2(/E14.3)

"3 7H * 1 1, 2(7 17) ) WRITE (NUVI.9342) CCVS, A2S(2,2)

/ /7H

/ / 1 4H

22

0

2( / I 7)

468E- 1 0

/ /2 ( /E1 4 3) //

1 EP1S(2), LCCVI

2 MDCVI, NECVI

MCA3 I ( 1 , 1 , 1

)

CMDVS,

CMFVS

A3S(2

BVS,

1,1),

CMGVS

CMEVS,

A C 2 S ( 2 1 )

1 GGCVS. A2S(1.2). DPCVD. A2D(2,1)

9344 FORMAT (/12H * 65432.1/ 2(F12.1/) / 14H

.. 3( g U>3/) i yitH » 0.1 290 + 07/ 3 (01 4.3/)

2 2(014.3/) / 14H * -0.987E+00/ 3(E14.3/)

3 3(bl2. 1/) / 14H * 0.368D-05. 2 ( / D 1 4 . 3 ) WRITE (NUVI,9344) DCVS, CVS, HHCVS, A2S(2,

/

/

.......

1 )

0.848E+03/

14H * 0 . 41 2D + 21 / 12H » 0.60+00/

A3S(1.2,2), DPDVD

9345

A3D(1.1,1), A3D(1,2,1). DPEVD, A2D(2,2)

MVS. A3S(1,2,1), EP1S(4). DPHVD, A 1 D < 2 > DPFVD. MCCVD

FORMAT (/14H * 0.777E+01/ (E14.3))

WRITE (NUVI.9345) CCVS, A2S(2,2)

FORMAT (/ 22H * -333 0.595420+04/18, D14.5 )

MCBVD

WRITE (NUVI

9347 IF (MRRVI -

C » * * * * CARD 3 7 9348 READ (IRVI,

9346) KBCVI. DPAVD,

5) 9348. 9349, 9348

MRRVI, MCAVD

9336) MRRVI

GO TO 9347

C*.**»* * ADDITIONAL SCALE FACTOR ON INPUT-OUTPUT

C * * * * * CARD 3 8 9349 READ ( I RVI , 9327) A1S(3), A1S(4), A1D(4)

9327 FORMAT ( 1PE16.3, -1PE10.2, D10.3)

WRITE(NUVI, 9328) A1S(3), A1S(4), A1D(4)

P3 1 026 1 0 P3102620

P3102630

P3102640

P3102650

P3102660

P31 02670

P3 1 0268 0 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 0CCURRP31 0271 0 2ENCE/28H NO EXPONENT ON INPUT DATA..//.. . P3 1 02720

3 40H CARD 987654 8647.86 987.654/ P3102730

4 40H DESC 1PE10.3 -1PE10.2 010.3/ P3102740

5 40H TO BE .988E+02 .8648E+05 .98770+04/ P3102750

6 4H IS, E12.3, E12.4, D12.4) P3102760

C* * * * * END OF TEST SEGMENT 310 P3102770

C***«* WHEN EXECUTING ONLY SEGMENT 310, THE STOP AND END CARDS P3102780

C***** WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P31 02790

C***«* IN COLUMNS 1 AND 2 REMOVED. P3102800

C= STOP P3102810

C= END P3102820

STOP P310C1

END P310C2

. . . 0. E+00 + + EOO

+ + . D+00 . 00

1 .23456987654 +1.234E-0 -98.7654E+0 + 2345.67891011+2 -.109876-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.395670E1

0.96295134244D+04

.96295134244D04

0.96295134244+4

6 . 96295134244D+04

31 .23 + 0. 14E + 04 + 0 . 20 + 02

31 .23 . 1 4 E + 0 4 +.2 + 2 -0. 1 3 5 79E + 0 5 4444

4444

4444

4444

4444

-333 5 . 5 5 5 + 0 . 45 45E-04

-6.666 .9989E+12

7.77 -0 . 747E - 0 2 + 0 . 549E022

+0.662E-00 0.468-1011

0.59542D+04-44. 6666-0. 1234567890D-03

54.9327-0. 1395624534D+00

65 432 . 1 + 0 . 848E + 03 . 848E3 + . 1 290D7 + 0 . 1 290 + 07 0.41 2D21

22222222222222222222222222222222222222222222222222

-.987E0-0.987E+00 +0.6D0 + 0.6D+00 .368D-5

5 5 5 5 987654 8647.86 987.654

C *****

c * * * * * ****************************************************************«P3120010

P3120020

c * * * * *

c * * * * * RDFMT - (312) P3120030

P3120040

c *****

c * * * * * *****************************************************************P3120050

GENERAL PURPOSE ASA REFSP3120060

c * * * * *

c * * * * * TO TEST FORMATTED READ AND WRITE STATEMENTS

IN WHICH THE FORMAT STATEMENT IS CONTAINED IN

7.2.3. 10P3120070

P3120080

c * * * * *

c * * * * * AN ARRAY

RESTRICTIONS OBSERVED

P3120090

P3 1 20 1 00

c * * * * * c * * * * *

* AN H DESCRIPTOR MAY NOT BE PART OF A FORMAT

STATEMENT IN AN ARRAY

7.2.3. 10/48P3120110

P3 1 20 1 20

c * * * * *

c * * * * *

* ALL FORMAT STATEMENTS ARE LABELED

* H AND X DESCRIPTORS ARE NEVER REPEATED

7.2.3 /57P312^130

7.2.3.3/54P3120140

c * * * * *

c * * * * *

* FOR W.D DESCRIPTORS, D IS ALWAYS SPECIFIED AND

W IS EQUAL TO OR GREATER THAN D 7.2.3.1/31P31201507.2.3.1 /33P3 1 20 1 60

200 NBS FORTRAN Test Programs Vers ion 1
FIELD WIDTH IS NEVER ZERO

IF THERE IS AN I/O LIST, THE FORMAT STATEMENT

7.2.3 /18P3120170

7 . 2 . 3 . 4/22P3 1 20 1 80

CONTAINS AT LEAST ONE FIELD DESCRIPTOR (OTHER

THAN H OR X)

P3 1 20 1 90

P3120200

ITEMS IN I/O LIST CORRESPOND TO FORMAT DESCRIPTORS 7 . 2 . 3 . 4 / 36P3 1 2 0 2 1 0 NEGATIVE OUTPUT VALUES ARE SIGNED 7 . 2 . 3 . 6 / 5 6P3 1 2 02 2

0

FIELD WIDTH NEVER EXCEEDED BY OUTPUT

FOR I CONVERSION, EXTERNAL INPUT FIELDS ARE

INTEGER CONSTANTS

TEST HOLLERITH IN ARGUMENT OF A CALL

7.2.3.6/01P3120230

7.2.3.6.1 /07P31 20240

P3 1 202 5 0 P3120260

ARRAY NAME IN ARGUMENT LIST USED AS FORMAT SPECIFIER P3120270

SUBROUTINE FMTO ALSO TESTS THE EMPTY FORMAT STATEMENT P3120280

THE FOLLOWING DATA STATEMENTS INITIALIZE SOME 7.2.3. 1 6 / 5 0 P 3 1 2029 0 ARRAYS WITH FORMAT STATEMENTS TO BE USED FOR P3120300

READING WITH A, F AND D CONVERSION AND FOR P3 1 2 03 1 0 WRITING WITH I, E AND L CONVERSION P3120320

ARD

ARD

(E

( L1

9.2,3(E13.6) ) ,2(L2) ,L3)

ARD 4 (2X.A2, 5(A2) ) ARD .5 (2X, F5....3, F.4.O., 2<F7.2> ) ARD 6 (2X . D 16.9.D9.2)

ARD 7 4756 -867224+39-

ARD 8 23498.-77.27547. 18

ARD 9 -. 0076 + 1 1 +08. 9342 1 E- 1

3

893.421E-15+08.93421E-13

P3 1 2 0 33 0 INPUT DATA TO THIS SEG. CONSISTS OF 13 CARD IMAGES IN COLS. 1 - 80 P3120340

COLS . 1

' —- - 5 0 P3 1 2 0 3 5 0 ARD 1 (15, 6X, 14, 2(13), 12) P3120360

P3 12 037 0 P3120380

P3 120390

P3120400

P 3 1 2 0 4 1 0 P3120420

P 3 1 2 0 4 3 0 P3120440

P3 1 2 0 4 5 0 P3120460

P 3 1 2 0 4 7 0 P3 1 20 48 0 P31 20490

P3 1 20 5 0 0 P 3 1 2 0 5 1 0 P0 0 1 42 5 0 P0 0 1 42 5 5 P0 0 1 4260

PO 0 1 4265

P 0 0 1 42 70

ARD 10 -0.357901246D+00 +0.52DARD 11 TTA FF9$

ARD

ARD

12

13

AB

CDE+*=123

ARD COLS. NOT MENTIONED ARE BLANK

SPECIFICATIONS SEGMENT 312

WHEN EXECUTING ONLY SEGMENT 312, THE SPECIFICATION STATEMENTS

WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

I N C 0 LU MNS 1 AND 2 REMOVED .

DIMENSION L1I(10),A3S(3,3,3),YER1S(7),IAC1I(5).AC1S(25) P00U275

DIMENSION ZU3S(3,2,2),ZT1S(4),ZU1S(12),ZU2S(4,2).IAC2I(2,7) P0014280

INTEGER AVI , IU2I (4,2) , IT3I (4,2, 2) , IU3I (2.3.3) .MCA3I (2.3,3) PO 0 1 42 8 5 LOGICAL AVB.BVB,CVB,GG1B(2),A1B(2) P0014290

DOUBLE PRECISION DPAVD , DPBVD . DP CVD , A1 D ( 4 ) POO 1 4295

COMPLEX CHAVC.CHBVC P00U300

DIMENSION L 1 1(10), A3S ( 3 ,3,3) , YER1 S ( 7 ) , I AC1 I ( 5 ) , AC1 5(25)

DIMENSION IAC2I(2,7),ZU1S(13).ZU3S(3,2,2),ZU2S(4,2),ZT1S(4)

INTEGER AVI , IU2I (4.2) . IT3' I (4.2.2) , IU3I (2.3,3) , M C A3 I (2,3,3)

LOGICAL AVB.BVB, CVB,GG1B(2) ,A1B(2)

DOUBLE PRECISION DPAVD , DPBVD , DPCVD, A1 D (4

)

COMPLEX CHAVC.CHBVC

P312A1

P312A2

P312A3

P312A4

P312A5

P31 2A6

C * *

C * *

c * *

c * *

c * *

c * *

INPUT-OUTPUT TAPE ASSIGNMENT STATEMENTS

WHEN EXECUTING ONLY SEGMENT 312. THE FOLLOWING STATEMENTS

NUVI=6 AND I R V I = 5 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

C =

C = NUVI = IRVI = NUVI = IRVI =

C * * * t * DATA IU2I(1.1),IU2I(2.1).IU2I(3,1).IU2I(4,1).IU2I(1.2),IU2I(2,2).

1 I U2I (3,2)/2H (A , 2 H 2 / , 2H2X , 2H , 5 , 2H < A , 2H2 ) , 1 H ) / DATA ZU1S(1),ZU1S(2),ZU1S(3).ZU1S(4).ZU1S(5).ZU1S(6).ZU1S(7),

1 ZU 1 S ( 8 ) , ZU1 S ( 9 > , ZU 1 S ( 1 0 ) , ZU 1 S < 1 1 > , ZU 1 S ( 1 2 > / 2 2H( ,2H .2HF3.2H.3, 1H, .2HF3.2H.0.2H, . 2H2 ( . 2HF6 . 2H . 2 , 2H ) ) /

P00U305

P3120520

P 6 6 7 33 20

P0073325

P0073330

P0073335

PO O 733 40

P0073345

P312B1

P31282

P0073350

P3120530

P 3 1 2 0 5 4 0 P3 1 20 5 5 0 P3 120560

P31 20570

NBS FORTRAN Test Programs Version 1 201
DATA I U 3 I ( 1 , 1 , 1 ) , IU3I (2, 1 , 1 )

1 I U3 I (2,3,1 )

, I U 3 I (

1

, 1 ,2)

"2 2H( ,2H D,2H16,2H.9,2H,

DATA IT3I (

1

, 1

, 1 ) , IT3I (2, 1 , 1

)

IU3I (1 ,2,

I U 3 I (2, 1,,

, 1 HD , 2H9 . IT3I (3

1 ) , IU3I (2

2) / ,2H2 ) 7

2, 1 > , IU3I ( 1 ,3, 1 ) P3120580

P3120590

P31 20600

P3120610

P3120620

P3120630

P 3 1 2 0 6 4 0 P3 1 20650

P3 1 20660

P3120670

P3 1 2068 0 P3120690

1 0/ 5 1P3 1 2 0 700

P3120710

P 3 1 2 0 7 2 0 P3120730

P3 12 0740

P3120750

P 3 1 2 0 7 6 0 P3120770

P 3 1 2 0 7 8 0

1 f..1 > IT3I(4,1,1),IT3I(1,2 ,..!> ,2)

1 ,

1 IT3I (2,2, 1 ) , IT3I (3,2, 1 ) , IT3I (4,2, 1 ) , IT3I ( 1 , 1 ,2) , IT3I (2,

1

2 IT3I (3 , 1 , 2) , IT3I (4 f1 ,2) , IT3I (1 ,2,2) / 2 H ( 2 , 2 H X ,

, 2 H I 5 , 2 H , 3 2 H X , , 2 H I 4 , 2 H , I , 2 H 4 , , 2 H 1 X , 2 H , I , 2 H 2 ,

, 2 H I 3 , 1 H ) / DATA 2T1S< 1 ) ,2T1S(2) ,ZT1S(3), ZT1S(4) /2H(E,2H1 1 ,2H.2 , 1H) / DATA 2U3S< 1 , 1 , 1 ) ,ZU3S(2, 1 , 1 ) ,2U3S(3, 1 , 1 ) ,ZU3S( 1 ,2, 1 ) ,2U3S(2 ,2

1 Z U 3 S < 3 . 2 , 1 ) / 2H(4,2H(E,2H14,2H.6,2H/) , 1H) / DATA ZUZS( 1 , 1 ) , ZU2S(2 , 1 ) , 2U2S(3, 1) ,ZU2S(4, 1 ) , ZU2S( 1 ,2) ', 2U2S(2

2 2U2S(3.2) / 2H(L,2H3, ,2H2( .2HL2.2H) , ,2HL3, 1H> / »* THE FOLLOWING READ STATEMENTS INITIALIZE SOME 7.2. 3

.

** ARRAYS WITH FORMAT STATEMENTS TO BE USED FOR

t"i READING WITH I , E AND L CONVERSIONS AND FOR

** WRITING WITH A, F AND D CONVERSIONS

1 )

2)

C * * *

C * * * c* * *

c * * *

c * * * WRITE (NUVI ,3120)

C

*'*'*'** CARD 1 READ (IRVI.3121) AC1S(1), AC1S(2), AC1S(3), AC1S(4), AC1S(5),

1 A CiS ( 6 ) , AC 1 S < 7 > , A C 1 S ( 8 ) , A C 1 S ( 9 ) , A C 1 S ( 1 0 ) , A C iS ( 11) ,AC1S( 12)

C***«* CARD 2 P3120790

READ (IRVI.3122) L1 I P3120800

C****t CARD 3 P3120810

READ ( IRVI ,3121 ) A3 S P3120820

C*t*«* CARD 4 P3120830

READ (IRVI, 3123) YER1 S P3120840

C*t*»* CARD 5 P3120850

READ (IRVI, 3124) MCA3I P3 1 20860

C***»* CARD 6 P3 1 2 0 8 70

READ (IRVI, 3124) I AC2 I P3120880

c * * * * * P3120890

c * * * * * P3120900

C*»*«* THE FOLLOWING STATEMENTS MAKE USE OF THE FORMATS P312091

0

C****» CONTAINED IN THE ARRAYS P3120920

c * * * * * P3120930

C***«* READ AND WRITE WITH I CONVERSION USING FORMATS IN ARRAYS P3 1 20940

JACVI = 4756 P3120950

KBCVI = -867 P3120960

LCCVI = 224 P3120970

MDCVI = +39

NECVI = -6

C * * *

c * * * * *

** CARD 7 WITH CARD 1 AS FORMAT

READ ( I RV I , AC 1 S ) AVI, MRRVI, IAC1K1)., IAC1K2),, IAC1K3)

WRITE (NUVI ,3125)

WR I TE ( NUV I , IT3I ) JACVI , KBCVI, LCCVI, MDCVI, NECVI, AVI, MRRVI

1 I AC1 I ( 1 j , IAC1 I (2) , IAC1 I (3)

READ AND WRITE WITH F CONVERSION USING FORMATS IN ARRAYS

AVS = .23 4 BVS = 98.

CHAVC = (-77 .27 , +5 47. 1 8E0)

** CARD 8 FORMAT IS ( F3 . 3 , F3 . 0 , 2 ( F6 . 2 )

)

READ C-iRVi ,'ZUi'S) CVS, DVS, CHBVC

WRITE (NUVI, 3127)

WRITE (NUVI , MCA3 I ) AVS , BVS, CHAVC

WRITE (NUVI , M CA3 I ) CVS, DVS, CHBVC

** READ AND WRITE WITH E CONVERSION USING FORMATS IN ARRAYS

AVS = -0.76E+9

BVS - + 08.93 4 2 1 E - 1

3

** CARD 9 WITH CARD 2 AS FORMAT

Rc AD ( IRVI , L1 I ) 2U3S(2,2,2) , CVS , DVS , ZU3 S ( 1 ,2,2)

WRITE (NUVI, 3128)

WR I TE ( NUV I ,ZT IS) AVS , ZU3S(2,2.2)

WRITE (NUVI, 3129)

WRITE (NUVI, ZU3S) BVS . ZU3S < 1 ,2, 2) , CVS, DVS

** READ AND WRITE WITH D CONVERSION USING FORMATS IN ARRAYS

DPAVD = -6 . 3 5 7901 2 46 0 + 6 6 DPBVD = +.00052D+1

P3120980

P3120990

P31 21 000

P 3 1 2 1 0 1 0 p 3 1 2102 0 P3 1 2 1 0 3 0

P 3 1 2 1 0 4 0 P 3 1 2 1 0 5 0 P3 121 060

P3121 070

P3 12108 0 P3121090

P3 121 100

P31 21 1 1 0 P3121 120

P3121 130

P 3 1 2 1 1 4 0 P3121150

P3121 160

P3121 170

P3121 180

P3121 190

P 3 1 2 1 2 0 0 P3121210

P3121220

P 3 1 2 1 2 3 0 P 3 1 2 1 2 4 0 P 3 1 2 1 2 5 0

C * * *

C * * *

c * * *

c * * *

202 NBS FORTRAN Test Programs Version 1
C«**** CARD 10 FORMAT IS (016.9,09.2) P3121260

READ < IRVI , IU3I ) A1D< 1 ) , DPCVD P3 1 2 1 2 70

WRITE (NUVI ,9930) P3121280

WRITE <NUVI < IAC2I) DPAVD , DPBVD , A1 D ( 1

)

, DP CVD P3 1 2 1 2 90

C * * * * * READ AND WRITE WITH L CONVERSION USING FORMATS IN ARRAYS P3 121 300

AVB = .TRUE. P 3 1 2 1 3 1 0 B"vB'= .FALSE. P 3 1 2 1 3 2 0 C****» CARD 11 WITH CARD 3 AS FORMAT P 3 1 2 1 3 3

0

READ (IRVI ,A3S) A 1 B ( 1 > , A 1 B ( 2 ) . CVB , GG1B<2) P 3 1213 4 0 WRITE (NUVI, 9931) P 3 1 2 1 3 5 0 WRITE (NUVi, ZUZS) AVB , AVB, BVB, BVB P 3 1 2 1 3 6 0 WRITE (NUVI , ZU2S ) A1B(1), A1B(2), CVB, GG 1 B ( 2 ) P 3 1 2 1 3 70

C t READ AND WRITE WITH A CONVERSION USING FORMATS IN ARRAYS P 3 1 2 1 3 8 0 C** *«* CARDS 12 AND 13 FORMAT IS < A2/ZX, 5 ( A2 )-) P 3 1 2 1 3 9 0 READ ( IRVI , IU2I ) JACVI , AVS , I A C 1 I ( 1 ) , GG1B, BVB P 3 1 214 0 0 WRITE (NUVI ,3126) P 3 1 2 1 4 1 0 WRITE (NUVI , YER1S) JACVI, AVS, I A C 1 I ( 1 ) , GG1B, BVB P 3 1 214 2 0 C«**t* P 3 1 2 1 43 0 CALL FMTQ ( N U V I , Z f 1 S , 0 . 9 9 9 9 , Z H H 0 , 2 H L L , 2 H E R , 2 H I f , 2 H H , 2HC0 , 2HNS , P 3 1 2 1440

„._.„..„1. 2HTA, 2HNT, 2HS , ZHAS , ZH C.ZHAL.ZHL , ZHAR , ZHGU , ZHME , ZHNT , 1 HS ) P 3 1 2 1 4 5 0 p 3 1 2 1 4 6 0 C****« ADDITIONAL FORMAT STATEMENTS REQUIRED BY THIS SEGMENT P 3 1 2 1 4 7

0

C *'*'*"*"* P 3 1 2 1 4 8 0 C*tt»* THE FOLLOWING FORMAT STATEMENTS ARE USED TO 7 . 2 . 3 . 1 0 / 5 1 P 3 1 2 1 4 9

0

C"**"**"* READ FORMATS INTO ARRAYS P 3 1 2 1 5 0 0 3121 FORMAT (27(A2)) P 3 1 2 1 5 1 0 3122 FORMAT <10<A2) > P 3 1 2 1 5 2 0 3123 FORMAT ( 7(A2)) P3121530

3124 FORMAT (18(A2>) P 3 1 2 1 5 4 0 C*t*t* THE FOLLOWING ARRAYS ARE USED TO WRITE OUT ALL 7 . 2 . 3 . 1 0 / 4 8 P 3 1 2 1 5 5

0

C * * * » t HOLLERITH INFORMATION, SINCE H FIELD DESCRIPTORS P 3 1 2 1 5 6 0 C****t MAY NOT BE PART OF A FORMAT WITHIN AN ARRAY P 3 1 2 1 5 7 0 312 0 FORMAT ( 1H1 . 1X, 31H RDFMT - (3 12) F 0 R M A TS IN A R R AY S 7 7 P 3 1 2 1 5 8 0

1 22H ASA REFS. - 7 . 2 . 3 . 1 0 / / 3 4H EACH GROUP OF LINES SHOULD M AT CH ) P 3 1 2 1 5 9

0

3125 FORMAT (/ 22H 4756 -867 224 39 -6) P3121600

3126 FORMAT (/ 13H AB CDE + « = 1 23 ) P 3 1 2 1 6 1 0 3127 FORMAT (/ 25H 0.23 4 98 . -77 . 27 5 47.1 8 ) P 3 1 2 1 6 2 0 3128 FORMAT (/11H -0.76E+09) P3121630

3129 FORMAT ( / 1 4H 0 . 89342 1 E- 1 2 ) P 3 1 2 1 6 4

0

9930 FORMAT (/ 27H - 0 . 3 5 79 0 1 2 46D + 0 0 0.52D-02) P 3 1 2 1 6 5

0

9931 FO R M AT (7 1 OH T T F F ) P 3 1 2 1 6 6 0 C*t*«. END OF TEST SEGMENT 312 P3 1 2 1 670

C**«t* WHEN EXECUTING ONLY SEGMENT 312, THE STOP AND END CARDS P 3 1 2 1 6 8

0

C****« WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 3 1 2 1 6 9

0

C* *"*"** I N COLUMNS 1 AND 2 R E M 0 V ED . P 3 1 2 1 7 0

0

C= STOP P 3 1 2 1 7 1 0 C= END P 3 1 2 1 7 2 0 STOP P312C1

END P 3 1 2 C 2 C»********»*«»******»*********««******»*»«****»*«*t*«*«t*»»tt*****»**t*«P4620010 ..„.._.„ P462 0 020

C****» FMTQ - (462) P4620030

C t"t"t t' » P4620040

C***» «** *t**t»***»*t*«*ti»««********«*t«t***tt»*t**********t**t»«t*»(rP4i520050

C'*"» *"* * G E N E R A L P U R P O S E P 4 6 2 0 0 6 0 C*«*** TO DEFINE SUBROUTINE FMTQ WHICH IS USED IN SEGMENT 312 P4620070

C*'***"i TO TEST FORMAT IN AN ARRAY PASSED AS AN ARGUMENT, AN P462 0 0 8 0 C***»* EMPTY FORMAT STATEMENT, AND P4620090

C *'**'*"* HOLLER I T H I N A CALL ARGUMENT P4620100

SUBROUTINE FMTQ ( NWV I , 2TW1 S , AWVS, I WVH , JWVH , KWVH , LWVH , MWVH , NWVH , P 462 0 1 1 0

1 I I WVH, J JWVH, KK WVH, L LWVH, MMWVH.N NWVH, I JWVH, I KWVH, P 4 6 2 0 1 2

0

2 I LWVH, IMWVH , INWVH, J I WVH , JKWVH) P462 0 1 3 0 ........ MENS j 0N ZTW1S( 4 > P 4 6 2 0 1 4 0 WRITE (NWVI, 4620) P4620150

4 6 20 F ORM AT (7 1 1 H +710 E + 01 ) P4620160

C«*«**FORMAT LABELED ZTW1S PASSED AS ARGUMENT IS (E11.2) P4620170

WRITE (NWVI , ZTW1S) AWVS P 4 6 2 0 1 8 0 WRITE (NWVI, 4621) P4620190

NBS FORTRAN Test Programs Version 1 203
4621 FORMAT ( / 39H HOLLERITH CONSTANTS AS CALL ARGUMENTS ) P4620200

WR I TE (NWVI , 4622 ) I WVH , J.W V H , K WVH , LWVH .MWVH , NWVH ,1 I WVH , J J U VH , P 4 62021 0

KKkVH , L L WVH. MMWVH.N NWVH, I J WVH. IKWVH, I LWVH,

. I MWVH , I NWVH, J I WVH , J K WVH

P4620220

P4620230

P4620240

P4620250

4622 FORMAT ( 2X , 19A2)

WRITE (NWVI , 4623 ) 4623 F0RMAT(//29H TEST EMPTY FORMAT STATEMENT / 136H THE FOLLOWING LINE SHOULD BE BLANK ) WR ITE! NWVI ,4624 ) 4624 FORMAT ( )

P4620260

P4620270

P4620280

P4620290

4625

WRITE(NWVI ,4625)

FORMAT ( 23H END EMPTY FORMAT TEST //22H

RETURN

END

END SEGMENT 312 TEST ) P4620300

P4620310

P4620320

P4620330

( I5.6X, 14, 2(13),

(E 9.2.3(E13.6)

)

( L 1 , 2 ( L 2 ) , L 3 > (2X,A2,5(A2>)

12)

(2X.F5.3, F4.0, 2(F7.2)>

(2X , D 16.9.09.2)

47 56 -867224+39-6

23498.-77.27547. 1 8 -.0076+1 1+08. 93421E-13 893.421E-15+08.93421E-13

-0.357901246D+00 +0.52D-2

TTA FF9$

AB

CDE

C * * * *

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c =

+*=123

t****»«»« »** *»**»«»»««**»«ti» t»»t«ts»»»»«»** ***»«»«t««»**«**P3500010

* P3500020

* MISC5 - (350) P3500030

* P 3 5 00 0 4 0 «*t«»ta»«f»*«»**»****«*»*****»t»»»*»«»*<.««t***»**»*t***»«»*t*t*»»t»*P3500050

GENERAL PURPOSE

TO TEST SPECIFICATIONS FOR PROGRAM FORM

ASA REFP3500060

3.2 P3500070

3.2.1 P 350008 0 3.4 P3500090

3.5 P3500100

* GENERAL COMMENTS P3500110

* * AMONG OTHER THINGS, THIS SEGMENT TESTS THAT COMMENTS ARE P3 500 1 20

* NOT EXECUTED AND, AS A RESULT OF THIS TEST, THE COMPILER P3500130

* MAY GENERATE SOME WARNING MESSAGES. P 3 5 0 0 1 4

6

* * BECAUSE OF THE NATURE OF THE TESTS BEING PERFORMED, SOME P3500150

* LABELS AND NAMES DO NOT FOLLOW THE CONVENTIONS P 3 5 0 0 1 6

0

* SPECIFIED IN THE USERS MANUAL. P3500170

* P3500180

* SPECIFICATIONS SEGMENT 350 P3500190

* PO0 14310

* WHEN EXECUTING ONLY SEGMENT 3 50 , THE SPECIFICATION STATEMENTS PO0 1 43 1

5

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 0 01 4320

* IN COLUMNS 1 AND 2 REMOVED. P0014325

P0014330

DIMENSION J(2), JJ(1,1), JJJ(1,1,1), J J J J ( 1 , 1 ) , J J J J J ( 1 > J J J J J J ( 1 ) PO 0 1 433

5

DIMENSION J ( 2 ) , J J ( 1 , 1 ) , J J J ( 1 , 1 , 1 ) , J J J J ( 1 , 1 ) , J J J J J ( 1 ) , J J J J J J ( 1 ) P3 5 0 A1

C * * * * P0014340

C * * * « * 0 U f P U T TAP E ASSIGNMENT STATEMENT. NO INPUT TAPE.

C * * * * * WHEN EXE CUT I N G 0 NLY S EGMENT 3 5 0, TH E FOLL 0 W I N G STAT EMENT POO 73360

C * * * *

C 4 * * t NUVI = 6 MUST HAVE THE C^ IN COLUMNS 1 AND 2 REMOVED.

C * * * *

c * * * *

c * * t *

3 5 0 1

P3500200

P0073360

P0073365

P0073370

P0073375

P350B1

P 3 5 0 0 2 1 0 12HPR0P3500220

P3500230

2 2X.35HTEST THAT COMMENTS ARE NOT EXECUTED) P3500240

* HEADER FOR SEGMENT 350 WRITTEN P3 5 002 5

6

* TEST THAT COMMENTS ARE NOT EXECUTED 3.2.1 /36P3500260

* WRITE (NUVI . 3 5 0 1 )"" P3500270

FORMAT (2X.34HERROR - COMMENT STATEMENT EXECUTED) P3500280

C= NUVI = 6

NUVI = 6

WR I TE ( NUVI , 3500 ) 3500 FORMAT ( 1 H 1 , 1 X . 32HM I S C 5 - (350) SPECIFICATIONS FOR/ 16X,

1 GRAM F0RM//2X.32HASA REFS. - 3.2 3.2.1 3 . 4 3 . 5 //

204 NBS FORTRAN Test Programs Version 1
C ***** GO TO 3504

3502 MRRVI = 0

C ***** I F (MRRVI ) 3503 MRRVI = 1

P3500290

P3500300

p 3 5 003 1 0 P3500320

•MRRVI = -1 P3500330

IF (MRRVI) 3504,3504,3505 P3500340

WRITE (NUVI , 3 50 1 ) P3 5 0 03 5 0 WRITE (NUVI. 3506) P3500360

FORMAT ( 2X , 35HTEST SUCCESSFUL IF NO ERROR MESSAGE) P3500370

GO TO 3509 P3500380

» TEST THAT ALL 72 CHARACTERS IN A LINE MAY BE USED 372/2 4P3 5 0 03 9 0 WRITE (NUVI, 8100) P3500400

FORMAT ( / / /2X , ZZHTES.T 72 CHARACTER LINE) P3 5 0 04 10

WRITE (NUVI, 8101) P3500420

0 FOR MAT ( /2X.29H1 234567891 01 1 1213141 5 1 61 71 8 1 9 / 2 X , 2 9H 1 2 34 5 6 7 8 9 1 6 1 1 1 2 P 3 5 0 043

0

1131415 V6 171819) P3500440

WRITE (NUVI ,8102) P 3 5 0 0 4 50

FORMAT ( /2X.36HTEST SUCCESSFUL IF 2 LINES ABOVE ARE / 2X , 1 9H0 I G I TS P3500460

1 1 THROUGH 19)

* TEST THAT STATEMENT LABELS MAY BE 1. 2. 3 f 4 OR 5

* DIGITS LONG

WRITE (NUVI, 8112)

3504, 3504, 3504

C * * * *

3504

3505

3506

C * * * * 3509

8100

8101

8102

C * * * *

c * * * *

P3500470

4/12P3500480

P 3 5 0 0 4 9 0 P3500500

P 3 5 0 0 5 1 0 P3500520

P 3 5 0 0 5 3 6 P3500540

P3500550

P3500560

P 35 00570

P3500580

P3500590

P3500600

P 3 5 0 0 6 1 0 P3500620

P3500630

P3500640

P3500650

P3500660

P 3 5 0 0 6 7 0 P3500680

8112

8113

8114

8115

8097

i

FORMAT ( / / 2X , 3 7HTE ST 1,2,3,4,5 CHARACTER STMNT

GO TO 1 GO TO 22

GO TO 333

GO TO 8 099

GO TO 22255

LABEL/)

MRRVI = 1 WRITE (NUVI

GO TO 8113

MRRVI = 2

8118) MRRVI

22

WRITE (NUVI

GO TO 8114

MRRVI =

3

WRITE (NUVI

8118) MRRVI

333

8118) MRRVI

8099

GO TO 8115

MRRVI = 4 WRIT EC NUVI

GO TO 8097

8118) MRRVI

22255 MRRVI = 5 P3500690

WRITE (NUVI, 8118) MRRVI P3500700

8118 FORMAT ( 2X, 11 .1X.24HCHARACTER LABEL ACCEPTEO) P3500710

c * * * * * TEST THAT VARIABLE AND ARRAY NAMES MAY BE 3.5/21P3500720

c * * * * * 1, 2, 3, 4 OR 5 CHARACTERS LONG P3500730

WRITE (NUVI, 8098 ) P3500740

8098 FORMAT ( / / 2X , 36HTEST 1,2,3,4,5,6 CHARACTER VARIABLES/2X, P3500750

115HAND ARRAY NAMES) P3500760

M = 1 P3500770

MM = 1 P3 5 00 780

MMM = 1 P3500790

M M M M - 1 P3500800

MMMMM = 1 P3500810

MMMMMM = 1 P3500820

J(1 ) = 1 P350083O

JJ(1 , 1 ) = 1 P3500840

J J J( 1 , 1 , 1 ) = 1 P3500850

J J J J ( 1 , 1 ) = 1 P3500860

J J J J J ( 1 ) = 1 P3500870

J J J J J J ( 1 ) = 1 P3500880

IF (M-1) 8119, 8103, 8119 P3500890

8103 IF (MM-1 ) 8119,8104,8119 P3500900

8104 IF ( MMM- 1 ) 8119,8105,8119 P3500910

8105 IF (MMMM-1) 8119. 8106,8119 P3500920

8106 IF ( MMMMM- 1 ) 8 1 1 9, 8096 , 8 1 1 9 P3500930

8096 IF ( MMMMMM- 1 ) 8119. 8107, 8119 P3500940

8107 IF ( J(1 )-1 ) 8119,8108,8119 P3500950

8108 IF ( JJ(1 . 1 )- 1) 8119,8109,8119 P3500960

NBS FORTRAN Test Programs Version 1 205
8109

8110

8111

8 09 5 8119

8120

IF ( J J J ( 1 , 1 , 1 )-1 ) 8119,8110,8119

IF ( J J J J ( 1 . 1 ) - 1 ) 8119,8111,8119

IF ( J J J J J ( 1 ) - 1 ) 8 1 1 9,8 095 , 8 1 1 9

IF ( J J J J J J ( 1 ) - 1 >'

8 1 1 9 , 8 1 2 1

, 8 1 1

9

"WRITE (NUVI ,8120)

FORMAT (/ 2X,21H**TEST UNSUCCESSFUL* *

)

GO TO 8123

'

WRITE (NUVI, 8122)

FORMAT (/ 2X,38H**TEST SUCCESSFUL-ALL NAMES ACCEPTED**)

* TEST THAT STATEMENT LABELS MAY BE PLACED

* ANYWHERE IN COLUMNS 1 TO 5 AND THAT LEADING

* ZEROS ON STATEMENT LABELS ARE NOT SIGNIFICANT

WRITE (NUVT, 8116)

FORMAT ( / / 2X , 3 4HTEST PLACEMENT OF STATEMENT LABELS/2X,

1 2 9 HAN D LABELS WITH LEADING ZEROS/")

P3500970

P3500980

P 3 5 0 099 0 P3501000

P 3 5 0 1 0 1 0 P3501020

P 3 5 0 1 0 3 0 P3501040

P 3 5 0 1 0 5 0 4/ 1 3P3501 060

4 / 1 7 P 3 5 6 1 6 7 6 P3501080

P 3 5 0 1 0 9 0 P3501 100

P 3 5 0 1 1 1 0

8121

81 2 2

[ * * * t

C * * * t

C * * * * 8123

8116

MRRVI = 1 P3501 120

GO TO 1 0 P3501 130

2 MRRVI = 2 P3501 1 40

GO TO 0 1 0 P3 5 0 1 1 5 0 3 MRRVI = 3 P3501 160

GO TO 0010 P3501 170

4 MRRVI = 4 P3501180

GO TO 0010 P3501 190

5 MRRVI = 5 P3501200

GO TO 0010 P3501210

06 MRRVI = 6 P3501220

GO TO 0010 P3501230

007 MRRVI = 7 P3501240

GO TO 0010 P3501250

0 0 08 MRRVI = 8 P3501260

GOTO 0010 P3501270

0 0 09 MRRVI = 9 P3501280

0010 WRITE (NUVI, 11) MRRVI P3501290

011 FORMAT ( 110) P3501300

GO TO (02,3,004,0005,6,7,8,009,8117), MRRVI P3501310

8117 WRITE (NUVI ,012) P3501320

12 FORMAT ( / /2X, 28HTEST SUCCESSFUL I F 9 NUMBERS/2X, P3501330

1 31HIN SEQUENTIAL ORDER FROM 1 TO 9/2X, P3501340

c * * * *

c * * * *

c * * * *

c * * * *

c = c=

2 17HARE WRITTEN AB 0 VE / / / 2 X , 1 8 HE N D OF SEGMENT 3 5 0 )

* END OF TEST SEGMENT 350

* WHEN EXECUTING ONLY SEGMENT 350, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

STOP

END

STOP

END

**********»**»***************************.*********************

P3501350

P3501360

P3 5 6 1 3 70

P3501380

P 3 5 0 1 3 90

P3501400

P3 5 0 1 4 1 0 P350C1

P350C2

*****P3510010

P3 5 1 0020

P3510030

P35 10040

*****P3510050

RE F p3 5 1 0 060

.3 P3510070

P3 51 0080

P3510090

P351 01 00

P351 01 1 0 POO 73380

P0073385

POO 73390

P0073395

p 6 6734 00

P351B1

P0073405

P3510120

P 3 5 1 0 1 3 0 P351 01 40

C * * * *

c * * * *

c * * * *

c * * * * z* * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c"=

FUNMX - (351

)

* GENERAL PURPOSE ASA

* THIS SEGMENT FURTHER TESTS SOME 8.3

* BASIC EXTERNAL FUNCTIONS BY USING TRIGONOMETRIC

* FORMULAE

*

* OUTPUT TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE.

* WHEN EXECUTING ONLY SEGMENT 351, THE FOLLOWING STATEMENT

* NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI

NUVI

C * * * *

35 10

WRITE (NUVI, 3510)

FORMAT (1 H 1 , 2 X , T 3 HFUN MX ( 3 5 1 )// 1 X,22H THIS S E GME NT FURTH E R

1 5HTESTS /21H SOME BASIC EXTERNAL,

206 NBS FORTRAN Test Programs Version 1
C * * * *

c * * * *

2 1 0H FUNCTIONS /33H BY USING TRIGONOMETRIC FORMULAE//

319H ASA REFS. - 8 . 3 . 3 / /2X , 7HRESULTS

)

» HEADER FOR SEGMENT 351 WRITTEN

* TEST STATEMENTS USING ORDINARY TRIGONOMETRIC FUNCTIONS

P 3 5 1 0 1 5 0 P3510160

P 3 5 1 0 1 70

P3510180

CMAVS =1.75

CMCVS = ALOG(EXP( CMAVS) ) - 1.75

CMDVS = EXP (ALOG( CMAVS) ) - 1 . 75

"

CMEVS = (SIN(2.0)) ** 2 + ( COS (

2

0) ) 1 . 0

P 3 5 1 0 1 9 0 P3510200

P3 5 1 02 1 0 P3 5 1 0220

CMFVS = (1 . 0 / COS C 1 .2)) ** 2 -<<SIN(1.Z) / COS < 1 . 2 ) ) ** 2) - 1.0 P3 5 1 0 2 3 0 WRITE (NUVI, 3511) CMCVS, CMDVS, CMEVS, -CMFVS P3 5 1 0 2 4 0 CMCVS = SIN (.78) - SORT ( 1 . - COS (0.78) ** 2) P3 5 1 02 5 0 CMDVS = COS < 1 .57) - SORT ( 1 . 0 - SIN(1.57) ** 2) P3 5 1 0260

CMEVS = SORT ((1.6/ COS ( 6 . 5236 ) ) * * 2 - 1 . 0 ) -S I N ( 0 . 5 236 ) / COS ( 6 . 5 236 ) P3 5 102 70

CMFVS = ATAN2(SIN(0.5),COS(0.5)) - 0.5 P3510280

C * * * * * WRITE (NUVI, 3511) CMCVS, CMDVS, CMEVS, CMFVS

TEST STATEMENTS USING HYPERBOLIC FUNCTIONS

CMAVS = EXP ( 1 . 85

)

CMBVS = EXP ( - 1 .85)

CM CVS = TANH ( 1 . 85 j - (( CMAVS - CMBVS ) / ( CMAVS + CMBVS ) ) CMEVS = 2. /(EXPd .05) + EXP < - 1 .05)) - SORT ( 1 . 0 -TANH ( 1 . 0 5 ) * * 2 ) CMFVS "=" TANH XT. 01 ) 7 (SORT ( 1 .0 - TANH ( 2 . 0 1 ) * * 2 ) ) - . 5 * < EXP ( 2.01)

1 EXP ( - 2 . 0 1 ))

WRITE ( N U V I ,3512) CMCVS, CMEVS, CMFVS

WRITE ( N U V I ,3513)

3511 FORMAT ( / / 4 ( F 1 5 . 5 / ) > 3512 FORMAT ( / / 3 ( F 1 5 . 5 / ) ) 3513 FORMAT (//39H ALL ABOVE ANSWERS SHOULD BE 0 PLUS

1 40H MINUS AN ERROR FACTOR OF NOT MORE THAN /

OR /

2 C * * * *

C * * * *

c * * * *

c * * * * c=

c=

1 2H 10 * * ( -4 )

)

END OF TEST SEGMENT 351

* WHEN EXE CUT I NG ONLY SEGMENT 3 51, THE STOP

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE

* IN COLUMNS 1 AND 2 REMOVED.

STOP

AND

C = END CARDS

P3510290

P3510300

P 3 5 1 0 3 1 0 P3 5 1 0320

P 3 5 1 0 3 3 0 P3510340

P3 5 1 03 5 0 P3510360

P 3 5 1 0 3 7 0 P3 5 1 03 80

P 3 5 1 0 3 9 0 P35 1 0400

P 3 5 1 0 4 1 0 P3 5 1 0 420

P3510430

P3510440

P3 5 1 0 4 5 0 P3510460

P 3 5 1 0 4 7 0 P351 0480

P 3 5 1 0 4 9 0 P 3 5 1 C 1 P351 C2

C * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

c * * * * c=

END

STOP

END

*****»**(i************************t*****t»***«« »** *****t*t»»****P3520010

* P 3 5 2 0 0 2 0

* NAMES - (352) P3520030

* P3520040

***************t***************t*********************t************»P3520050

* GENERAL PURPOSE ASA RE F P3 520060

* TO TEST THE CAPABILITY OF COMPILERS TO IDENTIFY DATA 1 0 . 1 . 7 / 5 4P 3 5 2 0 0 70

P 3 5 2 0 0 8 0 P3520090

P3 520 1 00

P35201 1

0

P 3 5 2 0 1 2 0 P35201 30

P35201 40

P35201 50

* NAMES THAT RESEMBLE FORTRAN VERBS AND/OR PREDEFINED

* FUNCTION NAMES.

* GENERAL COMMENTS

* BECAUSE OF THE NATURE OF THIS TEST SEGMENT, NAMING

* CONVENT IONS THAT EXISTED IN OTHER SEGMENTS WI LL NOT

* BE OBSERVED

*

* SPECIFICATIONS SEGMENT 352

* WHEN EXECUTING ONLY SEGMENT 352, THE SPECIFICATION STATEMENTS

* WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C =

* IN CO L UMNS 1 AND 2 RE MOV ED.

* DIMENSION G0T0(2.2) I F < 5 ) DIMENSION G0T0(2.2) . IF(5)

OUTPUT TAPE ASSIGNMENT STATEMENT

* NO INPUT TAPE.

C * * * *

C * * * *

c * * * t

C *"**'"*'* WHEN EXECUTING ONLY SEGMENT 3 52, THE FOLLOWING STATEMENT

C * * * *

C * * * *

C =

NUVI = 6 MUST HAVE THE C= IN COLUMNS 1 AND 2 REMOVED.

NUVI = 6

NUVI =

6

C * * * * *

P001 4350

P001 4355

P001 4360

P001 4365

P001 4370

P001 4375

P3 5 2A1

P0 0 1 43 80

P 35 2 0 1 60

P0 0 73 4 1 0 PO 073 41 '5 P0073420

P0073425

P0073430

P3 52B1

P0073435

NBS FORTRAN Test Programs Version 1 207
WRITE (NUVI.3520)

3 5 20 FORMAT (1H1 ,1X,13HNAMES - ( 3 5 2 ) / / 2X , 3 6HTEST OF THE COMPILERS

1BILITY OF / 2X , 37H I DENT IFYING DATA NAMES THAT RESEMBLE /2X,

2 32HF0RTRAN VERBS AND / OR PREDEFINED / 2X „ 1 5 H FUN CT I ON NAMES //

C * * * * *

3 22H ASA REFS. - 10.1.7/4' //2X.7HRESULTS)

HEADER FOR SEGMENT 352 WRITTEN

fjjff EG = 6 REAL = 2.0

P3520170

CAPAP3520 1 80

P3 520 1*90

P3520200

F> 3 5 2 0 2 1 6

P3520220

P3520230

P3520240

P3520250

P3520260

P3 520270

P3520280

P3 5 2 0290

P3520300

P 3 5 2 03 1 0

P3520320

P 3 5 2 033 0 P3520340

P3520350

P3520360

P3520370

P3520380

P3520390

P3520400

P 3 5 20 4 1 0 P3520420

P 3 5 2 0 4 3 0 P3520440

P3520450

P3520460

P 3 5 2 0 4 7 6 P3520480

P3520490

P3520500

P 3 5 2 0 5 1 0 P3520520

P 3 5 2 0 5 3 0 P3520540

6 F0P3520550

P3520560

P3 5 20 5 70

P3520580

P3520590

P3520600

P 3 5 2 6 6 1 6 P3520620

P352C1

P352C2

* » * * p 4 i 3 o 6 i 6 P4130020

P4130030

P4130040

i't"*tP4l 30050

P4130060

P41 300 70

P4130080

P4 130090

P4 1 30 1 00

P41301 10

P4130120

P 4 1 3 0 1 3 0 P4 1 30 1 40

P 413 01 50

**ttP4630010

P4630020

P4630030

P4630040

* * t *P4630050

G0T05 = REAL - 2.0

GOTO ( 1 ,2) = 10.0 - 5.0 * 2.0

D013I = I NT EG

13 D014J = INTEG +0

14 IF(2) = 5-5

CALL = 0 STOP 7 = REAL -2.0

PAUSE = REAL / 2.0 1 . 0 READ6 = 0.0 ** 5 WRITE = 7.0 - 7.0

WRITE (NUVI , 352 1 ) G0T05 , GOTOd , 2 ) , D013I , D014J, I F ( 2 ) , CALL

,

1 ST0P7, PAUSE, READ6 f WRITE

3 5 2 1 C * * * *

C * * * *

c * * * *

c

* * * *

FORMAT (//10CF10.5/))

TEST THAT THE SAME INTRINSIC FUNCTION NAMES OF

A PROGRAM UNIT OF AN EXECUTABLE PROGRAM CAN BE

USED TO IDENTIFY SOME OTHER ENTITY IN A DIFFERENT

PROGRAM UNIT OF THAT EXECUTABLE PROGRAM

MCAVI = I ABS ( -5

)

CALL MAQQ ( MCAVi , I V I

)

MCCVI = IVI

MCBVi = I SIGN < 1,-2 > CALL MBQQCMCBVI , IVI

)

3 5 22

C

* * * t

C * * * *

c * * * *

c * * * *

MCDVI = IVI

CMAVS = FLOAT ( 5 + 7)

CALL AMOQ( CMAVS, AVS)

CMCVS = AVS

C MBVS = ABS (-10 .0 - STOO)

CALL BMOO( CMBVS,AVS)

CMDVS = AVS

WRITE (NUVI, 3522) MCCVI, MCDVI, CMCVS, CMDVS

FORMAT (/2(li6/)//2(F10. 5/) / /35H ALL ABOVE ANSWERS SHOULD BE

1R/36H THIS TEST SEGMENT TO BE SUCCESSFUL)

'*" END OF TEST SEGMENT 352

* WHEN EXECUTING ONLY SEGMENT 352, THE STOP AND END CARDS

* WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C=

* IN COLUMNS 1 AND 2 REMOVED.

C =

C =

C * * * t

c * * * *

c * * * *

c * * * *

c * * * t

c * * * *

c * * * *

c * * * *

c * * * *

c * * * *

C * t * t

c * * * t

C * t * t

c * * * *

c * * * *

STOP

END

STOP

END

»tHtMIMltl*tltMttt«tltlttt«*tlMltltitltltltltitilttlltttit

* MAQQ - (413)

**ttttttt<ttt«tt<><t<t«tttt<tt*t«t«><<ttt«tt*tttt<t>ttttttttt»t*

* GENERAL PURPOSE

* THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS CALLED

* BY SEGMENT 352.

* GENERAL COMMENTS

* SUBROUTINE MAQQ BEING DEFINED

SUBROUTINE MAQQ ( MWV I

, IWVI)

IABS = MWVI

IWVI = IABS + IS I GN (MWVI , -MWVI

)

RETURN

END

tt»>>«*t««<t>t»«tttt»«tt<**ttt»tt<tt«t«tttttttttttt«t«<ttttt«t«

*

* MBQQ - (463).

tUlttttttl*tiH«tltlHtttmtttlttHlltttttt*tHtMltt*lt«ltH*l

208 NBS FORTRAN Test Programs Version 1
C**»** GENERAL PURPOSE P4630060

C*«*** THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS CALLEO P4630070

CtTttl BY SEGMENT 3 52 P 4 6 3 0 0 8 0 C***** GENERAL COMMENTS P4630090

C * * * * * SUBROUTINE MBOO

SUBROUTINE MBQO(MWVI

T'sTg'n = -MWVI

IWVI = ISIGN + MWVI

RETURN

END

BEING DEFINEO

IWVI ) P46301 00

P46301 10

P46301 20

P4630130

P 4 6 3 0 1 4 0 P 463 0.1 5 0 [iiiiiiiiiiiHiiiiittnitiiiitttiitiiiiiiiiiiitiiitniiiiiiiiiiinitiiiiH/JOJIO

C****t P4730020

C* * * * * AM 00 - ( 473 ) P4730030

C *.*.** * P 4 7 3 0 0 4 0 C**************************************************^*****t********t P4730050

C** *** GENERAL PURPOSE P4730060

C *'*'**'* THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS CALLED P 4 73 0 0 70

C****» BY SEGMENT 352 P4730080

C*'"**"*"*' GENERAL COMMENTS P4 73 0 0 90

C***** SUBROUTINE AMQO BEING DEFINED P4730100

C* * * * * STATEME NT FUNCTION NAME IS THE SAME AS SUBROUTINE NAME CALLED BY P 4 73 0 1 1 0 C* * * * *SEGMENT 3 5 2 , STAT. FUNCTION DUMMY ARGUMENT NAME SAME AS SUBROUT INEP4 73 0120

C*****DUMMY ARGUMENT NAME. VARIABLE IS REFERENCED

SUBROUTINE AMQO(CWVS, AWVS)

BMQQ (CWVS) = CWVS + BVS

FLOAT = AVS

BVS = CWVS

AWVS = BMQO(FLOAT) - (BVS + 1.0)

DATA AVS /1 .0/

RETURN

END

IN STAT. FUNCTION P4730130

P47301 40

P 473 015 0 P4730160

P 4 7 3 0 1 7 0 P47301 80

P 4 73 0 1 9 0 P4730200

P4 73 021

0

C**************************************************i********************P4g30010

C

*"*"*"* '* P 4 8 3 0 0 2 0 C .**.** * BMQQ : (4.8.3 ) P 4 8 3 0 0 3 0 C * * *'* * P48 3 0 0 40

C***********************************************************************P4830050

C * * * * *

C * * * * *

c * * * * *

c * * * * *

C

t * * * *

GENERAL PURPOSE

THIS SEGMENT CONTAINS A SUBROUTINE WHICH IS CALLED

BY SEGMENT 352

GENERAL COMMENTS

SUBROUTINE BMQQ BEING DEFINED

SUBROUTINE BMQQ(CWVS. AWVS)

ABS = CWVS

AWVS = FLOAT( I SIGN( I F IX( ABS) , RETURN

2 ) ) + 18.0

C * * * * * END OF TEST SEGMENT 483

P4830060

P4830070

P4830080

P4830090

P483 0 1 0 0 P483 0 1 1 0 P48301 20

P48301 30

P 4 83 0 140

P48301 50

END P4830160

C***t**********************t***t***************t************t******«****P3600010

C* * * * * P360 0 02 0 C * *. * .* * S P E C ?

_ ( 360 ) P 3 6 0 0 0 3 0

C * * * * * P 3 6 0 0 0 4 0 C***********»**************«*********t******************(i********»******P3600050

C"*"*"*"* '« G E NERAL PURPOSE ASA RE F S P 3 6 0 0 0 6

0

C****« * TO TEST COMMON, DIMENSION AND EQUIVALENCE 7 . 2 . 1 . 2 P 3 6 0 0 0 7

0

C

*"*"*"*

"* S T AT E M E N T S 7 . 2 . 1 . 3 P 3 6 0 0 0 8 0 C***** * TO TEST THAT VARIABLES AND ARRAYS WHICH ARE 7 . 2 . 1 . 4 P 3 6 0 0 0 9

0

C'i' *'*"**""" EQUATED AND / OR IN COMMON MAY BE USED IN A P360 0 1 0 0 C***** VARIETY OF FORTRAN STATEMENTS P3600110

C

*"*'*'*"* res T R I C T I ONS OBSERVED P 3 6 0 0 1 2

0

C***«* * NO DUMMY ARGUMENTS APPEAR IN COMMON OR EQUIVALENCE 7 . 2 . 1 . 4 / 4 0 P 3 6 0 0 1 3 0 „,.„_..„ STATEMENTS 8.4.1.1/23P3600140

C**t** * NUMBER OF SUBSCRIPTS IN EQUIVALENCE STATEMENTS P3600150

C * * * * * CORRESPONDS TO ARRAY DIMENSIONALITY OR IS ONE 7.2.1.4/09P3600160

C*»*** * COMMON NEVER LENGTHENED BY EQUIVALENCE IN A 7 . 2 . 1 . 4 / 3 1 P 3 6 0 0 1 7

0

C ***** BACKWARD DIRECTION P360 C 1 80

C**«** * ONLY ONE OF AN EQUATED PAIR OF ITEMS APPEARS 7 . 2 . 1 . 4 / 3 6P3 6 0 0 1 9

0

C****» IN COMMON P3600200

C****« * VARIABLES ARE NEVER EQUATED TO MORE THAN ONE 7 . 2 . 1 . 4 / 4 2 P 3 6 0 0 2 1 0

NBS FORTRAN Test Programs Version 1 209
c * * t * *

c * * * * * ELEMENT OF THE SAME ARRAY

GENERAL COMMENTS

P3600220

ft 7 L A A 1 7 A P3600230

c * * * t *

c * * * * * THIS SEGMENT FOLLOWS THE ORDER OF SPECIFICATION STATEMENTS

REQUIRED IN BASIC FORTRAN voce V. 1,2/30 IN BASIL ASA BOOK)

P3600240

ft^Z-AATCA P3600Z5Q

c

* * * * *

c * * * * t SPECI a n r r» t r t r a t t ft. it c> p c r u c n t 7 / a FI CATIONS SEGMENT 360

P3600260

ft "7 Z. A A "> 7 A P3600Z70

c * * * * *

c * * * * * iiiir-ti p w r r 1 1 t t u p ft n i w p r p u r 11 t "7 z. a t u ft ftncPTfTPATTftii PTmruriiTP WHEN EXECUTING ONLY SEGMENT 360, THE SPECIFICATION STATEMENTS

P0014390

n a a 4 / f r\ c P 0 0 1 4 3 9 5

c * t * * *

c * * * * * WHICH APPEAR AS COMMENT CARDS, MUST HAVE THE C=

7 ni f\ \ 1 1 ij II r 4 a hi rv ^ ftr*iiftwr*ft IN COLUMNS 1 AND 2 REMOVED.

P0 0 1 440 0

ft A A 4 / / AC

P 0 0 1 4 4 0 5

c * * * * *

c = DIMENSION MX1I(3), TX1S(3)

P0014410

P 0 0 1 4 4 1 5

c = c= DIMENSION MX2I(2,3), TX2S(2,2), WAZ2S(3,2), RVY1S(2), RVY2S(1,2)

DIMENSION J Y Z I \ L , L ) , JY1 1 I 5 ) , N £ i I ( 4 ;

( net I \ h t c ) , WAZib(£)

P0014420

c=

c = DIMENSION MM Y 1 I (400) , N N Y 3 I (20,16,2)

EQUIVALENCE (MMY1I(1) ( NNY3I(1 ( i,i)),(NZ1I(1),NNY3I(i))

P0 0 1 443 0 P 0 0 1 4 4 3 5 c=

c= COMMON MX1I, MX2I, N 2 1 I , NZVI, NZZI

COMMON MXVI

P001 4440

HAA4///C P 0 0 1 4 4 4 5 c=

c= COMMON IAXVI

n 11 11 A II 1 1 A ~t -1 f1 COMMON WAZ 1

S

P0014450

P 0 0 1 4 4 5 5 c=

c = COMMON TX1S. TXZS, JBZVI, WAZZS

EQUIVALENCE (MYVI.NZVI), ( I Y V I , N Z 1 I ( 1 ) ) , (NZZI(4,1), J Y V I

)

P001 4460

ft A A 4 / / L c P 0 0 1 4 46 5

c"="

c = EQUIVALENCE (NZZK3), KYVI), (AAYVS, JBZVI, JYZI(1), RVY1S(Z))

r*ftllYl/AIFll'ftH / n IfU *i P / 4 IN ll A T 1 P / T \ \ EQUIVALENCE (RVYZS(1,1),WAZ1S(Z))

P001 4470

P 0 0 1 4 4 7 5

c =

c = EQUIVALENCE ( J Y 1 I ( 3 ) , RVY 1 S ( 2 )

)

EQUIVALENCE ( W AZ Z S ( 1 ) , B B Y Vb , I L Y Vb ) , ( W AZ Z b

(

c ,

i ) , U U Y Vb

)

P001 4480

n A A A I > 0 c P001 4455

DIMENSION MX 1 I ( 3 ) , TX1S(3)

DIMENSION MXZI(Z,3), TXZS(Z,Z), WAZZS(3,Z), RVYIb(Z), RVYZS(1 ( Z)

P360A1

O 7 L C\ A ^ P 3 60AZ

DIMENSION JY2K2.2), J Y 1 I ( 5 ) , NZ1K4), NZZK4.Z), WAZ 1 S < 2 ) ftT1liP"tlft7ftM 111 M W 4 T / / A A \ ft 1 l\ 1 \ / °7 T / T A 4 A T\ DIMENSION MMY1I(400),NNY3I(20,10,2)

P360A3

ft 7 L A A 1 P 3 6 0 A4

EQUIVALENCE (MMY1I(1),NNY3I(1,1,1)),(NZ1I(1),NNY3I(1))

r ft u u n hi u \/ 4 t m\/tt in 1 t n t w T ai "7 *7 t COMMON MX1I, MXZI, NZ1I, NZVI, NZZI

P360A5

n 7 L A A L. P 3 6 0 A6

COMMON MXVI

P ft M M ft 11 T A \J \ / 1 COMMON IAXVI

P360A7

n ~Z L A A 0 P 3 6 OAS

COMMON WAZ 1

S

p ft u u ft ii t v 4 ft tvip t n ~) \ 1 1 1 1 A 11 P COMMON TX1S, TXZS, JBZVI, WAZZS

P360A9

n 7 L A A A P 3 6 0 AA

EQUIVALENCE (MYVI.NZVI), ( I Y V I , N Z 1 I ( 1 ) ) , (NZ2K4.1), JYVI)

EQUIVALENCE (NZZI(3), KYVI), ( AAY VS , J B Z V I , J Y 2 I ( 1 ) , RVYIS(Z))

P360AB

ft "7 L A A f* P 3 6 0 A C EQUIVALENCE ( RVY2S (1,1), WAZ 1 S ( 2 )

)

EQUIVALENCE ( J Y 1 I ( 3 ) , R V Y 1 S ( Z ) ) P360AD

n 7 L A A c P 3 6 0 AE

C * * t * * EQUIVALENCE ( WAZ2S ( 1 ) , BBYVS , CCYVS ) , ( WAZ2S (2,1), DDYVS

)

P360AF

ft7Z.AA*90A P3600Z80

c * * * * *

C * * * * * SOME OF THE ITEMS DEFINED ABOVE ARE USED IN A VARIETY P3600Z90

H7Z.AA7AA P3600300

C t * t * *

c * * * * * OF FORTRAN STATEMENTS

ft P" ft hi P" kl T SEGMENT

P36003 1 0 ft7£AA7*}A P36003Z0

c * * * * *

c * * * * * DEFINE THE SYMBOLIC OUTPUT UNIT FOR USE IN THIS 7 . 1 . 3 / 2 2 P36 0 0 3 3

0

OUTPUT-TAPE ASSIGNMENT STATEMENT. NO INPUT TAPE. P3600340

c * * * * *

c * * * * * WHEN EXECUTING ONLY SEGMENT 360, THE FOLLOWING STATEMENT

P3600350

P0073440

c * * * t *

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

3 600

4

1 FORMAT (1H1, 1X.36HSPECZ - (360) COMMON AND EQUIVALENCE//

2X.36HASA REFS - 7.2.1.2 7.2.1.3 7.2.1.4// 2X , 7HRESULTS

)

P3600390

P3600400

c * * * * *

c * * * * * P360041

0

TEST THAT EQUIVALENCE WORKS - ASSOCIATED ITEM OF 1 0 . 2 . 2 / 5 1 P360 0 42 0

c * * * * *

c * * * * * SAME TYPE BECOMES DEFINED WHEN EQUATED ITEM IS

DEFINED

P3600430

P3600440

MYVI = 2 WAZ 1 S < Z ) = 2.0

P3600450

P3600460

7 L A 1 3 6 0 I WRITE (JBZVI, 360 1 ) NZVI, RVY2S(1,1)

F0RMAT(//27H LINE 1 BELOW IS HOLLERITH

P3600470

P3600480

& I u NBS FORTRAN Test Programs Version 1
1 c * * * * * USE

// 11H 2 2.0/16, F5.1 ) DEFINED ITEMS IN ARITHMETIC STATEMENTS

JYVI = 4 MXVI = 5 NZVI = 3

J Y 1 I ( 1 )

:

P3600490

7.1.1 . 1P3600500

P 3 6 0 0 5 1 0 P3600520

P 3 6 0 0 5 3 0 P3600540

P 3 6 0 0 5 5 0 P3600560

P 3 6 0 0 570

P36C0580

P3600590

P3600600

P3 6 0 0 6 1 0 P3600620

P3600630

P3600640

P3600650

P3600660

P3 60 0670

P3600680

P3600690

P3600700

P360071

0

P3600720

P3600730

P3600740

2P3600750

P3600760

P 3 6 0 0 7 7 0 P3600780

P3600790

P3600800

P360081

0

P3600820

P3600830

8P3600840

P3600850

P3600860

P3600870

P3600880

P3600890

3P3600900

P 3 6 0 0 9 1 0 P3600920

P 3 6 0 0 9 3 0 P3600940

MX1 I (2) = NZ1 I (4) =

J Y 2 I ( 2 , 1 ) MX2I ( 1 ,3)

8

NZ2I (3,2) = 7 MX 1 I ( 3 ) = MX2K1.3) * (NZVI - J Y 1 I ( 1 ) ) - 18

MX 2 I ( 1.1 >"'""=" MX2 1(1,3) * ( M Y V I - J Y 1 I ( 1 ) ) - 18

MX 1 I ( 1 ) = JYVI + JY2K2.1) + NZVI - MX 1 I ( 2 ) + IAXVI = NZ2I (4, 1 ) + J Y 1 I ( 4 ) + MY VI - MX 1 I ( 2

)

NZ2K1.1) = MXVI ** NZ 1 I ( 4 ) - MXVI ** NZ 1 I (.40

J Y 1 I ( 1 )

J Y 1 I ( f)

BBYVS = TX1S(3)

WAZ2S(

1

RVY 1 S ( DDYVS = WAZ2S(2

2 . 0 = 1 . 0E

1

,2) = -3.0E00

) = .04E+2

RVY1S( 1 ) ** ( WAZ2S < 1 . 2)-5.0+TX1S(3)) -13.0

,1) = TX2S(2,2)«*(WAZ2S(1 , 2

) -5 . 0 + TX1 S( 3 ) ) - 1

3

WAZ2S( 1,2)

0 + W AZ 2 S ( 1 ,2)

WRITE (JBZVI. 3602 ) MX 1 I ( 3 ) , MX 1 I ( )

1

WRITE( JBZVI ,7367 ) MX2K1.1), IAXVI

FORMAT <//34H ANSWERS BELOW SHOULD

1 3(16/) . F8.1)

C'*'*'*"** USE ITEMS IN ARITHMETIC IF STATEMENTS

IF (WAZ2S(1,2)) 3603,3604,3604

3602

NZ2 I ( 1 , 1 ) , DDYVS

, NZ2I (1 , 1 ) , WAZ2S(2

BE 6 OR 0.0//

1 )

7.1.2

IF FAILED)

3603 IF ( MX 1 I ( 2 ) ) 360 4,360 5,360 4 3605 IF (TX2S(2,2) + CCYVS ** NZ 1 I ( 4

)

3 60 4 WRITE (JBZVI , 360 7 ) 3607 FORMAT (//22H ARITHMETIC

GO TO 3 609

3606 WRITE (JBZVI, 3608)

3608 FORMAT (//26H ARITHMETIC

Z***t* USE ITEMS IN DO LOOP

3 60 9 DO 7366 JYVI = 1 , NZVI , 1 TX1S(3) = TX1S(3) + 1.0

+ TX1S( 3 ) ) 36 0 4, 360 4, 36 06

IF SUCCESSFUL)

7.1.2

7360 CONTINUE

WRITE (JBZVI, 736 1 ) TX 1 S ( 3 > 7361 FORMAT ( / /29H ANSWER BELOW

C***«* USE ITEM IN COMPUTED GO

SHOULD

TO

BE 13.0// F8 . 1 ) 7.1.2.1

GO TO ( 7362,7362,7364 ) , 7362 WRITE (JBZVI, 7363)

7363 FORMAT <//23H COMPUTED

GO TO 7366

NZVI

GO TO FAILED)

MMY 1 1 ( 400 ) BLANK 7

)

7364 WRITE (JBZVI, 736 5 ) 7365 FORMAT (//27H COMPUTED GO TO SUCCESSFUL)

7367 FORMAT (3(16/) , F8. 1 ) 7366 CONTINUE

C***«* TEST EQUIVALENCE EXTENDS COMMON

Z***tt ARRAYS- NNY3 I (20 , 1 0 , 2 ) EOUIVALENCED TO ARRAY

C***»* EQUIVALENCED TO THE 10TH STORAGE LOCATION IN

C****» COMMON ( NZ 1 I ( 1 ) ) WRITE (NUVi, 8366)

8366 FORMAT (34H0 TEST EQUIVALENCE EXTENDS COMMON

DO 736 8 I VI

""="

1 , 400

7368 MM Y 1 I ( I V I ) = IVI

IVI = 0 DO 7369 LVI = 1, 2 DO 7369 KVI = 1 . 10

DO 7369 JVI = 1, 20

I F ( N N Y 3 I ( J V I

, k V I , L V I ) - ( J V I + 2 0 * ( K V I + 1 0 * L V I ) - 220 )) 7369

8360 IVI = IVI + 1 7369 CONTINUE

IF (IVi - 400) 8363, 8361. 8363

8363 WRITE (NUVI, 8364)

8364 FORMAT ( 1 3H0 TEST FAILED )

P3600950

P3600960

P3600970

P3600980

P3600990

WHICH ISP3601000

'2.1 .4/29P360 1 0 1 0 P3601 020

P3 60 1 03 0 P360 1 0 40

P360 1 050

P360 1 0 60

P3601 070

P3601 080

P3601 090

P360 1 1 0 0 P36 0 1 1 1 0 P360 1 1 2 0 P36 0 1 1 3 0 P360 1 1 40

P3601 1 50

P360 1 160

8360 , 7369

NBS FORTRAN Test Programs Version 1
60 TO 8365 P3601170

S361 WRITE (NUVI , 8362) P3601180

8362 FORMAT (1 7H0 TEST SUCCESSFUL j P 3 6 6 1 1 90

8365 CONTINUE P3601200

Ct»"t*« END OF TEST SEGMENT 360 P 3 6 6 1 2 1 6

C**«t* WHEN EXECUTING ONLY SEGMENT 360, THE STOP AND END CARDS P3601220

C « * * * * WHICH APPEAR AS COMMENT CARDS MUST HAVE THE C= P 3 6 0 1 2 3 6

C*t.*« IN COLUMNS 1 AND 2 REMOVED. P3601240

C= STOP 77777 P 36 01 2 5

6

C= END P3601260

STOP 77777 P360C1

END P360C2

212 NBS FORTRAN Test Programs Version 1
>.]14A (REV. 7-73)

U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

SHEET

1. PUBLICATION OR REPORT NO.

NBS-SP- 3 99 Vol. 2

2. Gov't Accession

No.

3. Recipient's Accession No.

riTLE AND SUBTITLE

NBS FORTRAN TEST PROGRAMS

5. Publication Date

October 1974

6. Performing Organization Code

VUTHOR(S)

Frances E. Holberton

8. Performing Organ. Report No.

Elizabeth G. Parker

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.

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

SUPPLEMENTARY NOTES

Volumes 1, 2, and 3 contain the documentation, Version 1 program

sting, Version 3 program listing, respectively. The magnetic tape containing the NBS

RTRAN Test Programs is available in 7-track BCD. 9 -track ASCII or EBCDIC recording.

ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here.) e NBS FORTRAN test programs, written in Standard FORTRAN, are designed to test whether

FORTRAN compiler accepts the forms and interpretations of the FORTRAN language as desibed in the American National Standard FORTRAN document X3. 9-19 66. The test programs,

mprised of 116 test units, are structured into two versions, each containing approxitely 14,500 punch card images. The test units may be used as separate executable

RTRAN programs, or may be linked end to end with other test units, with a minimum of

er effort, to improve operating efficiency. Version 1 is structured into 116 executle FORTRAN programs, and Version 3, containing the same 116 test units, is structured

to 14 executable FORTRAN programs for use on large FORTRAN processors.

e test program design criteria was to:

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

. 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 programs.

. Test FORTRAN language elements before they are used in support of other tests.

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

e test programs require the use of a card reader, printer and one intermediate tape

it.

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

)

mputer Programming language; FORTRAN; FORTRAN validation; language validation;

andard FORTRAN; test program design.

AVAILABILITY fj£ Unlimited 19. SECURITY CLASS

(THIS REPORT)

21. NO. OF PAGES

1

1 For Official Distribution. Do Not Release to NTIS

UNCLASSIFIED 221

[x2 Order From Sup. of Doc, U.S. Government Pi intuit Off ice

Washington. D.C. 20402. SD Cat. No. C13 • 10:399 'V. 2

[ | Order From National Technical Information Service (NTIS)

Springfield, Virginia 22151

20. SECURITY CLASS

(THIS PAGE)

UNCLASSIFIED

22. Price

$2.85

USCOMM-DC 29042-P74

S GOVERN/WENT 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 five 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 tech- niques, properties of matter and materials, engineering

standards and services, instrumentation, and automatic

data processing.

Annual subscription: Domestic, $6.50; Foreign, $8.25.

N0NPERI0DICALS

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 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 Government 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 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 Metrology Information Center, Electromagnetics Division,

National Bureau of Standards, Boulder, Colo. 80302.
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