Contact

IMLOG2 in ONLYOFFICE: Base-2 complex logarithm with Examples

Engineering Intermediate ONLYOFFICE Spreadsheet Editor

Learn IMLOG2 in ONLYOFFICE Spreadsheet Editor with official syntax, a reproducible complex-number worksheet, checked mathematical examples, troubleshooting and compatibility cautions.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked

Quick answer: IMLOG2 returns the logarithm of a complex number to base 2. The official ONLYOFFICE reference documents the formula =IMLOG2(inumber). This article describes mathematical expectations, not results obtained from the ONLYOFFICE application.

Verification: Examples are independently calculated mathematical expectations. Native ONLYOFFICE Desktop and Docs web execution was not performed.

Exact syntax, arguments, types and defaults

=IMLOG2(inumber)
Argument Required? Meaning and type Default
inumber Required Complex number expressed in x + yi or x + yj form No default

All arguments shown above are required; the official function page does not describe optional parameters or assumed defaults. inumber is a complex number of the form x+yi or x+yj; the suffix i/j is a lowercase complex unit. Build inputs with COMPLEX(real_num,i_num,[suffix]) rather than typing nonnumeric text into real/imaginary input cells. COMPLEX assumes i if suffix is omitted. The optional square brackets in its documentation mean optional, not literal characters.

ONLYOFFICE documents manual entry with a leading = and comma-separated arguments in its Insert functions instructions. These examples use English names and comma separators; check actual regional settings before copying the formulas into localized environments. The exact tokenized spelling of localized functions and separators has not been tested.

Step-by-step reproducible worksheet

  1. Open a new empty spreadsheet in ONLYOFFICE Spreadsheet Editor. Type the headings Scenario, Real, Imaginary, Unit, Exponent, Complex value, Result in cells A1:G1 respectively.
  2. Enter the data below into A2:E11. Enter real and imaginary coefficients as numbers, not strings. In C10, enter the actual formula =PI()/2 so that row 10 is reproducible to spreadsheet precision.
  3. Type =COMPLEX(B2,C2,D2) in F2 and fill down through F11. F2 is mathematically 3+4i; the exact text serialization may omit zero terms or unit coefficients.
  4. Type the formula indicated below in G2 and fill it down through G11. The examples use the input suffix for notation only; native suffix propagation and output formatting remain unverified.
  5. Compare results to the mathematical expectations below. A small numerical difference from a decimal approximation can come from floating-point precision, complex-number branch handling or output formatting. Do not claim that the test passed natively until somebody runs it in the target edition.
Row Scenario B: real C: imaginary D: suffix E: power Mathematical complex input
2 Impedance 3 4 i 2 3+4i
3 Real unity 1 0 i 3 1
4 Quarter-turn 0 1 i 4 1i
5 Negative real -1 0 i 3 -1
6 Quadrant II -2 3 i 2 -2+3i
7 Electrical notation 0 -2 j -1 -2j
8 Mixed signs 2 -1 j 2 2-1j
9 Zero input 0 0 i -1 0
10 Half-pi angle 0 =PI()/2 i 2 1.5707963268i
11 Real four 4 0 i 0 4

For G2, enter =IMLOG2(F2). Fill down to G11. Row 9 is a deliberate zero-input edge case; it is not a successful logarithm or negative-power calculation.

Expected mathematical outputs (independent calculations)

Row Enter in column G Mathematical expected result Calculation context
2 =IMLOG2(F2) 2.3219280949+1.3378042125i principal mathematical value, not a confirmed editor output
3 =IMLOG2(F3) 0 principal mathematical value, not a confirmed editor output
4 =IMLOG2(F4) 2.2661800709i principal mathematical value, not a confirmed editor output
5 =IMLOG2(F5) 4.5323601418i principal mathematical value, not a confirmed editor output
6 =IMLOG2(F6) 1.8502198591+3.1144885111i principal mathematical value, not a confirmed editor output
7 =IMLOG2(F7) 1-2.2661800709j principal mathematical value, not a confirmed editor output
8 =IMLOG2(F8) 1.1609640474-0.6689021062j principal mathematical value, not a confirmed editor output
9 =IMLOG2(F9) mathematically undefined (no claimed editor error) no finite complex logarithm / power; native response unknown
10 =IMLOG2(F10) 0.6514961295+2.2661800709i principal mathematical value, not a confirmed editor output
11 =IMLOG2(F11) 2 principal mathematical value, not a confirmed editor output

Verification method: two independent Python numeric pathways (cmath double-precision and mpmath 65-digit complex arithmetic) agreed within the declared relative/absolute tolerance for every defined example. This checks algebra, not the spreadsheet engine, its display text, exact error messages or formula parser.

Why it works: mathematical explanation

The mathematical principal complex base-2 logarithm scales both the logarithm of the magnitude and the phase by ln(2). The official brief function help does not document branch-cut edge cases.

For nonzero z=a+bi, compute r=sqrt(a²+b²) and θ=atan2(b,a) radians. The expected principal result is (ln(r)+iθ)/ln(2).

For 3+4i, magnitude 5 and angle atan2(4,3) lead to log2(5)+i·atan2(4,3)/ln(2). Do not take the binary logarithms of real and imaginary parts separately.

The equations describe the mathematical operation normally associated with this function. They are not proof of native ONLYOFFICE behaviour at a branch cut or near machine-precision limits. The official vendor reference describes the function purpose and basic syntax but omits some branch/error details.

Advanced use and proposed formula checks

The following proposed checks show logarithm-base relationships and sign behaviour; expected values are independent principal-value mathematics.

Formula to enter in an unused cell Independently expected mathematical result Why it matters
=IMLOG2(COMPLEX(1,0,"i")) 0 Base-2 logarithm of unity.
=IMLOG2(COMPLEX(2,0,"i")) 1 Base-2 logarithm equals one.
=IMLOG2(COMPLEX(8,0,"i")) 3 Base-2 logarithm equals three.
=IMLOG2(COMPLEX(0,1,"i")) 2.2661800709i Phase divided by ln(2).
=IMLOG2(COMPLEX(-1,0,"i")) 4.5323601418i Principal negative-real branch awaiting native testing.
=IMLOG2(COMPLEX(3,4,"i")) 2.3219280949+1.3378042125i Real part log2(5), not log2(3).
=IMLOG2(F9) mathematically undefined (no claimed editor error) Zero input: mathematically undefined.
=IMLOG2(F2) 2.3219280949+1.3378042125i Compare using complex division: =IMDIV(IMLN(F2),COMPLEX(LN(2),0)).

Advanced application and practical interpretation

A complex base-2 logarithm generalizes binary magnitude scaling to inputs with phase. Its imaginary term is an angle rescaled by ln(2), not a count of data bits.

Compare two ways without overstating what is tested

To inspect a complex output numerically, place =IMREAL(G2) and =IMAGINARY(G2) in blank cells. Their official real-component and imaginary-component references describe the operations. Comparing numeric components avoids making assumptions about whether the editor prints i, 1i, j, extra zeros or rounded decimals. This is a recommended future native test, not an executed verification.

Errors, limits and troubleshooting

Input format: A typical input such as 3+4i should be constructed with =COMPLEX(3,4,"i"). 3+4i volts, a mixed i/j string, unquoted suffix arguments and a typed formula lacking = are not shown as valid inputs by the vendor. A cell that visually looks numeric may contain text.

Domain and precision: Logarithm at zero is undefined. For a negative real, a mathematical principal complex logarithm has a nonzero phase component, requiring careful interpretation and native verification.

Boundary caution: First-supported application release, locale-specific output formatting, exact zero error and phase branch at the negative real axis remain unverified.

Troubleshooting checklist:

  1. Confirm the real and imaginary components in B and C are numeric and that D contains the lowercase unit i or j.
  2. Use the Insert Function window to confirm the target installation recognizes the exact English function name.
  3. Check the parentheses, leading =, comma separators and argument order. Test the single-cell literal formula from the advanced table before dragging down a column.
  4. If a result differs from the expected mathematical value, inspect the real and imaginary components separately and compare with a reasonable decimal tolerance.
  5. For zero-input, negative-real branch-cut, fractional exponent, large-magnitude and regional settings cases, record what the actual target build does. No #NUM!, #VALUE! or other exact error is claimed without an observed native test.
  6. If recalculation is stale, ONLYOFFICE documents the Calculation control on the Formula tab and F9 for workbook recalculation in its Insert Functions guide; inspect the build-specific UI before assuming identical keyboard shortcuts across systems.

ONLYOFFICE editions and historical versions

The current unversioned ONLYOFFICE Docs Spreadsheet Editor Help Center lists this function and describes its syntax. This is vendor-documentation evidence, not a tested claim that every Docs server, hosted web editor, Desktop Editors version, mobile build or locale supports it. The Docs changelog and the separate Desktop Editors changelog were consulted on 2026-10-13 (UTC), but the inspected material did not establish an attributable first supported release for this function. Therefore minimum Docs/Desktop version: unknown.

Export/import and Excel or Google Sheets compatibility are not established by the ONLYOFFICE help page. Another spreadsheet’s formula behaviour, rounding, error messages or complex-number branch choice cannot serve as ONLYOFFICE execution evidence. Verify in each target application and format before migrating a workbook.

Official references and dated claim-level evidence

Claim Evidentiary basis Checked
Function name, purpose, English syntax and argument descriptions Official IMLOG2 reference 2026-10-13 (UTC)
COMPLEX construction and lowercase i/j suffix, default i COMPLEX reference 2026-10-13 (UTC)
Formula entry with = and commas, access via Formula tab Insert functions 2026-10-13 (UTC)
Current Docs versus Desktop release histories are distinct; first supported version not established Docs changelog, Desktop changelog 2026-10-13 (UTC)
Expected mathematical values (including principal-branch assumptions) cmath and 65-digit mpmath independent calculations 2026-10-13 (UTC)
Native application execution, localized syntax, exact error codes and historical version matrix Not tested / not established Not applicable