cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float betnm1f (int n); extern double betnm1 (int n); extern long double betnm1l (int n); extern __float80 betnm1w (int n); extern __float128 betnm1q (int n); extern long_long_double betnm1ll (int n); extern decimal_float betnm1df (int n); extern decimal_double betnm1d (int n); extern decimal_long_double betnm1dl (int n); extern decimal_long_long_double betnm1dll (int n);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
The Catalan/Dirichlet beta function is defined by
beta(n) = sum(k = 1:Infinity) (-1)**(k - 1) * (2*k - 1)**(-n).
For positive arguments, its values rapidly approach 1. Consequently, this function returns an accurate value of the difference beta(n) - 1. That relation is equivalent to
betam1(n) = sum(k = 2:Infinity) (-1)**(k - 1) * (2*k - 1)**(-n).