Hacker News new | ask | show | jobs
Consteval Riemann zeta function and plot (github.com)
1 points by DaveFlater 6 days ago
1 comments

Rzzeta is a C++26 demo/stunt that generates an ASCII plot of the magnitude of the Riemann zeta function at compile time. It works in suitably recent g++.

The hard part was discovering and working around library functions that could or should have been declared constexpr but were not, beginning with std::riemann_zeta (though that is furthermore limited to real numbers).