BASIC
HiA-i
(X)
Returns the
"natural exponential" ofx, that is
e
x
.
This is the inverse
of the LOG
function, so
X
=
EXP(LOG(X)).
100 PRINT EXP(-X)
¥lX(x)
Returns
a truncated representation of
the argument. All digits to the right of the
decimal
point
are
simply chopped off,
so the resultant value is an integer. For
non-negative
X, FIX(X)
=
INT(X). For
negative values of x, FIX(X)
=
INT(X)
+ 1 . For
example,
FIX(2.2) returns
2,
and
FIX(
-
2.2)
returns
-
2.
100Y
=
ABS(A-FIX(A))
This statement gives
Y
the
value of the fractional portion
of A.
INTfxj
Returns
an integer representation of
the argument, using the largest whole
number
that is not greater than the argument.
Argument is
not
limited
to
the
range
—
32768
to
+ 32767. The result is stored
internally as
a
single-precision
whole number.
INT(2.5)
returns 2; INT(- 2.5) returns
-
3;
and
INT( 100010 1 .23) returns
1000101.
100Z
=
INT(A*100 +
.5)/100
Gives
z
the
value of A
rounded
to two decimal places (for non-negative
A).
LOGfxj
Returns the
natural logarithm of the argument, that is, log
e
(argument). This is the
inverse of the EXP function, so X
=
LOG(EXP(X)). To find the logarithm of
a
number
to another base
b,
use the formula
LOGb
(X)
=
LOG
e
(x)/LOG
e
(b).For example,
LOG(32767)/LOG(2)
returns the logarithm to base 2 of
32767.
100
PRINT
LOG(3.3*X)
181