Calculating something correct upto ##m## significant figures

In summary, the conversation discusses how to calculate a series up to a certain number of decimal places and significant figures. The suggested logic is to terminate the series at the kth term if the k+1th term is less than 10^-m, where m is the desired number of decimal places. However, there is a debate on whether this logic is accurate for significant figures. One solution suggested is to calculate the difference between successive approximations and continue until the difference is less than half of the desired decimal place accuracy.
  • #1
Wrichik Basu
Science Advisor
Insights Author
Gold Member
2,131
2,707
Homework Statement
The Zeta function is defined as $$\zeta(n) \ = \ \sum _{k=1} ^{\infty} \frac{1}{k^n}.$$ Given that ##\zeta(4) = \pi^4/90##, estimate a value of ##\pi## correct to three significant figures. How many terms are needed in the series for this?
Relevant Equations
Given in the question.
I have solved questions where I have been asked to find something correct to ##m## places of decimal using some series. See this thread. The logic was, the program would terminate at the ##k##th term if the ##k+1##th term is ##<10^{-m}##.

But how do I terminate the series here? Say I calculate ##S_{k+1}## and ##S_k##, and find a difference ##t_{k+1}## (actually the ##k+1##th term). Notwithstanding anything else, this term can be approximated to any number of significant terms. For example, if ##t_{k+1} \ = \ 0.0000000001,## I can still approximate that as ##0.0000000001000## and conclude that it has four significant figures. In fact, the trailing zeros can be anything depending on how precisely my computer can calculate. What should my condition of termination be in this case? More specifically, how do I check whether the current sum is correct up to certain significant figures?
 
Physics news on Phys.org
  • #2
Wrichik Basu said:
More specifically, how do I check whether the current sum is correct up to certain significant figures?
Given that this is in the comp sci homework forum, is brute force an option ?
If I make a table of $$\sqrt[
\leftroot{-1}\uproot{16}\scriptstyle 4] { 90*\sum _{k=1} ^{N} \frac{1}{k^4} } \ \ $$ versus N I get:
Code:
 1    3.080070288 
 2    3.127107866
 3    3.136152380 
 4    3.138997889
 5    3.140161179
 6    3.140721718
 7    3.141024158
 8    3.141201402
 9    3.141312040
10    3.141384622
11    3.141434195
12    3.141469195
13    3.141494605
14    3.141513496
15    3.141527831
So with three terms you have three significant figures: 3.14

I don't understand your criterion
Wrichik Basu said:
find something correct to ##m## places of decimal using some series. The logic was, the program would terminate at the ##k##th term if the ##k+1##th term is ##<10^{−m}##
What if the next thousand terms are just below ##<10^{−m}## ? You'd be at m-3 signifcant digits !

Also 0.0000000001 has one significant digit. Things change when you sum: 0.1000000001 has ten !
 
  • #3
BvU said:
What if the next thousand terms are just below ##<10^{−m}##?You'd be at m-3 signifcant digits !
That logic was for correct to decimal places, not significant figures. See the thread linked in the OP; I have written the logic there.
BvU said:
Given that this is in the comp sci homework forum, is brute force an option ?
If I make a table of $$\sqrt[
\leftroot{-1}\uproot{16}\scriptstyle 4] { 90*\sum _{k=1} ^{N} \frac{1}{k^4} } \ \ $$ versus N I get:
Code:
1    3.080070288
2    3.127107866
3    3.136152380
4    3.138997889
5    3.140161179
6    3.140721718
7    3.141024158
8    3.141201402
9    3.141312040
10    3.141384622
11    3.141434195
12    3.141469195
13    3.141494605
14    3.141513496
15    3.141527831
So with three terms you have three significant figures: 3.14
I couldn't understand one thing. My program doesn't know the value of pi beforehand. You calculated till ##N=15## and stopped because you were getting the value correct to three significant figures. How will the program know where to stop? If it stopped at ##N=500## rather than ##N=15##, you and I know that the value will remain 3.14, but the program doesn't know that, right?
 
  • #4
Wrichik Basu said:
I couldn't understand one thing. My program doesn't know the value of pi beforehand. You calculated till ##N=15## and stopped because you were getting the value correct to three significant figures. How will the program know where to stop? If it stopped at ##N=500## rather than ##N=15##, you and I know that the value will remain 3.14, but the program doesn't know that, right?
The program can "know" by calculating the difference between successive approximations. In the values produced by @BvU, to get 3 sig. figures, or accuracy in 2 decimal places, we need to continue until the difference between successive values is less than 1/2 of a hundredth; i.e., less than .005. If we add or subtract numbers less than .005, it can't change the digit in the hundredths place. The first place in the table where the difference is less than .005 is at rows 3 and 4, with values of 3.136152380 and 3.138997889, respectively, with the difference being about .003. To the nearest hundredth, both number round to 3.14.
 
  • Like
Likes Wrichik Basu
  • #5
BvU said:
Also 0.0000000001 has one significant digit. Things change when you sum: 0.1000000001 has ten !
The correct statement here would be
0.1000000000
0.0000000001
-------------------
0.1000000001

Your statement could be interpreted as meaning that
0.1
0.0000000001
-------------------
0.1000000001

which is not correct. To the proper number of significant digits, the latter would be 0.1
 
  • Like
Likes BvU

Related to Calculating something correct upto ##m## significant figures

1. How do you determine the number of significant figures in a calculation?

The number of significant figures in a calculation is equal to the number of digits that are known with certainty, plus one uncertain or estimated digit. This means that trailing zeros after a decimal point are considered significant, but leading zeros are not.

2. What is the purpose of calculating something to a specific number of significant figures?

The purpose of calculating something to a specific number of significant figures is to ensure that the result is as accurate as possible while also indicating the level of precision of the measurement. This is important in scientific and mathematical calculations to avoid misleading or incorrect results.

3. How do you round a number to a specific number of significant figures?

To round a number to a specific number of significant figures, start by identifying the last significant digit. If the digit to the right of this is 5 or above, round the last significant digit up by 1. If the digit is 4 or below, round the last significant digit down. Then, replace all the digits to the right of the last significant digit with zeros.

4. Can you add or subtract numbers with different numbers of significant figures?

Yes, you can add or subtract numbers with different numbers of significant figures. The result should be rounded to the same number of significant figures as the number with the least number of significant figures in the calculation.

5. How do you calculate something correct to a specific number of significant figures on a calculator?

To calculate something to a specific number of significant figures on a calculator, you can either use the "round" function or set the calculator to display the desired number of significant figures. It is important to ensure that the calculator is set to the correct number of decimal places before performing the calculation.

Similar threads

  • Introductory Physics Homework Help
Replies
6
Views
745
  • Engineering and Comp Sci Homework Help
Replies
14
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
878
  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Classical Physics
Replies
18
Views
2K
  • Introductory Physics Homework Help
Replies
19
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
17
Views
5K
Back
Top