std::riemann_zeta,std::riemann_zetaf,std::riemann_zetal (3) - Linux Manuals
std::riemann_zeta,std::riemann_zetaf,std::riemann_zetal: std::riemann_zeta,std::riemann_zetaf,std::riemann_zetal
NAME
std::riemann_zeta,std::riemann_zetaf,std::riemann_zetal - std::riemann_zeta,std::riemann_zetaf,std::riemann_zetal
Synopsis
double riemann_zeta( double arg );
float riemann_zeta( float arg );
long double riemann_zeta( long double arg ); (1) (since C++17)
float riemann_zetaf( float arg );
long double riemann_zetal( long double arg );
double riemann_zeta( IntegralType arg ); (2) (since C++17)
1) Computes the Riemann_zeta_function of arg.
2) A set of overloads or a function template accepting an argument of any integral_type. Equivalent to (1) after casting the argument to double.
Parameters
arg - value of a floating-point or integral type
Return value
If no errors occur, value of the Riemann zeta function of arg, ζ(arg), defined for the entire real axis:
* For arg>1, Σ∞
* For 0≤arg≤1,
* For arg<0, 2arg
Error handling
Errors may be reported as specified in math_errhandling
* If the argument is NaN, NaN is returned and domain error is not reported
Notes
Implementations that do not support C++17, but support ISO_29124:2010, provide this function if __STDCPP_MATH_SPEC_FUNCS__ is defined by the implementation to a value at least 201003L and if the user defines __STDCPP_WANT_MATH_SPEC_FUNCS__ before including any standard library headers.
Implementations that do not support ISO 29124:2010 but support TR 19768:2007 (TR1), provide this function in the header tr1/cmath and namespace std::tr1
An implementation of this function is also available_in_boost.math
Example
// Run this code
Output:
External links
Weisstein,_Eric_W._"Riemann_Zeta_Function." From MathWorld--A Wolfram Web Resource.