Skip to content
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

multivariate factorization errors #14658

Closed
burcin opened this issue May 29, 2013 · 6 comments
Closed

multivariate factorization errors #14658

burcin opened this issue May 29, 2013 · 6 comments

Comments

@burcin
Copy link

burcin commented May 29, 2013

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

CC: @jm58660

Component: factorization

Keywords: singular factory

Issue created by migration from https://trac.sagemath.org/ticket/14658

@burcin burcin added this to the sage-5.11 milestone May 29, 2013
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@fchapoton
Copy link
Contributor

comment:2

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..

@fchapoton
Copy link
Contributor

comment:3

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.

@burcin
Copy link
Author

burcin commented Oct 30, 2013

comment:4

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

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

@jm58660
Copy link
Mannequin

jm58660 mannequin commented Oct 30, 2013

comment:5

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

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@vbraun
Copy link
Member

vbraun commented Jun 5, 2014

comment:8

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

@vbraun vbraun removed this from the sage-6.3 milestone Jun 5, 2014
@rwst
Copy link

rwst commented Jun 6, 2014

comment:9

Confirm the Sage errors no longer happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants