Mercurial > octave-nkf
changeset 14767:d213da1a16a6
Correct Fortran implementation of erf for small values (Bug #36364)
* derf.f: For small values approximation to erf should be 2*x/sqrt(pi),
not 2*x*x/sqrt(pi).
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 14 Jun 2012 08:35:05 -0700 |
parents | 877263efaacc |
children | 1c7956c661a8 |
files | libcruft/slatec-fn/derf.f |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/slatec-fn/derf.f Wed Jun 13 14:10:45 2012 -0700 +++ b/libcruft/slatec-fn/derf.f Thu Jun 14 08:35:05 2012 -0700 @@ -69,7 +69,7 @@ C C ERF(X) = 1.0 - ERFC(X) FOR -1.0 .LE. X .LE. 1.0 C - IF (Y.LE.SQEPS) DERF = 2.0D0*X*X/SQRTPI + IF (Y.LE.SQEPS) DERF = 2.0D0*X/SQRTPI IF (Y.GT.SQEPS) DERF = X*(1.0D0 + DCSEVL (2.D0*X*X-1.D0, 1 ERFCS, NTERF)) RETURN