Skip to content

Commit 26a6995

Browse files
add debug statement
1 parent ab157b3 commit 26a6995

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tunits/core/cython/frac.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ cpdef frac float_to_twelths_frac(a) except *:
8585

8686
cdef double d = float(a)
8787
cdef long long x = <long long>c_floor(12*d + 0.5)
88-
cdef double diff = x - 12*d
88+
cdef double diff = x
89+
diff -= 12*d
8990
if max(diff, -diff) > 1e-5:
9091
print('spit')
9192
print('%.20f'%a)

0 commit comments

Comments
 (0)