科学计算器
不使用 eval,计算算术、乘方和弧度制三角函数。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
Type a whole expression the way you would write it on paper and get the result: brackets, + − × ÷, powers with ^, square roots, sine, cosine, tangent and their inverses, natural and base-10 logarithms, exponentials, absolute value, floor and ceiling, plus the constants pi and e. The expression is read by a small mathematical parser rather than run as code, so nothing typed can execute in your browser.
Trigonometric functions use radians, as in most programming languages and spreadsheets. To work in degrees, multiply the angle by pi/180 first.
使用方法
- Type the expression, for example sqrt(81) + sin(pi / 2).
- Use ^ for powers, ln for natural log and log for base-10 log.
- Run it to get the result.
- If you get an error, check brackets and that every function has its argument in parentheses.
计算原理
The expression is tokenized and evaluated with operator precedence (brackets, then ^ right to left, then unary minus, then × and ÷, then + and −). Functions: sqrt, sin, cos, tan, asin, acos, atan, abs, ln, log (base 10), exp, floor, ceil. Results that are not finite numbers, such as division by zero, are rejected.
计算示例
Checking a computer-science exercise, 2^10 − log(1000) × 3 evaluates to 1,015: 2^10 is 1,024, log(1000) is 3, and 3 × 3 = 9 is subtracted. In another problem, cos(pi/3) + sqrt(2)^2 gives 2.5.
局限性
- Real numbers only; square roots of negative numbers are rejected.
- Up to 500 characters and 40 levels of nesting.
- No memory, variables or history.
最后更新:
常见问题
Does it use degrees or radians?
Radians. For sin(30°), enter sin(30 * pi / 180), which gives 0.5.
Is log base 10 or base e?
log is base 10 and ln is the natural logarithm (base e).
Why is 1/0 rejected?
Division by zero has no finite value, so it is reported as an error rather than shown as infinity.
故障排除
It says the input is invalid.
Check for implicit multiplication such as 2pi or 3(4+1); write 2*pi and 3*(4+1).
sin(90) is not 1.
The angle is in radians. Use sin(pi/2) or sin(90 * pi / 180).
−2^2 gives −4.
Powers bind tighter than a leading minus, as in standard notation. Write (−2)^2 for 4.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。