Skip to content

Commit 0dca514

Browse files
authored
Update decimal_to_fraction.py
1 parent fff34ed commit 0dca514

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

maths/decimal_to_fraction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def decimal_to_fraction(decimal: float | str) -> tuple[int, int]:
3434
if remainder == 0:
3535
break
3636
dividend, divisor = divisor, remainder
37-
numerator, denominator = numerator / divisor, denominator / divisor
37+
numerator, denominator = numerator // divisor, denominator / divisor
3838
return int(numerator), int(denominator)
3939

4040

0 commit comments

Comments
 (0)