Numerical error propagation with computer assistance - Journal of

Oct 1, 1972 - Availability of a program written in Basic and Fortran that reads a number and its uncertainty and propagates that uncertainty throughou...
7 downloads 8 Views 752KB Size
Numerical Error Propagation with Computer Assistance Several years ago the Ntationd Standard Reference Data System called for a computer system which could (1) read and store a numher and its uncertainty, (2) permit the user to alter the uncertainty, (3) carry the uncertainties through to the results of the calculations, (4) deliver a. number whose length is consistent with its uncertainty, and ( 5 ) on demand, deliver the uncertainty of the computed result (1). We have developed a, package of subroutines (called NEPROP for numerical error propagation) which will propagate the uncertainties and round the output to the proper number of places. I t will ako check on the validity of the assumptions used in the propagation process and find "weak links" in the experiment whose results are being computed. NEPROP has been written in BASIC as well a_. FORTRAN and can he added to exkting programs with minimal modifications by persons who m e not computer experts. The packageis based on a multivariate Taylor expansion (g,2,) which employs Stirling's method (4,5)to compute partial derivatives and produces the statistical moments (6)for the computed results. The purpose in developing NEPROP was to bring a mathemstically sound, easily implemented system for the propagation of uncertainties into general usage, so that students could obeerve the effects of uncertainties on results and researchers could have a consistent and recognized method of determining and reporting uncertainties in computed results. The major requirements for the use of NEPROP are that the uncertainties be essentially random in character and that they not be coupled (7). A mode flag, resettable at any time during a run, allows the user to select any one of four modes of operation. In 1, NEPROP propagates uncertainties and rounds the output. In 2, the contributions of each of the input parameters to the total uncertainty is printed out, validity checks are made on the numerical methods involved, and the output is rounded. In 3, uncertainties are propagated, but there is no roundoff, and in 4 neither uncertainty propagation nor roundoff are done. The Monte Carlo (2) and algebraic root mean square (8) methods serve well for simple tests or many runs using thesame program. They m e not so easily generalized into subroutines, nor can thevalidity checks and partial contributions beso easily put in and removed as withNEPROP. Interested readers may obtain the program in both languages plus a more extensive discussion of uncertainties in general, NEPROP in particular, and instructions for implementing the package from the authors. The subroutines have also been filed with the Quantum Chemistry Program Exchange (Chemistry Department, Indiana University, Bloomington, Ind. 47401) and the Office of Standard Reference Data (National Bureau of Standards, Washington, D.C. 20234).

Literature Cited

..

224,351. (5) Sc~n~ononan. J. B., "Numerical Mathematical Analysis" (8th ed.), Johns Hopkins Press,Baltimore. 1966, p. 82. (6) K b a o ~ & bM. . G . , A N D STUART, A,. "The Advanced Theory of Statistics." Hsfner Publiahinp, New York. 1958, Vol. 1, p. 48.

(7) E ~ ~ m s e m eF. n ,R., General Electria Infomation Document Number 69MSV100. Researoh and Development Center, Sohenectadr. N.Y.. 1969. (8) S ~ n o s ~EI. b ,A.. "Chemical Instrumentation." Addison-Wesley, Reading, Maas.. 1960, Chapter%

Based on a paper presented by the authors and F. Richard EUenherger, Value Planning, General Electric Corp., Schenectady, N. Y. 12301, to the Conference on Computers in Chemical Education and Research, Northern Illinois University, July 19-23, 1971, sponsored by the ACS Division of Chemical Education, the NRC Division of Chemistry and Chemical Technology, and the National Science Foundation. 1 Supported in part by the National Science Foundation, Grant 22829. Correspondence should be directed to RDN. Computer time supportedin part by WVU. a Supported in part by a National Science Foundation Undergraduate Research Participation grant to Middla bury College. MARKR. ELLENBERGER~ MIDDLEBURY COLLEGE MIDDLEBURY, VERMONT 05753

678

/

journal o f Chemical Education

JR.' RALPHD. NELSON, WESTVIRGINIA UNIVERSITY MORGANTOWN, 26506