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
JSPM OR Webpack AND Version
Neither, I'm using my own build system
Browser:
all
Language:
all
Current and expected behavior:
I don't know which one is wrong, but either / or * has the wrong associativity (they should have a left one). Or maybe * has precedence over / while they should have the same precedence!
Eg, 4/2*10 is equal to 20 since it is equivalent to (4/2)*10 but I get 0.2.
There is the same kind of error with 4-2+10 that should be equal to 12 but is reported as -8 by aurelia.
It took me a very long time to understand this was not a mistake on my side ^^.
What is the motivation / use case for changing the behavior?
Mathematical expressions have a very strong operator precedence/associativity acceptance. Everyone was taught those during school. I think it would be a very bad design decision to think this is a design choice.
Plus I think this is a regression because the expression looking like this in my code worked for some time.
The text was updated successfully, but these errors were encountered:
I'm submitting a bug report
Library Version:
1.4.1
Operating System:
Linux (KUbuntu 14.10)
Node Version:
10.4.1
NPM Version:
6.1.0
JSPM OR Webpack AND Version
Neither, I'm using my own build system
Browser:
all
Language:
all
Current and expected behavior:
I don't know which one is wrong, but either / or * has the wrong associativity (they should have a left one). Or maybe * has precedence over / while they should have the same precedence!
Eg,
4/2*10
is equal to20
since it is equivalent to(4/2)*10
but I get0.2
.There is the same kind of error with
4-2+10
that should be equal to12
but is reported as-8
by aurelia.It took me a very long time to understand this was not a mistake on my side ^^.
Here is a gist reproducing this: https://gist.run/?id=86a169dd2dea36afc86745cbe781d4dd
Mathematical expressions have a very strong operator precedence/associativity acceptance. Everyone was taught those during school. I think it would be a very bad design decision to think this is a design choice.
Plus I think this is a regression because the expression looking like this in my code worked for some time.
The text was updated successfully, but these errors were encountered: