Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

It's supposed to be zero but for some reason the result produces a peculiar series of digits at the end.

Also, here's the .xlsx of it:

share|improve this question
I found a workaround with round(), and I heard it's a problem with floating arithmetic. I do not know if it can be fixed. – j riv Apr 6 '13 at 11:00

This happens because of the limited precision of floating point numbers representation on computers and cannot be fixed because it is an intrinsic problem of the way number are represented on a computer. There might be workarounds, such as round() or a clever implementation of the formulas to reduce error propagations.

Excel uses 8-byte (64 bit) floating point representation, meaning that it can achieve a maximum accuracy of about 10^-15. The inaccuracy can then spread across the steps of a calculation.

I suggest that you read this article on Wikipedia that investigates this topic.

share|improve this answer
They were using floating point on the windows calculator too to aquire new and different math :-) Simple rounding could have solutioned it. Instead I get to read 20 pages of stuff about it to find out that FP has a specific accuracy as used, and within that accuracy used, it should just be rounded back to within that accuracy. Rounded proper not chopped. – Psycogeek Apr 6 '13 at 12:40
Advanced users may decide if they need a rounded or truncated result based on their needs. Unnecessary rounding slows down the calculations. – Pincopallino Apr 8 '13 at 14:04
up vote 2 down vote accepted

Self post: It's a documented limitation for floating point arithmetic:

IMO it should be warning more visibly when the results can be so blatantly erroneous to not be considered a bug, but anyway.

A workaround is to use round().

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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