Log2
Log2[x]
gives the base-2 logarithm of x.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- Log2 gives exact integer or rational number results when possible.
- For certain special arguments, Log2 automatically evaluates to exact values.
- Log2 can be evaluated to arbitrary numerical precision.
- Log2 automatically threads over lists.
Examples
open allclose allBasic Examples (5)
Log2 gives the logarithm to base 2:
Plot over a subset of the reals:
Plot over a subset of the complexes:
Scope (43)
Numerical Evaluation (7)
The precision of the output tracks the precision of the input:
Evaluate efficiently at high precision:
Log2 can deal with real‐valued intervals:
Compute average-case statistical intervals using Around:
Compute the elementwise values of an array:
Or compute the matrix Log2 function using MatrixFunction:
Specific Values (6)
Visualization (3)
Function Properties (10)
Log2 is defined for all positive values:
Log2 is defined for all nonzero complex values:
Function range of Log2:
Log2 is not an analytic function:
Log2 has a branch cut along the negative real axis:
Log2 is monotonic on the positive reals:
Log2 is injective:
Log2 is surjective:
Log2 is neither non-negative nor non-positive:
Log2 has both singularities and discontinuities for x≤0:
Log2 is concave on the positive reals:
TraditionalForm formatting:
Differentiation (3)
Integration (3)
Series Expansions (5)
Find the Taylor expansion using Series:
Plots of the first three approximations around :
General term in the series expansion using SeriesCoefficient:
Asymptotic expansions at the branch cut:
Log2 can be applied to power series:
Function Identities and Simplifications (6)
Basic identity for Log2:
Logarithm of a power function simplification:
Applications (5)
Worst-case complexity of merge sort algorithm from its functional equation:
Best-case complexity of merge sort algorithm:
Bubble sort is asymptotically worse than merge sort:
Find the age of a sample in units of its half-life time:
Compute the number of bits needed to store a large integer:
Find the number of rounds for a single tournament, with two players or teams, to determine a winner. For that, you can determine how many times 2 can be multiplied by itself to get a number equal to or greater than the total number of participants/teams.
For example, a tournament of 4 players requires 2 rounds to determine the winner, while a tournament of 32 teams requires 5 rounds. To calculate, use Log2:
Text
Wolfram Research (2008), Log2, Wolfram Language function, https://reference.wolfram.com/language/ref/Log2.html.
CMS
Wolfram Language. 2008. "Log2." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Log2.html.
APA
Wolfram Language. (2008). Log2. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Log2.html