addaptic

Reference Trigonometry

lz_arcsecant

The angle whose secant is the number.

long lz_arcsecant( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );

arccos(1/x), in [0, π], correctly rounded in the thread's unit; arcsec 2 is exactly 60°. Between −1 and 1 there is no real angle: kFailed, flagged not-a-number.

Examples

CallAnswerReturns
lz_arcsecant( 2 )1.047197551196597746154214461093167628kNoError
lz_arcsecant( 2 ) degrees60kNoError
lz_arcsecant( 0.5 )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