MCPcopy Create free account
hub / github.com/OSGeo/PROJ / complex_horner_eval

Function complex_horner_eval

src/transformations/horner.cpp:225–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225inline static PJ_UV complex_horner_eval(uint32_t order, const double *c,
226 PJ_UV en, uint32_t order_offset = 0) {
227 // the coefficients are ordered like this:
228 // (Cn0+i*Ce0, Cn1+i*Ce1, ...)
229 const uint32_t sz = horner_number_of_complex_coefficients(order);
230 const double e = en.u;
231 const double n = en.v;
232 const double *cbeg = c + order_offset * 2;
233 c += sz;
234
235 double E = *--c;
236 double N = *--c;
237 double w;
238 while (c > cbeg) {
239 w = n * E + e * N + *--c;
240 N = n * N - e * E + *--c;
241 E = w;
242 }
243 return {E, N};
244}
245
246inline static PJ_UV generate_error_coords() {
247 PJ_UV uv_error;

Callers 2

complex_default_implFunction · 0.85

Tested by

no test coverage detected