From issues-reply at bitbucket.org Wed Feb 6 06:04:50 2019 From: issues-reply at bitbucket.org (Julian Berman) Date: Wed, 06 Feb 2019 11:04:50 +0000 (UTC) Subject: [pypy-issue] Issue #2946: Raising ints to negative numbers casts first to longs and then to floats (pypy/pypy) Message-ID: <20190206110450.19870.67010@app-147.ash1.bb-inf.net> New issue 2946: Raising ints to negative numbers casts first to longs and then to floats https://bitbucket.org/pypy/pypy/issues/2946/raising-ints-to-negative-numbers-casts Julian Berman: Code: ```python def main(): s = 0.0 for i in range(1, 100000): s += i ** -2 return s main() ``` Trace: ``` debug_merge_point(0, 0, ' #37 BINARY_POWER') +699: guard_not_invalidated(descr=) [p0, p3, p6, p7, p10, p14, p18, p20, p1, i37] +699: p43 = call_r(ConstClass(fromint), i37, descr=) +803: guard_no_exception(descr=) [p0, p6, p7, p10, p14, p1, p43, i37] +817: f45 = call_f(ConstClass(rbigint.tofloat), p43, descr=) ```