Nemo.jl
Nemo.jl copied to clipboard
Modulo with polynomials is inconsistent
Hi!
While playing around with some modulo computations I stumbled arccos some weird thinks in Nemo and AbstractAlgebra. Apparently Nemo interprets mod
differently than AbstractAlgebra:
julia> using Nemo
Welcome to Nemo version 0.34.7
Nemo comes with absolutely no warranty whatsoever
julia> R,(x,y)=ZZ[:x,:y]
(Multivariate Polynomial Ring in x, y over Integer Ring, ZZMPolyRingElem[x, y])
julia> mod(R(-1),R(2))
-1
julia> rem(R(-1),R(2),RoundDown)
-1
While
julia> using AbstractAlgebra
julia> R,(x,y)=ZZ[:x,:y]
(Multivariate polynomial ring in 2 variables over integers, AbstractAlgebra.Generic.MPoly{BigInt}[x, y])
julia> mod(R(-1),R(2))
1
julia> rem(R(-1),R(2),RoundDown)
1
works as I would expect.