Hacker News new | ask | show | jobs
by andrerobot 5778 days ago
I've used cheap scientific calculators that perform operations from left to right. It's awful when you are answering a uni exam and you don't know why the results you get looks fishy.

On computer calculators, I always type "1 + 2 * 3 =" as "2 * 3 =", "+ 1 =" because I learned the hard way that I can't asume that a calculator is going to respect order of precedence or not.

1 comments

I think the first calculator I used was one of those. It took me till college and programming before I really properly learned precedence because I never trusted any calculator I was using, and always used parentheses.

This also kind of influences my programming, probably for the better - I would rather use parens and be clear than be ambiguous and trust that my interpreter and I agree on what has proper precedence.