I am working on some modulo arithmetic and I do not seem to understand why
$28^{-1} (mod59)= 19 (mod59)=55$ is and not $28^{-1} (mod59) = 0.0035 (mod59)$ ?
When I try to calculate this in Java it does give me 0.0035
I am working on some modulo arithmetic and I do not seem to understand why
$28^{-1} (mod59)= 19 (mod59)=55$ is and not $28^{-1} (mod59) = 0.0035 (mod59)$ ?
When I try to calculate this in Java it does give me 0.0035
In modular arithmetic, the multiplicative inverse is generally not defined as $x^{-1} = \frac{1}{x}$. It's instead generally defined as an integer such that $x\cdot x^{-1} \equiv 1 \mod{n}$.
For example, the multiplicative inverse of $3$ modulo $5$ would be $2$, because $3\cdot 2 = 6 \equiv 1 \mod 5$.
In your case, $19$ is the multiplicative inverse of $28$ modulo $59$ because $28\cdot19 = 532 \equiv 1 \mod 59$.