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


Groups > comp.lang.python > #20861

Re: Python math is off by .000000000000045

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <tim.wintle@teamrubber.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '(except': 0.05; 'suppose': 0.05; 'subject:Python': 0.05; 'infinite': 0.07; 'x-mailer:evolution 2.28.3': 0.07; 'correct.': 0.09; 'integers': 0.09; 'argument': 0.15; 'integers.': 0.16; 'non-trivial': 0.16; 'set)': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'example.': 0.18; 'seems': 0.20; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'sat,': 0.25; 'cc:2**0': 0.26; 'subject: .': 0.29; 'cc:addr:python.org': 0.29; 'argue': 0.30; 'range,': 0.30; 'there': 0.33; "can't": 0.33; 'numbers.': 0.34; 'however,': 0.35; 'but': 0.37; 'represent': 0.37; 'could': 0.38; 'point': 0.40; 'range': 0.61; 'natural': 0.67; 'header:Reply- To:1': 0.70; 'reply-to:no real name:2**0': 0.72; '100%': 0.82; '09:56': 0.84; 'received:bethere.co.uk': 0.84; 'to:none': 0.93
Subject Re: Python math is off by .000000000000045
From Tim Wintle <tim.wintle@teamrubber.com>
Cc python-list@python.org
In-Reply-To <wh92r.13653$1I2.11412@newsfe08.iad>
References <mailman.49.1329934400.3037.python-list@python.org> <ji3kb2$hk3$1@reader1.panix.com> <wh92r.13653$1I2.11412@newsfe08.iad>
Content-Type text/plain; charset="UTF-8"
Organization Team Rubber
Date Sat, 25 Feb 2012 19:08:47 +0000
Mime-Version 1.0
X-Mailer Evolution 2.28.3
Content-Transfer-Encoding 7bit
X-SA-Exim-Connect-IP 87.194.110.230
X-SA-Exim-Mail-From tim.wintle@teamrubber.com
X-SA-Exim-Scanned No (on mail.netsight.co.uk); SAEximRunCond expanded to false
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To tim.wintle@teamrubber.com
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.161.1330198004.3037.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1330198004 news.xs4all.nl 6868 [2001:888:2000:d::a6]:54372
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20861

Show key headers only | View raw


On Sat, 2012-02-25 at 09:56 -0800, Tobiah wrote: 
> > For every floating point
>  > number there is a corresponding real number, but 0% of real numbers
>  > can be represented exactly by floating point numbers.
> 
> It seems to me that there  are a great many real numbers that can be
> represented exactly by floating point numbers.  The number 1 is an
> example.
> 
> I suppose that if you divide that count by the infinite count of all
> real numbers, you could argue that the result is 0%.

It's not just an argument - it's mathematically correct.

The same can be said for ints representing the natural numbers, or
positive integers.

However, ints can represent 100% of integers within a specific range,
where floats can't represent all real numbers for any range (except for
the empty set) - because there's an infinate number of real numbers
within any non-trivial range.


Tim


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


Thread

Python math is off by .000000000000045 Alec Taylor <alec.taylor6@gmail.com> - 2012-02-23 05:13 +1100
  Re: Python math is off by .000000000000045 nn <pruebauno@latinmail.com> - 2012-02-22 10:29 -0800
  Re: Python math is off by .000000000000045 Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-02-22 20:44 +0200
  Re: Python math is off by .000000000000045 Grant Edwards <invalid@invalid.invalid> - 2012-02-22 20:48 +0000
    Re: Python math is off by .000000000000045 Tobiah <toby@tobiah.org> - 2012-02-25 09:56 -0800
      Re: Python math is off by .000000000000045 Tim Wintle <tim.wintle@teamrubber.com> - 2012-02-25 19:08 +0000
      Re: Python math is off by .000000000000045 Terry Reedy <tjreedy@udel.edu> - 2012-02-25 16:05 -0500
        Re: Python math is off by .000000000000045 jmfauth <wxjmfauth@gmail.com> - 2012-02-25 13:25 -0800
          Re: Python math is off by .000000000000045 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-25 22:51 +0000
            Re: Python math is off by .000000000000045 jmfauth <wxjmfauth@gmail.com> - 2012-02-26 01:59 -0800
              Re: Python math is off by .000000000000045 Ethan Furman <ethan@stoneleaf.us> - 2012-02-27 09:28 -0800
              Re: Python math is off by .000000000000045 Michael Torrie <torriem@gmail.com> - 2012-02-27 17:53 -0700
              Re: Python math is off by .000000000000045 Ethan Furman <ethan@stoneleaf.us> - 2012-02-28 09:56 -0800
      Re: Python math is off by .000000000000045 Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-02-25 21:49 -0500
      Re: Python math is off by .000000000000045 Terry Reedy <tjreedy@udel.edu> - 2012-02-26 00:44 -0500
  Re: Python math is off by .000000000000045 John Ladasky <ladasky@my-deja.com> - 2012-02-26 16:24 -0800
    Re: Python math is off by .000000000000045 Terry Reedy <tjreedy@udel.edu> - 2012-02-26 20:30 -0500
    Re: Python math is off by .000000000000045 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-27 03:28 +0000
      Re: Python math is off by .000000000000045 Grant Edwards <invalid@invalid.invalid> - 2012-02-27 15:02 +0000
        Re: Python math is off by .000000000000045 Michael Torrie <torriem@gmail.com> - 2012-02-27 08:34 -0700

csiph-web