Author: Oscar Cronquist Article last updated on June 02, 2023

How to use the IMLOG2 function 1

The IMLOG2 function calculates the base 2 logarithm of a complex number in x + yi or x + yj text format.

The letter j is used in electrical engineering to distinguish between the imaginary value and the electric current.

Provide an example equation of when the base 2 logarithm is needed with real values ?
This equation can be solved using the base 2 logarithm: 2x=16

becomes

log2(2x) = log2(16)

becomes

x log2(2) = 4

log2(2) = 1

x*1=4

equals

x = 4

What is the difference between the natural logarithm and the base 2 logarithm?
The natural logarithm uses e as the base and the log2 uses 2 as the base.

What is the difference between the IMLOG2 function and the IMLOG10 function?
The IMLOG2 function uses 2 as the base and the IMLOG10 function uses 10 as the base.

1. IMLOG2 Function Syntax

IMLOG2(inumber)

Back to top

2. IMLOG2 Function Arguments

inumber Required. A complex number in x+yi or x+yj text format.

Back to top

3. IMLOG2 function example

How to use the IMLOG2 function 1

The image above demonstrates a formula in cell B28 that calculates the base 2 logarithm of a complex number specified in cell B25.

Cell C28 calculates the real number from the complex number in cell B28. Cell D28 extracts the imaginary number from the complex number specified in cell B28.

The real and imaginary numbers separated in a cell each allow us to graph the complex number on the complex plane.

Formula in cell B28:

=IMLOG2(B25)

The chart above shows the complex plane, the y-axis is the imaginary axis and the x-axis is the real axis.

Complex number 5+5i is the light blue line in the first quadrant. The base 2 logarithm of 5+5i is the green line also in the first quadrant.

3.1 Explaining formula

Step 1 - Populate arguments

IMLOG2(inumber)

becomes

IMLOG2(B25)

Step 2 - Evaluate the IMLOG2 function

IMLOG2(B25)

becomes

IMLOG2("5+5i")

and returns

2.82192809488736+1.1330900354568i

Back to top

4. How to calculate the base 2 logarithm of a complex number in detail?

How to use the IMLOG2 function 1

The base 2 logarithm of a complex number is calculated like this:

C = x + yi

IMLOG2(C) =log2(e)ln(x+yi)

For example, C = 5 + 5i

IMLOG2(C) =log2(e)ln(x+yi) = log2(e)ln(5+5i)

IMLOG2(C) = log2(e)ln(5+5i) = 1.44269504088896*ln(5+5i)

IMLOG2(C) = 1.44269504088896*ln(5+5i) =1.44269504088896*(1.95601150271407+0.785398163397448i)

IMLOG2(C) = 1.44269504088896*(1.95601150271407+0.785398163397448i) = 2.82192809488736+1.1330900354568i

Back to top

5. The IMLOG2 function not working - #NUM error

How to use the IMLOG2 function nt working NUM error

The base 2 logarithm function IMLOG2(x+yi) is not defined for x=0, IMLOG2(0) is not a valid expression.

The IFERROR function can help you handle errors by returning a value of your choice if an error value occurs.

Why is it not possible to calculate the base 10 logarithm of a complex number that has a real part of zero and an imaginary part of 0?

The formula to calculate the base 2 logarithm of a complex number is log10(x+yi)=(log10e)ln(x+yi)

There is no solution to ln(0) which is why the calculation is not possible.

Back to top