addaptic

Reference Trigonometry

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

CallAnswerReturns
lz_arccosine( 0.5 )1.047197551196597746154214461093167628kNoError
lz_arccosine( 0.5 ) degrees60kNoError
lz_arccosine( −1 ) degrees180kNoError
lz_arccosine( 2 )not a numberkFailed

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