Bruce Momjian <pgman@candle.pha.pa.us> writes:
> In working on an rint() for Win32, I found two --- one in
> port/qnx4/rint.c and another in dt_common.c. The first is very simple,
> using fmod, while the second is very complicated.
Not to mention desperately hardware-specific. The dt_common.c routine
is a rip from utils/adt/float.c, which has absolutely no business being
where it is --- it might have some claim to live in a Sun-specific
backend/port/ file, but it is not general by any stretch of the
imagination. (And I think we gave up supporting SunOS awhile back
anyway.)
I can't believe that Windoze does not offer rint(); it's in the C99
standard. Have you checked?
regards, tom lane