Radio Shack CTR-118 User Manual Page 90

  • Download
  • Add to my manuals
  • Print
  • Page
    / 196
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 89
7-2
CDBL
(x)
Returns a double-precision 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 or even
integers. For example CDBL (I%)/J% will return a fraction with 17 digits of
precision.
100 FOR I%=1 TO 25: PRINT 1/CDBL(I%),: NEXT
CINT
(x)
Returns the largest integer not greater than the argument. For example,
LINT (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 K%=CINT(X#)+CINT(Y#)
COS
(x)
Returns the cosine of the argument (argument must be in radians). To obtain
the cosine of X when X is in degrees, use CGS(X*.01745329).
100 Y=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#)
Page view 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 195 196

Comments to this Manuals

No comments