certain range comparisons generate incorrect code

Bug #208053 reported by Jacques Frechet
2
Affects Status Importance Assigned to Milestone
Cython
Fix Committed
Undecided
Unassigned

Bug Description

cdef double x = 0.5
print 0 < x <= 5

expected: prints True
observed: prints False

Looks like the generated C code contains a spurious cast to long, which truncates x down to 0, yielding an incorrect result.

I am using Cython 0.9.6.12.

robertwb (robertwb)
Changed in cython:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.