| 223 | } |
| 224 | |
| 225 | inline 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 | |
| 246 | inline static PJ_UV generate_error_coords() { |
| 247 | PJ_UV uv_error; |
no test coverage detected