I get an error for the following code:
R.<q>=LaurentSeriesRing(QQ,1)
O(q)+q^2
Any explanation? (works for PowerSeriesRing) Here is the error:
Error in lines 2-2 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 996, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "sage/structure/element.pyx", line 1192, in sage.structure.element.Element.__add__ (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/element.c:10640) return (<element>left)._add_(right) File "sage/rings/laurent_series_ring_element.pyx", line 622, in sage.rings.laurent_series_ring_element.LaurentSeries._add_ (/ext/sage/sage-8.0/src/build/cythonized/sage/rings/laurent_series_ring_element.c:8637) return right.add_bigoh(self.prec()) File "sage/rings/laurent_series_ring_element.pyx", line 691, in sage.rings.laurent_series_ring_element.LaurentSeries.add_bigoh (/ext/sage/sage-8.0/src/build/cythonized/sage/rings/laurent_series_ring_element.c:9742) u = self.__u.add_bigoh(prec - self.__n) File "sage/rings/power_series_ring_element.pyx", line 797, in sage.rings.power_series_ring_element.PowerSeries.add_bigoh (/ext/sage/sage-8.0/src/build/cythonized/sage/rings/power_series_ring_element.c:9029) return self._parent(v, prec) File "sage/structure/parent.pyx", line 936, in sage.structure.parent.Parent.__call__ (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/parent.c:9826) return mor._call_with_args(x, args, kwds) File "sage/structure/coerce_maps.pyx", line 173, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/coerce_maps.c:5322) raise File "sage/structure/coerce_maps.pyx", line 166, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/coerce_maps.c:5161) return C._element_constructor(x, *args) File "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/rings/power_series_ring.py", line 783, in _element_constructor_ raise ValueError("prec (= %s) must be non-negative" % prec) ValueError: prec (= -1) must be non-negative