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