Javascript Calculator
This is a simple calculator you can use to do all kind of calculations you might need.
Write some mathematical expression e.g. 1+2*3 and press Calculate to
get the result. If your expression has problems, you get an error dialog.
Examples of supported functions:
- Power functions: sqrt(x) square root of x, pow(x, n) x to the power of n, log(n) natural logarithm of n, exp(n) e to the power of n
- Trigonometric Functions: cos(x), sin(x), tan(x) (parameter x is in radians, PI radians = 180 degrees)
- Inverse Trigonometric Functions: acos(y), asin(y), atan(y) (return values are in radians)
- Rounding Functions: round(x) round to nearest integer, floor(x) rounds down to the nearest integer, ceil(x) rounds up to the nearest integer
- Random: random() gives random value between 0 and less than 1
- List operations: min(a, b, c) returns the lowest value from list, max(a, b, c) returns the highest value from list
- Other operations: abs(a) absolute value of a
Examples of supported named constants:
- E = The base of the natural log system = 2.718281828459045
- LN10 = Natural logarithm of 10 = 2.302585092994046
- PI = Ratio of circle circumference to diameter = 3.141592653589793
- SQRT1_2 = Square root of 1/2 = 0.7071067811865476
- SQRT2 = Square root of 2 = 1.4142135623730951
All the functions and mathmetical constants of Javascript Math library are in use.
There are some differences how well old browsers implemented JavaScripts, but the listed functions should work with all modern browsers.