MathGroup Archive 1999

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

Search the Archive

Re: "At long last, Sir, have you no shame?"

Ted Ersek wrote:

    Sum[g, {} ] ...

>I am pretty sure WRI made it work that way on purpose, so if I am right it
>isn't a bug!

This is obsequious semantic twaddle.

If it gives the mathematically wrong answer, it is a bug.
The "it's not a bug, it's a feature" argument may work elsewhere,
but it is difficult to argue that 2+2==5, whether it's programmed
that way or not.

>You can make Sum work the way you prefer by changing the attributes of Sum
>with the line below.  If you like you can put this in your (init.m) file and
>Sum will always work the way you prefer.

1. You completely miss the point, which is that 99.5% of people
    are not aware that Mathematica v4 gives the wrong answer
    to an entire class of problems. This is compounded by the
    fact that:

     (i)  the same syntax is perfectly acceptable in other iterator
          functions including Product, Plot, Table, etc

     (ii) the same syntax was acceptable in earlier versions.

2. If you bothered to check the behaviour of Sum under v3 before posting,
    you would see that it **used to work** perfectly well for both
    the examples you proffer.




>Sum[g,{i,1,n}] //InputForm
>(-1 + E^n)/((-1 + E)*E^n)
>In the example above Sum does what you expect, but now Sum gives the wrong
>answer in the next example.  If Sum has the HoldRest attribute instead of
>HoldAll you have to use Unevaluated[f[i]] in this example. This is sort of
>the flip side of the problem you noted. Notice when Sum has the default
>attributes you don't need to use Unevaluated in this example.

Colin Rose
tr(I)    -  Theoretical Research Institute
colin at


  • Prev by Date: Re: Try this on your shiny new v4 Front end (Mac)
  • Next by Date: Re: Livegraphics3D
  • Previous by thread: Re: Re: Re: "At long last, Sir, have you no shame?"
  • Next by thread: Re: "At long last, Sir, have you no shame?"