Engineering functions

IMLOG2

Matches all 1,212 recorded answers

Recorded: 1,209 in the answer bank and 3 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicIMLOG2
BulgarianIMLOG2
CzechIMLOG2
DanishIMAGLOG2
GermanIMLOG2
GreekIMLOG2
English (Australia)IMLOG2
English (United Kingdom)IMLOG2
English (United States)IMLOG2
SpanishIM.LOG2
EstonianIMLOG2
FinnishKOMPLEKSI.LOG2
FrenchCOMPLEXE.LOG2
HebrewIMLOG2
CroatianIMLOG2
HungarianKÉPZ.LOG2
IndonesianIMLOG2
ItalianIMLOG2
JapaneseIMLOG2
KoreanIMLOG2
LithuanianIMLOG2
LatvianIMLOG2
NorwegianIMLOG2
DutchC.LOG2
PolishLOG2.LICZBY.ZESP
Portuguese (Brazil)IMLOG2
Portuguese (Portugal)IMLOG2
RomanianIMLOG2
RussianМНИМ.LOG2
SlovakIMLOG2
SlovenianIMLOG2
Serbian (Latin)IMLOG2
SwedishIMLOG2
ThaiIMLOG2
TurkishSANLOG2 işlevi
UkrainianIMLOG2
VietnameseIMLOG2
Chinese (Simplified)IMLOG2
Chinese (Hong Kong)IMLOG2
Chinese (Traditional)IMLOG2

Names from Microsoft's support site.

What it does

IMLOG2(inumber)

IMLOG2(inumber) returns the principal base-two logarithm of a nonzero complex value. The real component describes magnitude and the imaginary component describes angle.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=IMLOG2("i") gives about "2.2661800709136i". Its real component is zero and the imaginary component is (pi/2)/ln(2). =IMLOG2("8") is approximately text three.

Quirks

Complex arguments may be real numbers or text such as "2-3i". Use lowercase i or j; operands in one call must agree on the suffix. The current parser rejects malformed complex text with #NUM! and logical values with #VALUE!. A complex result is text, so ordinary worksheet arithmetic does not automatically treat it as a pair of numeric components. Zero has no finite logarithm and the current kernel gives #NUM!. Principal angles create a branch cut on the negative real axis; a real-valued LOG call cannot replace this function.

How to implement

Parse the two coefficients and suffix before doing arithmetic; use the common complex formatter afterward. Retain suffix consistency, suppress a zero component and omit the coefficient one before the imaginary unit. Formatting and parsing have their own fifteen-significant-digit rules, so testing only the algebra misses observable behaviour.

Compute a scaled modulus h=hypot(a,b) and principal angle theta=atan2(b,a). Reject h=0. Form the natural-log pair (ln(h),theta). Divide both components by the runtime natural logarithm of two. For non-real input the current code uses runtime log and atan2 leaves. On the real axis its real component instead uses the measured public LN of the absolute input multiplied with stored x87 arithmetic by the binary64 constant 0x3ff71547652b82ff. The imaginary coefficient still uses the runtime phase and base logarithm. This mathematical composition does not identify all their rounding stages in Excel. In particular, preserve negative-real and signed-zero boundary tests rather than assuming that every logarithm wrapper shares IMARGUMENT’s ratio route.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

IMLOG2 · 16 lines · calc-func/src/catalogue/engineering.rs on GitHub
44 imlog2 "IMLOG2" (1, 1) [V "inumber"] |s, a, sv| {
    unary_complex(s, a, |z| {
        let ln = z.ln()?;
        let re = if z.im == 0.0 {
            // Fn11's exact coefficient-bin bounds uniquely determine this binary64
            // LN multiplier; independent normal and signed controls retain it.
            crate::ported::excel_numeric::excel_x87_mul(
                crate::ported::excel_numeric::excel_log(z.re.abs()),
                f64::from_bits(0x3ff7_1547_652b_82ff),
            )
        } else {
            ln.re / crt_log(2.0)
        };
        Ok(ParsedComplex::new(re, ln.im / crt_log(2.0), None))
    })
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1,209

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,209 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

IMEXP is the exponential companion; IMABS and IMARGUMENT expose the polar ingredients.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents