addaptic

Reference Complex circular and hyperbolic functions

lzc_cosine

The cosine of a complex angle.

long lzc_cosine( CLZComplex* leftOperand, CLZComplex* targetNumber = nullptr );

cos a cosh b − i sin a sinh b, each part correctly rounded, the whole angle in the thread's unit. In a unit a part whose sine or cosine is exactly nought is an exact nought, so the real part of cos(90 + i) in degrees is exactly nought.

Examples

CallAnswer
lzc_cosine( 1 + 1i )0.833730025131149048883885394335094480 − 0.988897705762865096382129540892686189i
lzc_cosine( 90 + 1i ) degrees0 − 0.017454178629595111183148190548771833i

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