This is the mail archive of the 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:
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:
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
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
and to clean things up:
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.


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,

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