This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Implementation of Zeta functions in libstdc++


On 08/03/2014 08:28 PM, Florian Goth wrote:
Hi!
Thanks Ed for the kind reception of this idea.
To show what I have done so far I have set up a git repository here:
https://github.com/CaptainSifff/zeta
Obviously it is not yet in a state where it looks like sth. from the standard library; it still uses my conventions right now.
This commit
https://github.com/CaptainSifff/zeta/commit/6f4d70975f0a064a1d551fd5319f5ac3391f4234
gives an example where the old implementation failed and which essentially led me to recode all this.
So, what do you think,
What it be nice to have that functionality in gcc and is it worthwhile to patch it up for the std library?
I would be willing to do the work and get a copyright assignment.
Another thing:
I fiddled with the code for the evaluation of the Riemann Zeta function.
By removing a lot of calls to special functions in the innermost loop I
could speed it up by about a factor of 3 on my machines(core2 + core-i7).
The commits are
https://github.com/CaptainSifff/zeta/commit/d1d32f2ac2422d9c5408e1b850984dcb3cd2aeb6
and to clean things up:
https://github.com/CaptainSifff/zeta/commit/e48ba770a0591af8d56150401a50807218c00026
The basic idea is to replace the evaluation of the binomial coefficient via exp(log(gamma(x)))
by a recursive relation of the binomial coefficient. This does not worsen the numerical stability since
all intermediate results are perfectly representable. Of course that hard boundary where the result of the binomial coefficient is not
representable anymore is still present.
Florian.

Florian,

Great work! Please continue your work. The polylog function would also make a nice extension to the function library in it's own right. Please begin you copyright assignment quickly - that can take a long time to get through.

Finally, this is a C++ library issue so we should move our conversation there.

Thank you,
Ed



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