Operators
Exponentiation (^)
Matches all 42 recorded answers
Recorded: 42 workbook cells. How we measure this · See the Rust code
No local names are recorded for this entry.
What it does
number1 ^ number2
A ^ B converts both operands to numbers and returns A raised to the power B, as a real
value.
The word "real" is the entire specification. Unlike IEEE-754's pow, which is defined over
extended reals and returns infinities and NaN, the worksheet's ^ is a real-valued power
with three consequences:
- Zero to the zero is refused. The same record observes
=0^0and=POWER(0,0)as#NUM!on the replayed baseline (Excel 16.0 build 19929, replay dated 2026-04-29 in that record). This is the single most surprising fact on this page: mathematics conventionally defines0^0 = 1, C'spow(0,0)returns1, and Excel — on that observation — does not. The Handbook reports the record; it has not re-measured it.
The second specification-level fact is how the power is computed. Chapter 03 describes a
declared publication axis, PrecisionRoundingProfile::IntegerExponentPublication: when the
exponent is an exact integer, Excel computes the power by repeated multiplication (binary
exponentiation) rather than by the transcendental exp(b·ln a) path, and the two disagree in
the last bits. Chapter 03 names POWER and the ^ operator as the carriers of that axis and
gives a worked POWER(1.05, 10) example.
Arguments
| Position | Name | Meaning |
|---|---|---|
| 0 | A | Base. Required. |
| 1 | B | Exponent. Required. |
Arity is exactly 2; no optional arguments, no defaults. Order is emphatically load-bearing.
The exponent's exactness as an integer is a semantic input, not a formatting detail: on the
integer-exponent publication rule, x^3 and x^3.0000000000000004 may take different
computation paths, and a spreadsheet that computes its exponent rather than typing it can
land on either side of that boundary without the author noticing.
Try it
Quirks
Result and edge cases
- Negative base, integer exponent. Real and well defined; the sign alternates with the parity of the exponent.
- Zero base. Positive exponent gives zero; negative exponent is recorded as
#DIV/0!; zero exponent is recorded as#NUM!(see above). - Base 1 and exponent 0 are the usual identities, with the
0^0exception above the only interesting corner. - Text and logical operands. Shared to-number rules from coercion and lifting.
How to implement
Notes for implementers
- Implement two paths deliberately: an exact-integer-exponent path by binary exponentiation and a general path, and make the integer test exact (the exponent must be an integer as a double, not merely close to one). This is the difference chapter 03 records as observable.
- Binary exponentiation is not associativity-free either.
x^10computed as((x^2)^2 · x)^2and asx·x·…·xdiffer in the last bits; a compatibility implementation must pin the exact multiplication schedule, not merely "repeated multiplication". - Route the domain checks before the kernel, in this order: error operands, coercion failures, zero-base cases, negative-base-non-integer-exponent, then the arithmetic. Reordering these changes which error a doubly-bad operand pair produces.
- Never let a library
powreturn an infinity or NaN to the publication layer. The worksheet value universe has no such values (chapter 01); every non-finite must be mapped to an error or a documented saturation before it reaches a cell.
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.
^ infix · 1 lines · calc-func/src/catalogue/arithmetic.rs on GitHubCatalogueEntry::operator(POWER, "^", Notation::Infix, NUMBERS, power)
power · 7 lines · calc-func/src/catalogue/arithmetic.rs on GitHubfn power(
arguments: &[CalcValue],
services: &mut EvalServices<'_>,
) -> Result<CalcValue, FunctionFault> {
let site = Site::new(POWER, services);
Site::finish(operands(&site, arguments).and_then(|(x, y)| power_value(&site, x, y)))
}
Kernels shared with other functions
power_valuecatalogue/arithmeticoperandscatalogue/arithmeticraisecatalogue/arithmeticpower_algorithmcatalogue/arithmeticbackend::sqrtported/excel_numericbinary_withported/excel_numericexcel_pow_positiveported/excel_numericexcel_pow_chainported/excel_numericexcel_x87_mulported/excel_numericexcel_x87_recipported/excel_numericmulported/excel_numeric/x87recipported/excel_numeric/x87pow2_positiveported/excel_numeric/x87_chainspow2ported/excel_numeric/x87_chainsexp_extported/excel_numeric/x87_chainsexp_withported/excel_numeric/x87_chainsexcel_expported/excel_numeric/x87_chainslog_withported/excel_numeric/x87_chainsexcel_logported/excel_numeric/x87_chainsexact_integer_magnitudeported/power_fnaccept_negative_base_odd_rootported/power_fnbinexp_positiveported/power_fnpower_kernelported/power_fn
Argument and result plumbing
out_with_subnormalcatalogue/kitCatalogueEntry::operatorcatalogue
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 build | Platform and CPU | Captured inputs |
|---|
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.
Alternatives
Relationships
EXP,LN,LOG,LOG10— the transcendental path^is documented not to take for integer exponents.SQRT—x^0.5andSQRT(x)are different implementations of the same mathematical function.SQRTis a correctly-rounded IEEE primitive; a general power path usually is not. PreferSQRTwhere you can.IMPOWER— complex powers over text-encoded complex numbers, which does return a negative real base's fractional power as a complex value.FUNC.OP_MULTIPLY— what the integer-exponent path reduces to.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents