Digital PDFs
Documents
Guest
Register
Log In
AA-1101D-TC
October 1981
156 pages
Original
44MB
view
download
OCR Version
19MB
view
download
Document:
Scientific Subroutines Programmer's Reference Manual
Order Number:
AA-1101D-TC
Revision:
0
Pages:
156
Original Filename:
OCR Text
Scientific Subroutines Programmer’s Reference Manual AA-1101D-TC Scientific Subroutines Programmer’s Reference Manual AA-1101D-TC October 1981 This document describes the Scientific Subroutines Package available to users of FORTRAN-RT-11 and RSX-11M FORTRAN IV and FORTRAN 77. This manual replaces the Scientific Subroutines Programmer’s Reference Manual, order number AA-1101C-TC. This is a revision. OPERATING SYSTEM: RT-11 Version 4.0 RSX-11M Version 3.2 FORTRAN |V Version 2.5 FORTRAN 77 Version 4.0 SOFTWARE: SSP Version 1.3 Software and manuals should be ordered by title and order number In the United States. send orders to the nearest distribution center. Outside the United States. orders should be directed to the nearest DIGITAL Field Sales Office or representative Northeast/Mid-Atlantic Region Central Region Western Region Technical Documentation Center Cotton Road Nashua. New Hampshire 03060 Telephone: (800)258-1710 Technical Documentation Center 1050 East Remington Road Schaumburg. llinois 60195 Telephone: (312)640-5612 Technical Documentation Center 2525 Augustine Drive Santa Clara. Calforma 95051 Telephone. (408)384-0200 NH residents: (603)884—-6660 digital equipment corporatione marlboro. massachusefts First Printing, February 1975 Revised, November 1978 Revised, June 1980 Revised, October 1981 No responsibility is assumed for the use or reliability ment that is not supplied by DIGITAL or its affiliat of software on equip- ed companies. Copyright ©, 1975, 1978, 1980, 1981, Digital Equipme nt Corporation. All Rights Reserved. The postage-prepaid READER’S COMMENTS form on th e last page of this document requests the user’s critical evaluation to assist future documentation. us in preparing The following are trademarks of Digital Equipment Corporation: DEC DECUS DECSYSTEM-20 DECnet IAS DECsystem-10 MASSBUS PDT PDP DECwriter RSTS DIBOL UNIBUS RSX EduSystem VAX VMS VT MINC-11 MINC-23 dlilgli[t[a]i] MINC/DECLAB23 CONTENTS (CONT.) Page CHAPTER 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12 2.12.1 2.13 QTEST Subroutine RANK Subroutine SRANK Subroutine TIE Subroutine TWOAV Subroutine UTEST Subroutine WTEST Subroutine RANDOM NUMBER GENERATOR SUBROUTINE GAUSS Subroutine REFERENCES 2-25 2-26 2-26 2-27 2-27 2-28 2-29 2-29 3 MATHEMATICAL 3-1 3.1 SPECIAL 3.1.1 3.1.2 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.20 3.2.21 3.2.22 3.2.23 3.2.24 3.2.25 3.2.26 3.2.27 3.2.28 3.2.29 3.2.30 3.2.31 3.2.32 3.2.33 3.2.34 3.2.35 3.2.36 3.2.37 3.2.38 3.2.39 3.2.40 3.2.41 OPERATIONS MATRIX OPERATIONS EIGEN Subroutine MINV Subroutine MATRIX SUBROUTINES ARRAY Subroutine CADD Subroutine CCPY Subroutine CCUT Subroutine CINT Subroutine CSRT Subroutine CSUM Subroutine CTAB Subroutine CTIE Subroutine DCLA Subroutine DCPY Subroutine GMADD Subroutine GMPRD Subroutine GMSUB Subroutine GMTRA Subroutine GTPRD Subroutine LOC Subroutine MADD Subroutine MATA Subroutine MCPY Subroutine MFUN Subroutine MPRD Subroutine MSTR Subroutine MSUB Subroutine MTRA Subroutine RADD Subroutine RCPY Subroutine RCUT Subroutine RECP Subroutine RINT Subroutine RSRT Subroutine RSUM Subroutine RTAB Subroutine RTIE Subroutine SADD Subroutine SCLA Subroutine SCMA Subroutine SDIV Subroutine SMPY Subroutine SRMA Subroutine SSUB Subroutine iv SUBROUTINES 2-30 2-30 3-1 3-1 3-2 3-2 3-2 3-3 3-4 3-4 3-5 3-6 3-6 3-7 3-8 3-9 3-9 3-10 3-10 3-11 3-11 3-12 3-12 3-13 3-14 3-15 3-15 3-16 3-17 3-18 3-19 3-19 3-20 3-21 3-21 3-22 3-22 3-23 3-24 3-25 3-25 3-26 3-27 3-27 3-28 3-28 3-29 CONTENTS Page PREFACE SUBST Subroutine SN Subroutine = N STATISTICS Subroutine TTSTT Subroutine p— CORRELATION CORRE SUBROUTINE REGRESSION =~ LINEAR MULTR Subroutine ORDER Subroutine POLYNOMIAL GDATA N CORRELATION CANOR Subroutine NROOT Subroutine ANALYSIS w N -~ REGRESSION OF VARIANCE AVCAL Subroutine AVDAT Subroutine MEANQ Subroutine DISCRIMINANT N -~ ANALYSIS DISCR Subroutine DMATX Subroutine -~ N TRACE Subroutine VARMX Subroutine L~ SN VS RN (O SUBROUTINES SERIES SUBROUTINES EXSMO Subroutine SUBROUTINES STATISTICAL .1 CHISQ Subroutine .2 KRANK Subroutine iii - N+ w 2-15 2-16 2-17 2-17 2-18 2-19 2-19 2-20 2-20 2-21 2-21 2-22 2-23 Subroutine NONPARAMETRIC 2-15 2-15 Subroutine Subroutine (- 2-14 SUBROUTINES CROSS 2-13 2-13 Subroutine AUTO ® ® ® [] SUBROUTINE SUBROUTINES w ANALYSIS LOAD SMO SUBROUTINES Subroutine CANONICAL TIME SUBROUTINES Subroutine MULTIPLE FACTOR | Subroutine MOMEN - L J TAB2 ELEMENTARY e [ Subroutine N [ | ] ° o TABl1 NN = o o Subroutine = OWOWOOOIJUTUWN - SUBMX — W N Subroutine UV BOUND o o SUBROUTINES Subroutine o o e SUBROUTINES ABSNT o e Kit SCREENING TALLY Package | DATA o PACKAGE ) ® STATISTICAL NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNE\)N [] o o [] [] [] [] [] [} [] L] [] [] LJ HEEEEEEEOOWOVOPOENININNNNNUTUNE BB WWRNRNR e ° L} [ ] [} [] [ ] [ ] [ ] HHHEHHFOOOOOo CHAPTER () Distribution I SUBROUTINES Subroutine Arrays The Scientific Subroutines — [ [] = SCIENTIFIC | THE — INTRODUCTION N 1 NN NNV | P | CHAPTER vii SUBROUTINES 2-23 2-24 2-24 2-25 CONTENTS (CONT.) S o w N WWWWWWwWwWwWwWwWwwWwuwuwwuwuwuwuwuwuwwww w Page Subroutine XCPY Subroutine D WN - INTEGRATION QATR Subroutine RK2 Subroutine OO WNH [] [] [] [] [] [] [] [] Wl N FOURIER SPECIAL SUBROUTINE BESI Subroutine BESJ Subroutine BESK Subroutine BESY Subroutine CEL1 Subroutine CEL2 Subroutine - AND FUNCTIONS LEP 3-39 3-40 3-40 3-41 3-41 3-42 Subroutine 3-42 Subroutine SICI 3-43 3-43 Subroutine EQUATIONS SUBROUTINE 3-44 SIMQ Subroutine NONLINEAR EQUATIONS W KN RTMI Subroutine RTNI Subroutine RTWI Subroutine (- OF POLRT W) PADD JOVU DNde WO 3-44 3-45 SUBROUTINES POLYNOMIALS 3-45 3-46 3-46 SUBROUTINE 3-47 Subroutine OPERATIONS 3-47 SUBROUTINES 3-48 Subroutine PADDM 3-48 Subroutine PCLA Subroutine PCLD Subroutine PDER Subroutine PDIV Subroutine PGCD Subroutine PILD Subroutine PINT Subroutine PMPY Subroutine PNORM 3-49 3-50 3-50 3-50 3-51 3-52 3-52 3-53 3-53 Subroutine PQSD Subroutine PSUB Subroutine PVAL Subroutine PVSUB 3-54 3-54 3-55 3-55 3-56 3-57 Subroutine O REFERENCES INSTALLING, N -~ VERIFYING, INSTALLING SOFTWARE 1 1 .1 AND USING SSP RT-11 INSTALLATION Copying Copying Devices REQUIREMENTS THE 3-36 3-36 3-37 3-38 3-38 3-38 Subroutine GAMMA O 0O = = = = b OPERATIONS Subroutine EXPI -~ [] [} 3-35 3-35 SUBROUTINES Subroutine POLYNOMIAL o 3-33 FORIT ROOTS (O |8 3-32 Subroutine LINEAR wwuwwwwwwuwwwwwwww?wwww ANALYSIS 3-31 3-31 FORIF CS SUBROUTINES Subroutine RK1 UNDER P DIFFERENTIATION 3-29 3-30 Subroutine RKGS 0 1 AND Subroutine QSF A > APPENDIX TPRD SCIENTIFIC SUBROUTINES the Distribution Kit with Three or More Mass Storage CONTENTS (CONT.) SCIENTIFIC SUBROUTINES U Indirect-Command The Verification Files Procedure Conditions THE CREATING A | (VS I (OO o o e www o o e The STORING A-3 = =0 uUuru;m THE SOFTWARE DD Devices Corrections VERIFYING Error Storage (S O Mass >| > Making Two SCIENTIFIC PROGRAM SUBROUTINES THAT CALLS THE = O Copying with Only File Protection 3’3’3’3"3’ | | N N w o o e WM ° PP PP Page SCIENTIFIC INSTALLING, UNDER VERIFYING, AND USING SSP RSX-11M/M-PLUS B.1 INSTALLATION B.2 INSTALLING REQUIREMENTS THE SCIENTIFIC SUBROUTINES .2.1.1 Copying a Three B.2.1.2 B.2.1.3 B.2.2 B.3 or Copying Distribution FILES-11 More Mass Kit (LS the Distribution Storage Volume Devices a FILES-11 Distribution Volume only Two Mass Storage Devices Copying a DOS-11 Distribution Volume Making Corrections VERIFYING THE SCIENTIFIC with N Copying T 1 5 o SOFTWARE with SUBROUTINES Files The Verification Procedure Error Conditions STORING THE SCIENTIFIC SUBROUTINES CREATING A PROGRAM B.6 SUBROUTINES USING LIBRARIES C ALPHABETICAL INDEX THAT OF CALLS SUBROUTINES INDEX ik — TABLES TABLE The Indirect-Command Files The Indirect-Command Files vi THE = = = 5,8, 3 Indirect-Command c'uwo'umw oDoowwmw APPENDIX .2 The O \O SOFTWARE 1 O ~J N LIBRARIES mulom APPENDIX USING oo > SUBROUTINES SCIENTIFIC PREFACE MANUAL The OBJECTIVES Scientific Scientific and To RT-11 or also understand the system, and you system with should Programmer's Package should FORTRAN operating or the be 77 The RSX-11M familiar capabilities should have a Job or set (SJ) and over or a describes 100 and with with the either the Foreground/Background operating scientific operation to of instruments instrument (F/B) systems. laboratory, all the mathematical familiar language RSX-11M-PLUS with of programmer programming access chapters Subroutines and three Chapter 1 introduces Chapter 2 describes Chapter 3 Appendix Appendix appendixes. the the statistical subroutines. describes the mathematical explains how to with your A B should in your manufacturers' or with how your RSX-11M-PLUS C Subroutines. install, own verify, FORTRAN provides to install, own FORTRAN operating an IV IV and programs verify, and or FORTRAN systems. alphabetical vii Manual contains software. subroutines. systenm. explains Subroutines RSX-11M Reference Subroutines operating Appendix Programmer's Scientific Subroutines F/B a Manual STRUCTURE Scientific three Reference (SSP), be (Single documentation. MANUAL ASSUMPTIONS subroutines. manual, IV monitor) You Subroutines this FORTRAN READER Subroutines statistical use AND list use the under the use the Scientific RT-11 77 programs of the SJ or Scientific under the Scientific RELATED The DOCUMENTS following RSX-11M, FORTRAN documents or 77 provide RSX-11M-PLUS programming information more operating FORTRAN IAS/RSX-11 PDP-11 77 FORTRAN Order IV Guide User's Guide Guide Program AA-H264A-TC to RSX-11M/M-PLUS MCR Operations RSX-11M/M-PLUS Task Manual —_————_ RT-11 RT-1]1 Builder AA-5281B-TC Reference IV Support Manual User's AA-H378A-TC Guide AA-5749B-TC Manual AA-H379A-TC AA-5279B-TC RT-11 AA-5284C-TC Message Bibliographies of Chapters 2 of contain brief bibliographies. referenced in a the end of the Manual non-DIGITAL and 3. Many The conventions In programming appears in red. ° ® 1in means You produce together. letter as this to publications descriptions authors and appear in at Chapters 2 and 3 publications in these For complete information about publication subroutine description, consult the bibliography at chapter where the reference appears. CONVENTIONS ¢ technical subroutine references DOCUMENTATION following end AA-H268A-TC RT-11 System User's Guide System the AA-H266A-TC RT-11 FORTRAN Software Manual Manual Programmer's RT-11/RSTS/E AA-H263A-TC —_— to and AA-1936E-TC AA-1855D-TC Utilities IV Number Reference Development Introduction FORTRAN Language RSX-11M/M-PLUS RT-11, AA-1884D-TC Manual RSX-11 the the languages. User's FORTRAN and systems Reference PDP-11 about C you to examples, black. must certain For to apply All all press information the are documented as by hold CTRL C the key the character. on a prints computer responses typing down @), viii and RETURN characters the manual: commands example, produce this you your type terminal. combination CTRL key appear and of keys type the Combinations such Many commands When you number in execute in place the system uses For a of of the list examples type these that you The term 0 as a and System MCR If you User's Operations expression specify do default. their the not a device include abbreviations, Guide or a see Chapter 2 actual commands, names, file capital names or types. supply they a operating represent option, do appear. means not either type elements the case or both in a systems. optional file Lower name. RSX-11M/M-PLUS number, of brackets the You of RSX-11M/RSX-11M-PLUS, the User specifications, type this are required brackets in File that portion syntax the brackets Directory is, of a When vyou command line ix also a part portion of file When vyou [group,member]. file elements. command (UFD) are line. specification, You must mean and NOTE Under must RSX-11M command. in letters letters the 3 the Manual. file as unit Chapter or exactly dvn:. and unit commands must Brackets an commands, dvn:. unit contain of RSX-11M-PLUS use the of RT-11 represent manual devices RSX-11M/M-PLUS In this brackets type the CHAPTER 1 INTRODUCTION The Scientific the Subroutines Scientific mathematical and Programmer's Subroutines statistical Reference Package (SSP), Manual a subroutines. set of accompanies over 100 This manual describes the subroutines and explains how to use them with your FORTRAN programs. The manual contains three chapters and three appendixes. This first chapter is an introduction to the package. It manual. provides Chapters 2 Subroutines. method an and overview 3 contain of the subroutines descriptions of Each description defines all arguments subroutine uses to perform its function. the and the of the Scientific and outlines Descriptions the of the more complex subroutines in Chapters 2 and 3 include bibliographical references. The bibliographies are at the end of Chapters 2 and 3. Each bibliography gives complete information about Publications cited in the subroutine descriptions. Each description subroutine. The (Test: where: test is named the test the name of .ext 1is the file extension. A the program that calls the follows: program. for the RT-11 .ext=.FTN for the RSX-11lM and B explain Subroutines SCIENTIFIC Scientific that you operating as .ext=.FOR respectively. THE under test prog.ext) alphabetically. The program any 1is Scientific 1.1 names prog Appendixes systems also how under Appendix SUBROUTINES Subroutines to the C operating operating install, RT-11 1lists system. and the system. verify, and RSX-11M/M-PLUS Scientific use the operating Subroutines PACKAGE Package consists of over 100 subroutines can call from any FORTRAN IV program running u nder the RT-11 system and from any FORTRAN IV or FORTRAN 77 p rogram running RSX-11M/M-PLUS operating systems. 1-1 INTRODUCTION NOTE FORTRAN 77 FORTRAN V4.0 IV-PLUS named because ANSI subset programming 77 is V3.0, Each mathematical Many of the Collections large, None of the subroutines, programs different in subroutines, to let you statistical scientific however, input/output single-precision use are can use or programming. programmed them more operations. All double-precision as easily in of the values. however, calculations a required routines needs V3.0 77. performs programs. Many the IV-PLUS FORTRAN statistical use of IV-PLUS commonly subroutines FORTRAN FORTRAN package subroutines for 1977 with the overlaid the so FORTRAN FORTRAN smaller is Because in of to 77 of languages. under operation version FORTRAN adheres compatible your next standard run larger the V3.0. it can subroutine is values in (at a 1loss of speed and an increase in memory). The individual subroutine source file contains the instructions for making the necessary modifications to convert from single-precision to double-precision calculations. l1.1.1 To Subroutine save as much Arrays memory space dimension statements to upper limitation on array as vectors Three and types of in decreasing arrays order 1. General 2. Symmetric 3. Diagonal Symmetric matrices. storage and and subroutine a vectors (storage (storage matrices mode mode require (storage 1less memory of the order a symmetric matrix of the same calculates most of the mode They are, 0). 2). matrix requires only 1). general matrix use use them as an treat arrays programming. a diagonal LOC subroutines required. scientific including matrices diagonal in when occurrence: matrices Where used the an array. They do not The subroutines always subscripts are of possible, access size. matrices locations, locations, The calculate as only N matrix N than by N order general requires uses N*N N* (N+1/2 ) locations. references in the Scientific Subroutines. LOC determines the relative position of any element in a vector array. LOC is supplied as a FORTRAN subroutine. To 1increase execution speed, you could write an assembly-language version of LOC. 1-2 INTRODUCTION 1.1.2 The Scientific Subroutines Package Distribution Kit The distribution kit for the Scientific Subroutines Package consists of up to two mass-storage volumes containing the Scientific Subroutines Package, this manual, a software product description (SPD), The and other forms. distribution volume l. The Scientific files. A.3.1 Subroutines following files. also that 3. Test program are test programs. data Indirect-command complete 1if you RSX-11M/M-PLUS. then table are of link files. files. or files wusing These These task-build in the RT-11, 1-3 SSP or kinds These Test program files. These are Each contains a FORTRAN program Scientific Subroutines. programs a the 2. 4. For contains of are files: FORTRAN FORTRAN calls one required files them run distribution Section source or more by some compile and B.3.1 source files. of the of the the test them. kit, if see you Section are using CHAPTER STATISTICAL 2.1 The DATA SCREENING following 2.1.1 ABSNT ABSNT tests 2 SUBROUTINES SUBROUTINES sections describe the data screening subroutines. Subroutine for general matrix Usage: CALL missing A (or (Test: ABSNT zero) values for each observation STAT.ext). in a (A,S,NO,NV) Parameter Description A Observation S Output codes vector for 1 0 NO NV of each of to Number by length NV. NO indicating NO must be 1. variables than the following no missing or zero value. one value is missing or zero. observations. of greater NO observation: There is At least Number equal matrix, or for equal each to greater observation. NV than or must be 1. Method: ABSNT tests find a find at each row missing or least 2.1.2 BOUND BOUND selects observations variable one (observation) zero missing value, of it the matrix places or zero value, (or a a A. one it places If it in S(J). a zero does If in it not does S(J). Subroutine from a under, (Test: set between, subset) and STAT.ext). 2-1 of over observations, two given the number bounds for of each STATISTICAL Usage: CALL BOUND SUBROUTINES (A,S,BLO,BHI,UNDER,BETW,OVER,NO,NV,IER) Parameter Description A Observation S Vector with matrix, indicating a nonzero NO by subset S(J) of are Input vector vector BHI Input UNDER of length vector lower is of upper The bounds on all variables. The vector indicating, OVER NV, observations Output under of for lower indicating, vector length variables. Output of observations bounds. Vector vector all is vector The observations on length Output those NV. is NV. BETW Only bounds vector of A. considered. is NO. BLO NV. each variable, bounds. for each observations over for upper number vector length variable, equal to or between length is NV. indicating, The the the the lower number and upper each variable, the number bounds. Vector length is NV. NO Number of observations. NV Number of variables IER Resultant error for each observation. code: 0 No error. l 2 S S is null. has only VMIN=1.E37, SD=AVER=0. one nonzero element. VMIN=VMAX, SD=0.0. Method: BOUND tests each row (observation) nonzero element in the specified lower and upper UNDER, BETW, and 2.1.3 SUBMX Subroutine SUBMX builds vector variable of matrix S. It subset subroutine SUBST or observation data a compares bounds and keeps a matrix. Based on vector ABSNT, subset SUBMX matrix of satisfied a certain condition. before the statistical analyses analysis) (Test: STAT.ext). CALL with SUBMX copies those from a a Input D Output matrix matrix of of in with vectors derived larger observations from matrix which of have This subroutine 1is normally used (multiple regression or factor Description A count S (A,D,S,NO,NV,N) Parameter corresponding observations OVER. a Usage: A observations, NO observations N 2-2 by by NV. NV. STATISTICAL SUBROUTINES Parameter Description S Input from NO vector of subroutine Number equal of to SUBST NO or containing NO must 1. Number of N Output variable the codes derived ABSNT. observations. NV in length be greater than or variables. vector containing the number of S. nonzero codes Remarks: Matrix D can be in the same location as matrix A. Method: SUBMX the determines TIth whether observation 1is matrix. 2.1.4 SUBST SUBST derives have satisfied Usage: CALL S(I) contains copied a from nonzero the code. input matrix If 1t does, to the output in a Subroutine a subset vector certain SuBSsT indicating conditions on which the observations variables set (Test: DASCR.ext) . to considered. (A,C,R,B,S,NO,NV,NC) Parameter Description A Observation C Input The matrix, first number of tested. the matrix, 3 by [ ] AW e W+ NC, of conditions of each column of variable (column of The the second element of each relational be C represents matrix A) column codes: is the to be one of to be For Element . third For LT (less than) For LE (less than For EQ (equal to) For NE (not For GE (greater than For GT (greater than) element for example, NV. the following used by element Code The NO of each comparison the equal following or equal to) to) or column with the in column is equal a to) quantity observation values. C: 2. 5. 92.5 causes than or the second equal to variable 92.5. 2-3 to be tested for greater STATISTICAL SUBROUTINES Parameter Description R Working vector used to above tests on a satisfied, R(I) is to B 0. Vector store single set to length is intermediate observation. 1. If it is of subroutine you must must be defined an external program. the It consists 1intermediate Boolean operators of a * AND DIMENSION BOOL in subroutine the calling expression stored for The statement in and example: SUBROUTINE If condition is not, R(I) is set supply. Boolean wvalues are of NC. Name by results linking vector R. The for OR. For + (R,T) R(3) T=R(1l)*(R(2)+R(3)) RETURN END The above expression R(1) .AND. (R(2) .OR.R(3)) S Output or NO not The Number of to Number to NC greater B - The example and name the BOOL) subroutine length each satisfied. is of variables. 1If of basic must than or the to do conditions equal Subprograms you you subroutine by an external statement also list the name in the CALL SUBST is, S(I) is be greater than or be greater to be satisfied. than or NC equal must be 1. Required: must subroutine this, to it whether NO. NO must NV for: observation, 1. subroutine but SUBST is observations. Function of vector B for tested 1. Number Subroutines indicating, proposition zero. equal NV vector is supply SUBST can always be different, calls it as (for B. For must define the name of the in the calling program. You must statement. (See Usage above.) Method: SUBST performs 1. SUBST the following analyzes variables are to for each observation: the <condition be examined. matrix 2. SUBST 3. SUBST evaluates the Boolean expression derive the element 1in subset vector observation. forms immediate vector 2-4 to determine which R. (in subroutine S corresponding B) to to the STATISTICAL 2.1.5 TABl SUBROUTINES Subroutine TABl tabulates for one variable in an observation matrix (or a matrix subset) the frequency and percent over given class intervals. 1In addition, TABl calculates for the same variable the total, mean, standard deviation, minimum, and maximum (Test: DASCR.ext). Usage: CALL TAB1 (A,S,NOVAR,UBO, FREQ,PCT,STATS,NO,NV) Parameter Description A Observation S Input matrix, vector NO by giving observations with considered. Vector NOVAR The to UBO Input variable vector subset a be NV, of A. corresponding length is to maximum values lower UBO(2), must limit, of limit, the the number variable. include two Vector length FREQ Output vector of frequencies. PCT Output vector of relative of summary STATS vector mean, standard length is standard maximum NO Number equal NV equals to S is is equal or of for Vector minimum each equal to size from in UBO(1), 1limit is minimum and intervals, length under and is UBO(2). Vector 1length that is, total, maximum. Vector total, 0, intervals, values the NO must for Number and 1.E75. variables the minimum null, observations. than are 3. 1. of greater If uses statistics, deviation, deviation of Number 5. S(J) lower frequencies. UBO(2). Output If <cells limits. of tabulated program above is those tabulated. giving upper nonzero NO. and upper limit of variable to be UBO(2), and UBO(3) respectively. equal Only average, equals be -1.E75, greater and and than or must be information or observation. NV 1. Method: TABl calculates the interval the given optionally, from the minimum and maximum values for variable NOVAR. TABl then calculates the frequencies, percent frequencie s, and summary statistics. The divisor for standard deviation is one less than the number of 2.1.6 TAB2 TAB2 observations frequency, (Test: Subroutine performs observation used. a 2-way matrix and (or other classification a matrix statistics STAT.ext). 2-5 for subset) over two of the given variables in frequency, percent class an intervals STATISTICAL Usage: CALL SUBROUTINES TAB2(A,S,NOV,UBO,FREQ,PCT,STAT1,STAT2,NO,NV) Parameter Description A Observation S Input NOV vector with considered. Vector Variables to be NOV(2) variable is 3 by 2 and than upper by NV, subset a of length 2. is 1limit to 1 of NOV(l) is less than limit, both nonzero length and lower Only those S(J) are NO. Vector equal giving A, corresponding cross-tabulated. or matrix NO giving observations greater NV. UBO matrix, is 2. 1, NOV must be equal to or number wvariables variable of intervals, to be tabulated (first column for wvariable 1, second column for variable 2). If 1lower limit is equal to upper limit for variable 1, the program uses the minimum and maximum values on each variable. Number of intervals must include two cells for under and above limits. FREQ Output matrix of frequencies classification. INT1l is is INT2 number must be respective PCT Output of intervals specified column of in of variable the second matrix of matrix summarizing percent frequencies, Output deviations Order STAT?2 NO of as 3 INT2. Number equal NV matrix Same by STAT1 of to Number each is 3 class by but over interval INTl1 and position of same means, order and of than or variable NO for equal as standard variable 2. must Order be of matrix greater 1. variables where INT2 1. INTI1. observations. of greater for totals, 2-way INT2, 1 and 2. UBO matrix. FREQ. STAT1 the Order of matrix is INT1 by number of intervals of variable the the in each to observation. NV is than or must be 1. Remarks: If S is null, the output areas interval sizes are set to zero. Method: TAB2 calculates information also develops calculates standard The or, optionally, the frequency matrices STAT1 from and for observations for standard used in each percent and deviation class variables the minimum and deviations. divisor both frequency maximum summarizing is 1less interval. 2-6 the given values. TAB2 matrices. STAT2 one from totals, than the Then, it means, and number of STATISTICAL 2.1.7 TALLY TALLY SUBROUTINES Subroutine calculates the total, the mean, minimum, and the maximum for each observations (Test: STAT.ext). Usage: CALL the standard variable in a set deviation, (or a the subset) of TALLY (A,S,TOTAL,AVER,SD,VMIN, VMAX,NO,NV, IER) Parameter Description A Observation S Input matrix, vector NO by 1indicating observations with a length Output vector length is Output vector of means Output vector of standard Vector length is NV. Output vector length is Output vector length is NV. NO Number of observations. NV Number of variables IER Resultant AVER is VMIN VMAX of S(J) NO. of totals of each NV, of is NV. SD subset nonzero Vector TOTAL NV. each A. Only are considered. variable. variable. deviations of Vector Vector each those length variable. of minima of each variable. Vector of maxima of each wvariable. Vector NV, error for each observation. code: 0O No l 2 S is null. S has only error. VMIN=1.E37, one VMIN=VMAX, nonzero SD=AVER=0. element. SD=0.0. Method: TALLY analyzes vector and S finds calculates The for all each minimum mean divisor for Observations and observations variable and 2.2 ELEMENTARY STATISTICS The sections subroutines. follow A. to Then, values. a it nonzero is one Following less element accumulates this, deviations. deviation used. that matrix maximum standard standard in corresponding than the in totals TALLY number of SUBROUTINES describe 2-7 the elementary statistics STATISTICAL 2.2.1 MOMEN MOMEN finds intervals Usage: SUBROUTINES Subroutine the first (Test: CALL four moments for grouped data NPAR2.ext). on equal <class MOMEN (F,UBO,NOP,ANS) Parameter Description F UBO Grouped data length (UBO(3)-UBO(1))/UBO(2). Three-cell is an Note NOP vector, upper that Option (frequencies). bound UBO(3) ANS NOP=4, data. must be 1If are Output vector of lower bound UBO(2) greater moment. filled as a NOP=1, If ANS(4)=fourth moments is on parameter. ANS (2)=second If UBO(l) Given is than a a vector and class moment. UBO(3) interval. UBO(1l). ANS(l)=mean. NOP=3, of If NOP=2, ANS(3)=third moment. If NOP=5, which moments all four in. length 4 into are put. Remarks: The first moment is not central mean 1s always calculated. but the Moments value are of the mean itself. The biased and not corrected for grouping. Method: Refer to Kendall 1977. 2.2.2 TTSTT Subroutine TTSTT finds certain (Test: STAT.ext). Usage: CALL T-statistics on the means of populations TTSTT(A,NA,B,NB,NOP,NDF,bANS) Parameter Description A Input vector NA Number B Input NB Number NOP Options of length NA containing observations in A. length NB containing observations in B. vector 1 of for of of various data. data. hypotheses: That population mean of B equals given value A (set NA=1l). 2 That population mean mean of A, given that the variance of A. 2-8 of B equals population the variance of B equals STATISTICAL SUBROUTINES Parameter Description 3 That population mean 4 mean of A, equal to the of variance A, variances Output ANS that That population mean mean NDF given of given of A and variable the A. of B no B the T-statistic given equals population variance of of equals T-statistic is not about (set NA=NB). degrees B population information containing associated with for B of the freedom calculated. hypothesis. Remarks: NA and and 4, NB must NB must be degrees of are set to be greater the same than in freedom and 1, option except that 4. NOP If T-statistic are zero. NA=1 is in option other than 1. 1, not calculated. 2, NDF NA 3, or and ANS Method: Refer 2.3 The to Ostel 1975. CORRELATION SUBROUTINE section that 2.3.1 CORRE CORRE computes deviations, MCANO.ext). Usage: CALL follows describes the means, and standard deviations, correlation coefficients Number of to Number observations. variables. Option code for If data 1 If M 1. the XBAR cross-products (Tests: I0=0, N must be must be greater 2. of 0 X of of FACTO.ext, Description to 10 sums CORRE(N,M,IO,X,XBAR,STD,RX,R,B,D,T) equal M subroutine. Subroutine Parameter N correlation input data. is be to special used If is the data value input matrix (N Output of vector of by M) by this already X from is 0.0. M input named subroutine If IO=1, data. containing than than in memory. containing length 2-9 in subroutine Subroutines all read greater means. or or equal device DATA. in (See below.) X 1is the STATISTICAL SUBROUTINES Parameter Description STD Output vector of length M deviations. RX Output R matrix (M cross-products of Output (only matrix by deviations upper symmetric matrix of coefficients (storage B Output the vector matrix of of M) sums from means. triangular of M standard containing M by mode of length containing of of the portion M) containing 1). containing cross-products sums the of correlation diagonal of deviations from furnish an means. D Working vector of length M. T Working vector of length M. Subroutines and Function DATA(M,D) You must 1. - If 1I0=0, provide this observation 2. If 10=1, provided supplied Subprograms in this this Required: subroutine. subroutine vector D subroutine from an is not when building the a subroutine named SUBROUTINE 1is expected external to input device. used by CORRE but executable file. If you DATA, the following is must have be not suggested: DATA RETURN END Method: CORRE 2.4 computes MULTIPLE The sections subroutines. 2.4.1 product-moment correlation LINEAR REGRESSION that follow coefficients. SUBROUTINES describe the multiple 1linear regression MULTR Subroutine MULTR performs variable performs and a multiple a set of multiple (Test: POLRG.ext). Usage: CALL linear regression analysis independent variables. and polynomial for a This subroutine regression dependent normally analyses MULTR(N,K,XBAR,STD,D,RX,RY,ISAVE,B,SB,T,ANS) Parameter Description N Number of observations. K Number of independent 2-10 variables in this regression. STATISTICAL SUBROUTINES Parameter Description XBAR Input vector variables. STD Input of D M vector all Input of 1length is of the M containing number length of of length M containing standard M containing the matrix of sums of cross means for all vectors. RX Input matrix (K by intercorrelations RY Input of ISAVE vector of independent Input vector K) among length independent length of with K+1 all a deviations diagonal of deviations the from inverse Output vector of dependent containing 1length K variable. subscripts containing coefficients. SB Output vector deviations of of length regression T Output vector of length ANS Output vector of length K 10 ANS (1) Intercept ANS (2) Multiple ANS (3) ANS (4) correlation Standard error ANS (5) Degrees ANS (6) Mean ANS (7) Residual ANS (8) Degrees ANS (9) ANS (10) Mean of of squares of sum of due of of of the following coefficient to regression associated (SSR) with SSR with RSS SSR squares freedom square standard estimate freedom square The the T-values. containing information: Sum containing containing of regression coefficients. K of intercorrelations independent variables in ascending order. subscript of the dependent variable is stored 1in last position, that is, the K+1 position. B the variables. containing variables of products containing K of variables. variables. vector means (RSS) associated RSS F-value Remarks: N must be greater than K+l1. Method: MULTR to uses Cooley the and Gauss-Jordan Lohnes 1962, 2.4.2 ORDER Subroutine ORDER constructs a method and subset to Ostel solve normal equations. Refer intercorrelations among 1975, matrix of independent variables and a vector of intercorrelations of in dependent variables with a dependent variable from a larger matrix of correlation performance (Test: coefficients. of POLRG.ext). multiple This and subroutine polynomial 2-11 is normally regression used in the analyses STATISTICAL Usage: CALL SUBROUTINES ORDER(M,R,NDEP,K,ISA RXVE , RY, ) Parameter Description M Number R Input of variables matrix subroutine the NDEP The K Number expects subscript to Input vector order, the to be variable dependent variables K to column) included be (K of independent 1in greater containing, routine, the subscript in position K+l. vector in R variable. be must K+1 calling by independent regression. of the (by of in the than or ascending numbers of K independent variables the forthcoming regression. Upon in the matrix Output of length among RY stored portion subscript included Output be 1. returning to in addition, RX to triangular This 1). number of R. coefficients. upper regression. equal matrix the independent forthcoming ISAVE of of correlation only matrix mode of order containing symmetric (storage and K) number K variables to contains, the dependent be intercorrelations used containing with vector of containing variables length this in forthcoming intercorrelations dependent variables. Method: ORDER constructs numbers of the the matrix variables 2.5 POLYNOMIAL The section to REGRESSION that RX and be included the vector GDATA degree and the subscript forthcoming regression. follows describes the polynomial regression GDATA Subroutine generates independent polynomial correlation variables specified) coefficients. before subroutines ORDER, polynomial regression (Test: Usage: the from SUBROUTINE subroutine. 2.5.1 in RY CALL and up to computes This the Mth means, subroutine MINV, and MULTR POLRG.ext). in power standard Number M The of the performance observations. highest degree polynomial 2-12 to be deviations, normally Description N highest 1is GDATA (N,M,X,XBAR,STD,D,SUMSQ) Parameter (the fitted. called of a STATISTICAL SUBROUTINES Parameter Description X Input for matrix the column (N by M+l). independent of matrix X, When GDATA is 1is stored variable and data for the called, in data the dependent first variable is stored in the 1last column of the matrix. Upon returning to the calling routine, generated powers of the independent variable are stored in columns 2 through M. XBAR Output vector of 1length M+l containing means independent and dependent variables. STD Output vector deviations D Output SUMSQ of of 1length independent matrix (only M+l and upper containing of standard dependent variables. triangular portion of the symmetric matrix of M+l by M+1l) containing coefficients (storage mode of 1). correlation Output of vector of of deviations variables. length M+l from means containing of sums independent and products dependent Remarks: N must be greater precision results. may than not M+l. be If M is sufficient equal to to give 5 or greater, single satisfactory computational canonical correlations Method: Refer to Ostel 1975. 2.6 CANONICAL CORRELATION SUBROUTINES The sections that follow subroutines. 2.6.1 CANOR describe the CANOR Subroutine calculates variables. the CANOR (Test: MCANO.ext). Usage: CALL canonical 1is correlations normally preceded by a between call to two sets of of the subroutine CORRE CANOR(N,MP,MQ,RR,ROOTS,WLAM,CANR,CHISQ,NDF,COEFR, COEFL,R) Parameter Description N Number of observations. MP Number of left-hand MQ Number of right-hand RR Input matrix (only variables. variables. upper triangular portion symmetric matrix of M by M, where M=MP+MQ) containing correlation coefficients (storage mode of 1). 2-13 STATISTICAL SUBROUTINES Parameter Description ROOTS Output vector computed WLAM Output CANR Output in of the vector 1length NROOT of vector CHISQ Output vector MQ of length MQ of length MQ chi-squares. NDF Output COEFR vector freedom associated Output matrix right-hand COEFL Output left-hand R Work with (MQ by (MQ (M by MQ lambda. containing containing canonical the containing MQ) values of degrees of MQ sets of MQ sets of the containing column-wise. by coefficients matrix eigenvalues chi-squares. coefficients matrix containing 1length correlations. containing subroutine. length of MQ MP) containing column-wise. M). Remarks: The number to the of left-hand number of right-hand correlation, lambda, coefficients are greater zero. than variables should variables chi-square, computed (MP) only (MQ). degrees for be The of those greater than values freedom, eigenvalues in of and or equal canonical canonical roots that are Method: Refer 2.6.2 to Cooley NROOT and Lohnes 1962, Subroutine matrix of the form B-inverse called by subroutine CANOR in analysis (Test: MCANO.ext). Usage: CALL times A. This performing a is normally correlation NROOT(M,A,B,XL,X) Parameter Description M Order of A Input matrix (M by M). B Input matrix (M by M). XL Output square vector B-inverse X Output of times matrix matrices length A, B, M containing and and Function X. A. (M by M) containing column-wise. Subroutines subroutine canonical Subprograms EIGEN 2-14 Required: eigenvalues of eigenvectors STATISTICAL SUBROUTINES Method: Refer to Cooley 2.7 ANALYSIS The sections and OF Lohnes VARIANCE that subroutines. 2.7.1 AVCAL AVCAL performs 1962. SUBROUTINES follow describe the analysis of variance wusing operator Subroutine the calculus of a factorial experiment sigma and operator delta. AVCAL is preceded by subroutine followed by subroutine MEANQ in analyzing variance for a factorial design (Test: ANOVA.ext). Usage: CALL AVDAT and complete AVCAL (K,LEVEL,X,L,ISTEP,LASTS) Parameter Description K Number of variables 1. LEVEL X Input vector within each Input vector vector X of (factors). length K by must containing variable. containing K data. subroutine Data AVDAT. be greater levels has The (categories) been placed 1length (LEVEL(1)+1)*(LEVEL(2)+1)*...*(LEVEL(K)+1 than of 1in X is ). L The position located. ISTEP LASTS L in vector has been vector of length steps which have been vector of where the calculated Input Working X K by input subroutine containing calculated length last by storage data is AVDAT. control subroutine AVDAT. by Hartley. K. Remarks: This subroutine must follow subroutine AVDAT. Method: The method is based on (Ralston and Wilf, eds. 2.7.2 positions AVCAL of and factorial Usage: discussed H.O. AVDAT Subroutine AVDAT places to the technique 1962). data storage. MEANQ design CALL for variance This subroutine subroutines (Test: analysis is analyzing ANOVA.ext). 1in normally variance AVDAT (K,LEVEL,N,X,L,ISTEP,KOUNT) 2-15 properly distributed followed for a by calls complete STATISTICAL SUBROUTINES Parameter Description K Tumber LEVEL Input of vector within N Total X When variables of (factors). length K K must containing be greater levels (categories) each variable. number AVDAT of is data points called, read. this vector locations X (1) through X(N). calling routine, the vector properly redistributed than contains data in Upon returning to contains the data the in 1locations of vector X. The length of vector X is calculated by: (1) adding 1 to each level of variable and (2) obtaining the cumulative product of all 1levels. The length of X equals (LEVEL(1)+1) *(LEVEL(2)+1)*...* (LEVEL(K)+1). L Output where ISTEP KOUNT variable the last Output vector which are vector X. Working containing input of vector data 1length wused to of the is stored. K <containing locate length position data in in vector control proper X steps positions of K. Remarks: Input data must be arranged in the following manner. Consider the 3-way analysis of variance design, where one variable has three levels and the other two wvariables have two levels. The data may be represented 1in the form: X(I,J4,K), 1=1,2,3, J=1,2, K=1,2. In arranging data, the subscript, I, changes first. When I=3, the next subscript, J, changes and so on until I=3, J=2, and K=2. Method: The method is based on the technique (Ralston and Wilf, eds. 1962). 2.7.3 MEANQ discussed by 0. Hartley. MEANQ Subroutine computes sum of squares, degrees of freedom, using the mean square operator. MEANQ normally and AVCAL subroutines in analyzing variance for design (Test: ANOVA.ext). Usage: H. CALL and mean square follows calls to AVDAT a complete factorial MEANQ(K,LEVEL,X,GMEAN,SUMSQ,NDF,SMEAN,MSTEP,KOUNT, LASTS) Parameter K Description Number of variables (factors). K must be greater than 1. LEVEL Input within vector of length each variable. 2-16 K containing levels (categories) STATISTICAL SUBROUTINES Parameter Description X Input vector containing the result of the delta operators. The length of (LEVEL(1)+1)*(LEVEL(2)+1)*...*(LEVEL(K)+1). GMEAN Output variable SUMSQ Output vector of NDF SUMSQ Output SMEAN is 2 containing containing sums to power vector the Kth containing length of NDF is Output vector containing SMEAN is 2 to grand 2 the to the Kth power MSTEP Working vector of length K. KOUNT Working vector of length K. LASTS Working vector of length K. X is: squares. minus deqgrees power mean and mean. of Kth sigma 1, The 1length (2**K)-1. of freedom. minus squares. minus 1, 1, The The (2**K)-1. length of (2**K)-1. Remarks: This subroutine must follow subroutine AVCAL. Method: The method is based on the technique (Ralston and Wilf, eds. 1962). 2.8 DISCRIMINANT ANALYSIS The sections that DISCR by H. 0. Hartley. discriminant analysis SUBROUTINES follow describe subroutines. 2.8.1 discussed the DISCR Subroutine computes classifying subroutine an is a set of 1linear functions 1individual into one of several wused in the performance of (Test: MDISC.ext). Usage: CALL that are indexes for groups. Normally this discriminant analysis DISCR(K,M,N,X,XBAR,D,CMEAN,V,C,P,LG) Parameter Description K Number of groups. M Number of variables. N Input vector of K must length groups. 2-17 K be greater containing than 1. sample sizes of STATISTICAL SUBROUTINES Parameter Description X Input vector containing data to 3-dimensional FORTRAN X(3,1,1) and so forth. The number, third is equal the the to Input the in D K matrix total matrix dispersion CMEAN Output \Y Output array, first number manner -equivalent X(1,1,1), X(2,1,1), subscript of data is points, (M by K) containing means (M by M) containing the groups. Input the of length variable M containing containing Output of P matrix ((M+l) discriminant by K) M common containing The column (function) contains for that function. the Output the vector with the all groups. containing largest value Calculated of results are pooled coefficients position of function the of stored of LG of Output vector cases, discriminant of vector LG T associated all in cases a (T=N(1)+N(2)+...+N(K)). containing the subscripts of each constant equivalent to a two-dimensional area (the subscript is the case number, the second is the number) . Vector P has a 1length equal to the number where variables probability discriminant the is Mahalanobis the first case means. generalized functions. T*M, inverse matrix. vector of D-square. C the second 1is the variable number, and group number. The length of vector X T=N(1)+N(2)+...+N(K). XBAR in the functions stored in vector P. The is the same as the length of vector in manner first group total largest length P. Remarks: The number of variables must be greater than or equal to the number of groups. Method: Refer to Dixon, 2.8.2 DMATX DMATX computes dispersion ed. 1977 and Anderson 1958. Subroutine means matrix of for all variables the 1in groups. discriminant analysis Usage: DMATX(K,M,N,X,XBAR,D,CMEAN) CALL (Test: MDISC.ext). 2-18 each group Normally and PMATX a pooled performs STATISTICAL SUBROUTINES Parameter Description K Number of groups. M Number of variables N Input vector of (must length be K the same for containing all groups) . sample sizes groups. X Input to vector a 3-dimensional X(3,1,1), case containing and number, third is equal the to forth. the second the Output K matrix number. total Output CMEAN Working matrix manner equivalent X(1,1,1), X(2,1,1), first the subscript variable The number length of data number, of by K) containing means (M by M) containing pooled vector of length 1is the and the X is vector points (M groups. D is the array, The T=N(l)+N(2)+...+N(K). XBAR in FORTRAN so group data of of T*M, where variables in dispersion. M. Remarks: Refer 2.9 to Dixon, 1977 FACTOR ANALYSIS The sections 2.9.1 LOAD computes sequence the Usage: that and Anderson 1958. SUBROUTINES follow describe the factor analysis subroutines. LOAD Subroutine associated in ed. of a factor eigenvectors. calls performance CALL matrix to of This subroutines a (loading) factor from subroutine CORRE, normally EIGEN, analysis eigenvalues (Test: TRACE, occurs LOAD, FACTO.ext). and and in a VARMX LOAD(M,K,R,V) Parameter Description M Number of variables. K Number of factors. less than or 1 and only wupper K must equal triangle be greater than to M. by column in or memory) equal containing eigenvalues in diagonal. Eigenvalues are arranged descending order, and first K eigenvalues are used this subroutine. The order of matrix R is M by Only l)o M* (M+1)/2 elements 2-19 are in storage to (storage mode 1in by M. of STATISTICAL SUBROUTINES Parameter Description \Y When LOAD 1is called, matrix V (M eigenvectors column-wise. Upon calling program, matrix V contains a by by M) contains returning to factor matrix K). the (M Method: LOAD converts multiplying normalized the corresponding eigenvectors elements of each TRACE TRACE computes vector by factor the pattern square root by of the Subroutine the cumulative percentage specified constant. TRACE or equal to a of calls to subroutines CORRE, of analysis Usage: the eigenvalue. 2.9.2 performance to CALL a factor EIGEN, of eigenvalues normally occurs TRACE, (Test: LOAD, and greater than in a sequence VARMX in the FACTO.ext). TRACE (M,R,CON,K,D) Parameter Description M Number R Input of variables. matrix (symmetric and stored in compressed form with only upper triangle by column in memory) containing eigenvalues in diagonal. Eigenvalues are arranged in descending order. The order of matrix R is M CON by M. Only (storage mode of M* (M+1l)/2 1). elements A to how constant used decide many retain. K Output variable greater than containing or equal the to are (K storage eigenvalues number CON. 1in of is to eigenvalues the number of factors.) D Output vector of percentage of equal to CON. 1length eigenvalues M containing that are cumulative greater than or M and Method: TRACE divides adds the each result percentage for eigenvalue to each the VARMX Subroutine VARMX performs CORRE, EIGEN, analysis Usage: TRACE, (Test: CALL ©previous orthogonal normally than or total equal to to obtain CON the by cumulative eigenvalue. 2.9.3 subroutine greater rotations occurs LOAD, and in a VARMX of sequence in the FACTO.ext). VARMX(M,K,A,NC,TV,H,F,D,IER) 2-20 a factor of calls performance matrix. to of This subroutines a factor STATISTICAL SUBROUTINES Parameter Description M Number of variables K Number of factors. A Input is the rotated NC TV variable cycles performed. Output vector matrix for means Maximum number subroutine is of is 51. Output NC+l1 vector communalities. F Output vector D Output between IER vector the Resultant cycles of length length original error and M output matrix of stored is the M the in length This TV. in this vector the TV original the the to vector of containing by factor prior allowed containing final the iteration variance containing M is A of A. calculated. iteration of communalities. The also therefore, matrix number are M and variance 1is length of of variances 50; of the cycle. cycle rows order the iteration of matrix, The containing iteration that factor containing each first number matrix. Output the H original factor K. and final differences communalities. code: O No 1 Convergence error. was rotation. not achieved in 50 <cycles of Remarks: If the for variance four computed successive after times, each VARMX iteration stops cycle does rotation. not increase Method: Kaiser's ROTATION varimax IN Measurement, 2.10 TIME The sections 2.10.1 AUTO rotation FACTOR Vol. SERIES that XIX, as described ANALYSIS, No. 3, in COMPUTER PROGRAM Educational 1959, and FOR VARIMAX Psychological SUBROUTINES follow describe the time series subroutines. AUTO Subroutine finds the autocovariances (Test: TIMSER.ext). Usage: CALL of 3 AUTO(A,N,L,R) 2-21 series A for lags 0 to L-1 STATISTICAL SUBROUTINES Parameter Description A Input vector of length N whose autocovariance containing is desired. N Length of the vector L Autocovariance is calculated for the time series 1, 2,..., A. lags of 0, L-lo R Output vector of length L containing autocovariances of series A. Remarks: The length of R must be different from the length of If not, R(1l) greater than L. program. calling A, N must be B that is set to zero and return is made to the Method: Refer to Blackman and Tukey 2.10.2 CROSS 1959. Subroutine CROSS finds the cross-covariances of a series A with a series leads and Usage: lags A (Test: TIMSER.ext). CALL CROSS(A,B,N,L,R,S) Parameter Description A Input vector of length N containing first time series. B . ies ser e tim ond sec g nin tai con N gth len of tor vec ut Inp N Length of series A and B. L O, of ds lea and s lag for d ate cul cal is ce an ri va co Cross- R Output vector of length L containing l, of S 2' o o 0oy L-lo A with B, where B lags A. Output vector of length L containing of B cross-covariances A with B, where leads than L; if it is not, cross-covariances A. Remarks: N must be greater zero and returns to the calling program. Method: Refer to Blackman and Tukey 1959. 2-22 CROSS sets R(l) and S(l) to STATISTICAL 2.10.3 EXSMO EXSMO finds series X Usage: Subroutine the (Test: CALL SUBROUTINES triple exponential smoothed series S of the given series data EXPON.ext). EXSMO(X,NX,AL,A,B,C,S) Parameter Description X Input vector which is to NX The AL Smoothing and A,B,C number less of be of length elements than containing exponentially constant, Coefficients NX in smoothed. X. alpha. AL must be greater than 0 S is 1. of the prediction equation, predicted input--if T periods A=B=C=0, the hence program values. If one program will at 1least take output--A, B, coefficients of Output time given C by A+B*T+C*T*T/2. As will provide initial A, as B, C is not initial contain the zero, the values. As latest, updated containing triple prediction. vector exponentially of where of length NX smoothed time series. Method: Refer 2.10.4 SMO to Brown SMO smooths Usage: CALL 1963. Subroutine or filters series A by weights W (Test: TIMSER.ext). SMO(A,N,W,M,L,R) Parameter Description A Input N Length vector Input of of integer. and (2) of from below Selection N containing time M containing weights. series data. A. length items If resulting length series vector Number of in M weight 1is the an vector. even calculation will be integer. M must integer, of be any (L*(M-1))/2 an fraction in truncated. For example, L=12 o0dd means (1) that weights are applied to every 12th item of A. L=1 applies weights to successive items of A. For monthly data, L=12 gives year-to-year averages and L=1 gives month-to-month Output vector averages. of length the vector R are other elements with N. From IL filled with the zero, where: IL=(L* (M-1))/2+1...(1) IH=N-(L* (M-1))/2...(2) 2-23 to IH elements smoothed series of and STATISTICAL SUBROUTINES Remarks: N must be greater than or equal Bogert 1963. to the product L*M. Method: Refer to 2.11 NONPARAMETRIC The Healy and sections STATISTICAL that follow describe subroutines. 2.11.1 CHISQ CHISQ computes (Test: NONPAR.ext). Usage: CALL SUBROUTINES the nonparametric statistical Subroutine the chi-square from a contingency table CHISQ(A,N,M,CS,NDF,IER,TR,TC) Parameter Description A Input N Number of rows in A. M Number of columns in CS Chi-square NDF Number IER Resultant matrix, of N by M, containing table. A. (output). degrees error of freedom (output). code: O No 1 Expected value is cells. Number of degrees 3 contingency error. TR Work vector of length N. TC Work vector of length M. less of than 1.0 freedom is in one or more zero. Remarks: If one or more cells value) less code zero 1. (See either N to 1f than contain 1.0, an CHISQ reference or M is 1 expected computes given (error to Siegel 1956. 2-24 (that chi-square, below.) code 3). Method: Refer value CHISQ 1is, and sets theoretical sets the error chi-square to STATISTICAL 2.11.2 KRANK KRANK tests correlation Usage: Subroutine the correlation coefficient CALL SUBROUTINES between (Test: two variables by the Kendall rank NONPAR.ext). KRANK(A,B,R,N,TAU,SD,Z,NR) Parameter Description A Input vector of N observations for first B Input vector of N observations for second Output vector of ranked data observation is ranked 1, assigned average of tied Number of TAU Kendall SD Standard Test rank in largest ranks. correlation deviation of Code, length is variable. 2*N. ranked Smallest N. Ties are observations. 0 for A and B to zero coefficient (output). (output). significance distribution NR of variable. of TAU in terms of (output). unranked data in A and B, 1 for normal ranked data (input). Remarks: SD and Z are Subroutines set and if Function N is less Subprograms than 10. Required: RANK TIE Method: Refer 2.11.3 QTEST differ Usage: to Siegel QTEST tests 1956. Subroutine whether three significantly CALL by or the more matched Cochran groups Q-test of (Test: dichotomous data NPAR2.ext). QTEST(A,N,M,Q,NDF) Parameter Description A Input N Number of sets M Number of groups. Q Cochran Q NDF Number of matrix, N by in M, each statistic degrees of of dichotomous data group. (output). freedom 2-25 (output). (0 and 1). STATISTICAL SUBROUTINES Remarks: M must be 3 or greater. Method: Refer to 2.11.4 RANK Siegel RANK ranks 1956. Subroutine a vector of values. average rank (Tests: Usage: CALL RANK(A,R,N) RANK NONPAR.ext, assigns tied values NPAR2.ext). Parameter to the ranked 1, Description A Input R Output vector of vector largest is N of values. length ranked N. N. Smallest Ties are ranks. N Number of value assigned is average of tied values. Method: RANK searches all ties tied for vector and sixth SRANK SRANK tests correlation Usage: CALL for computes rank, ((6+7)/2). 2.11.5 A successively their RANK larger value. assigns For each elements. example, of them if RANK two a locates values rank of are 6.5 Subroutine the correlation coefficient between (Test: two variables by the Spearman NONPAR.ext). rank SRANK(A,B,R,N,RS,T,NDF,NR) Parameter Description A Input vector of N observations for first B Input vector of N observations for second R Output ranked length vector observation assigned ranked average N Number RS Spearman T Test NDF Number NR Code, 0 for in A and B of of is for of data, 1, largest tied is is variable. variable. 2*N. ranked N. Smallest Ties ranks. are observations. rank correlation significance of degrees of unranked of RS coefficient (output). freedom (output). data A (input). 2-26 (output). in and B, 1 for ranked data STATISTICAL SUBROUTINES Remarks: SRANK sets T Subroutines to and 0 if N is Function less than 10. Subprograms Required: RANK TIE Method: Refer to 2.11.6 TIE Siegel TIE 1956. Subroutine calculates the correction factor NPAR2.ext) . Usage: CALL due to ties (Tests: NONPAR.ext, containing values TIE(R,N,KT,T) Parameter Description R Input to vector of ranks length N N. N Number of ranked KT Input code for 1l 2 T of solve solve Correction where CT rank. values. calculation equation equation factor Equation Equation is 1 1 2 of correction factor: 1 2 (output): T=SUM(CT**3-CT /12 ) T=SUM(CT* (CT-1)/2) the number of observations tied for a given TIE counts ties Method: TIE searches and some 2.11.7 TWOAV correction R for successively factor 1 of larger ranks. 2. TWOAV Subroutine tests Friedman Usage: vector whether samples two-way analysis CALL are from of variance the test same (Test: population NONPAR.ext). TWOAV(A,R,N,M,W,XR,NDF,NR) Parameter Description A Input R Output matrix, N Number of matrix, N by N M, by M, groups. 2-27 of of original ranked data. data. by the STATISTICAL SUBROUTINES Parameter Description M Number W Work XR Friedman NDF Number NR Code, of cases area of degrees for each length statistic of 0 in 2*M, (output). of unranked (input). Subroutines and Function group. freedom (output). data A, Subprograms in 1 for ranked data from the in A Required: RANK Method: Refer to Siegel 1956. 2.11.8 UTEST UTEST determines population Usage: by CALL Subroutine the whether two independent Mann-Whitney U-test groups (Test: Input vector groups. is R of cases Smaller vector of consisting group N1+N2. Output ranks. Smallest value is Length N1l Number of cases in smaller N2 Number of in U Statistic cases used is to Ties test (output). 2 Measure of distribution IER Resultant No 1 All one zero if N2 is less than 20. 2-28 of 1, tied group. of U of in the two groups terms of normal error. of ranked average code: values Length group. (output). Remarks: to assigned homogeneity significance error 0O are N1+N2. larger independent group. ranks. N. two larger is ranked of precedes largest set NONPAR.ext) . Description A is same UTEST(A,R,N1,N2,U,Z,IER) Parameter Z are group are tied. STATISTICAL Subroutines and Function SUBROUTINES Subprograms Required: RANK TIE Method: Refer to 2.11.9 WTEST of Siegel 1956. WTEST Subroutine uses the association Usage: CALL Kendall coefficient among number a of of concordance variables to (Test: test the degree NPAR2.ext). WTEST(A,R,N,M,WA,W,CS,NDF,NR) Parameter Description A Input R Output is matrix, N matrix, ranked average of by N M, by tied ranks. of variables. M Number of cases. WA Work area vector W Kendall CS Chi-square NDF Number NR Code, of coefficient original of largest Number 0 M, 1, N of of ranked is length of data. data. ranked N. Smallest Ties are value assigned 2*M. concordance (output). (output). degrees for of unranked freedom (output). data A, in 1 (input). for ranked data in A Remarks: WTEST sets chi-square Subroutines and to Function 0 if M is 7 Subprograms or smaller. Required: RANK TIE Method: Refer to 2.12 RANDOM NUMBER GENERATOR SUBROUTINE The Siegel section subroutine. 1956. that follows describes 2-29 the random number generator STATISTICAL 2.12.1 GAUSS GAUSS computes and standard SUBROUTINES Subroutine a normally deviation distributed (Test: random number with NONPAR.ext). a given mean On the first NOTE The uniform RANDU is random not provided with because the 77 libraries same Usage: CALL number FORTRAN contain IV a type. generator this package, and FORTRAN generator of the GAUSS(IX,S,AM,V) Parameter Description IX IX is an integer entry to GAUSS, equal to dimensioned both zero. elements to two. of Thereafter, the IX they array will should contain be a uniformly distributed integer random number generated by the subroutine for use on the next entry to the subroutine. S The desired standard deviation distribution. AM The \" The value of desired mean of the the normal computed of the normal distribution. normal random variable. Remarks: Subroutines and Function Subprograms Required: RANDU Method: GAUSS by the uses 12 uniform random numbers to compute normal random numbers the central limit theorem. GAUSS then adjusts the result to match given mean and standard deviation. GAUSS finds the uniform random numbers 2.13 computed within the subroutine by the power residue method. REFERENCES Anderson, New T.W. York: Blackman, New Brown, ohn R.B., York: R.G. Time Cooley, Introduction Series. and W.J., ed. and Multivariate Statistical Sons, Tukey. The Publications, Smoothing, W.W., UCLA, J.W. Dover Behavioral Dixon, and Wiley to Forecasting Measurement and Prediction Jersey: Prentice-Hall, P.R. Lohnes. Multivariate BMDP New Computer Power Spectra. 1950, New Sciences. of Analysis. York: 1977. 2-30 Discrete Procedures John Wiley Programs of Manual. and Los for Sons, the 1962. Angeles: STATISTICAL Healey, J.R., and B.P. Series Analysis," (January, Kaiser. Bogert. SUBROUTINES "FORTRAN Communications of 1963). "Computer Educational Program and for Varimax Psychological Subroutines ACM, Vol. Rotation Measurement, oss/ s —— . Kendall, M.G. Hafner Ostle, B. Press, New 1977. A., S. in Theory of Research. Statistics, Ames: Iowa 1975. and Computers. Siegal, Advance Statistics Press, Ralston, The H. New Wilf, York: Nonparametric York: eds. John Mathematical Wiley Statistics and for McGraw-HilT, 2-31 6. No. Factor Vol. 11, Vol. 1. State Methods Sons, the in for Time 1 Analysis" No. New 3 York: College for Digital 1962. Behavioral Sciences. CHAPTER MATHEMATICAL 3.1 SPECIAL The sections MATRIX OPERATIONS that follow OPERATIONS SUBROUTINES describe the subroutines. 3.1.1 EIGEN EIGEN computes matrix (Test: FACTO.ext, Usage: CALL EIGEN(A,R,N,MV) 3 special matrix operations Subroutine the eigenvalues and eigenvectors of MCANO.ext). Parameter a real, symmetric Description A Original matrix Resultant matrix R A in Resultant in same destroyed eigenvalues are descending order. of eigenvectors sequence as eigenvalues). Order of MV Input code: matrices A and in developed matrix N 0 1 (symmetric), computation. in diagonal (stored of column-wise, R. Compute eigenvalues and eigenvectors. Compute eigenvalues only (R need not be dimensioned but must still appear in calling sequence) . Remarks: The original Matrix A matrix cannot be A must be in the same real symmetric location as (storage matrix mode of 1). B Method: EIGEN by Von uses the Neumann diagonalization for large method computers originated (Ralston 3-1 and by Jacobi Wilf, eds. and adapted 1960). MATHEMATICAL 3.1.2 MINV of OPERATIONS MINV Subroutine inverts zero matrix and indicates MDISC.ext, Usage: a that POLRG.ext, CALL calculates the its matrix determinant. is SOLVEN.ext). singular A determinant (Tests: MCANO.ext, MINV(A,N,D,L,M) Parameter Description A Input matrix, resultant destroyed in inverse. N Order D Resultant L Work vector of length N. M Work vector of length N. of computation matrix and replaced by A. determinant. Remarks: Matrix A must be a general matrix. Method: MINV uses employs the both 3.2 MATRIX The sections 3.2.1 ARRAY row and Gauss-Jordan column For accuracy, pivoting. MINV SUBROUTINES that follow converts ARRAY subroutines a data links describe MACHKl.ext). Usage: CALL array the that (Test: the from matrix user operate single program on subroutines. to double that has of data arrays dimension double in or vice dimension arrays vector fashion a ARRAY(MODE,I,J,N,M,S,D) Parameter MODE method. ARRAY Subroutine versa. and standard Description Code indicating type of conversion: 1l From single to double dimension. 2 From double to single dimension. I Number of rows J Number of columns N Number of rows in actual in data actual specified for matrix. data matrix. the matrix D in dimension statement. M Number of dimension columns statement. 3-2 specified for the matrix D 1in MATHEMATICAL OPERATIONS Parameter Description S If MODE=1, this vector containing the elements of a data matrix of size I by J is input. Column I+l of data matrix follows column I, and so forth. If MODE=2, this vector 1is output representing a data matrix of size I by J containing its columns consecutively. The length of S is IJ, where IJ=I*J. If MODE=1, this containing rows and input first a J matrix data of matrix columns. containing I rows and J If of size N I by J M in this N by M size I by J in the D. Vector S 1is size MODE=2, by a data matrix columns. of is the output first I matrix is Remarks: Vector S can referred contains matrices to be in the same 1location as matrix as a matrix in other scientific subroutines because it data matrix. This subroutine only converts general data a (storage mode of 0). Method: Refer to 3.2.2 CADD the CADD adds a discussion variable data size in the Section 1.1.1. Subroutine column MACHK4.ext). Usage: on CALL of one matrix to a column of another matrix column ICR of (Test: CADD(A,ICA,R,ICR,N,M,6MS,L) Parameter Description A Name ICA Column Name ICR MS of of input in matrix output A in matrix Number of rows Number of in A and columns in A. number for General. Symmetric. 2 Diagonal. of be R where 0 1 Number to added to R. matrix. Column One-digit L matrix. columns in summation is developed. R. storage mode of matrix A: R. Remarks: Matrix as R must matrix A, be a unless general A is matrix and general. 3-3 cannot be in the same location MATHEMATICAL Subroutines and Function OPERATIONS Subprograms Required: LOC Method: CADD adds element 3.2.3 CCPY each element of column ICA of column ICR of matrix R. of CCPY A to the corresponding Subroutine copies a column of a matrix into MACHK4.ext) . Usage: matrix CALL a vector (Tests: MACHK3.ext, CCPY(A,L,R,N,M,MS) Parameter Description A Name L Column R Name N Number of rows in A. M Number of columns in MS One-digit number for Subroutines and of input of of A matrix. to output be moved vector 0 General. 1l Symmetric. 2 Diagonal. Function of to R. length N. A. storage Subprograms mode of matrix A: Required: LOC Method: CCPY moves elements of column R. 3.2.4 CCUT CCUT Usage: a matrices CALL to corresponding matrix (Test: between specified columns to MACHK2.ext). of vector form two CCUT(A,L,R,S,N,M,MS) Parameter Description A Name L Column of input of A to matrix. the left of place. R positions Subroutine partitions resultant L Name of matrix to be formed which from partitioning left portion of takes A. MATHEMATICAL OPERATIONS Parameter Description S Name N Number of rows M Number of MS One-digit of matrix to be in A. columns in number for 0 General. 1l 2 Symmetric. formed from right portion of A. A. storage mode of matrix A: Diagonal. Remarks: Matrix R matrix in the and S matrix can same be S in the location Subroutines and must be same as general location matrix Function matrices. as Neither matrix A. matrix Matrix S. Subprograms R R nor cannot be Required: LOC Method: CCUT R moves of N column elements rows L and to of matrix and L-1 the right A CINT CINT of L to left CCUT form of column moves matrix L to form elements of matrix S of N rows and matrix A in M-L+1 Subroutine interchanges Usage: the columns. columns. 3.2.5 to CALL two columns of a matrix (Test: COLROW.ext). CINT(A,N,LA,LB) Parameter Description A Name N Number of rows LA Column to be interchanged with column LB. LB Column to be interchanged with column LA. of matrix. in A. Remarks: Matrix A must be a general matrix. Method: CINT interchanges element of column each LB. element of column 3-5 LA with the corresponding MATHEMATICAL 3.2.6 CSRT CSRT sorts Usage: OPERATIONS Subroutine columns CALL of a matrix (Test: MACHK4.ext) . CSRT(A,B,R,N,M,6MS) Parameter Description A Name of input matrix to B Name of input vector which R Name of sorted N Number of rows M Number of MS One-digit output in be and R. columns in A and number for General. 1 2 Symmetric. Diagonal. contains sorting key. matrix. A 0 sorted. R and storage length mode of of B. matrix A: Remarks: Matrix as R must matrix equal to be A. a general M must matrix be 2. Subroutines and Function and greater cannot than Subprograms 1. be in the N must same location greater than or be Required: LOC CCPY Method: CSRT sorts CSRT in the columns determines row vector The lowest be placed causes R. the If columns 3.2.7 the valued in element the first matrix column to R in in the B of row A of to the R. to exist same A sequence causes column values The be in order as form by output the values corresponding highest placed B, CSRT in A. in moves R. elements of element last the of column valued the matrix column A to of B of corresponding CSUM Subroutine CSUM sums elements MACHK3.ext). Usage: sorted corresponding A input B. duplicate of of CALL of each column to form CSUM(A,R,N,M,6MS) Parameter Description A Name of input R Name of vector N Number of rows matrix. of length in A. 3-6 M. a row vector (Test: MATHEMATICAL OPERATIONS Parameter Description M Number MS One-digit of columns in number for 0 General. 1l Symmetric. 2 Diagonal. A. storage mode of matrix A. Remarks: Vector R cannot be in the same general. Subroutines and Function location Subprograms as matrix A wunless A is element of contained 1in new in Required: LOC Method: CSUM sums elements output row 3.2.8 CTAB CTAB tabulates vector the row B. vector down each column into a corresponding R. Subroutine It the columns of data based adds columns of the original on columns specified by the floating point of the vector B (Test: MACHK4.ext). Usage: CALL number into in a the matrix respective Description A Name of input matrix. B Name of input vector R Name of output data. It is Name N Number of rows M Number of L Number of MS One-digit of of output vector in a set of and columns in A. columns in R. number of 0 1 General. Symmetric. 2 Diagonal. general 3-7 to containing zero length L+l key. summary by this of mode of containing matrix column subroutine. R. storage matrix. M containing A Remarks: be length matrix initially S R must matrix key CTAB(A,B,R,S,N,M,MS,L) Parameter Matrix the A: counts. MATHEMATICAL Subroutines and Function OPERATIONS Subprograms Required: LOC CADD Method: CTAB tabulates contained to form and 1 1s J. 1is added Upon as in the vector to 1 by or 3.2.9 CTIE CTIE adjoins Usage: The column S(J). the of the number of the number of resultant of data of If output matrix point A matrix B. columns columns of of A A than L. Each R contains element based number A is added to the the value of J 1s vector greater in floating S(L+1). specified than B. The Ith added to completion, less columns in used to form not included in Jth not a R. in B(I) is column of between 1 summary vector on S of the key truncated matrix and L, column contains a R 1 data count Element S(L+1l) contains R as a result of J being Subroutine two matrices matrix CALL (Test: with the same row MACHK2.ext). dimensions to form one CTIE(A,B,R,N,M,MSA,MSB,L) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A, B, M Number of columns in A. MSA One-digit number for input 0 l 2 General. Symmetric. Diagonal. as MSA MSB Same L Number of except columns matrix. matrix. storage for in R. mode matrix B. cannot be of matrix A: B. Remarks: Matrix as R must either rows as be a matrix matrix Subroutines and general A or matrix matrix B. and Matrix A must in have B. Function Subprograms the the same same 1location number of Required: LOC Method: Matrix B contains is N attached rows and to M+L the right of columns. 3-8 matrix A. The resultant matrix R MATHEMATICAL 3.2.10 DCLA OPERATIONS DCLA Subroutine sets each diagonal element of a matrix MACHK2.ext) . Usage: CALL equal to a scalar (Test: DCLA(A,C,N,MS) Parameter Description A Name C Scalar. N Number MS One-digit of input matrix. (Single of rows precision and number columns for 0 General. 1 Symmetric. 2 Diagonal. floating in storage matrix mode of point variables.) A. matrix A. Remarks: Input matrix Subroutines must and be a square Function matrix. Subprograms Required: LOC Method: DCLA replaces each element on the C. 3.2.11 DCPY of a diagonal elements MACHK2.ext) . CALL of a with a scalar matrix into vector (Test: Description A Name of input matrix. R Name of output vector N Number MS One-digit 0 1l 2 of rows and number of length columns for in storage matrix Subroutines and must mode General. Symmetric. Diagonal. be Function a square matrix. Subprograms LOC 3-9 N. matrix Remarks: input a DCPY(A,R,N,MS) Parameter The matrix DCPY Subroutine copies Usage: diagonal Required: of A. matrix A: MATHEMATICAL OPERATIONS Method: DCPY moves (' the n positions 3.2.12 of elements vector GMADD CALL diagonal of matrix R. to correspondi ng Subroutine GMADD adds two general (Test: MACHKl.ext). Usage: on matrices (mode 0) to form resultant matrix GMADD(A,B,R,N,M) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A, B, R. M Number of columns in A, B, input matrix. matrix. R. Remarks: All matrices must be stqred as general matrices. Method: GMADD performs addition 3.2.13 GMPRD Subroutine GMPRD multiplies matrix (Tests: Usage: CALL two element general MACHKl.ext, by element. matrices to form a resultant SOLVEN.ext). general GMPRD(A,B,R,N,M,L) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A. M Number of columns in A L Number of columns in B. input matrix. matrix. and rows in B. Remarks: All matrices in the columns same of must be stored location matrix A must as be as general either equal matrices. matrix A or to number 3-10 the Matrix matrix of B. rows R cannot The in be number matrix B. of MATHEMATICAL OPERATIONS Method: GMPRD premultiplies stores the result 3.2.14 GMSUB GMSUB subtracts matrix the in M the by N L by L B matrix by the N by M matrix form a A R. and Subroutine one general matrix (Test: MACHKl.ext). CALL GMSUB(A,B,R,N,M) Usage: matrix from Parameter another to resultant Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A, B, R. M Number of columns in A, B, input matrix. matrix. R. Remarks: All matrices must be stored as general matrices. Method: GMSUB subtracts matrix elements. 3.2.15 GMTRA GMTRA transposes Usage: CALL B elements from corresponding Subroutine a general matrix (Test: MACHKl.ext). GMTRA(A,R,N,M) Parameter Description A Name of matrix R Name of resultant N Number of rows M Number of columns to in be transposed. matrix. A and in A columns and rows in R. in R. Remarks: Matrix A and matrix R must be stored as general matrices. Method: GMTRA transposes N by M matrix A to form 3-11 M by N matrix R matrix A MATHEMATICAL 3.2.16 GTPRD GTPRD OPERATIONS Subroutine premultiplies general matrix Usage: CALL a general (Test: GTPRD matrix by the transpose of MACHKl.ext). another (A,B,R,N,M,L) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows M Number of L Number of input in matrix. matrix. A and B. columns in A and rows columns in B and R. in R. Remarks: All in matrices the same must be stored location as as general either matrix matrices. A or Matrix matrix R cannot be B. Method: GTPRD it for not actually calculate the matrix transpose takes the elements of matrix A column wise postmultiplication by matrix B. 3.2.17 LOC does LOC computes specified Usage: A. Instead, than row wise) Subroutine a vector storage CALL (rather of mode subscript (Tests: for an DASCR.ext, element in a MACHK2.ext). LOC(I,J,IR,N,M,6MS) Parameter Description I Row J Column IR Resultant vector N Number of rows M Number of columns in matrix. MS One-digit number for storage number 0 1l 2 of number element. of element. subscript. in matrix. General. Symmetric. Diagonal. 3-12 mode of matrix: matrix of MATHEMATICAL OPERATIONS Method: MS=0 Subscript storage MS=1 is computed (general Subscript storage is (upper Subscript storage is MADD MADD adds a matrix with N*M elements in for of lower triangular element in upper computed (diagonal for a set in symmetric matrix). I1f portion, triangle. subscript is elements in matrix). 1If of diagonal to N*(N+1)/2 matrix elements on with with N diagonal (and therefore not in zero. Subroutine two matrices (Test: MACHKl.ext). Usage: CALL (of any mode) to form resultant matrix MADD(A,B,R,N,M,MSA,MSB) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A, B, R. M Number of columns in A, B, MSA One-digit MSB and input number of 0 General. 1 2 Symmetric. Diagonal. One-digit Subroutines matrix triangle element is not storage), IR is 3.2.18 a matrix). computed element is in corresponding MS=2 for number of 0 General. 1l 2 Symmetric. Diagonal. Function matrix. matrix. R. storage mode of matrix A: storage mode of matrix B: Subprograms Required: LOC Method: MADD first determines corresponding storage mode of elements. 3-13 output matrix, then adds the MATHEMATICAL The storage matrices is mode of the follows: as A matrix B for general general general general symmetric general diagonal symmetric general general general symmetric symmetric 3.2.19 MATA combinations of input symmetric diagonal diagonal diagonal diagonal all R general symmetric MATA output OPERATIONS symmetric general symmetric diagonal general symmetric diagonal Subroutine premultiplies a matrix by matrix (Test: MACHK2.ext). Usage: CALL MATA(A,R,N,M,6MS) its Parameter transpose to form a symmetric Description A Name of input R Name of output N Number of rows in A. M Number of columns in of MS columns One-digit in matrix. matrix. A. Also number of R. number for 0 General. 1 Symmetric. 2 Diagonal. storage mode of rows matrix and number A: Remarks: Matrix R R must cannot be Subroutines be in a the and symmetric same matrix location Function as with a matrix Subprograms storage mode of 1. Matrix symmetric matrix A. Required: LOC Method: Calculation regardless matrix A are of of not (A the transpose storage mode A) of results the changed. 3-14 input in a matrix. The elements of MATHEMATICAL 3.2.20 MCPY OPERATIONS MCPY Subroutine copies Usage: an CALL entire matrix (Tests: COLROW.ext, MACHK2.ext) . MCPY(A,R,N,M,6MS) Parameter Description A Name of input R Name of output N Number of rows M Number of MS One-digit Subroutines matrix. matrix. in A or R. columns in A or number for 0 General. 1l Symmetric. 2 Diagonal. and Function each element R. storage Subprograms mode of matrix A and R: Required: LOC Method: MCPY moves matrix matrix R. 3.2.21 MFUN of MFUN applies resultant Usage: to the corresponding element of to of Subroutine a function matrix CALL A to (Tests: each element MACHK3.ext, a matrix form a MACHK4.ext) . MFUN(A,F,R,N,M,MS) Parameter Description A Name of input F Name of FORTRAN-furnished R Name of output N Number of rows M Number of columns in MS One-digit number for matrix. or user A and R. matrices A and storage mode function subprogram. matrix. in matrices 0 General. 1l Symmetric. 2 Diagonal. R. of matrix A and R: Remarks: An external parameter of F function statement as the used. must name of precede a the function. 3-15 CALL statement Precision depends to identify on precision MATHEMATICAL Subroutines and Function OPERATIONS Subprograms Required: LOC Method: MFUN applies 3.2.22 MPRD function F to each element of matrix A to form matrix R MPRD Subroutine multiplies two (Test: MACHK4.ext). Usage: CALL matrices to form a resultant matrix MPRD(A,B,R,N,M,MSA,MSB,L) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows M Number of columns MSA One-digit MSB in number General. 1l 2 Symmetric. Diagonal. number General. 1l Symmetric. 2 Diagonal. of columns the same matrix. A and R. in A and of 0 Number matrix. of 0 One-digit L input rows in B. storage mode of matrix A: storage mode of matrix B: in B and R. Remarks: Matrix R cannot B. The of matrix number be in of columns of location matrix B. Subroutines and Function A as either must be Subprograms Required: by B matrix A or matrix equal to number of rows by M matrix A and LOC Method: MPRD premultiplies stores the result the in M the L N matrix by L by matrix product. 3-16 the R. N This is a row into column MATHEMATICAL The storage matrices is mode of the as follows: A output OPERATIONS matrix B general for general general general diagonal general symmetric general general symmetric symmetric symmetric general diagonal general general general symmetric general diagonal diagonal 3.2.23 MSTR combinations of input R general symmetric diagonal diagonal diagonal all general Subroutine MSTR changes storage Usage: MSTR(A,R,N,MSA,MSR) CALL mode of a matrix Parameter (Test: MACHK4.ext). Description A Name of input R Name of output N Number MSA One-digit MSR of rows matrix. matrix. and number for 0 General. 1 Symmetric. 2 Diagonal. One-digit number 0 General. 1 2 Symmetric columns for in A and R. storage mode of matrix A: storage mode of matrix R: Diagonal. Remarks: Matrix A must location as be a matrix Subroutines and square matrix. Matrix R cannot A. Function Subprograms be in the same Required: LOC Method: MSTR restructures MSA MSR 0 0 Matrix 0 1 The to matrix A to form matrix R matrix R. triangle elements of symmetric matrix. is moved upper form A a to 3-17 a general matrix are used MATHEMATICAL MSA MSR 0 2 The diagonal form a OPERATIONS elements diagonal of 0 A 1 1 Matrix 1 2 The diagonal elements of form a diagonal matrix. 2 0 A diagonal A matrix is elements moved form is expanded to matrix matrix to general matrix matrix. 1 symmetric a is a a to form general expanded by matrix inserting 1 A diagonal matrix is expanded by inserting elements to form a symmetric matrix. 2 2 Matrix 3.2.24 MSUB MSUB Usage: one matrix CALL moved to are used matrix to missing zero missing zero R. Subroutine subtracts resultant is to matrix. matrix. 2 A used R. symmetric general a are matrix (Test: from another, element by element, to form a then it MACHK3.ext). MSUB(A,B,R,N,M,MSA,6MSB) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A, B, R. M Number of columns in A, B, MSA One-digit number for MSB 0 General. 1 2 Symmetric. Diagonal. One-digit Subroutines and input number matrix. for 0 General. 1l 2 Symmetric. Diagonal. Function matrix. R. storage mode of matrix A: storage mode of matrix B: Subprograms Required: LOC Method: MSUB first subtracts determines matrix B the structure elements from of the output corresponding 3-18 matrix matrix, A elements. MATHEMATICAL The storage matrices is mode of the as follows: A matrix B for all combinations (Test: COLROW.ext). general general general general symmetric general diagonal symmetric symmetric symmetric diagonal diagonal diagonal general general symmetric diagonal general symmetric diagonal general symmetric symmetric general symmetric diagonal MTRA CALL input and R: Subroutine transposes Usage: of R general 3.2.25 MTRA output OPERATIONS a matrix (of any mode) MTRA(A,R,N,M,MS) Parameter Description A Name of matrix to R Name of output matrix. N Number of rows M Number of MS One-digit be in transposed. A and columns in A number for 0 General. 1 Symmetric. 2 Diagonal. columns and rows storage in R. in R. mode of matrix A Remarks: Matrix R cannot Subroutines and be in the function same location Subprograms as matrix A. Required: MCPY Method: MTRA row or transposes of A into diagonal, 3.2.26 RADD RADD adds N the then by M matrix A corresponding matrix R is to form column the same M by of R. as A. N matrix If R matrix by A moving is each symmetric Subroutine row of (Test: MACHK4.ext). Usage: CALL one matrix to RADD(A,IRA,R,IRR,N,M,MS,L) 3-19 row of another matrix MATHEMATICAL OPERATIONS Parameter Description A Name IRA Row R Name IRR Row N Number of rows in A. M Number of columns in MS One-digit number for L of in input matrix of in matrix. A output matrix to R where General. 1 Symmetric. 2 Diagonal. of added to row IRR of matrix R. matrix. 0 Number be rows in summation A and is developed. R. storage mode of matrix A: R. Remarks: Matrix R must be a location as matrix Subroutines and general matrix. Matrix A, unless A is general. Function Subprograms R cannot be in the same Required: LOC Method: RADD of adds row 3.2.27 RCPY each IRR of matrix of row IRA of matrix A to corresponding into a vector (Test: element R. RCPY Subroutine copies Usage: element CALL a row of a matrix MACHK4.ext). RCPY(A,L,R,N,M,6MS) Parameter Description A Name L Row R Name N Number of rows in A. M Number of columns in MS One-digit number for of of of 0 1l 2 input matrix. to moved A be output to vector of R. length M. A. storage General. Symmetric. Diagonal. 3-20 mode of matrix A: MATHEMATICAL Subroutines and Function OPERATIONS Subprograms Required: LOC Method: RCPY moves 3.2.28 RCUT elements RCUT Usage: row L to corresponding positions of vector R. Subroutine partitions matrices of a (Test: CALL matrix between specified rows MACHK2.ext). to form two resultant RCUT(A,L,R,S,N,M,MS) Parameter Description A Name L Row R Name of S Name of N Number of rows M Number of MS One-digit of of input A matrix. above which partitioning matrix to be formed from upper portion of A. matrix to be formed from lower portion of A. in A. columns in number for 0 1 General. Symmetric. 2 Diagonal. takes place. A. storage mode of matrix A: Remarks: Matrix R matrix in and S the matrix can same be in location Subroutines and S must the be same as general location matrix Function matrices. as S. Subprograms Neither matrix A. matrix Matrix R nor R cannot be Required: LOC Method: RCUT moves elements rows and M below to 3.2.29 of matrix columns. RCUT form matrix S of A N-L+1 above moves rows row L to elements and M form matrix of matrix columns. A R in of row L-1 L and RECP Subroutine RECP calculates the function subprogram (Test: MACHK4.ext). Usage: CALL reciprocal of an element. This that can be used as an argument by RECP (E) 3-21 1is a FORTRAN subroutine MFUN MATHEMATICAL Parameter OPERATIONS Description E Matrix element. Remarks: Reciprocal of zero of element is taken to be 1.0E75. Method: Reciprocal 3.2.30 RINT E is placed in RECP. RINT Subroutine interchanges Usage: CALL two rows of a matrix (Test: COLROW.ext). RINT(A,N,M,LA,LB) Parameter Description A Name N Number of rows in A. M Number of columns in LA Row to be interchanged with row LB. LB Row to be interchanged with row LA. of matrix. A. Remarks: Matrix A must be a general matrix. Method: RINT interchanges element of 3.2.31 RSRT RSRT sorts Usage: each element of row LA with the corresponding row LB. Subroutine rows CALL of a matrix (Test: MACHK3.ext). RSRT(A,B,R,N,M,MS) A Name of input matrix to B Name of input vector which R Name of sorted Z Description Number of rows X Parameter Number of columns output in be sorted. contains sorting matrix. A and in A 3-22 R and and R. length of B. key. MATHEMATICAL Parameter OPERATIONS Description MS One-dig{t number for storage mode of matrix A: 0 General. 1 2 Symmetric. Diagonal. Remarks: Matrix R must be a as matrix A. N equal to 2. Subroutines and general must matrix be and greater cannot than Function Subprograms of matrix be 1. in the same be greater M must location than or Required: LOC Method: RSRT sorts rows determines the column vector corresponding highest placed moves sorted B. The row of the corresponding RSUM sums form to be output matrix the values of element in placed in the rows of A to R in the RSRT the elements in B causes the first same R. row order as of R. A in to be B, RSRT in A. The Subroutine elements CALL to of B causes the corresponding row of row of R. If dupllcate values exist of each MACHK3.ext). Usage: A row sequence by 1lowest valued A valued element in the 1last 3.2.32 RSUM input row to form a column vector (Test: RSUM(A,R,N,M,6MS) Parameter Description A Name of input R Name of vector N Number of rows M Number of MS One-digit matrix. of length in A. columns in number for 0 General. 1 2 Symmetric. Diagonal. N. A. storage mode of matrix A: Remarks: Vector R cannot be in the general. Subroutines and Function same location Subprograms LOC 3-23 as Required: matrix A unless A is MATHEMATICAL OPERATIONS Method: RSUM sums elements output column 3.2.33 RTAB RTAB the of vector B. rows the the Rows row into a corresponding R. rows of specified vector Usage: each element of Subroutine tabulates vector across CALL B of the by data based original the (Test: on matrix the are floating-point key added number MACHK4.ext). contained into in a the new 1in the matrix in respective row RTAB(A,B,R,S,N,M,L,MS) Parameter Description A Name of input matrix. B Name of input vector R Name of output matrix initially set It is Name N Number of rows in A. M Number of columns in L Number of rows R. MS One-digit output number General. 1l 2 Symmetric. Diagonal. zero by length A for 0 N containing containing vector in length to S of of and summary key. of row data. RTAB L+l containing counts. R. storage mode of matrix A: Remarks: Matrix R must Subroutines be and a general Function matrix. Subprograms Required: LOC RADD Method: RTAB tabulates vector RTAB B. adds rows It the l 1s added S(L+1). of data truncates Ith row to §S(J). This procedure is of matrix the A to If repeated A based the key floating-point number in the R J for Jth 1is number than or of greater rows than of A not row not every completion, the output matrix R specified by vector B. Each element the on included L. 3-24 of element between element 1 and in contained B(I) by L, to 1in form element 1 is vector and added B. J. to Upon contains a summary of row data as in vector S contains a count of in R as a result of J being less MATHEMATICAL 3.2.34 RTIE RTIE Subroutine adjoins resultant Usage: OPERATIONS two matrices matrix CALL (Test: with the same column dimension to form one MACHK2.ext). RTIE(A,B,R,N,M,MSA,MSB,L) Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows in A. M Number of columns in MSA One-digit number for MSB 0 General. 1 Symmetric. 2 Diagonal. One-digit L input number General. 1 Symmetric. 2 Diagonal. of rows matrix. A, for 0 Number matrix. in B, R. storage mode of matrix A: storage mode of matrix B: B. Remarks: Matrix R must be a general matrix and cannot be in the as elther matrix A or matrix B. Matrix A must have the columns as matrix B. Subroutines and Function Subprograms same same 1location number of The resultant a resultant Required: LOC Method: RTIE attaches matrix 3.2.35 SADD matrix R contains SADD adds a N+L B to the rows and bottom M of matrix A. columns. Subroutine scalar matrix (Test: Usage: CALL to each element of MACHK4.ext). SADD(A,C,R,N,M,MS) 3-25 a matrix to form MATHEMATICAL OPERATIONS Parameter Description A Name C Scalar. R Name N Number of rows M Number of columns in matrix MS One-digit number for storage Subroutines and of input of matrix. output matrix. in matrix 0 General. 1l 2 Symmetric. Diagonal. Function Subprograms A and R. A and R. mode of matrix A and R: Required: LOC Method: SADD adds 3.2.36 SCLA a scalar SCLA sets to element of the matrix. Subroutine each element MACHK4.ext) . Usage: each CALL of a matrix equal to given Description A Name C Scalar. N Number of rows M Number of columns in matrix MS One-digit number for storage of 0 1 2 and input matrix. in matrix A. A. mode of matrix General. Symmetric. Diagonal. Function Subprograms Required: LOC Method: SCLA scalar SCLA(A,C,N,M,MS) Parameter Subroutines a replaces each element of matrix 3-26 A by a scalar C. A: (Test: MATHEMATICAL 3.2.37 OPERATIONS SCMA Subroutine SCMA multiplies another column Usage: CALL a column of the of same matrix by matrix a scalar (Test: and adds the product to COLROW.ext). SCMA(A,C,N,LA,LB) Parameter Description A Name C Scalar. N Number of rows in A. LA Column in A be multiplied LB Column in A of matrix. specified, to to which product by a product replaces scalar. 1is added. elements If. 0 1is in LA. Remarks: Matrix A must be a general matrix. Method: SCMA multiplies product to the unaffected by multiplication elements 3.2.38 in LA. each element of column LA by a scalar C and adds the corresponding element of column LA. Column LA remains the operation. If parameter LB contains zero, by the scalar 1is performed and the product replaces SDIV Subroutine SDIV divides each element of matrix (Test: MACHK4.ext). Usage: CALL a matrix by a scalar to form a resultant SD1IV(A,C,R,N,M,MS) Parameter Description A Name C Scalar. R Name N Number M Number of columns in matrix A and R. MS One-digit of of input output of rows matrix. matrix. in number matrix for 0 General. 1 Symmetric. 2 Diagonal. A and storage R. mode of matrix A and R: Remarks: If the scalar overflow is zero, SDIV divides only condition. 3-27 once to cause floating point MATHEMATICAL Subroutines and Function OPERATIONS Subprograms Required: LOC Method: SDIV divides 3.2.39 SMPY each of a matrix of a by a scalar. SMPY Subroutine multiplies resultant Usage: element each matrix CALL element (Test: matrix by MACHK3.ext). scalar to form a SMPY(A,C,R,N,M,6MS) Parameter Description A Name C Scalar. R Name N Number of rows M Number of columns in matrix MS One-digit number for storage Subroutines a and of input of matrix. output matrix. in matrix 0 General. 1 Symmetric. 2 Diagonal. Function Subprograms a by A and R. A and R. mode of matrix A: Required: LOC Method: SMPY multiplies 3.2.40 scalar each element of a matrix. SRMA Subroutine SRMA multiplies another row Usage: CALL of a row the of same matrix matrix by a scalar (Test: and adds COLROW.ext). SRMA(A,C,N,M,LA,LB) Parameter Description A Name C Scalar. N Number of rows in A. M Number of columns in LA Row A of in input to be matrix. A. multiplied 3-28 by a scalar. the product to MATHEMATICAL OPERATIONS Parameter Description LB Row in A to specified, which the the product product replaces 1is added. elements in If row 0 1is LA. Remarks: Matrix A must be a general matrix. Method: SRMA multiplies product to unaffected each the by 3.2.41 SSUB in SSUB the by row LA. Usage: the LA by element operation. a scalar matrix (Test: CALL row If scalar 1is a scalar of row parameter performed from each element Scalar. R Name N Number of rows M Number of columns in matrix MS One-digit number for storage and Usage: of input of remains contains zZero, product replaces a matrix to form a matrix. output matrix. in matrix 0 General. 1 2 Symmetric. Diagonal. Function a matrix resultant matrix CALL the LA Subprograms A and R. A and R. mode of matrix A and R: Required: Subroutine transposes form a Row the Description C TPRD LB. adds SSUB(A,C,R,N,M,MS) Name TPRD and of A 3.2.42 and LB MACHK4.ext). Parameter Subroutines C Subroutine subtracts resultant of corresponding multiplication elements element and postmultiplies (Test: MACHK2.ext). TPRD(A,B,R,N,M,MSA,MSB,L) 3-29 it by another matrix to MATHEMATICAL OPERATIONS Parameter Description A Name of first B Name of second input R Name of output matrix. N Number of rows M Number of MSA One-digit 0 1l 2 MSB in matrix. A and B. columns in A and number for number rows in R. storage mode of matrix A: storage mode of matrix B: for 0 General. 1 2 Symmetric. Diagonal. Number matrix. General. Symmetric. Diagonal. One-digit L input of columns the same in B and R. Remarks: Matrix R cannot be in location as either matrix A B. Subroutines and Function Subprograms or matrix Required: LOC Method: TPRD does not actually it takes the for multiplication calculate elements by in matrix matrix the A matrix transpose column-wise is as A XCPY B general symmetric general diagonal general general symmetric symmetric general symmetric general general symmetric diagonal diagonal general general general diagonal diagonal symmetric diagonal general diagonal copies Usage: CALL row-wise) combinations of R general XCPY than Instead, follows: general general 3.2.43 (rather A. B. The storage mode of the output matrix for all matrices of Subroutine a submatrix from a given matrix XCPY(A,R,L,K,NR,MR,NA,MA,6 MS) 3-30 (Test: MACHK2.ext). input MATHEMATICAL OPERATIONS Parameter Description A Name of input R Name of output L Row K Column of A NR Number of rows to be copied MR Number of columns to be NA Number of rows in A. MA Number of columns in MS One-digit number for of A matrix. matrix. where first where element first 0 General. 1 2 Symmetric. Diagonal. of element R can be of R can into copied found. be found. R. into R. A. storage mode of matrix A: Remarks: Matrix as R must matrix be a general matrix and cannot be in the same 1location A. Subroutines and Function Subprograms Required: LOC Method: XCPY forms matrix extracting at row 3.3 L, R by NR rows column K. copying and a portion MR columns of INTEGRATION AND DIFFERENTIATION The sections that follow describe of matrix matrix A, A. This starting is with done by element SUBROUTINES the integration and differentiation subroutines. 3.3.1 QATR Subroutine QATR uses Romberg's of given function a Usage: CALL extrapolation by method trapezoidal rule to approximate (Test: INTEG.ext). QATR(XL,XU,EPS,NDIM,FCT,Y,IER,6AUX) Parameter Description XL The lower bound of the interval. XU The upper bound of the interval. EPS The upper bound of the absolute 3-31 the error. integral MATHEMATICAL OPERATIONS Parameter Description NDIM The dimension NDIM-1 1is of the auxiliary maximal number external function the interval (XL,XU). FCT The name of Y The resulting IER Resultant 0 1 the approximation error code: It was possible No error. It is AUX An It was to rounding of impossible NDIM 1is 1less could not be should be auxiliary of bisections the than 5, reached AUX. of value. required accuracy. required accuracy <check accuracy or because required accuracy with the NDIM-1 steps. dimension NDIM. NDIM increased. storage array the used. integral reach the errors. to array subprogram the reach impossible because 2 to for storage with Remarks: Parameter FCT Subroutines You X must should requires and an Function external Subprograms supply the not destroyed. be statement. external Required: function subprogram FCT(X). 1Its argument Method: QATR evaluates return, value Y and y by trapezoidal contains vector the AUX, best the rule on possible wupward Romberg's approximation diagonal of principle. of the integral Romberg's scheme. Components AUX(I) (r=1,2,...,IEND, with IEND less than or NDIM) become approximations to integral value with decreasing by multiplication 1961. 3.3.2 QSF Usage: (XU-XL). Refer to values for of the vector function CALL of values QSF(H,Y,Z integral (Test: 1964 to accuracy and Bauser a given -equidistant QDINT.ext). NDIM) Parameter Description H The increment Y The input 2 The resulting of vector argument of vector The dimension of values. function of identical with Y. NDIM Filippi equal QSF Subroutine computes table with On vectors 3-32 values. integral Y and 2. values. Z may be MATHEMATICAL OPERATIONS NDIM than Remarks: No action 1is taken if is less 3. Method: Beginning Simpson's with Z(1)=0, evaluation of vector 2 rule together with Newton's 3/8 these rules. two Truncation fourth order method). of order H**4, Refer 3.3.3 RKGS RKGS solves with initial Usage: CALL error is Only in case to Hildebrand the done or a by means combination order H**S5 (that NDIM=3 truncation 1974 and Zurmuehl error 1963. is, of of of the Z(2) is Subroutine a system values of by first-order the ordinary differential Runge-Kutta method (Test: equations RKGSTT.ext). RKGS (PRMT,Y,DERY,NDIM,IHLF,FCT,OUTP,AUX) Parameter PRMT of is rule Description An input or and equal output to 5, vector that with dimension specifies the greater parameters than of the interval and of accuracy, and serves for communication between output subroutine (furnished by you) and subroutine RKGS. Except PRMT(5), the components are not destroyed by RKGS. These components PRMT (1) Lower bound of the interval (input). PRMT (2) Upper bound of the interval (input). PRMT (3) Initial PRMT (4) Upper increment error greater output PRMT (5) input you want PRMT(4), 1less may to Further its dimension subroutine RKGS to nonzero obtained by subroutine Y Input is at DERY is greater defined does not at of of components a of point halved. If manipulations initial error values X. 3-33 I1f of subroutine than are you feasible 5; and with however, change output equal that (destroyed). dependent weights must be derivatives your point, PRMT require gets any them. data in Later, Y OUTP. vector vector at vector is be wuseful for handing result program (calling RKGS) that are the resulting vector of intermediate points X. its error PRMT(5)=0. means of special vector Input by RKGS components they can the main to gets initializes subroutine Nevertheless, values (input). absolute increment RKGS terminate PRMT(5) If variable than PRMT(4)/50, increment change PRMT(4) by means of parameter. change OUTP. if 1is You independent (input). subroutine. No must the bound than increment doubled. of are: variables computed (destroyed). The sum of to DERY is the belong 1. to Later, function values Y MATHEMATICAL OPERATIONS Parameter Description NDIM IHLF An input in the An output value that specifies system. value that the specifies number the number of equations of bisections of the initial increment. If IHLF becomes greater than 10, subroutine RKGS returns with error message IHLF=11 into main program. Error message IHLF=12 or IHLF=13. appears in case PRMT (3) =0 or in SIGN(PRMT(3)).NE.SIGN(PRMT(2)—PRMT(1)), FCT The name of subroutine system must OUTP to be and Y. The name given of X external 1list must parameters PRMT(5),...) is right-hand and Y. Subroutine an be <changed An auxiliary storage DERY of the parameter should not 1list destroy X Its X,Y,DERY,IHLF,NDIM,PRMT. None if necessary, by nonzero, terminated. AUX This used. changed to side subroutine (except, should used. Its FCT output be respectively. subroutine the values X,Y,DERY. these PRMT (5) external computes parameter of an case array with PRMT(4), subroutine OUTP. 1If subroutine RKGS is eight rows and columns. NDIM Remarks: The procedure l. terminates More than necessary 2. for messages IHLF=12 The 4. Subroutine must whole and is or equal OUTP Function has the program (error to has 0 if: 1initial accuracy interval changed or is increment are message IHLF=11). wrong worked PRMT(5) Subprograms the calling sign (error IHLF=13). integration supply to of satisfactory increment 3. returns bisections Initial Subroutines You 10 and to through. nonzero. Required: external subroutines FCT(X,Y,DERY) and OUTP(X,Y,DERY, IHLF,NDIM,PRMT). Method: Evaluation is modification the due procedure RKGS by means to with halving are necessary error or message must output. adjusts doubling. to get to an of fourth Accuracy and the If into output Ralston the order is double more Wilf, comparing than during 10 the the whole bisections accuracy, main formula in results the of increment. RKGS of computation the returns increment with the program. subroutine and Runge-Kutta tested increment satisfactory IHLF=11 furnish Refer Gill. single automatically by You done eds. 3-34 to get 1960, full flexibility in MATHEMATICAL 3.3.4 RK1 to RK1l Subroutine integrates a a specified Usage: OPERATIONS CALL first-order final value differential (Test: equation dY/dX=FUN(X,Y) INTEG.ext). up RK1(FUN,HI,XI,YI,XF,YF,ANSX,ANSY,IER) Parameter Description FUN User-supplied that give function subprogram dY/d4x. HI The XI Initial value of X. YI Initial value of Y XF Final value of X. YF Final value of Y. ANSX Resultant final value of X. ANSY Resultant final value of Y. or will equal YF, error code: step arguments X,Y size. ANSY where YI=Y(XI). first. IER with Resultant 0O 1l No error. Step size is Either ANSX depending will on which HI IS equal is XF reached zero. Remarks: If XI set is to greater than XF, ANSX set to 1, Subroutines FUN 1s a is and the calling names of program the and and ANSY Subprograms function (dY/dX=FUN(X,Y)). Your XI, Function two-argument ANSX=XI must function have ANSY=YI. 1If is zero. set to FORTRAN subprograms IER 1is Required: subprogram. a zero, You external listed in must furnish statement the call to FUN containing RK1. Method: RK1 uses basis RK2 order (Hildebrand adjusted 3.3.5 fourth when RK2 Runge-Kutta 1974). either XF or integration Process YF is 1s process terminated reached. on and a recursive final value Subroutine inteqgrates Runge-Kutta a first-order and (Test: RK2INT.ext). Usage: CALL produces differential a table RK2(FUN,H,XI,YI,K,N,VEC) 3-35 equation of the dY/dX=FUN(X,Y) integrated by values MATHEMATICAL OPERATIONS Parameter Description FUN User-supplied function subprogram that give H Step size. XI Initial value of X. YI Initial value of Y K The interval N The number values to be VEC The resultant vector of length values Subroutines FUN is must a and have function a dY/dX. of you FORTRAN subprograms at of Y Function subprogram with where which are to must supply external listed in are to be stored. stored. N, in which computed calling program Required: for dY/dX. statement the values stored. Subprograms X,Y YI=Y(XI). computed be arguments call to Your containing the names of RK2. Method: RK2 uses fourth-order (Hildebrand 3.4 3.4.1 FORIF FORIF computes Series CALL a recursive the coefficients of the F(X)=A(0)+SUM(A(K)COS computed values desired number KX+B(K)SIN of a KX) given of terms the K=1,2,...,M function subprogram FORIF (FUN,N,M,A,B,IER) Description Name of function Defines over the the M The A Resultant B in where subprogram to be wused for data points. N basis SUBROUTINES Parameter FUN on Subroutine to approximate the (Test: FORR.ext). Usage: integration 1974). FOURIER ANALYSIS Fourier Runge-Kutta interval interval maximum vector length M+1. A suB Resultant order 0O, vector such that (0,2PI). of the The Fourier ASUB1l, ..., Fourier A to cosine SUB sine SuB O, BSuB1l, 3-36 ..., B SUB is be are thus taken 2PI/2N. fitted. coefficients of M coefficients M+1. B points spacing harmonics of of 2N+1 computing M of length MATHEMATICAL OPERATIONS Parameter Description IER Resultant error code: 0 No 1 N not greater 2 M less than than or Error. than or equal to M. 0. Remarks: M must equal be to greater M. The Subroutines FUN is points. the and containing element Function name The first of a <calling names of equal to in zero. vector Subprograms wuser N B is be zero greater in all than or cases. Required: function subprogram program must have function must subprograms a that computes FORTRAN external listed in a call data statement to FORIF. Method: FORIF 1960. to uses the The simplify recursive method the 3.4.2 FORIT FORIT computes of CALL indexing through the coefficients of a Ralston procedure specified approximate a given (Test: FORR.ext). and Wilf, has been of terms eds. modified set number of periodically in the tabulated FORIT(FOR,N,M,A,B,IER) Description FOR Vector N Defines over of the A Resultant A order of such than (0,2PI). harmonics vector of values to Fourier SUB SUB Resultant O, ASuB1l, vector O, of Fourier BSUB1l, error ..., ..., A length points spacing be SUB SUB is No 1 N not 2 M greater less than 0. 3-37 or thus taken 2PI/2N. of M coefficients M error. than are coefficients code: O 2N+1. fitted. cosine sine B of 2N+1 The M+1. Resultant B function interval interval Maximum length tabulated the M IER the in Subroutine Parameter B described computation. Fourier Series to values of a function Usage: technique equal to M. of length MATHEMATICAL OPERATIONS Remarks: M must be greater than to The first element M. or equal of to 0. vector B N is must be greater in all cases. in Ralston 0 than or equal Wilf, eds. Method: FORIT uses the recursive technique 1960. The method of indexing to simplify the computation. 3.5 SPECIAL SUBROUTINE 3.5.1 BESI BESI computes using series Usage: described through OPERATIONS the AND and procedure has been modified' FUNCTIONS Subroutine CALL the or I Bessel function asymptotic for a approximation given argument (Test: and order TABLE2.ext). BESI (X,N,BI,IER) Parameter Description X The argument N The orderof the BI The resultant IER Resultant 0 1l 2 3 4 of I error the I I Bessel Bessel Bessel function function desired. desired. function. code: No error. N is negative. X is negative. Underflow, BI.LT.1.E-38, Overflow, X.GT.60 where BI set to 0.0. X.GT.N. Remarks: N and X must be greater than or equal to zero. Method: BESI computes approximation 3.5.2 BESJ BESJ computes using Usage: the depending Bessel on function range of using series or asymptotic arguments. Subroutine the recurrence CALL I J Bessel relation function technique for a (Test: BESJ(X,N,BJ,D,IER) 3-38 given argument TABLE2.ext). and order MATHEMATICAL OPERATIONS Parameter Description X The argument of the N The order the J BJ The resultant D Required IER Resultant of J J Bessel Bessel Bessel function function desired. desired. function. accuracy. error code: 0 l No error. N is negative. 2 X 3 4 Required Range of is negative or zero. accuracy not N compared obtained. to X not Remarks). correct (see Remarks: The value less of N must be than: greater 20+10*X-X**x2 /3 90+ (X/2) for for than or equal X less than or X greater than to zero, equal 15 to but it must be Goldstein and 15 Method: BESJ uses Thaler, the and Stegun 3.5.3 BESK BESK computes using recurrence and relation technique Abramowitz described in 1957. Subroutine the K Bessel series (Test: TABLE2.ext). Usage: CALL function for approximations a given and argument recurrence and BESK (X,N,B IK ER , ) Parameter Description X The argument of the N The order the K BK The resultant IER Resultant of K error K Bessel Bessel Bessel function function desired. desired. function. code: 0O No 1 N is 2 X negative. is 3 zero X.GT.60, 4 BK.GT.10**3¢6, error. or negative. machine Remarks 3-39 range exceeded. order relations MATHEMATICAL OPERATIONS Method: BESK computes zero-order approximations and recurrence-relation described in BESY BESY computes first-order Bessel functions then computes and polynomial-approximation Hitchcock 3.5.4 and 1957 Nth and Watson order using function series wusing the technique, as 1958. Subroutine the Y Bessel using recurrence (Test: TABLE2.ext). Usage: CALL function for relations a given and argument polynomial and order approximations BESY (X,N,BY,IER) Parameter Description X The argument of the N The order the Y BY The resultant IER Resultant 0 of Y Y Bessel Bessel error l 2 X 3 BY negative has function function desired. desired. function. code: No error. N is negative. is Bessel or exceeded zero. magnitude of 10**36, Remarks: Very ALOG small values of X to be exceeded. than or equal to can cause X must be the range of the greater than zero. 1library function N must be greater zero. Method: BESY as uses recurrence-relation described 3.5.5 CEL1 in Hitchcock and 1957 polynomial-approximation and Watson 1958. Subroutine CEL]1l computes the complete elliptic integral Landens transformation (Test: TABLE3.ext). Usage: CALL technique of CEL1 (RES,AK,IER) Parameter Description RES Result AK Modulus IER Resultant 0 1 value. (input). No AK error code: error. not in range 3-40 -1 to +1. the first kind using MATHEMATICAL OPERATIONS Remarks: If ABS(AK) 1.E38. is greater For than modulus AK*AK+CK*CK=1.0 is or AK used. equal and AK to 1, CEL]1 sets complementary must be in the the modulus range -1 to result CK, to equation +1. Method: CEL]1l uses Landen's 3.5.6 CEL2 CELZ2 computes kind (Test: Usage: transformation for calculation (Bulirsch 1965). Subroutine the generalized complete TABLE3.ext). CALL elliptic integral of the second CEL2(RES,AK,A,B,IER) Parameter Description RES' Result value. AK Modulus A Constant B Factor IER Resultant (input). term of in numerator. quadratic error term in numerator. code: 0 No error. 1 AK not in range -1 to +1. Remarks: For ABS(AK).GE.1l -1.E38 if B is CEL2 sets negative. the result Special cases K(K) obtained E(K) with obtained A=1, B=l. with A=1, B=CK*CK modulus. B(K) obtained with D(K) A=1, B obtained with A=0, B Where K, E, elliptic B, and D integral argument K of define of these the special second functions is to 1.E38 cases the B is are: where kind if in CK of 1is the the the positive, complementary generalized usual to complete notation, and modulus. the Method: CEL2 uses 3.5.7 CS Landen's for calculation (Bulirsch 1965). Subroutine CS computes approximations Usage: transformation CALL the Fresnel (Test: integrals TABLEl.ext). CS(C,S,X) 3-41 using rational function MATHEMATICAL OPERATIONS Parameter Description C The resultant value C(X). S The resultant value S (X). X The argument of the absolute value Fresnel is integrals. If X 1is negative, three different used. Remarks: The argument value X remains unchanged. Method: Refer to Boersma 3.5.8 EXPI EXPI computes rational Usage: 1960. Subroutine the exponential approximations CALL integral (Test: -EI(-X) using TABLE3.ext). EXPI (X,RES,AUX) Parameter Description X Argument RES Result AUX Resultant of exponential integral. value. auxiliary value. Remarks: A value of X function. greater For X=0, than EXPI 87 can sets cause the overflow result to with -1.E37. the exponential Method: EXPI uses three rational approximations equal to X, X less than or or equal to -3 respectively. less than 3.5.9 GAMMA less than the ranges -9, and -9 polynomial 1 less than or less than X less than approximation in -3 1. GAMMA Subroutine computes recursion Usage: X equal to It uses in the relation CALL GAMMA and function for polynomial a given approximation argument (Test: GAMMA (XX,GX,IER) Parameter Description XX The argument GX The resultant for the Gamma Gamma function. function 3-42 value. using the TABLEl.ext). MATHEMATICAL OPERATIONS Parameter Description IER Resultant error 0O No 1 XX code: error. 1is within .000001 integer. 2 XX.GT.34.5, overflow, GX of being set to a negative 1.0E38. Method: Refer to 3.5.10 LEP Hastings LEP Subroutine computes argument Usage: 1955. the value CALL X values and of orders the 0 to Legendre N (Test: polynomials P(N,X) for TABLEl.ext). LEP(Y,X,N) Parameter Description Y Result vector Legendre of dimension polynomials argument X. X Argument of N Order Legendre of Legendre N+l of containing order 0 up the to N values for of given polynomial. polynomial. Remarks The evaluation for Legendre first Starting used by LEP is polynomials: P(N+1,X) The method = term on the recurrence equation Z*X*P(N,X)-P(N-I,X)—(X*P(N,X)—P(N—I,X))/(N+l ) in values P(0,X)=1, based brackets is the order. are: The second is the argument. P(1,X)=X 3.5.11 SICI SICI computes Subroutine the sine and SI(x)=integral (Sin(X)/X)-P1/2, (Test: TABLE3.ext). Usage: CALL cosine and Description SI The resultant value SI(X). CI The resultant value CI (X). X The argument of SI(X) 3-43 and where CI(x)=integral (Cos(X) /X) SICI(SI,CI,X) Parameter integrals CI(X). MATHEMATICAL OPERATIONS Remarks: The argument value remains unchanged. Method: Refer 3.6 The to Luke and Wimp LINEAR EQUATIONS section 3.6.1 that 1961. SUBROUTINE follows describes the linear equations subroutine. SIMQ Subroutine SIMQ solves a set (Test: SOLVEN.ext). Usage: CALL of simultaneous linear equations, AX=B SIMQ(A,B,N,KS) Parameter Description A Matrix of coefficients destroyed N B by of replaced Number than KS the in columns. computation. The size constants (length These of matrix are A is N. Vector N 1in stored original by of final solution equations and values, variables. N). vector N These are X. must be greater 1. Output digit: 0O for a normal solution. 1l for a singular set of equations. Remarks: Matrix A must be general. If the matrix 1is singular, the solution values are meaningless. You may obtain an alternative solution by using matrix inversion (MINV) and matrix product (GMPRD). Method: The method of divisor. Each when The necessary forward solution stage to avoid solution back solution substitutions. is for to the of by elimination, using the elimination consists of division by zero or obtain variable N other variables small is done 1largest pivotal interchanging rows elements. in N is calculated stages. by The successive Final solution values are developed in vector B, with wvariable 1 in B(l), wvariable 2 in B(2) , ..., and variable N in B(N). If no pivot can be found exceeding a tolerance of 0.0, the matrix 1is considered singular, and KS 1is set to 1. This tolerance can be modified by replacing the first statement. 3-44 MATHEMATICAL 3.7 The NONLINEAR EQUATIONS sections 3.7.1 RTMI RTMI Usage: SUBROUTINES follow describe the nonlinear equations subroutines. Subroutine solves Mueller's that OPERATIONS the general iteration CALL nonlinear method equation (Test: of the form FCT(X)=0 using NONLIN.ext). RTMI(X,F,FCT,XLI,XRI,EPS,IEND,IER) Parameter Description X Resultant root F Resultant function FCT Name XL1I Input value the XRI of root Input the EPS root result Maximum root function IER Resultant subprogram initial 1left bound of that specifies the initial right bound of that specifies the upper of error No 1 No used. the X. O X. that specifies number iteration steps bound of the error specified. code: error. convergence followed \ at X. value 2 value FCT(X)=0. X. IEND , equation external value Input of the of by IEND Basic assumption equal to zero is after IEND successive iteration steps FCT(XLI)*FCT(XRI) not of steps bisection. less than or satisfied. Remarks: Parameter assumes the FCT that same requires function sign. values XLI message IER=2, The of If and solution of successive starts at the a values this XRI, FORTRAN at basic RTMl external initial bounds assumption bypasses the the equation FCT(X)=0 is bisections and inverse initial bounds XLI and statement. XRI. is not procedure and XRI procedure do satisfied and gives not have by input the error by Mueller's iteration method parabolic interpolation, that Convergence the derivative of FCT(X) at root X is iteration step requires two evaluations Kristiansen 1963, 3-45 XLI The is not equal of FCT (X) . quadratic to zero. Refer if One to MATHEMATICAL 3.7.2 RTNI RTNI Subroutine solves Newton's Usage: OPERATIONS the general iteration CALL nonlinear method equation (Test: of the form FCN(X)=0 NONLIN.ext). by RTNI(X,F,DERF,FCT,XST,EPS,IEND,IER) Parameter Description X Resultant root F Resultant DERF Resultant FCT Name of root EPS function value root value derivative of list at subroutine function value must value be X, X. at root used. F, F, It and X. computes derivative value result IEND Maximum that specifies the that specifies the initial IER Resultant upper X. number of error iteration to given DERF. 1Its DERF. X. Input of F(X)=0. X, parameter Input equation external argument XST of gquess bound of steps specified. IEND iteration of the the error code: 0 No error. 1 No convergence 2 At any to zero. after iteration step derivative steps. DERF was equal Remarks: The parameter procedure 1is iteration step procedure initial guess must requires bypassed the would Subroutines You FCT supply and be of F(X) successful if Function the FORTRAN gives derivative XST. and a external the error is equal it Subprograms external statement. message IER=2 if at to 0. Possibly started once more with The any the another Required: subroutine FCT(X,F,DERF). Method: Solution Starts of at equation the F(X)=0 is by guess XST of initial Newton's a root X. iteration Convergence method, is that quadratic 1f the derivative of F(X) at root X 1is not equal to =zero. One iteration step requires one evaluation of F(X) and one evaluation of the derivative of F(X). Refer to Zurmuehl 1963. 3.7.3 RTWI RTWI Subroutine solves Wegstein's Usage: the general iteration CALL nonlinear method equation (Test: of the NONLIN.ext). RTWI(X,VAL,FCT,XST,EPS,IEN IE D, R) 3-46 form FCT(X)=X by MATHEMATICAL OPERATIONS Parameter Description X Resultant root VAL Resultant value FCT Name XST Input root EPS of equation of external value X=FCT(X). X=FCT(X) function at root X. subprogram that specifies the that specifies the used. initial gquess X. Input of of value result IEND Maximum IER Resultant upper bound X. number of error iteration of steps specified. IEND iteration of the the error code: 0 No error. 1 No convergence 2 At any after 1iteration iteration formula step was the equal steps. denominator to of zero. Remarks: The parameter procedure FCT and gives the denominator that there is occurs with must the an external error statement. message IER=2 of iteration formula is equal at 1least one point in the derivative Subroutines You requires and of Function supply the FCT(X)=1. Subprograms external if at RTWI bypasses the any ilteration step to =zero. That means range in which iteration Required: function subprogram FCT (X). Method: RTWI solves starts at the equation X=FCT(X) by the 1initial guess XST requires one evaluation 1960, Thacher 1960, and 3.8 ROOTS The section OF subroutine. 3.8.1 POLRT POLRT finds CALL root to iteration X. One Lance method, that iteration step 1960, Wegstein SUBROUTINE follows describes the roots of polynomials Subroutine real Newton-Raphson Usage: of of FCT(X). Refer Herriot 1960. POLYNOMIALS that Wegstein's and complex iterative roots technique of a (Test: real SMPRT.ext). POLRT (XCOF,COF,M,ROOTR, ROOTI, IER) 3-47 polynomial using the MATHEMATICAL OPERATIONS Parameter Description XCOF Vector from of Working M Order ROOTR Resultant ROOTI coefficients smallest COF the M+l to vector of of the polynomial power. length ordered M+1. polynomial. vector of length M polynomial. Resultant vector corresponding IER largest of Resultant of length imaginary error containing roots M of the real roots of containing the polynomial. code: 0 No l1 2 M M 3 Unable 4 5 starting High-order error. less than 1. greater than to 36. determine root values. coefficient with is 500 iterations on 0. Remarks: POLRT 1s limited overflow affect can the to occur, 36th but order is polynomial accommodated results. or by the less. Floating-point subroutine and does not errors in Method: POLRT the uses the reduced using the Newton-Raphson polynomial, original 3.9 POLYNOMIAL The sections PADD PADD adds Usage: OPERATIONS that rather follow polynomials final than the avoid iterations reduced on each root polynomial. describe the polynomial operations (Test: POLY2.ext). PADD(Z,IDIMZ,X,IDIMX,Y,IDIMY) Description Vector to of largest resultant coefficients, Dimension of X Vector coefficients from of Z smallest Dimension ordered from smallest polynomial, ordered power. IDIMZ IDIMX the To SUBROUTINES Parameter Z technique. Subroutine two CALL performs polynomial subroutines. 3.9.1 it iterative of (calculated). to X for largest (degree 3-48 is first power. IDIMX-1). MATHEMATICAL Parameter OPERATIONS Description Y Vector from IDIMY of coefficients smallest Dimension of to Y for largest (degree second polynomial, ordered power. is IDIMY-1). Remarks: Vector Z only 1f The can be in the same the dimension of resultant polynomial location Z is not can as either less than have trailing of resultant vector X the other zero or vector Y input vector. coefficients. Method: PADD of calculates the two the dimension 1nput vector coefficients to 3.9.2 Subroutine PADDM PADDM form multiplies a another polynomial Usage: CALL vector dimensions. Then, IDIMZ it as adds the larger corresponding 2. polynomial (Tests: by a constant POLYl.ext, and adds the result to POLY2.ext). PADDM(Z,IDIMZ,X,IDIMX,FACT,Y,IDIMY) Parameter Description Z Vector to of largest resultant coefficients, Dimension of X Vector coefficients from Z smallest to of X FACT Factor to be multiplied Y Vector of coefficients smallest Dimension of (degree to Y for largest Dimension IDIMY smallest polynomial, ordered (calculated). IDIMX from from power. IDIMZ of ordered power. is IDIMX-1). by wvector for second largest (degree first is Y. polynomial, ordered power. IDIMY-1). Remarks: PADDM of calculates the two in vector form Z. X the input to the dimension vector of resultant dimensions. coefficient Then, in vector 3-49 Y vector PADDM IDIMZ as adds the multiplied by the larger coefficient factor to MATHEMATICAL 3.9.3 PCLA PCLA replaces Usage: OPERATIONS Subroutine CALL one polynomial by another (Test: POLY2.ext). PCLA(Y,IDIMY,X,IDIMX) Parameter Description Y Vector to of resultant largest power. coefficients, IDIMY Dimension of X Vector coefficients of smallest IDIMX to Dimension ordered from smallest Y. largest of for polynomial, ordered power. from X, Method: PCLA replaces 3.9.4 PCLD PCLD performs IDIMY by IDIMX and moves vector X to Y. Subroutine complete (Test: POLY2.ext). Usage: CALL linear synthetic division (shift of origin) PCLD(X,IDIMX,U) Parameter Description X Vector of largest power. <coefficients, It is replaced coefficients. IDIMX Dimension U Shift of ordered by from vector smallest of to transformed X. parameter. Method: PCLD transforms coefficient Q(Z2)=P(Z-U) (where coefficient vector). 3.9.5 PDER Q(Z) vector X(I) denotes the finds the CALL derivative of a polynomial polynomial P(Z) with so that transformed (Test: POLYl.ext). PDER(Y,IDIMY,X,IDIMX) Parameter Description Vector of smallest IDIMY polynomial PDER Subroutine Usage: Y of Dimension coefficients to of largest Y for derivative, power. (equal 3-50 to IDIMX-1). ordered from MATHEMATICAL Parameter OPERATIONS Description X Vector from IDIMX of coefficients smallest Dimension of to for original largest power. the dimension polynomial, ordered X. Method: PDER sets the calculates the respective 3.9.6 dimension of Y at derivative by multiplying the exponents. of X-1. Then, coefficients by it their PDIV Subroutine PDIV divides one Usage: PDIV(P,IDIMP,X,IDIMX,Y,IDIMY,TOL, IER) CALL polynomial by another Parameter (Test: POLYl.ext). Description P Resultant vector IDIMP Dimension of X Vector coefficients from of of integral P. smallest to after IDIMX Dimension of Y Vector coefficients from Dimension of TOL Tolerance value for power. largest divisor power. It is ordered replaced by polynomial, ordered Y. below which normalization. Resultant polynomial, division. to IDIMY TIER dividend X. smallest during for 1largest remainder of part. error 0 No 1l Divisor coefficients are eliminated code: error. is 0. Remarks: The remainder dimension of bypasses R replaces Y X. exceeds calculation. Subroutines and Function The divisor Y dimension of X, Subprograms remains unchanged. PDIV sets IDIMP to If zero the and Required: PNORM Method: PDIV divides and one remainder polynomial remainder vector. R X so by polynomial that X=P*Y+R. 3-51 Y giving PDIV the integer normalizes part divisor Y P and MATHEMATICAL 3.9.7 PGCD Subroutine PGCD finds greatest common POLY2.ext). Usage: CALL OPERATIONS divisor of two polynomials (Test: polynomial, ordered polynomial, ordered PGCD (X,IDIMX,Y,IDIMY,WORK,EPS, IER) Parameter Description X Vector from of coefficients smallest to largest IDIMX Dimension of Y Vector coefficients from of Dimension WORK Working EPS Tolerance during IER to common IDIMY first power. X. smallest greatest for of for second largest power. This is divisor. array. value below which coefficient 1is normalization. 0 1 by Y. storage Resultant replaced error eliminated code: means no error. X or Y is zero polynomial. Remarks: IDIMX must program, be greater then constant. X IDIMX Subroutines and than and 1s Y IDIMY. are prime destroyed Function If IDIMY=1 and during the on return greatest to the common calling divisor is compilation. Subprograms Required: PDIV PNORM Method: PGCD by determines the and Euclidean greatest PILD PILD evaluates argument divisor common divisor Coefficient is generated of two vectors in X polynomials and Y are X and Y destroyed Y. Subroutine (Test: CALL greatest algorithm. common 3.9.8 Usage: the a polynomial and 1its first derivative POLY2.ext). PILD(POLY,DVAL,A X, RG ID UM IMX) , Parameter Description POLY Value DVAL Derivative. ARGUM Argument. of polynomial. 3-52 for a given MATHEMATICAL Parameter OPERATIONS Description X Vector of smallest IDIMX coefficients to Dimension Subroutines and largest of Function for polynomial, ordered power. from X. Subprograms Required: PQSD Method: PILD uses evaluate 3.9.9 the the PINT Usage: subroutine PQSD (quadratic polynomial. synthetic division) integral, ordered to Subroutine CALL PINT(Y,IDIMY,X,IDIMX) Parameter Description Y Vector of smallest coefficients to largest power. IDIMY Dimension of X Vector coefficients from IDIMX of Y smallest Dimension of (equal to for to IDIMX+1). for largest from original polynomial, power. ordered X. Method: PINT sets constant the the dimension term to coefficients 3.9.10 PMPY PMPY CALL zero. by their Y PINT at dimension of then X+1, calculates the integral respective two polynomials by the dividing POLYl.ext, POLY2.ext). PMPY(Z,IDIMZ,X,IDIMX,Y,IDIMY) Description Vector to of largest resultant power. coefficients, IDIMZ Dimension of X Vector coefficients from IDIMX sets exponents. (Tests: Parameter Z and Subroutine multiplies Usage: of of Z smallest Dimension of from smallest polynomial, ordered (calculated). to X ordered for largest (degree 3-53 is first power. IDIMX-1). MATHEMATICAL OPERATIONS Parameter Description Y Vector from IDIMY of coefficients smallest Dimension of to Y for largest (degree second polynomial, ordered power. is IDIMY-1). Remarks: Vector Z cannot be in the same location as either Y. vector X or vector Method: PMPY the and calculates the dimension coefficients of Z Y, whose exponents 3.9.11 PNORM PNORM of Z as IDIMX+IDIMY-1. as the sum of the products of coefficients equal the corresponding exponent of 2. coefficient vector of POLYl.ext). CALL calculates of X Subroutine normalizes Usage: PMPY a polynomial (Test: PNORM(X,IDIMX,EPS) Parameter Description X Vector to of original largest coefficients, power. IDIMX Dimension of EPS Tolerance below X. It It remains is which ordered from smallest unchanged. replaced by coefficient final is dimension. eliminated. Remarks: If all with coefficients IDIMX=0. The are less vector X than EPS, remains the result is zero polynomial intact. Method: PNORM reduces coefficient 3.9.12 PQSD the with PQSD performs dimension an of absolute vector value CALL by than or 1 for equal each to EPS. trailing Subroutine quadratic synthetic division POLY2.ext). Usage: less X of a polynomial PQSD(A,B,P,Q,X,IDIMX) Parameter Description A Coefficient B Constant P Coefficient Q Constant of term of term Z in Z in in remainder remainder in (calculated). quadratic quadratic 3-54 (calculated). polynomial. polynomial. (Test: MATHEMATICAL OPERATIONS Parameter Description X IDIMX Coefficient vector smallest largest to Dimension of for given polynomial, ordered power. from X. Method: PQSD divides remainder 3.9.13 PSUB polynomial the quadratic A*Z+B. PSUB CALL 2**2-P*72-Q, giving the linear Subroutine subtracts Usage: by one polynomial from another (Test: POLY2.ext). PSUB(Z,IDIMZ,X,IDIMX,Y,IDIMY) Parameter Description Z Vector to of resultant largest coefficients, power. IDIMZ Dimension of X Vector coefficients from of Z smallest Dimension of Y Vector coefficients from IDIMY smallest Dimension of (degree to Y for largest IDIMX of from smallest polynomial, ordered polynomial, ordered X Y (calculated). to X ordered power. is IDIMX-1). for second largest (degree first power. is IDIMY-1). Remarks: Vector 1f Z may the be in same dimension resultant polynomial of location X can is not have as either less than trailing vector the zero or other vector input only vector. The coefficients. Method: PSUB of calculates the vector 3.9.14 PVAL two Y input from PVAL POLYl.ext). CALL dimension vector of resultant dimensions. corresponding It coefficients vector then in IDIMZ subtracts vector as the larger coefficients in X. Subroutine evaluates Usage: the a polynomial for a given PVAL (RES,ARG,X,IDIMX) 3-55 value of the variable (Test: MATHEMATICAL OPERATIONS Parameter Description RES Resultant ARG Given value X Vector of largest power. IDIMX value Dimension of of polynomial. variable. <coefficients, of X. means of ordered from smallest to Method: Evaluation 3.9.15 PVSUB is PVSUB done by nested multiplication. Subroutine substitutes a (Test: POLY2.ext). Usage: CALL polynomial for the variable of another PVSUB(Z,IDIMZ,X,IDIMX,Y,IDIMY,WORK1l,WORK2) Parameter Description Z Vector of ordered from coefficients smallest Dimension of X Vector coefficients from of Dimension Y Vector of of largest largest to for largest polynomial, power. original polynomial, X. for the for the variable, polynomial ordered from power. IDIMY Dimension WORK1 Working storage array (same dimension as 2). WORK 2 Working storage array (same dimension as 2). and Function of ordered power. coefficients substituted resultant Z. smallest IDIMX for to IDIMZ Subroutines polynomial that smallest |is to Y. Subprograms Required: PMPY PADDM PCLA Method: PVSUB substitutes form polynomial polynomial Z . The (IDI *M (IX DIMY -1 1 )+) 1. PVSUB Y for the variable dimension requires 3-56 two of of the work polynomial new areas. X to polynomial is MATHEMATICAL 3.10 OPERATIONS REFERENCES Bauser. "Algorithm Boersma. 60," "Computation and Other Bulirsch, R. Aids of to Functions," Numerische Vol. Fresnel 4, Vol. Calculation Handbook Mathematik, Vol. Iss, 6 (1961), Integrals," Computation, "Numerical Elliptic Filippi. CACM, of 14, 7 No. 72 pp. Tables (1960), Integrals Special (1965), 255. Mathematical Elliptic Series p. p. 380. and Functions, 78-90. "Das Verfahrem von Romberg-Stiefel-Bauer als Spezialfall Allgemeinen Prinzips von Richardson," Mathematik- des Technik-Wirtschaft, Vol. 11, Iss. 2 (1964), pp. 49-54,. Golstein, H., and R.M. Thaler. "Recurrence Techniques for the Calculation of Bessel Functions," M.T.A.C., Vol. 13, pp. 102108. Hasting, C. Jr. "The Approximation," Herriot, J.G. F.B. McGraw-Hill, (1957), Kristians >en, e G.K. pp.205Lance, G.N. Iliffe, Luke, and Ralston, Stegun, on 86-88. of Methods Tables No. and 74 (1961), H.S. Wilf, Computers. and High Speed H.C. G.N. London: M. and New A CamBrlage for Analysis. New High Speed Bit » p. 603. York: Vol. Computers. Other Computation, pp. Aids to Integral 3 (1963), London: Transforms," 174-178. eds. York: Mathematical Sons, "Generation of Bessel Functions (1957), pp. Vol. Vol. the Theory of Zurmuehl, R. Praktische Mathematik CACM, Vol. fuer 3-57 3, 11 Iss. Bessel University Press, 2," for and CACM, "Algorithm Methods John Wiley M.T.A.C., J. 1963. 1955. (1960), to Wegstein, Springer, .11 Function," 15," on Iss Approximation Computers," Treatise 3, Computers. Approximations to Bessel Functions Two Related Functions," M.T.A.C., Abramowitz. "Algorithm Polynomial Digital Numerical Arbitrary "Polynomial I.A., Thatcher, Watson, "Zero 1960. 15, Digital pp. Numerical Wimp. A., to and Vol. . Mathematical Vol. "Polynomial and One and for CACM, I974. A.J.M. Order Zero 11 26," 1Introduction Hitchcock, Vol. Relation Approximation "“Algorithm Hildebrand, of Recursion Iss. (1960), 255-257. p. 475. Functions. 1958. 3, 8 1962. 8 (1960), Ingenieure und p. 74. Physiker. APPENDIX INSTALLING, This appendix Subroutines program However, Package to the to (SSP) calls the the appendix It does programming operating how provides not For appropriate RT-11 3. 4. All in the files 5. acted Subroutines under information information FORTRAN IV by Scientific a FORTRAN the about about compiler, creating the or IV RT-11 FORTRAN the RT-11 on these topics, documentation cited 1in refer this .OBJ object . SAV image files IV compiler, and resides on the The FORTRAN Object system Time the are this on the default appendix. are: files object background device, System, library has files files already been built SY:. OTS.SAV, SYSLIB.OBJ, has been which built resides and on the SY:. programs LINK.SAV, on which and library, wutility necessary in FORTRA.SAV, system system installed noted (executable) FORTRAN device, programs types source The the system file FORTRAN to that: otherwise . FOR reside create general require upon default All the to detailed FORTRAN appendix the been how IV You linker, 6. and RT-11 verify or unless The and information DK:, system UNDER additional device, added SSP REQUIREMENTS this use only include system. Instructions 2. install Scientific 1language, INSTALLATION 1. USING software appendix. A.1 AND system. programs. IV explains that operating VERIFYING, A and and the reside on PIP.SAV, RT-11 the system programs and system device, SY:. DUP.SAV, librarian, system files device, are the LIBR.SAV, RT-11 have SY:. installed and INSTALLING, A.2 INSTALLING THE VERIFYING, SCIENTIFIC AND USING SUBROUTINES Installing the Scientific Subroutines SSP distribution volumes and making SSP Copying Because all the Distribution storage media can UNDER RT-11 SOFTWARE software consists of copying any necessary corrections to software. A.2.1 SSP the the Volumes be adversely affected by environmental conditions, vandalism, and human error, you should keep several copies of any software that cannot be easily re-created. Copy the SSP distribution volumes and store them in a safe place. Use the distribution volumes only when copying the SSP software. Use only copies for all other procedures described in this appendix. The distribution volumes, has two each have. containing a file copy each volumes If procedures devices, with volumes, distribution you kit you in have the of varies them. The depending on three Section follow the SSP software has structure that RT-11 can read. or more A.2.1.1. procedure for how many mass mass If in procedure storage you Section have to your copying storage devices, only up 1If two A.2.1.2. the devices follow mass two kit the storage NOTE Instructions for copying one another wuse the SQUEEZE than the COPY command. command copies files; Section to A.2.1.1 SSP Copying of with distribution and Three protection restore or l. Load a distribution 2. Load a blank 3. Format the The the to rather SQUEEZE code of See how protection files. volumes following: command the COPY command does not. A.2.2 for information about remove code the volume More with Mass three Storage or more Devices storage - To copy devices, do the the volume. storage volume. blank storage volume if necessary. If you use RKO5 disks, format each disk. If you use RX02 drives, format each diskette to be either single density or double density. Other storage media cannot be formatted. Use the The following FORMAT command example to format formats an your RKOS .FORMAT RK1:(x1) RK1:/FORMAT-Are you sure?Y (rii) ?FORMAT-I-Formatting complete A-2 disks disk: and diskettes. INSTALLING, When you use formatted VERIFYING, AND the FORMAT command, be double density to to be single density, FORMAT command. The be single density: USING SSP UNDER diskettes by RT-11 on default. RX02 If drives are want them you use the /SINGLEDENSITY switch with the following example formats a diskette to . FORMAT/SINGLEDENSITY DY1:(xr) DY1l: /FORMAT-Are you sure?Y( i) ?FORMAT-I-Formatting 4. See the RT-11 the FORMAT System complete User's Guide for more information about command. 1Initialize the blank storage volume. If both your distribution and storage volumes are diskettes, the storage volume requires five directory segments in order to copy the SSP distribution volumes. Since the default number of directory segments on a diskette is four, use the /SEGMENTS switch with the INITIALIZE command to allocate five directory segments. In addition, use the /BADBLOCKS switch to search for and isolate bad blocks. Type: .INITIALIZE/BADBLOCKS/SEGMENTS:5 dvn: (ke dvn:/Initialize; Are you sure? Y (#1) ?DUP-I-No If you have storage bad any blocks other kind are not volumes number of directory with the /BADBLOCKS See the the 5. RT-11 blocks. Use the from Using SQUEEZE the the can if the your default the INITIALIZE command the /SEGMENTS switch. for more and what the system with the command use or /OUTPUT information does switch if to about it finds copy files distribution wvolume to the blank storage volume. SQUEEZE command with the /OUTPUT switch copies all from the input (distribution) volume to the beginning output (storage) volume and consolidates all empty space on See the output example volume copies the RT-11 System the SQUEEZE command mass Use omit you volume, Guide Copying with storage Only Two devices, you the from end of dvl: that to volume. dv2: Guide copyling Mass for information about files. Storage cannot more copy Devices each SSP - If you have distribution only volume directly since the RT-11 system volume occupies one of vyour storage devices. To copy the distribution volumes under circumstances, do the following: l. Load a 2. Format blank the storage blank RK0O5 disks, each diskette Other storage to mass these volume. storage format The dvl:xD) User's and at files . SQUEEZE/OUTPUT:dv2: two distribution diskettes, User's command dvn: files of the following A.2.1.2 of segments. switch and System INITIALIZE bad detected each volume disk. if 1If be either single media cannot be necessary. you use density formatted. RX02 or If you drives, double use format density. INSTALLING, Use The VERIFYING, AND USING the FORMAT command to format following example formats an . FORMAT RK1:(rr) RK1:/FORMAT-Are you SSP UNDER RT-11 your RKO05 disks disk: and diskettes. sure?y (xi) ?FORMAT-I-Formatting complete When you use the FORMAT command, diskettes on RX02 drives are formatted to be double density by default. If you want them to be single density, use the /SINGLEDENSITY switch with the FORMAT be command. single The following example formats a diskette to density: . FORMAT/SINGLEDENSITY DY1: DY1l:/FORMAT-Are you sure? Y (ri) ?FORMAT-I-Formatting complete See the the RT-11 System User's FORMAT command. Initialize the blank Guide storage for more information volume. If both about your distribution and storage volumes are diskettes, the storage volume requires five directory segments in order to copy the SSP distribution volume. Since the default number of directory segments on a diskette is four, use the /SEGMENTS switch with the INITIALIZE command to allocate five directory segments. In addition, use the /BADBLOCKS switch to search for and isolate bad blocks. Type: . INITIALIZE/BADBLOCKS/SEGMENTS:5 dvn:(rer) dvn:/Initialize; Are you sure? Y( i) ?DUP-I-No bad blocks detected dvn: If you have any other kind of distribution volume, or if your storage volumes are not diskettes, you can use the default number of directory segments. Use the INITIALIZE command with the /BADBLOCKS switch and omit the /SEGMENTS switch. See the RT-11 System User's Guide bad blocks. the INITIALIZE for more information command and what the system does if about it finds Use the SQUEEZE command with both the /WAIT and the /OUTPUT switches to copy files from the distribution volume to the blank storage volume. Using the /WAIT switch causes RT-11 to pause before copying files, allowing you to load a blank storage volume, if necessary, and to remove the RT-11 system volume from the system device. Then you can load an SSP distribution volume in the system device. RT-11 prompts you with messages telling you when to do each of these things. Answer Y to each message when you are ready to continue. The /OUTPUT switch causes RT-11 to copy files from the 1input (distribution) volume to the beginning of the output (storage) volume and consolidates all empty space on the output volume at the end of that volume. After RT-11 finishes copying the files, it prompts you with a message telling you to replace the system volume 1in the system device. The following example copies files from dvO: to dvl: . SQUEEZE/WAIT/OUTPUT:dvl: Mount output volume Mount input volume dv0:(xD) in dvl:; in dvO0:; A-4 Continue? vy (rii) Continue? Yy (rii) INSTALLING, VERIFYING, AND USING SSP UNDER RT-11 At this point RT-11 copies the files following message on your terminal: Mount See the system volume RT-11 System User's the SQUEEZE command A.2.2 File Remember in dv0:; and and then Continue? Y (rer) Guide copying for more types information the about files. Protection that all files in the SSP distribution volumes have Dbeen protected. Never remove this protection. However, after copying the distribution volumes, you may remove the protection of files from your copies, if you wish, by using the RENAME command with the /NOPROTECTION switch. /PROTECTION switch with To the protect an unprotected RENAME command. See the RT-11 System User's RENAME command. A.2.3 Making From time that for more information use the about the Corrections to time, you Guide file, the RT-11 Software Dispatch must make to the SSP software. instructions on how to make the publishes corrections The dispatch also publishes corrections. You only need to make corrections published in the dispatch for version 1.3 of the SSP software. Corrections that were published in the dispatch for previous versions of SSP have already been 1included in version 1.3. Never make corrections to your distribution volumes. Make corrections to your copies. After making any corrections, copy your software again. A.3 VERIFYING THE SCIENTIFIC SUBROUTINES SOFTWARE The SSP distribution volumes contain indirect-command files that you use to verify that you performed the installation procedure correctly, and that your software 1is in good working order. Section A.3.1 describes the indirect-command files. Section A.3.2 describes the procedure itself and tells you how to execute it. Section A.3.3 describes conditions that can cause errors. A.3.1 Each The Indirect-Command indirect-command l. 2. calls other files: A FORTRAN test program, which is file type .FOR. Data files, which data to SSP the file Files some of the subroutines. a source FORTRAN Data file programs files have and use the has as type the 1input .DAT. INSTALLING, When you run l. Directs an VERIFYING, indirect-command the FORTRAN program and FORTRAN program one Subroutines, Compiling where 2. n is because you assign to up Directs the require a test file sixteen output on is your performed 4. Before running to that receive much the contiguous contiguous your space you volume to Guide for User's enough use to Input-data on data the runs and the need. the the If SQUEEZE beginning information TMPSSP.n. file programs files are included you space command the about types some data calculations of file make sure assign on your you do to move you have receive storage device A-1 not all shows have the See SQUEEZE type). to Table volume. the the your subroutines. file, think of explains executable from TMPSSP.n. you A.3.?2 that test (regardless device files device Some and results contiguous output "temporary" The test program uses if it needs one. If program TMPSSP The TMPSSP.n file an run. files. temporary space, storage System have creates indirect-command TMPSSP output you test the a storage and data. called an called temporary sure files is file programs test TMPSSP.n a test Scientific called object by the files link This all files the the to terminal. Deletes no Make sound, of correctly. on IV Subroutines. (Section TMPSSP.n input FORTRAN files. in the distributed SSP software. input-data file automatically software work temporarily program of to ten. TMPSSP.n. a Scientific they RT-11 following: the than the the compile less linker 1links to object receive UNDER does more resides RT-11 if SSP or devices.) the 1linker called 3. to assign Instructs The it of testing number it compiler more one USING file, calls thus a IV or creates file how AND how enough files the on RT-11 command. NOTE If you squeeze system will moving the If do procedure Table A-1 @ lists The the system to the you so that before Additional (Additional ¢ files input-data file The of of amount output if are by the is contiguous files. after of the perform begin files that required one the the a test follows. Subroutines files to you tests. ® reboot beginning need indirect-command Scientific volume, automatically files volume. squeeze, a as well each the the following: indirect-command indirect-command FORTRAN required.) space as required test program for temporary file file. and the storage INSTALLING, VERIFYING, The AND USING Table A-1 Indirect-Command Files ANOVA .COM UNDER RT-11 Files Approximate Indirect Command SSP Test and Subroutines Contiguous Data Files Space Tested Used AVCAL.FOR ANO.V FO A R AVDAT.FOR ANOVA ,.DAT Required 92 Blocks 158 Blocks MEANQ. FOR COLROW.COM CINT.FOR RINT.FOR MCPY.FOR SCMA.FOR LDC.FOR SRMA. FOR COLROW. FOR MTRA.FOR DASCR.COM LOC.FOR DASCR.FOR SUBST.FOR DASCR.DAT TAB1.FOR EXPON.COM EXSMO. FGR EXPON. FOR EXPON.DAT FACTO.COM CORRE.FOR TRACE.FOR EIGEN.FOR FACTO.FOR VAR.M FO X R FACTO.DAT LOAD. FOR FORR.COM FORIF.FOR FORR.FOR FORIT.FOR INTEG.COM QATR.FOR INTEG. FOR RK1.FOR MACHK1.COM MACHK2.COM ARRAY.FOR GMTRA. FOR GMADD. FOR GTPRD.FOR GMPRD. FOR LOC.FOR GMSUB.FOR MADD. FOR CCUT.FOR MCPY.FOR CTIE.FOR RCUT.FOR DCLA.FOR RTIE.FOR DCPY.FOR TPRD.FOR LOC.FOR MACHK1.FOR MACHK2.FOR XCPY.FOR MATA.FOR MACHK3.COM MACHK4 .COM CCPY.FOR MSUB.FOR CSUM.FOR RSRT.FOR LOC.FOR RSUM. FOR MFUN. FOR SMPX.FOR CADD. FOR RADD. FOR CCPY.FOR RCPY. FOR CSRT.FOR RECP.FOR CTAB.FOR RTAB.FOR LOC.FOR SADD. FOR MFUN. FOR SCLA.FOR MPRD. FOR SDIV.FOR MSTR.FOR SSUB.FOR MAC 3. H FK OR MACHK4.FOR INSTALLING, VERIFYING, AND Table A-1 The USING Files MCANO.COM UNDER RT-11 (Cont.) Indirect-Command Files Approximate Indirect Command SSP Subroutines Tested Test and Data Files Used CANOR.FOR MCANO. FOR CORRE. FOR Contiguous Space Required 176 Blocks 108 Blocks NONLIN.FOR 78 Blocks 132 Blocks 89 Blocks MCANO.DAT EIGEN. FOR MINV.FOR NROOT.FOR MDISC.COM DISCR.FOR MDISC.FOR DMATX.FOR MDISC.DAT MINV.FOR NONLIN.COM RTM ., FI OR RTNI.FOR RTWI.FOR NONPAR.COM NPAR2.COM CHISQ.FOR SRANK.FOR GAUSS.FOR NONPAR. FOR TIE.FOR KRANK. FOR NONPAR.DAT TWOAV.FOR RA. N FO K R UTEST.FOR MOMEN. FOR NPAR2.FOR QTEST.FOR RAN . FK OR TIE.FOR WTEST.FOR POLRG.COM GDATA.FOR POLRG.FOR MINV. FOR POLRG.DAT MULTR.FOR 140 Blocks ORDER.FOR POLY1.COM PADDM.FOR PMPY.FOR PDER.FOR PNORM.FOR PDIV.FOR PVAL.FOR POLY1l.FOR 84 Blocks POLY2.FOR 118 Blocks QDINT.FOR 55 Blocks PINT.FOR POLY2.COM QDINT.COM PADD. FOR PILD.FOR PADDM. FOR PMPY.FOR PCLA.FOR PNO.R FO M R PCLD. FOR PQSD.FOR PDIV.FOR PSUB.FOR PGCD. FOR PVSUB.FOR QSF.FOR QDINT.DAT RKGSTT .COM RK. G FO S R RKGSTT. FOR 71 Blocks RKZ2INT.COM RK2.FOR RK2INT.FOR 48 Blocks 61 Blocks RK2INT.DAT *SMPRT.COM POLRT.FOR SMPRT. FOR SMPRT.DAT INSTALLING, VERIFYING, Table The AND A-1 USING SSP UNDER RT-11 (Cont.) Indirect-Command Files Approximate Indirect Command Subroutines Files Tested SOLVEN.COM Contiguous Space Required GMPRD. FOR SOLVEN. FOR 79 Blocks MINV.FOR SIMQ.FOR STAT .COM ABSNT.FOR TAB2.FOR BOUND. FOR TALLY.FOR GAUSS.FOR TTSTT.FOR STAT.FOR SUBMX.FOR TABLE1l.COM CS.FOR GAMMA.FOR LEP.FOR TABLE2.COM BESI.FOR BESJ.FOR BESK.FOR BESY.FOR TABLE3.COM CEL1.FOR CEL2.FOR EXPI.FOR SICI.FOR TIMSER.COM AUTO.FOR TIMSER. CROSS.FOR GAUSS.FOR SMO. FOR *When you run overflow 3.8.1). You A.3.2 the error message from However, POLRT.FOR can ignore The Verification SSP contains more use. To the the indirect-command use the error than the can 2. sure true for Perform that your a subroutine deal with you may POLRT.FOR (see the overflow get an Section error. Procedure 100 subroutines. indirect-command Make SMPRT.COM, message. following: 1. file the Verify files requirements for if you need to those verifying listed in (see Section system. squeeze only you plan to subroutines, do Section A.3.1). A.l1 are INSTALLING, 3. Assign @ VERIFYING, logical device USING names SSP UNDER RT-11 to: the device containing all the files you will input. Assign this device the logical name "input device." Type: « ASSIGN @ AND the device used for storage of the temporary output files TMPSSP.n created by the indirect-command file when it runs. Assign this device the 1logical name "TM" for "temporary . ASSIGN dvn: storage device." Type: TM:(rerD) 4. Consult table A-1l. Find the name of a subroutine you want test and the indirect command file that verifies it. 5. Run the for for (rer IN: dvn: use "IN" indirect-command file. to Type: - @IN:file (R where: @ 1is the symbol that indirect-command file 1is the want to This command runs the which in turn runs software is sound and instructions completion the and name you want to run an file. the indirect-command file you run. indirect-command file vyou specified, the FORTRAN test program. If your if you have performed all the above <correctly, types of indicates the FORTRAN some data on your test program terminal runs followed to by message STOP--file verification procedure where: file 1is the name of the successful indirect-command file you ran. A.3.3 Error Conditions If an indirect-command file finds an error, it stops running and types an error message on your terminal. However, this does not necessarily mean that your software is deficient or that it cannot be verified. An indirect-command file can stop running because some requirement has not been met even though your software is sound. Some typical conditions that can cause of the 1indirect-command files will message, check to see that you have conditions. @ error not not messages follow. If one run, and you get an error neglected one of these A necessary system program such as the FORTRAN IV compiler or a utility program such as the RT-11] linker or PIP or DUP is not on your system device. A-10 INSTALLING, VERIFYING, AND USING SSP UNDER RT-11 ®@ You assigned the input device device vyou assigned to be the the volume where the Scientific will use as input reside. 1incorrectly. input device Subroutines ®@ You assigned 1incorrectly. device enough ®@ the output device you assigned to contiguous storage be the space. output Your system device or your input write-protected when you ¢tried to That 1is, the does not contain files that you That device or run does 1is, the not have output device was an indirect-command file. It is impossible that are message, Section not to anticipate the fault all of conditions that software. If the first check to see that all A.l1 are true for your system. RT-11 System error and Message correct Manual to help can you <cause receive the requirements Then, if you need you determine the errors an error 1listed to, see cause of 1in the the it. Finally, if one of the indirect-command files will not run, even though you have not made any errors of the kind described above or neglected any of the requirements listed in Section A.l, you may have received a defective copy of your Contact DIGITAL for more information. A.4 STORING After THE SCIENTIFIC determining that the Scientific CREATING To create do the a A PROGRAM FORTRAN IV software. SUBROUTINES Scientific Subroutines sound, copy them to your system volume where you store your FORTRAN programs. A.5 Subroutines THAT CALLS program THE that or to the SCIENTIFIC calls the you want to use development are volume SUBROUTINES Scientific Subroutines, following: l. Write 2. Use and one of check your program. the RT-11 editors, program 1into /CREATE switch file. Type: a source file. invokes EDIT and . EDIT/CREATE where: For prog and the as The tells EDIT, to enter EDIT command with it to <create a vyour the new prog.FOR is information changes, RT-11 and such the name of about entering displaying RT-11 System your source program. the text of your file, making file, see the Introduction to the User's A-11 FORTRAN Guide. INSTALLING, VERIFYING, AND USING SSP UNDER RT-11 NOTE Always specify a file type when you use an RT-11 editor. RT-11 editors do not use default file types. In this case, give your source file the type .FOR since that 1is the default file type the FORTRAN IV compiler uses when it compiles your program. Use the FORTRAN program and IV of compiler the to create Scientific object Subroutines files you of wish vyour to use. Type: « FORTRAN prog,subl,sub2,.. .subn () where: prog 1is the name of your subl 1s the name of the you In the line. time, wish to subn 1s the name you wish to FORTRAN command, FORTRAN first source program. Scientific Subroutine Scientific Subroutine compile. of the last compile. you If you need to see the RT-11 System can specify compile more User's Guide up to six than six for more files per files at one information. NOTE When you compile some of the Scientific Subroutines, the RT-11 FORTRAN IV compiler ©prints a warning message. You can ignore this message. See Appendix C to find which subroutines cause the compiler to print a Frequently advance. Use the with warning used Then RT-11 the message. Scientific you only linker object files to Subroutines can be compiled need to compile your main program. link the object file of of your Scientific your Subroutines. 1in program Type: .LINK prog,subl,sub2,...subn (D where: To prog 1is the name of subl 1is the object name file of the first Scientific you want to link. Subroutines subn 1is the name object file of the last you want to Subroutines avoid linking can place Run the subroutines program. . RUN where: the individual your program. Scientific link. subroutines in a library. of your to your See program, Section A.6. Type: prog prog 1is the name A-12 executable program. you INSTALLING, For more information FORTRAN the A.6 USING VERIFYING, IV about programs, RT-11/RSTS/E AND SSP UNDER compiling, see FORTRAN USING the RT-11 IV User's RT-11 1linking, System and User's running Guide, and Guide. LIBRARIES Once you decide which of the Scientific Subroutines you will use most frequently, vyou can link them more easily to your programs by placing them in a library. When you place them in a library, you do not need to list each individual subroutine in the link command line. You only need to list the library name. When you place them in the system library, SYSLIB.OBJ, you do not even need to list the library name in the link command line. The RT-11 linker automatically searches the system library for a subroutine or function needed by a program. For example, compiled MYPROG, suppose your subroutines, you have to compiled program, ABSNT.OBJ, MYPROG.OBJ, BOUND.OBJ, calls and GAUSS.OBJ. To the 1link type: .LINK MYPROG,ABSNT,BOUND,GAUSS () If you place the subroutines 1in a MYLIB.OBJ, you link MYPROG by typing: 1library called, for example, ) IB (®1 .LINK MYPROG,MYL If you MYPROG The add the subroutines by typing: .LINK MYPROG RT-11 librarian to the system program LIBR.SAV lets library, SYSLIB.OBJ, you object add you link files or object file 1libraries to SYSLIB. When you do so, however, you must remove certain global symbols from SYSLIB's directory for the 1library to function properly. Remove the global symbol $OVRH each time you add files or libraries to SYSLIB. Also remove S$ERRS and SERRTB if you previously added the FORTRAN IV OTS library to SYSLIB. To add individual object files or a 1library to a system library containing the distributed SYSLIB.OBJ file and the FORTRAN IV OTS library, use the LIBRARY command with the /REMOVE switch. The LIBRARY command 1invokes LIBR.SAV. The /REMOVE switch allows you to remove a global symbol from a library object file residing on appropriate global symbols: directory. dvl: to The SYSLIB following on . LIBRARY/REMOVE dv0:SYSLIB dvl:file.OBJ(xt1) Global? $OVRH (D) Global? S$ERRTB () Global? (any other global previously from either library)(e) Global? S$ERRS(rer) Global? (kD) A-13 removed dv0 example and adds removes an the INSTALLING, where: file: VERIFYING, AND USING SSP UNDER RT-11 1is the name of the file or in the library. library you want to place If you fail to remove any of the necessary global symbols when you execute this command, you will get a warning message for each symbol you failed to remove. An example of the warning message 1is: ?LIBR-W-Illegal insert of SOVRH If you forget which global symbols to remove, create a file by typing a command such as the following: dummy library . LIBRARY/CREATE dummy SYSLIB(REr) where: dummy is the name of a dummy library file. Executing this command will produce error messages that list r te Af . ve mo re ld ou sh u yo s ol mb sy al glob global symbols, delete the dummy library file command for adding files to SYSLIB. all the noting the names of the correct the type and n ia ar br li 1 -1 RT e th d an d an mm co Y AR BR LI e th t ou For more information ab program, LIBR.SAV, see the RT-11 System User's Guide. A-14 APPENDIX INSTALLING, VERIFYING, AND USING B SSP UNDER RSX-11M/M-PLUS This appendix explains how to install and verify Subroutines Package (SSP) software and how to create a that calls the Scientific Subroutines under the operating systems. However, the programs. IV or appendix It FORTRAN does 77 provides not or on the these FORTRAN or FORTRAN B.1l IV, INSTALLATION Instructions 1. All in include programming compilers, information information information the FORTRAN 77 documentation cited files appendix acted SY: require upon under the default file .FTN FORTRAN .OBJ object files .OLB object library .TSK task-image extensions source which (executable) the Object system device, will use All 7. All Object the noted utility builder, Time System 77 compiler has device, SY:. (FOROTS) device, necessary that only the object system library. programs TKB, have DSC, FLX, been programs on the system device, tasks and MCR functions and or and files SY:. are installed. and are the in this already FORTRAN and added to the system time the installed SY:. system default are: Time System (F4POTS) has been built library SYSLIB.OLB which resides on SY:. Make sure is added to the system reside appendix. files FORTRAN 6. 77 files Either system FORTRAN files 4. task FORTRAN For additional RSX-11M/M-PLUS, system programs are on your UIC unless otherwise FORTRAN IV or the FORTRAN and resides on the system The this the or by Either the been built >. IV creating that: 3. 77 the in about about RSX-11M/M-PLUS operating systems. topics, refer to the appropriate this use detailed languages, appendix. You general REQUIREMENTS device, 2. only the Scientific FORTRAN program RSX-11M/M-PLUS system you RSX-11M/M-PLUS reside on installed the and INSTALLING, B.2 INSTALLING Installing SSP SSP the VERIFYING, THE SCIENTIFIC Scientific distribution AND USING SSP SUBROUTINES Subroutines volume UNDER and SOFTWARE software making any RSX-11M/M-PLUS consists necessary Copying Because all the Distribution storage media can volume and be adversely affected by SSP software Scientific FILES-11 is error, you should keep easily re-created. store distributed Subroutines format distribution which kits it in the procedures number @ If of @ in DOS-11 Mass storage distribution RKO06, RLOl, a safe mass If distribution follow Copying Storage a the - To read. type Use Load the of is a is a However, a distribution is a in the magnetic tape distribution volume are in cannot volume The User such and follow the and an you formatted B.2.1.3. Volume with or volume, drive in magnetic Three distribution the have instructions Section Allocate as three or more mass Section B.2.1.1. volume DOS-11 FILES-11 volume. the distribution volume. Subroutines is SSP. The [200,200]. Type: only of RSX-11M/M-PLUS FILES-11 Distribution copy Most RSX-11M/M-PLUS FILES-11 devices, volume Use the have: following: l. for format which instructions FILES-11 Devices can you volume storage B.2.1.2. your volumes volume. disk and you have the instructions in follow Section the several copies Copy the SSP ©place. RLO2 distribution two single the volume or If your on devices devices, tape, B.2.1.1 depending storage only @ mass your RK05, vary a RSX-11M/M-PLUS read. Copy on distribution are to environmental distribution volume only when copying the SSP software. copies for all other procedures described in this appendix. The the Volume conditions, vandalism, and human of any software that cannot be distribution copying corrections software. B.2.1 of More do and the mount volume label for the Identification Code Scientific (UIC) is Allocate Type: > ALL dvn:(xeD) > MOU dvn:SSp(rer) 2. 3. Load a > ALL dvn:(rer) If you blank use storage volume. RSX-11M-PLUS, foreign since volume. Type: it > MOU dvn:/FOR (&) has not mount yet the been the drive. blank storage initialized as a volume FILES-11 INSTALLING, 4. Format RKO5 VERIFYING, the blank disks, AND USING storage format each SSP volume disk. UNDER if If RSX-11M/M-PLUS necessary. you use If RX02 you drives, each diskette to be either 1low (single) or high density. Other storage media can not be formatted. Use the RSX utility The following FMT example to format formats an your disks RKO05 disk: DK2: ** and use format (double) diskettes. >FMT DK2:(*D ** WARNING - CONTINUE? [Y OR N] START DATA WILL BE LOST ON vy (x1) FORMATTING OPERATION COMPLETE > When you use FMT, diskeéttes on RX02 drives are formatted to be 1low (single) density by default. If you want them to be high (double) density, use the /DENS=HIGH option. The following example formats an RX02 diskette to be double density: >FMT DY1:/DENS=HIGH (&1 ** WARNING - CONTINUE? START DATA WILL BE LOST ON DYl: ** [Y OR N] vy (&) FORMATTING OPERATION COMPLETE > See the RSX-11 the Bad Utilities Manual for more information about FMT. Run Block Locator Utility (BAD) to blocks list at on the storage volume. The /LI your terminal the decimal number found. Type: > BAD If for switch causes of any bad bad BAD to blocks dvn:/LI BAD found. BAD search -- finds bad blocks, An example dvn: BAD LBN means of it the BLOCK types message FOUND - a message for each one is: LBN = Logical Block Number, number of the bad storage volume it block types found. When BAD finishes reading the a message telling how many bad blocks it nnnnnn 1is the decimal found: BAD -- dvn: TOTAL BAD BLOCKS= If BAD found none, it types blocks, INI and nnnnnn 1isolate command (see them step wusing 6). n 0. the If your /BAD=[AUTO] wvolume has option with bad the INSTALLING, If BAD VERIFYING, types Utilities to do 6. about AND USING SSP any other message, Manual to out find UNDER RSX-11M/M-PLUS see what Chapter the 9 of message the means RSX-11 and what it. Initialize the blank storage volume so it will be in FILES-11 format. Use the MCR command INI with the /BAD=[AUTO] option to isolate bad blocks on the volume. Type: >INI dvn:/BAD=[AUTO] (R INI -- NO BAD you use BLOCK DATA FOUND > If it Jjust RSX-11M-PLUS, displays 1its INI does prompt not to type the indicate above it message; found no bad blocks. See the RSX-11M/M-PLUS information about using 7. MCR Operations the MCR command Manual INI. for more If you use RSX-11M-PLUS, your storage volume. is still mounted foreign although it is now in FILES-11 format. Dismount it. Type: >DMOU dvn:(rr) 8. For both RSX-11M FILES-11 volume. and RSX-11M-PLUS, mount the wvolume as a Type: SMOU dvn: (re) 9. Use the RSX Disc Save and Compress Utility (DSC) to copy files from the distribution volume to the storage volume. The following example copies files from a distribution volume on drive 1 to a storage volume on drive 2: >DSC dv2:=dvl: > See the RSX-11 Utilities using DSC to copy files. B.2.1.2 Storage Copying Devices cannot copy To the RSX-11M/M-PLUS devices. copy the Manual for more 1information about a FILES-11 Distribution Volume with only Two Mass If you have only two mass storage devices, you SSP system distribution distribution volume volume volume occupies under one these directly of your since the use RSX mass circumstances, storage the utility program DSCS8. DSCS8 is a stand alone version of DSC. Once booted, DSCS8 no longer needs the system volume. You can unload the system volume thus freeing the system device. Then you can load the SSP distribution volume in the system device and begin copying files. The following procedure explains how to copy the distribution volume using DSCSS8. NOTE Since this procedure requires remove the system volume and B-4 you halt to the INSTALLING, l. Load VERIFYING, AND processor, make system when you a blank storage USING sure SSP that execute volume. UNDER no the RSX-11M/M-PLUS one else 1is using the procedure. Allocate the drive it 1is on. Type: >ALL dvn:CReD) 2. If you use foreign volume. RSX-11M-PLUS, since Type: it has mount not the blank storage yet been initialized volume if necessary. as a volume FILES-11 >MOU dvn:/FOR(rer) 3. Format the blank storage If vyou use RKO5 disks, format each disk. If you use RX02 drives, format each diskette to be either 1low (single) or high (double) density. Other storage media can not be formatted. Use the RSX utility FMT The following example to format your formats a RKO05 disks and diskettes. disk: > FMT DK1:(®er) ** WARNING - [Y OR N] CONTINUE? START DATA WILL BE LOST ON DKl: **%* Y(x1) FORMATTING OPERATION COMPLETE > When you use FMT, diskettes on RX02 drives are formatted to be 1low (single) density by default. If you want them to be high (double) density, wuse the /DENS=HIGH option. The following example formats an RX02 diskette to be double density: >FMT DY1l:/DENS=HIGH ** WARNING - DATA WILL BE LOST ON DYl: CONTINUE? START [Y OR N] ** Y(xr) FORMATTING OPERATION COMPLETE ? See the RSX-11 Utilities the Bad Block blocks on the list your Manual for more information about search bad BAD to blocks FMT. 4. Run at found. > BAD BAD Locator storage terminal Utility volume. the decimal Type: dvn:/LI -- NO BAD BLOCK DATA FOUND B-5 (BAD) The /LI number to switch of any for causes bad US PL MM/ 11 XRS R DE UN SSP NG USI AND , ING IFY VER G, LIN INSTAL If BAD finds bad blocks, it types An example of the message found. BAD -- dvn: BAD BLOCK a is: FOUND - LBN message for each one = nnnnnn l ma ci de e th is nn nn nn d an , er mb Nu k oc Bl l ca LBN means Logi e th g in ad re es sh ni fi D BA en Wh d. un fo k oc bl number of the bad d ba ny ma w ho g in ll te e ag ss me a s pe storage volume, it ty found: blocks it BAD -- dvn: TOTAL BAD BLOCKS= n bad has ume vol r you If 0. es typ it e, non nd If BAD fou e th th wi on ti op ] TO AU =[ AD /B e th g in us em th isolate blocks, INI command (see 5). step 11 XRS e th of 9 r te ap Ch e se e, ag ss me r he ot y If BAD types an at wh d an s an me e ag ss me e th at wh t ou nd fi to Utilities Manual to do about it. 1l SLE FI in be ll wi it so me lu vo e ag or st Initialize the blank format. to on ti op ] TO AU =[ AD /B e th th wi I IN Use the MCR command Type: isolate bad blocks on the volume. ] (rer) > INI dvn:/BAD=[AUTO INI -- NO BAD BLOCK DATA FOUND > If you use RSX-11M-PLUS, it just displays its INI does not type the above message; prompt to indicate it found no bad blocks. al nu Ma ns io at er Op R MC US PL MM/ 11 XRS e th See I. IN d an mm co R MC e th g in us t ou ab n io at rm info Boot DSCS8. The UIC is [1,51]. for more Type: > BOOT [1,51]Dscs8(xr) 2 3. V Y IT IL UT SS RE MP CO D AN VE SA SC DI RSX11S V2.2 BL26 DSCS8 displays its prompt. It is now booted and ready for input. DSCS8> of py co a ad lo d an me lu vo em st sy US PL MM/ 11 XRS Remove the w No . ce vi de em st sy e th in me lu the SSP distribution vo e pl am ex g in ow ll fo e Th s. le fi g in py co n gi be instruct DSCS8 to a to 0 e iv dr on , me lu vo on ti bu ri st di from a files copies storage volume on drive 1l: DSCS8> dvl:=dv0: () Copying now begins. When it completes, DSCS8 displays its prompt. DSCS8> ume vol on ti bu ri st di SSP the ove Rem . sor ces pro the t hal w No t Boo . ume vol tem sys the e lac rep and ice dev tem sys the from RSX-11M or RSX-11M-PLUS. B-6 INSTALLING, VERIFYING, AND USING SSP UNDER RSX-11M/M-PLUS See the RSX-11 Utilities Manual for more information about using DSCS8 to copy files if you have only two mass storage devices. Information about DSCSS8 (sometimes called "stand-alone DSC") is in the chapter on DSC. B.2.1.3 Copying a DOS-11 distribution magnetic l1. Distribution tape, do the Load the the distribution volume. is distribution [200,200]. Volume - To copy a DOS-11 and mount following: volume. Allocate The User the drive Identification Code (UIC) Type: > ALL dvn: (rer) 2. > MOU dvn: (rer) Load a blank storage volume. Allocate the drive it 1is on. Type: > ALL 3. dvn:(rer) If you use RSX-11M-PLUS, mount the blank storage volume foreign since it has not yet been initialized as a FILES-11 volume. Type: > MOU dvn: /FOR (rer) 4., Format the blank storage volume if necessary. RKO5 disks, format each disk. If you use RK02 If you use drives, format each diskette to be either 1low (single) or high density. Other storage media can not be formatted. Use The the RSX utility FMT to format your disks following example formats an RKO05 disk: > FMT diskettes. DK1:(rer) ** WARNING - CONTINUE? [Y START and (double) DATA WILL or N] BE LOST ON DKl: ** v (i) FORMATTING OPERATION COMPLETE > When you use FMT, diskettes on RX02 drives are formatted to be 1low (single) density by default. If you want them to be high (double) density, use the /DENS=HIGH option. The following example formats an RX02 diskette to be double density: > FMT DY1l:/DENS=HIGH ** WARNING - CONTINUE? [Y OR N] START DATA WILL BE LOST vy (i) FORMATTING OPERATION COMPLETE > B-7 ON DYl: ** INSTALLING, See VERIFYING, AND USING SSP UNDER RSX-11M/M-PLUS the RSX-11 Utilities Manual for more information about FMT. Run the Bad Block Locator Utility (BAD) to search for Dbad to BAD ses cau tch swi /LI The . ume vol e rag sto the on blocks cks blo bad any of ber num l ima dec the al min ter r you at t lis Type: found. >BAD dvn:/LI(reD) BAD -- NO BAD BLOCK DATA FOUND If BAD finds bad blocks, it types found. An example of the message BAD -- dvn: FOUND BAD BLOCK - LBN a 1is: = message for each one nnnnnn l ima dec the is nnn nnn and , ber Num ck Blo l ica Log ns mea LBN the g din rea es ish fin BAD n Whe nd. fou ck blo bad the of ber num bad how many telling message a storage volume, it types found: blocks it BAD dvn: -- TOTAL BAD BLOCKS= If BAD found none, it types using them 1isolate blocks, INI command (see step n O. If your volume has Dbad the /BAD=[AUTO] option with the 6). -11 RSX the of 9 r pte Cha see e, sag mes er oth any es If BAD typ t wha and ns mea e sag mes the t wha out d fin to ual Man ies lit Uti to do about 1it. 11 ESFIL in be l wil it so ume vol e rag sto nk bla the e liz Initia ion opt O] AUT D=[ /BA the h wit INI d man com MCR the Use . mat for to isolate bad blocks on the volume. Type: >INI dvn:/BAD=[AUTO] INI -- NO BAD BLOCK DATA FOUND > If you use RSX-11M-PLUS, its displays just it INI does not type the above message; indicate it found no bad to prompt blocks. See the RSX-11M/M-PLUS information about using MCR Operations the MCR command Manual for more INI. d nte mou ll sti is ume vol e rag sto r you , LUS M-P -11 RSX use you If it. nt mou Dis . mat for 11 ESFIL in now is it gh hou alt foreign Type: >DMOU dvn:(xD) For both RSX-11M and RSX-11M-PLUS, FILES-11 volume. mount the a wvolume as Use the MCR Type: >MOU dvn:(rer) Create a UIC of [200,200] on the storage volume. command UFD (User File Directory). Type: >UFD dvn: [200,200]Cre) INSTALLING, 10. Use VERIFYING, the RSX AND wutility USING FLX SSP to UNDER copy files distribution tape to your FILES-11 switch identifies the storage volume and the /DO switch identifies the DOS-11 volume. The wildcard RSX-11M/M-PLUS from the storage volume. The /RS as a FILES-11 volume, distribution volume as a construction, RSX-11M/M-PLUS that you wish to copy of all files. (You cannot specify DOS-11 formatted volume.) DOS-11 the most version %, tells recent version numbers on a The following example copies files from a DOS-11 distribution volume on drive 0 to a FILES-11 storage volume on drive 1: >FLX dvl:[200,200]/RS=dv0:[200,200]*.*/DO(::D > See the RSX-11 Utilities Manual for more information about FLX. B.2.2 From Making time Corrections to time, the RSX-11M/S-RSX-11M-PLUS publishes corrections you must make to the also publishes instructions on how to make You only need to version 1.3 of the dispatch for in version 1.3. Never make to your again. B.3 The make the SSP software. previous versions corrections copies. to your After VERIFYING THE SSP <corrections SCIENTIFIC distribution volume Dispatch SSP software. The dispatch the corrections. published in the dispatch for Corrections that were published in of SSP have already been included distribution making Software any corrections, SUBROUTINES contains volume. Make <corrections copy your software SOFTWARE indirect-command files that you use to verify that you performed the installation procedure correctly, and that your software 1is 1in good working order. Section B.3.1 describes the indirect-command files. Section B.3.2 describes the procedure itself and tells you how to execute it. Section B.3.3 describes conditions that can cause errors. B.3.1 Each The Indirect-Command indirect-command l. 2. A file calls other files: program, which is FORTRAN test extension .FTN. Data files which data to the SSP Files some of the subroutines. B—9 a source FORTRAN Data file programs files have and use the has as type the input .DAT. INSTALLING, When you run 1. Directs an VERIFYING, AND USING indirect-command SSP UNDER it does file, the FORTRAN IV or FORTRAN FORTRAN test program and one Subroutines. The FORTRAN program Scientific Compiling Subroutines, creates one thus or 77 the following: compiler or calls if object to compile a of the Scientific to sixteen of the more testing more RSX-11M/M-PLUS up they work files correctly. called TMPSSP.n where n is a number less than ten. TMPSSP.n is a "temporary" file because it resides temporarily on a storage device that you assign to receive output files. (Section B.3.2 explains how to assign devices.) 2. Instructs file a The task-image your performed 4. to task-builder (executable) This by programs the all Before running files lists The the test files called temporary B-1 terminal. Deletes no @ task-builder generate generates file called the the object file and TMPSSP.n. Directs the test program TMPSSP.n to run. Some test programs require a file of input data. Input-data files are included in the distributed SSP software. The test program uses the input-data file automatically if it needs one. If your software is sound, the test program runs and types some data on Table RSX-11M TMPSSP.n. creates 3. the called TMPSSP results and the Subroutines ¢ The amount output of subroutines. of file file, make sure you assign to files that as well each type). you h§ve receive required by the are the FORTRAN one is required.) storage space required files. B-10 as the following: indirect-command tests. Additional files (Additional files input-data file if calculations files. indirect-command @ from (regardless an indirect-command TMPSSP on the device output Scientific data file indirect-command file. test program and the for temporary storage of INSTALLING, VERIFYING, The AND USING SSP UNDER RSX-11M/M-PLUS Table B-1 Indirect-Command Files Approximate Indirect Command Files ANOVA .CMD Subroutines Test Data Tested Used Required AVCAL.FTN ANOVA.FTN 114 AVDAT.FTN ANOVA .DAT and Files MEANQ.FTN COLROW.CMD CINT.FTN MCPY.FTN LOC.FTN RINT.FTN COLROW.FTN SCMA.FTN SRMA.FTN MTRA.FTN DASCR.CMD LOC.FTN DASCR.FTN SUBST.FTN DASCR.DAT TABl1.FTN EXPON.CMD EXSMO.FTN EXPON. FTN EXPON.DAT FACTO.CMD CORRE.FTN TRACE.FTN FACTO.FTN EIGEN.FTN VARMX.FTN FACTO.DAT LOAD.FTN FORR.CMD FORIF.FTN FORR.FTN FORIT.FTN INTEG.CMD QATR.FTN INTEG.FTN RK1.FTN MACHK1.CMD ARRAY.FTN GMTRA.FTN GMADD. FTN GTPRD.FTN GMPRD. FTN LOC.FTN MACHK1.FTN MADD. FTN GMSUB.FTN MACHK2.CMD CCUT.FTN MCPY.FTN CTIE.FTN RCUT.FTN DCLA.FTN RTIE.FTN DCPY.FTN TPRD.FTN LOC.FTN XCPY.FTN MACHK2.FTN MATA.FTN MACHK3.CMD CCPY.FTN MSUB.FTN CSUM.FTN RSRT.FTN LOC.FTN RSUM.FTN MFUN.FTN SMPX.FTN B-11 MACHK3.FTN Storage Space Blocks INSTALLING, VERIFYING, AND Table The USING B-1 SSP Files MACHK4.CMD RSX-11M/M-PLUS (Cont.) Indirect-Command Indirect Command UNDER Subroutines Tested CADD.FTN CCPY.FTN CSRT.FTN Files Approximate Test and Data Files Required MACHK4.FTN 156 LOC.FTN MFUN.FTN MPRD. FTN MSTR.FTN CANOR.FTN MCANO.FTN CORRE.FTN EIGEN.FTN MCANO.DAT MINV.FTN NROOT.FTN MDISC.CMD DISCR.FTN MDISC.FTN DMATX.FTN MDISC.DAT MINV.FTN NONLIN.CMD RTMI.FTN NONLIN.FTN RTNI.FTN RTWI.FTN NONPAR.CMD CHISQ.FTN GAUSS.FTN SRANK.FTN NONPAR. FTN TIE.FTN FRANK.FTN NONPAR.DAT TWOAV.FTN UTEST.FTN RANK.FTN NPAR2.CMD MOMEN.FTN QTEST.FTN NPAR2.FTN RANK.FTN TIE.FTN WTEST.FTN POLRG.CMD GDATA.FTN POLRG.FTN MINV.FTN POLRG.DAT MULTR.FTN ORDER.FTN POLY1.CMD PADDM.FTN PMPY.FTN PDIV.FTN PNORM.FTN PVAL.FTN PDER.FTN POLY1.FTN PINT.FTN POLY2.CMD PADD.FTN PILD.FTN PADDM.FTN PMPY.FTN PCLA.FTN PNORM.FTN PCLD.FTN QDINT.CMD POLY2.FTN PQSD.FTN PDIV.FTN PSUB.FTN PGCD.FTN PVSUB.FTN QSF.FTN QDINT.FTN QDINT.DAT B-12 Space Used CTAB.FTN MCANO.CMD Storage Blocks INSTALLING, VERIFYING, The AND USING SSP UNDER RSX-11M/M-PLUS Table B-1 (Cont.) Indirect-Command Files Indirect Test and Approximate Storage Files Space Command Subroutines Data Files Tested Used RKGSTT.CMD RKGS . FTN RK2INT.CMD RK2.FTN | Required RKGSTT.FTN RK2INT.FTN RK2INT.DAT *SMPRT.CMD POLRT.FTN SMPRT.FTN SMPRT .DAT SOLVEN.CMD GMPRD.FTN SOLVEN. FTN MINV.FTN SIMQ.FTN STAT .CMD ABSNT.FTN TAB2.FTN BOUND. FTN TALLY.FTN GAUSS.FTN TTSTT.FTN STAT.FTN SUBMX.FTN TABLE1.CMD CS.FTN GAMMA .FTN TABLE1l.FTN LEP.FTN TABLE2.CMD BESI.FTN TABLE2.FTN BESJ.FTN BESK.FTN BESY.FTN TABLE3.CMD CEL1.FTN TABLE3.FTN CEL2.FTN EXPI.FTN SICI.FTN TIMSER.CMD AUTO.FTN TIMSER.FTN CROSS.FTN GAUSS.FTN SMO.FTN *When you run any of the SMPRT indirect-command files, you may get an overflow error message from the subroutine POLRT.FTN (See Section 3.8.1). However, POLRT.FTN can deal with the overflow error. You can ignore the error message. B-13 INSTALLING, VERIFYING, B.3.2 AND USING SSP UNDER RSX-11M/M-PLUS The Verification Procedure SSP contains more than 100 subroutines. Verify only those you plan to To use the indirect command files for verifying subroutines, do use. the following: 1. Make sure true 2. for Assign that the requirements your system. logical device @ names 1in Section B.l >ASN for for Type: dvn:=IN: (D) the device used TMPSSP.n files are to: the device containing all the files you will use N" "I me na l ca gi lo e th ce vi de is th gn si As input. "input device." @ listed for storage of the temporary output created by the indirect-command file name 1logical the Assign this device when it runs. "TM" for "temporary storage device." Type: >ASN dvn:=TM:(rer) to nt wa u yo ne ti ou br su a of me na e th nd Fi Consult Table B-1. . it es fi ri ve at th le fi d an mm co ct re di in e th d an test appears, After file. Run the indirect-command the monitor prompt type: @IN:([200,200]file Crer) @ where: [200,200] file 1is the symbol that indirect-command indicates you want to run an file. 1is the UIC for the Scientific Subroutines. is the name of the want to indirect-command file you run. d, ie if ec sp u yo le fi nd ma om -c ct re di in e th ns ru d This comman an th re mo If m. ra og pr st te N RA RT FO e th runs turn in which ks as le fi d an mm co e th d, le al st in is er il mp co N one FORTRA s it th wi e on e th y if ec sp st mu u Yo e. us which one you want to e fil d man com the IV, N TRA FOR ng usi are you If . LIB SYS in OTS 1If you are system has a floating point unit. your if asks ays alw you ce sin ed ask not is on ti es qu the 77, N TRA FOR ng usi have a floating-point unit. the all d me or rf pe e hav you if and nd, sou is re twa sof If your ¢to ns ru m ra og pr st te e th y, tl ec rr co ns io ct ru inst above by ed ow ll fo al in rm te ur yo on ta da me so s pe ty d an completion the message ul sf es cc su e ur ed oc pr on ti ca fi ri ve le fi -STOP where: file 1is the name of the ran. B-14 indirect-command file you INSTALLING, B.3.3 Error If an an error mean An VERIFYING, message your on been Some of met software even typical the file your indirect-command not is file check to see stop your that A necessary FOR.TSK, program ® not on You assigned your you system impossible that are not message, first Section B.l1 appropriate of the neglected as the and F77.TSK, by noting incorrectly. the input error Finally, if though you one of have neglected any received a of STORING for THE determining sound, volume where library (see that device copy you vyou Section a these utility or PIP of DSC, contains That does is device run an conditions that to it. the contain that you 1is, the not have device was does to Then, not That output software. all the 1is, files or system. name copy indirect-command can cause errors If you receive an error requirements 1listed in if you need to, see the help You you determine the find the appropriate the task which FLX, or FORTRAN. information gave about of listed your in Section Scientific you the error Then look in the that task to see the to your B.6). B.1, you Subroutines information. SCIENTIFIC them error indirect-command files will not run, even made any of the errors described above or more that input tried all requirements store output means. defective DIGITAL your correct MCR, the not the the documentation the example, one compiler, or TKB.TSK, an of 1IV has If get one FORTRAN task-builder, be or your and message are not device to when for error for the output RSX-11M/M-PLUS what After you compiler, be fault of the to see that manual B.4 run, space. true requirement not device to anticipate RSX-11M/M-PLUS Contact input device the check are documentation message, to verified. device. assigned storage be follow. incorrectly. the types necessarily messages You assigned and sound. Subroutines Your cause some have assigned write-protected file. is because you RSX-11lM not cannot will 77, does it files such running the volume where the Scientific will use as input reside. enough It is stops this that error the the or running program system it However, software FORTRAN as you device ® the error, cause that system such device ® UNDER RSX-11M/M-PLUS can conditions. ® an deficient can though conditions finds terminal. indirect-command message, SSP Conditions indirect-command that AND USING may have software. SUBROUTINES Scientific your FORTRAN Subroutines system volume programs, that or or to you want the development place them to 1in use a INSTALLING, B.5 CREATING A VERIFYING, PROGRAM AND USING SSP UNDER RSX-11M/M-PLUS THAT To create a FORTRAN program the following: l. Write 2. Use and one your check of the program CALLS that your THE SCIENTIFIC calls the a Scientific Subroutines, do program. RSX-11M/M-PLUS into SUBROUTINES source editors, file. such as EDI, to enter Type: >EDI prog.FTN (&) where: For prog 1is information changes, Manual and and the the name about of your entering displaying FORTRAN the text of the file, RSX-11M/M-PLUS Guide source program. your file, making see the RSX-11 Utilities to Program Development. NOTE Always specify a file extension when you use an editor. RSX-11M/M-PLUS editors do not use default file extensions. In this case, give your source file the extension .FTN since that 1is the default extension the FORTRAN IV or FORTRAN 77 compiler wuses when it compiles your program. 3. Use the FORTRAN IV or FORTRAN 77 compiler to <create object files of vyour program and of the Scientific Subroutines you wish If If to use. you are using the FORTRAN >FOR prog=prog (rer) >FOR sub=sub you are using the FORTRAN IV compiler, type: 77 type: compiler, >F17 prog=prog<§§) >F77 sub=sub (&) where: prog 1is the sub 1is the name of wish to name of your the FORTRAN source program. Scientific Subroutine you compile. Since you can specify only one input file each time you use the FORTRAN IV or FORTRAN 77 compilers under RSX-11M/M-PLUS, you must compile the subroutines one at a time. Frequently used Scientific Subroutines can be compiled advance. Then you only need to compile the main program. B-16 1in INSTALLING, VERIFYING, 4. RSX-11M/M-PLUS task-builder to task-build the object your program with the object files of your Scientific Use the file of Subroutines. the floating FORTRAN IV AND The /FP point and your USING switch wunit. system SSP UNDER tells Use has a RSX-11M/M-PLUS the the task-builder /FP switch if floating use the /FP switch if you use FORTRAN always has a floating-point unit. Type: point 77 to you unit. since use use Always your system >TKB prog[/FP]=prog,subl,sub2,...subn(rm) where: prog 1is the subl 1s the name you want to subn is the name of the last you You can specify However, 1if name want of your FORTRAN of the first task-build. to program. Scientific Subroutine Scientific Subroutine task-build. as many object your list of files input as files you wish will use for more input. than one line on your terminal, you should see the RSX-11M/M-PLUS Task Builder Manual for information about how to i1nput files using multiple lines. To avoid program, Section 5. task-building Yyou can individual place the subroutines subroutines in a to your library. See B.6 fiun the task. Type: >RUN prog(rer) where: For more prog information programs, IAS/RSX-11 1is about the name of compiling, see the RSX- 11M/M -PLUS FORTRAN IV User's Guide, your executable 1linking, and program. running FORTRAN Guide to Program Develogment the and the PDP-11 FORTRAN User's Guide. B.6 USING LIBRARIES Once you decide which of the Scientific Subroutines you will use most frequently, you can task-build them to your programs more easily by placing them in a library. When you place them in a library, you do not need to list each individual subroutine in the TKB command line. You only need to list the library name. When you place them 1in the system 1library, SYSLIB.OLB, you do not even need to list the library name 1in the TKB command 1line. The automatically searches the system library needed by a program. For example, compiled task-build >TKB If you >TKB your subroutines MYPROG, you compiled program, ABSNT.OBJ, have to type: MYPROG.OBJ, BOUND.OBJ, and calls the GAUSS.OBJ. To MYPROG [ /FP]=MYPROG,ABSNT, BOUND, GAUSS place example, suppose RSX-11M/M-PLUS task-builder for a subroutine or function the subroutines MYLIB.OLB, you in a task-build library in your MYPROG by typing: MYPROG [/FP]=MYPROG,MYLIB/LB B-17 UIC, called, for INSTALLING, VERIFYING, AND USING SSP UNDER RSX-11M/M-PLUS You have to use the /LB switch to tell RSX-11M/M-PLUS that MYLIB is a library file. However, 1if vyou add the subroutines to the system library, SYSLIB.OLB, you task-build MYPROG by typing: > TKB MYPROG [ /FP]=MYPROG use e, pil com you s ne ti ou br Su c ifi ent Sci the m fro y rar lib To create a the RSX 1librarian program, LBR. You may also use LBR to add modules es lud inc s Thi e. tim er lat a at y rar lib a m fro s le du mo to or delete the system 1library, SYSLIB.OLB. See the RSX-11 Utilities Manual for information about LBR. B-18 ALPHABETICAL APPENDIX C INDEX SUBROUTINES OF This appendix contains an alphabetical 1list of the Scientific Subroutines with the approximate number of words of memory required for each object file, and a list of any subroutines and functions it calls. Subroutines preceded by an compiled with the FORTRAN ignored. asterisk may produce a warning message when IV compiler. These warning messages can be The .FOR file system extension and .FTN for .ext is subroutines for in subroutines the RSX-11lM in the RT-1l1 operating system. Approximate Subroutine Object File Length Subroutine Called ABSNT.ext 79 words ARRAY.ext 142 words AUTO.ext 145 words AVCAL.ext 228 words AVDAT.ext 248 words BESI.ext 385 words BESJ.ext 393 words BESK.ext 659 words BESY.ext 690 words BOUND.ext 215 words 83 words uses LOC 814 words uses MINV,NROOT,EIGEN 73 words 135 words uses uses LOC LOC uses DATA *CADD.ext CANOR.ext *CCPY.ext *CCUT.ext CELl.ext 122 words CEL2.ext CHISQ.ext 183 314 words words CINT.ext 79 words CORRE.ext 944 words CROSS.ext CS.ext 207 words 319 words CSRT.ext *CSUM.ext 257 words uses LOC,CCPY 84 words uses *CTAB.ext LOC 168 words uses *CTIE.ext LOC,CADD 140 words uses *DCLA.ext *DCPY.ext LOC 49 words uses LOC 53 words uses LOC DISCR.ext 698 words DMATX.ext 318 words EIGEN.ext 983 words EXPI.ext 372 words EXSMO.ext 200 words C-1 (user) operating ALPHABETICAL INDEX OF SUBROUTINES Approximate Subroutine Object File Length Subroutine Called \ FORIF.ext FORIT.ext GAMMA.ext GAUSS.ext GDATA.ext GMADD.ext 282 words 267 words 241 uses external uses RANK, TIE function words 61 words 511 words 49 117 words words GTPRD.ext 49 64 112 KRANK.ext 465 words 94 77 words words *MATA.ext 110 235 words 181 uses MCPY.ext words LOC 54 481 uses words LOC words uses LOC 58 words 702 352 210 uses words LOC, words 113 235 uses words LOC uses words LOC 88 uses words LOC 458 uses words LOC,M CPY 544 ORDER.ext words 171 uses PADD.ext words EIGEN 120 PADDM.ext words 125 PCLA.ext words 47 words 70 69 171 words words words PNORM uses PDIV, PNORM uses PQSD PNORM.ext 107 57 71 109 41 uses POLRT.ext 850 PQSD.ext words PSUB.ext 69 121 words PVAL.ext 49 PVSUB.ext words QATR.ext 138 words 341 uses words PMPY, PADDM, PCLA QSF.ext uses 624 168 83 179 words exter nal uses LOC words uses words LOC uses LOC GMPRD.ext GMSUB.ext GMTRA.ext LEP.ext LOAD.ext LOC.ext *MADD.ext MEANQ.ext MFUN.ext MINV.ext MOMEN.ext *MPRD.ext *MSTR.ext *MSUB.ext MTRA.ext MULTR.ext NROOT.ext PCLD.ext PDER.ext PDIV.ext PGCD.ext PILD.ext PINT.ext PMPY.ext QTEST.ext *RADD.ext RANK.ext *RCPY.ext RCUT.ext RECP.ext RINT.ext 73 135 49 words words words words external function words words words words words words words function words words words words 80 1040 *RKl.ext words 465 uses 2 RK2.ext words uses 196 words exter nal function 278 uses words exter nal 84 168 155 uses words LOC function uses words LOC uses words LOC,RADD uses LOC RKGS.ext *RSRT.ext *RSUM.ext *RTAB.ext *RTIE.ext words C-2 sub routines ALPHABETICAL INDEX OF SUBROUTINES Approximate Object Subroutine File Length Subroutine Called RTMI.ext 545 words uses external RTNI.ext 163 words RTWI.ext uses 196 subroutine words SADD.ext uses external 57 words SCLA.ext uses LOC 49 words SCMA.ext uses 96 LOC words SDIV.ext 67 words SICI.ext uses LOC 375 words SIMQ.ext 469 words SMO.ext 120 words SMPY.ext SRANK.ext 37 324 words SRMA.ext uses uses 97 words LOC RANK,TIE SSUB.ext 57 SUBMX.ext words uses 100 LOC words SUBST.ext 187 words TABl.ext uses 526 subroutine words TAB2.ext 976 words TALLY.ext 326 words TIE.ext 164 words *TPRD.ext 207 words TRACE.ext uses LOC 124 words TTSTT.ext 477 words TWOAV.ext 246 UTEST.ext words 260 uses words RANK VARMX.ext uses 1089 RANK,TIE words 370 words 108 uses words RANK,TIE uses LOC WTEST.ext *XCPY.ext words C-3 function function INDEX ABSNT subroutine, 2-1 CADD Adding, 3-10, matrix columns, matrix rows, to ALL 3-13 chi-square, 3-3 eigenvalues and eigenvectors, 3-20 polynomials, 3-25, 3-48, matrix 3-49 elliptic elements, Alphabetical B-2, B-5, index of C-1 B-7 Fourier to C-3 2-17, factor, 2-20 2-19, Applying 2-15 to 2-17 matrix subroutine, mean to 3-15, 3-16 3-2, mean 3-3 means sines B-14 vector 3-3 subroutine, names, A-10, 2-20, 2-21, 2-16, 2-15 AVDAT subroutine, 2-15, 2-22 due 2-16 subscripts, switch, switch, Locator B-3, B-3, A-3, correlation ties, 2-27 2-15 operator sigma, 2-15 Canonical B-4, correlation subroutine, 3-4 CEL1 subroutine, 3-40 CEL2 subroutine, 3-41 A-4 B-8 Changing subroutine, 3-38, 3-39 CHISQ BESK subroutine, 3-39, 3-40 CINT K, 3-39, 3-40 Y, 3-40 BESY subroutine, BOUND 2-2, 3-40 2-2 subroutine A-13, 3-5 Q-test, Columns of a matrix columns) qualifiers ALL, B-2, ASN, B-14 ASSIGN, B-17 COPY, Index-1 B-5, A-10 A-2 2-5, 2-25 see switches Commands, submatrices, libraries, modes, 2-24 variables, Cochran Command 2-3 Building subroutine, matrix 2-1, 2-30 storage subroutine, Classifying subroutine, Building matrix 2-14 3-17 functions, 3-39 theorem, CCUT BESJ 3-38, limit 2-13, 3-4 3-38 J, subroutine, subroutine, subroutine, 3-38 2-13 CCPY Utility B-6, I, 3-13 3-32 delta, BESI Bessel 3-12, operator Central B-8 (BAD), 2-19 2-9, 2-10 cosines, 3-43, 3-44 and to CANOR Block 2-18, correlation subroutines, Bad 2-17 variables, Calculating 2-21 subroutine, /BADBLOCKS deviation, Calculus, AVCAL /BAD=[AUTO] 3-2 factor, Autocovariances, finding, standard vectors, B-14 AUTO 3-43 coefficients, A-10 logical 3-43 reciprocals, product-moment 1-2 Assigning 3-42 3-22 of subroutine, command, element square, 3-2, ASSIGN 3-42, polynomials, and converting, command, 3-36, 2-17 Arrays, ASN 3-42 3-41, loading, 2-19, 2-20 matrix determinants, corrections matrices, integrals, functions, 3-21, functions 3-40, integrals, Legendre patches, making ARRAY 2-18 variance subroutines, see integrals, 3-1 coefficients, Fresnel GAMMA discriminant, 2-14, 3-37 Analysis, of 2-24 exponential subroutines, Applying 3-4 3-41 3-26 command, Analysis 3-3, Calculating, matrices, scalars subroutine, B-7 (see 2-6 INDEX Commands EDI, (Cont.) B-16 EDIT, A-11 F77, B-16 FMT, B-3, FOR, B-16 FORMAT, INI, LIBRARY, RUN, A-12, SQUEEZE, A-3, B-17, UFD, B-8 row, A-4 A-4 Data A-3, J, 3-38, 3-39 K, 3-39, 3-40 Y, 3-40 Converting A-4 arrays, 3-2 3-4 elements, Diagonal Disc 3-20 Copying with more mass A-2 to A-5 only 3-31 switch, Creating devices, Creating A-13, A-3, B-4 or devices, A-2, 2-9 B-4, B-6, B-8 Discriminant analysis 2-17 kit, A-2 to elements polynomial, 2-17 to to A-2, A-5, B-2 by 2-27 DMOU B-2 to scalars, 3-54, 3-55 switch, 2-18, B-4, 2-19 B-8 B-9 density, specifying, RSX-11M/M-PLUS, A-3, B-3, B-5, A-4 DSC utility, B-4, B-7 DSCS8 utility, B-6, B-7 A-11 libraries, B-17 EDI subroutine, command, B-16 EDIT command, A-11 Editing files, A-11, 2-22 subroutine, 2-22 EIGEN 3-41 CSRT subroutine, 3-6 CSUM subroutine, 3-6 B-8 3-52 command, RT-11, B-16 subroutine 2-19 2-19 1-3, 3-51, subroutine, Double A-11 programs finding, CS 3-1 compress analysis, DMATX Cross-covariances, CROSS method, Discriminant /DO RSX-11M/M-PLUS, RT-11, and 1-2 Divisors, A-5, B-9 subroutine, 2-9 /CREATE 2-7 3-27 making, ties, 2-3 and matrices, save matrix two three Counting vector, mean polynomials, subroutine, Correlation 3-51 Dividing, distribution storage Corrections, subset copying, B-2 CORRE a Distribution B-7 storage 2-18 2-3 subroutines, system, 3-30, DOS-11 mass 2-17, 3-50, vector, utility, system, with 3-35 Diagonalization volumes, B-7 3-33 standard, B-8 Copying B-5, equations, calculating RSX-11M/M-PLUS volume, B-3, Deviation, the, a switch, subroutine, Deriving 3-15 submatrices, 3-9 subset B-2 to subroutine, polynomial, 3-9 rows, DCPY Derivatives, matrix matrices, 3-9 solving, A-2 distribution subroutine, integrating, functions, column, diagonal 2-6 Differential Copying, matrix to subroutines, DCLA DISCR data command, Copying 3-4 3-21 /DENS=HIGH B-18 3-38 RT-11 matrix, screening 2-1 Bessel B-2 a column, B-17 I, on 3-8 B-8 A-3, A-2, TKB, matrix subroutine, A-14 A-12 A-2, CTIE B-7 B-6, LINK, a 3-7 A-12 INITIALIZE, COPY subroutine, by, B-5, B-4, Computing CTAB Cutting A-2, FORTRAN, (CONT.) subroutine, Eigenvalues and calculating, Index-2 B-16 3-1 eigenvectors, 2-14, 3-1 B-7 INDEX Elementary statistics subroutines, Elliptic 2-7 integrals, Functions, to 2-9 3-40, 3-45, simultaneous solving Error 3-53, EXPI A-10, polynomials, 3-55, functions, 3-33 3-42, GAMMA B-15 subroutine, 3-42 Gauss-Jordan 3-52 ’ GAUSS subroutine, 2-30 GDATA subroutine, 2-12, 3-42 General Exponential integrals, Exponential smoothed F77 subroutine, command, analysis, Factor analysis File to 3-10 series, GMPRD subroutine, 3-10, GMSUB subroutine, 3-11 GMTRA subroutine, 3-11 GTPRD subroutine, 3-12 2-23 Indirect subroutines, RT-11, A-5, B-9 INI C-1 series, 2-23 2-2 2 2-21, cross-covariances, 2-22 3 50 divisors, 3-47, series, T-statistics, utility, B-9 FMT command, B-3, FOR command, /FOR B-16 switch, B-2, 3-36, FORIT subroutine, FORMAT 3-37 command, A-2, disks and RSX-11M/M-PLUS, RT-11, A-2, 3- 48 2-23 B-7 A-3, 3-37 A- 4 diskettes, B-5, B-7 A-4 elliptic, B-1 3-40, analysis subroutines ’ 3-32 3-41 3-42 3-41 3-53 differential 3-35 and differentiation 3-31 to 3-36 Interchanging, matrix columns, matrix rows, of variables, 2-12 Introduction Inverting 3-5 3-22 Intercorrelation 2-11, Fourier a to manual, matrix, 1-1 3-2 coefficients, calculating, switch, 3-36, integrals, Friedman two-way variance 3-37 B-17 Fresnel Kaiser's 3-41 analysis test, B-8 B-1 3-31, subroutines, A-12 /FP B-6, A-1 Integration command, 3-36 B-4, SSP, Integrating FORTRAN Fourier Installing polynomial, A-3, B-3, A-4 requirements, eXxponential, B-7 subroutine, A-3, A-4 equations, FORIF B-8 A-1 Fresnel, B-5, B-14 volumes, approximation, 2-8 FLX to Integrals, 3-53 time B-6, RSX-11M/M-PLUS, integrals, roots, B-4, command, Installation RT-11, polynomial A-10 A-3, RT-11, derivatives, polynomial Formatting 3-11 B-9 to RSX-11M/M-PLUS, 2-8 3-52 smoothed 2-13 files RSX-11M/M-PLUS, RT-11, autocovariances, polynomial command, Initializing Finding, polynomial A-5 INITIALIZE length, moments, command RSX-11M/M-PLUS, 2-21 a 2-12 1-2 subroutine, File, Filtering matrices, 2-11, GMADD 2-20 protection, object method, B-16 Factor 2-19 to 3-43 3-42 2-23 EXSMO 3-38 GAMMA 3-56 subroutine, subroutines, 3-42 3-44 differential, Evaluating 3-43 3-46 linear, conditions, 3-42, special differential, 3-35 nonlinear, GAMMA, 3- 41 Equations, integrating (CONT.) varimax rotation, 2-21 of Kendall 2-27 coefficient concordance, Index-3 of 2-29 INDEX KRANK subroutine, Landen's Length of subroutine subroutine, /LI switch, A-13, LIBRARY command, Linear equations LINK command, List of, LOAD B-17 2-1 9 3-9 dividing by Matrix Making corrections, Making subroutine A-13, B-9 U-test, copying, 3-20 cutting, 3-21 introduction, multiplying scalars, overview, MATA 1-1 subroutine, Mathematical Matrices, adding, 3-14 to 1-2 3-10, copying, 3-15 diagonal, 1-2 multiplying, 3-10, 3-16 3-12, subtracting, 3-11, 3-14 3-18 2-7 MEANQ subroutine, Means of 2-16 variables, 2-18, 3-8, 3-11, 2-11 iteration, residue, 3-46 2-30 extrapolation, 3-33 iteration, subroutine, 3-15 MINV subroutine, 3-2 values test, subroutine, 3-47 2-1 2-8 Moments, 3-19, finding, MOU 1-2 determinants, 3-2 inversion, 3-2 modes, 3-1 MFUN MOMEN 3-25 2-19 Method, Missing 3-29 3-17 columns, cutting, deviation, 2-16 Wegstein's 1-2 transposing, adding, square, 3-2 3-15 standard Runge-Kutta, premultiplying, Matrix and 3-31 3-29 storage Mean Romberg's postmultiplying, Matrix, subroutine, power 1-2 symmetric, subroutines, Newton's 3-15 3-23 3-24 Gauss-Jordan, 3-13 functions, general, elements, diagonalization, applying tieing, 3-1 2-8 command, Index-4 B-5, subroutine, 3-16 MSTR subroutine, 3-17 MSUB subroutine, 3-18 MTRA subroutine, 3-19 linear analysis, 3-4 B-2, MPRD Multiple 3-3 3-28 3-22 calculating, operations, 3-56 by MCPY Mean 1-1 3-23 3-22 calculating, Manual, 3-7, 3-29 interchanging, Matrix 2-28 3-28 scalars, scalars, tabulating, libraries, B-17 Mann-Whitney A-5, 3-27 scalars, to 3-21, 3-20 summing 3-13 3-26 rows, adding, 3-12 subroutine, by 3-6, sorting, MADD 3-25, scalars, equal summing, 2-19 subroutine, copying, subtracting subroutine, 3-9 reciprocal, multiplying Loading, LOC scalars, 3-22 B-11 3-7 3-7 3-26 A-7 , 3-6, elements, setting programs, calculating, elements, calculating C-1 3-27 3-6 substitution, adding A-12 subroutines, by diagonal, Matrix analysis, 2-10 scalars, scalar subroutine, regression multiplying tabulating, A-14 3-44 3-5 summing B-8 (Cont.) interchanging, Matrix B-5, Libraries, subroutine, 3-41 3-43 B-3, columns sorting, object C-1 LEP test Matrix Transformation, files, Linear 2-25 (CONT.) B-7 regression 2-10 INDEX Multiple linear regression subroutines, 2-10 to Multiplying, matrices, matrix 3-10, columns 3-16 by scalars, 3-27 matrix matrix by by by MULTR PINT subroutine, 3-53 PMPY subroutine, 3-53 PNORM subroutine, 3-54 POLRT subroutine, 3-47, 2-10, 3-48 to 3-56 regression subroutine, 2-12, 2-13 Polynomials, 3-53 3-49 subroutine, 3-48 operations subroutines, scalars, polynomials, constants, 3-52 Polynomial 3-28 Multiplying subroutine, scalars, 3-29 rows PILD Polynomial elements 3-28, 2-12 (CONT.) adding, 3-48, dividing, 2-11 3-49 3-51, evaluating, 3-54, 3-52, 3-55 3-53, 3-55, 3-56 finding, Newton's iteration method, 3-46 Newton-Raphson Nonlinear roots, 3-47 3-45, Nonparametric Normalizing 3-50 subtracting, Population 2-24 testing, switch, A-5 polynomials, subroutine, 3-54 substituting, statistical /NOPROTECTION 3-43 replacing, 3-45 subroutines, 3-53 normalizing, equations 3-55 samples, 2-27, 2-14 Power residue subroutine, Protecting C-1 file length subroutines, Operating 3-54, switch, Product-moment C-1 procedures, A-1, B-1 A-5, coefficients, calculating, 2-9, 2-10 calculus, Operator 2-15 sigma PSUB calculus, 2-15 subroutine, 3-55 PVAL subroutine, 3-55 Orthogonal /OUTPUT 2-11, rotations, switch, A-3, PVSUB 2-20 1-1 subroutines, QATR 1-1, subroutine, C-1 QSF subroutine, subroutine, Q-test, QTEST PADD subroutine, PADDM 3-31 3-32 2-25 subroutine, Qualifiers 3-48 subroutine, 3-56 A-4 Overview, manual, 2-12 see 2-25 command, switches 3-49 Patches, see making corrections PCLA subroutine, 3-50 PCLD subroutine, RADD 3-50 PDER subroutine, Random 3-50 PDIV subroutine, 3-51 Performing linear division, PGCD RANK number 3-52 Index-5 3-19 generator subroutine, Ranking 3-50 subroutine, subroutine, subroutine, synthetic B-9 correlation delta subroutine, 3-12, A-5 Operator ORDER 3-55 matrices, files, /PROTECTION of 3-29, 2-30 3-14 files, Object matrices, method, Premultiplying length, 2-28 3-30 PQSD Object 3-56 Postmultiplying 3-54 3-51 3-47 Legendre, 3-46 subroutines, NROOT integrals, equations, solving, 3-50, 3-52 divisors, iterative technique, Nonlinear derivatives, 2-29 2-26 vectors, 2-26 RCPY subroutine, 3-20 RCUT subroutine, 3-21 INDEX RECP subroutine, References, /REMOVE Replacing 3-21 2-30, switch, 3-57 A-13 polynomials, 3-50 Requirements, overview, installation, RSX-11M/M-PLUS, RT-11, (CONT.) B-1 A-1 SCLA subroutine, 3-26 SCMA subroutine, 3-27 SDIV subroutine, 3-27 /SEGMENTS switch, RINT subroutine, 3-22 RKGS subroutine, Selection, 3-33 from, RK1 subroutine, 3-35 RK2 subroutine, 3-35 Romberg's method, Romberg's Roots of a 3-32 polynomials subroutine, Rows of /RS a matrix rows) switch, B-9 smoothing, 2-23 to (see matrix subroutine, 3-43 SIMQ subroutine, 3-44 Simultaneous solving, RSUM subroutine, SMO 3-23 Smoothed RSX-11M/M-PLUS, library, compiling copying B-17 B-2 programs, table subroutines, of verifying B-16 a subroutine, differential B-14 nonlinear RTIE subroutine, 3-25 RTMI subroutine, simultaneous 3-45 RTNI subroutine, 3-46 equations, RTWI subroutine, 3-46, copying 3-47 table subroutines, RUN columns, rows, A-12, method, process, A-7 A-9 3-22 rank functions, 3-38 SRANK B-14 command, a A-3, disk Scientific using a library, A-13, 3-28, SSUB subroutine, 3-29 compiling, A-12, creating a calling A-11, B-16 B-16 Storing A-11, program, Storing 3-29 deviation, 2-7 subroutines, 2-1 to modes, 3-17 scientific B-15 variance data, Index-6 A-4 2-26 subroutine, matrix, B-17 A-3, diskette, SRMA Storage Subroutines, or subroutine, Statistical 3-26 A-2, A-4 calculating, 3-25, 3-1 and A-2, 3-35 subroutine, operations operations Squeezing 3-33 2-26 subroutine Standard SADD correlation matrix SQUEEZE A-9, 3-6 Special B-17 3-34 programs, 3-44 subroutines, Running, test Spearman Speclial Runge-Kutta, formula, 3-45, linear coefficient, A-11 subroutines, command, A-12 A-2 programs, verifying 3-33 matrix, A-13 creating of equations, Sorting, subroutines, files, 3-28 3-46 RT-11, compiling 2-23 equations, 3-24 library, 2-23 series, subroutine, a 2-23 2-23 RTAB using A-4 Solving, B-11 subroutines, A-3, series, Smoothing SMPY creating switch, subroutine, finding, B-16 equations, 3-44 exponential, subroutines, files, linear /SINGLEDENSITY 3-22 equal 3-26 SICI subroutine, a 2-1 elements scalars, RSRT using bounds, 2-23 3-47 2-20 matrix A-4 2-1 filtering, Setting Rotations, orthogonal, A-3, Series, 3-31 principle, set, within extrapolation 1-1 2-15 subroutines, analysis 2-31 INDEX Submatrices, building, 2-2 copying, 3-30 Subroutine LOC, SUBMX subroutine, 2-2 SUBST subroutine, 2-3 2-1 ARRAY, 3-2 arrays, AUTO, 2-15 AVDAT, 2-15 BESI, 3-38 BESJ, 3-38 BESK, 3-39 BESY, 3-40 BOUND, 2-1 CADD, 3-4 ccoTr, 3-4 CEL1, 3-40 CEL2, 3-41 CHISQ, CINT, CS, 2-9 2-9 2-22 3-41 CSRT, 3-6 CSUM, 3-6 CTAB, 3-7 CTIE, 3-8 DCLA, 3-9 DCPY, 3-9 DMATX, 2-18 EIGEN, 3-1 EXPI, 3-42 EXSMO, 2-23 FORIF, 3-36 FORIT, 3-37 3-42 GAUSS, 2-30 GDATA, 2-12 GMADD, 3-10 GMPRD, 3-10 GMSUB, 3-11 GMTRA, 3-11 GTPRD, 3-12 Integration LEP, MPRD, 3-16 MSTR, 3-17 MSUB, 3-18 MTRA, 3-19 2-10 NROOT, 2-14 ORDER, 2-11 2-24 3-48 3-49 PCLA, 3-50 PCLD, 3-50 PDER, 3-50 PDIV, 3-51 PGCD, 3-52 PILD, 3-52 PINT, 3-53 PMPY, 3-53 PNORM, 3-54 POLRT, 3-47 3-54 PSUB, 3-55 PVAL, 3-55 3-31 B-17 equations, 2-25 3-19 number 2-29 and A-13, 3-56 3-32 random 3-36 3-44 Index-7 2-12 3-31 RADD, 2-25 2-19 PQSD, QTEST, libraries, LOAD, 2-8 QSF, 3-43 linear MOMEN, QATR, differentiation, using, 3-2 PVSUB, analysis, GAMMA, KRANK, MINV, regression, 2-17 and 3-15 polynomial DISCR, Fourier 2-16 MFUN, PADDM, 3-S5 CROSS, 3-2 3-15 PADD, correlation, subroutines, statistical, 2-24 CORRE, 3-14 Nonparametric 2-13 CCPY, MATA, MULTR, 3-3 CANOR, 3-13 MEANQ, 2-21 AVCAL, MADD, MCPY, 1-2 (Cont.) 3-12 Matrix Subroutine, ABSNT, (CONT.) RANK, 2-26 RCPY, 3-20 RCUT, 3-21 RECP, 3-21 RINT, 3-22 RKGS, 3-33 RK1l, 3-35 RK2, 3-35 RSRT, 3-22 RSUM, 3-23 RTAB, 3-24 RTIE, 3-25 RTMI, 3-45 RTNI, 3-46 RTWI, 3-46 SADD, 3-25 generator, INDEX Subroutine (Cont.) SCLA, 3-26 SCMA, SDIV, 3-27 3-27 SICI, 3-43 SIMQ, 3-44 SMO, (CONT.) Switches /BADBLOCKS, /DMOU, /FP, 2-26 3-29 SUBMX, 2-2 SUBST, 2-3 SSUB, TABl1, 2- TAB2, 2 TIE, B-5, B-7 B- 8 B-5 , B-7 B- 17 /NOPROTECTION, /OUTPUT ’ A—Br A-5 A-4 /PROTECTION, A-5 /REMOVE , A-13 2-6 /SEGMEN TS, A-3 , A-4 /SINGLEDENSITY, 2- TPRD, A-4 /LI, B- 3, B-5, B-8 /MOU, B -2, B-5 , B-=7 3-28 SRMA, B-4, /DO, B- 9 -2 , /FOR, B 3-28 SRANK, A- 3, /CREATE , A-11 /DENS=H IGH, B- 3, 2-23 SMPY, (Cont.) /WAIT, 3- A-4 A-4 Symmetric TRACE, A-3, 1-2 matrices, TTSTT, TWOAV, UTEST, T-statist ics, VARMX, 2-29 WTEST, XCPY, finding , Tabulating, 3-30 matrix, Subroutines, analysis data columns, of canonical variance, 2-15 correlation, screening, discriminant analysis, analysis, 2-13 2-17 TAB2 2- 5 2-17 TALLY Newton-Raphson, 3-31 Missing regression, equations, nonparametric 3-45 statistical, 1-1 polynomial 2-1 Two-way analysis of 2-27 2-28 Test files, Test programs, running, operations, matrix 3-48 operations, A-4, A-9, B-4 B-14 Testing, population 3-1 samples, 2-217, 2-28 statistical, time series, Substituting 2-1 variable, association, 2-21 polynomials, 3-56 Subtracting, matrices, 3-11, scalars from elements, 3-18 matrix 3-29 TIE matrix, elements, 3-6 3-23 B-4, B-8 Index-8 2-30 2-27 matrices, Time series TKB command, TRACE B-3, limit, subroutine, TPRD Switches, /BAD=[AUTO], verifying central Tieing elements, 2-26 Theorem, Summing, column 2-25, software, see 3-55 2-29 correlation, SSP polynomials, row values, 2-25 u, 2-24 overview, 3-47 Test, variance, nonlinear 2 -7 subroutine, Technique, 2-10 special subroutine, Q, linear 3-24 2- 5 3-2 multiple 3-7 variables, 2-5 TABl subroutine, 3-36 integration and differentiation, matrix, rows, 2-1 elementary statistics, factor analysis, 2-19 Fourier 2-8 subroutines, B-17, subroutine, subroutine, B-18 3-29 2-20 2-21 INDEX Transformation, Landen's, 3-19, classifying, 3-41 Transposing, (CONT.) matrices, 3-29 intercorrelation, 3-11, tabulating, subroutine, 2-8 TWOAV subroutine, 2-27 association, 3-29 correlation, 2-25, Variance analysis storing, U-test, UFD VARMX 2-28 command, Using in programs, Using A-13, UTEST Verifying B-16 2-20 3-32 2-26 SSP software RSX-11M/M-PLUS, RT-11, libraries, B-9 A-5 B-17 subroutine, 2-28 Utilities, BAD, B-3, B-6, DSC, B-4, b-7 DSCS8, FLX, subroutine, ranking, A-11 subroutine data, 2-15 calculating, subroutines RSX-11M/M-PLUS, RT-11, 2-26 Vectors, B-8 scientific 2-11 2-5 testing, TTSTT 2-5 B-6, /WAIT B-8 Wegstein's B-7 WTEST XCPY Variables, means, A-4 iteration method, 3-47 B-9 calculating switch, 2-18 Index-9 subroutine, subroutine, 2-29 3-30 Scientific Subroutines Programmer’s Reference Manual AA-1101D-TC READER’S COMMENTS NOTE: This form is for document comments only. DIGITAL will use comments sub- mitted on this form at the company’s discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. Please indicate the type of reader that you most nearly represent. [J Assembly language programmer [} Higher-level language programmer [] Occasional programmer (experienced) [} User with little programming experience [J Student programmer [J Other (please specify) \ Name Date Organization Telephone Street _—m§m“m“m“mSs—m—€“mm—mm— " € € -, _,_, . ,, e ¢ty 00O OO State_ Zip Code or Country e G S G TEAL AIIL WD GRS GG GsEe SEEE s CEe G S NS G ————————— Do Not Tear- Fold Hereand Tape - - - - -\ -~ - - - - - - - - -« - - - - - — — - — o ——— —————C(—— ——_- — —— — Cut Along Lotted Line MARLBOROUGH, MASSACHUSETTS 01752 - 200 FOREST STREET MR1-2/E37 - SOFTWARE PUBLICATIONS - BY ADDRESSEE - BE PAID — POSTAGE WILL — BUSINESS REPLY MAIL FIRST CLASS PERMIT NO. 33 MAYNARD MASS. ———————_#—*——_——_.——-—_———————————_———_—————————_————————————_——_————__————_ — United States A Necessary if Mailed in the — I No Postage S e o—— il - — - — — e Tape -~ - - - - - - - - - - - - - - - — — - —————————— Do Not Tear- Fold Hereand Printed in U.S.A.
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies