• Home
  • Raw
  • Download

Lines Matching full:math

8 #include <boost/math/concepts/real_concept.hpp> // for real_concept
9 #include <boost/math/special_functions/sign.hpp>
29 BOOST_CHECK_EQUAL((boost::math::signbit)(a), 0); in test_spots()
30 BOOST_CHECK_EQUAL((boost::math::sign)(a), 0); in test_spots()
31 BOOST_CHECK_EQUAL((boost::math::changesign)(b), RealType(-1)); in test_spots()
32 BOOST_CHECK_EQUAL((boost::math::changesign)(c), RealType(+1)); in test_spots()
33 BOOST_CHECK_EQUAL((boost::math::changesign)(a), RealType(0)); in test_spots()
36 BOOST_CHECK_EQUAL((boost::math::changesign)(b), in test_spots()
37 (boost::math::copysign)(b, (boost::math::signbit)(b) ? RealType(1.) : RealType(-1.) )); in test_spots()
40 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(1)); in test_spots()
41 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
43 BOOST_CHECK_EQUAL((boost::math::signbit)(a), 0); in test_spots()
44 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
45 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(1)); in test_spots()
46 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
48 BOOST_CHECK((boost::math::signbit)(a) != 0); in test_spots()
49 BOOST_CHECK_EQUAL((boost::math::sign)(a), -1); in test_spots()
50 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(-1)); in test_spots()
51 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(-1)); in test_spots()
52 a = boost::math::tools::max_value<RealType>(); in test_spots()
53 BOOST_CHECK_EQUAL((boost::math::signbit)(a), 0); in test_spots()
54 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
55 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(1)); in test_spots()
56 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
57 a = -boost::math::tools::max_value<RealType>(); in test_spots()
58 BOOST_CHECK((boost::math::signbit)(a) != 0); in test_spots()
59 BOOST_CHECK_EQUAL((boost::math::sign)(a), -1); in test_spots()
60 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(-1)); in test_spots()
61 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(-1)); in test_spots()
66 BOOST_CHECK_EQUAL((boost::math::signbit)(a), 0); in test_spots()
67 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
68 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(1)); in test_spots()
69 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
70 BOOST_CHECK_EQUAL((boost::math::changesign)(a), -a); in test_spots()
73 BOOST_CHECK((boost::math::signbit)(a) != 0); in test_spots()
74 BOOST_CHECK_EQUAL((boost::math::sign)(a), -1); in test_spots()
75 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(-1)); in test_spots()
76 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(-1)); in test_spots()
77 BOOST_CHECK_EQUAL((boost::math::changesign)(a), -a); in test_spots()
83 BOOST_CHECK_EQUAL((boost::math::signbit)(a), 0); in test_spots()
84 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
85 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(1)); in test_spots()
86 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
87 // BOOST_CHECK_EQUAL((boost::math::changesign)(a), -a); // NaN comparison fails always! in test_spots()
88 BOOST_CHECK((boost::math::signbit)((boost::math::changesign)(a)) != 0); in test_spots()
91 BOOST_CHECK((boost::math::signbit)(a) != 0); in test_spots()
92 BOOST_CHECK_EQUAL((boost::math::sign)(a), -1); in test_spots()
93 BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(-1)); in test_spots()
94 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(-1)); in test_spots()
95 //BOOST_CHECK_EQUAL((boost::math::changesign)(a), -a); // NaN comparison fails always! in test_spots()
96 BOOST_CHECK_EQUAL((boost::math::signbit)((boost::math::changesign)(a)), 0); in test_spots()
103 a = boost::math::tools::min_value<RealType>(); in test_spots()
106 BOOST_CHECK((boost::math::signbit)(a) == 0); in test_spots()
107 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
108 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
109 BOOST_CHECK((boost::math::signbit)(b) != 0); in test_spots()
110 BOOST_CHECK_EQUAL((boost::math::sign)(b), -1); in test_spots()
112 BOOST_CHECK_EQUAL((boost::math::copysign)(c, b), RealType(-1)); in test_spots()
121 BOOST_CHECK((boost::math::signbit)(a) == 0); in test_spots()
122 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
123 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
124 BOOST_CHECK((boost::math::signbit)(b) != 0); in test_spots()
125 BOOST_CHECK_EQUAL((boost::math::sign)(b), -1); in test_spots()
127 BOOST_CHECK_EQUAL((boost::math::copysign)(c, b), RealType(-1)); in test_spots()
129 a = boost::math::tools::max_value<RealType>() / 2; in test_spots()
132 BOOST_CHECK((boost::math::signbit)(a) == 0); in test_spots()
133 BOOST_CHECK_EQUAL((boost::math::sign)(a), 1); in test_spots()
134 BOOST_CHECK_EQUAL((boost::math::copysign)(c, a), RealType(1)); in test_spots()
135 BOOST_CHECK((boost::math::signbit)(b) != 0); in test_spots()
136 BOOST_CHECK_EQUAL((boost::math::sign)(b), -1); in test_spots()
138 BOOST_CHECK_EQUAL((boost::math::copysign)(c, b), RealType(-1)); in test_spots()
152 test_spots(boost::math::concepts::real_concept(0), "real_concept"); // Test real_concept. in BOOST_AUTO_TEST_CASE()