Skip to content

Commit f440ba4

Browse files
add debug
1 parent 3fc901b commit f440ba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tunits/core/cython/frac.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ 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-
if 12*d - x > 1e-5:
88+
if not (-1e-5 < 12*d - x < 1e-5):
8989
print(12*d - x)
9090
print(12*d - <long long>(12*d))
9191
print(<long long>(12*d), x)

0 commit comments

Comments
 (0)