Lines Matching refs:scaleByInverse
155 TEST(BranchProbabilityTest, scaleByInverse) { in TEST() argument
157 EXPECT_EQ(UINT64_MAX, BP(1, 1).scaleByInverse(UINT64_MAX)); in TEST()
158 EXPECT_EQ(UINT64_MAX, BP(7, 7).scaleByInverse(UINT64_MAX)); in TEST()
159 EXPECT_EQ(UINT32_MAX, BP(1, 1).scaleByInverse(UINT32_MAX)); in TEST()
160 EXPECT_EQ(UINT32_MAX, BP(7, 7).scaleByInverse(UINT32_MAX)); in TEST()
161 EXPECT_EQ(0u, BP(1, 1).scaleByInverse(0)); in TEST()
162 EXPECT_EQ(0u, BP(7, 7).scaleByInverse(0)); in TEST()
167 EXPECT_EQ(UINT64_MAX, BP(1, UINT32_MAX).scaleByInverse(UINT64_MAX)); in TEST()
169 BP(1, MAX_DENOMINATOR).scaleByInverse(UINT32_MAX)); in TEST()
170 EXPECT_EQ(MAX_DENOMINATOR, BP(1, MAX_DENOMINATOR).scaleByInverse(1)); in TEST()
176 EXPECT_EQ(UINT64_MAX - 1, BP(1, 2).scaleByInverse(Two63 - 1)); in TEST()
177 EXPECT_EQ(UINT64_MAX, BP(1, 2).scaleByInverse(Two63)); in TEST()
180 EXPECT_EQ(2u, BP(Two31, UINT32_MAX).scaleByInverse(1)); in TEST()
181 EXPECT_EQ(2u, BP(Two31 - 1, UINT32_MAX).scaleByInverse(1)); in TEST()
182 EXPECT_EQ(Two31 * 2, BP(Two31, UINT32_MAX).scaleByInverse(Two31)); in TEST()
183 EXPECT_EQ(Two31 * 2, BP(Two31 - 1, UINT32_MAX).scaleByInverse(Two31)); in TEST()
184 EXPECT_EQ(UINT64_MAX, BP(Two31, UINT32_MAX).scaleByInverse(Two63 + Two31)); in TEST()
190 .scaleByInverse(UINT64_C(9223372047592194056))); in TEST()
192 BP(Two31 + 1, UINT32_MAX).scaleByInverse(Two63 + Two31)); in TEST()