Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
armadillowarran
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
armadillowarran
14y ago
I find it interesting you feel this way. In my experience, it is pretty well defined: 0. Evaluate (the inside of!) parenthesis, then 1. Evaluate exponentials, then 2. Evaluate division and multiplication operators, left to right e.g. 1
2.
▲
by
armadillowarran
14y ago
6/2(1+2)=6/2*(1+2)=6/2*3=(6/2)*3=(3)*3=9 This is pretty well defined, I feel: - Expand implicit multiplication to explicit multiplication (e.g. 2(1+2) becomes 2*(1+2)) - Left-to-right precedence for operators of equal-precedence (di