menu
Tool Player
search
Home
>
Tools
>
Evaluate math expression
Evaluate math expression
Evaluates a specified math expression. Refer to
Math.js
for the supported expressions.
See examples.
Examples
1.
Calculations
Input
2 + 3 2 * 3 2 + 3 * 4 (2 + 3) * 4 sqrt(3^2 + 4^2) sqrt(-4) cos(45 deg) 2 inch to cm
85
Output
0
Reset
2.
Define variables and functions
Input
x = 7 / 2 x + 3 f(x, y) = x^y f(2, 3)
37
Output
0
Reset
3.
Manipulate matrices
Input
k = [1, 2; 3, 4] l = zeros(2, 2) l[1, 1:2] = [5, 6] l l[2, :] = [7, 8] l m = k * l n = m[2, 1] n = m[:, 1]
106
Output
0
Reset
Examples end here.
Hide examples.
Input
content_copy
undo
redo
fullscreen
Output
refresh
content_copy
fullscreen
Enter one string per line in the input box.