Skip to content

Commit

Permalink
Nit it correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Nov 15, 2024
1 parent 43d1139 commit 9e8ea80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tivars/types/real.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ def load_string(self, string: str):
self.load_fraction(Fraction(squash(string)))

def string(self) -> str:
if self.fraction():
return "%d / %d" % self.fraction().as_integer_ratio()
if self.fraction() == 0:
return "0"

else:
return "0"
return "%d / %d" % self.fraction().as_integer_ratio()


class TIRealRadical(RealEntry, register=True):
Expand Down

0 comments on commit 9e8ea80

Please sign in to comment.