Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108830 > unrolled thread
| Started by | Herkermer Sherwood <theherk@gmail.com> |
|---|---|
| First post | 2016-05-19 09:31 -0700 |
| Last post | 2016-06-16 11:19 +1000 |
| Articles | 20 on this page of 282 — 43 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
for / while else doesn't make sense Herkermer Sherwood <theherk@gmail.com> - 2016-05-19 09:31 -0700
Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-05-19 10:22 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-20 04:02 +1000
Re: for / while else doesn't make sense theherk@gmail.com - 2016-05-19 11:47 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-19 23:28 +0300
Re: for / while else doesn't make sense David Jardine <david@jardine.de> - 2016-05-19 21:49 +0200
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-20 03:46 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-19 17:55 +0000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-20 10:06 +1000
Re: for / while else doesn't make sense gst <g.starck@gmail.com> - 2016-05-19 19:02 -0700
Re: for / while else doesn't make sense Stephen Hansen <me+python@ixokai.io> - 2016-05-19 23:53 -0700
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-20 11:55 +0000
Re: for / while else doesn't make sense Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-20 19:57 -0400
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 21:26 +1000
Re: for / while else doesn't make sense Ethan Furman <ethan@stoneleaf.us> - 2016-05-20 16:58 -0700
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-21 00:24 +0000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 13:50 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 14:01 +1000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 19:56 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 20:08 +1000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 20:55 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 21:10 +1000
Re: for / while else doesn't make sense Erik <python@lucidity.plus.com> - 2016-05-21 08:20 +0100
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-21 11:37 +0300
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 20:39 +1000
Re: for / while else doesn't make sense Erik <python@lucidity.plus.com> - 2016-05-21 21:48 +0100
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-22 12:57 +1000
Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-05-22 02:55 +0000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 17:29 +1000
Re: for / while else doesn't make sense Bob Martin <bob.martin@excite.com> - 2016-05-20 07:45 +0100
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-20 06:01 +1000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-19 14:11 -0600
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-20 06:27 +1000
Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-20 11:51 +1200
Re: for / while else doesn't make sense Erik <python@lucidity.plus.com> - 2016-05-20 09:09 +0100
Re: for / while else doesn't make sense Zachary Ware <zachary.ware+pylist@gmail.com> - 2016-05-20 10:59 -0500
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 12:20 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 08:43 +1000
Re: for / while else doesn't make sense theherk@gmail.com - 2016-05-20 16:24 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-21 09:03 +0300
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-21 21:26 +1000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-21 07:51 -0600
Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-21 15:20 +0000
Re: for / while else doesn't make sense Ben Finney <ben+python@benfinney.id.au> - 2016-05-21 10:21 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-21 00:35 +0000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 12:05 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 14:15 +0000
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-22 17:58 +0300
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 15:09 +0000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 08:26 -0700
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 13:25 -0400
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 10:34 -0700
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 18:06 +0000
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 14:17 -0400
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 17:09 +1000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-23 01:19 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-23 01:32 +1000
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-22 18:50 +0300
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 15:52 +0000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-23 02:35 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 16:46 +0000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 10:22 -0700
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 13:30 -0400
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-22 17:55 +0000
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-22 14:14 -0400
Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-22 20:51 +0100
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 00:34 +0000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-22 17:04 -0600
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-23 08:09 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 00:36 +0000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-23 11:01 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 01:00 +0000
Re: for / while else doesn't make sense breamoreboy@gmail.com - 2016-05-22 18:47 -0700
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 15:35 +0000
Re: for / while else doesn't make sense MRAB <python@mrabarnett.plus.com> - 2016-05-23 02:51 +0100
Re: for / while else doesn't make sense Ben Finney <ben+python@benfinney.id.au> - 2016-05-23 14:13 +1000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 23:09 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-23 09:30 +0300
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-22 23:46 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 18:09 +1000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 08:14 -0600
Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 15:29 +0100
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 08:49 -0600
Re: for / while else doesn't make sense Pete Forman <petef4+usenet@gmail.com> - 2016-05-23 19:16 +0100
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 13:24 -0600
Re: for / while else doesn't make sense Pete Forman <petef4+usenet@gmail.com> - 2016-05-23 22:50 +0100
Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-24 18:49 +1200
Re: for / while else doesn't make sense Pete Forman <petef4+usenet@gmail.com> - 2016-05-24 19:03 +0100
Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-25 18:35 +1200
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 10:38 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 00:57 +1000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 01:47 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 01:57 +1000
Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 17:51 +0100
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 02:59 +1000
Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 20:55 +0100
Re: for / while else doesn't make sense Mark Dickinson <mdickinson@enthought.com> - 2016-05-23 20:17 +0000
Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 22:01 +0100
Numerical methods [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-24 10:57 +1000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-23 08:30 -0700
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 10:02 -0600
Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-23 20:22 +0000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 09:53 -0600
When were real numbers born? (was for / while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-05-23 22:02 -0700
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-23 15:36 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 11:05 +1000
Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-05-23 19:19 -0700
META Culture of this place [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-25 02:43 +1000
Re: META Culture of this place [was Re: for / while else doesn't make sense] boB Stepp <robertvstepp@gmail.com> - 2016-05-24 12:19 -0500
Re: META Culture of this place [was Re: for / while else doesn't make sense] Ned Batchelder <ned@nedbatchelder.com> - 2016-05-24 10:44 -0700
Re: META Culture of this place [was Re: for / while else doesn't make sense] Paul Rubin <no.email@nospam.invalid> - 2016-05-24 12:54 -0700
Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-24 14:23 +0000
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-24 10:40 -0700
Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-25 18:38 +1200
Extended ASCII [was Re: for / while else doesn't make sense] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-25 17:30 +1000
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-25 02:10 -0700
Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-25 20:19 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Chris Angelico <rosuav@gmail.com> - 2016-05-25 20:30 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-25 22:03 +0100
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-26 10:21 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-26 00:44 -0700
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-26 12:11 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Chris Angelico <rosuav@gmail.com> - 2016-05-26 19:20 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-26 21:54 +0100
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-27 08:03 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-25 21:28 -0400
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-26 09:11 +0100
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-26 12:20 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Erik <python@lucidity.plus.com> - 2016-05-26 21:29 +0100
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 00:12 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-27 13:35 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 09:10 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-27 16:47 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 10:04 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-27 19:56 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Random832 <random832@fastmail.com> - 2016-05-27 09:51 -0400
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-27 08:53 -0700
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Random832 <random832@fastmail.com> - 2016-05-27 12:09 -0400
Coding systems are political (was Exended ASCII and code pages) Rustom Mody <rustompmody@gmail.com> - 2016-05-27 21:46 -0700
Re: Coding systems are political (was Exended ASCII and code pages) wxjmfauth@gmail.com - 2016-05-28 08:16 -0700
Re: Coding systems are political (was Exended ASCII and code pages) Ned Batchelder <ned@nedbatchelder.com> - 2016-05-28 08:50 -0700
Re: Coding systems are political (was Exended ASCII and code pages) Random832 <random832@fastmail.com> - 2016-05-28 14:05 -0400
Re: Coding systems are political (was Exended ASCII and code pages) Steven D'Aprano <steve@pearwood.info> - 2016-05-29 15:37 +1000
Re: Coding systems are political (was Exended ASCII and code pages) Rustom Mody <rustompmody@gmail.com> - 2016-05-28 23:12 -0700
Re: Coding systems are political (was Exended ASCII and code pages) Terry Reedy <tjreedy@udel.edu> - 2016-05-29 14:46 -0400
Re: Coding systems are political (was Exended ASCII and code pages) Christian Gollwitzer <auriocus@gmx.de> - 2016-05-29 22:29 +0200
Re: Coding systems are political (was Exended ASCII and code pages) wxjmfauth@gmail.com - 2016-05-30 06:35 -0700
Re: Coding systems are political (was Exended ASCII and code pages) Rustom Mody <rustompmody@gmail.com> - 2016-06-04 20:54 -0700
Re: Coding systems are political (was Exended ASCII and code pages) alister <alister.ware@ntlworld.com> - 2016-05-29 06:19 +0000
Re: Coding systems are political (was Exended ASCII and code pages) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-29 20:54 +1200
Re: Coding systems are political (was Exended ASCII and code pages) Marko Rauhamaa <marko@pacujo.net> - 2016-05-29 12:56 +0300
Re: Coding systems are political (was Exended ASCII and code pages) wxjmfauth@gmail.com - 2016-05-30 09:11 -0700
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Chris Angelico <rosuav@gmail.com> - 2016-05-28 02:16 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-28 18:54 +1000
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-27 22:03 +0300
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-27 21:23 -0700
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Rustom Mody <rustompmody@gmail.com> - 2016-05-26 03:39 -0700
Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-26 07:07 -0400
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-25 13:47 +0300
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-25 05:19 -0700
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-25 22:49 -0700
Re: for / while else doesn't make sense Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-26 09:54 +0300
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-26 00:44 -0700
Re: for / while else doesn't make sense wxjmfauth@gmail.com - 2016-05-26 00:52 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-26 12:05 +0300
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-29 14:41 -0400
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-05-29 22:01 +0300
Re: for / while else doesn't make sense Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-23 20:07 -0400
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 10:11 +1000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 02:59 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 17:09 +0000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 03:33 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-23 17:57 +0000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-24 04:14 +1000
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-05-23 13:44 -0400
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-23 11:52 -0600
Re: for / while else doesn't make sense Alan Evangelista <alanoe@linux.vnet.ibm.com> - 2016-05-23 15:06 -0300
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-24 12:15 +1000
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-24 10:54 +0000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-05-25 03:44 +1000
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-25 03:49 +1000
Re: for / while else doesn't make sense MRAB <python@mrabarnett.plus.com> - 2016-05-24 19:57 +0100
Re: for / while else doesn't make sense Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-24 20:10 +0000
Re: for / while else doesn't make sense Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-23 20:29 +0100
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 18:33 +1000
Re: for / while else doesn't make sense Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-21 02:17 +0000
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 18:23 -0700
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-05-21 12:31 +1000
Re: for / while else doesn't make sense Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 20:47 -0700
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-05-20 22:18 -0700
Education [was Re: for / while else doesn't make sense] Steven D'Aprano <steve@pearwood.info> - 2016-05-21 20:05 +1000
Re: Education [was Re: for / while else doesn't make sense] Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-21 08:51 -0700
Re: Education [was Re: for / while else doesn't make sense] Marko Rauhamaa <marko@pacujo.net> - 2016-05-21 20:08 +0300
Re: Education [was Re: for / while else doesn't make sense] Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-05-23 16:44 +0000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-01 16:39 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-02 13:44 +1000
Re: for / while else doesn't make sense Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-02 20:09 +0000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-02 14:46 -0600
Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-02 21:52 +0100
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 18:05 -0700
Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-03 10:23 +0100
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 19:47 -0700
Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-03 10:32 +0100
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 09:22 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-04 12:20 +1000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 20:41 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-04 19:27 +1000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-04 20:20 -0700
Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-04 13:55 +0100
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 18:08 -0700
Re: for / while else doesn't make sense Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-03 15:52 +0000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 09:24 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-04 13:00 +1000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 20:43 -0700
Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-04 04:37 -0700
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-04 20:29 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-05 16:35 +1000
Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-05 04:29 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-05 14:43 +0300
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-06 17:51 -0700
Re: for / while else doesn't make sense Dan Sommers <dan@tombstonezero.net> - 2016-06-07 03:34 +0000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 00:53 -0700
Re: for / while else doesn't make sense Dan Sommers <dan@tombstonezero.net> - 2016-06-07 12:27 +0000
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 14:57 -0700
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-06 22:35 -0600
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 00:52 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-07 11:00 +0300
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 15:07 -0700
Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-07 17:31 -0700
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 18:25 -0700
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 18:29 -0700
Re: for / while else doesn't make sense Ned Batchelder <ned@nedbatchelder.com> - 2016-06-07 18:40 -0700
Re: for / while else doesn't make sense breamoreboy@gmail.com - 2016-06-07 20:45 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-08 08:24 +0300
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-07 18:36 +1000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-07 05:52 -0600
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 14:58 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-08 01:06 +0300
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-07 15:08 -0700
Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-08 08:27 +0300
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-08 17:34 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-09 18:19 +1000
Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-07 17:11 -0600
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-06 17:53 -0700
Re: for / while else doesn't make sense Ethan Furman <ethan@stoneleaf.us> - 2016-06-07 21:13 -0700
Re: for / while else doesn't make sense pavlovevidence@gmail.com - 2016-06-12 00:01 -0700
AttributeError into a bloc try-except AttributeError Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-06-12 09:20 +0200
Re: AttributeError into a bloc try-except AttributeError Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-06-12 10:30 +0200
Re: for / while else doesn't make sense Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-12 20:06 +1000
Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-12 18:44 +0000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-13 12:12 +1000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-12 20:46 -0700
Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-13 23:45 +0000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-14 12:43 +1000
Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-14 04:37 +0000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-14 08:33 -0700
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-14 16:27 -0700
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-14 18:29 -0700
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-15 13:12 +1000
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-14 20:38 -0700
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 04:19 -0700
Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-15 13:27 +0100
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 05:44 -0700
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-06-15 09:51 -0400
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 07:20 -0700
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-06-15 11:54 -0400
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 10:03 -0700
Re: for / while else doesn't make sense BartC <bc@freeuk.com> - 2016-06-15 18:27 +0100
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-16 11:40 +1000
Re: for / while else doesn't make sense Michael Selik <michael.selik@gmail.com> - 2016-06-15 17:18 +0000
Re: for / while else doesn't make sense Random832 <random832@fastmail.com> - 2016-06-15 13:41 -0400
Re: for / while else doesn't make sense Rustom Mody <rustompmody@gmail.com> - 2016-06-15 07:31 -0700
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 19:59 -0700
Re: for / while else doesn't make sense Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 19:54 -0700
What is structured programming (was for/while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-06-15 22:48 -0700
Re: What is structured programming (was for/while else doesn't make sense) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 22:57 -0700
Re: What is structured programming (was for/while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-06-16 04:12 -0700
Re: What is structured programming (was for/while else doesn't make sense) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-16 18:53 -0700
Re: What is structured programming (was for/while else doesn't make sense) Rustom Mody <rustompmody@gmail.com> - 2016-06-17 09:32 -0700
Re: What is structured programming (was for/while else doesn't make sense) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 16:07 -0700
Re: for / while else doesn't make sense Chris Angelico <rosuav@gmail.com> - 2016-06-15 23:56 +1000
Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-16 11:19 +1000
Page 5 of 15 — ← Prev page 1 … 3 4 [5] 6 7 … 15 Next page →
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-05-23 08:14 -0600 |
| Message-ID | <mailman.20.1464012901.20402.python-list@python.org> |
| In reply to | #108983 |
On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Are you saying that the Egyptians, Babylonians and Greeks didn't know how to > work with fractions? > > http://mathworld.wolfram.com/EgyptianFraction.html > > http://nrich.maths.org/2515 > > Okay, it's not quite 4000 years ago. Sometimes my historical sense of the > distant past is a tad inaccurate. Shall we say 2000 years instead? Those links give dates of 1650 BC and 1800 BC respectively, so I'd say your initial guess was closer.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-05-23 15:29 +0100 |
| Message-ID | <87zirgrgol.fsf@bsb.me.uk> |
| In reply to | #108995 |
Ian Kelly <ian.g.kelly@gmail.com> writes: > On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano > <steve+comp.lang.python@pearwood.info> wrote: >> Are you saying that the Egyptians, Babylonians and Greeks didn't know how to >> work with fractions? >> >> http://mathworld.wolfram.com/EgyptianFraction.html >> >> http://nrich.maths.org/2515 >> >> Okay, it's not quite 4000 years ago. Sometimes my historical sense of the >> distant past is a tad inaccurate. Shall we say 2000 years instead? > > Those links give dates of 1650 BC and 1800 BC respectively, so I'd say > your initial guess was closer. Right, but this is to miss the point. Let's say that 4000 years have defined 1/3 to be one third, but Python 3 (as do many programming languages) defines 1/3 to be something very very very very close to one third, and *that* idea is very very very very new! It's unfortunate that the example in this thread does not illustrate the main problem of shifting to binary floating point, because 1/2 happens to be exactly representable. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-05-23 08:49 -0600 |
| Message-ID | <mailman.21.1464014995.20402.python-list@python.org> |
| In reply to | #108996 |
On Mon, May 23, 2016 at 8:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: > Ian Kelly <ian.g.kelly@gmail.com> writes: > >> On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano >> <steve+comp.lang.python@pearwood.info> wrote: >>> Are you saying that the Egyptians, Babylonians and Greeks didn't know how to >>> work with fractions? >>> >>> http://mathworld.wolfram.com/EgyptianFraction.html >>> >>> http://nrich.maths.org/2515 >>> >>> Okay, it's not quite 4000 years ago. Sometimes my historical sense of the >>> distant past is a tad inaccurate. Shall we say 2000 years instead? >> >> Those links give dates of 1650 BC and 1800 BC respectively, so I'd say >> your initial guess was closer. > > Right, but this is to miss the point. Let's say that 4000 years have > defined 1/3 to be one third, but Python 3 (as do many programming > languages) defines 1/3 to be something very very very very close to one > third, and *that* idea is very very very very new! It's unfortunate > that the example in this thread does not illustrate the main problem of > shifting to binary floating point, because 1/2 happens to be exactly > representable. I'm not going to dig back through the thread, but my recollection is that's exactly why that example was chosen. Since 1/2 can be represented exactly as a float, it *should* be represented as a float. Picking another value (0) that isn't even close to the exact value of 1/2 isn't helping anybody.
[toc] | [prev] | [next] | [standalone]
| From | Pete Forman <petef4+usenet@gmail.com> |
|---|---|
| Date | 2016-05-23 19:16 +0100 |
| Message-ID | <m1shx8y6zr.fsf@iKarel.lan> |
| In reply to | #108997 |
Ian Kelly <ian.g.kelly@gmail.com> writes: > On Mon, May 23, 2016 at 8:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >> Ian Kelly <ian.g.kelly@gmail.com> writes: >> >>> On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano >>> <steve+comp.lang.python@pearwood.info> wrote: >>>> Are you saying that the Egyptians, Babylonians and Greeks didn't >>>> know how to work with fractions? >>>> >>>> http://mathworld.wolfram.com/EgyptianFraction.html >>>> >>>> http://nrich.maths.org/2515 >>>> >>>> Okay, it's not quite 4000 years ago. Sometimes my historical sense >>>> of the distant past is a tad inaccurate. Shall we say 2000 years >>>> instead? >>> >>> Those links give dates of 1650 BC and 1800 BC respectively, so I'd >>> say your initial guess was closer. >> >> Right, but this is to miss the point. Let's say that 4000 years have >> defined 1/3 to be one third, but Python 3 (as do many programming >> languages) defines 1/3 to be something very very very very close to >> one third, and *that* idea is very very very very new! It's >> unfortunate that the example in this thread does not illustrate the >> main problem of shifting to binary floating point, because 1/2 >> happens to be exactly representable. > > I'm not going to dig back through the thread, but my recollection is > that's exactly why that example was chosen. Since 1/2 can be > represented exactly as a float, it *should* be represented as a float. > Picking another value (0) that isn't even close to the exact value of > 1/2 isn't helping anybody. Something else which I do not think has been stated yet in this thread is that floating point is an inexact representation. Just because integers and binary fractions have an exact correspondence we ought not to be affording them special significance. Floating point 1 is not the integer 1, it stands for a range of numbers some fraction either side of 1. There are other ways of handling non-integral numbers, such as fixed point, rational and unum. However current computing hardware is very much oriented to floating point, IEEE in particular. -- Pete Forman
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-05-23 13:24 -0600 |
| Message-ID | <mailman.32.1464031512.20402.python-list@python.org> |
| In reply to | #109019 |
On Mon, May 23, 2016 at 12:16 PM, Pete Forman <petef4+usenet@gmail.com> wrote: > Something else which I do not think has been stated yet in this thread > is that floating point is an inexact representation. Just because > integers and binary fractions have an exact correspondence we ought not > to be affording them special significance. Floating point 1 is not the > integer 1, it stands for a range of numbers some fraction either side of > 1. This is not the case. Floating point 1 means exactly 1, no more and no less. Results that aren't exactly representable get rounded to values that are, but this does not imply that the value once rounded is inexact. The value that 1/3 gets rounded to is exactly equal to 6004799503160661 / 18014398509481984, no more and no less. Treating floating point values as inexact would require an accumulation of the range of error. Otherwise, it would no longer be correct to say that 1.0 * 1.0 == 1.0. The result could with equal correctness be the next floating point number after 1.0, or the previous value before 1.0. Continue multiplying by 1.0 and the error creeps larger and larger. The defined result of the operation, however, is the exact value 1.0.
[toc] | [prev] | [next] | [standalone]
| From | Pete Forman <petef4+usenet@gmail.com> |
|---|---|
| Date | 2016-05-23 22:50 +0100 |
| Message-ID | <m1oa7wxx3d.fsf@iKarel.lan> |
| In reply to | #109020 |
Ian Kelly <ian.g.kelly@gmail.com> writes: > On Mon, May 23, 2016 at 12:16 PM, Pete Forman <petef4+usenet@gmail.com> wrote: >> Something else which I do not think has been stated yet in this >> thread is that floating point is an inexact representation. Just >> because integers and binary fractions have an exact correspondence we >> ought not to be affording them special significance. Floating point 1 >> is not the integer 1, it stands for a range of numbers some fraction >> either side of 1. > > This is not the case. Floating point 1 means exactly 1, no more and no > less. Results that aren't exactly representable get rounded to values > that are, but this does not imply that the value once rounded is > inexact. The value that 1/3 gets rounded to is exactly equal to > 6004799503160661 / 18014398509481984, no more and no less. > > Treating floating point values as inexact would require an > accumulation of the range of error. Otherwise, it would no longer be > correct to say that 1.0 * 1.0 == 1.0. The result could with equal > correctness be the next floating point number after 1.0, or the > previous value before 1.0. Continue multiplying by 1.0 and the error > creeps larger and larger. The defined result of the operation, > however, is the exact value 1.0. Let us for the sake of argument consider a floating point representation that has one decimal point of precision. It is easier to talk about than the IEEE double precision used in Python. If you are talking about the multiplicative identity element then 1.0 is exactly unity and repeated multiplication will not change the result. However I am coming from scientific measurements where 1.0 is the stored value for observations between 0.95 and 1.05. If I wish to correlate two signals that were 1.03 and 1.04 at higher precision then 1.1 is actually a reasonable value for their "correct" product, even though 1.0 is what is prescribed by IEEE-style rules because they are both stored as 1.0. I agree that errors tend to creep ever larger. IEEE rounding rules seek to minimize the error of the result but management of the accumulated error is up to the scientist / programmer, it is not part of the IEEE arithmetic. -- Pete Forman
[toc] | [prev] | [next] | [standalone]
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Date | 2016-05-24 18:49 +1200 |
| Message-ID | <dqibskFb25jU1@mid.individual.net> |
| In reply to | #109027 |
Pete Forman wrote: > However I am coming from scientific measurements where 1.0 is the stored > value for observations between 0.95 and 1.05. You only know that because you're keeping some extra information in your head about what the 1.0 stored in your computer represents. It's not inherent in the value itself. -- Greg
[toc] | [prev] | [next] | [standalone]
| From | Pete Forman <petef4+usenet@gmail.com> |
|---|---|
| Date | 2016-05-24 19:03 +0100 |
| Message-ID | <m1fut7xrj1.fsf@iKarel.lan> |
| In reply to | #109045 |
Gregory Ewing <greg.ewing@canterbury.ac.nz> writes: > Pete Forman wrote: >> However I am coming from scientific measurements where 1.0 is the >> stored value for observations between 0.95 and 1.05. > > You only know that because you're keeping some extra information in > your head about what the 1.0 stored in your computer represents. It's > not inherent in the value itself. No, that is a real case. Floating point hardware can hold intermediate values in 80 bit registers before writing the double precision result to 8 bytes of memory. There are compiler switches available to enforce strict IEEE conformance and discard the intermediate guard digits. By adhering to those rules the results are predictable (repeatable on other hardware) but less accurate mathematically speaking. -- Pete Forman
[toc] | [prev] | [next] | [standalone]
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Date | 2016-05-25 18:35 +1200 |
| Message-ID | <dqkvd7Fr38vU1@mid.individual.net> |
| In reply to | #109079 |
Pete Forman wrote: > Gregory Ewing <greg.ewing@canterbury.ac.nz> writes: > >>Pete Forman wrote: >> >>>However I am coming from scientific measurements where 1.0 is the >>>stored value for observations between 0.95 and 1.05. >> >>You only know that because you're keeping some extra information in >>your head about what the 1.0 stored in your computer represents. > > No, that is a real case. Floating point hardware can hold intermediate > values in 80 bit registers I don't see how that's relevant. My point is that if all you gave me was a file containing the IEEE representation of a floating point 1.0 and no other information, I would have no way of telling that you intended it to represent a value between 0.95 and 1.05, as opposed to 0.9995 to 1.0005 or any other range. That's true regardless of whether 32 bits, 64 bits or 80 bits is being used. -- Greg
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2016-05-24 10:38 +1000 |
| Message-ID | <5743a2a5$0$1620$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #109019 |
On Tue, 24 May 2016 04:16 am, Pete Forman wrote:
> Something else which I do not think has been stated yet in this thread
> is that floating point is an inexact representation. Just because
> integers and binary fractions have an exact correspondence we ought not
> to be affording them special significance. Floating point 1 is not the
> integer 1, it stands for a range of numbers some fraction either side of
> 1.
That's a matter of interpretation. Sometimes that is the case: if the result
of some calculation involving errors happens to result in 1.0 (rather than,
say, 1.00270128) by the merest coincidence, then there is nothing special
about 1.0 and it represents some interval, same as any other float in that
situation.
But if for some strange reason you decide to do integer maths using floats:
x = 14.0/2.0 - 1.0
then the result, x == 1.0, is exact (assuming that the quantities 14.0 etc.
represent exact constants rather than inexact measured quantities with
associated measurement error).
And:
py> math.sqrt(1)
1.0
is not a range of numbers, it is an exact result.
IEEE 754 floating point has the concept of exact and inexact calculations.
When it comes to floats, Python unfortunately has no reliable way to tell
whether a calculation was exact or inexact, but the decimal module does.
py> from decimal import *
py> with localcontext(Context(traps=[Inexact])):
... Decimal(25).sqrt() - Decimal(2)**Decimal(2)
...
Decimal('1')
That decimal 1 is *exact*. There's no rounding error. Provided that the
constants themselves are free of any measurement error, there is no error
at all in this calculation. Also exact:
py> with localcontext(Context(traps=[Inexact])):
... Decimal(10).log10()
...
Decimal('1')
Whereas this Decimal 1 is inexact:
py> d = Decimal("1.0000000000000000000000000001")
py> assert d != Decimal(1)
py> d.sqrt() == 1
True
We can trap the inexact calculation:
py> with localcontext(Context(traps=[Inexact])):
... d.sqrt()
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
decimal.Inexact: [<class 'decimal.Inexact'>]
--
Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-05-24 00:57 +1000 |
| Message-ID | <mailman.22.1464015429.20402.python-list@python.org> |
| In reply to | #108996 |
On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: > Right, but this is to miss the point. Let's say that 4000 years have > defined 1/3 to be one third, but Python 3 (as do many programming > languages) defines 1/3 to be something very very very very close to one > third, and *that* idea is very very very very new! Have you ever written one third as 0.33333333 ? Because that's also something very very close to one third. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2016-05-24 01:47 +1000 |
| Message-ID | <5743260b$0$1601$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #108998 |
On Tue, 24 May 2016 12:57 am, Chris Angelico wrote: > On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> > wrote: >> Right, but this is to miss the point. Let's say that 4000 years have >> defined 1/3 to be one third, but Python 3 (as do many programming >> languages) defines 1/3 to be something very very very very close to one >> third, and *that* idea is very very very very new! > > Have you ever written one third as 0.33333333 ? Because that's also > something very very close to one third. For many purposes, 0.33 is close enough to one third. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-05-24 01:57 +1000 |
| Message-ID | <mailman.23.1464019036.20402.python-list@python.org> |
| In reply to | #109003 |
On Tue, May 24, 2016 at 1:47 AM, Steven D'Aprano <steve@pearwood.info> wrote: > On Tue, 24 May 2016 12:57 am, Chris Angelico wrote: > >> On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> >> wrote: >>> Right, but this is to miss the point. Let's say that 4000 years have >>> defined 1/3 to be one third, but Python 3 (as do many programming >>> languages) defines 1/3 to be something very very very very close to one >>> third, and *that* idea is very very very very new! >> >> Have you ever written one third as 0.33333333 ? Because that's also >> something very very close to one third. > > For many purposes, 0.33 is close enough to one third. As is 3.14 close enough to π. (Or 256/81 or any of the other historical values.) Approximations are nothing new. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-05-23 17:51 +0100 |
| Message-ID | <87oa7wra4d.fsf@bsb.me.uk> |
| In reply to | #108998 |
Chris Angelico <rosuav@gmail.com> writes: > On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >> Right, but this is to miss the point. Let's say that 4000 years have >> defined 1/3 to be one third, but Python 3 (as do many programming >> languages) defines 1/3 to be something very very very very close to one >> third, and *that* idea is very very very very new! > > Have you ever written one third as 0.33333333 ? Not that I recall, but, obviously, I can't be sure. I can't even tell without counting how many 3s there are there. Why do you ask? > Because that's also > something very very close to one third. Yes it is, but I don't get what point you are making. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-05-24 02:59 +1000 |
| Message-ID | <mailman.26.1464022796.20402.python-list@python.org> |
| In reply to | #109008 |
On Tue, May 24, 2016 at 2:51 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: > Chris Angelico <rosuav@gmail.com> writes: > >> On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >>> Right, but this is to miss the point. Let's say that 4000 years have >>> defined 1/3 to be one third, but Python 3 (as do many programming >>> languages) defines 1/3 to be something very very very very close to one >>> third, and *that* idea is very very very very new! >> >> Have you ever written one third as 0.33333333 ? > > Not that I recall, but, obviously, I can't be sure. I can't even tell > without counting how many 3s there are there. Why do you ask? > >> Because that's also >> something very very close to one third. > > Yes it is, but I don't get what point you are making. You asserted that representing one third as something almost, but not exactly, one third was a new idea. It is not. Ever since ancient times, approximations have been used. Python is no different from anything else; the only reason it _looks_ different is that it's an approximation in binary, converted to decimal for display. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-05-23 20:55 +0100 |
| Message-ID | <87d1ocr1kn.fsf@bsb.me.uk> |
| In reply to | #109010 |
Chris Angelico <rosuav@gmail.com> writes: > On Tue, May 24, 2016 at 2:51 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >> Chris Angelico <rosuav@gmail.com> writes: >> >>> On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >>>> Right, but this is to miss the point. Let's say that 4000 years have >>>> defined 1/3 to be one third, but Python 3 (as do many programming >>>> languages) defines 1/3 to be something very very very very close to one >>>> third, and *that* idea is very very very very new! >>> >>> Have you ever written one third as 0.33333333 ? >> >> Not that I recall, but, obviously, I can't be sure. I can't even tell >> without counting how many 3s there are there. Why do you ask? >> >>> Because that's also >>> something very very close to one third. >> >> Yes it is, but I don't get what point you are making. > > You asserted that representing one third as something almost, but not > exactly, one third was a new idea. Ah, I didn't mean to assert that at all. I meant to say that the new thing is that the approximation is tucked away in a representation largely hidden from the person doing the arithmetic. Its floats in programming languages that are new, not approximations. > It is not. Ever since ancient > times, approximations have been used. Python is no different from > anything else; the only reason it _looks_ different is that it's an > approximation in binary, converted to decimal for display. It's often hard for people to see that actual value[1] in a program, but not when they do arithmetic by hand. This is what confused me about your question. Were I to approximate 1/3 with 0.333 (on paper) there should be no surprises down the line. I know that 3 times it won't be 1, but 0.999. Confusion creeps in when the approximation is not explicit in the eye of the beginner. Obviously, to you and me, 1/3 is clearly an approximation in Python -- we know that / explicitly makes floats -- but not everyone knows the full consequences of that right away. I doubt anyone, beginner or not, would be surprised that 0.33333333 is not actually one third (though they *might* be surprised if it's not 33333333/100000000). [1] Not being a Python expert I don't know how you show that actual value of a float. What is the Pythonic way to do that? -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Mark Dickinson <mdickinson@enthought.com> |
|---|---|
| Date | 2016-05-23 20:17 +0000 |
| Message-ID | <mailman.33.1464034672.20402.python-list@python.org> |
| In reply to | #109022 |
Ben Bacarisse <ben.usenet <at> bsb.me.uk> writes: > [1] Not being a Python expert I don't know how you show that actual > value of a float. What is the Pythonic way to do that? I don't know about Pythonic, but here are some options. 1. Convert the float to Decimal, and print the result. This shows the exact binary value that's stored, but displays it in decimal. Be aware that the result will be hundreds of digits long for very large or very small floats. >>> print(Decimal(pi)) 3.141592653589793115997963468544185161590576171875 2. If you're happy with a hexadecimal representation, use the float.hex method. Again, this shows the exact value stored. >>> print(pi.hex()) 0x1.921fb54442d18p+1 3. To get an equivalent fraction, convert to the fractions.Fraction type or use the as_integer_ratio method. >>> from fractions import Fraction >>> print(Fraction(pi)) 884279719003555/281474976710656 >>> print(pi.as_integer_ratio()) (884279719003555, 281474976710656) -- Mark (who should probably take a numerical methods class someday)
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-05-23 22:01 +0100 |
| Message-ID | <877fekqyiq.fsf@bsb.me.uk> |
| In reply to | #109023 |
Mark Dickinson <mdickinson@enthought.com> writes: > Ben Bacarisse <ben.usenet <at> bsb.me.uk> writes: >> [1] Not being a Python expert I don't know how you show that actual >> value of a float. What is the Pythonic way to do that? > > I don't know about Pythonic, but here are some options. > > 1. Convert the float to Decimal, and print the result. This shows > the exact binary value that's stored, but displays it in decimal. > Be aware that the result will be hundreds of digits long for > very large or very small floats. > > >>> print(Decimal(pi)) > 3.141592653589793115997963468544185161590576171875 > > 2. If you're happy with a hexadecimal representation, use the > float.hex method. Again, this shows the exact value stored. > > >>> print(pi.hex()) > 0x1.921fb54442d18p+1 > > 3. To get an equivalent fraction, convert to the fractions.Fraction > type or use the as_integer_ratio method. > > >>> from fractions import Fraction > >>> print(Fraction(pi)) > 884279719003555/281474976710656 > >>> print(pi.as_integer_ratio()) > (884279719003555, 281474976710656) Thanks. I worked out 1 and 3 after posting but I was not aware of how to get 2 in Python. It's the format I am most familiar with (and it's very compact for numbers that are anything but in decimal or as fractions) so that's handy. Once you told me that hex() does the trick I wondered if "%x" % 3.4 would give me 0x1.b333333333333p+1 but the float is converted to the expected integer. I doubt anyone relies on using %x for the integer part of a float so maybe %x could be provided for floats... -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2016-05-24 10:57 +1000 |
| Subject | Numerical methods [was Re: for / while else doesn't make sense] |
| Message-ID | <5743a6ee$0$1605$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #109023 |
On Tue, 24 May 2016 06:17 am, Mark Dickinson signed his post: > (who should probably take a numerical methods class someday) Really? I would have thought you could have taught a numerical methods class. You certainly know more about it than I do, and I have taken one! (Twice!) -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2016-05-23 08:30 -0700 |
| Message-ID | <c61f27e6-9b1a-4a0e-a803-3ad44adbb5da@googlegroups.com> |
| In reply to | #108996 |
On Monday, May 23, 2016 at 7:59:47 PM UTC+5:30, Ben Bacarisse wrote: > Ian Kelly writes: > > > On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano wrote: > >> Are you saying that the Egyptians, Babylonians and Greeks didn't know how to > >> work with fractions? > >> > >> http://mathworld.wolfram.com/EgyptianFraction.html > >> > >> http://nrich.maths.org/2515 > >> > >> Okay, it's not quite 4000 years ago. Sometimes my historical sense of the > >> distant past is a tad inaccurate. Shall we say 2000 years instead? > > > > Those links give dates of 1650 BC and 1800 BC respectively, so I'd say > > your initial guess was closer. > > Right, but this is to miss the point. Let's say that 4000 years have > defined 1/3 to be one third, but Python 3 (as do many programming > languages) defines 1/3 to be something very very very very close to one > third, and *that* idea is very very very very new! It's unfortunate > that the example in this thread does not illustrate the main problem of > shifting to binary floating point, because 1/2 happens to be exactly > representable. Yes the point is being missed but in a different direction: The SET (as a completed whole) of real numbers (ℝ) is no more than a 100 years old. People may have used fractions earlier And even here the first line of Steven's http://nrich.maths.org/2515 says "Did you know that fractions as we use them today didn't exist in Europe until the 17th century?" Egypt and Babylon (and India for that matter) are really only of archaeological interest in the sense that there is almost complete loss of continuity from then to now That the set ℝ legitimately exists was a minority view -- Cantor,Dedekind, Weierstrass... On the other side Kronecker belligerently declared: "The good Lord made the natural numbers (Zahlen in German) All the rest is the work of man" This was the MAINSTREAM view in the 1880s. As late as 1918 Weyl and Polya took a bet that math concepts such as real numbers, sets, countability etc would be relegated to history as a bad dream and the pristine purity of constructive math would be firmly established -- where "constructive math" basically means ℕ is the only reasonable infinite set and that ℝ is anything but real! https://en.wikipedia.org/wiki/Hermann_Weyl#Foundations_of_mathematics For a conspectus showing that: - our current views are fairly recent (compared to Egypt, Babylon etc) - that far from being universally accepted they were hotly disputed - And thence gave rise to our field of CS see http://blog.languager.org/2015/03/cs-history-0.html
[toc] | [prev] | [next] | [standalone]
Page 5 of 15 — ← Prev page 1 … 3 4 [5] 6 7 … 15 Next page →
Back to top | Article view | comp.lang.python
csiph-web