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


Groups > comp.lang.python > #70718

Re: Significant digits in a float?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.062
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'cc:addr:python-list': 0.11; 'coordinates': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'given,': 0.16; 'imo.': 0.16; 'losing': 0.16; 'roy': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'figures': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'appear': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'but': 0.35; 'received:google.com': 0.35; 'false': 0.36; 'subject:?': 0.36; 'pm,': 0.38; 'then,': 0.60; 'chance': 0.65; 'within': 0.65; 'smith': 0.68; '10%': 0.74; 'gone.': 0.84; 'ten,': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=G6ci51i+ap6Ll0O0Wh5+VFcHSawMBlsMUF9RYGrgeLM=; b=fK2f1j5NEINmlAkcp6xyiHrMq0aHaUoMvqvb7b6xMbxvB3sD/z4odUeWA4K84X5ak5 RlMhc6UisDsiAm8AKzz9EM1/5LFxHKM6hNQ4i2vvyTIChE5PIqH7qOHDk7iyB0ZwIJ+y bWdgUb1lqfgv8zsX++aIQ2o+3qVQ26AOmFf+alr/JxjOkkbzjPjYAB3WVCd+jvpzp3LM JAMUwFZK7AQrdF5uYf+zd22HMcr3SNxBV/JtLKZkBA8Slz00mQUfimc+YJIUMNLAhmIf S8eKjWG2lLp1VkPuFFnxb05ST5ixdfUSub/NKS7vVdxrWGJMdVFtmyDVnCjPYqzrVAXp 6Jjg==
MIME-Version 1.0
X-Received by 10.52.65.165 with SMTP id y5mr683458vds.51.1398789012216; Tue, 29 Apr 2014 09:30:12 -0700 (PDT)
In-Reply-To <roy-DA9493.09383329042014@news.panix.com>
References <mailman.9549.1398700831.18130.python-list@python.org> <535f0f9f$0$29965$c3e8da3$5496439d@news.astraweb.com> <roy-DA9493.09383329042014@news.panix.com>
Date Wed, 30 Apr 2014 02:30:12 +1000
Subject Re: Significant digits in a float?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9575.1398789020.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1398789020 news.xs4all.nl 2841 [2001:888:2000:d::a6]:52078
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:70718

Show key headers only | View raw


On Tue, Apr 29, 2014 at 11:38 PM, Roy Smith <roy@panix.com> wrote:
> I'm trying to intuit, from the values I've been given, which coordinates
> are likely to be accurate to within a few miles.  I'm willing to accept
> a few false negatives.  If the number is float("38"), I'm willing to
> accept that it might actually be float("38.0000"), and I might be
> throwing out a good data point that I don't need to.

You have one chance in ten, repeatably, of losing a digit. That is,
roughly 10% of your four-decimal figures will appear to be
three-decimal, and 1% of them will appear to be two-decimal, and so
on. Is that "a few" false negatives? It feels like a lot IMO. But
then, there's no alternative - the information's already gone.

ChrisA

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


