Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6202
| From | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: bug in Mathematica? |
| Date | 2011-11-05 09:53 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j9313n$abv$1@smc.vnet.net> (permalink) |
| References | <201111041103.GAA29326@smc.vnet.net> |
This is clearly a rather nasty bug. To see it more clearly:
f[m_, k_] := Product[Binomial[m, j], {j, 1, k}]
For numerical m and k we get the correct answer:
f[10, 2]
450
For symbolic n and m we get nonsense:
In[7]:=
f[m, n] /. {m -> 10, n -> 2}
During evaluation of In[7]:= Power::infy:Infinite expression 1/0^2 encountered. >>
During evaluation of In[7]:= Infinity::indet:Indeterminate expression 0 ComplexInfinity encountered. >>
Out[7]=
Indeterminate
In particular:
f[m, m - 1]
0
f[m, m + 1]
(I^(m*(m + 5))*m*(m*BarnesG[1 - m])^m*BarnesG[2 - m]^(-m - 1))/
BarnesG[m + 3]
which is also nonsense, since
Binomial[n, n + 1]
0
Andrzej Kozlowski
On 4 Nov 2011, at 12:03, Hansruedi Widmer wrote:
> Hi Everyone
>
>
> The code
>
> Sum[Binomial[m, j], {j, 1, m - 1}]
>
> produces the correct value -2+2^m.
>
>
> But the code
>
> Product[Binomial[m, j], {j, 1, m - 1}]
>
> creates the wrong value of zero. Does anyone have an explanation for why
> this is happening?
>
>
> Thanks and best regards
>
> Hansrued Widmer
>
>
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: bug in Mathematica? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-11-05 09:53 +0000
csiph-web