Integer is perfect square
integer-is-perfect-square · version 1.0.0 · Numbers & math · free, no key needed
Test whether a non-negative integer string is a perfect square.
Use when you need to: integer is perfect square · perfect square test · check if a number is a perfect square.
Decide before calling
Read the versioned contract and the supported scope below. Reuse integer-is-perfect-square@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use integer-is-perfect-square@1.0.0 for integer is perfect square. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- integer is perfect square
- perfect square test
- check if a number is a perfect square
Not supported
- negative input
- floating-point square root
- nth power test
Behavior
- value is a canonical non-negative integer string: 0 or a non-zero leading digit followed by digits, at most 1000 digits.
- Negative values are rejected.
- 0 and 1 are perfect squares (0*0 and 1*1).
- is_perfect_square is computed exactly via integer floor square root (no floating point), never approximated.
Input
value(string, required): max length 1000; pattern^(0|[1-9][0-9]*)$
Output
is_perfect_square(boolean, required)
Limits
- max digits: 1000
Example
Request input:
{
"value": "49"
}
Response:
{
"result": {
"is_perfect_square": true
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "integer-is-perfect-square",
"version": "1.0.0",
"input": {
"value": "49"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/integer-is-perfect-square/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"value":"49"}'
The machine-readable contract is at /v1/tools/integer-is-perfect-square/versions/1.0.0.
CLI
node cli.mjs run integer-is-perfect-square 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Integer is prime: Deterministically test whether a non-negative integer string is prime.
- Chi square decomposition check: Check a claimed Pearson chi-square, its per-cell (O-E)^2/E terms and df exactly; returns the first wrong term.
- Chromatic certificate check: Check a claim chi(G) = k: a proper k-colouring plus a clique or bounded exhaustive proof; returns the first discrepancy.
- Contingency expected check: Check claimed expected counts (row total x column total / N) of a count table exactly; returns the first wrong cell.
- Network flow feasibility check: Check a claimed s-t flow for capacity bounds and conservation with exact integers; returns the first bad edge or node.
- Bipartite coloring check: Check a complete 0/1 coloring witness for graph bipartiteness and report the first certificate discrepancy.