lbeta

lbeta(x, y)

Natural logarithm of the absolute value of the beta function $\log(|\operatorname{B}(x,y)|)$.

Examples

  1. Calculate the natural logarithm of the beta function:

    julia> lbeta(2.5, 3.5)
    -1.1447298858494002

    This example calculates the natural logarithm of the beta function with x = 2.5 and y = 3.5.

  2. Compute the log absolute value of the beta function for integer inputs:

    julia> lbeta(5, 2)
    0.6931471805599453

    It computes the natural logarithm of the absolute value of the beta function for integer inputs.

  3. Handle edge case with negative inputs:
    julia> lbeta(-1.5, 4)
    -0.4377516497364015

    It properly handles negative inputs and returns the natural logarithm of the absolute value of the beta function.

Common mistake example:

julia> lbeta(0, 5)
ERROR: DomainError with -Inf result.

In this example, the input values include zero, which results in a domain error because the beta function is not defined for zero arguments. The input values should be valid and non-zero to avoid such errors when using lbeta.

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: