Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

sincosh

sincos.sincosh
pub fn sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.c) void

File

lib/compiler_rt/sincos.zig:28

Code

pub fn sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.c) void {
    // TODO: more efficient implementation
    var big_sin: f32 = undefined;
    var big_cos: f32 = undefined;
    sincosf(x, &big_sin, &big_cos);
    r_sin.* = @as(f16, @floatCast(big_sin));
    r_cos.* = @as(f16, @floatCast(big_cos));
}