Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The Fundamental Axiom of Floating Point Arithmetic. Parent comment
And note: addition might be subtraction, while subtraction might be addition.
Consider x=1.0 and y=-0.99999.
x + y = 0.00001
You did addition, but you got cancellation error. The only solution is to sort the numbers from largest to smallest dynamically during runtime.
There are no comments on this comment yet.
And note: addition might be subtraction, while subtraction might be addition.
Consider x=1.0 and y=-0.99999.
x + y = 0.00001
You did addition, but you got cancellation error. The only solution is to sort the numbers from largest to smallest dynamically during runtime.