Error Function Erf Fortran
Contents |
type shall
Error Function In Fortran 90
be REAL. Return value:The return value is of type REAL, of the same kind inverse error function fortran 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
HPC Platform Products PGI Products for Apple OS X PGI Products for Windows Free HPC Products q function erf Free PGI for OS X HPC Product Feature Comparison Services
Fortran Gamma Function
PGI Subscription Service PGI Premier Service Support Support Options Current Release Information Current Version
Normal Distribution Erf
Information Licensing Generate Permanent Keys Generate Trial License Keys Trial License FAQ Transfer License Locating Your PIN Licensing Troubleshooting FAQ Compatibility and Installation Licensing Compilation https://gcc.gnu.org/onlinedocs/gfortran/ERF.html Linking Execution Portability Inter-language Support Request Download Free Trial Software Current Version Current Version Information Archive Releases Licensing Daemons Resources Documentation Porting & Tuning Guides Tutorial Videos PGInsider Newsletters White Papers & Specifications Technical Papers & Presentations Articles Benchmarking Glossary User Forums Programming and Compiling Accelerator Programming Debugging and http://www.pgroup.com/userforum/viewtopic.php?p=9753&sid=da352f43ff90da87ba9fc1137f79b573 Profiling License and Installation Purchase Find a Reseller Product Configurator Quote Request Pricing End-user License Agreement Subscription Services Agreement Become a Reseller About Why Choose PGI News Center Job Openings Locations Contact PGI PGI User Forum Search Memberlist Register Profile Log in Something horrbily wrong with ERF(x) PGI User Forum Forum Index -> Accelerator Programming View previous topic :: View next topic Author Message alfvenwaveJoined: 08 Apr 2010Posts: 79 Posted: Wed Apr 27, 2011 5:52 am Post subject: Something horrbily wrong with ERF(x) I've been tearing my hair out over the last few days and have finally homed in on something that seems very wrong indeed. Here is some test code - all it should do is to return the real error function for the value 1.0: Code: function erf_stegun( x ) result( erf_x ) !------------------------------------------------------------------------------ ! ! *** Description: !
function (non-elementary) of sigmoid shape that occurs in probability, statistics, and partial differential equations describing diffusion. It is defined as:[1][2] erf ( x ) = 1 π ∫ − x x e − t 2 d t = https://en.wikipedia.org/wiki/Inverse_error_function 2 π ∫ 0 x e − t 2 d t . {\displaystyle {\begin − 6\operatorname − 5 (x)&={\frac − 4{\sqrt {\pi }}}\int _{-x}^ − 3e^{-t^ − 2}\,\mathrm − 1 t\\&={\frac − 0{\sqrt {\pi }}}\int _ https://people.sc.fsu.edu/~jburkardt/f_src/gfortran_intrinsics/gfortran_intrinsics.html 9^ 8e^{-t^ 7}\,\mathrm 6 t.\end 5}} The complementary error function, denoted erfc, is defined as erfc ( x ) = 1 − erf ( x ) = 2 π error function ∫ x ∞ e − t 2 d t = e − x 2 erfcx ( x ) , {\displaystyle {\begin 2\operatorname 1 (x)&=1-\operatorname 0 (x)\\&={\frac Φ 9{\sqrt {\pi }}}\int _ Φ 8^{\infty }e^{-t^ Φ 7}\,\mathrm Φ 6 t\\&=e^{-x^ Φ 5}\operatorname Φ 4 (x),\end Φ 3}} which also defines erfcx, the scaled complementary error function[3] (which can be used instead of erfc to avoid arithmetic underflow[3][4]). Another form of error function erf erfc ( x ) {\displaystyle \operatorname 2 (x)} for non-negative x {\displaystyle x} is known as Craig's formula:[5] erfc ( x | x ≥ 0 ) = 2 π ∫ 0 π / 2 exp ( − x 2 sin 2 θ ) d θ . {\displaystyle \operatorname 0 (x|x\geq 0)={\frac Φ 9{\pi }}\int _ Φ 8^{\pi /2}\exp \left(-{\frac Φ 7}{\sin ^ Φ 6\theta }}\right)d\theta \,.} The imaginary error function, denoted erfi, is defined as erfi ( x ) = − i erf ( i x ) = 2 π ∫ 0 x e t 2 d t = 2 π e x 2 D ( x ) , {\displaystyle {\begin Φ 0\operatorname − 9 (x)&=-i\operatorname − 8 (ix)\\&={\frac − 7{\sqrt {\pi }}}\int _ − 6^ − 5e^ − 4}\,\mathrm − 3 t\\&={\frac − 2{\sqrt {\pi }}}e^ − 1}D(x),\end − 0}} where D(x) is the Dawson function (which can be used instead of erfi to avoid arithmetic overflow[3]). Despite the name "imaginary error function", erfi ( x ) {\displaystyle \operatorname 8 (x)} is real when x is real. When the error function is evaluated for arbitrary complex arguments z, the resulting complex error function is usually discussed in scaled form as the Faddeeva function: w ( z
standard; they are in some cases commonly available in C or C++ compilers. Licensing: The computer code and data files described and made available on this web page are distributed under the GNU LGPL license. Languages: GFORTRAN_INTRINSICS is available in a FORTRAN77 version and a FORTRAN90 version. Related Data and Programs: C_INTRINSICS, a C program which illustrates the use of intrinsic functions supplied by the C language. CPP_INTRINSICS, a C++ program which illustrates the use of intrinsic functions supplied by the C++ language. F77_INTRINSICS, FORTRAN77 programs which include some examples of the use of intrinsic functions included with the FORTRAN77 standard language. F90_INTRINSICS, FORTRAN90 programs which include some examples of the use of intrinsic functions defined as part of the FORTRAN90 standard. G++_INTRINSICS, a C++ program which demonstrates some of the intrinsic functions provided by the G++ compiler. G77_INTRINSICS, FORTRAN77 programs which include some examples of the use of intrinsic functions included with the G77 compiler. G95_INTRINSICS, a FORTRAN90 program which calls some of the intrinsic functions included with the G95 compiler. GCC_INTRINSICS, a C program which tests or demonstrates intrinsic routines provided by the GCC compiler. GFORTRAN_QUADMATH, a FORTRAN90 program which illustrates the use of quadruple precision real arithmetic provided on some systems by the Gnu GFORTRAN compiler. MATH_INTRINSICS, a JAVA program which illustrates the use of the intrinsic functions in the Java Math package. XLF_INTRINSICS, FORTRAN90 programs which use intrinsic functions peculiar to the IBM XLF FORTRAN compiler. Reference: The Gnu FORTRAN page, http://www.gnu.org/software/fortran/fortran.html . The GFORTRAN Manual, http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gfortran.pdf. Examples and Tests: gfortran_intrinsics.f90, a single program that calls many tests; each test is devoted to a particular GFORTRAN intrinsic function. gfortran_intrinsics_output.txt, the output file; List of Routines: MAIN is the main program for GFORTRAN_INTRINSICS_PRB. TEST_ABORT demonstrates the ABORT routine. TEST_ACCESS demonstrates the ACCESS routine. TEST_ALGAMA checks ALGAMA against GAMMA_LOG_VALUES. TEST_BESJ0 checks BESJ0 against BESSEL_J0_VALUES. TEST_BESJ1 checks BESJ1 against BESSEL_J1_VALUES. TEST_BESJN checks BESJN against BESSEL_JN_VALU