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.

__cmpdf2

"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 __ledf2, __eqdf2, __nedf2, __cmpdf2, and __ltdf2.

cmpdf2.__cmpdf2
fn __cmpdf2(a: f64, b: f64) callconv(.c) i32

File

lib/compiler_rt/cmpdf2.zig:27

Code

fn __cmpdf2(a: f64, b: f64) callconv(.c) i32 {
    return @backingInt(comparef.cmpf2(f64, comparef.LE, a, b));
}