diff options
author | Marcus Arendt <[email protected]> | 2015-01-16 14:36:05 +0100 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2015-01-16 14:36:05 +0100 |
commit | 905824012cef106e7bd3796bff36a2aa04b58850 (patch) | |
tree | 6805bd7570965965e29c89e6673095bbd26599e1 /lib/asn1 | |
parent | e52e4398a318293d57485c0a47f9c8e50a4b2b4b (diff) | |
parent | fdf09e81de5e7f1ecfe71f98b56c411073badae8 (diff) | |
download | otp-905824012cef106e7bd3796bff36a2aa04b58850.tar.gz otp-905824012cef106e7bd3796bff36a2aa04b58850.tar.bz2 otp-905824012cef106e7bd3796bff36a2aa04b58850.zip |
Merge branch 'oliv3/math_log2/OTP-12411'
* oliv3/math_log2/OTP-12411:
Add math:log2/1
Diffstat (limited to 'lib/asn1')
-rw-r--r-- | lib/asn1/src/asn1ct_imm.erl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index 4f528b6f95..91820e08de 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -1585,7 +1585,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; _ -> @@ -1598,8 +1598,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; |