Opened 3 years ago

Closed 3 years ago

# bug in polynomial factoring, PARI(interface?)-related

Reported by: Owned by: dimpase critical sage-duplicate/invalid/wontfix factorization N/A

As reported on sage-devel

```│ SageMath version 8.8.beta3, Release Date: 2019-04-18               │
│ Using Python 2.7.15. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: R.<x> = QQ[]
sage:  f = (x - 1)^8 * (x^2 - 2/3*x + 1)^2 * (x^2 + 2/3*x + 1)^2 *
....:  (x^4 + 3*x^3 + 37/9*x^2 + 3*x + 1) * (x^4 + 1/3*x^3 - x^2 +
....:  1/3*x + 1)^2 * (x^16 + 2*x^14 + 211/81*x^12 + 28/9*x^10 + 2
....: 69/81*x^8 + 28/9*x^6 + 211/81*x^4 + 2*x^2 + 1)^2
sage: g = (x - 1)^32 * (x^2 + 5/3*x + 1)^16
sage: factor(f)
(x - 1)^8 * (x^2 - 2/3*x + 1)^2 * (x^2 + 2/3*x + 1)^2 * (x^4 + 3*x^3 + 37/9*x^2 + 3*x + 1) * (x^4 + 1/3*x^3 - x^2 + 1/3*x + 1)^2 * (x^16 + 2*x^14 + 211/81*x^12 + 28/9*x^10 + 269/81*x^8 + 28/9*x^6 + 211/81*x^4 + 2*x^2 + 1)^2
sage: factor(g)
------------------------------------------------------------------
PariError                        Traceback (most recent call last)
<ipython-input-5-41d64ee9c816> in <module>()
----> 1 factor(g)

/mnt/opt/Sage/sage-dev/local/lib/python2.7/site-packages/sage/arith/misc.pyc in factor(n, proof, int_, algorithm, verbose, **kwds)
2570     except TypeError:
2571         # Maybe the factor() method doesn't have a proof option
-> 2572         return m(**kwds)
2573
2574

/mnt/opt/Sage/sage-dev/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.pyx in sage.rings.polynomial.polynomial_element.Polynomial.factor (build/cythonized/sage/rings/polynomial/polynomial_element.c:35631)()
4256         R = self._parent.base_ring()
4257         if hasattr(R, '_factor_univariate_polynomial'):
-> 4258             return R._factor_univariate_polynomial(self, **kwargs)
4259
4260         G = None

/mnt/opt/Sage/sage-dev/local/lib/python2.7/site-packages/sage/rings/rational_field.pyc in _factor_univariate_polynomial(self, f)
1348
1349         """
-> 1350         G = list(f._pari_with_name().factor())
1351
1352         # normalize the leading coefficients

cypari2/gen.pyx in cypari2.gen.Gen.factor()

cypari2/handle_error.pyx in cypari2.handle_error._pari_err_handle()

PariError: bug in gerepile, significant pointers lost, please report
```

### comment:1 Changed 3 years ago by dimpase

• Component changed from PLEASE CHANGE to factorization
• Description modified (diff)

### comment:2 Changed 3 years ago by jdemeyer

• Milestone changed from sage-8.8 to sage-duplicate/invalid/wontfix
• Resolution set to duplicate
• Status changed from new to closed

Duplicate of #27236

Note: See TracTickets for help on using tickets.