Skip to content

Commit

Permalink
bypass: tfloat: more tolarence for float.as_integer_ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
litlighilit committed Sep 29, 2024
1 parent 558821a commit d9c6dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/tfloat.nim
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ suite "float":
var f = rand 1.0
f *= pow(10.0, float rand(2 .. 10))
let (n, d) = f.as_integer_ratio()
check almostEqual(n/d, f)
check almostEqual(n/d, f, unitsInLastPlace=5)

check (0, 1) == float(0.0).as_integer_ratio()
check (5, 2) == float(2.5).as_integer_ratio()
Expand Down

0 comments on commit d9c6dca

Please sign in to comment.