maxima bug error "multinomial(...)"



On 2013-10-29, dan hayes <zmth at yahoo.com> wrote:

> [multinomial(3,[1,1,1,0]),multinomial(3,[1,1,0]),multinomial(3,[0,1,1]),multinomial(3,[1,0,1])/*error*/,multinomial(3,[1,0,1,1])/*error*/];
>
> (%o175) [6,6,6,3,3] 
>
> the last 2 are obviously incorrect - seems to happen whenever have a 0 as the 2nd argument atleast in these examples.

Thanks for the info -- can you report this to the bug tracker?
http://sf.net/p/maxima/bugs

Looking at the code for multinomial in share/sym/util.lisp, I see that 0
seems to be a special value in the second argument. I don't understand
the code and don't know how to fix it. It's possible the code was
written with some unstated assumptions in mind (it is part of a package
for working with symmetric polynomials).

Maybe you can use multinomial_coeff instead?

Sorry I can't be more helpful,

Robert Dodier