Mark Dickinson dicki...@gmail.com added the comment:
Raymond: just curious---why do you ask? Did this fix break something?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10596
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
Uncle Timmy, was this the right thing to do?
--
assignee: mark.dickinson - tim_one
nosy: +rhettinger, tim_one
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10596
Tim Peters tim.pet...@gmail.com added the comment:
Raymond, Mark pointed to the footnote explaining the first result. As to the
second, Kahan tried his best, but I'm afraid nobody can make me care about the
sign bit on a zero ;-) Whatever Mark thought best is fine by me.
--
Mark Dickinson dicki...@gmail.com added the comment:
Fixed the sign of the zero (in py3k) in r87032. I'll backport to 2.7 and 3.1,
then close this.
Sergio, is that acceptable? You still haven't said what results you were
expecting for these operations.
--
resolution: - fixed
Mark Dickinson dicki...@gmail.com added the comment:
Backported to 3.1 (after one botched backport attempt) and 2.7 in r87037 and
r87033.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10596
New submission from Сергей Хлутчин serc...@gmail.com:
Result of the modulo operator is wrong:
(-2.22044604925e-16)%4
4.0
(-4.0)%4
-0.0
--
messages: 122991
nosy: Sergio.Ĥlutĉin
priority: normal
severity: normal
status: open
title: modulo operator bug
type: behavior
versions: Python
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10596
___
___
Python-bugs-list
Mark Dickinson dicki...@gmail.com added the comment:
What results were you expecting here? Both those results look fine to me
(though it's arguable that the second should be +0.0 rather than -0.0).
--
assignee: - mark.dickinson
___
Python tracker
Сергей Хлутчин serc...@gmail.com added the comment:
From the documetation:
The modulo operator always yields a result with the same sign as its second
operand (or zero); the absolute value of the result is strictly smaller than
the absolute value of the second operand.
--
Mark Dickinson dicki...@gmail.com added the comment:
Did you look at the second footnote on that page?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10596
___
10 matches
Mail list logo