zeta(s)
zeta(s)
Riemann zeta function $\zeta(s)$.
Examples
In the Julia programming language, the zeta(s, z) function computes the Hurwitz zeta function ζ(s, z). The Hurwitz zeta function is a generalization of the Riemann zeta function ζ(s) when the second argument z is not equal to 1.
jldoctest
julia> zeta(2, 2)
1.6449340668482264
julia> zeta(0.5, 0.5)
-5.585053606381854
Here are some common examples of how to use the zeta function:
-
Compute the Riemann zeta function:
julia> zeta(2) 1.6449340668482264When the second argument
zis omitted, thezetafunction computes the Riemann zeta functionζ(s). -
Evaluate the Hurwitz zeta function for a specific
sandz:julia> zeta(0.5, 1.2) -0.3476724899796283This example computes the Hurwitz zeta function
ζ(0.5, 1.2). - Calculate the Hurwitz zeta function for complex
sandz:julia> zeta(0.5 + 1im, 0.2 + 0.3im) 0.07110381379772555 - 0.24513242462273064imThe
zetafunction can handle complex numbers for bothsandz.
Note: The Riemann zeta function is a special case of the Hurwitz zeta function when z is equal to 1.
See Also
User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.