Formula
Ordinary precedence: factorial and percent bind tightest, then powers, then multiplication and division, then addition and subtraction. Functions take arguments in parentheses. atan2 takes two, separated by a comma. Percent is postfix and means “divide by 100”, so 50% is 0.5.
sin, cos, tan, asin, acos, atan use the angle mode
log is base 10, ln is natural log
a^b is a power, n! is factorial
The parser is recursive descent. Nothing is sent to the language’s eval. Division by zero and a factorial of a negative number are errors, not answers.
Worked examples
sin(30) in degrees. 0.5, displayed from the floating-point value 0.49999999999999994.
2 + 3 * 4 is 14, not 20. 2^10 is 1024. log(1000) is 3. ln(e) is 1. 5! is 120.
Reference
| Expression | Mode | Result |
|---|---|---|
| sin(30) | degrees | 0.5 |
| sin(pi/2) | radians | 1 |
| 2^10 | either | 1024 |
| 5! | either | 120 |
| log(1000) | either | 3 |
| 50% | either | 0.5 |
Questions
Which functions does this scientific calculator have?
Addition, subtraction, multiplication, division, powers with ^, parentheses, and percent as “divide by 100”. Functions: sin, cos, tan, asin, acos, atan, atan2, log (base 10), ln, sqrt, abs, exp, and factorial with ! or fact(). Constants: pi and e. Degrees are the default. There is a radians switch.
Does sin(30) equal 0.5?
In degrees, yes, to the digits that matter. The actual floating-point result is 0.49999999999999994, which this page rounds for display. sin(pi/2) in radians is 1. 2^10 is 1024. 5! is 120. log(1000) is 3.
Is the expression sent anywhere?
No. It is parsed in the browser by a small recursive-descent parser. It is not passed to eval, and it is not sent to a server. The expression is written into the address bar so a link reopens it.
Where did the old scientific calculator go?
Here. The previous calculator.pro scientific and graphing URLs redirect to this page. A graphing plotter is not included. The expression evaluator is.
Sources
- IEEE-754 floating point, via JavaScript Math. Degrees convert with π/180. Factorial is the product 1 × 2 × … × n for a whole number n.