Lines Matching full:exp
43 for (int exp : exp_array) {
44 ASSERT_FP_EQ(zero, func(zero, exp));
45 ASSERT_FP_EQ(neg_zero, func(neg_zero, exp));
46 ASSERT_FP_EQ(inf, func(inf, exp));
47 ASSERT_FP_EQ(neg_inf, func(neg_inf, exp));
48 ASSERT_FP_EQ(nan, func(nan, exp));
55 for (long exp : long_exp_array) {
56 ASSERT_FP_EQ(zero, func(zero, exp));
57 ASSERT_FP_EQ(neg_zero, func(neg_zero, exp));
58 ASSERT_FP_EQ(inf, func(inf, exp));
59 ASSERT_FP_EQ(neg_inf, func(neg_inf, exp));
60 ASSERT_FP_EQ(nan, func(nan, exp));
67 for (int32_t exp : exp_array) {
69 ASSERT_FP_EQ(T(val << exp), func(T(val), exp));
70 ASSERT_FP_EQ(T(-1 * (val << exp)), func(T(-val), exp));
78 for (int32_t exp = 10; exp < 100; ++exp) {
79 ASSERT_FP_EQ(inf, func(T(x), exp));
80 ASSERT_FP_EQ(neg_inf, func(-T(x), exp));
92 for (int32_t exp : exp_array) {
93 ASSERT_FP_EQ(func(x, -exp), x > 0 ? zero : neg_zero);
105 for (int32_t exp : exp_array) {
106 ASSERT_FP_EQ(func(x, -exp), x > 0 ? zero : neg_zero);
119 for (int32_t exp = 0; exp <= FPBits::FRACTION_LEN; ++exp) {
124 // We need to use a NormalFloat here (instead of 1 << exp), because
129 two_to_exp = two_to_exp.mul2(exp);
131 ASSERT_FP_EQ(func(x, exp), x * static_cast<T>(two_to_exp));
132 ASSERT_FP_EQ(func(x, -exp), x / static_cast<T>(two_to_exp));
143 // exp. The result should be a subnormal number.
145 int exp = -FPBits::MAX_BIASED_EXPONENT - 5;
146 T result = func(x, exp);
151 // But if the exp is so less that normalization leads to zero, then
159 exp = FPBits::MAX_BIASED_EXPONENT + 5;
160 ASSERT_FALSE(FPBits(func(x, exp)).is_inf());
161 // But if the exp is large enough to oversome than the normalization shift,
163 exp = FPBits::MAX_BIASED_EXPONENT + 15;
164 ASSERT_FP_EQ(func(x, exp), inf);