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/stdlib/src | |
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/stdlib/src')
-rw-r--r-- | lib/stdlib/src/math.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stdlib/src/math.erl b/lib/stdlib/src/math.erl index 98a70b1644..43f736e54c 100644 --- a/lib/stdlib/src/math.erl +++ b/lib/stdlib/src/math.erl @@ -24,7 +24,7 @@ -export([sin/1, cos/1, tan/1, asin/1, acos/1, atan/1, atan2/2, sinh/1, cosh/1, tanh/1, asinh/1, acosh/1, atanh/1, exp/1, log/1, - log10/1, pow/2, sqrt/1, erf/1, erfc/1]). + log2/1, log10/1, pow/2, sqrt/1, erf/1, erfc/1]). -spec acos(X) -> float() when X :: number(). @@ -92,6 +92,11 @@ exp(_) -> log(_) -> erlang:nif_error(undef). +-spec log2(X) -> float() when + X :: number(). +log2(_) -> + erlang:nif_error(undef). + -spec log10(X) -> float() when X :: number(). log10(_) -> |