{
  "category": "Engineering functions",
  "display_name": "IMLOG2",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.IMLOG2",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1209,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1209,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,209 in the answer bank and 3 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,212 recorded answers",
    "workbook_corpus": {
      "cells": 3,
      "matched": 3
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/engineering.rs#L213-L228"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/engineering::complex_of",
        "catalogue/engineering::complex_text",
        "catalogue/engineering::unary_complex",
        "ported/complex_decimal::nearest_even",
        "ported/complex_decimal::decimal_pair",
        "ported/complex_family::parse_ascii_decimal_15",
        "ported/complex_family::ParsedComplex::new",
        "ported/complex_family::ParsedComplex::abs",
        "ported/complex_family::normalize_zero",
        "ported/complex_family::number_to_excel_text",
        "ported/complex_family::format_complex_text",
        "ported/complex_family::parse_real_number",
        "ported/complex_family::find_real_imag_split",
        "ported/complex_family::parse_imag_coeff",
        "ported/complex_family::parse_complex_text",
        "ported/complex_family::suffix_from_operands",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric/x87::mul"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/engineering.rs#L213-L228",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,212 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.IMLOG2.json",
  "name": "IMLOG2",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[IMEXP](FUNC.IMEXP.md) is the exponential companion; [IMABS](FUNC.IMABS.md) and [IMARGUMENT](FUNC.IMARGUMENT.md) expose the polar ingredients.\n\n\n",
    "how-to-implement": "\nParse 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.\n\nCompute 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.\n\n\n",
    "quirks": "\nComplex 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.\n\n\n",
    "sources": "\n- [Microsoft: IMLOG2 function](https://support.microsoft.com/en-us/office/imlog2-function-152e13b4-bc79-486c-a243-e6a676878c51), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/complex_family.rs); implementation steps and the limits identified in the text.\n\n- [Real-axis wrapper](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/catalogue/engineering.rs).\n\n",
    "try-it": "\n`=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.\n\n\n",
    "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.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 1,209 |\n\nThe 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.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.IMLOG2.json).",
    "what-it-does": "\n`IMLOG2(inumber)` returns the principal base-two logarithm of a nonzero complex value. The real component describes magnitude and the imaginary component describes angle.\n\n\n"
  },
  "signature": {
    "display": "IMLOG2(inumber)",
    "parameters": [
      {
        "description": null,
        "name": "inumber",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Engineering functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "None",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Base-2 logarithm of a complex number",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the base-2 logarithm of a complex number",
        "microsoft_url": "https://support.microsoft.com/en-us/office/imlog2-function-152e13b4-bc79-486c-a243-e6a676878c51"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "IMLOG2"
        },
        {
          "locale": "bg-BG",
          "name": "IMLOG2"
        },
        {
          "locale": "cs-CZ",
          "name": "IMLOG2"
        },
        {
          "locale": "da-DK",
          "name": "IMAGLOG2"
        },
        {
          "locale": "de-DE",
          "name": "IMLOG2"
        },
        {
          "locale": "el-GR",
          "name": "IMLOG2"
        },
        {
          "locale": "en-AU",
          "name": "IMLOG2"
        },
        {
          "locale": "en-GB",
          "name": "IMLOG2"
        },
        {
          "locale": "en-US",
          "name": "IMLOG2"
        },
        {
          "locale": "es-ES",
          "name": "IM.LOG2"
        },
        {
          "locale": "et-EE",
          "name": "IMLOG2"
        },
        {
          "locale": "fi-FI",
          "name": "KOMPLEKSI.LOG2"
        },
        {
          "locale": "fr-FR",
          "name": "COMPLEXE.LOG2*"
        },
        {
          "locale": "he-IL",
          "name": "IMLOG2"
        },
        {
          "locale": "hr-HR",
          "name": "IMLOG2"
        },
        {
          "locale": "hu-HU",
          "name": "KÉPZ.LOG2"
        },
        {
          "locale": "id-ID",
          "name": "IMLOG2"
        },
        {
          "locale": "it-IT",
          "name": "IMLOG2"
        },
        {
          "locale": "ja-JP",
          "name": "IMLOG2"
        },
        {
          "locale": "ko-KR",
          "name": "IMLOG2"
        },
        {
          "locale": "lt-LT",
          "name": "IMLOG2"
        },
        {
          "locale": "lv-LV",
          "name": "IMLOG2"
        },
        {
          "locale": "nb-NO",
          "name": "IMLOG2"
        },
        {
          "locale": "nl-NL",
          "name": "C.LOG2"
        },
        {
          "locale": "pl-PL",
          "name": "LOG2.LICZBY.ZESP"
        },
        {
          "locale": "pt-BR",
          "name": "IMLOG2"
        },
        {
          "locale": "pt-PT",
          "name": "IMLOG2"
        },
        {
          "locale": "ro-RO",
          "name": "IMLOG2"
        },
        {
          "locale": "ru-RU",
          "name": "МНИМ.LOG2"
        },
        {
          "locale": "sk-SK",
          "name": "IMLOG2"
        },
        {
          "locale": "sl-SI",
          "name": "IMLOG2"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "IMLOG2"
        },
        {
          "locale": "sv-SE",
          "name": "IMLOG2"
        },
        {
          "locale": "th-TH",
          "name": "IMLOG2"
        },
        {
          "locale": "tr-TR",
          "name": "SANLOG2 işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "IMLOG2"
        },
        {
          "locale": "vi-VN",
          "name": "IMLOG2"
        },
        {
          "locale": "zh-CN",
          "name": "IMLOG2"
        },
        {
          "locale": "zh-HK",
          "name": "IMLOG2"
        },
        {
          "locale": "zh-TW",
          "name": "IMLOG2"
        }
      ],
      "signature": {
        "display": "IMLOG2(inumber)",
        "parameters": [
          {
            "description": null,
            "name": "inumber",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "IMLOG2",
      "version_marker": null,
      "xlcall": {
        "code": "402",
        "symbol": "xlfImlog2"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/imlog2-function-152e13b4-bc79-486c-a243-e6a676878c51"
  },
  "try_it": {
    "formula": "=IMLOG2(\"i\")"
  },
  "url": "https://handbook.dnacalc.com/functions/IMLOG2.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "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.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.IMLOG2.json"
      ]
    }
  ]
}