Re: builtin gamma function

2011-11-15 Thread Ian Lance Taylor
James Hirschorn writes: > I guess "fold" means do the computation at compile time? Yes. > No, it is being called with a variable. That is interesting that libc has a > gamma function. I will have to track down the implementation ... I believe it is here: http://sourceware.org/git/?p=glibc.git

Re: builtin gamma function

2011-11-15 Thread Andrew Haley
On 11/15/2011 06:07 AM, James Hirschorn wrote: > I have noticed that the builtin gamma function is very accurate and > extremely fast. Can someone tell me where to find the source code for the > implementation? Probably sysdeps/ieee754/dbl-64/e_lgamma_r.c > gdb skips over the call to

Re: builtin gamma function

2011-11-15 Thread Ed Smith-Rowland
nce Taylor [mailto:i...@google.com] Sent: Tuesday, November 15, 2011 1:58 AM To: James Hirschorn Cc: gcc@gcc.gnu.org; james.hirsch...@gmail.com Subject: Re: builtin gamma function James Hirschorn writes: I have noticed that the builtin gamma function is very accurate and extremely fast. Can so

RE: builtin gamma function

2011-11-15 Thread James Hirschorn
t: Tuesday, November 15, 2011 1:58 AM To: James Hirschorn Cc: gcc@gcc.gnu.org; james.hirsch...@gmail.com Subject: Re: builtin gamma function James Hirschorn writes: > I have noticed that the builtin gamma function is very accurate and > extremely fast. Can someone tell me where to find the sou

Re: builtin gamma function

2011-11-14 Thread Ian Lance Taylor
James Hirschorn writes: > I have noticed that the builtin gamma function is very accurate and > extremely fast. Can someone tell me where to find the source code for the > implementation? Are you calling it on a constant? Because gcc will fold gamma applied to a constant which meet

builtin gamma function

2011-11-14 Thread James Hirschorn
I have noticed that the builtin gamma function is very accurate and extremely fast. Can someone tell me where to find the source code for the implementation? gdb skips over the call to the builtin gamma. I assume it is not implemented by the simple Lanczos algorithm in tr1/gamma.tcc because I