This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Problems with GAMMA functions?
On Mon, 2007-10-08 at 23:18 -0700, Jerry DeLisle wrote:
> Heres some test data. Its failing in the do loop for two values at n=18 and 19:
I committed the following as obvioius as rev. 129174. Hopefully, this
will fix the problem on most architectures.
For the wider problem of providing a tgamma for systems that don't have
one, and for providing a better one, see PR 33698.
Thomas
2007-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/33683
* gfortran.dg/gamma_5.f90: Adjust tolerance to avoid
failure on some common systems.
Index: gfortran.dg/gamma_5.f90
===================================================================
--- gfortran.dg/gamma_5.f90 (revision 129116)
+++ gfortran.dg/gamma_5.f90 (working copy)
@@ -21,7 +21,7 @@ program main
xd = n + 0.5d0
td = c(n)*sqrt(pi)
ts = c(n)*sqrt(pi)
- if (abs(gamma(xs)-ts)/ts > 2e-6) call abort
+ if (abs(gamma(xs)-ts)/ts > 3e-6) call abort
if (abs(gamma(xd)-td)/td > 5e-14) call abort
end do
call tst_s(2.3, gamma(2.3))