Inverse Error Function Numerical Recipes
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business
Complementary Error Function
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation error function calculator Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like
Error Function Table
you, helping each other. Join them; it only takes a minute: Sign up Need code for Inverse Error Function up vote 5 down vote favorite 4 Does anyone know where I could find code for the "Inverse complementary error function table Error Function?" Freepascal/Delphi would be preferable but C/C++ would be fine too. The TMath/DMath library did not have it :( delphi math pascal share|improve this question asked May 11 '11 at 23:46 Mike Furlender 1,52422053 do you mean inverse erf? –soandos May 11 '11 at 23:47 Do you refer to erfinv? –David Heffernan May 12 '11 at 0:02 @soandosDavid Yup thats what I'm talking about –Mike Furlender May 12 error function matlab '11 at 0:07 1 If you can find fortran code convert it to c with f2c -a . If you can find c code great. Compile the c with bcc32 and link with $L that's how I always do it! –David Heffernan May 12 '11 at 0:10 This is a really nifty piece of math. If you find an implementation, I'll make sure it gets added to JEDI Math. It's planned for JEDI Math library in the future, but it looks like it's not in there yet! –Warren P May 12 '11 at 1:49 | show 1 more comment 7 Answers 7 active oldest votes up vote 4 down vote accepted Here's an implementation of erfinv(). Note that for it to work well, you also need a good implementation of erf(). function erfinv(const y: Double): Double; //rational approx coefficients const a: array [0..3] of Double = ( 0.886226899, -1.645349621, 0.914624893, -0.140543331); b: array [0..3] of Double = (-2.118377725, 1.442710462, -0.329097515, 0.012229801); c: array [0..3] of Double = (-1.970840454, -1.624906493, 3.429567803, 1.641345311); d: array [0..1] of Double = ( 3.543889200, 1.637067800); const y0 = 0.7; var x, z: Double; begin if not InRange(y, -1.0, 1.0) then begin raise EInvalidArgument.Create('erfinv(y) argument out of range'); end; if abs(y)=1.0 then begin x := -y*Ln(0.0); end else if y<-y0 then begin z := sqrt(-Ln((1.0+y)/2.0)); x :=
Advanced Search Go to Page... Thread Tools Display Modes #1 05-09-2003, 03:22 AM jvalero Member Join Date: May 2003 Posts: 1
Erf(1)
Inverse of normal distribution Hi, Given a probability p from 0 to error function python 1, I would like to calculate the INVERSE of the NORMAL (GAUSSIAN) distribution. How can I do it? Can
Error Function Excel
I use the method described in chapter 7.2, page 289 of "Numerical Recipes in C"? I do not understand pretty well if that algorithm covers what I want to do. http://stackoverflow.com/questions/5971830/need-code-for-inverse-error-function Thanks in advance, Jose Luis. jvalero View Public Profile Find all posts by jvalero #2 05-10-2003, 04:12 PM Bill Press Numerical Recipes Author Join Date: Dec 2001 Posts: 227 Jose Luis, I assume that you mean the inverse of the cumulative normal distribution, since you say you want to input a probability between 0 and 1. The cumulative normal http://numerical.recipes/forum/showthread.php?t=245 distribution is related (with a constant scaling on the independent variable) to the error function, which is discussed at NR page 220. The routine erfcc is fast enough that for most purposes you can invert it by using the simple method of bisection to solve the equation erf(x)=P for unknown x with known P. See NR page 353. Good luck! Cheers, Bill P. Bill Press View Public Profile Visit Bill Press's homepage! Find all posts by Bill Press « Previous Thread | Next Thread » Thread Tools Show Printable Version Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Numerical Recipes Official Announcements About the Numerical Recipes Forum General Information on Numerical Recipes Official Bug Reports (NR3, the Third Ed
Random Entry New in MathWorld MathWorld Classroom About MathWorld Contribute to MathWorld Send a Message to the Team MathWorld Book Wolfram Web Resources» 13,594 entries Last updated: Tue Sep 27 2016 http://mathworld.wolfram.com/Erfc.html Created, developed, and nurturedbyEricWeisstein at WolframResearch Calculus and Analysis>Special Functions>Erf> Calculus http://www.nrbook.com/a/bookfpdf.html and Analysis>Complex Analysis>Entire Functions> Calculus and Analysis>Calculus>Integrals>Definite Integrals> More... Interactive Entries>webMathematica Examples> History and Terminology>Wolfram Language Commands> Less... Erfc Erfc is the complementary error function, commonly denoted , is an entire function defined by (1) (2) It is implemented in the Wolfram Language as Erfc[z]. Note error function that some authors (e.g., Whittaker and Watson 1990, p.341) define without the leading factor of . For , (3) where is the incomplete gamma function. The derivative is given by (4) and the indefinite integral by (5) It has the special values (6) (7) (8) It satisfies the identity (9) It has definite integrals (10) (11) (12) complementary error function For , is bounded by (13) Min Max Re Im Erfc can also be extended to the complex plane, as illustrated above. A generalization is obtained from the erfc differential equation (14) (Abramowitz and Stegun 1972, p.299; Zwillinger 1997, p.122). The general solution is then (15) where is the repeated erfc integral. For integer , (16) (17) (18) (19) (Abramowitz and Stegun 1972, p.299), where is a confluent hypergeometric function of the first kind and is a gamma function. The first few values, extended by the definition for and 0, are given by (20) (21) (22) SEE ALSO: Erf, Erfc Differential Equation, Erfi, Inverse Erfc RELATED WOLFRAM SITES: http://functions.wolfram.com/GammaBetaErf/Erfc/ REFERENCES: Abramowitz, M. and Stegun, I.A. (Eds.). "Repeated Integrals of the Error Function." §7.2 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp.299-300, 1972. Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp.568-569, 1985. Press, W.H.; Flannery, B.P.; Teukolsky, S.A.; and Vetterling, W.T. "Incomplete Gamma Function, Error Functi
a helper program to your web browser. Permission is granted by the copyright owners for users of this resource to make one paper copy of these Acrobat files for their own personal use. Further reproduction, or the extraction of, or copying of, machine readable files to any server computer, is strictly prohibited. This on-line resource is not intended as a substitute for purchasing the book, or for obtaining a license for the use of Numerical Recipes source code. Downloads of the Numerical Recipes source code in machine-readable format are not available as part of this free resource. For information on downloads, please go to the Numerical Recipes On-Line Software Store. Front Matter, Contents, and Prefaces xi Legal Matters xvi Computer Programs by Chapter and Section xix 1 Preliminaries 1.0 Introduction 1 1.1 Program Organization and Control Structures 5 1.2 Error, Accuracy, and Stability 18 2 Solution of Linear Algebraic Equations 2.0 Introduction 22 2.1 Gauss-Jordan Elimination 27 2.2 Gaussian Elimination with Backsubstitution 33 2.3 LU Decomposition and Its Applications 34 2.4 Tridiagonal and Band Diagonal Systems of Equations 42 2.5 Iterative Improvement of a Solution to Linear Equations 47 2.6 Singular Value Decomposition 51 2.7 Sparse Linear Systems 63 2.8 Vandermonde Matrices and Toeplitz Matrices 82 2.9 Cholesky Decomposition 89 2.10 QR Decomposition 91 2.11 Is Matrix Inversion an $N^3$ Process? 95 3 Interpolation and Extrapolation 3.0 Introduction 99 3.1 Polynomial Interpolation and Extrapolation 102 3.2 Rational Function Interpolation and Extrapolation 104 3.3 Cubic Spline Interpolation 107 3.4 How to Search an Ordered Table 110 3.5 Coefficients of the Interpolating Polynomial 113 3.6 Interpolation in Two or More Dimensions 116 4 Integration of Functions 4.0 Introduction 123 4.1 Classical Formulas for Equally Spaced Abscissas 124 4.2 Elementary Algorithms 130 4.3 Romberg Integration 134 4.4 Improper Integrals 135 4.5 Gaussian Quadratures and Orthogonal Polynomials 140 4.6 Multidimensional Integrals 155 5 Evaluation of Functions 5.0 Introduction 159 5.1 Series and Their Convergence 159 5.2 Evaluation of Continued Fractions 163 5.3 Polynomials and Rational Functions 167 5.4 Complex Arithmetic 171 5.5 Recurrence Relations and Clenshaw's Recurrence Formula 172 5.6 Quadratic and Cubic Equations 178 5.7 Numerical Derivatives 180 5.8 Chebyshev Approximation 184 5.9 Derivatives or Int