There's a real bug in Cython. It looks like it's some sort of parsing bug.
Consider the following program:
def Check(P,x):
Q = 2**(1+len(x))*P
R = P
for _ in range(1+len(x)):
R = 2*R
if Q != R:
print "Check: Got it!, Q=",Q," R=",R
else:
print "Ok"
def Check0(P,x):
Q = 2**x*P
R = P
for _ in range(x):
R = 2*R
if Q != R:
print "Check0: Check: Got it!, Q=",Q," R=",R
else:
print "Ok"
def Testit(n,m):
x = m*[0]
Check(1,x)
Check0(1,1+len(x))
Testit(201,100)
when run as a .py program it prints
Ok
Ok
when run as a .pyx program it prints
Check: Got it!, Q=0, R= 2535301200456458802993406410752
Ok
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org