Comment 0 for bug 891812

Revision history for this message
Bastiaan J. Braams (bjbraams) wrote : calc: numerical error in the multinomial function

The multinomial function is defined as a ratio of factorial functions, but that is not how it should be computed; it would cause unnecessary overflow. However, the following expression causes a numerical error (#502):
=MULTINOMIAL(1000,0)
The correct mathematical value is just 1 and that was the expected result.

Note that, for example, multinomial(100,0) is computed correctly; the value is 1.

In general the multinomial may be computed as a product of binomials, by recursion on the number of variables.
I'm using Ubuntu 11.10 and LibreOffice Calc 3.4.3, OOO340m1 (Build:302).