Inverse Error Function Fortran
Contents |
type shall inverse error function matlab be REAL. Return value:The return value is of type REAL, of the same kind
Inverse Error Function C++
as X and lies in the range -1 \leq erf (x) \leq 1 . Example: program test_erf real(8) :: x = 0.17_8 x = erf(x) end program test_erf Specific names: Name Argument Return type Standard DERF(X) REAL(8) X REAL(8) GNU extension
FORTRAN 90 Interface Generic:
Inverse Error Function Python
ERFI (X) Specific: The specific interface names inverse error function approximation are S_ERFI and D_ERFI. FORTRAN 77 Interface Single: ERFI (X) Double: The erfinv c++ double precision function name is DERFI. Description Function ERFI(X) computes the inverse of the error function erf x, defined https://gcc.gnu.org/onlinedocs/gfortran/ERF.html in ERF. The function ERFI(X) is defined for |x| < 1. If xmax< |x| < 1, then the answer will be less accurate than half precision. Very approximately, where ε=AMACH(4) is the machine precision. Figure 5- 3 Plot of http://docs.roguewave.com/imsl/fortran/6.0/sfun/WordDocuments/erfi.htm erf−1(x) Comments Informational error Type Code 3 2 Result of ERFI(X) is accurate to less than one-half precision because the absolute value of the argument is too large . Example In this example, erf−1(erf(1.0)) is computed and printed. USE ERFI_INT USE ERF_INT USE UMACH_INT IMPLICIT NONE ! Declare variables INTEGER NOUT REAL VALUE, X ! Compute X = ERF(1.0) VALUE = ERFI(X) ! Print the results CALL UMACH (2, NOUT) WRITE (NOUT,99999) X, VALUE 99999 FORMAT (' ERFI(', F6.3, ') = ', F6.3) END Output ERFI( 0.843) = 1.000 Visual Numerics, Inc.Visual Numerics - Developers of IMSL and PV-WAVEhttp://www.vni.com/PHONE: 713.784.3131FAX:713.781.9260
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 http://stackoverflow.com/questions/5971830/need-code-for-inverse-error-function Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like 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 error function where I could find code for the "Inverse 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 inverse error function @soandosDavid Yup thats what I'm talking about –Mike Furlender May 12 '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