CSGNetwork.com Free Information

Expression Evaluation Calculator

This calculator requires the use of Javascript enabled and capable browsers. This solves and displays the result of many JavaScript mathematical functions and expressions. There is assistance below to refresh your memory as to legitimate operators, as well as examples for each. This is a VERY COMPLEX calculator. Enter your expression and click on Evaluate. If you get a JavaScript error displayed in your browser, please try to enter the expression in a slightly different method. Refresh the page after every error. The expression example should equal 20. If you get an error or you get some other answer, cut and paste the example we have typed and click on Evaluate. Remember that JavaScript is case sensitive! See the examples below.

Expression Evaluation Calculator
=
Type an expression; for example, ((2*(6-1))/2)*4

Help


You can enter an expression such as 3/2 + 4*(12+3).

You can also enter JavaScript's Math properties and Methods.

For example, to find the value of pi(p), type:

 PI  (Important: JavaScript is case sensitive! PI is in Upper Case ONLY!.

To find the log of 3, type (Lower Case ONLY):

 log(3)

To find 2 raised to the 3rd power, type:

 pow(2,3)

To find the area of a 9 inch pizza (in sq. inches), type:

PI*pow(9/2,2)

Parentheses () can change the order of operations



----------Legitimate Math Operators (Order and hierarchy is IMPORTANT!)

+        add

-        subtract

/        divide

*        multiply

()       hierarchy - Example (4 + 1) / 2 or 4 + 1 / 2

%        modulus - Example (8 + 7) % 13 returns 2



----------Legitimate Comparison Operators -------------

==       equality - EXAMPLE 5 == 4 returns false

!=       inequality - EXAMPLE 5 != 4 returns true

<        less than - EXAMPLE 5 < 4 returns false

>        greater than - EXAMPLE 5 > 4 returns true

<=       less than or equal to - EXAMPLE 5 <= 4 returns false

>=       greater than or equal to - EXAMPLE 5 >= 4 returns true

&&       logical AND - EXAMPLE 5 > 4 && 3>4 returns false

||       logical OR - EXAMPLE 5 > 4 || 3>4 returns true

!        logical NOT - EXAMPLE !(5==5) returns false



----------Math properties (Constants.  Important: Upper Case ONLY!).

E        (Base of natural logs, about 2.718)

LN10     (Natural log of 10, about 2.302)

LN2      (Natural log of 2, about .693)

LOG2E    (Logarithm of E to base 2, about 1.442)

LOG10E   (Logarithm of E to base 10, about .434)

PI       (PI = ratio of circumference of circle to diameter, about 3.142)

SQRT1_2  (square root of 1/2, about .707)

SQRT2    (square root of 2, about 1.414)



----------Methods (Functions.  Important: Lower Case ONLY!)-----

abs(x)   (absolute value of x)

acos(x)  (arc cosine of x, in radians)

asin(x)  (arc sine of x, in radians)

atan(x)  (arc tangent of x, in radians)

ceil(x)  (next greater integer than x)

cos(x)   (cosine of x, x in radians)

exp(x)   (exponential function of x)

floor(x) (next smaller integer)

log(x)   (natural logarithm of x)

max(x,y) (maximum of x, y)

min(x,y) (minimum of x, y)

pow(x,y) (x raised to the y power)

random() (pseudo-random number, uniform between 0 and 1)

round(x) (rounds x to the nearest integer)

sin(x)   (sine of x, where x in radians)

sqrt(x)  (square root of x)

tan(x)   (tangent of x, where x is in radians)

Updated 8.12.11


Leave us a question or comment on Facebook
Search or Browse Our Site
Free Information Calculators and Converters

International Copyright Violation
Registered® Trademark™ and Copyright© 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved

Home | Advertising | Calculators and Converters | Contact Us | Javascript | Sitemap | Glossary | Top Free Apps