beta

Function beta 

Source
pub fn beta(a: &Expression, b: &Expression) -> Expression
Expand description

Beta function B(a, b)

The Beta function is defined as: B(a, b) = Γ(a)·Γ(b) / Γ(a+b)

§Mathematical Properties

  • B(a, b) = B(b, a) (symmetric)
  • B(a, b) = ∫₀¹ t^(a-1)·(1-t)^(b-1) dt

§Numerical Evaluation

Float inputs are evaluated numerically using Lanczos gamma approximation. Mixed Float/Integer inputs are converted to numerical evaluation.

§Arguments

  • a - First parameter
  • b - Second parameter

§Examples

use mathhook_core::{Expression, Number};
use mathhook_core::functions::special::beta;

let a = Expression::Number(Number::Integer(2));
let b = Expression::Number(Number::Integer(3));
let result = beta(&a, &b);

let a_float = Expression::Number(Number::Float(2.5));
let b_float = Expression::Number(Number::Float(3.7));
let result_num = beta(&a_float, &b_float);