[issue10596] modulo operator bug

2011-04-21 Thread Mark Dickinson
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 ___

[issue10596] modulo operator bug

2011-04-19 Thread Raymond Hettinger
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

[issue10596] modulo operator bug

2011-04-19 Thread Tim Peters
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. --

[issue10596] modulo operator bug

2010-12-04 Thread Mark Dickinson
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

[issue10596] modulo operator bug

2010-12-04 Thread Mark Dickinson
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

[issue10596] modulo operator bug

2010-12-01 Thread Сергей Хлутчин
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

[issue10596] modulo operator bug

2010-12-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10596 ___ ___ Python-bugs-list

[issue10596] modulo operator bug

2010-12-01 Thread Mark Dickinson
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

[issue10596] modulo operator bug

2010-12-01 Thread Сергей Хлутчин
Сергей Хлутчин 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. --

[issue10596] modulo operator bug

2010-12-01 Thread Mark Dickinson
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 ___