Returns the arc-cosine of x.
Special cases:
pub fn acos(x: anytype) @TypeOf(x)
pub fn acos(x: anytype) @TypeOf(x) {
const T = @TypeOf(x);
switch (@typeInfo(T)) {
.float => |info| switch (info.bits) {
16 => return acosBinary16(x),
32 => return acosBinary32(x),
64 => return acosBinary64(x),
80 => return acosExtended80(x),
128 => return acosBinary128(x),
else => comptime unreachable,
},
.vector => |info| switch (info.child) {
f32 => return acosBinary32Vec(info.len, x),
f64 => return acosBinary64Vec(info.len, x),
else => @compileError("unimplemented"),
},
else => comptime unreachable,
}
}