fn testCosSpecial(comptime T: type) !void
fn testCosSpecial(comptime T: type) !void { const f = switch (T) { f32 => cosf, f64 => cos, f80 => cosx, f128 => cosq, else => @compileError("unimplemented"), }; try expect(f(0.0) == 1.0); try expect(f(-0.0) == 1.0); try expect(math.isNan(f(math.inf(T)))); try expect(math.isNan(f(-math.inf(T)))); try expect(math.isNan(f(math.nan(T)))); }