tanh

Hyperbolic trigonometric functions on complex numbers.

@safe pure nothrow @nogc
tanh
(
T
)

Return Value

Type: Complex!T

The hyperbolic sine, cosine and tangent of z, respectively.

Examples

import std.math.operations : isClose;
import std.math.trigonometry : std_math_tanh = tanh;
assert(tanh(complex(0.0)) == 0.0);
assert(isClose(tanh(complex(1.0L)), std_math_tanh(1.0L)));
assert(isClose(tanh(complex(1.0f)), std_math_tanh(1.0f)));
static import std.math;
assert(sinh(complex(0.0)) == 0.0);
assert(sinh(complex(1.0L)) == std.math.sinh(1.0L));
assert(sinh(complex(1.0f)) == std.math.sinh(1.0f));
static import std.math;
assert(cosh(complex(0.0)) == 1.0);
assert(cosh(complex(1.0L)) == std.math.cosh(1.0L));
assert(cosh(complex(1.0f)) == std.math.cosh(1.0f));

Meta