Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20865
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Python math is off by .000000000000045 |
| Date | 2012-02-25 16:05 -0500 |
| References | <mailman.49.1329934400.3037.python-list@python.org> <ji3kb2$hk3$1@reader1.panix.com> <wh92r.13653$1I2.11412@newsfe08.iad> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.162.1330203944.3037.python-list@python.org> (permalink) |
On 2/25/2012 12:56 PM, Tobiah wrote: > 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. Binary floats can represent and integer and any fraction with a denominator of 2**n within certain ranges. For decimal floats, substitute 10**n or more exactly, 2**j * 5**k since if J < k, n / (2**j * 5**k) = (n * 2**(k-j)) / 10**k and similarly if j > k. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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