lz_sine_cosine
The sine and the cosine of one angle together, for about half the cost of the two.
long lz_sine_cosine( CLZNumber* leftOperand, CLZNumber* sineTarget, CLZNumber* cosineTarget );
Both from one reduction and one run, each exactly what lz_sine and lz_cosine answer, flags and codes included, for 1.3 to 3.4 times less than the two calls.
Both targets are required and must be different numbers, though either may be the operand. Otherwise the call is refused, kFailed, and each target given a not-a-number.
Examples
| Call | Answer |
|---|---|
lz_sine_cosine( 1 ) | 0.841470984807896506652502321630299000and0.540302305868139717400936607442976604 |
lz_sine_cosine( 30 ) degrees | 0.5and0.866025403784438646763723170752936183 |
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.