DoxigAlpha

tanh

Returns the hyperbolic tangent of z.

Function parameters

Parameters

#
z:anytype

Returns the hyperbolic tangent of z.

Functions

#
tanh
Returns the hyperbolic tangent of z.

Source

Implementation

#
pub fn tanh(z: anytype) Complex(@TypeOf(z.re, z.im)) {
    const T = @TypeOf(z.re, z.im);
    return switch (T) {
        f32 => tanh32(z),
        f64 => tanh64(z),
        else => @compileError("tan not implemented for " ++ @typeName(z)),
    };
}