aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorOlivier Girondel <[email protected]>2015-01-04 04:40:55 +0100
committerMarcus Arendt <[email protected]>2015-01-14 15:58:51 +0100
commitfdf09e81de5e7f1ecfe71f98b56c411073badae8 (patch)
treed6a46aeb887b2b829a01889ed364d943b7ed7536 /lib/asn1/src
parent821d84c5860a9a26185efa19be407796422e3090 (diff)
downloadotp-fdf09e81de5e7f1ecfe71f98b56c411073badae8.tar.gz
otp-fdf09e81de5e7f1ecfe71f98b56c411073badae8.tar.bz2
otp-fdf09e81de5e7f1ecfe71f98b56c411073badae8.zip
Add math:log2/1
Diffstat (limited to 'lib/asn1/src')
-rw-r--r--lib/asn1/src/asn1ct_imm.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl
index bdd14871d1..1e112d6ad3 100644
--- a/lib/asn1/src/asn1ct_imm.erl
+++ b/lib/asn1/src/asn1ct_imm.erl
@@ -1580,7 +1580,7 @@ do_combine_put_bits(_, _, _) ->
throw(impossible).
debit(Budget0, Alternatives) ->
- case Budget0 - log2(Alternatives) of
+ case Budget0 - math:log2(Alternatives) of
Budget when Budget > 0.0 ->
Budget;
_ ->
@@ -1593,8 +1593,6 @@ num_clauses([_|T], N) ->
num_clauses(T, N+1);
num_clauses([], N) -> N.
-log2(N) ->
- math:log(N) / math:log(2.0).
collect_put_bits(Imm) ->
lists:splitwith(fun({put_bits,V,_,_}) when is_integer(V) -> true;