summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite')
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc59
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile_2.cc42
3 files changed, 144 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc
new file mode 100644
index 000000000..f6a920d7d
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc
@@ -0,0 +1,59 @@
+// { dg-require-c-std "" }
+// { dg-add-options ieee }
+
+// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
+//
+// Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 5.2.1.4 hermite
+
+#include <tr1/cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+
+ float xf = std::numeric_limits<float>::quiet_NaN();
+ double xd = std::numeric_limits<double>::quiet_NaN();
+ long double xl = std::numeric_limits<long double>::quiet_NaN();
+
+ unsigned int n = 5;
+
+ float a = std::tr1::hermite(n, xf);
+ float b = std::tr1::hermitef(n, xf);
+ double c = std::tr1::hermite(n, xd);
+ long double d = std::tr1::hermite(n, xl);
+ long double e = std::tr1::hermitel(n, xl);
+
+ VERIFY(std::tr1::isnan<float>(a));
+ VERIFY(std::tr1::isnan<float>(b));
+ VERIFY(std::tr1::isnan<double>(c));
+ VERIFY(std::tr1::isnan<long double>(d));
+ VERIFY(std::tr1::isnan<long double>(e));
+
+ return;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
+
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile.cc
new file mode 100644
index 000000000..0d1fc5eae
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2006-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
+//
+// Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 5.2.1.16 hermite
+
+#include <tr1/cmath>
+
+void
+test01()
+{
+ float xf = 2.5F;
+ double xd = 2.5;
+ long double xl = 2.5L;
+
+ unsigned int n = 5;
+
+ std::tr1::hermite(n, xf);
+ std::tr1::hermitef(n, xf);
+ std::tr1::hermite(n, xd);
+ std::tr1::hermite(n, xl);
+ std::tr1::hermitel(n, xl);
+
+ return;
+}
+
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile_2.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile_2.cc
new file mode 100644
index 000000000..01e78d569
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/compile_2.cc
@@ -0,0 +1,42 @@
+// { dg-do compile }
+
+// 2006-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
+//
+// Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 5.2.1.16 hermite
+
+#include <tr1/math.h>
+
+void
+test01()
+{
+ float xf = 2.5F;
+ double xd = 2.5;
+ long double xl = 2.5L;
+ unsigned int n = 5;
+
+ hermite(n, xf);
+ hermitef(n, xf);
+ hermite(n, xd);
+ hermite(n, xl);
+ hermitel(n, xl);
+
+ return;
+}
+