Lines Matching full:exp
44 for (int exp : exp_array) {
45 ASSERT_FP_EQ(zero, func(zero, exp));
46 ASSERT_FP_EQ(neg_zero, func(neg_zero, exp));
47 ASSERT_FP_EQ(inf, func(inf, exp));
48 ASSERT_FP_EQ(neg_inf, func(neg_inf, exp));
49 ASSERT_FP_EQ(nan, func(nan, exp));
56 for (int32_t exp : exp_array) {
58 ASSERT_FP_EQ(T(val << exp), func(T(val), exp));
59 ASSERT_FP_EQ(T(-1 * (val << exp)), func(T(-val), exp));
67 for (int32_t exp = 10; exp < 100; ++exp) {
68 ASSERT_FP_EQ(inf, func(T(x), exp));
69 ASSERT_FP_EQ(neg_inf, func(-T(x), exp));
81 for (int32_t exp : exp_array) {
82 ASSERT_FP_EQ(func(x, -exp), x > 0 ? zero : neg_zero);
94 for (int32_t exp : exp_array) {
95 ASSERT_FP_EQ(func(x, -exp), x > 0 ? zero : neg_zero);
108 for (int32_t exp = 0; exp <= FPBits::FRACTION_LEN; ++exp) {
113 // We need to use a NormalFloat here (instead of 1 << exp), because
118 two_to_exp = two_to_exp.mul2(exp);
120 ASSERT_FP_EQ(func(x, exp), x * two_to_exp);
121 ASSERT_FP_EQ(func(x, -exp), x / two_to_exp);
132 // exp. The result should be a subnormal number.
134 int exp = -FPBits::MAX_BIASED_EXPONENT - 5;
135 T result = func(x, exp);
140 // But if the exp is so less that normalization leads to zero, then
148 exp = FPBits::MAX_BIASED_EXPONENT + 5;
149 ASSERT_FALSE(FPBits(func(x, exp)).is_inf());
150 // But if the exp is large enough to oversome than the normalization shift,
152 exp = FPBits::MAX_BIASED_EXPONENT + 15;
153 ASSERT_FP_EQ(func(x, exp), inf);