You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When translating Imp to Webassembly, I stumbled upon a small oddity in EJsonRuntimeOperators.v.
Section Evaluation.
...
| EJsonRuntimeCompare =>
apply_binary
(fun d1 d2 =>
match d1, d2 with
| ejnumber n1, ejnumber n2 =>
if float_lt n1 n2
then
Some (ejnumber float_one)
else if float_gt n1 n2
then
Some (ejnumber float_neg_one)
else
Some (ejnumber float_zero)
...
From reading the eval, it seems that EJsonRuntimeCompare a b returns sign(b - a). The usual interpretation is sign(a - b) (ARM, OCaml).
Not sure whether this is worth fixing. It certainly doesn't matter for the verified parts.
The text was updated successfully, but these errors were encountered:
When translating Imp to Webassembly, I stumbled upon a small oddity in
EJsonRuntimeOperators.v
.From reading the eval, it seems that
EJsonRuntimeCompare a b
returns sign(b - a). The usual interpretation is sign(a - b) (ARM, OCaml).Not sure whether this is worth fixing. It certainly doesn't matter for the verified parts.
The text was updated successfully, but these errors were encountered: