-
Notifications
You must be signed in to change notification settings - Fork 61
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
Incorrect precedence of //
in exponent when converting SymPy expression to Julia Expr
#474
Comments
Thanks for the report! A fix is coming soon. |
@jverzani Unfortunately I think the issue is more complicated than my example shows. However I did discover this issue when attempting to convert an expression to |
The fix I just merged basically throws in parentheses to evaluate ()^(). Before, without that the precedence rules were not consistent with the expression. Before tagging, can you send along your example that fails and I'll make sure this addresses that. Thanks! |
When converting a SymPy symbolic expression to a Julia
Expr
, if there is an integer-division in an exponent, the integer division is placed into the outputExpr
without parentheses to indicate precedence, which is incorrect.To reproduce:
Expected result:
As is, the returned
Expr
is interpreted as:(((1 / 2) * pi ^ -1)//4 * x ^ -1)
, which is incorrect.The text was updated successfully, but these errors were encountered: