I have a C++ program that uses the equation
$$\zeta(s)=\sum_{n=1}^\infty\frac{1}{n^s}$$
to calculate the Riemann zeta function.
This equation converges fast for larger values, like 183, but converges much slower for smaller values, like 2. For example, calculating the value of $\zeta(2)$ took an hour to be accurate to 5 digits, but one second for $\zeta(183)$ to be accurate to 100 digits.
Are there any equations for calculating the Riemann zeta function that are faster for calculating smaller values?
Because I am coding in C++, I cannot use $\int$ (without implementing external libraries, which is not really an option here).
No comments:
Post a Comment