revert multinomial to floating-point version to avoid overflow