bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Error in coulomb.c


From: Patrick Alken
Subject: Re: [Bug-gsl] Error in coulomb.c
Date: Wed, 19 Jun 2013 09:20:31 -0600
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

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:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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)

iQEcBAEBAgAGBQJRwUigAAoJEEBWYSFzoNKeuxcH/3L4VRp+HeufrxAZVit++hvc
3gKSpzq4T/hMUHzPLKQ0q/0AZfgKz7AzXhm0t+epyaoFQh4O4sxBcTanJZbjWCt9
l1MNn7mwyEzSQ5ut3meE3FV1aYXCTXVNyKAGL54/4AU3WVwNmSmSsY+LTAx6lEbr
+rQ43y4s/ZIiQUMaHXJG0+7RzLfWso5Ykm4fTK12N8MUUwFyRVsGKE8j0pj5jmjq
AJbeTyHUieR3CSm+3G7cK8vNeoqtkeyax4novhHoGvIXIit1rk8/sgFnKPXuwIXf
w3t+pa2OHWczGv3PXLOc0fStAZAwm1dCv8E+dl9L4BMrQWfaX8zCO33g31VIJX8=
=kuB+
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]