Andrew Dunstan <andrew@dunslane.net> writes:
> However, it is moaning about the code in the sqrtd() function. I'm
> wondering if we shouldn't just rip that out and use the library sqrt()
> function. It's not called for every statement processed, only each time
> the function is called (for each row).
[ looks... ] +1. I'm skeptical that that's even a win at all on modern
hardware; sqrt() is a primitive operation on nearly anything these days.
Also, quite aside from the error of supposing that long long int is
the same size as double, I'm pretty sure this would fail miserably on
non-IEEE-float hardware; and it may well have endianness issues too.
Since the code isn't actually being executed on the buildfarm, only
compiled, we have no good way to tell whether it would produce sane
results everywhere.
regards, tom lane