Python 3.0 new integer division
ABH at MCHSI.COM
Tue Apr 8 19:19:47 CEST 2008
"Matimus" <mccredie at gmail.com> wrote in message
news:b6eafdd4-dbf8-4269-962f-531126bb10c0 at s33g2000pri.googlegroups.com...
> On Apr 8, 9:13 am, "Hutch" <A... at MCHSI.COM> wrote:
>> We now have a float result when two integers are divided in the same
>> as 2.4 or 2.5.
>> I can handle that and use the Floor division but a simple question.
>> Why in the world would you round down the last presented digit to a 6
>> instead of just leaving it along as an 8.
>> For some reason rounding down for a float in Python does not seem
>> IDLE 3.0a4
>> >>> 12345678901234567890123456789012345678901234567890/345
>> >>> 12345678901234567890123456789012345678901234567890//345
>> 35784576525317586000000000000000000000000000000 ==
> This just has to do with the way floating point numbers are
> represented in memory. More information:
Was thinking IBM decimal when I asked the question --should have remembered
detail of floats.
More information about the Python-list