[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2018-04-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2018-04-20 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

emsr at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from emsr at gcc dot gnu.org ---
We fixed this back in 1017-11-18.

[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2017-11-17 Thread 3dw4rd at verizon dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

--- Comment #6 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
Created attachment 42635
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42635=edit
Patch with regenerated testcases for all. tr1 and std.

2017-11-17  Edward Smith-Rowland  <3dw...@verizon.net>

PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values
* include/tr1/ell_integral.tcc: Correct the nu sign convention
in ellint_3 and comp_ellint_3.
* testsuite/tr1/5_numerical_facilities/special_functions/
06_comp_ellint_3/check_value.cc: Regen with correct values.
* testsuite/tr1/5_numerical_facilities/special_functions/
14_ellint_3/check_value.cc: Ditto.
* testsuite/special_functions/06_comp_ellint_3/check_value.cc: Ditto.
* testsuite/special_functions/13_ellint_3/check_value.cc: Ditto.
* testsuite/tr1/5_numerical_facilities/special_functions/
01_assoc_laguerre/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
02_assoc_legendre/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
03_beta/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
04_comp_ellint_1/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
05_comp_ellint_2/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
07_conf_hyperg/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
08_cyl_bessel_i/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
09_cyl_bessel_j/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
10_cyl_bessel_k/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
11_cyl_neumann/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
12_ellint_1/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
13_ellint_2/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
15_expint/check_value_neg.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
16_hermite/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
17_hyperg/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
18_laguerre/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
19_legendre/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
20_riemann_zeta/check_value_neg.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
21_sph_bessel/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
22_sph_legendre/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
23_sph_neumann/check_value.cc: Regen.
* testsuite/ext/special_functions/conf_hyperg/check_value.cc: Regen.
* testsuite/ext/special_functions/hyperg/check_value.cc: Regen.
* testsuite/special_functions/01_assoc_laguerre/check_value.cc: Regen.
* testsuite/special_functions/02_assoc_legendre/check_value.cc: Regen.
* testsuite/special_functions/03_beta/check_value.cc: Regen.
* testsuite/special_functions/04_comp_ellint_1/check_value.cc: Regen.
* testsuite/special_functions/05_comp_ellint_2/check_value.cc: Regen.
* testsuite/special_functions/07_cyl_bessel_i/check_value.cc: Regen.
* testsuite/special_functions/08_cyl_bessel_j/check_value.cc: Regen.
* testsuite/special_functions/09_cyl_bessel_k/check_value.cc: Regen.
* testsuite/special_functions/10_cyl_neumann/check_value.cc: Regen.
* testsuite/special_functions/11_ellint_1/check_value.cc: Regen.
* testsuite/special_functions/12_ellint_2/check_value.cc: Regen.
* testsuite/special_functions/14_expint/check_value.cc: Regen.
* testsuite/special_functions/15_hermite/check_value.cc: Regen.
* testsuite/special_functions/16_laguerre/check_value.cc: Regen.
* testsuite/special_functions/17_legendre/check_value.cc: Regen.
* testsuite/special_functions/18_riemann_zeta/check_value.cc: Regen.
* testsuite/special_functions/19_sph_bessel/check_value.cc: Regen.
* testsuite/special_functions/20_sph_legendre/check_value.cc: Regen.
* testsuite/special_functions/21_sph_neumann/check_value.cc: Regen.
* testsuite/tr1/5_numerical_facilities/special_functions/
06_comp_ellint_3/pr66689.cc: New.
* 

[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2017-11-16 Thread 3dw4rd at verizon dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

--- Comment #5 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
in other news I've switched to boost to test this.

[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2017-11-16 Thread 3dw4rd at verizon dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

--- Comment #4 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
My last comment is nuts.  I was thrown by the fact that GSL, against which I've
been testing, and the Carlson papers that form the basis if the implementation
use the +nu convention.  I must change this.  This is a huge bug.

[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2017-03-29 Thread 3dw4rd at verizon dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

--- Comment #3 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
Well, for whatever reason, TR29124 and C++17 chose the - in front of \nu.

As long as we document and warn I think this isn't a defect.

I'll dig through the docs and get back.

[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2015-06-28 Thread john at johnmaddock dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

--- Comment #1 from John Maddock john at johnmaddock dot co.uk ---
I think I've found the problem - make the nu parameter negative and you get the
correct answers.

These functions appear to use the same definition for ellint_3 as GSL uses
(same code?), but TR1 uses a different one which matches AS: note the change
of sign in the nu parameter in the integral:

GSL has Pi(\phi,k,n) = \int_0^\phi dt 1/((1 + n \sin^2(t))\sqrt(1 - k^2
\sin^2(t)))

TR1 has Pi(\phi,k,n) = \int_0^\phi dt 1/((1 - n \sin^2(t))\sqrt(1 - k^2
\sin^2(t)))


[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2015-06-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org ---
Thanks for the analysis.

I'd like to re-use the TR1 code for an implementation of ISO/IEC 29124:2010
(whether or not it also goes into C++17) so we should fix this first.


[Bug libstdc++/66689] comp_ellint_3 and ellint_3 return garbage values

2015-06-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66689

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-06-27
 CC||emsr at gcc dot gnu.org
 Ever confirmed|0   |1
   Severity|critical|normal