We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fc901b commit f440ba4Copy full SHA for f440ba4
tunits/core/cython/frac.pyx
@@ -85,7 +85,7 @@ cpdef frac float_to_twelths_frac(a) except *:
85
86
cdef double d = float(a)
87
cdef long long x = <long long>c_floor(12*d + 0.5)
88
- if 12*d - x > 1e-5:
+ if not (-1e-5 < 12*d - x < 1e-5):
89
print(12*d - x)
90
print(12*d - <long long>(12*d))
91
print(<long long>(12*d), x)
0 commit comments