[MacPorts] #32072: Python: powers of two are screwed up starting at 2**63

MacPorts noreply at macports.org
Tue Nov 15 07:15:17 PST 2011


#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


More information about the macports-tickets mailing list