I totally agree with Charles regarding using Horner for polynomial evaluation and Clenshaw for the trig series - for accuracy and speed.
I implemented all the material from Charles' preprint https://arxiv.org/pdf/2212.05818 for Rust Geodesy, when the preprint appeared about 1½ years ago. And although (being an experiment) my handling of the raw coefficients is rather clumsy, at least it gave me a reason to revise my PROJ horner and clenshaw implementations (which in turn were based on material from Poder & Engsager: "Some Conformal Mappings..."). So Jérôme, perhaps take a look at the functions "taylor" and "fourier" over at https://github.com/busstoptaktik/geodesy/blob/main/src/math/series.rs While written in Rust, translating to C++ should be rather trivial, and they may be easier to follow than my decade-old versions already in the PROJ code base. _______________________________________________ PROJ mailing list PROJ@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/proj