Negative zero fix

This commit is contained in:
Michal Kuratczyk 2023-09-13 12:56:44 +02:00 committed by Michael Klishin
parent 47e1ffdfa7
commit 0f8689be9a
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@
%% human-readable output, or compact ASCII serializations for floats.
digits(N) when is_integer(N) ->
integer_to_list(N);
digits(N) when N =:= 0.0 ->
digits(N) when N =:= +0.0 orelse N =:= -0.0 ->
"0.0";
digits(Float) ->
{Frac1, Exp1} = frexp_int(Float),