Post Reply 
How Accurate is Accurate Enough?
04-11-2021, 01:15 PM
Post: #1
How Accurate is Accurate Enough?
When my HP-41CV refused to turn on any more, my search for a fix or replacement led me to several places, one of them being this forum. A topic I have seen is "the most accurate calculator" or other similar themes, with 10, 12, 14, or even more digits accuracy. It makes me ask, how accurate is accurate enough?

I have worked my entire career as a chemical engineer with that 41CV I got used in 1983. I have never had a situation where its ten digits did not provide orders of magnitude better accuracy than would be meaningful. It is rare that I ever do a calculation that has more than 4 digits for all the inputs, so my calculator is always far more accurate than is needed.

Are there real-life calculations where 10, 12, 14 digits are actually required? Or is it a matter of getting more digits and accuracy because we can? Just curious.

As a side note, my searches revealed a simple way to address my 41CV, and it is working again. But that did not stop me from falling into the rabbit hole - now I also have a 35S and a DM41X.
Find all posts by this user
Quote this message in a reply
04-11-2021, 02:47 PM (This post was last modified: 04-11-2021 04:03 PM by Dave Shaffer.)
Post: #2
RE: How Accurate is Accurate Enough?
(04-11-2021 01:15 PM)Chumango Wrote:  Are there real-life calculations where 10, 12, 14 digits are actually required? Or is it a matter of getting more digits and accuracy because we can? Just curious.

Yep!

I used to support a NASA geodesy program. That program is now measuring relative locations all over the earth to a millimeter or so (https://en.wikipedia.org/wiki/Internatio...ms_Service). In round numbers, the earth is about 12,740 km in diameter - 10^7 meters. So, 1 mm precision requires parts in 10^11 calculations. All our analysis programs used quadruple precision calculations.

These (NASA and other) systems use hydrogen maser time standards - we worry about stability here at parts in 10^15 - 10^16 (and can measure at that level!). And, current precision in atomic time keeping laboratory standards approaches parts in 10^18!! With such clocks, you can measure the effects of gravity on a clock by comparing clock rates at the bottom and top of tall buildings.
Find all posts by this user
Quote this message in a reply
04-11-2021, 02:50 PM
Post: #3
RE: How Accurate is Accurate Enough?
The frontiers of particle physics requires discernment at these levels...
Find all posts by this user
Quote this message in a reply
04-11-2021, 03:00 PM
Post: #4
RE: How Accurate is Accurate Enough?
I can see that, but for calculators? Who is using calculators to run those numbers? If you are using calculators to do the number crunching for these things real-time, and using those numbers, I am impressed.

I work for a facility with a particle accelerator, and great accuracy is required for things there - but none of that is done on calculators.
Find all posts by this user
Quote this message in a reply
04-11-2021, 03:12 PM
Post: #5
RE: How Accurate is Accurate Enough?
From a numerical analyst's POV, accuracy is dependent on the problem. There's no mathematical definition. However, one can usually analyze how much precision is needed for a particular problem. There are stable algorithms that can get by with single precision (about 7 digits) but some unstable algorithms cannot ever get close to the answer. Taking the quadratic formula for example, if one uses x1=(B-Sqrt(B^2-4AC)/(2A) and x2=(B+Sqrt(B^2-4AC)/(2A) fails badly. If B is positive, the formula for x1 can be in error (and if B is negative, x2 will be wrong). The point is that if A and C are small (or their product is) compared to B, one essentially tries to compute B-B with poor values for B. In this case, one uses the x1 formula with negative B and formula 2 with positive B and computes the x1=C/(Ax2) or x2=C/(Ax1) to get the other root; the product of the roots is C/A. IF A=1, the B is the sum of the root and C is the product. This occurs in solubility product computations, one gets things like x^2-1.0000001x+.0000001=0 (I think this is right).

Rounding is tricky. With any even base other than 2 (like 10 or 16), it can difficult to compute the average of 2 numbers even if both numbers and their average can be exactly represented. Example: 4 digit arithmetic (base 10), A=6.007, B=6.008, using (A+B)/2 fails with any rounding method. More precision helps but the error still arises.
6.007+6.008=12.015 which rounds to either 12.010 12.02 and dividing by 2 gives 6.005 or 6.010. Either rounding is wrong as the average of 2 numbers has to be no larger than the larger and no smaller than the smaller.
Find all posts by this user
Quote this message in a reply
04-11-2021, 05:29 PM
Post: #6
RE: How Accurate is Accurate Enough?
There are plenty of finance problems where a result may need to be accurate to 12 or more digits. Having only 10 means you can't calculate in the range of billions of dollars with accuracy to the cent. And if you're doing various compound interest problems at those scales, you may need more than 12 digits in the intermediate calculations to arrive at a result that's accurate to at least 12.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-11-2021, 07:26 PM
Post: #7
RE: How Accurate is Accurate Enough?
(04-11-2021 01:15 PM)Chumango Wrote:  When my HP-41CV refused to turn on any more, my search for a fix or replacement led me to several places, one of them being this forum. A topic I have seen is "the most accurate calculator" or other similar themes, with 10, 12, 14, or even more digits accuracy. It makes me ask, how accurate is accurate enough?

I have worked my entire career as a chemical engineer with that 41CV I got used in 1983. I have never had a situation where its ten digits did not provide orders of magnitude better accuracy than would be meaningful. It is rare that I ever do a calculation that has more than 4 digits for all the inputs, so my calculator is always far more accurate than is needed.

Are there real-life calculations where 10, 12, 14 digits are actually required? Or is it a matter of getting more digits and accuracy because we can? Just curious.

As a side note, my searches revealed a simple way to address my 41CV, and it is working again. But that did not stop me from falling into the rabbit hole - now I also have a 35S and a DM41X.

I worked on guided missiles with nothing more FORTRAN double precision numbers (about 16 digits) My involvement with the missile program came to an end when I goofed and forgot a comma changing a line of code like this

DO 100 I=1,500

to this

DO 100 I=1 500

according to FORTRAN, the second line assigns 1500 to the variable DO100I instead of looping and incrementing the variable I 500 times. Both statements are perfectly legal in FORTRAN IV which ignores imbedded spaces.

The missile had to be aborted. The brass weren't amused.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
04-11-2021, 07:50 PM
Post: #8
RE: How Accurate is Accurate Enough?
Please see this topic:
https://www.hpmuseum.org/forum/thread-3955-page-2.html

http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, http://wilsonminesco.com/links.html )
Visit this user's website Find all posts by this user
Quote this message in a reply
04-14-2021, 07:15 AM
Post: #9
RE: How Accurate is Accurate Enough?
Hello,

Although calculators end results do rarely need 12 decimal places... they can requires 4 or 5... (think 1234,55)...

Some calculations require a lot of intermediary steps where precision is VERY easily lost (unless the programmer is super careful).

This is where the 12 decimal come into effect, they allow to give you an end result at 4 or 5 decimal places...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
04-14-2021, 10:30 AM
Post: #10
RE: How Accurate is Accurate Enough?
(04-11-2021 07:26 PM)toml_12953 Wrote:  DO 100 I=1 500

One of my favourite little hiccups in FORTRAN. Implicit variable declarations and ignoring spaces.

Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: