Skip to content

Commit 41c787e

Browse files
Update decimal_to_fraction.py
1 parent 0dca514 commit 41c787e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

maths/decimal_to_fraction.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ 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
38-
return int(numerator), int(denominator)
37+
numerator, denominator = numerator // divisor, denominator // divisor
38+
return numerator, denominator
3939

4040

4141
if __name__ == "__main__":

0 commit comments

Comments
 (0)