Closed banacorn closed 2 years ago
recip x would result in Exception: divide by zero on binary fields when x is even.
recip x
Exception: divide by zero
x
I think something's wrong about this piece of code:
https://github.com/adjoint-io/galois-field/blob/3b13705fe26ea1dc03e1a6d7dac4089085c5362d/src/Data/Field/Galois/Binary.hs#L89-L92
It turned out that my choice of p is wrong. There's nothing wrong with recip. Thank you for your work.
p
recip
recip x
would result inException: divide by zero
on binary fields whenx
is even.I think something's wrong about this piece of code:
https://github.com/adjoint-io/galois-field/blob/3b13705fe26ea1dc03e1a6d7dac4089085c5362d/src/Data/Field/Galois/Binary.hs#L89-L92