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:

  1. Compute the Riemann zeta function:

    julia> zeta(2)
    1.6449340668482264

    When the second argument z is omitted, the zeta function computes the Riemann zeta function ζ(s).

  2. Evaluate the Hurwitz zeta function for a specific s and z:

    julia> zeta(0.5, 1.2)
    -0.3476724899796283

    This example computes the Hurwitz zeta function ζ(0.5, 1.2).

  3. Calculate the Hurwitz zeta function for complex s and z:
    julia> zeta(0.5 + 1im, 0.2 + 0.3im)
    0.07110381379772555 - 0.24513242462273064im

    The zeta function can handle complex numbers for both s and z.

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.

*Required Field
Details

Checking you are not a robot: