Talk:Kahan summation: Difference between revisions

m (→‎So far, in J and R: oops, sign error. (It started as + in my Go version...))
(→‎So far, in J and R: Self scaling?)
Line 88:
</pre>
:The idea is to sum enough numbers to skip over the fine-point-erry, while still picking numbers where it's easy to see the correct answer. Adding just three numers is always going rely on doing stuff to the last bit. If you add lots of numbers you can get the result we're interested in to span multiple decimal places. Most people will accept that the triangle fomula should give a good anwer, triangle(54321) fits in a 32 bit int. For types other than 754 binary64, it should be easy to pick other parameters bigVal and numSmall that will still show the loss of precision in the sequential sum. &mdash;[[User:Sonia|Sonia]] ([[User talk:Sonia|talk]]) 03:26, 14 December 2014 (UTC)
 
Thanks Sonia. I am still digesting your suggestion, but just on first reading, (and little cogitation I admit), the solution is not "self scaling" in any way, for different precisions. The current task floating point examples might self scale in say Python, but do not in J because of their "fuzzy comparison" (a problem with the task description and not a slur of J by the way). --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 05:18, 14 December 2014 (UTC)
Anonymous user