16 const AllEntities& in,
18 const FF& scaling_factor)
24 const auto Tx = View(in.precompute_tx);
25 const auto Ty = View(in.precompute_ty);
26 const auto Dx = View(in.precompute_dx);
27 const auto Dy = View(in.precompute_dy);
28 const auto precompute_point_transition = View(in.precompute_point_transition);
30 const auto two_x = Tx + Tx;
31 const auto three_x = two_x + Tx;
32 const auto two_y = Ty + Ty;
33 const auto Dx_plus_two_x = Dx + two_x;
34 const auto Ty_plus_Dy = Ty + Dy;
35 const auto Dx_minus_Tx = Dx - Tx;
37 const auto three_xx = Tx * three_x;
38 const auto four_yy = two_y.sqr();
40 const auto three_xx_acc6 = Acc6(three_xx);
41 const auto nine_xxxx_acc6 = three_xx_acc6.sqr();
42 const auto x_double_check_acc6 = Acc6(Dx_plus_two_x) * Acc6(four_yy) - nine_xxxx_acc6;
43 const auto scaled_transition_acc6 = Acc6(precompute_point_transition * scaling_factor);
46 const auto y_double_check_acc5 = Acc5(Ty_plus_Dy) * Acc5(two_y) + Acc5(three_xx) * Acc5(Dx_minus_Tx);
47 const auto scaled_transition_acc5 = Acc5(precompute_point_transition * scaling_factor);
54 const AllEntities& in,
56 const FF& scaling_factor)
63 const auto Tx = View(in.precompute_tx);
64 const auto Tx_shift = View(in.precompute_tx_shift);
65 const auto Ty = View(in.precompute_ty);
66 const auto Ty_shift = View(in.precompute_ty_shift);
67 const auto Dx = View(in.precompute_dx);
68 const auto Dx_shift = View(in.precompute_dx_shift);
69 const auto Dy = View(in.precompute_dy);
70 const auto Dy_shift = View(in.precompute_dy_shift);
71 const auto precompute_point_transition = View(in.precompute_point_transition);
72 const auto lagrange_first = View(in.lagrange_first);
74 const auto not_first = -lagrange_first +
FF(1);
75 const auto not_transition = -precompute_point_transition +
FF(1);
76 const auto scaled_inactive_factor_acc4 = Acc4((not_first * not_transition) * scaling_factor);
80 const auto& x1 = Tx_shift;
81 const auto& y1 = Ty_shift;
86 const auto lambda_numerator = y2 - y1;
87 const auto lambda_denominator = x2 - x1;
88 const auto x3_x2_x1 = (x3 + x2) + x1;
89 const auto y3_plus_y1 = y3 + y1;
90 const auto x3_minus_x1 = x3 - x1;
92 const auto scaled_inactive_factor_acc6 = Acc6((not_first * not_transition) * scaling_factor);
93 const auto x_add_check_acc6 = Acc6(x3_x2_x1) * Acc6(lambda_denominator.sqr()) - Acc6(lambda_numerator.sqr());
94 std::get<ADD_X>(accumulator) += scaled_inactive_factor_acc6 * x_add_check_acc6;
96 const auto scaled_inactive_factor_acc5 = Acc5((not_first * not_transition) * scaling_factor);
97 const auto y_add_check_acc5 =
98 Acc5(y3_plus_y1) * Acc5(lambda_denominator) + Acc5(x3_minus_x1) * Acc5(lambda_numerator);
99 std::get<ADD_Y>(accumulator) += scaled_inactive_factor_acc5 * y_add_check_acc5;