Bug Insights Rating: Is Precision Necessary?

  • Thread starter Thread starter DrClaude
  • Start date Start date
AI Thread Summary
Precision in displaying significant digits in floating point numbers is debated, with some arguing that 14 digits is excessive and suggesting a reduction to 2 or 3. The default of 14 is defended as a balance to avoid rounding errors while maintaining sufficient detail for most applications. Concerns are raised about the lack of input from scientists or engineers in determining this default setting. The discussion highlights the importance of understanding the context in which precision is necessary. Ultimately, the choice of significant digits should align with the needs of the specific application.
DrClaude
Mentor
Messages
8,477
Reaction score
5,693
I don't think that so many significant digits are needed :wink:

lens.jpg
 
Physics news on Phys.org
Plus, the math looks wrong...
 
Precision is important...
 
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.
 
Change it to 3 or 2? There is no point in having more.
 
mfb said:
Change it to 3 or 2? There is no point in having more.
Default is 14, so there must be some reason the PHP devs think it's a good value.
 
Greg Bernhardt said:
Default is 14, so there must be some reason the PHP devs think it's a good value.
I'm guessing that their Focus Group didn't have any scientists or engineers... :smile:
 
Greg Bernhardt said:
Default is 14, so there must be some reason the PHP devs think it's a good value.
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).
 

Similar threads

Replies
5
Views
2K
Replies
20
Views
2K
Replies
1
Views
1K
Replies
0
Views
4K
Replies
1
Views
1K
Replies
3
Views
1K
Replies
1
Views
3K
Replies
10
Views
2K
Replies
8
Views
2K
Back
Top