MathGroup Archive 2004

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

Search the Archive

Re: simple bug about Sum/Product function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46821] Re: simple bug about Sum/Product function?
  • From: drbob at bigfoot.com (Bobby R. Treat)
  • Date: Tue, 9 Mar 2004 04:31:10 -0500 (EST)
  • References: <c2eo8h$t1f$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Sum[2, {junk}] returns no error because there IS no error, and it
returns unevaluated because there's no replacement rule for that kind
of argument list.  Those may seem like contradictory statements to
you, but they aren't.

Bobby

"Dana DeLouis" <delouis at bellsouth.net> wrote in message news:<c2eo8h$t1f$1 at smc.vnet.net>...
> In version 5 for Windows, it works for me also up to 1,000,000.  It
> returns unevaluated for values over that.
> 
> Sum[2, {1000000}]
> 
> 2000000
> - - 
> Sum[2, {1000001}]
> 
> Sum[2, {1000001}]
> - - 
> However, if I use NSum, I get a error no matter what the value. 
> 
> NSum[2, {100}]
> 
> NSum::itraw : Raw object 100 cannot be used as an iteration.
> - - 
> 
> As others have mentioned, it works ok if the first item is not a "Raw
> Object", but an iteration variable.
> 
> Sum[2, {i, 1000001}]
> 
> 2000002
> 
> Dana
> 
> P.S.  I have no idea why no error here though.
> 
> Remove[junk]
> - - 
> 
> Sum[2, {junk}]
> 
> Sum[2, {junk}]
> - - 
> 
> NSum[2, {junk}]
> 
> ComplexInfinity
> 
> 
> "MATUDA Yuko" <matsuda.yuko at acm.org> wrote in message
> news:c237r8$ie9$1 at smc.vnet.net...
> > Hello there,
> > 
> > Try the following simple expressions in Mathematica(ver5)
> > 
> > Sum[1, {1000001}]
> > Product[1, {1000001}]
> > 
> > There are no problems in ver 4.2.
> > 
> > Yuko MATSUDA


  • Prev by Date: Re: Problem with Mathematica driving me nuts
  • Next by Date: Re: Playing multiple sounds in sequence
  • Previous by thread: RE: simple bug about Sum/Product function?
  • Next by thread: Re: simple bug about Sum/Product function?