The presumed cause of the bug is that the multinomial is computed as a
ratio of factorials; this would indeed cause an overflow when the sum of
the arguments exceeds 170. Please note that for the implementation of
the Binomial in LibreOffice Calc (function COMBIN) no such restriction
applies; it is computed carefully to avoid unnecessary overflow.

Please note also that the bug with multinomial would be almost trivial
to fix.

A recurrence for computing the multinomial function as a product of
binomials may be found in the description of the multinomial function in
the Sage mathematics system:

http://www.sagemath.org/doc/reference/sage/rings/arith.html#sage.rings.arith.multinomial

The associated 5-line Python code by Gabriel Ebner may be found here:

http://trac.sagemath.org/sage_trac/attachment/ticket/3132/trac3132-2.diff

I believe that this is a very natural way to compute the multinomial,
and it would completely remove the problem of unnecessary overflow.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/891812

Title:
  [Upstream] Calc: MULTINOMIAL only supports parameters up to 170

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/891812/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to