Fortran Error Function Erf
Contents |
it shall be scalar. Return value:The return value is a scalar of type REAL(*) and it is positive ( - 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 Option DERF(X) REAL(8) X REAL(8) gnu
HPC Platform Products PGI Products for Apple OS X PGI Products for Windows Free HPC Products Free PGI for OS X HPC Product Feature Comparison Services PGI Subscription Service PGI Premier Service Support Support Options Current Release Information Current Version 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 Linking Execution Portability Inter-language Support Request Download Free Trial Software Current Version Current Version Information Archive Releases Licensing Daemons Resources Documentation Porting https://gcc.gnu.org/onlinedocs/gcc-4.1.0/gfortran/ERF.html & Tuning Guides Tutorial Videos PGInsider Newsletters White Papers & Specifications Technical Papers & Presentations Articles Benchmarking Glossary User Forums Programming and Compiling Accelerator Programming Debugging and 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 http://www.pgroup.com/userforum/viewtopic.php?p=9753&sid=da352f43ff90da87ba9fc1137f79b573 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: ! ! Real error function ERF(x). ! ! *** Details: ! ! Handbook of Mathematical Functions. Edited by Milton Abramowitz and ! Irene A. Stegun, Dover Publications, Inc., New York, 1965. ! ! Rational approximation for 0 <= x <= Inf. ! ! Error function and Fresnel Integrals, EQN. 7.1.28. ! Valid to |E(x)| <= 3e-7. Calculation in double precision, result returned ! in gpu precision. ! !--------------
Package: Gamma / Log http://www.pa.msu.edu/~duxbury/phy201_f00/worksheet2_f00/worksheet2_f00.html Gamma / Complex Gamma / Complex Log Gamma / Error / Complex Error Function in Single / Double / Quadruple Precision gamerf2a.doc : Document of error function "gamerf2a.f" (Japanese) gamedat2.lzh : Function Data of "gamerf2a.f" mathplus.h : Macros of Gamma / Error Functions cdgamma.c : Complex Gamma Function in C cdgamma.f : Complex Gamma Function in Fortran dcbrt.c fortran error function : Cubic Root Function in C dcbrt.f : Cubic Root Function in Fortran derf.c : Error Function "erf(x)" in C derf.f : Error Function "erf(x)" in Fortran derfc.c : Error Function "erfc(x)" in C derfc.f : Error Function "erfc(x)" in Fortran dierfc.c : Inverse of Error Function "erfc^{-1}(x)" in C dierfc.f : Inverse of Error Function "erfc^{-1}(x)" in Fortran dgamma.c : Gamma Function in C dgamma.f : Gamma Function in Fortran dlgamma.c : Log Gamma Function in C dlgamma.f : Log Gamma Function in Fortran readme.txt : readme file Main Page
of the form . This integral can not be solved in terms of standard transcendental and algebraic functions, so a new special function called the error function is introduced: (1) The next few worksheets in this class will use several different ways of evaluating this function to illustrate several of the key features of programming in Fortran 90. We will mainly concentrate on two ways of evaluating equation 1, namely, truncated power series and numerical integration. Notice that the argument of the error function can be a complex number, in which case the integral needs to be done in the complex plane. Truncated Power Series Mathematical Background Fortran Implementation Summation Using DO Loops Convergence Program Design About this document ... Phil Duxbury 2000-09-11