Jump to content

Kahan summation: Difference between revisions

→‎REXX tweaked version: add output for ooRexx
(→‎REXX tweaked version: add output for ooRexx)
Line 1,075:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
</pre>
'''output''' for ooRexx:
<pre>decimal digits = 6
a = 10000.0
b = 3.14169
c = 2.71828
simple summation of a,b,c = 10005.8
Kahan summation of a,b,c = 10005.9
 
ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªª
 
decimal digits = 32
a = 1.0
b = 0.00000000000000000000000000000315544362088404722164691426133
c = -0.00000000000000000000000000000315544362088404722164691426133
simple summation of a,b,c = 1.0000000000000000000000000000001
Kahan summation of a,b,c = 1.0000000000000000000000000000000
 
ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªª</pre>
 
=={{header|Tcl}}==
2,299

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.