Re: Inaccurate results from numeric ln(), log(), exp() and pow()
От | Merlin Moncure |
---|---|
Тема | Re: Inaccurate results from numeric ln(), log(), exp() and pow() |
Дата | |
Msg-id | CAHyXU0zdNwh0G-ofPjZxCRa3Qrf6k3AnhHyaSGUYZzhYq72JEA@mail.gmail.com обсуждение исходный текст |
Ответ на | Inaccurate results from numeric ln(), log(), exp() and pow() (Dean Rasheed <dean.a.rasheed@gmail.com>) |
Ответы |
Re: Inaccurate results from numeric ln(), log(), exp() and pow()
|
Список | pgsql-hackers |
On Wed, Sep 16, 2015 at 2:31 AM, Dean Rasheed <dean.a.rasheed@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
В списке pgsql-hackers по дате отправления: