1
$\begingroup$

Are there any situations where rounding up by 3 or more decimal places is required?

I have a computer system that is producing rounding errors if it rounds by only 2 decimal places. However, if i choose to round by 3 then the result is accurate.

I cannot however figure out why i need to do this.

  • 0
    More places always increases accuracy. Often one guard digit is sufficient, but not always. Think if you have to round 0.04949995 and need to know that it is truly less than 0.0495 so you round down. One simple approach is to keep all the places until the final result, then round and hope for the best.2012-12-12

3 Answers 3

3

Yes, your question is fundamental to a whole branch of applicable mathematics called numerical analysis. So there are plenty of situations where you might need to round to some particular number of decimal places (maybe three, maybe three hundred).

  • 0
    Indeed. Currency calculations have to calculate with at least 4 decimal digits to be regarded as legal in many countries and systems. For tax rates and currency exchange, way higher digit counts are used.2012-12-12
1

I am not exactly sure what you mean, but I recon this is answering your question: For example we want to calculate $0.12*0.34$. the exact solution is $0.0408$, however, rounded to 2 decimal places, it is $0.04$ which is (obviously) inaccurate.

The problem is: When you round, you lose accuraccy. This directly affects the result in many cases (in others, it does not). Numerical mathematics tries to understand this pheomenon and to calculate the maximum error that results from this. In general, currencies are calculated with a precision of 4 decimal places.

1

It may be that your program is rounding the terms AND the product. For example, .915 * .335 = .306525 which rounds to .31, but .92 * .34 = .322 which rounds to .32. That would account for the $0.01 rounding error you're experiencing.