Jump to content

Talk:Kahan summation: Difference between revisions

suggest new test problem
(suggest new test problem)
Line 146:
 
::::OK, indeed the options() call just restricts the number of digits being displayed, not the actual number used in calculations. In that respect it is in the same boat as PHP. AFAIK there is a package (not a base component) that can deal with arbitrary precision (http://cran.r-project.org/web/packages/Rmpfr/), but that is not what this particular task is aiming to show. I have redone the operations and results on a Windows 7 64-bit machine from a friend, will check again on my Ubuntu 64-bit box to corroborate the results. --[[User:Jmcastagnetto|jmcastagnetto]] ([[User talk:Jmcastagnetto|talk]]) 02:11, 17 December 2014 (UTC)
 
:For a clear example of the differences in summation methods, try adding the first billion terms of the harmonic series 1/i. It will also be significantly different adding forward or backward. In 32 bit floats, the results are:
<pre> forward: 15.4036827
backward: 18.8079185
forward compensated: 21.3004818
backward compensated: 21.3004818</pre>
--[[User:Andy a|Andy a]] ([[User talk:Andy a|talk]]) 04:56, 21 April 2020 (UTC)
 
==So far, in J and R==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.