Remote-processing BASIC 52 Uživatelský manuál Strana 119

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 163
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 118
RPBASIC-52 PROGRAMMING GUIDE
2-100
SIN
Syntax: SIN(expr)
Function: Returns the trigonometric S INE of expr which is assum ed to be in radians. The value of expr must be
in the range of +/- 200,000.
Mode: Command, run
Use: PRINT SIN(PI/2)
Cards: All
DESCRIPTION
SIN, COS, and TAN operators use a Taylor series to calculate the function. These operators first reduce the
argument to a value that is between 0 and PI/2. the algorithm used to reduce the value will reduce accuracy
when value is large. To maintain accuracy, keep the arguments for trig functions as small as possible.
ERRORS
ARITH. UNDERFLOW value or result is less than RPBASIC-52's smallest floating-point value of ± 1E-127
ARITH. OVERFLOW value or result is greater than RPBASIC-52's largest floating-point value of
±.9999999E+127
DIVIDE BY ZERO Attempt to take TAN(X) when COS(PI/2) = 0
EXAMPLES
10 PRINT SIN(PI/2),COS(10*PI),TAN(8*PI/4)
20 PRINT ATN(PI)
>run
1 1 0
1.2626272
Zobrazit stránku 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 162 163

Komentáře k této Příručce

Žádné komentáře