Re: Inaccurate results from numeric ln(), log(), exp() and pow() - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Inaccurate results from numeric ln(), log(), exp() and pow()
Date
Msg-id CAEZATCX5+i9QZ=w1eJBsYeNN595taQ-QrBVif3526GTazN3Kcw@mail.gmail.com
Whole thread Raw
In response to Re: Inaccurate results from numeric ln(), log(), exp() and pow()  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Inaccurate results from numeric ln(), log(), exp() and pow()  (Merlin Moncure <mmoncure@gmail.com>)
Re: Inaccurate results from numeric ln(), log(), exp() and pow()  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On 16 September 2015 at 14:49, Merlin Moncure <mmoncure@gmail.com> wrote:
>> 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"?
>

I haven't done much performance testing because I've been mainly
focussed on accuracy. I just did a quick test of exp() for various
result sizes. For results up to around 50 digits, the patched code was
twice as fast as HEAD. After that the gap narrows until at around 250
digits they become about the same speed, and beyond that the patched
code is slower. At around 450 digits the patched code is twice as
slow.

My guess is that no one is actually using it for numbers that large.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Inaccurate results from numeric ln(), log(), exp() and pow()
Next
From: Euler Taveira
Date:
Subject: Re: pltcl: sentence improvement