Integer nth root
integer-nth-root · version 1.0.0 · Numbers & math · free, no key needed
Compute the exact floor of the nth root of a non-negative integer string.
Use when you need to: integer nth root · nth root floor · integer root.
Supported
- integer nth root
- nth root floor
- integer root
Not supported
- negative radicand
- even roots of negative numbers
- floating-point root
Behavior
- value is a canonical non-negative integer string: 0 or a non-zero leading digit followed by digits, at most 1000 digits.
- degree is a JSON integer from 1 to 1000; degree 1 returns value unchanged.
- Negative values are rejected: only non-negative radicands are supported.
- The result is floor(value^(1/degree)), computed exactly by integer binary search (no floating point).
- is_exact is true exactly when result^degree equals value.
Input
value(string, required): max length 1000; pattern^(0|[1-9][0-9]*)$degree(integer, required): min 1; max 1000
Output
result(string, required)is_exact(boolean, required)
Limits
- max digits: 1000
- min degree: 1
- max degree: 1000
Example
Request input:
{
"value": "100",
"degree": 3
}
Response:
{
"result": {
"result": "4",
"is_exact": false
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "integer-nth-root",
"version": "1.0.0",
"input": {
"value": "100",
"degree": 3
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/integer-nth-root/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"value":"100","degree":3}'
The machine-readable contract is at /v1/tools/integer-nth-root/versions/1.0.0.
CLI
node cli.mjs run integer-nth-root 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Integer sqrt: Compute the exact floor of the square root of a non-negative integer string.
- Integer catalan number: Compute the nth Catalan number exactly.
- Integer digital root: Repeatedly sum the base-b digits of the magnitude of an integer string until a single digit remains.
- Array integer adjacent diff: Replace an array of canonical integer strings with consecutive first differences.
- Array integer clamp: Clamp an array of canonical integer strings to optional inclusive min and max bounds.
- Array integer cumulative sum: Replace an array of canonical integer strings with equal-length prefix sums.