Do Insights really need so many significant figures?
- Context: Bug
- Thread starter DrClaude
- Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 2K views
Discussion
Physics news on Phys.org
- 19,981
- 11,084
I changed the number of significant digits displayed in floating point numbers from 14 to 17. Might be what caused this issue. I'll revert back to 14.
Mentor
- 37,507
- 14,387
Change it to 3 or 2? There is no point in having more.
- 19,981
- 11,084
Default is 14, so there must be some reason the PHP devs think it's a good value.mfb said:Change it to 3 or 2? There is no point in having more.
- 7,515
- 3,039
http://php.net/manual/en/function.round.php
from http://php.net/manual/en/function.printf.php
from http://php.net/manual/en/function.printf.php
Code:
You can use this function to format the decimal places in a number:
$num = 2.12;
printf("%.1f",$num);
prints:
2.1
Mentor
- 37,507
- 14,387
Well, if it is a general PHP setting: PHP has no idea how precise these numbers are supposed to be. 14 is small enough to avoid displaying rounding errors in most cases, and large enough to keep more digits than anyone is reasonably interested in (with extremely few exceptions).Greg Bernhardt said:Default is 14, so there must be some reason the PHP devs think it's a good value.
Similar threads
How many significant figures does 20 have in context?
- maxelcat
- · Replies 19 ·
- Introductory Physics Homework Help
- Replies
- 19
How Many Significant Figures Should Be Reported in Lab Calculations?
- alphaj
- · Replies 7 ·
- Biology and Chemistry Homework Help
- Replies
- 7
How many significant figures in the average area?
- Anshul23
- · Replies 4 ·
- Introductory Physics Homework Help
- Replies
- 4
High School How many significant figures in 110 km/h?
- e-zero
- · Replies 73 ·
- Classical Physics
- Replies
- 73
High School How many significant figures do 0.0 and 0.0000 have?
- 121910marj
- · Replies 14 ·
- Classical Physics
- Replies
- 14
High School How Many Significant Figures Does Physics Agree On?
- fs93
- · Replies 6 ·
- Other Physics Topics
- Replies
- 6
How Many Significant Figures for Time and Mass Calculations?
- helpmedude
- · Replies 1 ·
- Introductory Physics Homework Help
- Replies
- 1
Undergrad How Many Significant Digits for Mean, Variance, and Standard Deviation?
- solarwind
- · Replies 1 ·
- Set Theory, Logic, Probability, Statistics
- Replies
- 1
High School How Many Significant Figures Are Correct in Rounding 6.0221367?
- Joza
- · Replies 4 ·
- Set Theory, Logic, Probability, Statistics
- Replies
- 4
Why Do I Need So Many Resistors? Is It Possible to Reduce?
- Le Luc
- · Replies 3 ·
- Electrical Engineering
- Replies
- 3