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.
fnfloatBits(comptimeType: type) !void {
// (1 +) for the sign bit, since it is separate from the other bitsconstsize = 1 + floatExponentBits(Type) + floatMantissaBits(Type);
tryexpect(@bitSizeOf(Type) == size);
tryexpect(floatFractionalBits(Type) <= floatMantissaBits(Type));
// for machine epsilon, assert expmin <= -prec <= expmaxtryexpect(floatExponentMin(Type) <= -floatFractionalBits(Type));
tryexpect(-floatFractionalBits(Type) <= floatExponentMax(Type));
}