Re: rint() replacement

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: rint() replacement
Date: 2003-05-09 16:34:47
Message-ID: 200305091634.h49GYl407351@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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.)

Removed from float.c and ecpg.

>
> I can't believe that Windoze does not offer rint(); it's in the C99
> standard. Have you checked?

Both PeerDirect and SRA used rint.c, so they certainly needed it.

Also, there is a special HPUX 9 configure test to look for rint() a
different location. I am not sure if the new replacement rint() test
has invalidated that code. Do we still support HPUX 9? (I added a
comment to the configure script to mention it might now be broken.)

I see a cbrt() in float.c. Do we actually have platforms that don't
have cbrt()/cube root? I am inclined to remove it more move it to
/port.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 8.8 KB
unknown_filename text/plain 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-05-09 17:10:29 PostgreSQL Cookbook Site Down
Previous Message Manfred Koizar 2003-05-09 16:10:18 Static snapshot data