Skip to content

Precedence of exponential versus implied multiplication #641

@karenpb

Description

@karenpb

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions