This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][4.3] Expand lround inline for x86_64/i?86 SSE math
Toon Moene wrote:
Richard Guenther wrote:
I wonder if fortran specifies round differently, as the frontend
explicitly converts NINT(x) = INT(x + ((x > 0) ? 0.5 : -0.5)).
Yep - sorry, don't have the reference handy.
For what it's worth, since I do have the reference handy, that's
essentially a direct translation of how the Fortran 95 standard defines
the NINT intrinsic. About the only difference is that it expands out
the ?: operator into an "If x<0 then ... else" sentence.