TRS-80
MODEL III
CDBL(x)
Returns a double-prec
ision
representation
of
the argument. The value returned will
contain
17
digits, but
only
the digits
contained
in the argument will be significant.
CDBL
may be useful
when
you want
to
force an operation to be done in
double-precision,
even
though the operands are single precision oreven integers.
Forexample
CDBL
(1%
)/1% will return a fraction with
17
digits
of
precision.
100 FOR
1%
= 1
TO
25:
PRINT 1/CDBL(l%), : NEXT
CINT(x)
Returns the largest
integer
not greater
than
the
argument. Forexample,
CINT
(1.5)
returns
1;
CINT(
-
1.5)
returns - 2.
For
the
CINT
function, the argument must be in
the range
- 32768 to + 32767.
The
result is stored internally as a two-byte integer.
CINT
might be used to speed up an operation involving single
or
double-precision
operands without
losing
the precision
of
the operands (assuming
you're
only
interested in an
integer
result).
100
KO/o
=
CINT(X#)
+ CINT(Y
#)
COS
(X)
Returns the cosine
of
the
argument
(argument
IlIUst
be in radians).
To
obtain the
cosine
ofx
whenX is
in
degrees, useCOS(x* .01745329).
100Y = COS(X+3.3)
cSNG(x)
Returns a single-precisionrepresentation
of
the argument. When the argument is a
double-precision value, it is returned
as
six significantdigits
with'
'4/5 rounding"
in the least significant digit. So
CSNG(.
6666666666666667) is returned as .666667;
CSNG(.3333333333333333) is returned as
.333333.
100PRINT CSNG
(A#
+
B#)
7/2