[prev in list] [next in list] [prev in thread] [next in thread]
List: python-ideas
Subject: Re: [Python-ideas] integer dividion in R
From: Chris Rebert <pyideas () rebertia ! com>
Date: 2010-05-07 7:38:49
Message-ID: r2x50697b2c1005070038yd23940dcr1df80fbcb7464557 () mail ! gmail ! com
[Download RAW message or body]
2010/5/7 spir ☣ <denis.spir@gmail.com>:
> Hello,
>
>
> The following point came up on the python-tutor mailing list:
>
> spir@o:~$ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> > > > 4//3
> 1
> > > > -4//3
> -2
>
> The algorithm seems to use floor, not integral part. Is this correct, according to \
> the (math) definition of integer division?
There was *literally* just a thread about essentially the same thing:
http://mail.python.org/pipermail/python-ideas/2010-May/007170.html
Short answer: Yes, because there are multiple valid ways to define
integer quotient and modulo.
Cheers,
Chris
--
http://blog.rebertia.com
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic