Skip to content

Commit

Permalink
Use Decimal custom inequality
Browse files Browse the repository at this point in the history
Instead of standard library polymorphic inequality operator.
  • Loading branch information
yawaramin authored May 4, 2023
1 parent a3ebd59 commit f09a1f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module BigNumber = struct
while TOML requires all special float values to be lowercase. *)
let float_to_string x = Decimal.to_string x |> String.lowercase_ascii
let float_of_boolean b = if b then Decimal.one else Decimal.zero
let float_to_boolean x = (x <> Decimal.zero)
let float_to_boolean x = Decimal.(x <> zero)
let float_of_int = Decimal.of_bigint
let int_of_float = Decimal.to_bigint
Expand Down

0 comments on commit f09a1f4

Please sign in to comment.