ACOS¶
Returns the arc cosine (inverse cosine) of a numeric input.
Signature¶
┌─────────┐
IN ─┤ ACOS ├─ OUT
└─────────┘
FUNCTION ACOS : ANY_REAL
VAR_INPUT
IN : ANY_REAL;
END_VAR
END_FUNCTION
The return type matches the input type. ACOS accepts REAL,
LREAL.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Value in the range [-1.0, 1.0]. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
The arc cosine of IN in radians, in the range [0, pi]. Same type as IN. |
Description¶
Returns the arc cosine of IN in radians. The input must be in the range [-1.0, 1.0]. The result is in the range [0, pi].
Example¶
result := ACOS(REAL#1.0); (* result = 0.0 *)
value := ACOS(LREAL#0.0); (* value ~ 1.5707963 *)
See Also¶
References¶
IEC 61131-3 §2.5.1.5.2