11.8.8 Division in ℤ/pℤ or in ℤ/pℤ[x]
The / operator divides two integers in
ℤ/pℤ or two polynomials A and B in ℤ/pℤ[x].
(See also Section 7.3.2.)
Since ℤ/pℤ is only a field if p is prime, the
quotient is only guaranteed to exist if p is prime (unless the
denominator is 0 (mod p )).
For integers in ℤ/pℤ.
Since 13 is prime:
Since 3(mod 14 ) is invertible in Z/14ℤ:
Since 7(mod 14 ) is not invertible in Z/14ℤ, this results in an error:
|
Not invertible Error: Bad Argument Value
| | | | | | | | | | |
|
For polynomials.
The result of P/Q is its irreducible representation in ℤ/pℤ[x]:
(2*x^2+5)%13/(5*x^2+2*x-3)%13 |
|
| |
|
⎛
⎝ | 2%13 | ⎞
⎠ | x+ | ⎛
⎝ | 2%13 | ⎞
⎠ | %13 |
|
|
| | | | | | | | | | |
|