Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83423
| References | (1 earlier) <54AF405C.6020609@davea.name> <mailman.17501.1420772593.18130.python-list@python.org> <54af9612$0$12995$c3e8da3$5496439d@news.astraweb.com> <mailman.17513.1420793970.18130.python-list@python.org> <54afab5d$0$12976$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2015-01-09 21:39 +1100 |
| Subject | Re: Decimals and other numbers |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17516.1420799984.18130.python-list@python.org> (permalink) |
On Fri, Jan 9, 2015 at 9:20 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > On the basis that m**n means m multiplied by itself n times: > > 5**4 = 5*5*5*5 = 625 > > that gives us: > > 0**0 = zero multiplied by itself zero times. > > You can multiply 0 by any number you like, and the answer will always be 0, > not 1. Even if that other number is 0, the answer is still 0. 5 * 0 * 0 * 0 * 0 = 0 You can multiply 5 by 0 any number of times you like, and the answer will always be 0... unless you never multiply it by 0 at all, in which case it'll be 5. Multiplying 0 by any number, including 0, is 0... but *not* multiplying 0 by 0 doesn't have to give 0. 0**0 is the result of not multiplying any zeroes together, so it doesn't follow the rules of multiplying zeroes together. Look at it another way. 6**x modulo 10 will always be 6, right? 6, 36, 216... the rules for multiplying mean that the last digit will be consistent. (That's how we can know what the last digits of Graham's Number are, despite having no way to even comprehend its scale.) So what's 6**0? Is that going to end with 6, too, to be consistent? No, because we're not multiplying any sixes in, so the answer's simply 1. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Decimals and other numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-01-08 19:02 -0800
Re: Decimals and other numbers Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 09:28 +0200
Re: Decimals and other numbers Chris Angelico <rosuav@gmail.com> - 2015-01-09 18:37 +1100
Re: Decimals and other numbers Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 11:31 +0200
Re: Decimals and other numbers Dave Angel <davea@davea.name> - 2015-01-09 02:49 -0500
Re: Decimals and other numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-01-09 00:51 -0800
Re: Decimals and other numbers Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-01-09 11:07 +0200
[OT] x**y == y**x Peter Pearson <pkpearson@nowhere.invalid> - 2015-01-09 17:46 +0000
Re: [OT] x**y == y**x Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 23:41 +0200
Re: [OT] x**y == y**x Peter Pearson <pkpearson@nowhere.invalid> - 2015-01-10 16:57 +0000
Re: Decimals and other numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-09 19:49 +1100
Re: Decimals and other numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-01-09 00:58 -0800
Re: Decimals and other numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-09 21:20 +1100
Re: Decimals and other numbers Chris Angelico <rosuav@gmail.com> - 2015-01-09 21:39 +1100
Re: Decimals and other numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-09 23:24 +1100
Re: Decimals and other numbers Chris Angelico <rosuav@gmail.com> - 2015-01-09 23:34 +1100
Re: Decimals and other numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-01-09 17:25 -0800
Re: Decimals and other numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-01-10 16:08 +1300
Re: Decimals and other numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-01-09 01:11 -0800
Re: Decimals and other numbers Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 11:34 +0200
Re: Decimals and other numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-09 22:03 +1100
Re: Decimals and other numbers Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 11:44 +0200
Re: Decimals and other numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-01-10 16:05 +1300
Re: Decimals and other numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-01-09 19:57 -0800
csiph-web