Skip to content

Commit 5412441

Browse files
committed
Negative zero fix
1 parent ff82c2e commit 5412441

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit_common/src/rabbit_numerical.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
%% human-readable output, or compact ASCII serializations for floats.
3131
digits(N) when is_integer(N) ->
3232
integer_to_list(N);
33-
digits(N) when N =:= 0.0 ->
33+
digits(N) when N =:= +0.0 orelse N =:= -0.0 ->
3434
"0.0";
3535
digits(Float) ->
3636
{Frac1, Exp1} = frexp_int(Float),

0 commit comments

Comments
 (0)