Thanks for helping. I am trying to compute (not numericaly!) the roots
of a quadratic equation build from lagrange_polynomial()...
sage: p2 = SR(-3/4*pi)*x^2 + SR(7/4*pi)*x
sage: p2.roots(x)
[(7/3, 1), (0, 1)]
Now we are back to the original question: Why the following rise a
type error?? I guess
> I guess that the problem comes from the type of p1, not
> being an Expression. So is it possible to cast this p1 to the
> Expression class?
A direct conversion like the following works:
sage: p3 = 0
sage: for c in p1.coeffs():
: p3 = x*p3 + c
:
sage: p3
-3/4*pi + 7/4*pi*x
sage: type
Thanks for helping. I am trying to compute (not numericaly!) the roots
of a quadratic equation build from lagrange_polynomial()...
sage: p2 = SR(-3/4*pi)*x^2 + SR(7/4*pi)*x
sage: p2.roots(x)
[(7/3, 1), (0, 1)]
Now we are back to the original question: Why the following rise a
type error?? I guess
On 21 juin, 08:56, Wilfried Huss wrote:
> It works for me in Sage 4.3.3 and in 4.4.2.
You mean the call to polynomial.roots(x) did not launch any
exceptions?
It is not clear from your answer: I can't find a call to
polynomial.roots(x) in your session...
--
To post to this group, send email to s
Hi,
I can't figure out why the following commands ends with a TypeError
exception.
sage: basering = PolynomialRing(SR, 'x')
sage: polynomial = basering.lagrange_polynomial([(0,0), (1,pi), (2, pi/
2)])
sage:
polynomial.base_ring()
Symbolic Ring
sage:
type(polynomial)
sage:
polynomial.roots(x)
---
Hello Folks!
Could you help to debug the failure of the following test?
sage -t devel/sage/sage/interfaces/r.py
Sage was compiled from source (3.1.3) with export MAKE="make -
j8" (machine has 8 processors and run
RedHat Enterprise Linux 5, 64-bit version). I've upgraded to 3.1.4,
and g