Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modulo with polynomials is inconsistent #1509

Open
SoongNoonien opened this issue Jul 14, 2023 · 0 comments
Open

Modulo with polynomials is inconsistent #1509

SoongNoonien opened this issue Jul 14, 2023 · 0 comments

Comments

@SoongNoonien
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant