Remote-processing BASIC 52 Manual de usuario Pagina 23

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 163
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 162 163

Comentarios a estos manuales

Sin comentarios