lz_secant
The secant of an angle, one over its cosine.
long lz_secant( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
Correctly rounded, in the thread's angle unit; sec 60° is exactly 2. At a pole, such as 90°, it returns kDivideByZero, flagged infinite.
Examples
| Call | Answer | Returns |
|---|---|---|
lz_secant( 1 ) | 1.850815717680925617911753241398650193 | kNoError |
lz_secant( 60 ) degrees | 2 | kNoError |
lz_secant( 90 ) degrees | infinite | kDivideByZero |
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_arcsecantThe angle whose secant is the number.lzc_secantThe secant of a complex angle.