MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: bug in Sum?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38130] Re: [mg38062] bug in Sum?
  • From: Vladimir Bondarenko <vvb at mail.strace.net>
  • Date: Tue, 3 Dec 2002 04:34:09 -0500 (EST)
  • In-reply-to: <200211281908.OAA24008@smc.vnet.net>
  • References: <200211281908.OAA24008@smc.vnet.net>
  • Reply-to: Vladimir Bondarenko <vvb at mail.strace.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Rob Pratt <rpratt at email.unc.edu> wrote on Thursday, November 28, 2002, 3:08:21 PM :

RP> In[4]:= Sum[Binomial[0,k],{k,0,Infinity}]

RP> Out[4]= 0

RP> I disagree.  Should be 1.

I confirm that you identified a bug the long-liver, I have sent your data
along with the reference to you to support at wolfram.com . Indeed,

  In[1] := Sum[Binomial[0, k], {k, 0, Infinity}]

  Out[1] = 0

  In[2] := NSum[Binomial[0, k], {k, 0, Infinity}]

  Out[2] = 1.

This bug exists in the following versions of Mathematica

  4.2 for Microsoft Windows (June 5, 2002)
  4.2 for Microsoft Windows (February 28, 2002)
  4.1 for Microsoft Windows (November 2, 2000)
  4.0 for Microsoft Windows (April 21, 1999)
  Microsoft Windows 3.0 (April 25, 1997)

Versions 1.2 and 2.2 returns the unevaluated input.

RP> Perhaps my desired result for In[3] is expecting too much.

I hardly think so. For example, another system returns 1 for the counterpart
of your input.

RP> In[3]:= Sum[Binomial[0,k],{k,0,n}]

RP> Out[3]= 0

RP> I disagree.  Should be If[n == 0, 1, 0].

Again, you are right because this sum is equal to 1 + 0 + 0 +... 0 = 1.

Please note that

  In[4] := Binomial[0, k]

  Out[4] = Sin[k*Pi]/(k*Pi)

while it should be  If[k==0, 1, Sin[k*Pi]/(k*Pi)] .


RP> In[5]:= Sum[Binomial[n,k],{k,0,Infinity}]

RP>          n
RP> Out[5]= 2

RP> I agree.  But inconsistent with Out[4].

RP> After all, x/x  reduces to 1, not If[x == 0, Indeterminate, 1].
RP> But Out[5] demonstrates that Mathematica knows the binomial theorem.
RP> It ought to be able to come up with the correct result for In[4].

Yes, it seems to be too obvious to discuss further.


Best wishes,

Vladimir Bondarenko
Mathematical and Production Director
Symbolic Testing Group

        http://www.CAS-testing.org/  GEMM Project             (95% ready)

Email:  vvb at mail.strace.net
Voice:  (380)-652-447325 Mon-Fri 6 a.m. - 3 p.m. GMT
ICQ  :  173050619
Mail :  76 Zalesskaya Str, Simferopol, Crimea, Ukraine




  • Prev by Date: Re: Mathematica Documentation
  • Next by Date: Re: Find all complex root in a region
  • Previous by thread: Re: bug in Sum?
  • Next by thread: ImplicitPlot and ContourPlot problem