[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] Error in coulomb.c
From: |
Alexey A. Illarionov |
Subject: |
Re: [Bug-gsl] Error in coulomb.c |
Date: |
Wed, 19 Jun 2013 21:56:52 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 SeaMonkey/2.16.2 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Nope, I did not. I will try to look closer to this on weekend, but I
doubt that we could obtain reliable values in that domain of arguments.
Patrick Alken wrote:
> Hi, thanks for the report. Do you have an example of calling the
> gsl_sf_coulomb_wave_FG_e function with input arguments that lead to
> the wrong output? This would be useful in making test cases for
> this issue.
>
> Patrick
>
> On 06/18/2013 11:58 PM, Alexey A. Illarionov wrote: Accidentally
> found a bug in specfun/coulomb.c . Trivial error in solution of
> quadratic equation. None of the current test cases are influenced
> by this bug since the value of C (actually N) determines only the
> condition of applicability of "continued fraction+recursion"
> algorithm.
>
> === modified file 'specfunc/coulomb.c' --- specfunc/coulomb.c
> 2007-07-02 18:34:24 +0000 +++ specfunc/coulomb.c 2012-10-26
> 04:27:18 +0000 @@ -1121,7 +1121,7 @@ * we must go at
> least as low as lam_G */ const double SMALL =
> GSL_SQRT_DBL_EPSILON; - const double C = sqrt(1.0 +
> 4.0*x*(x-2.0*eta)); + const double C = 0.5 * sqrt(1.0 +
> 4.0*x*(x-2.0*eta)); const int N = ceil(lam_F - C + 0.5); const
> double lam_0 = lam_F - GSL_MAX(N, 0); const double lam_min =
> GSL_MIN(lam_0, lam_G);
>
> -- С уважением, Алексей Александрович Илларионов.
>>
>
- --
С уважением, Алексей Александрович Илларионов.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQEcBAEBAgAGBQJRwmFkAAoJEEBWYSFzoNKecpwH/jVeqJ+KtkfNo7QZJwAEpJNj
Rs7joTxt7+n320C/qGNY/k5ivgCkJAUwgi0khweXl04uRqJBsHO/jHwbdbx9cW6t
kZZTde/EEUf8g8OA7/x9WDvxpO3D1NgTJbBJnSmqs3J4q77oztBCWCgxuOWWLaks
KNNQH1CW5yV2+hWA7CbL30rDSqwco94Fy2gMGgxUVPx8GHjBcgmaEM34mKDIM2VH
WuhK6CC2tekIEalPUbvnz2KDYOc12Fv9wSctrEt+srBHPxrG5HU9LQmAufVneHfw
b+xNEKgWTGRxjGxfFffA35JKoGYq4sak3okthtHHLxNOsdF/LpacGunWqrOdp40=
=51hh
-----END PGP SIGNATURE-----