You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2020. It is now read-only.
pm is used to show plus-minus, is yet not implemented into sympy. #5305
Example latex: \frac{-b\pm\sqrt{b^2-4ac}}{2a}
when converted into sympy using latex2sympy, I get -b*pm*sqrt(-4*a*c + b**2)/(2*a)
So, the undefined pm simply gets multiplied. Hence getting wrong expression.
It should have probably shown an error.
In fact, any undefined thing simply gets multiplied
Ex: -b*pm*blabla*(-4*a*c + b**2)/(2*a)
The text was updated successfully, but these errors were encountered:
Maybe \pm should be blacklisted as an invalid symbol because it produces such an unexpected result.
In regards to \blabla or something like that, I don't think it's a good idea to have a whitelist of valid symbols because it would be hard to account for the variety of symbols that people would want to use.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
pm is used to show plus-minus, is yet not implemented into sympy. #5305
Example latex: \frac{-b\pm\sqrt{b^2-4ac}}{2a}
when converted into sympy using latex2sympy, I get
-b*pm*sqrt(-4*a*c + b**2)/(2*a)
So, the undefined pm simply gets multiplied. Hence getting wrong expression.
It should have probably shown an error.
In fact, any undefined thing simply gets multiplied
Ex:
-b*pm*blabla*(-4*a*c + b**2)/(2*a)
The text was updated successfully, but these errors were encountered: