How to handle significant digits of exact values?

In summary, significant digits ensures that the product of two numbers will be rounded to the nearest integer while still staying within the bounds of the number of significant digits that was chosen.
  • #1
DaveC426913
Gold Member
22,852
6,537
I learned the basics of sigdigs in school, but that era has more in common with the pyramid of Giza than modern day.

I was figuring the angle of a 3d-designed part in my head the other night. It's a cylindrical polyhedron with 32 faces (because 32 seemed like a good number). I didn't expect to end in the exact value of 11.25. That is a derived value, but it is still exact (effectively to infinite decimal places, like inches in a foot).

It made me wonder how these numbers are handled in more formal, complex calculations with significant digits.

If the above values were used in a calculation that involved others values that have, say, 10 or more sigdigs in them, I assume these values don't count against precision i.e. I wouldn't drop all but the last 4 sigdigs from my 10 sigdig values, yes?

Which makes sense, but how does one track that if the steps of the calculation are, like 50 lines long? Especially if the 11.25 is then operated upon by some other number that does have a number of sigdigs. Now the 11.25 goes away.

So does one simply track these non-sigdig values all the way through the calculations? Is this often a problem that warrants proofreading?
 
Mathematics news on Phys.org
  • #2
Are you worrying about how to calculate or how to denote the calculation?
The calculation should carry a few more significant figures than the final result (better too many than too few). Computers carry what they carry (although you can up the precision but that usually means you either work at NBS or your doing calculations badly)
Numbers that are reported for public consumption should reasonably match the sig fig of the the worst multiplier in the term. Additive terms are tricky and depend upon details, particularly when taking differences. Mostly you don't want to lose information nor do you wish to falsely advertise.
I would quote a bunch of rules but I never learned them. And of course scientific notation is your friend (as is having used a slide rule for calculation!)
 
  • Informative
Likes DaveC426913
  • #3
DaveC426913 said:
Which makes sense, but how does one track that if the steps of the calculation are, like 50 lines long? Especially if the 11.25 is then operated upon by some other number that does have a number of sigdigs. Now the 11.25 goes away.

So does one simply track these non-sigdig values all the way through the calculations? Is this often a problem that warrants proofreading?
This got a lot longer than I expected. No idea whether it will provide much value. But here we go.

Calculus provides one way to answer the question. You have this computation that takes inputs x, y, z and w and produces an output F. You know the error distribution (one hopes) for x, y, z and w. You want to know the error distribution for F.

Roughly speaking, one evaluates the partial derivative of F with respect to each of x, y, z and w, multiplies each partial derivative by the radius of the error distribution and adds the squares of the four (or more or fewer in general) results and takes the square root of the sum. If we use E(x) to refer to the radius of the error distribution for x then:$$E(F) = \sqrt{(E(x) \ \frac{\delta F}{\delta x})^2 + (E(y)\ \frac{\delta F}{\delta y})^2 + (E(z)\ \frac{\delta F}{\delta z})^2 + (E(w) \ \frac{\delta F}{\delta w})^2 }$$I do not know how much of a warm fuzzy feeling that formula gives you. So maybe we can back off to something a bit more basic.

Say that we are computing the product of ##x## and ##y##. We have an error bound of ##d_x## for ##x## and an error bound for ##d_y## on ##y##. The product will be$$xy + xd_y + yd_x + d_xd_y$$As long as the errors are small, their product will be smaller still and we can agree to sweep ##d_xd_y## under the rug.

Now we might not have actually been given absolute errors like ##d_x## and ##d_y##. Instead, we might have been given relative errors, ##r_x## and ##r_y## where ##d_x = x r_x## and ##d_y = y r_y##. With this in mind we can rewrite that product as$$xy + xyr_y + xyr_x$$Naively, we would conclude that ##d_{xy} = xyr_y + xyr_x## and ##r_{xy} = r_y + r_x##. That is not quite right. But we will get to that.

Significant digits takes the point of view that relative error is expressed logarithmically as ##\frac{1}{10}## raised to the power of the number of significant digits.

The rule for significant digits is that ##r_{xy} = max ( r_x, r_y )##, always rounded to an integer number of significant digits.

Obviously, this is a blatantly false approximation. But it is easy to calculate. Just take the number of digits in the product as the lower of the number of significant digits in either of the factors.

A better rule is to realize that independent normal distributions add in quadrature. Other independent distributions add approximately in quadrature. Consider, for instance, what happens if you roll a die 50 times and take the sum of the rolls. Then you roll it 50 more times and take the sum again. If you add the two sums, you do not get a distribution that is twice as wide. You only get a distribution that is approximately ##\sqrt{2}## times as wide.

So a better estimate for the distribution is$$r_{xy} = \sqrt{{r_x}^2+{r_y}^2}$$That kind of rule is a lot tougher to carry forward through your calculation than just counting digits. But you need to do something of the sort if you are going to track errors properly.

We should probably tie this back to the question of what happens if you multiply a perfectly accurate number like 11.25 with a number such as 2000 with a relative error of one part in 123 thousand.

##x = 11.25##, ##r_x = 0##
##y = 2000##, ##r_y = \frac{1}{123000}##
##r_{xy} = \sqrt{0^2 + \frac{1}{123000}^2} = \frac{1}{123000}##
##xy = 22500 \pm 0.18##

I've never been exposed to a formal classroom treatment of this exact subject matter. It is a matter of synthesizing freshman physics, a 400 level stat class back in the day, various postings here (I seem to remember a fair bit of stuff from @Dale), some Googling and a bit of common sense.
 
Last edited:
  • Like
  • Wow
Likes hutchphd, DaveE and DaveC426913
  • #4
DaveC426913 said:
So does one simply track these non-sigdig values all the way through the calculations? Is this often a problem that warrants proofreading?
You could work algebraically until you have a single final calculation.
 
  • Like
Likes hutchphd
  • #6
Being strictly "mathematical" in one's operations allows one to accept all crazy results---midway or in the end. But doing physics or engineering is a totally different game, for it involves measurements. Initial measurements to get numerical values, and then again final measurements to verify the formulae you used.

That means all one's methodology of how many significant digits to accept and at what stage is governed by the precision of the instruments one used to measure. Your 360 degrees / 32 sides example results in the rational number 45/4, which is considered exact by definition and gives a decimal value of only four required digits by sheer luck due to the particular numerator and denominator involved.

A challenge would be to actually construct a 32-side cylindrical polyhedron, with all its sides exactly---EXACTLY---equal to each other. How would one verify that construction?
 
  • Like
Likes hutchphd
  • #7
DaveC426913 said:
It made me wonder how these numbers are handled in more formal, complex calculations with significant digits.
I always learned that values should be listed to their known precision but if you have one that is exact (or you consider it exact anyway) you should state it with trailing zeros if needed to match the highest significant digit number other than it.

So, for example, if you have 11.25 and no other number in you calcs has more than 4 significant digits, then you just list it ias 11.25 but if, for example, you have a number with 6 significant digits, then you list it as 11.2500 to emphasize that it HAS that many significant digits.

After calculating, you round your answer back to the number of significant digits in the LEAST significant-digit number in your calculation.
 
  • Like
Likes DaveC426913 and hutchphd
  • #8
phinds said:
you list it as 11.2500 to emphasize that it HAS that many significant digits.
That would work.
 
  • #9
phinds said:
Why did you put a reference in this threat to THIS THREAD ???

It's due to a forum bug; most likely it was not done on purpose. If certain things are copied before posting a reply or starting a new thread, a link to the thread's OP can be generated and auto-inserted.

Mentor Note: And off-topic discussion about this strange self-referencing link has been removed from the thread. Carry on... :smile:
 
  • Informative
Likes phinds
  • #10
DaveC426913 said:
I learned the basics of sigdigs in school, but that era has more in common with the pyramid of Giza than modern day.

I was figuring the angle of a 3d-designed part in my head the other night. It's a cylindrical polyhedron with 32 faces (because 32 seemed like a good number). I didn't expect to end in the exact value of 11.25. That is a derived value, but it is still exact (effectively to infinite decimal places, like inches in a foot).

It made me wonder how these numbers are handled in more formal, complex calculations with significant digits.

If the above values were used in a calculation that involved others values that have, say, 10 or more sigdigs in them, I assume these values don't count against precision i.e. I wouldn't drop all but the last 4 sigdigs from my 10 sigdig values, yes?

Which makes sense, but how does one track that if the steps of the calculation are, like 50 lines long? Especially if the 11.25 is then operated upon by some other number that does have a number of sigdigs. Now the 11.25 goes away.

So does one simply track these non-sigdig values all the way through the calculations? Is this often a problem that warrants proofreading?
My first question, when looking at this tread was, "Where does this 11.25 come from?"

Oh! That's actually 11.25° . It came from ##\dfrac{360^\circ}{32}## .

So, yes, 11.25° is an exact number.
 
Last edited:
  • #11
jbriggs444 said:
Significant digits takes the point of view that relative error is expressed logarithmically as ##\frac{1}{10}## raised to the power of the number of significant digits.

....

A better rule is to realize that independent normal distributions add in quadrature. Other independent distributions add approximately in quadrature. Consider, for instance, what happens if you roll a die 50 times and take the sum of the rolls. Then you roll it 50 more times and take the sum again. If you add the two sums, you do not get a distribution that is twice as wide. You only get a distribution that is approximately ##\sqrt{2}## times as wide.

So a better estimate for the distribution is$$r_{xy} = \sqrt{{r_x}^2+{r_y}^2}$$That kind of rule is a lot tougher to carry forward through your calculation than just counting digits. But you need to do something of the sort if you are going to track errors properly.
A very good summary. I just have to add something: As long as you are dealing with pure numbers, this is correct. But then the concept of "significant digits" is meaningless! "Significant figures" and "error estimates" deal with measurements. And if your formula is something like speed=distance/time, you cannot add distance errors to time error. The usual way is to add reletive errors: [itex] (\frac{\Delta v}{v})^{2}\approx (\frac{\Delta s}{s})^{2}+(\frac{\Delta t}{t})^{2}[/itex].
 
  • Like
Likes SammyS
  • #12
Couldn’t you write 45/4 and treat them as integers?
 
  • #13
Frabjous said:
Couldn’t you write 45/4 and treat them as integers?
Why not?
 

FAQ: How to handle significant digits of exact values?

1. How do I determine the number of significant digits in an exact value?

The number of significant digits in an exact value is equal to the number of digits that are known with certainty, plus one estimated digit.

2. Can I round an exact value to a certain number of significant digits?

No, you cannot round an exact value as it is already known with certainty and rounding would change the value.

3. How do I perform calculations with exact values and maintain the correct number of significant digits?

When performing calculations with exact values, the final result should have the same number of significant digits as the value with the least number of significant digits.

4. Can I use scientific notation to represent exact values?

Yes, scientific notation is a useful way to represent exact values as it clearly shows the number of significant digits.

5. Do I need to consider significant digits when working with exact values in different units?

Yes, the number of significant digits should remain the same regardless of the units used. However, you may need to convert the units to ensure consistency in your calculations.

Similar threads

Replies
3
Views
387
Replies
8
Views
1K
Replies
1
Views
2K
Replies
8
Views
2K
Replies
3
Views
2K
Replies
4
Views
8K
Replies
9
Views
1K
Back
Top