Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
(fix) toString in REPL for floats without number after decimal point
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Mar 19, 2019
1 parent 4b97cdf commit 5030e95
Show file tree
Hide file tree
Showing 4 changed files with 7,540 additions and 7,508 deletions.
5 changes: 5 additions & 0 deletions extraction/src/Util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ let qcert_string_of_float f =
if (float_of_string ocaml_string1 = float_of_string ocaml_string2)
then ocaml_string2 else ocaml_string1
in
let ocaml_string =
match String.index_opt ocaml_string '.', String.index_opt ocaml_string 'e' with
| None, None -> ocaml_string ^ "."
| _, _ -> ocaml_string
in
let last_char = ocaml_string.[(String.length ocaml_string)-1] in
begin match last_char with
| '.' -> ocaml_string ^ "0"
Expand Down
5,095 changes: 2,552 additions & 2,543 deletions packages/ergo-cli/extracted/ergoccore.js

Large diffs are not rendered by default.

4,671 changes: 2,340 additions & 2,331 deletions packages/ergo-cli/extracted/ergotopcore.js

Large diffs are not rendered by default.

5,277 changes: 2,643 additions & 2,634 deletions packages/ergo-compiler/extracted/compilercore.js

Large diffs are not rendered by default.

0 comments on commit 5030e95

Please sign in to comment.