addaptic

Reference Trigonometry

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

CallAnswerReturns
lz_secant( 1 )1.850815717680925617911753241398650193kNoError
lz_secant( 60 ) degrees2kNoError
lz_secant( 90 ) degreesinfinitekDivideByZero

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