cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float bernumf (int n); extern double bernum (int n); extern long double bernuml (int n); extern __float80 bernumw (int n); extern __float128 bernumq (int n); extern long_long_double bernumll (int n); extern decimal_float bernumdf (int n); extern decimal_double bernumd (int n); extern decimal_long_double bernumdl (int n); extern decimal_long_long_double bernumdll (int n);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
Such numbers appear in Taylor-series expansions of the trigonometric and hyperbolic tangent, log-gamma, and psi functions, and in several other areas, especially number theory.
Except for B[1], Bernoulli numbers of odd index are zero.
Those of even index are rational numbers that alternate in sign and grow rapidly to the floating-point overflow limit. Because of leading digit loss from subtractions in their recurrence relation, their calculation requires high-precision arithmetic, which is why they are precomputed that way and then rounded and stored to machine precision in a compile-time internal table.
In IEEE 754 32-bit arithmetic, the result is plus/minus Infinity for n > 65. The overflow limits in IEEE 754 64-bit, 80-bit, and 128-bit arithmetic are reached for n values above 259, 2313, and 2313 respectively.