EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 190

Radio Shack TRS-80 Model III
274 pages
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...
TRS-80 MODEL
III
CDBL
(x)
Returns
a double-precision representation of the argument. The value
returned will
contain 1
7
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
or even integers.
For
example CDBL (I%)/J% will return
a
fraction with
17
digits
of precision.
1 00 FOR l%
=
1
TO 25
: PRINT 1
/CDBL(I%), : NEXT
CINT(X)
Returns the largest integer not
greater than the argument.
For example,
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).
100K%
=
CINT(X#)
+ CINT(Y#)
COSfrj
Returns the cosine
of the argument (argument
must be in
radians). To obtain
the
cosine of
X when
X
is in degrees,
use COS(X*.
01745329).
100Y
=
COS(X +
3.3)
CSNG(x)
Returns
a
single-precision
representation
of
the argument.
When the
argument is
a
double-precision value,
it is returned
as six significant digits
with
'
'4/5
rounding"
in the least
significant digit
.
So
CSNG(
. 6666666666666667) is returned
as .
666667
;
CSNG(.3333333333333333)
is returned as
.333333.
100
PRINT
CSNG(A# +
B#)
180

Other manuals for Radio Shack TRS-80 Model III

Related product manuals