If some conf.uncertainty_automatic is enabled, then, for example, the following could occur when a Decimal (or str) is passed:
>>> cm('2.0')
2.0(1) cm # length
The uncertainty in the last digit comes about from two half-precisions; this is a good heuristic for most measurements made, where we implicitly make two measurements (the zero and the extent) in e.g. a ruler.
In doing this, it may be helpful to make a Decimal subclass that can gracefully handle float multiplication in order to do this. It should err on the side of avoiding floating point detail when there are a great deal of trailing 0 or 9s (eg Decimal(0.01).)
Relies on:
45
If some
conf.uncertainty_automatic
is enabled, then, for example, the following could occur when aDecimal
(orstr
) is passed:The uncertainty in the last digit comes about from two half-precisions; this is a good heuristic for most measurements made, where we implicitly make two measurements (the zero and the extent) in e.g. a ruler.
In doing this, it may be helpful to make a
Decimal
subclass that can gracefully handlefloat
multiplication in order to do this. It should err on the side of avoiding floating point detail when there are a great deal of trailing0
or9
s (egDecimal(0.01)
.)