File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 57
57
sage: f
58
58
1 + z + 2*z^2 + 3*z^3 + 5*z^4 + 8*z^5 + 13*z^6 + O(z^7)
59
59
sage: f^-1
60
- 1 - z - z^2
60
+ 1 - z - z^2 + O(z^7)
61
61
sage: f + f^-1
62
62
2 + z^2 + 3*z^3 + 5*z^4 + 8*z^5 + 13*z^6 + O(z^7)
63
63
sage: g = (f + f^-1)*(f - f^-1); g
@@ -3448,11 +3448,12 @@ def _div_(self, other):
3448
3448
sage: 1 / f
3449
3449
Traceback (most recent call last):
3450
3450
...
3451
- ZeroDivisionError: cannot divide by a series of positive valuation
3451
+ ZeroDivisionError: cannot divide by 0
3452
3452
sage: L.options._reset()
3453
3453
"""
3454
- if self .is_one ():
3455
- return ~ other
3454
+ # currently __invert__ and _div_ behave differently with
3455
+ # respect to division by lazy power series of positive
3456
+ # valuation, so we cannot call ~other if self.is_one()
3456
3457
if not other :
3457
3458
raise ZeroDivisionError ("cannot divide by 0" )
3458
3459
You can’t perform that action at this time.
0 commit comments