MathGroup Archive 2007

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

Search the Archive

Re: CompensatedSummation in Total


You can use either a string or a symbol as an option name.
The context of the symbol will be guessed. Using symbols
has the downside of polluting the namespace so the
string name is a bit tidier in this respect.

Here is an example to illustrate compensated summation
(similar to the one you can find in the NDSolve
documentation).

In[1]:= test = Table[0.01, {1*^7}];

In[2]:= InputForm[Total[test]]

Out[2]//InputForm= 99999.99999999766

In[3]:= InputForm[Total[test, Method -> "CompensatedSummation"]]

Out[3]//InputForm= 100000.

Mark Sofroniou
Wolfram Research



  • Prev by Date: Re: Aspect Ratio question
  • Next by Date: step into dsolve routine on step at a time
  • Previous by thread: CompensatedSummation in Total
  • Next by thread: Re: Re: TraditionalForm ordering