beta

constexpr double beta(const double a, const double b) noexcept

Evaluates the beta function [1] for a complex input.

Parameters

const int a

A real number.

const int b

A real number.

Returns

double

A real number.

The beta function is defined as follows:

\[B(a, b) = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a + b)}\]

Example

double a = 1;
double b = 1;
std::cout << beta(a, b) << "\n";

Output:

1

References