1. Inverse trigonometric functions ASIN/ACOS/ATAN
1. Inverse trigonometric functions ASIN/ACOS/ATAN
1.1. Instruction description
The ASIN instruction performs an inverse sine operation on the sine value (IN) and places the result in (OUT). The range of input values is [\ -1,1], and the range of output values is [\ -90,90].
The ACOS instruction performs an inverse cosine operation on the sine value (IN) and places the result in (OUT). The range of input values is [\ -1,1], and the range of output values is [0,180].
The ATAN instruction performs arctangent operation on the sine value (IN) and places the result in (OUT). The range of input values is [\ - ∞,+∞], and the range of output values is [\ -90, 90].
ASIN,ACOS,ATAN instructions are time-consuming, please use them with caution
1.2. The valid operands of the instruction
| Input/Output | Data Type | operand | Description |
|---|---|---|---|
| IN | 32-bit real number | D/K/FD, local variable (LF) | input |
| OUT | 32-bit real number | D/FD, local variable (LF) | output |
1.3. Example
command table:
NETWORK 000
LD X000
ASIN K0 D0 // ASIN(0) = 0°
POP
LD X001
ACOS K0 D2 // ACOS(0) = 90°
POP
LD X002
ATAN K0 D4 // ATAN(0) = 0°
POP
图1 ASIN