Skip to content

bellB

specfun · scripts/specfun/bellB.m

: b = bellB (n)

Bell numbers for the non-negative integers in n, evaluated element by element.

The Bell number B_n counts the partitions of an n-element set. In particular bellB (10) == 115975. Results are exact doubles while they fit in the 53-bit mantissa (through B_{22}); larger values are correctly rounded floating-point approximations, becoming Inf once they exceed realmax.

For integer classes the result has the same class and saturates at the largest representable value. single input yields single output.

Behaviour note (MATLAB R2026a): MathWorks does not ship bellB in R2026a mathematics (specfun/elfun). This Nexus API follows the Wolfram-style name bellB(n) and the next-wave golden B(10)=115975 (nexus#1854).