-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugUnintended behavior resulting from a logical errorUnintended behavior resulting from a logical error
Description
Hi, nice library. lightweight and so useful.
But trying to make a app, I note that some expressions are not parsed correctly:
Complex.compile('1/a*b*c',['a','b','c'])
returns a optimized function in the browser:
ƒ: anonymous(Complex,a,b,c) {
return this[0].divide(a.multiply(b)).multiply(c)
}
and
Complex.compile('(1/a)*b*c',['a','b','c'])
returns
ƒ: anonymous(Complex,a,b,c) {
return this[0].divide(a).multiply(b).multiply(c)
}
that are different expressions.
*
and /
operators should be the same precedence and the correct result is the last (a chain of operators without grouping).
Thanks
complex-js version: 5.0.0
Metadata
Metadata
Assignees
Labels
bugUnintended behavior resulting from a logical errorUnintended behavior resulting from a logical error