{
  "category": "Operators",
  "display_name": "Exponentiation (^)",
  "entry_kind": "built_in_operator",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.OP_POWER",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 42 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 42 recorded answers",
    "workbook_corpus": {
      "cells": 42,
      "matched": 42,
      "worst_ulp": 0
    }
  },
  "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/arithmetic.rs#L42-L42",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/arithmetic.rs#L83-L89"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/arithmetic::power_value",
        "catalogue/arithmetic::operands",
        "catalogue/arithmetic::raise",
        "catalogue/arithmetic::power_algorithm",
        "ported/excel_numeric::backend::sqrt",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_pow_positive",
        "ported/excel_numeric::excel_pow_chain",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_recip",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::recip",
        "ported/excel_numeric/x87_chains::pow2_positive",
        "ported/excel_numeric/x87_chains::pow2",
        "ported/excel_numeric/x87_chains::exp_ext",
        "ported/excel_numeric/x87_chains::exp_with",
        "ported/excel_numeric/x87_chains::excel_exp",
        "ported/excel_numeric/x87_chains::log_with",
        "ported/excel_numeric/x87_chains::excel_log",
        "ported/power_fn::exact_integer_magnitude",
        "ported/power_fn::accept_negative_base_odd_root",
        "ported/power_fn::binexp_positive",
        "ported/power_fn::power_kernel"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/arithmetic.rs#L42-L42",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 42 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.OP_POWER.json",
  "name": "OP_POWER",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n- `EXP`, `LN`, `LOG`, `LOG10` — the transcendental path `^` is documented *not* to take for\n  integer exponents.\n- `SQRT` — `x^0.5` and `SQRT(x)` are different implementations of the same mathematical\n  function. `SQRT` is a correctly-rounded IEEE primitive; a general power path usually is\n  not. Prefer `SQRT` where you can.\n- `IMPOWER` — complex powers over text-encoded complex numbers, which *does* return a\n  negative real base's fractional power as a complex value.\n- [`FUNC.OP_MULTIPLY`](FUNC.OP_MULTIPLY.md) — what the integer-exponent path reduces to.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n\n- Implement two paths deliberately: an exact-integer-exponent path by binary exponentiation\n  and a general path, and make the integer test exact (the exponent must be an integer *as a\n  double*, not merely close to one). This is the difference chapter 03 records as\n  observable.\n- Binary exponentiation is not associativity-free either. `x^10` computed as\n  `((x^2)^2 · x)^2` and as `x·x·…·x` differ in the last bits; a compatibility implementation\n  must pin the exact multiplication schedule, not merely \"repeated multiplication\".\n- Route the domain checks before the kernel, in this order: error operands, coercion\n  failures, zero-base cases, negative-base-non-integer-exponent, then the arithmetic.\n  Reordering these changes which error a doubly-bad operand pair produces.\n- Never let a library `pow` return an infinity or NaN to the publication layer. The worksheet\n  value universe has no such values (chapter 01); every non-finite must be mapped to an error\n  or a documented saturation before it reaches a cell.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n- **Negative base, integer exponent.** Real and well defined; the sign alternates with the\n  parity of the exponent.\n- **Zero base.** Positive exponent gives zero; negative exponent is recorded as `#DIV/0!`;\n  zero exponent is recorded as `#NUM!` (see above).\n- **Base 1 and exponent 0** are the usual identities, with the `0^0` exception above the only\n  interesting corner.\n- **Text and logical operands.** Shared to-number rules from\n  [coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n",
    "sources": "- `data/functions/FUNC.POWER.json` — the named function's\n  `precision_rounding_profile: integer_exponent_publication`, the other half of the\n  disagreement, and the Microsoft URL for the *function* form:\n  <https://support.microsoft.com/en-us/office/power-function-d3f2908b-56f4-4c3f-895a-07fb519c362a>.\n- `data/presence/FUNC.OP_POWER.json` — implementing module\n  `earlier-implementation/operator_arithmetic_family.rs`.\n- Handbook `content/model/03-call-pipeline.md` — the `IntegerExponentPublication` axis, its\n  `POWER(1.05, 10)` worked example, and the statement that `^` carries it.\n- Handbook `content/model/01-value-universe.md`, `02-coercion-and-lifting.md`.\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\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.OP_POWER.json).",
    "what-it-does": "\n`A ^ B` converts both operands to numbers and returns `A` raised to the power `B`, as a real\nvalue.\n\nThe word \"real\" is the entire specification. Unlike IEEE-754's `pow`, which is defined over\nextended reals and returns infinities and NaN, the worksheet's `^` is a *real-valued* power\nwith three consequences:\n\n3. **Zero to the zero is refused.** The same record observes `=0^0` and `=POWER(0,0)` as\n   `#NUM!` on the replayed baseline (Excel 16.0 build 19929, replay dated 2026-04-29 in that\n   record). This is the single most surprising fact on this page: mathematics conventionally\n   defines `0^0 = 1`, C's `pow(0,0)` returns `1`, and Excel — on that observation — does not.\n   The Handbook reports the record; it has not re-measured it.\n\nThe second specification-level fact is *how* the power is computed. Chapter 03 describes a\ndeclared publication axis, `PrecisionRoundingProfile::IntegerExponentPublication`: when the\nexponent is an exact integer, Excel computes the power by repeated multiplication (binary\nexponentiation) rather than by the transcendental `exp(b·ln a)` path, and the two disagree in\nthe last bits. Chapter 03 names `POWER` and the `^` operator as the carriers of that axis and\ngives a worked `POWER(1.05, 10)` example.\n\n\n### Arguments\n\n\n| Position | Name | Meaning |\n|---|---|---|\n| 0 | `A` | Base. Required. |\n| 1 | `B` | Exponent. Required. |\n\nArity is exactly 2; no optional arguments, no defaults. Order is emphatically load-bearing.\n\nThe exponent's *exactness as an integer* is a semantic input, not a formatting detail: on the\ninteger-exponent publication rule, `x^3` and `x^3.0000000000000004` may take different\ncomputation paths, and a spreadsheet that computes its exponent rather than typing it can\nland on either side of that boundary without the author noticing.\n\n\n"
  },
  "signature": {
    "display": "number1 ^ number2",
    "parameters": [
      {
        "description": null,
        "name": "number1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "number2",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Operators",
      "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": "NumsToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": null,
        "short_source": "no-short-description"
      },
      "docs": null,
      "entry_kind": "built_in_operator",
      "localized_family_names": null,
      "localized_names": [],
      "signature": {
        "display": "number1 ^ number2",
        "parameters": [
          {
            "description": null,
            "name": "number1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "number2",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "OP_POWER",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": null
  },
  "try_it": {
    "formula": "=2^3"
  },
  "url": "https://handbook.dnacalc.com/functions/OP_POWER.html",
  "variants": [],
  "versions": []
}