lz_cosine
The cosine of an angle.
long lz_cosine( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
Correctly rounded, in the thread's angle unit. Outside radians an angle whose cosine is rational is answered exactly: cos 60° is 0.5 and cos 90° is nought.
Examples
| Call | Answer |
|---|---|
lz_cosine( 1 ) | 0.540302305868139717400936607442976604 |
lz_cosine( 60 ) degrees | 0.5 |
lz_cosine( 90 ) degrees | 0 |
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_sineThe sine of an angle.lz_sine_cosineThe sine and the cosine of one angle together, for about half the cost of the two.lz_arccosineThe angle whose cosine is the number.lzc_cosineThe cosine of a complex angle.