Re: Slaying the HYPOTamus - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Slaying the HYPOTamus
Date
Msg-id 19346.1251006156@sss.pgh.pa.us
Whole thread Raw
In response to Re: Slaying the HYPOTamus  (Greg Stark <gsstark@mit.edu>)
Responses Re: Slaying the HYPOTamus  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Greg Stark <gsstark@mit.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


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Slaying the HYPOTamus
Next
From: Tom Lane
Date:
Subject: Re: 8.5 release timetable, again