Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8521

Re: Significant figures calculation

Date 2011-06-27 20:49 -0700
From Erik Max Francis <max@alcyone.com>
Organization Alcyone Systems
Newsgroups comp.lang.python
Subject Re: Significant figures calculation
References (2 earlier) <mailman.386.1308949143.1164.python-list@python.org> <iu5bgk01v0@news2.newsguy.com> <db874e1f-a827-459c-aa22-5b915e70b682@a11g2000yqm.googlegroups.com> <mailman.463.1309207197.1164.python-list@python.org> <4e0942d1$0$29987$c3e8da3$5496439d@news.astraweb.com>
Message-ID <_5GdnZSH4tWr0pTTnZ2dnUVZ5rmdnZ2d@giganews.com> (permalink)

Show all headers | View raw


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@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Significant figures calculation Harold <dadapapa@googlemail.com> - 2011-06-24 13:05 -0700
  Re: Significant figures calculation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-24 20:46 +0000
    Re: Significant figures calculation Jerry Hill <malaclypse2@gmail.com> - 2011-06-24 16:58 -0400
      Re: Significant figures calculation steve+comp.lang.python@pearwood.info - 2011-06-25 10:31 +1000
      Re: Significant figures calculation Chris Torek <nospam@torek.net> - 2011-06-25 19:04 +0000
        Re: Significant figures calculation Harold <dadapapa@googlemail.com> - 2011-06-26 08:35 -0700
          Re: Significant figures calculation Dave Angel <davea@ieee.org> - 2011-06-27 08:04 -0400
        Re: Significant figures calculation Harold <dadapapa@googlemail.com> - 2011-06-27 06:40 -0700
          Re: Significant figures calculation Ethan Furman <ethan@stoneleaf.us> - 2011-06-27 13:53 -0700
            Re: Significant figures calculation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-28 12:56 +1000
              Re: Significant figures calculation Chris Angelico <rosuav@gmail.com> - 2011-06-28 13:16 +1000
                Re: Significant figures calculation Erik Max Francis <max@alcyone.com> - 2011-06-27 20:45 -0700
                Re: Significant figures calculation Mel <mwilson@the-wire.com> - 2011-06-28 07:47 -0400
                Re: Significant figures calculation Chris Angelico <rosuav@gmail.com> - 2011-06-28 21:57 +1000
                Re: Significant figures calculation Erik Max Francis <max@alcyone.com> - 2011-06-28 11:54 -0700
                Re: Significant figures calculation Mel <mwilson@the-wire.com> - 2011-06-28 16:47 -0400
                Re: Significant figures calculation Erik Max Francis <max@alcyone.com> - 2011-06-28 14:01 -0700
                Re: Significant figures calculation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-28 18:35 +1000
                Re: Significant figures calculation Erik Max Francis <max@alcyone.com> - 2011-06-28 11:59 -0700
              Re: Significant figures calculation Erik Max Francis <max@alcyone.com> - 2011-06-27 20:49 -0700
          Re: Significant figures calculation Ethan Furman <ethan@stoneleaf.us> - 2011-06-27 15:58 -0700
    Re: Significant figures calculation Harold <dadapapa@googlemail.com> - 2011-06-24 18:50 -0700

csiph-web