+2002-09-18 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/18_support/numeric_limits.cc (test_epsilon): New.
+
2002-09-18 Richard Henderson <rth@redhat.com>
* testsuite/18_support/numeric_limits.cc: Add -mieee for alpha.
}
#endif
+template<typename T>
+void test_epsilon()
+{
+ bool test = true;
+ T epsilon = std::numeric_limits<T>::epsilon();
+ T one = 1;
+
+ VERIFY( one != (one + epsilon) );
+}
+
#ifdef __CHAR_UNSIGNED__
#define char_is_signed false
#else
test_extrema<double>();
test_extrema<long double>();
+ test_epsilon<float>();
+ test_epsilon<double>();
+ test_epsilon<long double>();
+
test_sign();
test_infinity<float>();