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

Precedence of exponential versus implied multiplication #641

karenpb opened this Issue Apr 7, 2016 · 2 comments


None yet
3 participants

karenpb commented Apr 7, 2016

When I parse the expression 5^(2^3)(-2) to mathjs in the following way:

math.parse("5^(2^3)(-2)").toString({implicit: 'show'});

output: 5^((2^3)*(-2))

It is adding parenthesis around (2^3) and (-2). Does that mean in mathjs implied multiplication takes higher precedence than ^ operator?
I am actually expecting the output to be 5^(2^3)*(-2).

Is this a bug?


This comment has been minimized.


FSMaxB commented Apr 7, 2016

According to the list of operator precedence it is a bug.

@FSMaxB FSMaxB added the bug label Apr 7, 2016

@josdejong josdejong closed this in cb4a1a9 Apr 16, 2016


This comment has been minimized.


josdejong commented Apr 16, 2016

This bug is fixed in v3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment