-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Precision" is the total number of significant digits in a number (e.g. for 1.234, precision = 4, not 3). What you're using it for (decimal places) is usually called the "scale" #7
Comments
Is there a good source to verify this? |
I'm not sure if a dictionary is appropriate here since we're talking about mathematical usage of terms rather than English usage. |
@drrcknlsn Thank you for the large number of sources. In the database world this represents a clear consensus of terminology. Furthermore, I found an article on Numerical Precision from Wolfram which uses the terms precision and accuracy. These are equivalent to precision and scale as used in the database world. More to the point, it is clear that precision is never used to refer to digits to the right of the decimal point so this bug is now confirmed. |
FYI, this kind of relates to the |
btw, one can probably be forgiven for using 'precision' here, since PHP itself uses it the same way |
@okdana That's interesting. Also, Wolfram uses the term accuracy, but accuracy is just a synonym for precision anyway. I think this places the terminology under dispute once more until more sources can authoritatively declare the correct naming. |
I personally use 'precision' in conversation to describe number of decimal places, but i have a very poor grasp of mathematics, so idk. I did some Google research and i found the following: I could only find a few specs that use 'precision' un-ambiguously to refer to decimal places:
Several are ambiguous, inconsistent, or irrelevant:
These side-step the issue entirely:
These use 'scale' for digits after the radix:
I think it's probably valid outside of a formal arithmetic context to use 'precision' to refer to number of decimal places, but now that i know the 'proper' term, i would probably have used 'scale' instead, personally. |
As pointed out on reddit: https://www.reddit.com/r/PHP/comments/3yq3yx/byteformatter_is_a_psr2_compliant_library_that/cygfps8
The text was updated successfully, but these errors were encountered: