--- Comment #1 from jvdelisle at gcc dot gnu dot org 2007-10-09 01:32
---
Just before the #include in trans-intrinsic.c we could do:
#ifndef tgamma
#define tgamma gamma
#endif
Could you try this and see it works?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33698
--- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca 2007-10-09
01:45 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> --- Comment #1 from jvdelisle at gcc dot gnu dot org 2007-10-09 01:32
> ---
> Just before the #include in trans-intrinsic.c we could do:
Which includ
--- Comment #3 from jvdelisle at gcc dot gnu dot org 2007-10-09 01:52
---
Index: trans-intrinsic.c
===
--- trans-intrinsic.c (revision 129058)
+++ trans-intrinsic.c (working copy)
@@ -119,6 +119,10 @@ gfc_intrinsic_map_
--- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca 2007-10-09
02:11 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
>/* Functions built into gcc itself. */
> +#ifndef tgamma
> +#define tgamma gamma
> +#endif
> +
> #include "mathbuiltins.def"
The HP-UX 11 manpage says:
--- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-10-09 02:18
---
I was just looking at a DOC search and for HP-UX 11i Version 3: February 2007
tgamma is suppose to be provided.
So I now wonder what is really going on.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33698
--- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca 2007-10-09
02:39 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> --- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-10-09 02:18
> ---
> I was just looking at a DOC search and for HP-UX 11i Version 3: February
--- Comment #7 from tkoenig at gcc dot gnu dot org 2007-10-09 20:22 ---
We'll probably need to roll our own tgamma function: To
cover cases like this, where the system doesn't provide
one, and to get numerically better answers.
--
tkoenig at gcc dot gnu dot org changed:
--- Comment #8 from burnus at gcc dot gnu dot org 2007-10-09 22:06 ---
> We'll probably need to roll our own tgamma function: To
> cover cases like this, where the system doesn't provide
> one, and to get numerically better answers.
g95 uses a C version of W. J. Cody and L. Stoltz' For
--- Comment #9 from tkoenig at gcc dot gnu dot org 2007-10-20 10:06 ---
Mine.
--
tkoenig at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|unassigned
--- Comment #10 from tkoenig at gcc dot gnu dot org 2007-10-20 10:17
---
I am tempted not to use gamma*() at all, but rather
check for tgamma*() and lgamma*() and use that
if available. If none of them are present, use
a fallback implementation.
This avoids potential problems with cro
--- Comment #11 from tkoenig at gcc dot gnu dot org 2007-11-02 23:07
---
Created an attachment (id=14475)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14475&action=view)
proposed patch
This implements the fallback functions, but naturally
doesn't do anything on my linux system (
--- Comment #12 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-02
23:45 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> Can anybody test this? John?
I'm on it.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33698
--- Comment #13 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-03
19:37 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> This implements the fallback functions, but naturally
> doesn't do anything on my linux system (which has all tgamma*
> and lgamma* functions).
You might hack
--- Comment #15 from tkoenig at netcologne dot de 2007-11-03 20:19 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> --- Comment #13 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-03
> 19:37 ---
> Now, the hard part. The gfortran.dg/gamma_5.f90 test fails at n = 16.
T
--- Comment #16 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-03
20:47 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> This works on my i686-pc-linux-gnu system, and also fails when I use
> -ffloat-store. Seems like we have a roundoff problem with normal ieee
> double precisio
--- Comment #17 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-03
22:49 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> > Now, the hard part. The gfortran.dg/gamma_5.f90 test fails at n = 16.
>
> This works on my i686-pc-linux-gnu system, and also fails when I use
> -ffloat-st
--- Comment #18 from tkoenig at gcc dot gnu dot org 2007-11-04 19:51
---
> Looking at Pugh's paper, he shows coefficients for n = 10 and
> r = 10.900511. This is the same as you are using for the double
> case. However, you seem to be missing coefficient d10.
Good catch, thanks!
Th
--- Comment #19 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-04
21:30 ---
Subject: Re: FAIL: gfortran.dg/gamma_5.f90
> The main problem with the Lanczos approximation are alternating-sign
> terms with nearly cancel each other, which leads to massive precision
> loss.
>
> For z
--- Comment #20 from fxcoudert at gcc dot gnu dot org 2007-11-09 18:40
---
Created an attachment (id=14519)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14519&action=view)
gamma from netlib, converted to C
(In reply to comment #18)
> OTOH, maybe using straight Netlib code would
--- Comment #21 from tkoenig at gcc dot gnu dot org 2007-11-09 21:50
---
(In reply to comment #20)
Hi FX,
> I can work on the C version of lgamma at some point in the week-end, if you
> want me to.
That would be great. Real Life has caught up with me in a big
way the last few weeks,
20 matches
Mail list logo