Thread

Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-28 12:00 -0400
  Re: Significant digits in a float? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-29 02:34 +0000
    Re: Significant digits in a float? Ben Finney <ben@benfinney.id.au> - 2014-04-29 13:23 +1000
      Re: Significant digits in a float? Steven D'Aprano <steve@pearwood.info> - 2014-04-29 05:43 +0000
        Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-29 20:33 -0400
          Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 20:42 -0400
            Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-30 20:02 -0400
              Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-04-30 22:54 -0500
                Re: Significant digits in a float? Paul Rubin <no.email@nospam.invalid> - 2014-04-30 20:56 -0700
                Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-04-30 23:16 -0500
                Re: Significant digits in a float? William Ray Wing <wrw@mac.com> - 2014-05-01 11:53 -0400
                Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-05-06 11:29 -0500
                Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-01 22:06 -0400
                Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-05-06 09:51 -0500
                Re: Significant digits in a float? alister <alister.nospam.ware@ntlworld.com> - 2014-05-06 15:18 +0000
                Re: Significant digits in a float? Joel Goldstick <joel.goldstick@gmail.com> - 2014-05-06 12:14 -0400
                Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-06 19:48 -0400
                Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-05-01 08:56 -0400
                Re: Significant digits in a float? Larry Hudson <orgnut@yahoo.com> - 2014-05-01 12:51 -0700
                Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-05-01 22:05 +0100
                Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-01 21:47 -0400
                Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-05-06 09:59 -0500
                [OT] Silde rules [was Re: Significant digits in a float?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-06 16:10 +0000
                Re: [OT] Silde rules Ben Finney <ben@benfinney.id.au> - 2014-05-07 10:01 +1000
              Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-05-01 21:55 +0100
                Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-01 22:26 -0400
                Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-05-08 20:58 +0100
    Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 09:38 -0400
      Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 02:30 +1000
        Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 19:53 -0400
          Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 10:13 +1000
          Re: Significant digits in a float? Ben Finney <ben@benfinney.id.au> - 2014-04-30 10:13 +1000
          Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 10:17 +1000
          Re: Significant digits in a float? Ben Finney <ben@benfinney.id.au> - 2014-04-30 10:20 +1000
          Re: Significant digits in a float? Grant Edwards <invalid@invalid.invalid> - 2014-04-30 18:19 +0000
      Re: Significant digits in a float? Ned Batchelder <ned@nedbatchelder.com> - 2014-04-29 12:47 -0400
        Re: Significant digits in a float? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-30 09:45 +1200
      Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 02:59 +1000
      Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-04-29 21:16 +0100
        Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-04-29 15:39 -0500
          Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 07:15 +1000
        Re: Significant digits in a float? Ryan Hiebert <ryan@ryanhiebert.com> - 2014-04-29 15:42 -0500
        Re: Significant digits in a float? emile <emile@fenx.com> - 2014-04-29 15:42 -0700
          Re: Significant digits in a float? alister <alister.nospam.ware@ntlworld.com> - 2014-04-30 09:03 +0000
          Re: Significant digits in a float? Grant Edwards <invalid@invalid.invalid> - 2014-04-30 18:21 +0000
            Re: Significant digits in a float? emile <emile@fenx.com> - 2014-05-01 09:34 -0700
              Re: Significant digits in a float? alister <alister.nospam.ware@ntlworld.com> - 2014-05-01 17:13 +0000
        Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 08:51 +1000
          Re: Significant digits in a float? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-30 20:14 +1200
            Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 18:27 +1000
            Re: Significant digits in a float? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-30 14:05 +0100
        Re: Significant digits in a float? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-30 00:34 +0100
        Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-29 20:37 -0400
        Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 20:45 -0400
        Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 10:45 +1000
          Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 20:48 -0400
        Re: Significant digits in a float? Ethan Furman <ethan@stoneleaf.us> - 2014-04-29 19:31 -0700
          Re: Significant digits in a float? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-30 02:59 +0000
            Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 23:30 -0400
              Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 13:40 +1000
        Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 13:03 +1000
          Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-30 08:01 -0400
        Off-topic  circumnavigating the earth in a mile or less  [was Re: Significant digits in a float?] Ethan Furman <ethan@stoneleaf.us> - 2014-04-30 06:14 -0700
        Re: Off-topic  circumnavigating the earth in a mile or less  [was Re: Significant digits in a float?] Ethan Furman <ethan@stoneleaf.us> - 2014-04-30 07:02 -0700
          Re: Off-topic  circumnavigating the earth in a mile or less Adam Funk <a24061@ducksburg.com> - 2014-05-01 21:52 +0100
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Chris Angelico <rosuav@gmail.com> - 2014-05-01 00:27 +1000
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Chris Angelico <rosuav@gmail.com> - 2014-05-01 05:10 +1000
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Ryan Hiebert <ryan@ryanhiebert.com> - 2014-04-30 10:24 -0500
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-30 17:46 -0600
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Terry Reedy <tjreedy@udel.edu> - 2014-04-30 22:20 -0400
          Re: Off-topic circumnavigating the earth in a mile or less [was Re:   Significant digits in a float?] Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-05-01 18:16 +1200
          Re: Off-topic circumnavigating the earth in a mile or less Adam Funk <a24061@ducksburg.com> - 2014-05-01 21:57 +0100
            Re: Off-topic circumnavigating the earth in a mile or less Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-01 22:49 +0100
            Re: Off-topic circumnavigating the earth in a mile or less alister <alister.nospam.ware@ntlworld.com> - 2014-05-02 08:49 +0000
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Chris Angelico <rosuav@gmail.com> - 2014-05-01 11:57 +1000
        Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Vlastimil Brom <vlastimil.brom@gmail.com> - 2014-05-01 09:49 +0200
      Re: Significant digits in a float? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-30 02:50 +0000
      Re: Significant digits in a float? Grant Edwards <invalid@invalid.invalid> - 2014-04-30 18:18 +0000

csiph-web