The same ask.sagemath question
<https://ask.sagemath.org/question/57859/wrong-result-after-using-factor-known-sage-bug/>
may have revealed two different bugs in symbolics handling.
Input interpretation. Raw input, with spaces, indents and newlines :
f(x) = (3/174465461165747500*pi*(-1750000*I*pi*x^3 - 31250000*(224*pi +
45*sqrt(448*pi + 2025) + 2025)*x^2
+ 17500000000000000*I*pi*x)
*sqrt(92821652156334811582567480952850314403/10*pi^2/(224*pi +
45*sqrt(448*pi + 2025) + 2025)
+ 98489794142024498175862287197250000*pi*sqrt(448*pi + 2025)
/(224*pi + 45*sqrt(448*pi + 2025) + 2025) +
7713517620898636162808584411766250000*pi
/(224*pi + 45*sqrt(448*pi + 2025) + 2025) +
659225266976959904108326638192187500*sqrt(448*pi + 2025)
/(224*pi + 45*sqrt(448*pi + 2025) + 2025) +
29665137013963195684874698718648437500
/(224*pi + 45*sqrt(448*pi + 2025) + 2025))
/(63*pi^2*x^4 - (504000*I*pi^2 + 67500*I*pi*(sqrt(448*pi + 2025) +
45))*x^3
- 3000000*(560224*pi^2 + 45*pi*(sqrt(448*pi + 2025) + 45))*x^2 +
8400000000000000000000*pi^2
- (-5040000000000000*I*pi^2 - 675000000000000*I*pi*(sqrt(448*pi +
2025) + 45))*x))
Single-line reformatted code (deleting blanks, indents and newlines, adding
a space before ‘+’ and ‘-‘)
g(x) = (3/174465461165747500*pi*(-1750000*I*pi*x^3 - 31250000*(224*pi +
45*sqrt(448*pi + 2025) + 2025)*x^2 +
17500000000000000*I*pi*x)*sqrt(92821652156334811582567480952850314403/10*pi^2/(224*pi
+ 45*sqrt(448*pi + 2025) + 2025) +
98489794142024498175862287197250000*pi*sqrt(448*pi + 2025)/(224*pi +
45*sqrt(448*pi + 2025) + 2025) +
7713517620898636162808584411766250000*pi/(224*pi + 45*sqrt(448*pi + 2025) +
2025) + 659225266976959904108326638192187500*sqrt(448*pi + 2025)/(224*pi +
45*sqrt(448*pi + 2025) + 2025) + 29665137013963195684874698718648437500/(224*pi
+ 45*sqrt(448*pi + 2025) + 2025))/(63*pi^2*x^4 - (504000*I*pi^2 +
67500*I*pi*(sqrt(448*pi + 2025) + 45))*x^3 - 3000000*(560224*pi^2 +
45*pi*(sqrt(448*pi + 2025) + 45))*x^2 + 8400000000000000000000*pi^2 -
(-5040000000000000*I*pi^2 - 675000000000000*I*pi*(sqrt(448*pi + 2025) + 45))*x))
Notwithstanding formatting differences, these functions should be equal ;
they are *not* :
sage: f(1).n()
418409.917305474 + 1.28757494213663e11*I
sage: g(1).n()
1.39111866114058e-12 + 6.95559330500736e-6*I
factor bug
sage: F = f.real()^2 + f.imag()^2
sage: Ff = (f.real()^2 + f.imag()^2).factor()
sage: G = g.real()^2 + g.imag()^2
sage: Gf = (g.real()^2 + g.imag()^2).factor()
sage: F(1).n()
1.65784923163565e22
sage: Ff(1).n()
4.77205703148314e29
sage: G(1).n()
4.83802782246652e-11
sage: Gf(1).n()
0.00139260822082924
These two bugs may have a common origin in SR code (pynac comes to mind).
My question is : how to file bugs about these ones, which seem extremely
serious (silent errors in basic symbolics abilities) ?
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/f1a2ed8a-0749-4e53-8784-864a5f2aa9can%40googlegroups.com.