We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f56fb4 commit 1e6c6f5Copy full SHA for 1e6c6f5
tunits/core/cython/frac.pyx
@@ -87,8 +87,7 @@ cpdef frac float_to_twelths_frac(a) except *:
87
cdef double raised_d = 12.0*d
88
cdef long long x = <long long>c_floor(raised_d + 0.5)
89
if not (-1e-5 < raised_d - x < 1e-5):
90
- print(raised_d, x, <long long>(raised_d))
91
- raise ValueError("Not a twelfth.")
+ raise ValueError(f"{a} with 12*a={raised_d} Not a twelfth.")
92
return frac_least_terms(x, 12)
93
94
0 commit comments