Open eviatarbach opened 11 years ago
Description changed:
---
+++
@@ -17,3 +17,5 @@
sage: diff(SR(p.polynomial()))
6*t + 2
+ +Or maybe just raise an error (as per #13360)?
Description changed:
---
+++
@@ -1,4 +1,4 @@
-Coercing a power series to the symbolic ring doesn't work as expected:
+Converting a power series to the symbolic ring doesn't work as expected:
sage: R.
-Perhaps it could be converted to a polynomial first and then coerced to the symbolic ring?
+Perhaps it could be converted to a polynomial first and then converted to the symbolic ring?
sage: SR(p.polynomial()).variables()
The examples here refer to conversion; not coercion. That fact that power series over "basic" ring types such as rationals or integers don't convert into SR is, I think, a shortcoming that can be fixed. The main thing is to find how to represent the relevant "big-Oh" in SR. Maxima does have power series, so there is at least one back-end that provides some support: http://maxima.sourceforge.net/docs/manual/en/maxima_28.html#IDX1221. Linking up maxima's internal format with sage might need some work:
sage: F=maxima_calculus('taylor(sin(x),x,0,3)')
sage: F
x-x^3/6
sage: F.ecl()
<ECL: ((MRAT SIMP (((%SIN SIMP) $X) $X) (#:|sin(x)2136| #:X2137)
(($X ((3 . 1)) 0 NIL #:X2137 . 2)) TRUNC)
PS (#:X2137 . 2) ((3 . 1)) ((1 . 1) 1 . 1) ((3 . 1) -1 . 6))>
sage: F-x+x^3/6
+0
sage: (F-x+x^3/6).ecl()
<ECL: ((MRAT SIMP ($X) (#:X2145) (($X ((3 . 1)) 0 NIL #:X2145 . 1)) TRUNC) 0 . 1)>
(in maxima this prints with dots, so it knows it's a power series)
seems fixed?
Converting a power series to the symbolic ring doesn't work as expected:
Perhaps it could be converted to a polynomial first and then converted to the symbolic ring?
Or maybe just raise an error (as per #13360)?
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/14693