Appendix: Mathematical Functions
The mathematical functions supported by the AppletQuiz applet are:
- ABS(expression)
- The absolute value function - returns the absolute value of
"expression"
- ACOS(expression) - also ACO(expression)
- The arc cosine (or inverse cosine function) - returns
arccos(expression) (also called cos-1(expression)) in
radians, where "expression" must evaluate to a numeric value in
the interval [-1, 1]. The return value of the function is a value
(in radians) in the interval [0, ¹].
- ASIN(expression) - also ASI(expression)
- The arc sine (or inverse sine function) - returns
arcsin(expression) (also called sin-1(expression)) in
radians, where "expression" must evaluate to a numeric value in
the interval [-1, 1]. The return value of the function is a value
(in radians) in the interval [-¹/2, ¹/2].
- ATAN(expression) - also ATN(expression)
- The arc tangent (or inverse tangent function) - returns
arctan(expression) (also called tan-1(expression)) in
radians, where "expression" must evaluate to a numeric value. The
return value of the function is a value (in radians) in the
interval [-¹/2, ¹/2].
- COS(expression)
- The cosine function returns cos(expression), where
"expression" must evaluate to a numeric value in radians. The
return value of the function is a value in the interval [-1. 1].
- EXP(expression)
- The exponential function (expression) returns the value of the
transcendental number e (approximately 2.71...) to the
"expression" power. "Expression" must evaluate to a numeric value.
The function returns a non-negative value.
- INT(expression)
- The greatest integer function returns the greatest integer
less than or equal to the value of "expression". "Expression" must
evaluate to a numeric value. The function always returns an
integer value.
- LOG(expression)
- The natural logarithm function, (commonly written as ln x)
returns the natural (base e) logarithm of "expression".
"Expression" must evaluate to a positive value.
- PI
- The transcendental number ¹ (approximately 3.14159...). Takes
no arguments or parentheses.
- RND()
- The random decimal function takes no argument. It returns a
decimal value in the range [0, 1).
- RNI(min, max)
- The random integer function requires two integer arguments,
where min < max. It returns a "random" integer in the interval
[min, max].
- SIN(expression)
- The sine function returns sin(expression). "Expression" must
evaluate to a numeric value. The function returns a value in the
interval [-1, 1].
- SQRT(expression) - also SQR(expression)
- The square root function returns the square root of
"expression". Expression must evaluate to a non-negative numeric
value. The function returns a non-negative value.
- TAN(expression)
- The tangent function returns the tangent of "expression",
where "expression" evaluates to a numeric value in radians, which
cannot be any integral multiple of ¹/2.
copyright © 1998 by Jerry L. Stanbrough - all rights reserved.
last update July 29, 1998 by JL Stanbrough
(jstanbro@venus.net)