INT - Integer
IN
T
(n
umeric-expression)
The
integer function givcs you the
largcst
integer
that
is not
greater
than
the
argument.
The
argument
is
the
value
obtained
when
the
numeric-expression is evaluated.
The
normal
rules
for
evaluating
numeric
cxprcssions
arc
used here.
The
integ-er
fUllctiulI
always gives you the closest
integer
which is to the left
of
the
number
specified on the
number
line.
Thus,
for positive
numbers,
thc
dccimal
portion is
dropped:
for negative
numbers,
the
next
smallest
integer value is used (i.e.,
INT(
- 2.3) = - 3).
If
you specify
an
integer, then the
same
integer
is given.
Examples:
>NEW
>100
8=.678
>110
A=INT{6·1oo+.Sl/100
>120 PRINT
A;INT(8)
>130 PRINT
INT(-2.3);INT(2.2)
>140
STOP
>RUN
.68
a
-3
2
**
DONE
**
LOG
-
Natural
Logarithm
LOG(
numerie-expression)
The
natural
logarithm function gives you
the
natural
logarithm
of
the
number
specified by
the
argument.
The
argument
is
the
value
obtained
when
the
numeric-expression is pvaluated
The
normal
rules
for the
evaluation
of
numeric
expressions
are
used here.
The
natural
logarithm of x is usually
shown
as: log,.(x).
The
logarithm function is
the
inv('rsf> of
the
f'xponf'.nt;;:J1
fllnr:tion
(EXP).
Thus,
X =
LOG(EXP(X)),
The
argument
of
the
natural
logarithm function
must
be
greater
than zero,
If
you specify a
value
for the arg-ument which
is
less
than
or equal to zero, the
message
"'BAD
ARGUMENT"
is displayed,
and
the
program
stops
running.
If
you
want
to find
the
logarithm of a
number
in
another
base. B,
use this formula.
logll(X)
= log.(X)/loge(B)
For
example.
log,o(3) =log.(3)/loge(lO)
II·94
>NEW
>100
A"3.5
>110
PRINT
LOG(A);LOG(A*2)
>120
PRINT
LOG(EXP(2))
>130
STOP
>RUN
1.252762968
1.945910149
2.
**
DONE
**
>PRINT
LOG(-3l
*
BAD
ARGUMENT
>PRINT
LOG(3)/LOG(10)
.4771212547
User's Reference Guide