Describe the bug
On the following code:
-module(jit13564).
-compile([export_all]).
f(0) ->
-f(ok);
f(_) ->
0 / 18446744073709551615.
wrapper0() ->
io:write(f(0)).
Running it with cerl -emu_flavor emu -noshell -pa . -s jit13564 wrapper0 -s init stop results in -0.0 (which seems correct to me).
But running it with cerl -emu_flavor jit -noshell -pa . -s jit13564 wrapper0 -s init stop results in 0.0.
Expected behavior
I'd expect to get the same result from arithmetic operations regardless of whether the JIT is active or not.
Affected versions
Additional context
Replacing f by
f(0) ->
f(ok);
f(_) ->
- (0 / 18446744073709551615).
makes the program return -0.0 in both emu and jit flavors.