Post Reply 
Kahan summation algorithm
12-21-2014, 08:52 AM
Post: #3
RE: Kahan summation algorithm
What I have never seen mentioned is the fact that this algorithm is meant for binary floating point. Try adding x=y= 1e12-2
You'll get
s := 2e12
c := -2, while it should be -4

BTW my version reads:

Code:
*LBL "K+"
 +
 RCL+ ST Y
 STO- ST Y
 X<>Y
 RCL+ ST L
 END

same size.

Werner
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Kahan summation algorithm - Thomas Klemm - 12-19-2014, 09:12 PM
RE: Kahan summation algorithm - Gerald H - 12-20-2014, 09:47 AM
RE: Kahan summation algorithm - Werner - 12-21-2014 08:52 AM



User(s) browsing this thread: 1 Guest(s)