Qu

beta

Builtin index · Core maths

beta(a, b)

Input: a, b · Output: no output

What it is

The beta function B(a, b) = Γ(a) Γ(b) / Γ(a + b) for a, b > 0, elementwise (number, or same-shape Vec/Mats). Direct from Γ where a + b <= 170, and from Stirling's series without cancellation beyond (beta(100, 100) is correct to about 1e-14 relative, where gamma would overflow). a <= 0, b <= 0 or NaN give NaN. Errors: missing arguments, mismatched shapes, complex input.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
beta(a, b)
a —a <= 0, b <= 0 or NaN give NaN.
b number, Vec, or MatThe beta function B(a, b) = Γ(a) Γ(b) / Γ(a + b) for a, b > 0, elementwise (number, or same-shape Vec/Mats).
not documented yetErrors: missing arguments, mismatched shapes, complex input.

Examples

No documentation example calls this form yet. The Core maths chapter is where one belongs.