-
Notifications
You must be signed in to change notification settings - Fork 33
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
Flint integers bug? #57
Comments
Yes, this looks like a bug. It looks like something got cleaned up that
shouldn't have.
|
Singular.n_unknown currently only supports fields - this maybe part of the problem |
It might be a bug in this code:
```
function fmpzExtGcd(a::number, b::number, s::Ptr{number}, t::Ptr{number},
cf::coeffs)
n1 = julia(a)::Nemo.fmpz
n2 = julia(b)::Nemo.fmpz
s1 = unsafe_load(s)
if s1 != C_NULL
number_pop!(nemoNumberID, Ptr{Void}(s1))
end
t1 = unsafe_load(t)
if t1 != C_NULL
number_pop!(nemoNumberID, Ptr{Void}(t1))
end
g1, s1, t1 = gcdx(n1, n2)
libSingular.setindex!(s, number(s1))
libSingular.setindex!(t, number(t1))
return number(g1)
end
```
Andreas fixed a similar bug elsewhere. The code was not doing what Singular
expects wrt s and t.
|
This seems to be fixed? |
I don't recall. Does it seem to give the right answer now? I do recall explaining how to fix it. And Andreas wrote something. |
I didn't check if this gives the right answer, but at least it doesn't error: julia> using Singular
julia> import Nemo
julia> K = Nemo.ZZ
Integer Ring
julia> R,(x,y) = Singular.PolynomialRing(K, ["x","y"])
(Singular Polynomial Ring (Coeffs(17)),(x,y),(dp(2),C), spoly{Singular.n_unknown{Nemo.fmpz}}[x, y])
julia> I = [-x^4+2*x^2+y^4-y^2, -4*x^3*y-4*x*y^3+6*x*y]
2-element Vector{spoly{Singular.n_unknown{Nemo.fmpz}}}:
-x^4 + y^4 + 2*x^2 - y^2
-4*x^3*y - 4*x*y^3 + 6*x*y
julia> IAsIdeal = Ideal(R, I)
Singular Ideal over Singular Polynomial Ring (Coeffs(17)),(x,y),(dp(2),C) with generators (-x^4+y^4+2*x^2-y^2, -4*x^3*y-4*x*y^3+6*x*y)
julia> std(IAsIdeal)
Singular Ideal over Singular Polynomial Ring (Coeffs(17)),(x,y),(dp(2),C) with generators (6*x*y, 2*x^3*y+2*x*y^3, x^4-y^4-2*x^2+y^2, 12*y^5-12*y^3, 2*x^2*y^3-4*y^5-2*x^2*y+4*y^3) |
Then we close the ticket. |
fingolfin
pushed a commit
to fingolfin/Singular.jl
that referenced
this issue
Jun 6, 2023
reset some global error flags
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a bug?
The text was updated successfully, but these errors were encountered: