guide 111 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768
  1. *********************************************************
  2. * *
  3. * Guide to the SLATEC Common Mathematical Library *
  4. * *
  5. *********************************************************
  6. Kirby W. Fong
  7. National Magnetic Fusion Energy Computer Center
  8. Lawrence Livermore National Laboratory
  9. Thomas H. Jefferson
  10. Operating Systems Division
  11. Sandia National Laboratories Livermore
  12. Tokihiko Suyehiro
  13. Computing and Mathematics Research Division
  14. Lawrence Livermore National Laboratory
  15. Lee Walton
  16. Network Analysis Division
  17. Sandia National Laboratories Albuquerque
  18. July 1993
  19. *******************************************************************************
  20. Table of Contents
  21. SECTION 1. ABSTRACT
  22. SECTION 2. BACKGROUND
  23. SECTION 3. MEMBERS OF THE SLATEC COMMON MATHEMATICAL LIBRARY SUBCOMMITTEE
  24. SECTION 4. OBTAINING THE LIBRARY
  25. SECTION 5. CODE SUBMISSION PROCEDURES
  26. SECTION 6. CODING GUIDELINES--GENERAL REQUIREMENTS FOR SLATEC
  27. SECTION 7. SOURCE CODE FORMAT
  28. SECTION 8. PROLOGUE FORMAT FOR SUBPROGRAMS
  29. SECTION 9. EXAMPLES OF PROLOGUES
  30. SECTION 10. SLATEC QUICK CHECK PHILOSOPHY
  31. SECTION 11. SPECIFIC PROGRAMMING STANDARDS FOR SLATEC QUICK CHECKS
  32. SECTION 12. QUICK CHECK DRIVERS (MAIN PROGRAMS)
  33. SECTION 13. QUICK CHECK SUBROUTINE EXAMPLE
  34. SECTION 14. QUICK CHECK MAIN PROGRAM EXAMPLE
  35. APPENDIX A. GAMS (AND SLATEC) CLASSIFICATION SCHEME
  36. APPENDIX B. MACHINE CONSTANTS
  37. APPENDIX C. ERROR HANDLING
  38. APPENDIX D. DISTRIBUTION FILE STRUCTURE
  39. APPENDIX E. SUGGESTED FORMAT FOR A SLATEC SUBPROGRAM
  40. ACKNOWLEDGEMENT
  41. REFERENCES
  42. *******************************************************************************
  43. SECTION 1. ABSTRACT
  44. This document is a guide to the SLATEC Common Mathematical Library (CML) [1].
  45. The SLATEC CML is written in FORTRAN 77 (ANSI standard FORTRAN as defined by
  46. ANSI X3.9-1978, reference [6]) and contains general purpose mathematical and
  47. statistical routines. Included in this document are a Library description,
  48. code submission procedures, and a detailed description of the source file
  49. format. This report serves as a guide for programmers who are preparing codes
  50. for inclusion in the library. It also provides the information needed to
  51. process the source file automatically for purposes such as extracting
  52. documentation or inserting usage monitoring calls. This guide will be updated
  53. periodically, so be sure to contact a SLATEC CML subcommittee member to ensure
  54. you have the latest version.
  55. *******************************************************************************
  56. SECTION 2. BACKGROUND
  57. SLATEC is the acronym for the Sandia, Los Alamos, Air Force Weapons Laboratory
  58. Technical Exchange Committee. This organization was formed in 1974 by the
  59. computer centers of Sandia National Laboratories Albuquerque, Los Alamos
  60. National Laboratory, and Air Force Weapons Laboratory to foster the exchange of
  61. technical information. The parent committee established several subcommittees
  62. to deal with various computing specialties. The SLATEC Common Mathematical
  63. Library (CML) Subcommittee decided in 1977 to construct a mathematical FORTRAN
  64. subprogram library that could be used on a variety of computers at the three
  65. sites. A primary impetus for the library development was to provide portable,
  66. non-proprietary, mathematical software for member sites' supercomputers.
  67. In l980 the computer centers of Sandia National Laboratories Livermore and the
  68. Lawrence Livermore National Laboratory were admitted as members of the parent
  69. committee and subcommittees. Lawrence Livermore National Laboratory, unlike the
  70. others, has two separate computer centers: the National Magnetic Fusion Energy
  71. Computer Center (NMFECC) and the Livermore Computer Center (LCC). In 1981 the
  72. National Bureau of Standards (now the National Institute of Standards and
  73. Technology) and the Oak Ridge National Laboratory were invited to participate
  74. in the math library subcommittee because of their great interest in the
  75. project.
  76. Version 1.0 of the CML was released in April 1982 with 114,328 records and 491
  77. user-callable routines. In May 1984 Version 2.0, with 151,864 records and 646
  78. user-callable routines was released. This was followed in April 1986 by
  79. Version 3.0 with 196,013 records and 704 user-callable routines. Version 3.1
  80. followed in August 1987 with 197,931 records and 707 user-callable routines
  81. and Version 3.2 in August 1989 with 203,587 records and 709 user-callable
  82. routines. The committee released Version 4.0 in December 1992 with 298,954
  83. records and 901 user-callable routines. Finally, on July 1, 1993, Version 4.1
  84. was released with 290,907 records and 902 user-callable routines.
  85. The sole documentation provided by SLATEC for the routines of the SLATEC
  86. Library is via comment lines in the source code. Although the library comes
  87. with portable documentation programs to help users access the documentation in
  88. the source code, various installations may wish to use their own documentation
  89. programs. To facilitate automatic extraction of documentation or further
  90. processing by other computer programs, the source file for each routine must
  91. be arranged in a precise format. This document describes that format for the
  92. benefit of potential library contributors and for those interested in
  93. extracting library documentation from the source code.
  94. *******************************************************************************
  95. SECTION 3. MEMBERS OF THE SLATEC COMMON MATHEMATICAL LIBRARY SUBCOMMITTEE
  96. Current member sites and voting members of the subcommittee are the
  97. following.
  98. Air Force Phillips Laboratory, Kirtland (PLK) Reginald Clemens
  99. Lawrence Livermore National Laboratory (LCC) Fred N. Fritsch
  100. Lawrence Livermore National Laboratory (NERSC) Steve Buonincontri
  101. Los Alamos National Laboratory (LANL) W. Robert Boland
  102. (Chairman)
  103. National Institute of Standards and Technology (NIST) Daniel W. Lozier
  104. Oak Ridge National Laboratory (ORNL) Thomas H. Rowan
  105. Sandia National Laboratories/California (SNL/CA) Thomas H. Jefferson
  106. Sandia National Laboratories/New Mexico (SNL/NM) Sue Goudy
  107. *******************************************************************************
  108. SECTION 4. OBTAINING THE LIBRARY
  109. The Library is in the public domain and distributed by the Energy Science
  110. and Technology Software Center.
  111. Energy Science and Technology Software Center
  112. P.O. Box 1020
  113. Oak Ridge, TN 37831
  114. Telephone 615-576-2606
  115. E-mail estsc%a1.adonis.mrouter@zeus.osti.gov
  116. *******************************************************************************
  117. SECTION 5. CODE SUBMISSION PROCEDURES
  118. The SLATEC Library is continuously searching for portable high-quality routines
  119. written in FORTRAN 77 that would be of interest to the member sites. The
  120. subcommittee meets several times annually with the member sites rotating as
  121. meeting hosts. At these meetings new routines are introduced, discussed, and
  122. eventually voted on for inclusion in the library. Some of the factors that are
  123. considered in deciding whether to accept a routine into the Library are the
  124. following:
  125. 1. Usefulness. Does the routine fill a void in the Library? Will the routine
  126. have widespread appeal? Will it add a new capability?
  127. 2. Robustness. Does the routine give accurate results over a wide range of
  128. problems? Does it diagnose errors? Is the routine well tested?
  129. 3. Maintainability. Is the author willing to respond to bugs in the routine?
  130. Does the source code follow good programming practices?
  131. 4. Adherence to SLATEC standards and coding guidelines. These standards
  132. are described further in this guide and include such things as the order
  133. of subprogram arguments, the presence of a correctly formatted prologue at
  134. the start of each routine, and the naming of routines.
  135. 5. Good documentation. Is clear, concise computer readable documentation
  136. built into the source code?
  137. 6. Freely distributable. Is the program in the public domain?
  138. A typical submission procedure begins with contact between an author and a
  139. Library committee member. Preliminary discussions with the member are
  140. encouraged for initial screening of any code and to gain insight into the
  141. workings of SLATEC. This member champions the routine to be considered. The
  142. code is introduced at a meeting where the author or committee member describes
  143. the code and explains why it would be suitable for SLATEC. Copies of the code
  144. are distributed to all committee members. Hopefully, the code already adheres
  145. to SLATEC standards. However, most codes do not. At this first formal
  146. discussion, the committee members are able to provide some useful suggestions
  147. for improving the code and revising it for SLATEC.
  148. Between meetings, changes are made to the code and the modified code is
  149. distributed in machine readable format for testing. The code is then
  150. considered at a subsequent meeting, to be voted on and accepted. However,
  151. because committee members and authors do not always see eye to eye, and because
  152. time constraints affect all, the code is usually discussed at several meetings.
  153. If codes adhered to the programming practices and formatting described in this
  154. guide, the time for acceptance could be greatly reduced.
  155. *******************************************************************************
  156. SECTION 6. CODING GUIDELINES--GENERAL REQUIREMENTS FOR SLATEC
  157. A software collection of the size of the SLATEC Library that is designed to run
  158. on a variety of computers demands uniformity in handling machine dependencies,
  159. in handling error conditions, and in installation procedures. Thus, while the
  160. decision to add a new subroutine to the library depends mostly on its quality
  161. and whether it fills a gap in the library, these are not the only
  162. considerations. Programming style must also be considered, so that the library
  163. as a whole behaves in a consistent manner. We now list the stylistic and
  164. documentational recommendations and requirements for routines to be
  165. incorporated into the library.
  166. 1. The SLATEC Library is intended to have no restriction on its distribution;
  167. therefore, new routines must be in the public domain. This is generally
  168. not a problem since most authors are proud of their work and would like
  169. their routines to be used widely.
  170. 2. Routines must be written in FORTRAN 77 (ANSI standard FORTRAN as
  171. defined by ANSI X3.9-1978, reference [6]). Care must be taken so that
  172. machine dependent features are not used.
  173. 3. To enhance maintainability codes are to be modular in structure. Codes
  174. must be composed of reasonably small subprograms which in turn are made
  175. up of easily understandable blocks.
  176. 4. Equivalent routines of different precision are to look the same where
  177. possible. That is, the logical structure, statement numbers, variable
  178. names, etc. are to be as close to identical as possible. This implies
  179. that generic intrinsics must be used instead of specific intrinsics.
  180. Extraneous use of INT, REAL and DBLE are strongly discouraged; use
  181. mixed-mode expressions in accordance with the Fortran 77 standard.
  182. 5. New routines must build on existing routines in the Library, unless
  183. there are compelling reasons to do otherwise. For example, the SLATEC
  184. Library contains the LINPACK and EISPACK routines, so new routines
  185. should use the existing linear system and eigensystem routines rather
  186. than introduce new ones.
  187. 6. System or machine dependent values must be obtained by calling routines
  188. D1MACH, I1MACH, and R1MACH. The SLATEC Library has adopted these routines
  189. from the Bell Laboratories' PORT Library [2] [3]. See Appendix B
  190. for a description of these machine dependent routines.
  191. 7. The SLATEC Library has a set of routines for handling error messages.
  192. Each user-callable routine, if it can detect errors, must have as one
  193. of its arguments an error flag, whose value upon exiting the routine
  194. indicates the success or failure of the routine. It is acceptable for a
  195. routine to set the error flag and RETURN; however, if the routine wishes
  196. to write an error message, it must call XERMSG (see Appendix C) rather
  197. than use WRITE or PRINT statements. In general, all errors (even serious
  198. ones) should be designated as "recoverable" rather than "fatal," and the
  199. routine should RETURN to the user. This permits the user to try an
  200. alternate strategy if a routine decides a particular calculation is
  201. inappropriate. A description of the entire original error handling
  202. package appears in reference [4].
  203. 8. Each user-callable routine (and subsidiary routine if appropriate) must
  204. have a small demonstration routine that can be used as a quick check. This
  205. demonstration routine can be more exhaustive, but in general, it should be
  206. structured to provide a "pass" or "fail" answer on whether the library
  207. routine appears to be functioning properly. A more detailed description
  208. of the required format of the quick checks appears later in this document.
  209. 9. Common blocks and SAVEd variables must be avoided. Use subprogram
  210. arguments for interprogram communication. The use of these constructs
  211. often obstructs multiprocessing.
  212. Variables that are statically allocated in memory and are used as
  213. working storage cannot be used simultaneously by several processors.
  214. SAVEd variables and common block variables are most likely to fall into
  215. this category. Such variables are acceptable if they are DATA loaded or
  216. set at run time to values that are to be read (but not written) since it
  217. does not matter in what order multiple processors read the values.
  218. However, such variables should not be used as working storage since no
  219. processor can use the work space while some other processor is using it.
  220. Library routines should ask the user to provide any needed work space
  221. by passing it in as an argument. The user is then responsible for
  222. giving each processor a different work space even though each processor
  223. may be executing the same library routine.
  224. 10. Complete self-contained documentation must be supplied as comments in
  225. user-callable routines. This documentation must be self-contained because
  226. SLATEC provides no other documentation for using the routines. This
  227. documentation is called the "prologue" for the routine. The rigid prologue
  228. format for user-callable routines is described below. The prologue must
  229. tell the user how to call the routine but need not go into algorithmic
  230. details since such explanations often require diagrams or non-ASCII
  231. symbols. Subsidiary routines are those called by other library routines
  232. but which are not intended to be called directly by the user. Subsidiary
  233. routines also have prologues, but these prologues are considerably less
  234. elaborate than those of user-callable routines.
  235. 11. No output should be printed. Instead, information should be returned
  236. to the user via the subprogram arguments or function values. If there is
  237. some overriding reason that printed output is necessary, the user must be
  238. able to suppress all output by means of a subprogram input variable.
  239. *******************************************************************************
  240. SECTION 7. SOURCE CODE FORMAT
  241. In this section and the two sections on prologues, we use the caret (^)
  242. character to indicate a position in which a single blank character must
  243. appear. Upper case letters are used for information that appears literally.
  244. Lower case is used for material specific to the routine.
  245. 1. The first line of a subprogram must start with one of:
  246. SUBROUTINE^name^(arg1,^arg2,^...argn)
  247. FUNCTION^name^(arg1,^arg2,^...argn)
  248. COMPLEX^FUNCTION^name^(arg1,^arg2,^...argn)
  249. DOUBLE^PRECISION^FUNCTION^name^(arg1,^arg2,^...argn)
  250. INTEGER^FUNCTION^name^(arg1,^arg2,^...argn)
  251. REAL^FUNCTION^name^(arg1,^arg2,^...argn)
  252. LOGICAL^FUNCTION^name^(arg1,^arg2,^...argn)
  253. CHARACTER[*len]^FUNCTION^name^(arg1,^arg2,^...argn)
  254. Each of the above lines starts in column 7. If there is an argument
  255. list, then there is exactly one blank after the subprogram name and
  256. after each comma (except if the comma appears in column 72). There is
  257. no embedded blank in any formal parameter, after the leading left
  258. parenthesis, before the trailing right parenthesis, or before any
  259. comma. Formal parameters are never split across lines. Any line to be
  260. continued must end with a comma.
  261. For continuation lines, any legal continuation character may be used in
  262. column 6, columns 7-9 must be blank and arguments or formal parameters
  263. start in column 10 of a continuation line and continue up to the right
  264. parenthesis (or comma if another continuation line is needed). The
  265. brackets in the CHARACTER declaration do not appear literally but
  266. indicate the optional length specification described in the FORTRAN 77
  267. standard.
  268. 2. The author must supply a prologue for each subprogram. The prologue
  269. must be in the format that will subsequently be described. The
  270. prologue begins with the first line after the subprogram declaration
  271. (including continuation lines for long argument lists).
  272. 3. Except for the "C***" lines (to be described) in the prologue and
  273. the "C***" line marking the first executable statement, no other line
  274. may begin with "C***".
  275. 4. The first line of the prologue is the comment line
  276. C***BEGIN^PROLOGUE^^name
  277. where "name", starting in column 21, is the name of the subprogram.
  278. 5. The last line of a subprogram is the word "END" starting in column 7.
  279. 6. All alphabetic characters, except for those on comment lines or in
  280. character constants, must be upper case, as specified by the FORTRAN 77
  281. standard (see [6]).
  282. 7. In the prologue, the comment character in column 1 must be the upper
  283. case "C".
  284. 8. All subprogram, common block, and any formal parameter names mentioned in
  285. the prologue must be in upper case.
  286. 9. Neither FORTRAN statements nor comment lines can extend beyond column 72.
  287. Columns 73 through 80 are reserved for identification or sequence numbers.
  288. 10. Before the first executable statement of every subprogram, user-callable
  289. or not, is the line
  290. C***FIRST^EXECUTABLE^STATEMENT^^name
  291. where "name" (starting in column 33) is the name of the subprogram.
  292. Only comment lines may appear between the C***FIRST EXECUTABLE
  293. STATEMENT line and the first executable statement.
  294. 11. The subprogram name consists of a maximum of six characters. Authors
  295. should choose unusual and distinctive subprogram names to minimize
  296. possible name conflicts. Double precision routines should begin with
  297. "D". Subprograms of type complex should begin with "C". The letter "Z"
  298. is reserved for future use by possible double precision complex
  299. subprograms. No other subprograms should begin with either "D", "C", or
  300. "Z".
  301. 12. The recommended order for the formal parameters is:
  302. 1. Names of external subprograms.
  303. 2. Input variables.
  304. 3. Variables that are both input and output (except error flags).
  305. 4. Output variables.
  306. 5. Work arrays.
  307. 6. Error flags.
  308. However, array dimensioning parameters should immediately follow the
  309. associated array name.
  310. *******************************************************************************
  311. SECTION 8. PROLOGUE FORMAT FOR SUBPROGRAMS
  312. Each subprogram has a section called a prologue that gives standardized
  313. information about the routine. The prologue consists of comment lines only. A
  314. subsidiary subprogram is one that is usually called by another SLATEC Library
  315. subprogram only and is not meant to be called by a user's routine. The
  316. prologue for a user-callable subprogram is more extensive than the prologue for
  317. a subsidiary subprogram. The prologue for a user-callable subprogram has up to
  318. 14 sections, of which 12 are required and one is required if and only if a
  319. common block is present. Several of these sections are optional in subsidiary
  320. programs and in the quick check routines. The sections are always in the
  321. order described in the table below.
  322. Section User-callable Subsidiary Quick Checks
  323. 1. BEGIN PROLOGUE Required Required Required
  324. 2. SUBSIDIARY Not present Required Optional
  325. 3. PURPOSE Required Required Required
  326. 4. LIBRARY SLATEC Required Required Required
  327. 5. CATEGORY Required Optional Optional
  328. 6. TYPE Required Required Required
  329. 7. KEYWORDS Required Optional Optional
  330. 8. AUTHOR Required Required Required
  331. 9. DESCRIPTION Required Optional Optional
  332. 10. SEE ALSO Optional Optional Optional
  333. 11. REFERENCES Required Optional Optional
  334. 12. ROUTINES CALLED Required Required Required
  335. 13. COMMON BLOCKS Required*** Required*** Required***
  336. 14. REVISION HISTORY Required Required Required
  337. 15. END PROLOGUE Required Required Required
  338. ***Note: The COMMON BLOCKS section appears in a subprogram prologue
  339. if and only if the subprogram contains a common block.
  340. In the prologue section descriptions that follow, the caret (^)
  341. character is used for emphasis to indicate a required blank character.
  342. 1. BEGIN PROLOGUE
  343. This section is a single line that immediately follows the subprogram
  344. declaration and its continuation lines. It is
  345. C***BEGIN^PROLOGUE^^name
  346. where "name" (beginning in column 21) is the name of the subprogram.
  347. 2. SUBSIDIARY
  348. This section is the single line
  349. C***SUBSIDIARY
  350. and indicates the routine in which this appears is not intended to be
  351. user-callable.
  352. 3. PURPOSE
  353. This section gives one to six lines of information on the purpose of the
  354. subprogram. The letters may be in upper or lower case. There are no blank
  355. lines in the purpose section; i.e., there are no lines consisting solely of
  356. a "C" in column 1. The format for the first line and any continuation
  357. lines is
  358. C***PURPOSE^^information
  359. C^^^^^^^^^^^^more information
  360. Information begins in column 14 of the first line and no earlier than
  361. column 14 of continuation lines.
  362. 4. LIBRARY SLATEC
  363. The section is a single line used to show that the routine is a part
  364. of the SLATEC library and, optionally, to indicate other libraries,
  365. collections, or packages (sublibraries) of which the routine is a part
  366. or from which the routine has been derived. The format is
  367. C***LIBRARY^^^SLATEC
  368. or
  369. C***LIBRARY^^^SLATEC^(sublib1,^sublib2,^...sublibn)
  370. The leading left parenthesis is immediately followed by the first member
  371. of the list. Each member, except for the last, is immediately followed by
  372. a comma and a single blank. The last member is immediately followed by
  373. the trailing right parenthesis.
  374. 5. CATEGORY
  375. This section is a list of classification system categories to which
  376. this subprogram might reasonably be assigned. There must be at least
  377. one list item. The first category listed is termed the primary
  378. category, and others, if given, should be listed in monotonically
  379. decreasing order of importance. Categories must be chosen from the
  380. classification scheme listed in Appendix A. The required format for the
  381. initial line and any continuation lines is
  382. C***CATEGORY^^cat1,^cat2,^cat3,^...catn,
  383. C^^^^^^^^^^^^^continued list
  384. All alphabetic characters are in upper case.
  385. Items in the list are separated by the two characters, comma and space.
  386. If the list will not fit on one line, the line may be ended at a comma
  387. (with zero or more trailing spaces), and be continued on the next line.
  388. The list and any continuations of the list begin with a nonblank character
  389. in column 15.
  390. 6. TYPE
  391. This section gives the datatype of the routine and indicates which
  392. routines, including itself, are equivalent (except possibly for type) to
  393. the routine. The format for this section is
  394. C***TYPE^^^^^^routine_type^(equivalence list
  395. C^^^^^^^^^^^^^continued equivalence list
  396. C^^^^^^^^^^^^^continued equivalence list)
  397. Routine_type, starting in column 15, is the data type of the routine,
  398. and is either SINGLE PRECISION, DOUBLE PRECISION, COMPLEX, INTEGER,
  399. CHARACTER, LOGICAL, or ALL. ALL is a pseudo-type given to routines that
  400. could not reasonably be converted to some other type. Their purpose is
  401. typeless. An example would be the SLATEC routine that prints error
  402. messages.
  403. Equivalence list is a list of the routines (including this one) that are
  404. equivalent to this one, but perhaps of a different type. Each item in the
  405. list consists of a routine name followed by the "-" character and then
  406. followed by the first letter of the type (except use "H" for type
  407. CHARACTER) of the equivalent routine. The order of the items is S, D, C,
  408. I, H, L and A.
  409. The initial item in the list is immediately preceded by a blank and a
  410. left parenthesis and the final item is immediately followed by a right
  411. parenthesis. Items in the list are separated by the two characters,
  412. comma and space. If the list will not fit on one line, the line may be
  413. ended at a comma (with zero or more trailing spaces), and be continued
  414. on the next line. The list and any continuations of the list begin with
  415. a nonblank character in column 15.
  416. All alphabetic characters in this section are in upper case.
  417. Example
  418. C***TYPE SINGLE PRECISION (ACOSH-S, DACOSH-D, CACOSH-C)
  419. 7. KEYWORDS
  420. This section gives keywords or keyphrases that can be used by
  421. information retrieval systems to identify subprograms that pertain to
  422. the topic suggested by the keywords. There must be at least one
  423. keyword. Keywords can have embedded blanks but may not have leading or
  424. trailing blanks. A keyword cannot be continued on the next line; it
  425. must be short enough to fit on one line. No keyword can have an embedded
  426. comma. Characters are limited to the FORTRAN 77 character set (in
  427. particular, no lower case letters). There is no comma after the last
  428. keyword in the list. It is suggested that keywords be in either
  429. alphabetical order or decreasing order of importance. The format for
  430. the initial line and any continuation lines is
  431. C***KEYWORDS^^list
  432. C^^^^^^^^^^^^^continued list
  433. Items in the list are separated by the two characters, comma and space.
  434. If the list will not fit on one line, the line may be ended at a comma
  435. (with zero or more trailing spaces), and be continued on the next line.
  436. The list and any continuations of the list begin with a nonblank character
  437. in column 15.
  438. 8. AUTHOR
  439. This required section gives the author's name. There must be at least one
  440. author, and there may be coauthors. At least the last name of the author
  441. must be given. The first name (or initials) is optional. The company,
  442. organization, or affiliation of the author is also optional. The brackets
  443. below indicate optional information. Note that if an organization is to be
  444. listed, the remainder of the author's name must also be given. If the
  445. remainder of the author's name is given, the last name is immediately
  446. followed by a comma. If the organization is given, the first name (or
  447. initials) is immediately followed by a comma. The remainder of the name
  448. and the organization name may have embedded blanks. The remainder of the
  449. name may not have embedded commas. This makes it possible for an
  450. information retrieval system to count commas to identify the remainder of
  451. the name and the name of an organization. Additional information about the
  452. author (e.g., address or telephone number) may be given on subsequent
  453. lines. The templates used are
  454. C***AUTHOR^^last-name[,^first-name[,^(org)]]
  455. C^^^^^^^^^^^^^more information
  456. C^^^^^^^^^^^^^more information
  457. .
  458. .
  459. .
  460. C^^^^^^^^^^^last-name[,^first-name[,^(org)]]
  461. C^^^^^^^^^^^^^more information
  462. .
  463. .
  464. .
  465. Each author's name starts in column 13. Continued information starts in
  466. column 15.
  467. 9. DESCRIPTION
  468. This section is a description giving the program abstract, method used,
  469. argument descriptions, dimension information, consultants, etc. The
  470. description of the arguments is in exactly the same order in which the
  471. arguments appear in the calling sequence. The description section may use
  472. standard, 7-bit ASCII graphic characters, i.e., the 94 printing characters
  473. plus the blank. Names of subprograms, common blocks, externals, and formal
  474. parameters are all in upper case. Names of variables are also in upper
  475. case. The first line of this section is "C***DESCRIPTION" starting in
  476. column 1. All subsequent lines in this section start with a "C" in column
  477. 1 and no character other than a blank in column 2. Lines with only a "C"
  478. in column 1 may be used to improve the appearance of the description.
  479. A suggested format for the DESCRIPTION section is given in Appendix E.
  480. 10. SEE ALSO
  481. This section is used for listing other SLATEC routines whose prologues
  482. contain documentation on the routine in which this section appears.
  483. The form is
  484. C***SEE ALSO^^name,^name,^name
  485. where each "name" is the name of a user-callable SLATEC CML subprogram
  486. whose prologue provides a description of this routine. The names are
  487. given as a list (starting in column 15), with successive names separated
  488. by a comma and a single blank.
  489. 11. REFERENCES
  490. This section is for references. Any of the 94 ASCII printing characters
  491. plus the blank may be used. There may be more than one reference. If there
  492. are no references, the section will consist of the single line
  493. C***REFERENCES^^(NONE)
  494. If there are references, they will be in the following format:
  495. C***REFERENCES^^reference 1
  496. C^^^^^^^^^^^^^^^^^continuation of reference 1
  497. .
  498. .
  499. .
  500. C^^^^^^^^^^^^^^^reference 2
  501. C^^^^^^^^^^^^^^^^^continuation of reference 2
  502. .
  503. .
  504. .
  505. Information starts in column 17 of the first line of a reference and no
  506. earlier than column 19 of continuation lines.
  507. References should be listed in either alphabetical order by last name or
  508. order of citation. They should be in upper and lower case, have initials
  509. or first names ahead of last names, and (for multiple authors) have
  510. "and" ahead of the last author's name instead of just a comma. The first
  511. word of the title of journal articles should be capitalized as should all
  512. important words in titles of books, pamphlets, research reports, and
  513. proceedings. Titles should be given without quotation marks. The names
  514. of journals should be spelled out completely, or nearly so, because
  515. software users may not be familiar with them.
  516. A complete example of a journal reference is:
  517. C F. N. Fritsch and R. E. Carlson, Monotone piecewise
  518. C cubic interpolation, SIAM Journal on Numerical Ana-
  519. C lysis, 17 (1980), pp. 238-246.
  520. A complete example of a book reference is:
  521. C Carl de Boor, A Practical Guide to Splines, Applied
  522. C Mathematics Series 27, Springer-Verlag, New York,
  523. C 1978.
  524. 12. ROUTINES CALLED
  525. This section gives the names of routines in the SLATEC Common Mathematical
  526. Library that are either directly referenced or declared in an EXTERNAL
  527. statement and passed as an argument to a subprogram. Note that the FORTRAN
  528. intrinsics and other formal parameters that represent externals are not
  529. listed. A list is always given for routines called; however, if no routine
  530. is called, the list will be the single item "(NONE)" where the parentheses
  531. are included. If there are genuine items in the list, the items are in
  532. alphabetical order. The collating sequence has "0" through "9" first, then
  533. "A" through "Z". The format is
  534. C***ROUTINES^CALLED^^name,^name,^name,^name,
  535. C^^^^^^^^^^^^^^^^^^^^name,^name,^name
  536. Items in the list are separated by the two characters, comma and space.
  537. If the list will not fit on one line, the line may be ended at a comma
  538. (with zero or more trailing spaces), and be continued on the next line.
  539. The list and any continuations of the list begin with a nonblank character
  540. in column 22.
  541. 13. COMMON BLOCKS
  542. This section, that may or may not be required, tells what common blocks are
  543. used by this subprogram. If this subprogram uses no common blocks, this
  544. section does not appear. If this subprogram does use common blocks, this
  545. section must appear. The list of common blocks is in exactly the same
  546. format as the list of routines called and uses the same collating sequence.
  547. In addition, the name of blank common is "(BLANK)" where the parentheses
  548. are included. Blank common should be last in the list if it appears. The
  549. format for this section is
  550. C***COMMON^BLOCKS^^^^name,^name,^name,^name,
  551. C^^^^^^^^^^^^^^^^^^^^name,^name,^name^
  552. The list starts in column 22.
  553. 14. REVISION HISTORY
  554. This section provides a summary of the revisions made to this code.
  555. Revision dates and brief reasons for revisions are given. The format is
  556. C***REVISION^HISTORY^^(YYMMDD)
  557. C^^^yymmdd^^DATE^WRITTEN
  558. C^^^yymmdd^^revision description
  559. C^^^^^^^^^^^more revision description
  560. C^^^^^^^^^^^...
  561. C^^^yymmdd^^revision description
  562. C^^^^^^^^^^^more revision description
  563. C^^^^^^^^^^^...
  564. C^^^^^^^^^^^...
  565. where, for each revision, "yy" (starting in column 5) is the last two
  566. digits of the year, "mm" is the month (01, 02, ..., 12), and "dd" is the
  567. day of the month (01, 02, ..., 31). Because this ANSI standard form for
  568. the date may not be familiar to some people, the character string
  569. "(YYMMDD)" (starting in column 23) is included in the first line of the
  570. section to assist in interpreting the sequence of digits. Each line of the
  571. revision descriptions starts in column 13. The second line of this section
  572. contains the date the routine was written, with the characters "DATE
  573. WRITTEN" beginning in column 13. These items must be in chronological
  574. order.
  575. 15. END PROLOGUE
  576. The last section is the single line
  577. C***END^PROLOGUE^^name
  578. where "name" is the name of the subprogram.
  579. *******************************************************************************
  580. SECTION 9. EXAMPLES OF PROLOGUES
  581. This section contains examples of prologues for both user-callable
  582. and subsidiary routines. The routines are not from the SLATEC CML and
  583. should be used only as guidelines for preparing routines for SLATEC.
  584. Note that the C***DESCRIPTION sections follow the suggested LDOC format that
  585. is described in Appendix E. Following the suggested LDOC format with its
  586. "C *"subsections helps to ensure that all necessary descriptive information is
  587. provided.
  588. SUBROUTINE ADDXY (X, Y, Z, IERR)
  589. C***BEGIN PROLOGUE ADDXY
  590. C***PURPOSE This routine adds two single precision numbers together
  591. C after forcing both operands to be stored in memory.
  592. C***LIBRARY SLATEC
  593. C***CATEGORY A3A
  594. C***TYPE SINGLE PRECISION (ADDXY-S, DADDXY-D)
  595. C***KEYWORDS ADD, ADDITION, ARITHMETIC, REAL, SUM,
  596. C SUMMATION
  597. C***AUTHOR Fong, K. W., (NMFECC)
  598. C Mail Code L-560
  599. C Lawrence Livermore National Laboratory
  600. C Post Office Box 5509
  601. C Livermore, CA 94550
  602. C Jefferson, T. H., (SNLL)
  603. C Org. 8235
  604. C Sandia National Laboratories Livermore
  605. C Livermore, CA 94550
  606. C Suyehiro, T., (LLNL)
  607. C Mail Code L-316
  608. C Lawrence Livermore National Laboratory
  609. C Post Office Box 808
  610. C Livermore, CA 94550
  611. C***DESCRIPTION
  612. C
  613. C *Usage:
  614. C
  615. C INTEGER IERR
  616. C REAL X, Y, Z
  617. C
  618. C CALL ADDXY (X, Y, Z, IERR)
  619. C
  620. C *Arguments:
  621. C
  622. C X :IN This is one of the operands to be added. It will not
  623. C be modified by ADDXY.
  624. C
  625. C Y :IN This is the other operand to be added. It will not be
  626. C modified by ADDXY.
  627. C
  628. C Z :OUT This is the sum of X and Y. In case of an error,
  629. C this argument will not be modified.
  630. C
  631. C IERR:OUT This argument will be set to 0 if ADDXY added the two
  632. C operands. It will be set to 1 if it appears the addition
  633. C would generate a result that might overflow.
  634. C
  635. C *Description:
  636. C
  637. C ADDXY first divides X and Y by the largest single precision number
  638. C and then adds the quotients. If the absolute value of the sum is
  639. C greater than 1.0, ADDXY returns with IERR set to 1. Otherwise
  640. C ADDXY stores X and Y into an internal array and calls ADDZZ to add
  641. C them. This increases the probability (but does not guarantee) that
  642. C operands and result are stored into memory to avoid retention of
  643. C extra bits in overlength registers or cache.
  644. C
  645. C***REFERENCES W. M. Gentleman and S. B. Marovich, More on algorithms
  646. C that reveal properties of floating point arithmetic
  647. C units, Communications of the ACM, 17 (1974), pp.
  648. C 276-277.
  649. C***ROUTINES CALLED ADDZZ, R1MACH, XERMSG
  650. C***REVISION HISTORY (YYMMDD)
  651. C 831109 DATE WRITTEN
  652. C 880325 Modified to meet new SLATEC prologue standards. Only
  653. C comment lines were modified.
  654. C 881103 Brought DESCRIPTION section up to Appendix E standards.
  655. C 921215 REFERENCE section modified to reflect recommended style.
  656. C***END PROLOGUE ADDXY
  657. DIMENSION R(3)
  658. C***FIRST EXECUTABLE STATEMENT ADDXY
  659. BIG = R1MACH( 2 )
  660. C
  661. C This is an example program, not meant to be taken seriously. The
  662. C following illustrates the use of XERMSG to send an error message.
  663. C
  664. IF ( (ABS((X/BIG)+(Y/BIG))-1.0) .GT. 0.0 ) THEN
  665. IERR = 1
  666. CALL XERMSG ( 'SLATEC', 'ADDXY', 'Addition of the operands '//
  667. * 'is likely to cause overflow', IERR, 1 )
  668. ELSE
  669. IERR = 0
  670. R(1) = X
  671. R(2) = Y
  672. CALL ADDZZ( R )
  673. Z = R(3)
  674. ENDIF
  675. RETURN
  676. END
  677. SUBROUTINE ADDZZ (R)
  678. C***BEGIN PROLOGUE ADDZZ
  679. C***SUBSIDIARY
  680. C***PURPOSE This routine adds two single precision numbers.
  681. C***LIBRARY SLATEC
  682. C***AUTHOR Fong, K. W., (NMFECC)
  683. C Mail Code L-560
  684. C Lawrence Livermore National Laboratory
  685. C Post Office Box 5509
  686. C Livermore, CA 94550
  687. C Jefferson, T. H., (SNLL)
  688. C Org. 8235
  689. C Sandia National Laboratories Livermore
  690. C Livermore, CA 94550
  691. C Suyehiro, T., (LLNL)
  692. C Mail Code L-316
  693. C Lawrence Livermore National Laboratory
  694. C Post Office Box 808
  695. C Livermore, CA 94550
  696. C***SEE ALSO ADDXY
  697. C***ROUTINES CALLED (NONE)
  698. C***REVISION HISTORY (YYMMDD)
  699. C 831109 DATE WRITTEN
  700. C 880325 Modified to meet new SLATEC prologue standards. Only
  701. C comment lines were modified.
  702. C***END PROLOGUE ADDZZ
  703. DIMENSION R(3)
  704. C***FIRST EXECUTABLE STATEMENT ADDZZ
  705. R(3) = R(1) + R(2)
  706. RETURN
  707. END
  708. *******************************************************************************
  709. SECTION 10. SLATEC QUICK CHECK PHILOSOPHY
  710. The SLATEC Library is distributed with a set of test programs that may be used
  711. as an aid to insure that the Library is installed correctly. This set of test
  712. programs is known as the SLATEC quick checks. The quick checks are not meant
  713. to provide an exhaustive test of the Library. Instead they are designed to
  714. protect against gross errors, such as an unsatisfied external. Because the
  715. SLATEC Library runs on a great variety of computers, the quick checks often
  716. detect arithmetic difficulties with either particular Library routines or with
  717. a particular computational environment.
  718. A list of the quick check guidelines follows.
  719. 1. A quick check should test a few problems successfully solved by a
  720. particular library subprogram. It is not intended to be an extensive
  721. test of a subprogram.
  722. 2. A quick check should provide consistent and minimal output in most
  723. cases, including a "PASS" or "FAIL" indicator. However, more detailed
  724. output should be available on request to help track down problems in the
  725. case of failures.
  726. 3. Some reasonable error conditions should be tested by the quick check by
  727. purposefully referencing the routine incorrectly.
  728. 4. A quick check subprogram is expected to execute correctly on any machine
  729. with an ANSI Fortran 77 compiler and library. No test should have to be
  730. skipped to avoid an abort on a particular machine.
  731. 5. As distributed on the SLATEC tape, the quick check package consists of a
  732. number of quick check main programs and a moderate number of subprograms.
  733. Each quick check main program, more frequently called a quick check driver,
  734. calls one or more quick check subprograms. Usually, a given driver
  735. initiates the tests for a broadly related set of subprograms, e.g. for the
  736. single precision Basic Linear Algebra Subprograms (BLAS). Each quick
  737. check subprogram will test one or more closely related library routines of
  738. the same precision. For example, single precision routines and their
  739. double precision equivalents are not to be tested in the same quick check
  740. subprogram.
  741. 6. The format of the quick check package does not rigidly dictate how it
  742. must be executed on a particular machine. For example, memory size of the
  743. machine might preclude loading all quick check modules at once.
  744. *******************************************************************************
  745. SECTION 11. SPECIFIC PROGRAMMING STANDARDS FOR SLATEC QUICK CHECKS
  746. Just as the routines in the SLATEC Common Mathematical Library must meet
  747. certain standards, so must the quick checks. These standards are meant to
  748. ensure that the quick checks adhere to the SLATEC quick check philosophy and
  749. to enhance maintainability. The list of these quick check standards follow.
  750. 1. Each module must test only a few related library subprograms.
  751. 2. Each module must be in the form of a subroutine with three arguments.
  752. For example:
  753. SUBROUTINE ADTST (LUN, KPRINT, IPASS)
  754. The first is an input argument giving the unit number to which any output
  755. should be written. The second is an input argument specifying the amount
  756. of printing to be done by the quick check subroutine. The third is an
  757. output flag indicating passage or failure of the subroutine.
  758. LUN Unit number to which any output should be written.
  759. KPRINT = 0 No printing is done (pass/fail is presumably monitored at a
  760. higher level, i.e. in the driver). Error messages will not be
  761. printed since the quick check driver sets the error handling
  762. control flag to 0, using CALL XSETF(0) when KPRINT = 0 or 1.
  763. = 1 No printing is done for tests which pass; a short message
  764. (e.g., one line) is printed for tests which fail. Error
  765. messages will not be printed since the quick check driver sets
  766. the error handling control flag to 0, using CALL XSETF(0)
  767. when KPRINT = 0 or 1.
  768. = 2 A short message is printed for tests which pass; more detailed
  769. information is printed for tests which fail. Error messages
  770. describing the reason for failure should be printed.
  771. = 3 (Possibly) quite detailed information is printed for all tests.
  772. Error messages describing the reason for failure should be
  773. printed.
  774. IPASS = 0 Indicates failure of the quick check subroutine (i.e., at least
  775. one test failed).
  776. = 1 Indicates that all tests passed in the quick check subroutine.
  777. In the case of a subroutine whose purpose is to produce output (e.g., a
  778. printer-plotter), output of a more detailed nature might be produced for
  779. KPRINT >= 1.
  780. The quick check must execute correctly and completely using each value
  781. of KPRINT. KPRINT is used only to control the printing and does not
  782. affect the tests made of the SLATEC routine.
  783. 3. The quick check subprograms must be written in ANSI Fortran 77 and
  784. must make use of I1MACH, R1MACH, and D1MACH for pass/fail tolerances.
  785. 4. Where possible, compute constants in a machine independent fashion. For
  786. example, PI = 4. * ATAN(1.0)
  787. 5. Using one library routine to test another is permitted, though this should
  788. be done with care.
  789. 6. Known solutions can be stored using DATA or PARAMETER statements. Some
  790. subprograms return a "solution" which is more than one number - for
  791. example, the eigenvalues of a matrix. In these cases, take special care
  792. that the quick check test passes for ALL orderings of the output which are
  793. mathematically correct.
  794. 7. Where subprograms are required by a routine being tested, they
  795. should accompany the quick check. However, care should be taken so that
  796. no two such subprograms have the same name. Choosing esoteric or odd
  797. names is a good idea. It is extremely desirable that each such
  798. subprogram contain comments indicating which quick check needed it
  799. (a C***SEE ALSO line should be used).
  800. 8. Detailed output should be self-contained yet concise. No external
  801. reference material or additional computations should be required to
  802. determine what, for example, the correct solution to the problem really is.
  803. 9. For purposes of tracking down the cause of a failure, external reference
  804. material or the name of a (willing) qualified expert should be listed in
  805. the comment section of the quick check.
  806. 10. Quick checks must have SLATEC prologues and be adequately commented
  807. and cleanly written so that the average software librarian has some hope
  808. of tracking down problems. For example, if a test problem is known to
  809. be tricky or if difficulties are expected for short word length
  810. machines, an appropriate comment would be helpful.
  811. 11. After deliberately calling a library routine with incorrect arguments,
  812. invoke the function IERR=NUMXER(NERR) to verify that the correct error
  813. number was set. (NUMXER is a function in the SLATEC error handling
  814. package that returns the number of the most recent error via both the
  815. function value and the argument.) Then CALL XERCLR to clear it before
  816. this (or the next) quick check makes another error.
  817. 12. A quick check should be written in such a way that it will execute
  818. identically if called several times in the same program. In particular,
  819. there should be no modification of DATA loaded variables which cause the
  820. quick check to start with the wrong values on subsequent calls.
  821. *******************************************************************************
  822. SECTION 12. QUICK CHECK DRIVERS (MAIN PROGRAMS)
  823. Many people writing quick checks are not aware of the environment in which the
  824. individual quick check is called. The following aspects of the quick check
  825. drivers are illustrated by the example driver in Section 14.
  826. 1. Each quick check driver will call one or more quick check subprograms.
  827. 2. The input and output units for the tests are set in the driver.
  828. LIN = I1MACH(1) the input unit
  829. LUN = I1MACH(2) the output unit
  830. The output unit is communicated to the quick check subprograms
  831. through the argument list. All output should be directed to the unit LUN
  832. that is in the argument list.
  833. 3. Each quick check has three arguments LUN, KPRINT, and IPASS. The
  834. meaning of these arguments within the quick checks is detailed
  835. thoroughly in the previous section.
  836. a. The quick check driver reads in KPRINT without a prompt, and
  837. passes KPRINT as an argument to each quick check it calls. KPRINT must
  838. not be changed by any driver or quick check. The driver uses KPRINT to
  839. help determine what output to write.
  840. b. The variable IPASS must be set to 0 (for fail) or to 1 (for pass) by
  841. each quick check before returning to the driver. Within the driver,
  842. the variable NFAIL is set to 0. If IPASS = 0 upon return to the
  843. driver, then NFAIL is incremented. After calling all the quick checks,
  844. NFAIL will then have the number of quick checks which failed.
  845. c. Quick check driver output should follow this chart:
  846. NFAIL OUTPUT
  847. ----- ------
  848. not 0 driver writes fail message
  849. 0 driver writes pass message
  850. 4. There are calls to three SLATEC error handler routines in each quick check
  851. driver:
  852. CALL XSETUN(LUN) Selects unit LUN as the unit to which
  853. error messages will be sent.
  854. CALL XSETF(1) Only fatal (not recoverable) error messages
  855. or XSETF(0) will cause an abort. XSETF sets the
  856. KONTROL variable for the error handler
  857. routines to the value of the XSETF
  858. argument. A value of either 0 or 1 will
  859. make only fatal errors cause a program
  860. abort. A value of 1 will allow printing
  861. of error messages, while a value of zero
  862. will print only fatal error messages.
  863. CALL XERMAX(1000) Increase the number of times any
  864. single message may be printed.
  865. *******************************************************************************
  866. SECTION 13. QUICK CHECK SUBROUTINE EXAMPLE
  867. The following program provides a very minimal check of the sample routine
  868. from Section 9.
  869. SUBROUTINE ADTST (LUN, KPRINT, IPASS)
  870. C***BEGIN PROLOGUE ADTST
  871. C***SUBSIDIARY
  872. C***PURPOSE Quick check for SLATEC routine ADDXY
  873. C***LIBRARY SLATEC
  874. C***CATEGORY A3A
  875. C***TYPE SINGLE PRECISION (ADTST-S, DADTST-D)
  876. C***KEYWORDS QUICK CHECK, ADDXY,
  877. C***AUTHOR Suyehiro, Tok, (LLNL)
  878. C Walton, Lee, (SNL)
  879. C***ROUTINES CALLED ADDXY, R1MACH
  880. C***REVISION HISTORY (YYMMDD)
  881. C 880511 DATE WRITTEN
  882. C 880608 Revised to meet new prologue standards.
  883. C***END PROLOGUE ADTST
  884. C
  885. C***FIRST EXECUTABLE STATEMENT ADTST
  886. IF ( KPRINT .GE. 2 ) WRITE (LUN,99999)
  887. 99999 FORMAT ('OUTPUT FROM ADTST')
  888. IPASS = 1
  889. C
  890. C EXAMPLE PROBLEM
  891. X = 1.
  892. Y = 2.
  893. CALL ADDXY(X, Y, Z, IERR)
  894. EPS = R1MACH(4)
  895. IF( (ABS(Z-3.) .GT. EPS) .OR. (IERR .EQ. 1) ) IPASS = 0
  896. IF ( KPRINT .GE. 2 ) THEN
  897. WRITE (LUN,99995)X, Y, Z
  898. 99995 FORMAT (/' EXAMPLE PROBLEM ',/' X = ',E20.13,' Y = ',E20.13,' Z = ',
  899. * E20.13)
  900. ENDIF
  901. IF ( (IPASS .EQ. 1 ) .AND. (KPRINT .GT. 1) ) WRITE (LUN,99994)
  902. IF ( (IPASS .EQ. 0 ) .AND. (KPRINT .NE. 0) ) WRITE (LUN,99993)
  903. 99994 FORMAT(/' ***************ADDXY PASSED ALL TESTS***************')
  904. 99993 FORMAT(/' ***************ADDXY FAILED SOME TESTS***************')
  905. RETURN
  906. END
  907. *******************************************************************************
  908. SECTION 14. QUICK CHECK MAIN PROGRAM EXAMPLE
  909. The following is an example main program which should be used to drive a quick
  910. check. The names of the quick check subroutines it calls, ADTST and DADTST,
  911. should be replaced with the name or names of real quick checks. The dummy
  912. names of the SLATEC routines being tested, ADDXY and DADDXY, should be
  913. replaced with the names of the routines which are actually being tested.
  914. PROGRAM TEST00
  915. C***BEGIN PROLOGUE TEST00
  916. C***SUBSIDIARY
  917. C***PURPOSE Driver for testing SLATEC subprograms
  918. C ADDXY DADDXY
  919. C***LIBRARY SLATEC
  920. C***CATEGORY A3
  921. C***TYPE ALL (TEST00-A)
  922. C***KEYWORDS QUICK CHECK DRIVER, ADDXY, DADDXY
  923. C***AUTHOR Suyehiro, Tok, (LLNL)
  924. C Walton, Lee, (SNL)
  925. C***DESCRIPTION
  926. C
  927. C *Usage:
  928. C One input data record is required
  929. C READ (LIN,990) KPRINT
  930. C 990 FORMAT (I1)
  931. C
  932. C *Arguments:
  933. C KPRINT = 0 Quick checks - No printing.
  934. C Driver - Short pass or fail message printed.
  935. C 1 Quick checks - No message printed for passed tests,
  936. C short message printed for failed tests.
  937. C Driver - Short pass or fail message printed.
  938. C 2 Quick checks - Print short message for passed tests,
  939. C fuller information for failed tests.
  940. C Driver - Pass or fail message printed.
  941. C 3 Quick checks - Print complete quick check results.
  942. C Driver - Pass or fail message printed.
  943. C
  944. C *Description:
  945. C Driver for testing SLATEC subprograms
  946. C ADDXY DADDXY
  947. C
  948. C***REFERENCES (NONE)
  949. C***ROUTINES CALLED ADTST, DADTST, I1MACH, XERMAX, XSETF, XSETUN
  950. C***REVISION HISTORY (YYMMDD)
  951. C 880511 DATE WRITTEN
  952. C 880608 Revised to meet the new SLATEC prologue standards.
  953. C 881103 Brought DESCRIPTION section up to Appendix E standards.
  954. C***END PROLOGUE TEST00
  955. C
  956. C***FIRST EXECUTABLE STATEMENT TEST00
  957. LUN = I1MACH(2)
  958. LIN = I1MACH(1)
  959. NFAIL = 0
  960. C
  961. C Read KPRINT parameter
  962. C
  963. READ (LIN,990) KPRINT
  964. 990 FORMAT (I1)
  965. CALL XSETUN(LUN)
  966. IF ( KPRINT .LE. 1 ) THEN
  967. CALL XSETF(0)
  968. ELSE
  969. CALL XSETF(1)
  970. ENDIF
  971. CALL XERMAX(1000)
  972. C
  973. C Test ADDXY
  974. C
  975. CALL ADTST(LUN, KPRINT, IPASS)
  976. IF ( IPASS .EQ. 0 ) NFAIL = NFAIL + 1
  977. C
  978. C Test DADDXY
  979. C
  980. CALL DADTST(LUN, KPRINT, IPASS)
  981. IF ( IPASS .EQ. 0 ) NFAIL = NFAIL + 1
  982. C
  983. IF ( NFAIL .GT. 0 ) WRITE (LUN,980) NFAIL
  984. 980 FORMAT (/' ************* WARNING -- ', I5,
  985. * ' TEST(S) FAILED IN PROGRAM TEST00 *************' )
  986. IF ( NFAIL .EQ. 0 ) WRITE (LUN,970)
  987. 970 FORMAT
  988. * (/' --------------TEST00 PASSED ALL TESTS----------------')
  989. END
  990. *******************************************************************************
  991. APPENDIX A. GAMS (AND SLATEC) CLASSIFICATION SCHEME
  992. SLATEC has adopted the GAMS (Guide to Available Mathematical Software)
  993. Classification Scheme for Mathematical and Statistical Software,
  994. reference [5].
  995. GAMS (and SLATEC) Classification Scheme
  996. for
  997. Mathematical and Statistical Software
  998. Version 1.2 October 1983
  999. A. Arithmetic, error analysis
  1000. A1. Integer
  1001. A2. Rational
  1002. A3. Real
  1003. A3A. Single precision
  1004. A3B. Double precision
  1005. A3C. Extended precision
  1006. A3D. Extended range
  1007. A4. Complex
  1008. A4A. Single precision
  1009. A4B. Double precision
  1010. A4C. Extended precision
  1011. A4D. Extended range
  1012. A5. Interval
  1013. A5A. Real
  1014. A5B. Complex
  1015. A6. Change of representation
  1016. A6A. Type conversion
  1017. A6B. Base conversion
  1018. A6C. Decomposition, construction
  1019. A7. Sequences (e.g., convergence acceleration)
  1020. B. Number theory
  1021. C. Elementary and special functions (search also class L5)
  1022. C1. Integer-valued functions (e.g., floor, ceiling, factorial, binomial
  1023. coefficient)
  1024. C2. Powers, roots, reciprocals
  1025. C3. Polynomials
  1026. C3A. Orthogonal
  1027. C3A1. Trigonometric
  1028. C3A2. Chebyshev, Legendre
  1029. C3A3. Laguerre
  1030. C3A4. Hermite
  1031. C3B. Non-orthogonal
  1032. C4. Elementary transcendental functions
  1033. C4A. Trigonometric, inverse trigonometric
  1034. C4B. Exponential, logarithmic
  1035. C4C. Hyperbolic, inverse hyperbolic
  1036. C4D. Integrals of elementary transcendental functions
  1037. C5. Exponential and logarithmic integrals
  1038. C6. Cosine and sine integrals
  1039. C7. Gamma
  1040. C7A. Gamma, log gamma, reciprocal gamma
  1041. C7B. Beta, log beta
  1042. C7C. Psi function
  1043. C7D. Polygamma function
  1044. C7E. Incomplete gamma
  1045. C7F. Incomplete beta
  1046. C7G. Riemann zeta
  1047. C8. Error functions
  1048. C8A. Error functions, their inverses, integrals, including the normal
  1049. distribution function
  1050. C8B. Fresnel integrals
  1051. C8C. Dawson's integral
  1052. C9. Legendre functions
  1053. C10. Bessel functions
  1054. C10A. J, Y, H-(1), H-(2)
  1055. C10A1. Real argument, integer order
  1056. C10A2. Complex argument, integer order
  1057. C10A3. Real argument, real order
  1058. C10A4. Complex argument, real order
  1059. C10A5. Complex argument, complex order
  1060. C10B. I, K
  1061. C10B1. Real argument, integer order
  1062. C10B2. Complex argument, integer order
  1063. C10B3. Real argument, real order
  1064. C10B4. Complex argument, real order
  1065. C10B5. Complex argument, complex order
  1066. C10C. Kelvin functions
  1067. C10D. Airy and Scorer functions
  1068. C10E. Struve, Anger, and Weber functions
  1069. C10F. Integrals of Bessel functions
  1070. C11. Confluent hypergeometric functions
  1071. C12. Coulomb wave functions
  1072. C13. Jacobian elliptic functions, theta functions
  1073. C14. Elliptic integrals
  1074. C15. Weierstrass elliptic functions
  1075. C16. Parabolic cylinder functions
  1076. C17. Mathieu functions
  1077. C18. Spheroidal wave functions
  1078. C19. Other special functions
  1079. D. Linear Algebra
  1080. D1. Elementary vector and matrix operations
  1081. D1A. Elementary vector operations
  1082. D1A1. Set to constant
  1083. D1A2. Minimum and maximum components
  1084. D1A3. Norm
  1085. D1A3A. L-1 (sum of magnitudes)
  1086. D1A3B. L-2 (Euclidean norm)
  1087. D1A3C. L-infinity (maximum magnitude)
  1088. D1A4. Dot product (inner product)
  1089. D1A5. Copy or exchange (swap)
  1090. D1A6. Multiplication by scalar
  1091. D1A7. Triad (a*x+y for vectors x,y and scalar a)
  1092. D1A8. Elementary rotation (Givens transformation)
  1093. D1A9. Elementary reflection (Householder transformation)
  1094. D1A10. Convolutions
  1095. D1B. Elementary matrix operations
  1096. D1B1. Set to zero, to identity
  1097. D1B2. Norm
  1098. D1B3. Transpose
  1099. D1B4. Multiplication by vector
  1100. D1B5. Addition, subtraction
  1101. D1B6. Multiplication
  1102. D1B7. Matrix polynomial
  1103. D1B8. Copy
  1104. D1B9. Storage mode conversion
  1105. D1B10. Elementary rotation (Givens transformation)
  1106. D1B11. Elementary reflection (Householder transformation)
  1107. D2. Solution of systems of linear equations (including inversion, LU and
  1108. related decompositions)
  1109. D2A. Real nonsymmetric matrices
  1110. D2A1. General
  1111. D2A2. Banded
  1112. D2A2A. Tridiagonal
  1113. D2A3. Triangular
  1114. D2A4. Sparse
  1115. D2B. Real symmetric matrices
  1116. D2B1. General
  1117. D2B1A. Indefinite
  1118. D2B1B. Positive definite
  1119. D2B2. Positive definite banded
  1120. D2B2A. Tridiagonal
  1121. D2B4. Sparse
  1122. D2C. Complex non-Hermitian matrices
  1123. D2C1. General
  1124. D2C2. Banded
  1125. D2C2A. Tridiagonal
  1126. D2C3. Triangular
  1127. D2C4. Sparse
  1128. D2D. Complex Hermitian matrices
  1129. D2D1. General
  1130. D2D1A. Indefinite
  1131. D2D1B. Positive definite
  1132. D2D2. Positive definite banded
  1133. D2D2A. Tridiagonal
  1134. D2D4. Sparse
  1135. D2E. Associated operations (e.g., matrix reorderings)
  1136. D3. Determinants
  1137. D3A. Real nonsymmetric matrices
  1138. D3A1. General
  1139. D3A2. Banded
  1140. D3A2A. Tridiagonal
  1141. D3A3. Triangular
  1142. D3A4. Sparse
  1143. D3B. Real symmetric matrices
  1144. D3B1. General
  1145. D3B1A. Indefinite
  1146. D3B1B. Positive definite
  1147. D3B2. Positive definite banded
  1148. D3B2A. Tridiagonal
  1149. D3B4. Sparse
  1150. D3C. Complex non-Hermitian matrices
  1151. D3C1. General
  1152. D3C2. Banded
  1153. D3C2A. Tridiagonal
  1154. D3C3. Triangular
  1155. D3C4. Sparse
  1156. D3D. Complex Hermitian matrices
  1157. D3D1. General
  1158. D3D1A. Indefinite
  1159. D3D1B. Positive definite
  1160. D3D2. Positive definite banded
  1161. D3D2A. Tridiagonal
  1162. D3D4. Sparse
  1163. D4. Eigenvalues, eigenvectors
  1164. D4A. Ordinary eigenvalue problems (Ax = (lambda) * x)
  1165. D4A1. Real symmetric
  1166. D4A2. Real nonsymmetric
  1167. D4A3. Complex Hermitian
  1168. D4A4. Complex non-Hermitian
  1169. D4A5. Tridiagonal
  1170. D4A6. Banded
  1171. D4A7. Sparse
  1172. D4B. Generalized eigenvalue problems (e.g., Ax = (lambda)*Bx)
  1173. D4B1. Real symmetric
  1174. D4B2. Real general
  1175. D4B3. Complex Hermitian
  1176. D4B4. Complex general
  1177. D4B5. Banded
  1178. D4C. Associated operations
  1179. D4C1. Transform problem
  1180. D4C1A. Balance matrix
  1181. D4C1B. Reduce to compact form
  1182. D4C1B1. Tridiagonal
  1183. D4C1B2. Hessenberg
  1184. D4C1B3. Other
  1185. D4C1C. Standardize problem
  1186. D4C2. Compute eigenvalues of matrix in compact form
  1187. D4C2A. Tridiagonal
  1188. D4C2B. Hessenberg
  1189. D4C2C. Other
  1190. D4C3. Form eigenvectors from eigenvalues
  1191. D4C4. Back transform eigenvectors
  1192. D4C5. Determine Jordan normal form
  1193. D5. QR decomposition, Gram-Schmidt orthogonalization
  1194. D6. Singular value decomposition
  1195. D7. Update matrix decompositions
  1196. D7A. LU
  1197. D7B. Cholesky
  1198. D7C. QR
  1199. D7D. Singular value
  1200. D8. Other matrix equations (e.g., AX+XB=C)
  1201. D9. Overdetermined or underdetermined systems of equations, singular systems,
  1202. pseudo-inverses (search also classes D5, D6, K1a, L8a)
  1203. E. Interpolation
  1204. E1. Univariate data (curve fitting)
  1205. E1A. Polynomial splines (piecewise polynomials)
  1206. E1B. Polynomials
  1207. E1C. Other functions (e.g., rational, trigonometric)
  1208. E2. Multivariate data (surface fitting)
  1209. E2A. Gridded
  1210. E2B. Scattered
  1211. E3. Service routines (e.g., grid generation, evaluation of fitted functions)
  1212. (search also class N5)
  1213. F. Solution of nonlinear equations
  1214. F1. Single equation
  1215. F1A. Smooth
  1216. F1A1. Polynomial
  1217. F1A1A. Real coefficients
  1218. F1A1B. Complex coefficients
  1219. F1A2. Nonpolynomial
  1220. F1B. General (no smoothness assumed)
  1221. F2. System of equations
  1222. F2A. Smooth
  1223. F2B. General (no smoothness assumed)
  1224. F3. Service routines (e.g., check user-supplied derivatives)
  1225. G. Optimization (search also classes K, L8)
  1226. G1. Unconstrained
  1227. G1A. Univariate
  1228. G1A1. Smooth function
  1229. G1A1A. User provides no derivatives
  1230. G1A1B. User provides first derivatives
  1231. G1A1C. User provides first and second derivatives
  1232. G1A2. General function (no smoothness assumed)
  1233. G1B. Multivariate
  1234. G1B1. Smooth function
  1235. G1B1A. User provides no derivatives
  1236. G1B1B. User provides first derivatives
  1237. G1B1C. User provides first and second derivatives
  1238. G1B2. General function (no smoothness assumed)
  1239. G2. Constrained
  1240. G2A. Linear programming
  1241. G2A1. Dense matrix of constraints
  1242. G2A2. Sparse matrix of constraints
  1243. G2B. Transportation and assignments problem
  1244. G2C. Integer programming
  1245. G2C1. Zero/one
  1246. G2C2. Covering and packing problems
  1247. G2C3. Knapsack problems
  1248. G2C4. Matching problems
  1249. G2C5. Routing, scheduling, location problems
  1250. G2C6. Pure integer programming
  1251. G2C7. Mixed integer programming
  1252. G2D. Network (for network reliability search class M)
  1253. G2D1. Shortest path
  1254. G2D2. Minimum spanning tree
  1255. G2D3. Maximum flow
  1256. G2D3A. Generalized networks
  1257. G2D3B. Networks with side constraints
  1258. G2D4. Test problem generation
  1259. G2E. Quadratic programming
  1260. G2E1. Positive definite Hessian (i.e. convex problem)
  1261. G2E2. Indefinite Hessian
  1262. G2F. Geometric programming
  1263. G2G. Dynamic programming
  1264. G2H. General nonlinear programming
  1265. G2H1. Simple bounds
  1266. G2H1A. Smooth function
  1267. G2H1A1. User provides no derivatives
  1268. G2H1A2. User provides first derivatives
  1269. G2H1A3. User provides first and second derivatives
  1270. G2H1B. General function (no smoothness assumed)
  1271. G2H2. Linear equality or inequality constraints
  1272. G2H2A. Smooth function
  1273. G2H2A1. User provides no derivatives
  1274. G2H2A2. User provides first derivatives
  1275. G2H2A3. User provides first and second derivatives
  1276. G2H2B. General function (no smoothness assumed)
  1277. G2H3. Nonlinear constraints
  1278. G2H3A. Equality constraints only
  1279. G2H3A1. Smooth function and constraints
  1280. G2H3A1A. User provides no derivatives
  1281. G2H3A1B. User provides first derivatives of function and constraints
  1282. G2H3A1C. User provides first and second derivatives of function and
  1283. constraints
  1284. G2H3A2. General function and constraints (no smoothness assumed)
  1285. G2H3B. Equality and inequality constraints
  1286. G2H3B1. Smooth function and constraints
  1287. G2H3B1A. User provides no derivatives
  1288. G2H3B1B. User provides first derivatives of function and constraints
  1289. G2H3B1C. User provides first and second derivatives of function and
  1290. constraints
  1291. G2H3B2. General function and constraints (no smoothness assumed)
  1292. G2I. Global solution to nonconvex problems
  1293. G3. Optimal control
  1294. G4. Service routines
  1295. G4A. Problem input (e.g., matrix generation)
  1296. G4B. Problem scaling
  1297. G4C. Check user-supplied derivatives
  1298. G4D. Find feasible point
  1299. G4E. Check for redundancy
  1300. G4F. Other
  1301. H. Differentiation, integration
  1302. H1. Numerical differentiation
  1303. H2. Quadrature (numerical evaluation of definite integrals)
  1304. H2A. One-dimensional integrals
  1305. H2A1. Finite interval (general integrand)
  1306. H2A1A. Integrand available via user-defined procedure
  1307. H2A1A1. Automatic (user need only specify required accuracy)
  1308. H2A1A2. Nonautomatic
  1309. H2A1B. Integrand available only on grid
  1310. H2A1B1. Automatic (user need only specify required accuracy)
  1311. H2A1B2. Nonautomatic
  1312. H2A2. Finite interval (specific or special type integrand including weight
  1313. functions, oscillating and singular integrands, principal value
  1314. integrals, splines, etc.)
  1315. H2A2A. Integrand available via user-defined procedure
  1316. H2A2A1. Automatic (user need only specify required accuracy)
  1317. H2A2A2. Nonautomatic
  1318. H2A2B. Integrand available only on grid
  1319. H2A2B1. Automatic (user need only specify required accuracy)
  1320. H2A2B2. Nonautomatic
  1321. H2A3. Semi-infinite interval (including e**(-x) weight function)
  1322. H2A3A. Integrand available via user-defined procedure
  1323. H2A3A1. Automatic (user need only specify required accuracy)
  1324. H2A3A2. Nonautomatic
  1325. H2A4. Infinite interval (including e**(-x**2)) weight function)
  1326. H2A4A. Integrand available via user-defined procedure
  1327. H2A4A1. Automatic (user need only specify required accuracy)
  1328. H2A4A2. Nonautomatic
  1329. H2B. Multidimensional integrals
  1330. H2B1. One or more hyper-rectangular regions
  1331. H2B1A. Integrand available via user-defined procedure
  1332. H2B1A1. Automatic (user need only specify required accuracy)
  1333. H2B1A2. Nonautomatic
  1334. H2B1B. Integrand available only on grid
  1335. H2B1B1. Automatic (user need only specify required accuracy)
  1336. H2B1B2. Nonautomatic
  1337. H2B2. Nonrectangular region, general region
  1338. H2B2A. Integrand available via user-defined procedure
  1339. H2B2A1. Automatic (user need only specify required accuracy)
  1340. H2B2A2. Nonautomatic
  1341. H2B2B. Integrand available only on grid
  1342. H2B2B1. Automatic (user need only specify required accuracy)
  1343. H2B2B2. Nonautomatic
  1344. H2C. Service routines (compute weight and nodes for quadrature formulas)
  1345. I. Differential and integral equations
  1346. I1. Ordinary differential equations
  1347. I1A. Initial value problems
  1348. I1A1. General, nonstiff or mildly stiff
  1349. I1A1A. One-step methods (e.g., Runge-Kutta)
  1350. I1A1B. Multistep methods (e.g., Adams' predictor-corrector)
  1351. I1A1C. Extrapolation methods (e.g., Bulirsch-Stoer)
  1352. I1A2. Stiff and mixed algebraic-differential equations
  1353. I1B. Multipoint boundary value problems
  1354. I1B1. Linear
  1355. I1B2. Nonlinear
  1356. I1B3. Eigenvalue (e.g., Sturm-Liouville)
  1357. I1C. Service routines (e.g., interpolation of solutions, error handling)
  1358. I2. Partial differential equations
  1359. I2A. Initial boundary value problems
  1360. I2A1. Parabolic
  1361. I2A1A. One spatial dimension
  1362. I2A1B. Two or more spatial dimensions
  1363. I2A2. Hyperbolic
  1364. I2B. Elliptic boundary value problems
  1365. I2B1. Linear
  1366. I2B1A. Second order
  1367. I2B1A1. Poisson (Laplace) or Helmholz equation
  1368. I2B1A1A. Rectangular domain (or topologically rectangular in the coordinate
  1369. system)
  1370. I2B1A1B. Nonrectangular domain
  1371. I2B1A2. Other separable problems
  1372. I2B1A3. Nonseparable problems
  1373. I2B1C. Higher order equations (e.g., biharmonic)
  1374. I2B2. Nonlinear
  1375. I2B3. Eigenvalue
  1376. I2B4. Service routines
  1377. I2B4A. Domain triangulation (search also class P2a2c1)
  1378. I2B4B. Solution of discretized elliptic equations
  1379. I3. Integral equations
  1380. J. Integral transforms
  1381. J1. Fast Fourier transforms (search class L10 for time series analysis)
  1382. J1A. One-dimensional
  1383. J1A1. Real
  1384. J1A2. Complex
  1385. J1A3. Trigonometric (sine, cosine)
  1386. J1B. Multidimensional
  1387. J2. Convolutions
  1388. J3. Laplace transforms
  1389. J4. Hilbert transforms
  1390. K. Approximation (search also class L8)
  1391. K1. Least squares (L-2) approximation
  1392. K1A. Linear least squares (search also classes D5, D6, D9)
  1393. K1A1. Unconstrained
  1394. K1A1A. Univariate data (curve fitting)
  1395. K1A1A1. Polynomial splines (piecewise polynomials)
  1396. K1A1A2. Polynomials
  1397. K1A1A3. Other functions (e.g., rational, trigonometric, user-specified)
  1398. K1A1B. Multivariate data (surface fitting)
  1399. K1A2. Constrained
  1400. K1A2A. Linear constraints
  1401. K1A2B. Nonlinear constraints
  1402. K1B. Nonlinear least squares
  1403. K1B1. Unconstrained
  1404. K1B1A. Smooth functions
  1405. K1B1A1. User provides no derivatives
  1406. K1B1A2. User provides first derivatives
  1407. K1B1A3. User provides first and second derivatives
  1408. K1B1B. General functions
  1409. K1B2. Constrained
  1410. K1B2A. Linear constraints
  1411. K1B2B. Nonlinear constraints
  1412. K2. Minimax (L-infinity) approximation
  1413. K3. Least absolute value (L-1) approximation
  1414. K4. Other analytic approximations (e.g., Taylor polynomial, Pade)
  1415. K5. Smoothing
  1416. K6. Service routines (e.g., mesh generation, evaluation of fitted functions)
  1417. (search also class N5)
  1418. L. Statistics, probability
  1419. L1. Data summarization
  1420. L1A. One univariate quantitative sample
  1421. L1A1. Ungrouped data
  1422. L1A1A. Location
  1423. L1A1B. Dispersion
  1424. L1A1C. Shape
  1425. L1A1D. Distribution, density
  1426. L1A2. Ungrouped data with missing values
  1427. L1A3. Grouped data
  1428. L1A3A. Location
  1429. L1A3B. Dispersion
  1430. L1A3C. Shape
  1431. L1C. One univariate qualitative (proportional) sample
  1432. L1E. Two or more univariate samples or one multivariate sample
  1433. L1E1. Ungrouped data
  1434. L1E1A. Location
  1435. L1E1B. Correlation
  1436. L1E2. Ungrouped data with missing values
  1437. L1E3. Grouped data
  1438. L1F. Two or more multivariate samples
  1439. L2. Data manipulation (search also class N)
  1440. L2A. Transform (search also class N6 for sorting, ranking)
  1441. L2B. Group
  1442. L2C. Sample
  1443. L2D. Subset
  1444. L3. Graphics (search also class Q)
  1445. L3A. Histograms
  1446. L3B. Distribution functions
  1447. L3C. Scatter diagrams
  1448. L3C1. Y vs. X
  1449. L3C2. Symbol plots
  1450. L3C3. Multiple plots
  1451. L3C4. Probability plots
  1452. L3C4B. Beta, binomial
  1453. L3C4C. Cauchy, chi-squared
  1454. L3C4D. Double exponential
  1455. L3C4E. Exponential, extreme value
  1456. L3C4F. F distribution
  1457. L3C4G. Gamma, geometric
  1458. L3C4H. Halfnormal
  1459. L3C4L. Lambda, logistic, lognormal
  1460. L3C4N. Negative binomial, normal
  1461. L3C4P. Pareto, Poisson
  1462. L3C4T. t distribution
  1463. L3C4U. Uniform
  1464. L3C4W. Weibull
  1465. L3C5. Time series plots (X(i) vs. i, vertical, lag)
  1466. L3D. EDA graphics
  1467. L4. Elementary statistical inference, hypothesis testing
  1468. L4A. One univariate quantitative sample
  1469. L4A1. Ungrouped data
  1470. L4A1A. Parameter estimation
  1471. L4A1A2. Binomial
  1472. L4A1A5. Extreme value
  1473. L4A1A14. Normal
  1474. L4A1A16. Poisson
  1475. L4A1A21. Uniform
  1476. L4A1A23. Weibull
  1477. L4A1B. Distribution-free (nonparametric) analysis
  1478. L4A1C. Goodness-of-fit tests
  1479. L4A1D. Tests on sequences of numbers
  1480. L4A1E. Density and distribution function estimation
  1481. L4A1F. Tolerance limits
  1482. L4A2. Ungrouped data with missing values
  1483. L4A3. Grouped data
  1484. L4A3A. Parameter estimation
  1485. L4A3A14. Normal
  1486. L4B. Two or more univariate quantitative samples
  1487. L4B1. Ungrouped data
  1488. L4B1A. Parameter estimation
  1489. L4B1A14. Normal
  1490. L4B1B. Distribution-free (nonparametric) analysis
  1491. L4B2. Ungrouped data with missing values
  1492. L4B3. Grouped data
  1493. L4C. One univariate qualitative (proportional) sample
  1494. L4D. Two or more univariate samples
  1495. L4E. One multivariate sample
  1496. L4E1. Ungrouped data
  1497. L4E1A. Parameter estimation
  1498. L4E1A14. Normal
  1499. L4E1B. Distribution-free (nonparametric) analysis
  1500. L4E2. Ungrouped data with missing values
  1501. L4E2A. Parameter estimation
  1502. L4E2B. Distribution-free (nonparametric) analysis
  1503. L4E3. Grouped data
  1504. L4E3A. Parameter estimation
  1505. L4E3A14. Normal
  1506. L4E3B. Distribution-free (nonparametric) analysis
  1507. L4E4. Two or more multivariate samples
  1508. L4E4A. Parameter estimation
  1509. L4E4A14. Normal
  1510. L5. Function evaluation (search also class C)
  1511. L5A. Univariate
  1512. L5A1. Cumulative distribution functions, probability density functions
  1513. L5A1B. Beta, binomial
  1514. L5A1C. Cauchy, chi-squared
  1515. L5A1D. Double exponential
  1516. L5A1E. Error function, exponential, extreme value
  1517. L5A1F. F distribution
  1518. L5A1G. Gamma, general, geometric
  1519. L5A1H. Halfnormal, hypergeometric
  1520. L5A1K. Kolmogorov-Smirnov
  1521. L5A1L. Lambda, logistic, lognormal
  1522. L5A1N. Negative binomial, normal
  1523. L5A1P. Pareto, Poisson
  1524. L5A1T. t distribution
  1525. L5A1U. Uniform
  1526. L5A1W. Weibull
  1527. L5A2. Inverse cumulative distribution functions, sparsity functions
  1528. L5A2B. Beta, binomial
  1529. L5A2C. Cauchy, chi-squared
  1530. L5A2D. Double exponential
  1531. L5A2E. Exponential, extreme value
  1532. L5A2F. F distribution
  1533. L5A2G. Gamma, general, geometric
  1534. L5A2H. Halfnormal
  1535. L5A2L. Lambda, logistic, lognormal
  1536. L5A2N. Negative binomial, normal, normal scores
  1537. L5A2P. Pareto, Poisson
  1538. L5A2T. t distribution
  1539. L5A2U. Uniform
  1540. L5A2W. Weibull
  1541. L5B. Multivariate
  1542. L5B1. Cumulative distribution functions, probability density functions
  1543. L5B1N. Normal
  1544. L6. Pseudo-random number generation
  1545. L6A. Univariate
  1546. L6A2. Beta, binomial, Boolean
  1547. L6A3. Cauchy, chi-squared
  1548. L6A4. Double exponential
  1549. L6A5. Exponential, extreme value
  1550. L6A6. F distribution
  1551. L6A7. Gamma, general (continuous, discrete) distributions, geometric
  1552. L6A8. Halfnormal, hypergeometric
  1553. L6A9. Integers
  1554. L6A12. Lambda, logical, logistic, lognormal
  1555. L6A14. Negative binomial, normal
  1556. L6A15. Order statistics
  1557. L6A16. Pareto, permutations, Poisson
  1558. L6A19. Samples, stable distribution
  1559. L6A20. t distribution, time series, triangular
  1560. L6A21. Uniform
  1561. L6A22. Von Mises
  1562. L6A23. Weibull
  1563. L6B. Multivariate
  1564. L6B3. Contingency table, correlation matrix
  1565. L6B13. Multinomial
  1566. L6B14. Normal
  1567. L6B15. Orthogonal matrix
  1568. L6B21. Uniform
  1569. L6C. Service routines (e.g., seed)
  1570. L7. Experimental design, including analysis of variance
  1571. L7A. Univariate
  1572. L7A1. One-way analysis of variance
  1573. L7A1A. Parametric analysis
  1574. L7A1A1. Contrasts, multiple comparisons
  1575. L7A1A2. Analysis of variance components
  1576. L7A1B. Distribution-free (nonparametric) analysis
  1577. L7A2. Balanced multiway design
  1578. L7A2A. Complete
  1579. L7A2A1. Parametric analysis
  1580. L7A2A1A. Two-way
  1581. L7A2A1B. Factorial
  1582. L7A2A1C. Nested
  1583. L7A2A2. Distribution-free (nonparametric) analysis
  1584. L7A2B. Incomplete
  1585. L7A2B1. Parametric analysis
  1586. L7A2B1A. Latin square
  1587. L7A2B1B. Lattice designs
  1588. L7A2B2. Distribution-free (nonparametric) analysis
  1589. L7A3. Analysis of covariance
  1590. L7A4. General linear model (unbalanced design)
  1591. L7A4A. Parametric analysis
  1592. L7A4B. Distribution-free (nonparametric) analysis
  1593. L7B. Multivariate
  1594. L8. Regression (search also classes G, K)
  1595. L8A. Linear least squares (L-2) (search also classes D5, D6, D9)
  1596. L8A1. Simple
  1597. L8A1A. Ordinary
  1598. L8A1A1. Unweighted
  1599. L8A1A1A. No missing values
  1600. L8A1A1B. Missing values
  1601. L8A1A2. Weighted
  1602. L8A1B. Through the origin
  1603. L8A1C. Errors in variables
  1604. L8A1D. Calibration (inverse regression)
  1605. L8A2. Polynomial
  1606. L8A2A. Not using orthogonal polynomials
  1607. L8A2A1. Unweighted
  1608. L8A2A2. Weighted
  1609. L8A2B. Using orthogonal polynomials
  1610. L8A2B1. Unweighted
  1611. L8A2B2. Weighted
  1612. L8A3. Piecewise polynomial (i.e. multiphase or spline)
  1613. L8A4. Multiple
  1614. L8A4A. Ordinary
  1615. L8A4A1. Unweighted
  1616. L8A4A1A. No missing values
  1617. L8A4A1B. Missing values
  1618. L8A4A1C. From correlation data
  1619. L8A4A1D. Using principal components
  1620. L8A4A1E. Using preference pairs
  1621. L8A4A2. Weighted
  1622. L8A4B. Errors in variables
  1623. L8A4D. Logistic
  1624. L8A5. Variable selection
  1625. L8A6. Regression design
  1626. L8A7. Several multiple regressions
  1627. L8A8. Multivariate
  1628. L8A9. Diagnostics
  1629. L8A10. Hypothesis testing, inference
  1630. L8A10A. Lack-of-fit tests
  1631. L8A10B. Analysis of residuals
  1632. L8A10C. Inference
  1633. L8B. Biased (ridge)
  1634. L8C. Linear least absolute value (L-1)
  1635. L8D. Linear minimax (L-infinity)
  1636. L8E. Robust
  1637. L8F. EDA
  1638. L8G. Nonlinear
  1639. L8G1. Unweighted
  1640. L8G1A. Derivatives not supplied
  1641. L8G1B. Derivatives supplied
  1642. L8G2. Weighted
  1643. L8G2A. Derivatives not supplied
  1644. L8G2B. Derivatives supplied
  1645. L8H. Service routines
  1646. L9. Categorical data analysis
  1647. L9A. 2-by-2 tables
  1648. L9B. Two-way tables
  1649. L9C. Log-linear model
  1650. L9D. EDA (e.g., median polish)
  1651. L10. Time series analysis (search also class L3c5 for time series graphics)
  1652. L10A. Transformations, transforms (search also class J1)
  1653. L10B. Smoothing, filtering
  1654. L10C. Autocorrelation analysis
  1655. L10D. Complex demodulation
  1656. L10E. ARMA and ARIMA modeling and forecasting
  1657. L10E1. Model and parameter estimation
  1658. L10E2. Forecasting
  1659. L10F. Spectral analysis
  1660. L10G. Cross-correlation analysis
  1661. L10G1. Parameter estimation
  1662. L10G2. Forecasting
  1663. L11. Correlation analysis
  1664. L12. Discriminant analysis
  1665. L13. Factor analysis
  1666. L13A. Principal components analysis
  1667. L14. Cluster analysis
  1668. L14A. Unconstrained
  1669. L14A1. Nested
  1670. L14A1A. Joining (e.g., single link)
  1671. L14A1B. Divisive
  1672. L14A2. Non-nested
  1673. L14B. Constrained
  1674. L14B1. One-dimensional
  1675. L14B2. Two-dimensional
  1676. L14C. Display
  1677. L15. Life testing, survival analysis
  1678. M. Simulation, stochastic modeling (search also classes L6, L10)
  1679. M1. Simulation
  1680. M1A. Discrete
  1681. M1B. Continuous (Markov models)
  1682. M2. Queueing
  1683. M3. Reliability
  1684. M3A. Quality control
  1685. M3B. Electrical network
  1686. M4. Project optimization (e.g., PERT)
  1687. N. Data handling (search also class L2)
  1688. N1. Input, output
  1689. N2. Bit manipulation
  1690. N3. Character manipulation
  1691. N4. Storage management (e.g., stacks, heaps, trees)
  1692. N5. Searching
  1693. N5A. Extreme value
  1694. N5B. Insertion position
  1695. N5C. On a key
  1696. N6. Sorting
  1697. N6A. Internal
  1698. N6A1. Passive (i.e. construct pointer array, rank)
  1699. N6A1A. Integer
  1700. N6A1B. Real
  1701. N6A1B1. Single precision
  1702. N6A1B2. Double precision
  1703. N6A1C. Character
  1704. N6A2. Active
  1705. N6A2A. Integer
  1706. N6A2B. Real
  1707. N6A2B1. Single precision
  1708. N6A2B2. Double precision
  1709. N6A2C. Character
  1710. N6B. External
  1711. N7. Merging
  1712. N8. Permuting
  1713. O. Symbolic computation
  1714. P. Computational geometry (search also classes G, Q)
  1715. P1. One dimension
  1716. P2. Two dimensions
  1717. P2A. Points, lines
  1718. P2A1. Relationships
  1719. P2A1A. Closest and farthest points
  1720. P2A1B. Intersection
  1721. P2A2. Graph construction
  1722. P2A2A. Convex hull
  1723. P2A2B. Minimum spanning tree
  1724. P2A2C. Region partitioning
  1725. P2A2C1. Triangulation
  1726. P2A2C2. Voronoi diagram
  1727. P2B. Polygons (e.g., intersection, hidden line problems)
  1728. P2C. Circles
  1729. P3. Three dimensions
  1730. P3A. Points, lines, planes
  1731. P3B. Polytopes
  1732. P3C. Spheres
  1733. P4. More than three dimensions
  1734. Q. Graphics (search also classes L3, P)
  1735. Q1. Line printer plotting
  1736. R. Service routines
  1737. R1. Machine-dependent constants
  1738. R2. Error checking (e.g., check monotonicity)
  1739. R3. Error handling
  1740. R3A. Set criteria for fatal errors
  1741. R3B. Set unit number for error messages
  1742. R3C. Other utility programs
  1743. R4. Documentation retrieval
  1744. S. Software development tools
  1745. S1. Program transformation
  1746. S2. Static analysis
  1747. S3. Dynamic analysis
  1748. Z. Other
  1749. *******************************************************************************
  1750. APPENDIX B. MACHINE CONSTANTS
  1751. The SLATEC Common Math Library uses three functions for keeping machine
  1752. constants. In order to keep the source code for the Library as portable as
  1753. possible, no other Library routines should attempt to DATA load machine
  1754. dependent constants. Due to the subtlety of trying to calculate machine
  1755. constants at run time in a manner that yields correct constants for all
  1756. possible computers, no Library routines should attempt to calculate them.
  1757. Routines I1MACH, R1MACH, and D1MACH in the SLATEC Common Math Library are
  1758. derived from the routines of these names in the Bell Laboratories' PORT Library
  1759. and should be called whenever machines constants are needed. These functions
  1760. are DATA loaded with carefully determined constants of type integer, single
  1761. precision, and double precision, respectively, for a wide range of computers.
  1762. Each is called with one input argument to indicate which constant is desired.
  1763. The appropriate Fortran statements are:
  1764. For integer constants:
  1765. INTEGER I1MACH, I
  1766. I = I1MACH(N) where 1 .LE. N .LE. 16
  1767. For single precision constants:
  1768. REAL R1MACH, R
  1769. R = R1MACH(N) where 1 .LE. N .LE. 5
  1770. For double precision constants:
  1771. DOUBLE PRECISION D1MACH, D
  1772. D = D1MACH(N) where 1 .LE. N .LE. 5
  1773. The different constants that can be retrieved will be explained below after we
  1774. give a summary of the floating point arithmetic model which they characterize.
  1775. The PORT and SLATEC machine constant routines acknowledge that a computer
  1776. can have some minor flaws in how it performs arithmetic and that the purpose of
  1777. machine constant routines is to keep other library routines out of trouble.
  1778. For example, a computer may have a 48-bit coefficient, but due to round-off or
  1779. other deficiencies may be able to perform only 47-bit (or even 46-bit)
  1780. arithmetic reliably. A machine can also misbehave at the extreme ends of its
  1781. exponent range. The machine constants are chosen to describe a subset of the
  1782. floating point numbers of a computer on which operations such as addition,
  1783. subtraction, multiplication, reciprocation, and comparison work as your
  1784. intuition would expect. If the actual performance of the machine is such that
  1785. results fall into the "expected" intervals of the subset floating point system,
  1786. then the usual forms of error analysis will apply. For details, see [7].
  1787. The machine constants normally cannot be determined by reading a computer's
  1788. hardware reference manual. Such manuals tell the range and representation of
  1789. floating point numbers but usually do not describe the errors in the floating
  1790. point addition, subtraction, multiplication, reciprocation, or division units.
  1791. The constants for I1MACH, R1MACH, and D1MACH are found by doing extensive
  1792. testing using operands on which the hardware is most likely to fail. Failure
  1793. is most likely to occur at the extreme ends of the exponent range and near
  1794. powers of the number base. If such failures are relatively minor, we can
  1795. choose machine constants for I1MACH, R1MACH, and D1MACH to restrict the domain
  1796. of floating point numbers to a subset on which arithmetic operations work.
  1797. The subset model of floating point arithmetic is characterized by four
  1798. parameters:
  1799. B the number base or radix. This is usually 2 or 16.
  1800. T the number of digits in base B of the coefficient of the floating
  1801. point number.
  1802. EMIN the smallest (most negative) exponent (power of B)
  1803. EMAX the largest exponent (power of B)
  1804. A floating point number is modeled as FRACTION*(B**EXP) where EXP falls between
  1805. EMIN and EMAX and the FRACTION is of the form
  1806. + or - ( f(1)*B**(-1) + ... + f(T)*B**(-T) )
  1807. with f(1) in the range 1 to B-1 inclusive and
  1808. f(2) through f(T) in the range 0 to B-1 inclusive.
  1809. In this model the fraction has the radix point at the left end. Some computers
  1810. have their radix point at the right end so that when their representation is
  1811. mapped onto this model, they appear to have an unbalanced exponent range (i.e.,
  1812. EMIN is not close to the negative of EMAX). If the computer cannot correctly
  1813. calculate results near underflow, EMIN is increased to a more conservative
  1814. value. Likewise, if the computer cannot correctly calculate results near
  1815. overflow, EMAX is decreased. If a base 2 machine with a 48-bit fraction is
  1816. unable to calculate 48-bit results due to hardware round-off, T may be set to
  1817. 47 (or even 46) to account for the loss of accuracy.
  1818. The complete set of machine constants (including those not related to floating
  1819. point arithmetic) are:
  1820. I/O Unit Numbers
  1821. ----------------
  1822. I1MACH( 1) = the FORTRAN unit number for the standard input device.
  1823. I1MACH( 2) = the FORTRAN unit number for the standard output device.
  1824. I1MACH( 3) = the FORTRAN unit number for the standard punch device.
  1825. I1MACH( 4) = the FORTRAN unit number for the standard error message device.
  1826. Word Properties
  1827. ---------------
  1828. I1MACH( 5) = the number of bits per integer storage unit.
  1829. I1MACH( 6) = the number of characters per integer storage unit.
  1830. Integer Arithmetic
  1831. ------------------
  1832. I1MACH( 7) = the base or radix for integer arithmetic.
  1833. I1MACH( 8) = the number of digits in radix I1MACH(7) used in integer
  1834. arithmetic.
  1835. I1MACH( 9) = the largest magnitude integer for which the machine and compiler
  1836. perform the complete set of arithmetic operations.
  1837. Floating Point Arithmetic
  1838. -------------------------
  1839. I1MACH(10) = the base or radix for floating point arithmetic. This is the B
  1840. of the floating point model.
  1841. Single Precision Arithmetic
  1842. ---------------------------
  1843. I1MACH(11) = the number of digits in radix I1MACH(10) used in single precision
  1844. arithmetic. This is the T in the floating point model.
  1845. I1MACH(12) = the most negative usable exponent short of underflow of radix
  1846. I1MACH(10) for a single precision number. This is the EMIN in the
  1847. floating point model.
  1848. I1MACH(13) = the largest usable exponent short of overflow of radix I1MACH(10)
  1849. for a single precision number. This is the EMAX in the floating
  1850. point model.
  1851. Double Precision Arithmetic
  1852. ---------------------------
  1853. I1MACH(14) = the number of digits in radix I1MACH(10) used in double precision
  1854. arithmetic. This is the T of the floating point model.
  1855. I1MACH(15) = the most negative usable exponent short of underflow of radix
  1856. I1MACH(10) for a double precision number. This is the EMIN of
  1857. the floating point model.
  1858. I1MACH(16) = the largest usable exponent short of overflow of radix I1MACH(10)
  1859. for a double precision number. This is the EMAX of the floating
  1860. point model.
  1861. Special Single Precision Values
  1862. -------------------------------
  1863. R1MACH( 1) = B**(EMIN-1). This is the smallest, positive, single precision
  1864. number in the range for safe, accurate arithmetic.
  1865. R1MACH( 2) = B**EMAX*(1-B**(-T)). This is the largest, positive, single
  1866. precision number in the range for safe, accurate arithmetic.
  1867. R1MACH( 3) = B**(-T). This is the smallest relative spacing between two
  1868. adjacent single precision numbers in the floating point model.
  1869. This constant is not machine epsilon; see below for machine
  1870. epsilon.
  1871. R1MACH( 4) = B**(1-T). This is the largest relative spacing between two
  1872. adjacent single precision numbers in the floating point model.
  1873. Any two single precision numbers that have a greater relative
  1874. spacing than R1MACH(4) can be compared correctly (with operators
  1875. like .EQ. or .LT.). This constant is an upper bound on theoretical
  1876. machine epsilon.
  1877. R1MACH( 5) = logarithm to base ten of the machine's floating point number base.
  1878. Special Double Precision Values
  1879. -------------------------------
  1880. D1MACH( 1) = B**(EMIN-1). This is the smallest, positive, double precision
  1881. numbers in the range for safe, accurate arithmetic.
  1882. D1MACH( 2) = B**EMAX*(1-B**(-T)). This is the largest, positive, double
  1883. precision number in the range for safe, accurate arithmetic.
  1884. D1MACH( 3) = B**(-T). This is the smallest relative spacing between two
  1885. adjacent double precision numbers in the floating point model.
  1886. This constant is not machine epsilon; see below for machine
  1887. epsilon.
  1888. D1MACH( 4) = B**(1-T). This is the largest relative spacing between two
  1889. adjacent double precision numbers in the floating point model.
  1890. Any two double precision numbers that have a greater relative
  1891. spacing than D1MACH(4) can be compared correctly (with operators
  1892. like .EQ. or .LT.). This constant is an upper bound on theoretical
  1893. machine epsilon.
  1894. D1MACH( 5) = logarithm to base ten of the machine's floating point number base.
  1895. In theory, all of the R1MACH and D1MACH values can be calculated from I1MACH
  1896. values; however, they are provided (1) to save having to calculate them and (2)
  1897. to avoid rousing any bugs in the exponentiation (** operator ) or logarithm
  1898. routines.
  1899. Machine epsilon (the smallest number that can be added to 1.0 or 1.0D0
  1900. that yields a result different from 1.0 or 1.0D0) is not one of the special
  1901. values that comes from this model. If the purpose of machine epsilon is to
  1902. decide when iterations have converged, the proper constants to use are
  1903. R1MACH(4) or D1MACH(4). These may be slightly larger than machine epsilon;
  1904. however, trying to iterate to smaller relative differences may not be possible
  1905. due to hardware round-off error.
  1906. The Fortran standard requires that the amount of storage assigned to an INTEGER
  1907. and a REAL be the same. Thus, the number of bits that can be used to represent
  1908. an INTEGER will almost always be larger than the number of bits in the mantissa
  1909. of a REAL. In converting from an INTEGER to a REAL, some machines will
  1910. correctly round or truncate, but some will not. Authors are therefore advised
  1911. to check the magnitude of INTEGERs and not attempt to convert INTEGERs to REALs
  1912. that can not be represented exactly as REALs. Similar problems can occur when
  1913. converting INTEGERs to DOUBLEs.
  1914. *******************************************************************************
  1915. APPENDIX C. ERROR HANDLING
  1916. Authors of Library routines must use at least the first and preferably both of
  1917. the following techniques to handle errors that their routines detect.
  1918. 1. One argument, preferably the last, in the calling sequence must be an
  1919. error flag if the routine can detect errors. This is an integer variable
  1920. to which a value is assigned before returning to the caller. A value of
  1921. zero means the routine completed successfully. A positive value (preferably
  1922. in the range 1 to 999) should be used to indicate potential, partial, or
  1923. total failure. Separate values should be used for distinct conditions so
  1924. that the caller can determine the nature of the failure. Of course, the
  1925. possible values of this error flag and their meanings must be documented in
  1926. the description section of the prologue of the routine.
  1927. 2. In addition to returning an error flag, the routine can supply more
  1928. information by writing an error message via a call to XERMSG. XERMSG
  1929. has an error number as one of its arguments, and the same value that will
  1930. be returned in the error flag argument must be used in calling XERMSG.
  1931. XERMSG is part of the SLATEC Common Math Library error handling package
  1932. which consists of a number of routines. It is not necessary for authors to
  1933. learn about the entire package. Instead we summarize here a few aspects of the
  1934. package that an author must know in order to use XERMSG correctly.
  1935. 1. Although XERMSG supports three levels of severity (warning, recoverable
  1936. error, and fatal error), be sparing in the use of fatal errors. XERMSG
  1937. will terminate the program for fatal errors but may return for recoverable
  1938. errors, and will definitely return after warning messages. An error should
  1939. be designated fatal only if returning to the caller is likely to be
  1940. disastrous (e.g. result in an infinite loop).
  1941. 2. The error handling package remembers the value of the error number and has
  1942. an entry point whereby the user can retrieve the most recent error number.
  1943. Successive calls to XERMSG replace this retained value. In the case of
  1944. warning messages, it is permissible to issue multiple warnings. In the
  1945. case of a recoverable error, no additional calls to XERMSG must be made by
  1946. the Library routine before returning to the caller since the caller must be
  1947. given a chance to retrieve and clear the error number (and error condition)
  1948. from the error handling package. In particular, if the user calls Library
  1949. routine X and X calls a lower level Library Y, it is permissible for Y
  1950. to call XERMSG, but after it returns to X, X must be careful to note any
  1951. recoverable errors detected in Y and not make any additional calls to
  1952. XERMSG in that case. In practice, it would be simpler if subsidiary
  1953. routines did not call XERMSG but only returned error flags indicating a
  1954. serious problem. Then the highest level Library routine could call XERMSG
  1955. just before returning to its caller. This also allows the highest level
  1956. routine the most flexibility in assigning error numbers and assures that
  1957. all possible error conditions are documented in one prologue rather than
  1958. being distributed through prologues of subsidiary routines.
  1959. Below we describe only subroutine XERMSG. Other routines in the error
  1960. handling package are described in their prologues and in Reference [4].
  1961. The call to XERMSG looks like
  1962. Template: CALL XERMSG (library, routine, message, errornumber, level)
  1963. Example: CALL XERMSG ('SLATEC', 'MMPY',
  1964. 1 'The order of the matrix exceeds the row dimension', 3, 1)
  1965. where the meaning of the arguments is
  1966. library A character constant (or character variable) with the name of
  1967. the library. This will be 'SLATEC' for the SLATEC Common Math
  1968. Library. The error handling package is general enough to be used
  1969. by many libraries simultaneously, so it is desirable for the
  1970. routine that detects and reports an error to identify the library
  1971. name as well as the routine name.
  1972. routine A character constant (or character variable) with the name of the
  1973. routine that detected the error. Usually it is the name of the
  1974. routine that is calling XERMSG. There are some instances where a
  1975. user callable library routine calls lower level subsidiary
  1976. routines where the error is detected. In such cases it may be
  1977. more informative to supply the name of the routine the user
  1978. called rather than the name of the subsidiary routine that
  1979. detected the error.
  1980. message A character constant (or character variable) with the text of the
  1981. error or warning message. In the example below, the message is a
  1982. character constant that contains a generic message.
  1983. CALL XERMSG ('SLATEC', 'MMPY',
  1984. * 'The order of the matrix exceeds the row dimension',
  1985. * 3, 1)
  1986. It is possible (and is sometimes desirable) to generate a
  1987. specific message--e.g., one that contains actual numeric values.
  1988. Specific numeric values can be converted into character strings
  1989. using formatted WRITE statements into character variables. This
  1990. is called standard Fortran internal file I/O and is exemplified
  1991. in the first three lines of the following example. You can also
  1992. catenate substrings of characters to construct the error message.
  1993. Here is an example showing the use of both writing to an internal
  1994. file and catenating character strings.
  1995. CHARACTER*5 CHARN, CHARL
  1996. WRITE (CHARN,10) N
  1997. WRITE (CHARL,10) LDA
  1998. 10 FORMAT(I5)
  1999. CALL XERMSG ('SLATEC', 'MMPY', 'The order'//CHARN//
  2000. * ' of the matrix exceeds its row dimension of'//
  2001. * CHARL, 3, 1)
  2002. There are two subtleties worth mentioning. One is that the //
  2003. for character catenation is used to construct the error message
  2004. so that no single character constant is continued to the next
  2005. line. This avoids confusion as to whether there are trailing
  2006. blanks at the end of the line. The second is that by catenating
  2007. the parts of the message as an actual argument rather than
  2008. encoding the entire message into one large character variable,
  2009. we avoid having to know how long the message will be in order to
  2010. declare an adequate length for that large character variable.
  2011. XERMSG calls XERPRN to print the message using multiple lines if
  2012. necessary. If the message is very long, XERPRN will break it
  2013. into pieces of 72 characters (as requested by XERMSG) for
  2014. printing on multiple lines. Also, XERMSG asks XERPRN to prefix
  2015. each line with ' * ' so that the total line length could be 76
  2016. characters. Note also that XERPRN scans the error message
  2017. backwards to ignore trailing blanks. Another feature is that the
  2018. substring '$$' is treated as a new line sentinel by XERPRN. If
  2019. you want to construct a multiline message without having to count
  2020. out multiples of 72 characters, just use '$$' as a separator.
  2021. '$$' obviously must occur within 72 characters of the start of
  2022. each line to have its intended effect since XERPRN is asked to
  2023. wrap around at 72 characters in addition to looking for '$$'.
  2024. errornumber An integer value that is chosen by the library routine's author.
  2025. It must be in the range 1 to 999. Each distinct error should
  2026. have its own error number. These error numbers should be
  2027. described in the machine readable documentation for the routine.
  2028. The error numbers need be unique only within each routine, so it
  2029. is reasonable for each routine to start enumerating errors from 1
  2030. and proceeding to the next integer.
  2031. level An integer value in the range 0 to 2 that indicates the level
  2032. (severity) of the error. Their meanings are
  2033. 0 A warning message. This is used if it is not clear that there
  2034. really is an error, but the user's attention may be needed.
  2035. 1 A recoverable error. This is used even if the error is so
  2036. serious that the routine cannot return any useful answer. If
  2037. the user has told the error package to return after
  2038. recoverable errors, then XERMSG will return to the Library
  2039. routine which can then return to the user's routine. The user
  2040. may also permit the error package to terminate the program
  2041. upon encountering a recoverable error.
  2042. 2 A fatal error. XERMSG will not return to its caller after it
  2043. receives a fatal error. This level should hardly ever be
  2044. used; it is much better to allow the user a chance to recover.
  2045. An example of one of the few cases in which it is permissible
  2046. to declare a level 2 error is a reverse communication Library
  2047. routine that is likely to be called repeatedly until it
  2048. integrates across some interval. If there is a serious error
  2049. in the input such that another step cannot be taken and the
  2050. Library routine is called again without the input error having
  2051. been corrected by the caller, the Library routine will
  2052. probably be called forever with improper input. In this case,
  2053. it is reasonable to declare the error to be fatal.
  2054. Each of the arguments to XERMSG is input; none will be modified by XERMSG. A
  2055. routine may make multiple calls to XERMSG with warning level messages; however,
  2056. after a call to XERMSG with a recoverable error, the routine should return to
  2057. the user. Do not try to call XERMSG with a second recoverable error after the
  2058. first recoverable error because the error package saves the error number. The
  2059. user can retrieve this error number by calling another entry point in the error
  2060. handling package and then clear the error number when recovering from the
  2061. error. Calling XERMSG in succession causes the old error number to be
  2062. overwritten by the latest error number. This is considered harmless for error
  2063. numbers associated with warning messages but must not be done for error numbers
  2064. of serious errors. After a call to XERMSG with a recoverable error, the user
  2065. must be given a chance to call NUMXER or XERCLR to retrieve or clear the error
  2066. number.
  2067. *******************************************************************************
  2068. APPENDIX D. DISTRIBUTION FILE STRUCTURE
  2069. The source files of the SLATEC library distribution tape are ASCII text files.
  2070. Each line image consists of exactly 80 characters. The first file of the tape
  2071. is text file describing the contents of the tape.
  2072. The SLATEC source code file has the following characteristics.
  2073. 1. All subprograms in the file are in alphabetic order. The collating
  2074. sequence is 0 through 9 and then A through Z.
  2075. 2. Before each subprogram, of name for example XYZ, there is a line starting
  2076. in column 1 with
  2077. *DECK XYZ
  2078. This allows the source file to be used as input for a source code
  2079. maintenance program.
  2080. 3. No comments other than the *DECK lines appear between subprograms.
  2081. *******************************************************************************
  2082. APPENDIX E. SUGGESTED FORMAT FOR A SLATEC SUBPROGRAM
  2083. A template embodying the suggested format for a SLATEC subprogram is given
  2084. below. As elsewhere in this Guide, the caret (^) denotes a required blank
  2085. character. These should be replaced with blanks AFTER filling out the
  2086. template. The template itself begins with the *DECK line, below. All
  2087. occurrences of "NAME" are to be replaced with the actual name of the
  2088. subprogram, of course. Items in brackets [] are either explanations or
  2089. optional information. Lines that do not have C or * in column 1 are
  2090. explanatory remarks that are intended to be deleted by the programmer. In all
  2091. cases where "or" is used, exactly one of the indicated forms must occur.
  2092. Lines that begin with C*** are standard SLATEC lines. These must be in the
  2093. indicated order. See Section 8 of this Guide for information on required vs
  2094. optional lines. In all but the C***DESCRIPTION section, the exact spacing and
  2095. punctuation are as mandated by this Guide. Spacing within this section is only
  2096. suggestive, except as noted below. The SLATEC standard mandates that no other
  2097. comments may begin "C***". All other lines between the C***BEGIN^PROLOGUE
  2098. and the C***END^PROLOGUE must be comment lines with "C^" in columns 1-2.
  2099. Within the C***DESCRIPTION section, lines that begin with "C^*" are for the
  2100. LLNL LDOC standard [9]. If present, these lines must be exactly as given here.
  2101. They should be in the indicated order. All other lines in this section must
  2102. have "C^^" in columns 1-3.
  2103. In the Arguments subsection, each argument must be followed by exactly one
  2104. argument qualifier. The qualifier must be preceded by a colon and followed
  2105. by at least one blank. The allowable qualifiers and their meanings follow.
  2106. Qualifier Meaning
  2107. --------- ---------
  2108. :IN input variable. Must be set by the user prior to the call
  2109. (unless otherwise indicated). Must NOT be changed by the
  2110. routine under any circumstances.
  2111. :OUT output variable. Values will be set by the routine.
  2112. Must be initialized before first usage in the routine.
  2113. :INOUT input/output variable. Must be set by the user prior to
  2114. the call (as indicated in argument description); value(s)
  2115. may be set or changed by the routine.
  2116. :WORK workspace. Simply working storage required by the routine.
  2117. Need not be set prior to the call and will not contain
  2118. information meaningful to the user on return. (Some
  2119. routines require the contents of a work array to remain
  2120. unchanged between successive calls. Such usage should be
  2121. carefully explained in the argument description.)
  2122. :EXT external procedure. The actual argument must be the name of
  2123. a SUBROUTINE, FUNCTION, or BLOCK DATA subprogram. It must
  2124. appear in an EXTERNAL statement in the calling program. The
  2125. argument description following should precisely specify the
  2126. expected calling sequence.
  2127. :DUMMY dummy argument. Need not be set by user; will not be
  2128. referenced by the routine. [Use discouraged!]
  2129. To avoid potential problems with automatic formatting of argument descriptions,
  2130. none of these key words should appear anywhere else in the text immediately
  2131. preceded by a colon.
  2132. NOTES:
  2133. 1. Make a template by copying the following "*DECK^NAME" through
  2134. "^^^^^^END" lines, inclusive, from this Guide.
  2135. 2. You will probably want to customize this template by filling
  2136. in the C***AUTHOR section and adding other things you customarily
  2137. include in your prologues. If all of your routines are in the same
  2138. category(ies), you may wish to fill in the C***CATEGORY and
  2139. C***KEYWORDS sections, too. Be sure to eliminate the brackets [].
  2140. 3. Be sure to delete the "C***SUBSIDIARY" line if this is a user-
  2141. callable routine.
  2142. *DECK^NAME
  2143. ^^^^^^SUBROUTINE^NAME[^(ARG1[,^ARG2[,^...]])] or
  2144. ^^^^^^FUNCTION^NAME^(ARG1[,^ARG2[,^...]]) or
  2145. ^^^^^^COMPLEX^FUNCTION^NAME^(ARG1[,^ARG2[,^...]]) or
  2146. ^^^^^^DOUBLE^PRECISION^FUNCTION^NAME^(ARG1[,^ARG2[,^...]]) or
  2147. ^^^^^^INTEGER^FUNCTION^NAME^(ARG1[,^ARG2[,^...]]) or
  2148. ^^^^^^REAL^FUNCTION^NAME^(ARG1[,^ARG2[,^...]]) or
  2149. ^^^^^^LOGICAL^FUNCTION^NAME^(ARG1[,^ARG2[,^...]]) or
  2150. ^^^^^^CHARACTER[*len]^FUNCTION^NAME^(ARG1[,^ARG2[,^...]])
  2151. C***BEGIN^PROLOGUE^^NAME
  2152. C***SUBSIDIARY
  2153. C***PURPOSE^^Brief (1-6 lines) summary of the purpose of this routine.
  2154. C^^^^^^^^^^^^(To best fit LDOC standards, first line should be suitable
  2155. C^^^^^^^^^^^^for a table of contents entry for this routine.)
  2156. C***LIBRARY^^^SLATEC[^(Package)]
  2157. C***CATEGORY^^CAT1[,^CAT2]
  2158. C***TYPE^^^^^^SINGLE PRECISION^(NAME-S,^DNAME-D)
  2159. C***KEYWORDS^^KEY1[,^KEY2[,
  2160. C^^^^^^^^^^^^^MORE]]
  2161. C***AUTHOR^^Last-name[,^First-name[,^(Organization)]][
  2162. C^^^^^^^^^^^^^More information][
  2163. C^^^^^^^^^^^Second-last-name[,^First-name[,^(Organization)]][
  2164. C^^^^^^^^^^^^^More information]]
  2165. C***DESCRIPTION
  2166. C^^
  2167. C^*Usage:
  2168. C^^ This subsection should have declarations for all arguments to the
  2169. C^^ routine and a model call of the routine. Use the actual names of
  2170. C^^ the arguments here. Ideally, arguments should be named in a way
  2171. C^^ that suggests their meaning.
  2172. C^^ The following example illustrates the use of dummy identifiers (in
  2173. C^^ lower case) to indicate that the required size of an array is
  2174. C^^ some function of the values of the other arguments. This may not
  2175. C^^ be legal Fortran, but should be easier for a knowledgeable user
  2176. C^^ to understand than giving the required size somewhere else.
  2177. C^^
  2178. C^^ INTEGER M, N, MDIMA, IERR
  2179. C^^ PARAMETER (nfcns = 6, nwks = 3*nfcns+M+7)
  2180. C^^ REAL X(nmax), A(MDIMA,nmax), FCNS(nfcns), WKS(nwks)
  2181. C^^
  2182. C^^ CALL NAME (M, N, X, A, MDIMA, FCNS, WKS, IERR)
  2183. C^^
  2184. C^*Arguments:
  2185. C^^ Arguments should be described in exactly the same order as in the
  2186. C^^ CALL list. Include any restrictions, etc.
  2187. C^^ The following illustrates the recommended form of argument descrip-
  2188. C^^ tions for the example given above. Note the use of qualifiers.
  2189. C^^
  2190. C^^ M :IN^ is the number of data points.
  2191. C^^
  2192. C^^ N :IN^ is the number of unknowns. (Must have 0.lt.N.le.M .)
  2193. C^^
  2194. C^^ X :IN^ is a real array containing ...
  2195. C^^ (The dimensioned length of X must be at least N.)
  2196. C^^
  2197. C^^ A :INOUT^ should contain ... on input; will be destroyed on
  2198. C^^ return. (The second dimension of A must be at least N.)
  2199. C^^
  2200. C^^ MDIMA:IN^ is the first dimension of array A.
  2201. C^^ (Must have M.le.MDIMA .)
  2202. C^^
  2203. C^^ FCNS:OUT^ will contain the six summary functions based on ...
  2204. C^^
  2205. C^^ WKS:WORK^ is a real array of working storage. Its length is a
  2206. C^^ function of the length of FCNS and the number of data
  2207. C^^ points, as indicated above.
  2208. C^^
  2209. C^^ IERR:OUT^ is an error flag with the following possible values:
  2210. C^^ Normal return:
  2211. C^^ IERR = 0 (no errors)
  2212. C^^ Warning error:
  2213. C^^ IERR > 0 means what?
  2214. C^^ "Recoverable" errors:
  2215. C^^ IERR =-1 if M < 1 or N < 1 .
  2216. C^^ IERR =-2 if M > MDIMA .
  2217. C^^ IERR =-3 means what?
  2218. C^^
  2219. C^*Function^Return^Values:
  2220. C^^ This subsection is present only in a FUNCTION subprogram.
  2221. C^^ In case of an integer- or character-valued function with a discrete
  2222. C^^ set of values, list all possible return values, with their
  2223. C^^ meanings, in the following form. [The colon is significant.]
  2224. C^^ value : meaning
  2225. C^^ Otherwise, something of the following sort is acceptable.
  2226. C^^ SQRT : the square root of X.
  2227. C^^
  2228. C^*Description:
  2229. C^^ One or more paragraphs describing the intended routine use,
  2230. C^^ dependencies on other routines, etc. Specific algorithm
  2231. C^^ descriptions could go here, if appropriate.
  2232. C^^ The emphasis should be on information useful to a user (as opposed
  2233. C^^ to developer or maintainer) of the routine.
  2234. C^^
  2235. C^*Examples:
  2236. C^^ Detailed examples of usage would go here, if desired.
  2237. C^^
  2238. C^*Accuracy:
  2239. C^^ This optional subsection contains notes on the accuracy or
  2240. C^^ precision of the results computed by the routine.
  2241. C^^
  2242. C^*Cautions:
  2243. C^^ List any known problems or potentially hazardous side effects
  2244. C^^ that are not otherwise described, such as not being safe for
  2245. C^^ multiprocessing or exceptional cases for arguments.
  2246. C^^ (Ideally, there should be none in a SLATEC routine!)
  2247. C^^
  2248. C^*See^Also:
  2249. C^^ This subsection would contain notes that refer to other library
  2250. C^^ routines that interrelate to this routine in important ways.
  2251. C^^ Examples include a solver for a LU factorization routine or an
  2252. C^^ evaluator for an interpolation or approximation routine.
  2253. C^^ This subsection may amplify information in the C***SEE ALSO
  2254. C^^ section, below, which should appear only if the prologue of the
  2255. C^^ listed routine(s) contains documentation for this routine.
  2256. C^^
  2257. C^*Long^Description:
  2258. C^^ An optional subsection containing much more detailed information.
  2259. C^^
  2260. C***SEE^ALSO^^RTN1[,^RTN2[,
  2261. C^^^^^^^^^^^^^RTNn]]
  2262. C***REFERENCES^^(NONE) or
  2263. C***REFERENCES^^1. Reference 1 ...
  2264. C^^^^^^^^^^^^^^^^^Continuation of reference 1.
  2265. C^^^^^^^^^^^^^^^2. Reference 2 ...
  2266. C^^^^^^^^^^^^^^^^^Continuation of reference 2.
  2267. C***ROUTINES^CALLED^^(NONE) or
  2268. C***ROUTINES^CALLED^^RTN1[,^RTN2[,
  2269. C^^^^^^^^^^^^^^^^^^^^RTNn]]
  2270. [Do not include standard Fortran intrinsics or externals.]
  2271. C***COMMON^BLOCKS^^^^BLOCK1[,^BLOCK2]
  2272. C***REVISION^HISTORY^^(YYMMDD)
  2273. [ This section should contain a record of the origin and ]
  2274. [ modification history of this routine. ]
  2275. C^^^871105^^DATE^WRITTEN
  2276. C^^^880121^^Various editorial changes. (Version 6)
  2277. C^^^881102^^Converted to new SLATEC format. (Version 7)
  2278. C^^^881128^^Various editorial changes. (Version 8)
  2279. C^
  2280. C***END^PROLOGUE^^NAME
  2281. C
  2282. C*Internal Notes:
  2283. C Implementation notes that explain details of the routine's design
  2284. C or coding, tricky dependencies that might trip up a maintainer
  2285. C later, environmental assumptions made, alternate designs that
  2286. C were considered but not used, etc.
  2287. C Details on contents of common blocks referenced, locks used, etc.,
  2288. C would go here.
  2289. C Emphasis is on INTERNALLY useful information.
  2290. C
  2291. C**End
  2292. C
  2293. C Additional comments that are not appropriate even for an internal
  2294. C document, but which the programmer feels should precede declarations.
  2295. C
  2296. C Declare arguments.
  2297. C
  2298. < Declarations >
  2299. C
  2300. C Declare local variables.
  2301. C
  2302. < Declarations >
  2303. C
  2304. C***FIRST^EXECUTABLE^STATEMENT^^NAME
  2305. < Body of NAME >
  2306. ^^^^^^END
  2307. *******************************************************************************
  2308. ACKNOWLEDGEMENT
  2309. The authors wish to acknowledge the assistance provided by Dr. Frederick N.
  2310. Fritsch of the Computing and Mathematics Research Division, Lawrence Livermore
  2311. National Laboratory, who wrote Appendix E and made corrections and comments on
  2312. the manuscript.
  2313. *******************************************************************************
  2314. REFERENCES
  2315. [1] W. H. Vandevender and K. H. Haskell, The SLATEC mathematical subroutine
  2316. library, SIGNUM Newsletter, 17, 3 (September 1982), pp. 16-21.
  2317. [2] P. A. Fox, A. D. Hall and N. L. Schryer, The PORT mathematical subroutine
  2318. library, ACM Transactions on Mathematical Software, 4, 2 (June 1978), pp.
  2319. 104-126.
  2320. [3] P. A. Fox, A. D. Hall and N. L. Schryer, Algorithm 528: framework for a
  2321. portable library, ACM Transactions on Mathematical Software, 4, 2 (June
  2322. 1978), pp. 177-188.
  2323. [4] R. E. Jones and D. K. Kahaner, XERROR, the SLATEC error-handling package,
  2324. Software - Practice and Experience, 13, 3 (March 1983), pp. 251-257.
  2325. [5] R. F. Boisvert, S. E. Howe and D. K. Kahaner, GAMS: a framework for the
  2326. management of scientific software, ACM Transactions on Mathematical
  2327. Software, 11, 4 (December 1985), pp. 313-355.
  2328. [6] American National Standard Programming Language FORTRAN, ANSI X3.9-1978,
  2329. American National Standards Institute, 1430 Broadway, New York, New York
  2330. 10018, April 1978.
  2331. [7] W. S. Brown, A simple but realistic model of floating point computation,
  2332. ACM Transactions on Mathematical Software, 7, 4 (December 1981), pp.
  2333. 445-480.
  2334. [8] F. N. Fritsch, SLATEC/LDOC prologue: template and conversion program,
  2335. Report UCID-21357, Rev.1, Lawrence Livermore National Laboratory,
  2336. Livermore, California, November 1988.