modular_arithmetic
Perform modular arithmetic operations: calculate modular exponentiation, modular inverse, or remainder for cryptographic and number-theoretic tasks.
Instructions
Modular arithmetic operations: modpow (a^b mod m), modinverse (a^-1 mod m), or mod (a mod m).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Base value. | |
| b | No | Exponent (required for modpow). | |
| m | Yes | Modulus (positive integer). | |
| operation | Yes | Operation: modpow, modinverse, or mod. |