Aritmética modular
modular-arithmeticCalcula base^exponente mod m y el inverso modular cuando existe. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: realizar aritmética exacta de enteros grandes (bigint-calc). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes base^exponent mod m (fast exponentiation) and, when it exists, the modular inverse of base mod m. Arbitrary precision up to 300 digits. When: a numeric result has to be exact or reproducible instead of estimated. Not for: computing the exact arbitrary-precision integer arithmetic (bigint-calc). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Base (integer or string; required; up to 301 chars; pattern ^-?\d{1,300}$). | |
| modulus | Yes | Modulus ≥ 1 (integer or string; required; up to 301 chars; pattern ^-?\d{1,300}$). | |
| exponent | No | Exponent ≥ 0 (integer or string; optional; up to 301 chars; pattern ^-?\d{1,300}$). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inverse | No | ||
| power_mod | No |