Riemann_zeta

approximates the Riemann zeta function in the entire complex plane
0 Downloads
Updated 18 Nov 2025

View License

Riemann_zeta(s) approximates the Riemann zeta function in the entire complex plane. The input s can be a scalar or vector.
For |Im(s)|<100 the approximation is correct to around 13 decimal digits;
For |Im(s)|<1000 the approximation is correct to around 12 decimal digits;
For |Im(s)|<10000 the approximation is correct to around 11 decimal digits;
For larger values of |Im(s)| the accuracy will continue to decrease in a similar way: with every increase of Im(s) by a factor of ten we lose approximately one decimal digit of precision. More details can be found at the end of Section 1 in [1].
When |Im(s)|>200 and -4<Re(s)<5 we use the approximation zeta_8(s) developed in [1]. For other values of s we use either Euler-Maclaurin formula or direct summation zeta(s)=\sum_{n=1}^{\infty} n^{-s}.
References:
[1] A. Kuznetsov, "Simple and accurate approximations to the Riemann zeta function", 2025, preprint, https://arxiv.org/abs/2503.09519

Cite As

Alexey_Kuznetsov (2025). Riemann_zeta (https://uk.mathworks.com/matlabcentral/fileexchange/182633-riemann_zeta), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0