Numerical analysis text books talks about the absorption phenomena (Introduction to Numerical Analysis and Scientific Computing; Nabil Nassif; Dolly Khoueiri Fayyad; CRC Press; 2014) when adding floating point numbers with a big difference in magnitude between them. There is also the concept of Unit In Last Place or ulp. I understand that the ulp of a given floating point number tell us which is the gap between the floating point number and its successor.

Is there any relationship between the absortion phenomena and the ulp? What I’m trying to do is that if we are given X and y with X >> Y so X + Y = X, then how many times I have to add Y so X doesn’t absorve the added Y (X + Y + ... + Y).

  • question title says "absortion" while text says "abortion", which is correct? Also, can you please refer an example of text books you're talking about – gnat Feb 15 '16 at 17:22
  • 1
    Hi, I have edited the post with the typo and the text book that I have read. – ArgBat Feb 15 '16 at 17:31
  • Sure, Imagine what happens when you add A+B, and B < ulp(A). – Solomon Slow Feb 15 '16 at 19:34
  • Shouldn't it be ulp(A) / 2? Rounding will bump it up to the next digit, right? – Andrew Piliser Feb 15 '16 at 19:37

If X + Y truly equals X (i.e. the bit patterns are identical), then it doesn't matter how many times you add Y, the result will still be X - nothing is changing from one iteration to the next, so the result will always be the same; (X + Y) + Y = X + Y = X.

None of this implies that X + (Y + Y + Y + ... + Y) = X though; while mathematically that's identical to (((X + Y) + Y) + Y + ...), the approximations we make when doing floating point arithmetic mean you can get different results.

  • Hi Phillip, ok, understood ... now I want to invert the sum in this way (Y + ... + Y) + X and find a relationship ULP(X) and Y (if any) that will tell me how many Y I have to add together before I add X so (Y + ... + Y) + X != X – ArgBat Feb 16 '16 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.