Array integer product
array-integer-product · version 1.0.0 · Numbers & math · free, no key needed
Multiply an array of canonical integer strings and return the canonical product.
Use when you need to: array integer product · product of integer array · multiply canonical integer strings.
Supported
- array integer product
- product of integer array
- multiply canonical integer strings
Not supported
- floating point product
- factorial
- csv column product
- mean
Behavior
- Input values is an array of canonical base-10 integer strings with at most 10000 items.
- A canonical integer is 0 or an optional ASCII minus followed by a non-zero leading digit and only digits after that.
- Input -0 is accepted and canonicalized to 0; plus signs, spaces, underscores, hex, exponents, empty strings, and other leading zeros are rejected.
- Each value is parsed with BigInt. IEEE-754 numbers are rejected.
- The empty array is the empty product and returns 1.
- If any value is 0, the product is 0 after every element has been validated.
- The output product is a canonical integer string of at most 1000 digits excluding the sign; otherwise the error is "product exceeds the 1000 digit limit".
Input
values(array of string, required): max items 10000; each max length 1001; each pattern^-?(0|[1-9][0-9]*)$
Output
product(string, required): max length 1001; pattern^(0|-?[1-9][0-9]*)$
Limits
- max items: 10000
- max digits: 1000
Example
Request input:
{
"values": [
"12",
"13"
]
}
Response:
{
"result": {
"product": "156"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "array-integer-product",
"version": "1.0.0",
"input": {
"values": [
"12",
"13"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/array-integer-product/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"values":["12","13"]}'
The machine-readable contract is at /v1/tools/array-integer-product/versions/1.0.0.
CLI
node cli.mjs run array-integer-product 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Array integer cumulative sum: Replace an array of canonical integer strings with equal-length prefix sums.
- Array integer median: Select lower and upper middle canonical integers; emit median only for odd length.
- Array integer mode: Return the most frequent canonical integers, listing every mode in first-seen order.
- Array integer sum: Sum an array of canonical integer strings and return the canonical total.
- Array integer adjacent diff: Replace an array of canonical integer strings with consecutive first differences.
- Array integer GCD: Compute the non-negative greatest common divisor of an array of canonical integer strings.