Remote-processing BASIC 52 Manuale Utente Pagina 23

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 163
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 22
RPBASIC-52 PROGRAMMING GUIDE
2-4
ATN
Syntax: ATN(expr)
Where: expr = value betw een 0 and PI/2
Function: Returns a trigonometric arc-tangent of expr. Returned result is between -PI/2 and PI/2 radians.
Mode: Command, run
Use: PRINT 4*ATN(1)
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 expr is large. To maintain accuracy, keep the arguments for trig functions as small as possible.
ERRORS
ARITH. UNDERFLOW expr or result is less than RPBASIC-52's smallest floating-point value of ±1E-127
ARITH. OVERFLOW expr 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
100 PRINT SIN(PI/2),COS(10001*PI),TAN(5*PI/4)
110 PRINT ATN(TAN(PI/4))/PI
>run
1 -1 1
.24999996
Vedere la pagina 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 162 163

Commenti su questo manuale

Nessun commento