Make Math Work
Calculate


Usage: Expression

Introduction
When no command is used, Make Math Work attempts to evaluate the entry as a mathematical expression, as if the expression were entered into a calculator. For example, you can enter the expression 3 + 5 which will evaluate to 8, just as if you had entered 3 + 5 into a calculator. Notice that no command was entered.
The calculator mode uses algebraic hierarchy. If 5 + 2 * 3 were entered, 2 * 3 would be calculated first, then its product added to 5. Parentheses may be used to force the order of evaluation, for example, (5 + 2) * 3 will evaluate to 21 since 5 + 2 is calculated first because its contained within parentheses; its sum of 7 is now multiplied by 3 for a result of 21.

Note that mathematical expressions can be substituted almost anywhere a number is required. The command Compare will evaluate which of two numbers, if either, is greater. Entering Compare 2, 3 will give the result of 2 < 3. You could also enter Compare 8/4, 1.5 * 2 and get the same result.

Operators
The following operators may be used in an expression.

+ Addition
- Subtraction
* Multiplication
/ Division
% Division when using fractions. See the Fractions link.
^ Raises a number to a power.
( ) Forces order of operations.


Functions
Functions perform specific mathematical operations on or in an expression. For example, the function INT will return the integer portion, that is, the portion to the left of the decimal point, of an expression. It is used like this: Int(2.6). which evaluates to 2. Functions will operate on expressions, so Int(1.2 + 1.8) will also evaluate to 2.

Functions can be nested, that is, a function can be used inside another function. To demonstrate, well introduce another function called SQRT which calculates the square root of an expression. SQRT( 7 + INT( 2.6 )) will evaluate to 3. Note that the functions used in the Compute statement are different from commands: these functions are allowed to operate in expressions.

Function List
These functions are available. Remember that the x and y in this list can be expressions, not just numbers.
POWER (x, y) exponentiation -- raises x to the power of y. This is the same as x ^ y. POWER( 3, 2 ) will return 9.
SQR(x) or SQRT(x)  returns the square root of x. SQRT( 16 ) will return 4.
ABS(x) or ABSVAL(x)  returns the absolute value of x. ABS( -2 ) will return 2.
SIN(x) or SINE(x)  returns the sine of x where x is in radians.
COS(x) or COSINE(x)  returns the cosine of x where x is in radians.
TAN(x) or TANGENT(x)  returns the tangent of x where x is in radians.
ARCSINE(x) or ASIN(x) returns in radians the arcsine of x.
ARCCOSINE(x) or ACOS(x)  returns in radians the arccosine of x.
ARCTANGENT(x) or ATAN(x)  returns in radians the arctangent of x.
SECANT(x)  returns the secant of x where x is in radians.
COSECANT(x)  returns the cosecant of x where x is in radians.
COTANGENT(x)  returns the cotangent of x where x is in radians.
ARCSEC(x)  returns the inverse secant of x.
ARCCOSEC(x)  returns the inverse cosecant of x.
ARCCOTAN(x)  returns the inverse cotangent of x.
INT(x) or INTEGER(x)  returns the integer portion of a decimal number. INT(3.2) will return 3.
FIX(x)  returns the rounded-up non-fractional portion of a decimal number.
FRAC(x)  returns the fractional portion of a decimal number.
LN(x) or LOGE(x)  returns the logarithm of x to the base e.
LOG(x) or LOGTEN(x)  returns the logarithm of x to the base 10.
LOGX(b,x)  returns the logarithm of x to the base b.
DEGTORAD(x)  converts degrees to radians.
RADTODEG(x)  converts radians to degrees.


Constants
These constants are available. They can be used as replacements for typing in the number itself.
E returns the natural logarithm e.
PI returns the ratio of the circumference of a circle to its diameter.


Examples
SIN(PI/4 >d4) returns a result of 0.7071.
SQRT( 9 * ( 4 + 5 )) returns a result of 9.
SIN( PI / 2 ) returns a result of 1.


 Try It   
 Enter an expression: