13 #ifndef floating_point_test_suite_hpp
14 #define floating_point_test_suite_hpp
21 template<
typename data__>
70 std::stringstream ostr;
75 TEST_ASSERT(ostr.str()==ref);
78 TEST_ASSERT(ostr.str()==ref);
88 std::stringstream ostr;
93 TEST_ASSERT(ostr.str()==ref);
96 TEST_ASSERT(ostr.str()==ref);
103 const long double cf(f);
106 std::stringstream ostr;
112 ref=
"0x0 0x1 0x0 0x4000";
115 TEST_ASSERT(ostr.str()==ref);
118 TEST_ASSERT(ostr.str()==ref);
126 data_type f, f_inc, f_inc_ref;
130 TEST_ASSERT(f_inc==f_inc_ref);
135 data_type f, f_inc, f_inc_ref;
139 TEST_ASSERT(f_inc==f_inc_ref);
144 data_type f, f_inc, f_inc_ref;
148 TEST_ASSERT(f_inc==f_inc_ref);
154 data_type f, f_inc, f_inc_ref;
158 TEST_ASSERT(f_inc==f_inc_ref);
163 data_type f, f_inc, f_inc_ref;
167 TEST_ASSERT(f_inc==f_inc_ref);
177 pi=
static_cast<int32_t *
>(
static_cast<void *
>(&f_ulp));
187 pi=
static_cast<int64_t *
>(
static_cast<void *
>(&f_ulp));
197 pi=
static_cast<int64_t *
>(
static_cast<void *
>(&f_ulp));
204 f_ulp=f+ulps*std::numeric_limits<data_type>::epsilon();
210 f=2-ulps*std::numeric_limits<data_type>::epsilon();
void AddTests(const double &)
Definition: floating_point_test_suite.hpp:31
void printing_test()
Definition: floating_point_test_suite.hpp:59
const float_type * set_floating_point_type(const float *pcf)
Definition: floating_point.hpp:74
~floating_point_test_suite()
Definition: floating_point_test_suite.hpp:49
floating_point_test_suite()
Definition: floating_point_test_suite.hpp:44
Definition: floating_point_test_suite.hpp:22
Definition: floating_point.hpp:50
void AddTests(const long double &)
Definition: floating_point_test_suite.hpp:37
Definition: floating_point.hpp:38
void get_max_mantissa_and_many_ulp(data_type &f, data_type &f_ulp, int ulps)
Definition: floating_point_test_suite.hpp:207
void get_zero_and_one_ulp(float &f, float &f_ulp)
Definition: floating_point_test_suite.hpp:171
void get_one_and_many_ulp(data_type &f, data_type &f_ulp, int ulps)
Definition: floating_point_test_suite.hpp:201
void printing_test(const double &)
Definition: floating_point_test_suite.hpp:82
data__ data_type
Definition: floating_point_test_suite.hpp:54
void printing_test(const float &)
Definition: floating_point_test_suite.hpp:64
data__ increment_ulp(const data__ &, const int &)
Definition: floating_point.hpp:164
void AddTests(const float &)
Definition: floating_point_test_suite.hpp:25
Definition: floating_point.hpp:26
void increment_ulp_test()
Definition: floating_point_test_suite.hpp:122
void printing_test(const long double &)
Definition: floating_point_test_suite.hpp:100
void get_zero_and_one_ulp(double &f, double &f_ulp)
Definition: floating_point_test_suite.hpp:181
void get_zero_and_one_ulp(long double &f, long double &f_ulp)
Definition: floating_point_test_suite.hpp:191