fn rintl(x: c_longdouble) callconv(.c) c_longdouble
fn rintl(x: c_longdouble) callconv(.c) c_longdouble { if (@typeInfo(c_longdouble).float.bits == 64) return rint(x); const toint: c_longdouble = 1 << math.floatFractionalBits(c_longdouble); const se = ld.signExponent(x); if (se & 0x7fff >= 0x3fff + math.floatFractionalBits(c_longdouble)) return x; var y: c_longdouble = undefined; if ((se >> 15) == 1) { y = x - toint + toint; } else { y = x + toint - toint; } if (y == 0) return 0 * x; return y; }