What is precision of a number representation? (was: Curious Omission In New-Style Formats)
Ben Finney
ben+python at benfinney.id.au
Mon Jul 11 16:56:10 EDT 2016
Ethan Furman <ethan at stoneleaf.us> writes:
> I will readily admit to not having a maths degree, and so of course to
> me saying the integer 123 has a precision of 5, 10, or 99 digits seems
> like hogwash to me.
Precision is not a property of the number. It is a property of the
*representation* of that number.
The representation “1×10²” has a precision of one digit.
The representation “100” has a precision of three digits.
The representation “00100” has a precision of five digits.
The representation “100.00” also has a precision of five digits.
Those can all represent the same number; or maybe some of them represent
“one hundred” and others represent “one hundred and a millionth”.
The representation is only an approximation of the actual number, and
the precision tells us how fuzzy the approximation is.
None of these say how *accurate* the representation is; if those are
representations of the number “seven thousand” they are not very
accurate, while they might be passably accurate for the number “one
hundred and seventy”.
> But I'm always willing to learn. So please explain what 123 with a
> precision of five integer digits means, and what to do we gain by
> saying such a thing?
We gain clarity of speech: we distinguish the different aspects (how
many digits of this representation are actually claimed to represent the
number?) communicated by a representation.
--
\ “… no testimony can be admitted which is contrary to reason; |
`\ reason is founded on the evidence of our senses.” —Percy Bysshe |
_o__) Shelley, _The Necessity of Atheism_, 1811 |
Ben Finney
More information about the Python-list
mailing list