Question about slight deviations when using integer division with large integers.

Christian Seberino cseberino at
Mon Dec 31 00:33:59 EST 2018

Thanks.  I didn’t post new code.  I was just referring back to original
post.  I need to duplicate the exact behavior of Java’s BigIntegers.

I’m guessing difference between Java and Python is that Java BigIntegers do
not switch to floor for negatives.

Possible to tweak rounding of Python to be like Java?

On Sun, Dec 30, 2018 at 11:24 PM Cameron Simpson <cs at> wrote:

> On 30Dec2018 21:14, Christian Seberino <cseberino at> wrote:
> >What is simplest way to make both those
> >prints give same values?  Any slicker way
> >than an if statement?
> If your post had an attachment, be aware that the python-list list drops
> all attachments - it is a text only list. Please paste your code
> directly into your messages so that others can easily see it.
> Thanks,
> Cameron Simpson <cs at>

Christian Seberino, Ph.D.
Phone: (936) 235-1139
Email: cseberino at

More information about the Python-list mailing list