31 const AllEntities& in,
33 const FF& scaling_factor)
36 using View =
typename Accumulator::View;
38 const auto& Tx = View(in.precompute_tx);
39 const auto& Tx_shift = View(in.precompute_tx_shift);
40 const auto& Ty = View(in.precompute_ty);
41 const auto& Ty_shift = View(in.precompute_ty_shift);
42 const auto& Dx = View(in.precompute_dx);
43 const auto& Dx_shift = View(in.precompute_dx_shift);
44 const auto& Dy = View(in.precompute_dy);
45 const auto& Dy_shift = View(in.precompute_dy_shift);
46 const auto& precompute_point_transition = View(in.precompute_point_transition);
47 const auto& lagrange_first = View(in.lagrange_first);
134 auto two_x = Tx + Tx;
135 auto three_x = two_x + Tx;
136 auto three_xx = Tx * three_x;
137 auto nine_xxxx = three_xx.sqr();
138 auto two_y = Ty + Ty;
139 auto four_yy = two_y.sqr();
140 auto x_double_check = (Dx + two_x) * four_yy - nine_xxxx;
141 auto y_double_check = (Ty + Dy) * two_y + three_xx * (Dx - Tx);
142 std::get<0>(accumulator) += precompute_point_transition * x_double_check * scaling_factor;
143 std::get<1>(accumulator) += precompute_point_transition * y_double_check * scaling_factor;
151 (-lagrange_first + 1) * (-precompute_point_transition + 1) * (Dx - Dx_shift) * scaling_factor;
153 (-lagrange_first + 1) * (-precompute_point_transition + 1) * (Dy - Dy_shift) * scaling_factor;
173 const auto& x1 = Tx_shift;
174 const auto& y1 = Ty_shift;
179 const auto lambda_numerator = y2 - y1;
180 const auto lambda_denominator = x2 - x1;
181 auto x_add_check = (x3 + x2 + x1) * lambda_denominator.sqr() - lambda_numerator.sqr();
182 auto y_add_check = (y3 + y1) * lambda_denominator + (x3 - x1) * lambda_numerator;
184 (-lagrange_first + 1) * (-precompute_point_transition + 1) * x_add_check * scaling_factor;
186 (-lagrange_first + 1) * (-precompute_point_transition + 1) * y_add_check * scaling_factor;