(v: float)
| 48 | |
| 49 | |
| 50 | def get_quotient(v: float) -> tuple[int, int]: |
| 51 | n = v |
| 52 | d = 1 |
| 53 | while abs(n - round(n)) > TOL: |
| 54 | d += 1 |
| 55 | n += v |
| 56 | if d > MAX_DENOMINATOR: |
| 57 | e = InfQuotientError(v) |
| 58 | raise e |
| 59 | |
| 60 | n = int(round(n)) |
| 61 | return simplify(n, d) |
| 62 | |
| 63 | |
| 64 | def fix_v(v: float) -> float: |
no test coverage detected