On Wed, Sep 16, 2015 at 2:31 AM, Dean Rasheed <dean.a.rash...@gmail.com> wrote: > Hi, > > I recently noticed that numeric log() produces inaccurate results for > certain ranges of inputs. This isn't just small errors in the last 1 > or 2 digits, but sometimes quite large errors, with over half the > significant digits returned being incorrect.
yikes. > The initial issue was a block of code to estimate the weight of the > logarithm, repeated in 3 different places, and called from ln(), log() > and pow(). After coming up with a fix for that, however, testing > revealed a whole range of additional issues causing further > inaccuracies in those functions and also in exp(). <snip> > AFAICT, this kind of slowdown only happens in cases like this where a > very large number of digits are being returned. Can you clarify "very large"? merlin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers