Significant figures calculation
Erik Max Francis
max at alcyone.com
Mon Jun 27 23:49:09 EDT 2011
Steven D'Aprano wrote:
> On Tue, 28 Jun 2011 06:53 am Ethan Furman wrote:
>
>> Harold wrote:
> [...]
>>>>>> Empirical('1200.').significance
>>> 2
>
> Well, that's completely wrong. It should be 4.
>
>>>>>> Empirical('1200.0').significance
>>> 5
>> What about when 1200 is actually 4 significant digits? Or 3?
>
> Then you shouldn't write it as 1200.0. By definition, zeros on the right are
> significant. If you don't want zeroes on the right to count, you have to
> not show them.
>
> Five sig figures: 1200.0
> Four sig figures: 1200
> Three sig figures: 1.20e3
> Two sig figures: 1.2e3
> One sig figure: 1e3
> Zero sig figure: 0
That last one is not true; 0 is a one-significant figure estimate, and
represents a value between -0.5 and 0.5. (It's true that zeroes to the
left are never significant, but not when there's nothing in the figure
but zeroes.)
A zero-significant figure would be an order of magnitude estimate only.
These aren't usually done in the "e" scientific notation, but it would
be something like 10^3 (if we assume ^ is exponentiation, not the Python
operator).
c^2 is 9 x 10^16 m^2/s^2 to one significant figure. It's 10^17 m^2/s^2
to zero (order of magnitude estimate).
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
I would have liked to have seen Montana.
-- Cpt. Vasily Borodin
More information about the Python-list
mailing list