From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Paul Matthews <plm(at)netspace(dot)net(dot)au>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Slaying the HYPOTamus |
Date: | 2009-08-23 05:42:36 |
Message-ID: | 19346.1251006156@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> If there's a performance advantage then we could add a configure test
> and define the macro to call hypot(). You said it existed before C99
> though, how widespread was it? If it's in all the platforms we support
> it might be reasonable to just go with it.
For one data point, I see hypot() in HPUX 10.20, released circa 1996.
I suspect we would want a configure test and a substitute function
anyway. Personally I wouldn't have a problem with the substitute being
the naive sqrt(x*x+y*y), particularly if it's replacing existing code
that overflows in the same places.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-23 05:57:34 | Re: 8.5 release timetable, again |
Previous Message | Greg Stark | 2009-08-23 04:42:23 | Re: BUG #4996: postgres.exe memory consumption keeps going up |