New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecursionError for unevluated expression in latex #22788
Comments
I presume that |
@oscarbenjamin, yes. |
@oscarbenjamin, @proy87 |
Yeah it's getting error trying to do this |
The error is here: Lines 567 to 572 in 7dbc2f4
The problem is that in this case: In [5]: z
Out[5]:
1
──
8
ⅈ
In [6]: fraction(z, exact=True)
Out[6]: (1, 1) When we call diff --git a/sympy/simplify/radsimp.py b/sympy/simplify/radsimp.py
index 91078be..6d18499 100644
--- a/sympy/simplify/radsimp.py
+++ b/sympy/simplify/radsimp.py
@@ -1089,11 +1089,11 @@ def fraction(expr, exact=False):
denom.append(b)
elif exact:
if ex.is_constant():
- denom.append(Pow(b, -ex))
+ denom.append(Pow(b, -ex, evaluate=not exact))
else:
numer.append(term)
else:
- denom.append(Pow(b, -ex))
+ denom.append(Pow(b, -ex, evaluate=not exact))
elif ex.is_positive:
numer.append(term)
elif not exact and ex.is_Mul: |
Thanks @oscarbenjamin I will make the changes quick. |
latex(Mul(Pow(Integer(2), Integer(-1), evaluate=False), Add(Integer(1), i, evaluate=False), Add(Integer(1), Pow(i, Integer(-8), evaluate=False), evaluate=False), evaluate=False))
The text was updated successfully, but these errors were encountered: