News for hackers. Stuff that matters.
Re:The Fundamental Axiom of Floating Point Arithmetic by dragontamer on Wednesday August 05, 2020 @08:35AM (#24060106)
> It fails for x-y when x and y are close. Subtraction is the easiest way to get big floating point errors.

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.