This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with GAMMA functions?
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 09 Oct 2007 22:22:05 +0200
- Subject: Re: Problems with GAMMA functions?
- References: <Pine.CYG.4.58.0710062310490.724@homepc> <1191709485.3259.6.camel@meiner.onlinehome.de> <Pine.OSF.4.58.0710081324410.25589@ax0rm1.roma1.infn.it> <1191908978.3292.3.camel@meiner.onlinehome.de> <470B1A42.104@verizon.net> <470B1AAD.4010006@verizon.net> <470B1D4E.7080800@verizon.net>
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))