fn rint(x: f64) callconv(.c) f64
fn rint(x: f64) callconv(.c) f64 { const toint: f64 = 1.0 / math.floatEps(f64); const a: u64 = @bitCast(x); const e = a >> 52 & 0x7ff; const s = a >> 63; var y: f64 = undefined; if (e >= 0x3ff + 52) { return x; } if (s == 1) { y = x - toint + toint; } else { y = x + toint - toint; } if (y == 0) { return if (s == 1) -0.0 else 0; } return y; }