Skip to content

Commit ded9441

Browse files
committed
0.0 doesn't require special handling
Without this change, our tests against OTP master started failing since the negative zero change was introduced, for example: https://github.com/rabbitmq/rabbitmq-server/actions/runs/6141080013/job/16660857916 The warning (treated as error) is: ``` rabbit_numerical.erl:33:8: matching on the float 0.0 will no longer also match -0.0 in OTP 27. If you specifically intend to match 0.0 alone, write +0.0 instead. ```
1 parent 9acdda1 commit ded9441

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

deps/rabbit_common/src/rabbit_numerical.erl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
%% human-readable output, or compact ASCII serializations for floats.
3131
digits(N) when is_integer(N) ->
3232
integer_to_list(N);
33-
digits(0.0) ->
34-
"0.0";
3533
digits(Float) ->
3634
{Frac1, Exp1} = frexp_int(Float),
3735
[Place0 | Digits0] = digits1(Float, Exp1, Frac1),

0 commit comments

Comments
 (0)