David Rowley <david.rowley@2ndquadrant.com> writes:
> I wonder if it's better just to hard code these two cases before even
> calling the pow() function.
Yeah, see my followup --- I also found out that SUSv2 (POSIX 1997)
doesn't require either of these special cases, which helps explain
why the inconsistency on older platforms.
Hacking on a patch now.
regards, tom lane