Mark Dickinson <dicki...@gmail.com> added the comment:

The accumulated error doesn't need to exceed 1;  it just needs to be enough to 
make (e.g.) leftover appear to be >= 0.5 when it's actually just less than 0.5. 
 It shouldn't be too hard to find examples where this happens, but I haven't 
thought about it.

> I wonder if it would be justified to expose something like
> int _PyLong_IsOdd(PyObject *self) {...}

Yes, that could work.  I'd be happier with this if there are other uses (even 
within longobject.c);  there might well be, but I haven't looked.  I also have 
a mild preference for _PyLong_IsEven over _PyLong_IsOdd.  :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8860>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to