FStarLang/FStar

Floating point literals are badly handled by the F# extraction mechanism

Open

#793 geöffnet am 23. Dez. 2016

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)F* (258 Forks)auto 404
area/fsharp-vs-ocamlcomponent/buildcomponent/extractiongood first issuekind/bug

Repository-Metriken

Stars
 (3.068 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Using literal floating point in some meant-to-be-extracted file like the F* compiler can produce bad results when extracting with the F# version of the F* compiler (seems to be fine with the ocaml version). For example 1.0 is extracted to 1 and 0.99 to 0,99 which are no longer of the same type. A temporary solution is to use float_of_string "1.0" but I would be rather surprised if there is no better way to do that in F#.

Contributor Guide