FA-5544 / Number theory / Member archive
Modular multiplicative inverse · case 04
Fermat inversion is used without a prime-modulus precondition.
Case contract
Integer inputs; n is positive unless a zero or negative fixture explicitly extends that operation. A modulus is greater than one; p is prime; exponent k may be signed when an inverse exists. a may be signed; return the least nonnegative inverse modulo m or None if gcd(a,m)!=1. Exact operational definition: pow(a,-1,m) if math.gcd(a,m)==1 else None
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Number theory results depend on the stated convention.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (3, 10) | 1 | 7 | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