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.

__cmpsf2

"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 __lesf2, __eqsf2, __nesf2, __cmpsf2, and __ltsf2.

comparef.__cmpsf2
fn __cmpsf2(a: f32, b: f32) callconv(.c) i32

File

lib/compiler_rt/comparef.zig:54

Code

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