Commit b433da3c by Loren J. Rittle Committed by Loren J. Rittle

* testsuite/18_support/numeric_limits.cc (test_epsilon): New.

From-SVN: r57295
parent bf3d27e6
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.
......
......@@ -94,6 +94,16 @@ void test_extrema<long double>()
}
#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
......@@ -314,6 +324,10 @@ int main()
test_extrema<double>();
test_extrema<long double>();
test_epsilon<float>();
test_epsilon<double>();
test_epsilon<long double>();
test_sign();
test_infinity<float>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment