Function acosh [src]

Alias for std.math.acosh.acosh

Returns the hyperbolic arc-cosine of x. Special cases: acosh(x) = nan if x < 1 acosh(nan) = nan

Prototype

pub fn acosh(x: anytype) @TypeOf(x)

Example

test acosh { try expect(acosh(@as(f32, 1.5)) == acosh32(1.5)); try expect(acosh(@as(f64, 1.5)) == acosh64(1.5)); }

Source

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)), }; }