DoxigAlpha

acosh

Returns the hyperbolic arc-cosine of x.

Special cases:

  • acosh(x) = nan if x < 1
  • acosh(nan) = nan

Function parameters

Parameters

#
x:anytype

Returns the hyperbolic arc-cosine of x.

Functions

#
acosh
Returns the hyperbolic arc-cosine of x.

Source

Implementation

#
pub fn acosh(x: anytype) @TypeOf(x) {
    const T = @TypeOf(x);
    return switch (T) {
        f32 => acosh32(x),
        f64 => acosh64(x),
        else => @compileError("acosh not implemented for " ++ @typeName(T)),
    };
}