Remote-processing BASIC for the CX-10 Modbus Bedienungsanleitung Seite 19

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 84
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 18
BASIC PROGRAMMING GUIDE
2-10
COS
Syntax: COS(
expr
)
Where:
expr
= numeric value up to ±200,000
Function: Returns the trigonometric cosine of
expr
which is in radians.
Mode: Command, run
Use: PRINT COS(PI)
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.
ERROR
ARITH. UNDERFLOW
value
or result is less than BASIC-52's smallest floating-point value of ±1E-127
ARITH. OVERFLOW
value
or result is greater than BASIC-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
Seitenansicht 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 83 84

Kommentare zu diesen Handbüchern

Keine Kommentare