Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: CompensatedSummation in Total

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81318] Re: CompensatedSummation in Total
  • From: "marks at wolfram.com" <marks at wolfram.com>
  • Date: Wed, 19 Sep 2007 05:25:54 -0400 (EDT)
  • References: <fc4uf2$kjk$1@smc.vnet.net>

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