Opened 8 years ago

Closed 7 years ago

#14658 closed defect (fixed)

multivariate factorization errors

Reported by: burcin Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: factorization Keywords: singular factory
Cc: jmantysalo Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Reported by Manuel Kauers.

On Sage 5.10.beta4:

sage: R.<x1,x2,x3> = QQ['x1,x2,x3']
sage: f = (x1+x2+x3)*(2*x1-x2+x3+2)*(4*x1+x2+x3+2)*(8*x1-x2+x3+4)
sage: f.factor()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-429743410e57> in <module>()
----> 1 f.factor()

/home/burcin/sage/sage-5.10.beta2/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so in sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular.factor (build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:25997)()

RuntimeError: Floating point exception
sage: g = (x1+x2+x3)*(2*x1-x2+x3+2)*(4*x1+x2+x3+2)
sage: g.factor()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-689da5069cee> in <module>()
----> 1 g.factor()

/home/burcin/sage/sage-5.10.beta2/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so in sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular.factor (build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:25997)()

RuntimeError: Floating point exception

These examples work with Singular 3.1.6 (should be updated in #14333):

                     SINGULAR                                 /
 A Computer Algebra System for Polynomial Computations       /   version 3-1-6
                                                           0<
 by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann     \   Dec 2012
FB Mathematik der Universitaet, D-67653 Kaiserslautern        \
> ring R = 0,(x1,x2,x3),dp;
> poly f = (x1+x2+x3)*(2*x1-x2+x3+2)*(4*x1+x2+x3+2)*(8*x1-x2+x3+4);
> factorize(f);
[1]:
   _[1]=1
   _[2]=2*x1-x2+x3+2
   _[3]=x1+x2+x3
   _[4]=8*x1-x2+x3+4
   _[5]=4*x1+x2+x3+2
[2]:
   1,1,1,1,1
> poly g = (x1+x2+x3)*(2*x1-x2+x3+2)*(4*x1+x2+x3+2);
> factorize(g);
[1]:
   _[1]=1
   _[2]=4*x1+x2+x3+2
   _[3]=2*x1-x2+x3+2
   _[4]=x1+x2+x3
[2]:
   1,1,1,1

Change History (10)

comment:1 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 8 years ago by chapoton

on 5.12.beta2, one gets:

sage: R.<x1,x2,x3> = QQ['x1,x2,x3']
sage: f = (x1+x2+x3)*(2*x1-x2+x3+2)*(4*x1+x2+x3+2)*(8*x1-x2+x3+4)
sage: f.factor()
(x1 + x2 + x3) * (64*x1^3 - 24*x1^2*x2 - 6*x1*x2^2 + x2^3 + 56*x1^2*x3 - 8*x1*x2*x3 - x2^2*x3 + 14*x1*x3^2 - x2*x3^2 + x3^3 + 128*x1^2 - 20*x1*x2 - 4*x2^2 + 68*x1*x3 - 4*x2*x3 + 8*x3^2 + 80*x1 - 4*x2 + 20*x3 + 16)
sage: factor(f)
---------------------------------------------------------------------------
Traceback (most recent call last):
...
RuntimeError: Floating point exception

so it either fails or returns a partial factorisation..

comment:3 Changed 8 years ago by chapoton

But

sage: factor(f,proof=True)
(x1 + x2 + x3) * (8*x1 - x2 + x3 + 4) * (8*x1^2 - 2*x1*x2 - x2^2 + 6*x1*x3 + x3^2 + 12*x1 + 4*x3 + 4)

works a little better.

Last edited 8 years ago by chapoton (previous) (diff)

comment:4 Changed 8 years ago by burcin

  • Cc jmantysalo added

Perhaps we should add Jori's randomized testing code as a long doctest:

https://groups.google.com/d/msg/sage-devel/kppZCcghqXM/hCBNUpfuuMgJ

comment:5 Changed 8 years ago by jmantysalo

Why not. But I think that product of three polynomial in four variables do not find all errors; see trac #14333.

comment:6 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:7 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:8 Changed 7 years ago by vbraun

  • Milestone changed from sage-6.3 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

Fixed at least in sage-6.3.beta3 (by the earlier Singular update)

comment:9 Changed 7 years ago by rws

  • Status changed from needs_review to positive_review

Confirm the Sage errors no longer happen.

comment:10 Changed 7 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.