G.I.F.T. Animated Logo.

General Information, Facts & Tables
[Expression Solving Calculator]

View a framed version of this site.View the list of all pages on this site. Search the content of this site by keyword.

Page Topics:

Overview

top of page

The calculator below can be used to solve any valid numeric expression using normal operators and Javascript functions. This calculator is also useful for Javascript programmers wishing to test expressions. Brackets "(" and ")" can be used to change the order of operation.

Instructions

  • Enter an expression in the expression control and press the "Calculate" button to have it solved.
  • To insert a function or constant, select the desired item from the "Functions / Constants" drop down list, then press the adjacent "Insert" button to insert the selected item at the end of any existing text in the "Expression" control. Replace the text "num1" and "num2" in the "Expression" control with the desired numeric values, then press the "Calculate" button.
  • To use a "Sample Expression", select the desired expression from the "Sample Expressions" drop down list, then press the adjacent "Insert" button to insert the selected expression in the "Expression" control. Replace the text as instructed in the description of the "Sample Expressions" item with the desired numeric values, then press the "Calculate" button.
  • The "G.I.F.T. Cookie Clipboard" can be used to exchange numeric values with other calculators on this site.

See Also: Open Another, Using the Calculators
 

Calculator

top of page

Expression:

  

Result:

 

Functions / Constants:

 

Sample Expressions:

 

 

Javascript Functions

top of page

List of operators, constants, functions and their syntax. (Note! all are case sensitive)

Operators

 

+

Addition

-

Subtraction

*

Multiplication

/

Division

Constants

 

Math.E

Returns (E) Euler's constant. (2.718281828459045)

Math.LN10

Returns the natural logarithm of 10 (2.302585092994046).

Math.LN2

Returns the natural logarithm of 2 (0.6931471805599453)

Math.LOG10E

Returns the base 10 logarithm of E (0.4342944819032518)

Math.LOG2E

Returns the base 2 logarithm of 2 (1.4426950408889633).

Math.PI

Returns the numeric value of pi (3.141592653589793)

Math.SQRT1_2

Returns the square root of 1/2. (0.7071067811865476)

Math.SQRT2

Returns the square root of 2 (1.4142135623730951).

Functions

Functions return values based on the variables (in brackets) passed to them.

Math.pow(num1, num2)

Returns the number expressed to a power. "num1""num2"

Math.abs(num1)

Returns the absolute value of "num1".

Math.acos(num1)

Returns the arc cosine of "num1" in radians.

Math.asin(num1)

Returns the arc sine of "num1" in radians.

Math.atan(num1)

Returns the arc tangent of "num1" in radians.

Math.atan2(numX,numY,)

Returns the angle of the polar coordinate corresponding to ("numX","numY").

Math.ceil(num1)

Returns the least integer that is greater than or equal to "num1".

Math.cos(num1)

Returns the cosine of "num1" in radians

Math.exp(num1)

Returns the exponential value of "num1".

Math.floor(num1)

Returns the integer component of "num1".

Math.log(num1)

Returns the natural logarithm of "num1";

Math.max(num1,num2)

Returns the maximum of "num1" and "num2".

Math.min(num1,num2)

Returns the minimum of "num1" and "num2"

Math.random(num1)

Returns a random number up to the value of "num1".

Math.round(num1)

Returns "num1" rounded to the nearest integer.

Math.sin(num1)

Returns the sine of "num1" in radians.

Math.sqrt(num1)

Returns the square root of "num1".

Math.tan(num1)

Returns the tangent of "num1" in radians.