>> It may turn to be some library trouble...
After examining the code a little, I wonder whether the problem might
be due to some library messing up the behavior of log(). You could
experiment at the SQL level with "SELECT ln(x)" to see if there's
anything obviously wrong.
BTW, do the regression tests show any difference in behavior between
the good and bad builds?
regards, tom lane