Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2 Bug in integer negative

closed-fixed
Armin Rigo
5
2002-02-05
2002-01-07
Tim Hochberg
No

The following little function appears to trigger a bug
in integer math.

def f11():
return -abs(-10)

It returns -11 rather than -10 as expected. The
problem seems to be in pint_neg; commenting all of
that function out except the fallback
psco_generic_call makes things work fine, while doing
the same to pint_abs does not. I would suspect
integer_negative, but I don't understand that part of
Psyco enough to attempt to debug it.

-tim

Discussion

  • Armin Rigo
    Armin Rigo
    2002-01-10

    • assigned_to: nobody --> arigo
     
  • Armin Rigo
    Armin Rigo
    2002-01-27

    Logged In: YES
    user_id=4771

    I cannot reproduce this bug. Might be out of date. Can you
    please try again?

     
  • Armin Rigo
    Armin Rigo
    2002-01-27

    • labels: --> Python incompatibility
    • status: open --> open-works-for-me
     
  • Armin Rigo
    Armin Rigo
    2002-02-05

    Logged In: YES
    user_id=4771

    Might be related to the following recent bug fix: Psyco
    emitted the NOT instruction instead of the NEG one and vice-
    versa...

     
  • Armin Rigo
    Armin Rigo
    2002-02-05

    • status: open-works-for-me --> closed-fixed