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.

expo2

Returns exp(x) / 2 for x >= log(maxFloat(T)).

expo2.expo2
pub fn expo2(x: anytype) @TypeOf(x)

File

lib/std/math/expo2.zig:10

Code

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