Remote-processing BASIC 52 Manuel d'utilisateur Page 23

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 163
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 162 163

Commentaires sur ces manuels

Pas de commentaire