I just make a small test:
P.<a,b,c,d>=QQ[]
for i in range(1,100000):
p1=ZZ.random_element(1,5)*P.random_element()
p2=ZZ.random_element(1,5)*P.random_element()
p3=ZZ.random_element(1,5)*P.random_element()
p=p1*p2*p3
if p==0:
continue
print p
f=p.factor()
tulo=f.unit()*prod([f[i][0]^f[i][1] for i in range(0,len(f))])
if (p-tulo) <> 0:
print "Error!"
I got few floating point exceptions, but they seems to be already
reported: http://trac.sagemath.org/ticket/14658
However, I also found one new error:
16*a^3*b*c^2 - 144*a^2*b*c^3 + 112*a^2*b*c^2*d - 1008*a*b*c^3*d +
16*a^2*b*c*d^2 - 16*a^2*c^2*d^2 - 624*a*b*c^2*d^2 + 4320*b*c^3*d^2 -
48*a*b*c*d^3 - 112*a*c^2*d^3 + 432*b*c^2*d^3 - 16*a*c*d^4 + 480*c^2*d^4 +
48*c*d^5 + 16*a^3*b*c - 48*a^2*b^2*c + 16*a^3*c^2 - 144*a^2*b*c^2 +
432*a*b^2*c^2 + 16*a^2*c^3 + 160*a^2*b*c*d - 272*a*b^2*c*d + 112*a^2*c^2*d
- 1440*a*b*c^2*d + 2448*b^2*c^2*d + 112*a*c^3*d + 16*a^2*b*d^2 -
32*a*b^2*d^2 - 96*a*b*c*d^2 + 288*b^2*c*d^2 - 464*a*c^2*d^2 - 480*c^3*d^2
- 208*a*c*d^3 + 272*b*c*d^3 - 48*c^2*d^3 - 16*a*d^4 + 32*b*d^4 -
16*a^2*b^2 + 32*a*b^3 + 16*a^3*c - 48*a^2*b*c + 144*a*b^2*c - 288*b^3*c +
16*a^2*c^2 - 48*a*b*c^2 + 160*a^2*c*d - 272*a*b*c*d + 160*a*c^2*d -
272*b*c^2*d + 16*a^2*d^2 - 16*a*b*d^2 - 32*b^2*d^2 + 16*a*c*d^2 -
32*b*c*d^2 - 16*a^2*b + 32*a*b^2 - 16*a*b*c + 32*b^2*c
gives "RuntimeError: Segmentation fault". Should I report this as new bug
or as a comment to ticket 14658?
I tried to run this on loop and see how often errors happen. But then I
got
*** Error in `python': free(): invalid pointer: 0x0000000003b22330 ***
======= Backtrace: =========
/lib64/libc.so.6[0x332ba7d0e8]
/home/jm58660/sage-5.11/local/lib64/libstdc++.so.6(_ZdlPv+0x1f)[0x7f648d3aeebc]
/home/jm58660/sage-5.11/local/lib64/libstdc++.so.6(_ZdaPv+0x18)[0x7f648d3aeef4]
/home/jm58660/sage-5.11/local/lib/libsingular.so(_Z15sparseHeuristicRK13CanonicalFormRK4ListIS_ERPS3_S5_i+0x2d96)[0x7f64736d3096]
/home/jm58660/sage-5.11/local/lib/libsingular.so(_Z14multiFactorizeRK13CanonicalFormRK8Variable+0x2590)[0x7f647364f3e0]
/home/jm58660/sage-5.11/local/lib/libsingular.so(_Z12ratFactorizeRK13CanonicalFormRK8Variableb+0x256)[0x7f64735e6c06]
/home/jm58660/sage-5.11/local/lib/libsingular.so(_Z9factorizeRK13CanonicalFormb+0xf23)[0x7f64735e5373]
/home/jm58660/sage-5.11/local/lib/libsingular.so(_Z18singclap_factorizeP8spolyrecPP6intveci+0x643)[0x7f647345e413]
/home/jm58660/sage-5.11/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so(+0x24d9a)[0x7f6473c4cd9a]
/home/jm58660/sage-5.11/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so(+0x270e3)[0x7f6473c4f0e3]
. . .
Odds of getting errors are about 1 againsta 89.
--
Jori Mäntysalo
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.