This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, wwwdocs] gcc-4.3/changes.html: Fortran - Add GAMMA/LGAMMA


------------------------------------------------------------------------
------
I am currenly working on fallback implementations of tgamma*() and
lgamma*() using the Lanczos approximation (one reason why I've been
quiet these last days :-)  I've gotten pretty far by now, but you
can expect a patch within the next few days.

I hope we didn't do too much duplicate effort here.

	Thomas

------------------------------------------------------------------------
------

I don't know how much this will help but I did a similar thing for
libstdc++ a while back.

This is in /trunk/libstdc++-v3/include/tr1/gamma.tcc on SVN.

http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/include/tr1/gamma.tcc?
revision=125244&view=markup


The implementation is pretty templatized (so we could support all the
floating types) so translation might be a little annoying.

Also, in C++, we didn't touch complex because it's pretty tough in
general.

This helped our implementation of C++ TR1 math special functions to work
on systems without a math processor or anything.

There are other tweaks to the Lanczos algorithm that one could use
(different parameters).  I'm interested to see what you come up with.

Ed Smith-Rowland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]