Bill Allombert on Sat, 15 Apr 2023 23:29:51 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: How to compute modulo a complex ?


On Sat, Apr 15, 2023 at 10:50:40PM +0200, tony.reix@laposte.net wrote:
> Hi,I want to do:s=5s=Mod( (s^2-1)/(2*I*s) , 4 I )s=.... the same...Where I is
> the imaginary number.When trying, I get a forbiden division between polmod
> and complex.

You need to explain how you define it.

If you really want to work in the Z-module Z[i] / (4*i*Z), you can
define
mod4(z)=real(z)+I*(imag(z)%4)

If you want compute in the quotient ring Z[i]/(4*i*Z[i])
 (but then I is invertible so mod 4 and mod 4*I are the same) see nfeltmod.

Cheers,
Bill