addaptic

Reference Hyperbolic functions

lz_archypertangent

The number whose hyperbolic tangent is the operand.

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

½ ln((1 + x) ÷ (1 − x)), for x between −1 and 1, correctly rounded. At ±1 it has a pole: kUndefinedResult, flagged infinite. Beyond them there is no real answer: kFailed, flagged not-a-number.

Examples

CallAnswerReturns
lz_archypertangent( 0.5 )0.549306144334054845697622618461262852kNoError
lz_archypertangent( −0.5 )−0.549306144334054845697622618461262852kNoError
lz_archypertangent( 1 )infinitekUndefinedResult
lz_archypertangent( 2 )not a numberkFailed

Each answer is what Addaptic printed for the call, 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