Power tower (tetration), a^^n
Evaluate a power tower, repeated exponentiation.
A tower is evaluated RIGHT TO LEFT: a^^3 is a^(a^a), not (a^a)^a. Those are different numbers, and the left-to-right reading is the usual mistake. 2^^4 is 65,536, not 256.
Towers overflow almost immediately. 3^^4 is 3^7625597484987, a number with over three trillion digits, so the height is capped at 10 and anything too large returns value: null with is_finite: false rather than a wrong number or an error.
This endpoint has no MCP tool on purpose. Every other calculator here encodes a New Zealand rule an assistant cannot derive; this is arithmetic a model does correctly unaided, so a tool would cost tool-selection accuracy for nothing.
Request
- Base URL: https://api.calculate.co.nz
- URL: https://api.calculate.co.nz/v1/power-tower
- Auth: API key in header X-API-Key
Request body
Example request
{
"base": 2,
"height": 4
}Response
The tower's value, or a note saying it overflowed.
Example response
{
"disclaimer": "Evaluated in double precision floating point, so large values lose accuracy before they overflow.",
"result": {
"base": 2,
"expression": "2^2^2^2 (evaluated right to left)",
"height": 4,
"is_finite": true,
"note": "Evaluated right to left, so a^^3 is a^(a^a) and not (a^a)^a. Those are different numbers.",
"value": 65536
}
}Changes
No recorded changes to this operation across all 1 revision of this API.