ComplexHyperbolicX<T extends Complex> extension

A collection of hyperbolic functions for Complex

Hyperbolic sine

Compute the hyperbolic sine of this complex number.

Implements the formula:

sinh(a + bi) = sinh(a)cos(b)) + cosh(a)sin(b)i

where the (real) functions on the right-hand side are math.sin, math.cos, fastmath.cosh and fastmath.sinh.

Returns nan if either real or imaginary part of the input argument is NaN.

Infinite values in real or imaginary parts of the input may result in infinite or NaN values returned in parts of the result.

Examples:

sinh(1 ± INFINITY i) = NaN + NaN i
sinh(±INFINITY + i) = ± INFINITY + INFINITY i
sinh(±INFINITY ± INFINITY i) = NaN + NaN i

Hyperbolic cosine

Compute the hyperbolic cosine of this complex number.

Implements the formula:

cosh(a + bi) = cosh(a)cos(b) + sinh(a)sin(b)i

where the (real) functions on the right-hand side are math.sin, math.cos, fastmath.cosh and fastmath.sinh.

Returns nan if either real or imaginary part of the input argument is NaN.

Infinite values in real or imaginary parts of the input may result in infinite or NaN values returned in parts of the result.

Examples:

cosh(1 ± INFINITY i) = NaN + NaN i
cosh(±INFINITY + i) = INFINITY ± INFINITY i
cosh±INFINITY &plusmn; INFINITY i) = NaN + NaN i

Hyperbolic tangent

Compute the hyperbolic tangent of this complex number.

Implements the formula:

tan(a + bi) = sinh(2a)/(cosh(2a)+cos(2b)) + [sin(2b)/(cosh(2a)+cos(2b))]i

where the (real) functions on the right-hand side are math.sin, math.cos, fastmath.cosh and fastmath.sinh.

Returns nan if either real or imaginary part of the input argument is NaN.

Infinite values in real or imaginary parts of the input may result in infinite or NaN values returned in parts of the result.

Examples:

tanh(a ± INFINITY i) = NaN + NaN i
tanh(±INFINITY + bi) = ±1 + 0 i
tanh(±INFINITY ± INFINITY i) = NaN + NaN i
tanh(0 + (π/2)i) = NaN + INFINITY i
on
  • T

Methods

cosh() Complex
Hyperbolic cosine
sinh() Complex
Hyperbolic sine
tanh() Complex
Hyperbolic tangent