EasyManua.ls Logo

Sharp MZ-800 - Page 185

Sharp MZ-800
221 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Arithmetic
functions
ABS
(X)
A=ABS
(X)
Assigns
the
absolute
value
of
variable
|X)
to
variable
A.
Example:
A=
ABS
(2.9)+A=2.9
A=ABS
(—5.5)"A=5.5
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
when
A=3;0
(X=0)
A=SGN
(0.4)
is
executed.
—1(X<0)
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
SIN
(X)
A=SIN
(X)
A=SIN(30*PAN1)/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
+/180
radi-
ans,
the
value
in
radians
is
obtained
by
multiplying
the
number
of
degrees
by
PAI(1)/180.
For
example,
30°
=
30*
PAI(1)/180
radians.
The
same
applies
to
the
COS,
TAN,
and
ATN
functions.
COS
(X)
A=COS
(X)
Assigns
the
cosine
of
X
(where
X
is
in
radians)
to
variable
A.
A=COS
(200
+
PAI(1)/180)
TAN
(X)
A=TAN
(X)
Assigns
the
tangent
of
X
(where
X
is
in
radians)
to
variable
A.
A
=TAN(Y
*PAI(1)/180)
ATN
(X)
A=ATN
(X)
Assigns
the
arctangent
in
radians
of
X
(tan'X)
to
variable
A.
The
A=180/PAI(1)*ATN(X)
value
returned
will
be
in
the
range
from
—z/2
to
1/2.
SQR
(X)
A=SOR
(X)
Calculates
the
square
root
of
X
and
assigns
the
result
to
variable
A.
X
must
be
a
positive
number
or
0.
EXP
(X)
A=EXP
(X)
Calculates
the
value
of
e*
and
assigns
the
result
to
variable
A.
LOG
(X)
A=LOG
(X)
Calculates
the
common
logarithm
of
X
(logio
X)
and
assigns
the
result
to
variable
A.
LN
(X)
A=LN
(X)
Calculates
the
natural
logarithm
of
X
(loge
X)
and
assigns
the
result
to
variable
A.
PAI
(X)
A=PAI
(X)
Assigns
the
value
to
variable
A
which
is
X
times
the
value
of
7.
RAD
(X)
A=RAD
(X)
Converts
the
value
of
X
(where
X
is
in
degrees)
to
radians
and
as-
signs
the
result
to
variable
A.
9-10

Other manuals for Sharp MZ-800

Related product manuals