IMLOG2 Function (Gnumeric)
Learn the IMLOG2 function in Gnumeric: Returns the base-2 logarithm of a complex number.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked
Evidence: Formula values are independently calculated mathematical expectations. Official Gnumeric 1.12.62 source and documentation were reviewed on 13 October 2026; no native execution or application screenshots were produced.
Availability and versions: The function appears in Gnumeric’s official Complex manual and function catalogue, which labels its implementation Complete with Exhaustive upstream tests. That is a catalogue classification, not an execution test of the examples on this page. Gnumeric announced version 1.12.62 with improvements to complex-function compatibility; the specific release binaries/source were not executed in this review. The project directs Linux/BSD users to distribution packages and says it does not currently distribute Windows binaries. Sources: function catalogue; 1.12.62 notes; download/platform policy (checked 2026-10-13).
Quick answer
IMLOG2(z) calculates the principal base-2 complex logarithm: logâ‚‚(z) = ln(z) / ln(2). It is not a function for converting a number into binary digits. For =IMLOG2("3+4i"), the independently calculated expectation is 2.3219280949+1.3378042125i. Gnumeric lists IMLOG2(z) in its Complex manual and classifies the implementation Complete / Exhaustive in the function catalogue. Manual; catalogue, checked 2026-10-13.
Exact syntax and argument definitions
=IMLOG2(z)
z (required): a valid complex-number value represented by an i/j suffixed text literal, a cell reference containing one, or a constructed COMPLEX value. There are no optional parameters or defaults. The base is fixed at 2, which must not be confused with a second argument. For real positive z, the mathematical imaginary coefficient is zero, but a Gnumeric complex result’s display/underlying value representation needs validation rather than an assumption that it becomes an ordinary number. Official manual, checked 2026-10-13.
Reproducible formulas and expected results
| Formula | Independently calculated expectation | Check |
|---|---|---|
=IMLOG2(A2) |
2.3219280949+1.3378042125i |
` |
=IMLOG2("1+i") |
0.5000000000+1.1330900355i |
Phase scaled by 1/ln(2) |
=IMLOG2("2-1i") |
1.1609640474-0.6689021062i |
Negative imaginary component |
=IMLOG2("0+1i") |
0+2.2661800709i |
Unit magnitude, phase π/(2 ln 2) |
=IMLOG2("8+0i") |
3 (mathematical value) |
Power of 2 |
=IMLOG2(COMPLEX(B2,C2)) |
Same components as IMLOG2(A2) |
Use numeric input columns |
The decimal results come from independent Python calculations and are rounded; they are not Gnumeric-native observations. A cell’s displayed representation may omit zero components or use different precision.
Advanced example: checking a transformed phasor
For A2 = 3+4i, calculate =IMREAL(IMLOG2(A2)): mathematically ln(5)/ln(2) ≈ 2.3219280949. The independent check =LN(IMABS(A2))/LN(2) gives the same mathematical real coefficient, provided Gnumeric parses A2 as intended. Its imaginary coefficient is =IMAGINARY(IMLOG2(A2)) with expected 0.9272952180/ln(2) ≈ 1.3378042125. A further identity is IMLOG2(z) * ln(2) = IMLN(z) on a consistent principal branch. Because complex-number outputs may be formatted text, use component extraction (IMREAL, IMAGINARY) and numeric multiplication for your comparison rather than multiplying unparsed strings.
If you are interpreting digital signal measurements, this is useful for expressing a complex magnitude in base-2 logarithmic units. Do not call this an ordinary bit count or treat a complex phase as a frequency without a separate model.
Related guides: IMLN, IMLOG10, IMABS, IMREAL. Gnumeric manual, checked 2026-10-13.
Zero and branch limitation: No finite logarithm exists for z=0; exact Gnumeric error output was not observed. Complex principal logarithms have a branch cut, so values with phases near ±π can differ discontinuously in the imaginary coefficient. Overflow, underflow and rounding depend on installation and should be tested for boundary inputs.
Build a reproducible worksheet
Create a blank Gnumeric sheet. Enter these complex-number text literals without a leading = in column A. Use plain English-formatted samples with a period as decimal separator; inspect your locale’s input conventions before adapting them.
| Cell | Enter as text | Purpose |
|---|---|---|
| A2 | 3+4i |
Nonzero magnitude and positive phase |
| A3 | 1+i |
45° phase, useful for checking imaginary coefficient |
| A4 | 2-1i |
Negative imaginary coefficient |
| A5 | 0+1i |
Imaginary-axis input |
| A6 | 0+0i |
Zero, used only to discuss the domain and errors |
| B2 | 3 (numeric) |
Real component for a constructed input |
| C2 | 4 (numeric) |
Imaginary component for a constructed input |
Enter the article’s function formula in D2 and copy to rows 3–5 if desired. For a constructed input, enter =COMPLEX(B2,C2) in D7 and use the article’s function around D7. COMPLEX’s manual signature is COMPLEX(x,y,i) with the suffix defaulting to i. The comma shown follows the English-language Gnumeric manual; locales may change separators and decimal conventions. This article does not claim to have tested other locale syntaxes. Sources: COMPLEX documentation; locale documentation (checked 2026-10-13).
Errors, limitations, and troubleshooting
- Unparseable text: The online Gnumeric 1.12 manual says
#VALUE!for invalid complex input. The checksum-verified official 1.12.62 source returns#NUM!for malformed complex strings; other unsupported value types may yield#VALUE!. This resolves the release-source provenance question, but is not a native execution result. - Quoted numeric-looking strings: Ensure your input contains a valid complex representation (
"3+4i"or"2-1i"), not a stray unit, spreadsheet formula, or text with thousands separators. Thei/jconvention belongs inside the complex text; do not append it to an ordinaryLN/LOGresult. - Locale/import: Formula syntax and text parsing can vary with decimal separators. The one-argument function signature stays one argument, but nested
COMPLEX(B2,C2)uses a delimiter that your localized installation may represent differently. Test an imported worksheet rather than silently replacing commas with semicolons; consult Gnumeric locale documentation. - Precision and formatting: Calculated complex results are floating-point approximations; displayed digits, placement of
iorj, and very small residual coefficients can vary. For verification compare real and imaginary components numerically (e.g.IMREAL/IMAGINARY) rather than comparing raw strings. - Compatibility: The manual marks this function Excel compatible, but this is Gnumeric’s documented classification. It does not establish identical parsing, error codes, version support, formatting, or calculations in another spreadsheet. Confirm a workbook separately in each target product.
- Testing boundary: All expected values on this page were independently derived using Python’s standard
cmath/mathmodules and analytic identities. Native Gnumeric checks: 0. Errors described as unresolved are deliberately not disguised as tested results.
Claim-level official references (checked 2026-10-13)
- Gnumeric Complex manual — signature, purpose, input note, compatibility and principal branch where stated.
- Official function catalogue — IMLOG2: Complete / Exhaustive (upstream catalogue status, not observed execution).
- Gnumeric 1.12.62 release announcement — general complex-function compatibility improvements, not a claim of per-example native testing.
- Official Gnumeric 1.12.62 source archive — inspected complex callbacks and shared parser in plugins/fn-complex/functions.c; release archive checked against its official SHA-256 checksum.
- Gnumeric download policy and locale documentation — platform availability and locale caveats.
Native validation remains outstanding: exact displayed results, error cells, locale behavior and workbook round-trips have not been checked in a running Gnumeric installation.