Comments (2)
I think I found the cause. In fq_nmod_mpolyu_gcds_zippel
, the polynomial f
is a deliberately non-canonicalised "form" polynomial containing the sought exponents but with zero coefficients.
The following code
FLINT_ASSERT((f->coeffs + 0)->length == 1);
fq_nmod_mpolyu_set(G, f, ctx);
_n_fq_one((G->coeffs + 0)->coeffs + d*0, d);
sets G
to a valid the length-1 polynomial with form f
and coefficient 1 instead of 0, but the assert in fq_nmod_mpolyu_set
triggers before the coefficient is assigned.
I believe replacing fq_nmod_mpolyu_set
by fq_nmod_mpolyu_setform
solves the problem.
Not a serious bug, because fq_nmod_mpolyu_set
happens to do the thing when the input is non-canonical, but ought to be fixed for cleanliness.
@tthsqe12 does that look correct?
It looks like we have the same issue in src/nmod_mpoly/mpolyu_gcdp_zippel.c
, but that case isn't reached by tests: https://app.codecov.io/gh/flintlib/flint/blob/main/src%2Fnmod_mpoly%2Fmpolyu_gcdp_zippel.c#L231
While we're at it, it would be nice to improve the test code in nmod_mpoly
so that we have coverage there.
The GCD code for fmpz_mod_mpoly
looks a different; not sure if it has the same problem.
from flint.
I've tried to tweak the nmod_mpoly_gcd_zippel
test code (generating polynomials with fewer variables and terms) to hit that branch in nmod_mpolyu_gcds_zippel
, but I've been unable to reach it. I wonder if it's actually reachable? Perhaps one has to test nmod_mpolyu_gcds_zippel
directly.
from flint.
Related Issues (20)
- fmpz_mpoly_pfrac_init: internal error HOT 7
- Worklist for nfloat HOT 3
- SIMD abstraction layers HOT 5
- Problems with Riemann theta functions HOT 44
- 3.1.3 isn't in the Downlioads section of the website: https://flintlib.org/downloads.html HOT 2
- Document need for libtool
- Improve parallel Schönhage-Strassen multiplication
- file padic_types.h not getting installed HOT 2
- Test failures when compiled with GCC graphite flags HOT 5
- #error machine_vector.h not implemented on AMD Ryzen 7 without forcing --enable-avx HOT 14
- Segmentation Fault in Fortran-C Interoperability when Using Arb Library for Complex Integration HOT 2
- Error finding PkgConfig while installing Flint package using CMake on Windows HOT 1
- Add a function to compute b/sqrt(a)
- Multivariate rational functions over the integers mod n HOT 3
- AVX and nmod HOT 8
- FLINT license should be stated on the FLINT website HOT 1
- Gentoo Linux: sci-mathematics/flint-3.1.3_p1 QA Notice: Package triggers severe warnings which indicate that it may exhibit random runtime failures. HOT 1
- Missing functions in `fq_default` HOT 1
- `fq_default_poly_evaluate_fq_default` with context type `FMPZ_MOD` segfaults
- `make check` failing at `sub_dddmmmsss` under macOS (aarch64-apple-darwin22.6.0)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flint.