DoxigAlpha

acosh

Returns the hyperbolic arc-cosine of z.

Function parameters

Parameters

#
z:anytype

Returns the hyperbolic arc-cosine of z.

Functions

#
acosh
Returns the hyperbolic arc-cosine of z.

Source

Implementation

#
pub fn acosh(z: anytype) Complex(@TypeOf(z.re, z.im)) {
    const T = @TypeOf(z.re, z.im);
    const q = cmath.acos(z);

    return if (math.signbit(z.im))
        Complex(T).init(q.im, -q.re)
    else
        Complex(T).init(-q.im, q.re);
}