You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> R,x = QQ[:x]
(Univariate polynomial ring in x over QQ, x)
julia> factor_squarefree(zero(R))
[10714] signal (11.2): Segmentation fault: 11
in expression starting at REPL[4]:1
fmpz_sgn at /Users/mhorn/.julia/artifacts/93c4c327196f73ed4a7e268093e3a7f4097b744d/lib/libflint.dylib (unknown line)
fmpz_poly_factor_squarefree at /Users/mhorn/.julia/artifacts/93c4c327196f73ed4a7e268093e3a7f4097b744d/lib/libflint.dylib (unknown line)
Allocations: 4346002 (Pool: 4343463; Big: 2539); GC: 6
Segmentation fault: 11
It should be trivial to catch the input zero before passing to FLINT to fix this issue. But it is not clear to me what the correct output is supposed to be. The AA documentation is far too vague to clarify this. And experiments are not conclusive:
# factoring integer 0 gives an error
julia>factor(0)
ERROR: ArgumentError: Argument is not non-zero
# factor_squarefree for integers is not implemented at all
julia>factor_squarefree(0)
ERROR:function factor_squarefree is not implemented for argument
Int64:0
julia>factor_squarefree(ZZ(0))
ERROR:function factor_squarefree is not implemented for argument
ZZRingElem:0# factoring a multivariate zero polynomial gives a `Fac` factorization with "unit" equal to... zero ??
julia> R,(x,y) = QQ[:x,:y]
(Multivariate polynomial ring in2 variables over QQ, QQMPolyRingElem[x, y])
julia>factor(zero(R))
0
julia>factor_squarefree(zero(R))
0
julia> R,(x,y) =GF(5)[:x,:y]
(Multivariate polynomial ring in2 variables over GF(5), fpMPolyRingElem[x, y])
julia>factor(zero(R))
0
julia>factor_squarefree(zero(R))
0# same behavior for univariate polynomial over a finite field
julia> R,x =GF(5)[:x]
(Univariate polynomial ring in x over GF(5), x)
julia>factor(zero(R))
0
julia>factor_squarefree(zero(R))
0
So based on a majority vote... a factorization with unit 0 is to be returned?!
The text was updated successfully, but these errors were encountered:
It doesn't like factoring zero:
It should be trivial to catch the input zero before passing to FLINT to fix this issue. But it is not clear to me what the correct output is supposed to be. The AA documentation is far too vague to clarify this. And experiments are not conclusive:
So based on a majority vote... a factorization with unit 0 is to be returned?!
The text was updated successfully, but these errors were encountered: