===================================================================
@@ -685,8 +685,8 @@
const _Tp __kk = __k * __k;
return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1))
- - __nu
- * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) + __nu)
+ + __nu
+ * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) - __nu)
/ _Tp(3);
}
}
@@ -735,9 +735,9 @@
const _Tp __Pi = __s
* __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1))
- - __nu * __sss
+ + __nu * __sss
* __ellint_rj(__cc, _Tp(1) - __kk * __ss, _Tp(1),
- _Tp(1) + __nu * __ss) / _Tp(3);
+ _Tp(1) - __nu * __ss) / _Tp(3);
if (__n == 0)
return __Pi;
===================================================================
@@ -0,0 +1,24 @@
+// { dg-do run { target c++11 } }
+// { dg-require-c-std "" }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
+// { dg-add-options ieee }
+
+#include <cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ double Pi1 = std::comp_ellint_3(0.75, 0.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::comp_ellint_3(0.75, 0.5);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
===================================================================
@@ -0,0 +1,26 @@
+// { dg-do run { target c++11 } }
+// { dg-require-c-std "" }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
+// { dg-add-options ieee }
+
+#include <cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ const double pi = 3.141592654;
+
+ double Pi1 = std::ellint_3(0.75, 0.0, pi / 2.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::ellint_3(0.75, 0.5, pi / 2.0);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
===================================================================
@@ -0,0 +1,20 @@
+
+#include <tr1/cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ double Pi1 = std::tr1::comp_ellint_3(0.75, 0.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::tr1::comp_ellint_3(0.75, 0.5);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
===================================================================
@@ -0,0 +1,22 @@
+
+#include <tr1/cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ const double pi = 3.141592654;
+
+ double Pi1 = std::tr1::ellint_3(0.75, 0.0, pi / 2.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::tr1::ellint_3(0.75, 0.5, pi / 2.0);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}