47TEST(boomerang_utils, test_selectors_for_decompose)
49 auto is_power_two = [&](
const uint256_t& number) {
return number > 0 && ((number & (number - 1)) == 0); };
50 const uint64_t target_range_bitnum = 14;
52 const uint64_t shifts[3]{
53 target_range_bitnum * (3 * i),
54 target_range_bitnum * (3 * i + 1),
55 target_range_bitnum * (3 * i + 2),
60 bool q_1_is_power_two = is_power_two(q_1);
61 bool q_2_is_power_two = is_power_two(q_2);
62 bool q_3_is_power_two = is_power_two(q_3);
63 EXPECT_EQ(q_2 * q_2, q_1 * q_3);
64 EXPECT_EQ(q_1_is_power_two,
true);
65 EXPECT_EQ(q_2_is_power_two,
true);
66 EXPECT_EQ(q_3_is_power_two,
true);
69TEST(boomerang_ultra_circuit_constructor, test_variable_gates_count_for_two_decomposes)
81 { a1_idx, circuit_constructor.
zero_idx, circuit_constructor.
zero_idx, 1, 0, 0, -
fr(e1) });
83 { a2_idx, circuit_constructor.
zero_idx, circuit_constructor.
zero_idx, 1, 0, 0, -
fr(e2) });
89 EXPECT_EQ(variables_in_one_gate.size(), 0);