[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] bug in gsl_sf_lncosh?
From: |
Brian Gough |
Subject: |
Re: [Help-gsl] bug in gsl_sf_lncosh? |
Date: |
Fri, 15 Jul 2011 23:16:45 +0100 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) Emacs/23.3 Mule/6.0 (HANACHIRUSATO) |
At Wed, 13 Jul 2011 11:54:42 +0200,
Maximilian Treiber wrote:
> the function f(x)=ln(cosh(x)) is obviously symmetric, ie f(x)=f(-x),
> right?
>
> The current implementation in gsl seems to be incorrect for negative
> values:
>
> The second elseif is met for large negative numbers, while the
> correct asymptotic limit would be "f(x->-inf) = |x|-ln(2)".
>
> Replacing x by fabs(x) everywhere should fix the problem ...
Hi. Thanks for the bug report, you are right. I've just committed a
patch for the problem.
--
Brian Gough