[MacPorts] #32072: Python: powers of two are screwed up starting at 2**63
#32072: Python: powers of two are screwed up starting at 2**63 -----------------------------------------+---------------------------------- Reporter: singingwolfboy@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: python | Port: python25 python27 -----------------------------------------+---------------------------------- {{{ $ # debugging info $ sw_vers ProductName: Mac OS X ProductVersion: 10.7.2 BuildVersion: 11C74 singingwolfboy ~ $ uname -a Darwin DBMBP.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64 $ port installed python25 python27 The following ports are currently installed: python25 @2.5.6_2 (active) python27 @2.7.2_2+ucs4 (active) $ # testing powers of two with system pythons $ /usr/bin/python2.5 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.5 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.5 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.5 -c "print 2**65" 36893488147419103232 $ /usr/bin/python2.6 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.6 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.6 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.6 -c "print 2**65" 36893488147419103232 $ /usr/bin/python2.7 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.7 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.7 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.7 -c "print 2**65" 36893488147419103232 $ ####### WEIRDNESS BEGINS HERE ######## $ # testing powers of two with Macports pythons $ /opt/local/bin/python2.5 -c "print 2**62" 4611686018427387904 $ /opt/local/bin/python2.5 -c "print 2**63" -9223372036854775808 $ /opt/local/bin/python2.5 -c "print 2**64" 0 $ /opt/local/bin/python2.5 -c "print 2**65" 0 $ /opt/local/bin/python2.7 -c "print 2**62" 4611686018427387904 $ /opt/local/bin/python2.7 -c "print 2**63" -9223372036854775808 $ /opt/local/bin/python2.7 -c "print 2**64" 0 $ /opt/local/bin/python2.7 -c "print 2**65" 0 $ # I have not tested Macports python2.4 or python2.6, but I bet it's the same $ }}} -- Ticket URL: <https://trac.macports.org/ticket/32072> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32072: Python: powers of two are screwed up starting at 2**63 -----------------------------------------+---------------------------------- Reporter: singingwolfboy@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: python | Port: python25 python27 -----------------------------------------+---------------------------------- Description changed by singingwolfboy@…: Old description:
{{{ $ # debugging info $ sw_vers ProductName: Mac OS X ProductVersion: 10.7.2 BuildVersion: 11C74 singingwolfboy ~ $ uname -a Darwin DBMBP.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64 $ port installed python25 python27 The following ports are currently installed: python25 @2.5.6_2 (active) python27 @2.7.2_2+ucs4 (active) $ # testing powers of two with system pythons $ /usr/bin/python2.5 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.5 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.5 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.5 -c "print 2**65" 36893488147419103232 $ /usr/bin/python2.6 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.6 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.6 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.6 -c "print 2**65" 36893488147419103232 $ /usr/bin/python2.7 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.7 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.7 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.7 -c "print 2**65" 36893488147419103232 $ ####### WEIRDNESS BEGINS HERE ######## $ # testing powers of two with Macports pythons $ /opt/local/bin/python2.5 -c "print 2**62" 4611686018427387904 $ /opt/local/bin/python2.5 -c "print 2**63" -9223372036854775808 $ /opt/local/bin/python2.5 -c "print 2**64" 0 $ /opt/local/bin/python2.5 -c "print 2**65" 0 $ /opt/local/bin/python2.7 -c "print 2**62" 4611686018427387904 $ /opt/local/bin/python2.7 -c "print 2**63" -9223372036854775808 $ /opt/local/bin/python2.7 -c "print 2**64" 0 $ /opt/local/bin/python2.7 -c "print 2**65" 0 $ # I have not tested Macports python2.4 or python2.6, but I bet it's the same $ }}}
New description: {{{ $ # debugging info $ sw_vers ProductName: Mac OS X ProductVersion: 10.7.2 BuildVersion: 11C74 $ uname -a Darwin DBMBP.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64 $ port installed python25 python27 The following ports are currently installed: python25 @2.5.6_2 (active) python27 @2.7.2_2+ucs4 (active) $ # testing powers of two with system pythons $ /usr/bin/python2.5 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.5 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.5 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.5 -c "print 2**65" 36893488147419103232 $ /usr/bin/python2.6 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.6 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.6 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.6 -c "print 2**65" 36893488147419103232 $ /usr/bin/python2.7 -c "print 2**62" 4611686018427387904 $ /usr/bin/python2.7 -c "print 2**63" 9223372036854775808 $ /usr/bin/python2.7 -c "print 2**64" 18446744073709551616 $ /usr/bin/python2.7 -c "print 2**65" 36893488147419103232 $ ####### WEIRDNESS BEGINS HERE ######## $ # testing powers of two with Macports pythons $ /opt/local/bin/python2.5 -c "print 2**62" 4611686018427387904 $ /opt/local/bin/python2.5 -c "print 2**63" -9223372036854775808 $ /opt/local/bin/python2.5 -c "print 2**64" 0 $ /opt/local/bin/python2.5 -c "print 2**65" 0 $ /opt/local/bin/python2.7 -c "print 2**62" 4611686018427387904 $ /opt/local/bin/python2.7 -c "print 2**63" -9223372036854775808 $ /opt/local/bin/python2.7 -c "print 2**64" 0 $ /opt/local/bin/python2.7 -c "print 2**65" 0 $ # I have not tested Macports python2.4 or python2.6, but I bet it's the same $ }}} -- -- Ticket URL: <https://trac.macports.org/ticket/32072#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32072: Python: powers of two are screwed up starting at 2**63 -----------------------------------------+---------------------------------- Reporter: singingwolfboy@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: python25 python27 -----------------------------------------+---------------------------------- Changes (by macsforever2000@…): * keywords: python => Comment: I cannot reproduce this issue on python26. {{{ In [2]: 2**62 Out[2]: 4611686018427387904 In [3]: 2**63 Out[3]: 9223372036854775808L In [4]: 2**64 Out[4]: 18446744073709551616L In [5]: 2**65 Out[5]: 36893488147419103232L In [6]: 2**66 Out[6]: 73786976294838206464L In [7]: 2**67 Out[7]: 147573952589676412928L }}} -- Ticket URL: <https://trac.macports.org/ticket/32072#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32072: Python: powers of two are screwed up starting at 2**63 -----------------------------------------+---------------------------------- Reporter: singingwolfboy@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: python25 python27 -----------------------------------------+---------------------------------- Comment(by ryandesign@…): Unable to reproduce issue on Snow Leopard: {{{ $ sw_vers; for v in 4 5 6 7; do port -vq installed python2${v}; for n in 62 63 64 65; do /opt/local/bin/python2.${v} -c "print 2**${n}"; done; done ProductName: Mac OS X ProductVersion: 10.6.8 BuildVersion: 10K549 python24 @2.4.6_9+universal (active) platform='darwin 10' archs='i386 x86_64' 4611686018427387904 9223372036854775808 18446744073709551616 36893488147419103232 python25 @2.5.6_2+universal (active) platform='darwin 10' archs='i386 x86_64' 4611686018427387904 9223372036854775808 18446744073709551616 36893488147419103232 python26 @2.6.7_2+universal (active) platform='darwin 10' archs='i386 x86_64' 4611686018427387904 9223372036854775808 18446744073709551616 36893488147419103232 python27 @2.7.2_2+universal (active) platform='darwin 10' archs='i386 x86_64' 4611686018427387904 9223372036854775808 18446744073709551616 36893488147419103232 }}} -- Ticket URL: <https://trac.macports.org/ticket/32072#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32072: Python: powers of two are screwed up starting at 2**63 -----------------------------------------+---------------------------------- Reporter: singingwolfboy@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: python25 python27 -----------------------------------------+---------------------------------- Comment(by nad@…): See http://bugs.python.org/issue11149. If you are compiling with clang, you'll probably need to back port the fix to add -fwrapv. -- Ticket URL: <https://trac.macports.org/ticket/32072#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32072: Python: powers of two are screwed up starting at 2**63 ------------------------------------------+--------------------------------- Reporter: singingwolfboy@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: duplicate | Keywords: Port: python25 python27 | ------------------------------------------+--------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => duplicate Comment: #30031 -- Ticket URL: <https://trac.macports.org/ticket/32072#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts