lz_arccosine
The angle whose cosine is the number.
long lz_arccosine( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
The angle in [0, π], or [0°, 180°], whose cosine is the operand, correctly rounded in the thread's unit; arccos −1 is exactly 180°. Outside [−1, 1] it is refused, kFailed, flagged not-a-number; lzc_arccosine gives the complex one.
Examples
| Call | Answer | Returns |
|---|---|---|
lz_arccosine( 0.5 ) | 1.047197551196597746154214461093167628 | kNoError |
lz_arccosine( 0.5 ) degrees | 60 | kNoError |
lz_arccosine( −1 ) degrees | 180 | kNoError |
lz_arccosine( 2 ) | not a number | kFailed |
Each answer is what Addaptic printed for the call, in radians, at 36 places unless a setting is shown.
Returns
kNoError (0) when the answer is written. Otherwise an error code, with the answer flagged infinite or not-a-number; see Errors and flags.
See also
lz_cosineThe cosine of an angle.lz_arcsineThe angle whose sine is the number.lzc_arccosineThe principal arccosine of a complex number.