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


Groups > comp.lang.python > #83436

Re: Decimals and other numbers

References (3 earlier) <54af9612$0$12995$c3e8da3$5496439d@news.astraweb.com> <mailman.17513.1420793970.18130.python-list@python.org> <54afab5d$0$12976$c3e8da3$5496439d@news.astraweb.com> <mailman.17516.1420799984.18130.python-list@python.org> <54afc884$0$12985$c3e8da3$5496439d@news.astraweb.com>
Date 2015-01-09 23:34 +1100
Subject Re: Decimals and other numbers
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.17523.1420806865.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jan 9, 2015 at 11:24 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
>> 5 * 0 * 0 * 0 * 0 = 0
>
> Where did the 5 come from?
>
> You're effectively saying that 0**0 becomes 5*0**0, then cancelling the 0**0
> because they're all zeroes and so don't matter, leaving 5. And that simply
> doesn't work. If it did work, there's nothing special about 5, we could use
> 18 instead:
>
> 0**0 = 5*0**0 => 5
>
> but 0**0 = 18*0**0 => 18
> therefore 5 = 18.
>
> Yay maths! :-)

To clarify, I'm following this sequence:

5 * 0**4 = 5 * 0 * 0 * 0 * 0 = 0
5 * 0**3 = 5 * 0 * 0 * 0 = 0
5 * 0**2 = 5 * 0 * 0 = 0
5 * 0**1 = 5 * 0 = 0
5 * 0**0 = 5 = ?

Multiplication by zero is idempotent; any number of multiplications
beyond the first won't change the result. But that doesn't mean that
never multiplying by zero will have the same result. I think it's
fairly obvious in this example that the pattern does NOT continue to
the case where you're multiplying in no zeroes.

ChrisA

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


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