Built-In Function - Sharp MZ-700 Series Owner's Manual

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2.4
Built-in Function
Function
BASIC
symbol
Example
Description
Absolute
value
ABS (X)
A - ABS (X)
Assigns the absolute value of variable | X | to vairable A.
Example:
A = ABS (2. 9) ->A - 2 . 9
A = ABS ( - 5 . 5) -»A = 5 . 5
Sign
SGN (X)
A - SGN (X)
Assigns the numeric sign of variable X to variable A.
If the value of X is negative, — 1 is assigned to A; if X is 0,
0 is assigned to A; and if X is positive, 1 is assigned to A.
[ 1
(X > 0)
Example: 1 is assigned to variable
A =
0
(X = 0)
A when A = SGN (0.4)
' - 1
(X < 0)
is executed.
Integer
conver-
sion
INT (X)
A = INT (X)
Assigns the greatest integer value to A which is less than
or equal to the value of variable X.
Examples: A = INT (3. 87)
->A - 3
A = INT (0. 6)
^ A = 0
A = INT ( - 3 . 87) ->A = - 4
Trigono-
metric
functions
SIN (X)
A = SIN (X)
A=SIN(30XPAI(1/180)
Assigns the sine of X (where X is in radians) to variable A.
If the value of X is in degrees, it must be converted to
radians before this function is used to obtain the sine. Since
1 degree equals 7r/180 radians, the value in radians is
obtained by multiplying the number of degrees by PAI(l)/
180. For example, 30° = 3 0 * PAI(1)/180 radians. The same
applies to the COS, TAN, and ATN functions.
Trigono-
metric
functions
COS (X)
A = COS (X)
A=COS
(200XPAI(1)/180)
Assigns the cosine of X (where X is in radians) to variable A.
Trigono-
metric
functions
TAN (X)
A = TAN (X)
A=TAN(YXPAI(1)/180)
Assigns the tangent of X (where X is in radians) to
variable A.
Trigono-
metric
functions
ATN (X)
A = ATN (X)
A=180/PAI(1)XATN(X)
Assigns the arctangent in radians of X (tan
- 1
X) to variable
A. The value returned will be in the range from —PI/2 to
PI/2.
Square
root
SQR (X)
A = SQR (X)
Calculates the square root of X and assigns the result to
variable A. X must be a positive number or 0.
Exponen-
tiation
EXP (X)
A = EXP (X)
Calculates the value of e
x
and assigns the result to variable
A.
Common
logarithm
LOG (X)
A = LOG (X)
Calculates the common logarithm of X (log
1 0
X) and assigns
the result to variable A.
Natural
logarithm
LN
(X)
A = LN (X)
Calculates the natural logarithm of X (loge X) and assigns
the result to variable A.
Ratio of
circum-
ference to
diameter
PAI (X)
A - PAI (X)
Assigns the value to variable A which is X times the value
of PI.
Radians
RAD (X)
A = RAD (X)
Converts the value of X (where X is in degrees) to radians
and assigns the result to variable A.

Advertisement

Table of Contents
loading

Table of Contents