How Scientific calculator works
The scientific calculator evaluates whole expressions, not just one operation at a time. Type something like 2*sin(pi/4)^2 + ln(e) and get the answer instantly, with correct operator precedence, parentheses, powers, trigonometry (sin/cos/tan and their inverses), logarithms (log, ln), square root, exp, abs, and the constants π and e. A degree/radian switch controls the trig functions.
The expression is parsed by a shunting-yard tokeniser rather than JavaScript eval, so a stray bracket or unknown name returns a clear error instead of running arbitrary code.