diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2018-06-22 14:59:21 +0000 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2018-06-22 14:59:21 +0000 |
commit | 80bb895d235d82f30bb097050acc82470b53cf52 (patch) | |
tree | d887d893f39d16e4990a853d3398dfc48433430f /libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc | |
parent | 701c5838e5f5999de48c3b2c9f2e10b453a78f88 (diff) | |
parent | 8483773478af7ea732b52a98e325a07608777ebe (diff) |
Merge from gcc-7-branch.ARM/embedded-7-branch-2018q2ARM/embedded-7-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ARM/embedded-7-branch@261903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc')
-rw-r--r-- | libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc b/libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc new file mode 100644 index 00000000000..e261003592d --- /dev/null +++ b/libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc @@ -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; +} |