sympy/sympy-rational-exponent.patch

15 lines
693 B
Diff

--- a/sympy/polys/ring_series.py 2021-09-30 16:23:28.000000000 -0600
+++ b/sympy/polys/ring_series.py 2021-10-08 13:43:30.746068783 -0600
@@ -989,6 +989,11 @@ def rs_nth_root(p, n, x, prec):
except ValueError: # as exponent
raise DomainError("The given series can't be expanded in "
"this domain.")
+ except TypeError:
+ try:
+ const = R(c**QQ(1, n))
+ except ValueError:
+ raise DomainError("The given series can't be expanded in this domain.")
res = rs_nth_root(p/c, n, x, prec)*const
else:
res = _nth_root1(p, n, x, prec)