Calculating something correct upto ##m## significant figures

  • Context: Comp Sci 
  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
  • Tags Tags
    Significant figures
Click For Summary

Discussion Overview

The discussion revolves around determining how to calculate a sum to a specified number of significant figures using series approximations. Participants explore the criteria for terminating the series based on the significance of the terms and the implications of trailing zeros in numerical representation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant describes a method for terminating a series when the next term is less than \(10^{-m}\), questioning how to ensure the current sum is accurate to a certain number of significant figures.
  • Another participant suggests that brute force could be an option and provides a table of values for a specific series, noting that three terms yield three significant figures.
  • Concerns are raised about the validity of stopping the series based solely on the next term being below \(10^{-m}\), as subsequent terms could still affect the significant figures.
  • Discussion includes the idea that the program calculating the series does not know the value of pi beforehand, raising questions about how it can determine when to stop the calculation.
  • A participant proposes that the program can assess the difference between successive approximations to decide when to stop, emphasizing the importance of this difference in relation to significant figures.
  • Clarifications are made regarding the interpretation of significant digits in numerical sums, specifically addressing how trailing zeros affect the count of significant figures.

Areas of Agreement / Disagreement

Participants express differing views on the criteria for terminating the series and the implications of significant figures in calculations. There is no consensus on the best approach to determine when to stop the series or how to accurately assess significant figures.

Contextual Notes

Participants highlight limitations in the logic of terminating the series based on the next term's value, as well as the potential for misunderstanding significant figures in numerical sums. These points remain unresolved within the discussion.

Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,188
Reaction score
2,694
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
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 !
 
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?
 
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   Reactions: Wrichik Basu
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   Reactions: BvU

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K