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.

__cmphf2

"These functions calculate a <=> b. That is, if a is less than b, they return -1; if a is greater than b, they return 1; and if a and b are equal they return 0. If either argument is NaN they return 1..."

Note that this matches the definition of __lehf2, __eqhf2, __nehf2, __cmphf2, and __lthf2.

comparef.__cmphf2
fn __cmphf2(a: f16, b: f16) callconv(.c) i32

File

lib/compiler_rt/comparef.zig:102

Code

fn __cmphf2(a: f16, b: f16) callconv(.c) i32 {
    return @backingInt(cmpf2(f16, LE, a, b));
}