SIGN IN SIGN UP

[3.13] gh-143006: Fix and optimize mixed comparison of float and int (GH-143084) (GH-143624)

When comparing negative non-integer float and int with the same number
of bits in the integer part, __neg__() in the int subclass returning
not an int caused an assertion error.

Now the integer is no longer negated. Also, reduced the number of
temporary created Python objects.
(cherry picked from commit 66bca383bd3b12d21e879d991d77b37a4c638f88)
S
Serhiy Storchaka committed
618a42410fe1b5f8c82c385ad34a566da904bf03
Parent: 57c56b0
Committed by GitHub <noreply@github.com> on 1/9/2026, 5:43:35 PM