WIP: Use Horner's method in `Horner` function 1/2
First MR of a series about simplifying and improving
SARCalibration design and performances.
This MR is about using Horner's method on Y axis in
Horner's method is much faster using than
std::pow() multiple times, and it offers a better numerical precision.
The MR will be done through 2/3 commits.
First commit: the baseline enforces numerical errors
Before fully using Horner's method, let improve the precision.
point can be an array of
floats, we divide its components with 2
And we do computations with other
computations will trigger conversions and prevent the compiler from correctly
vectorizing the operations.
Hence, it's better to cache
point[0|1] / W|H in two
doubles but now
My understanding is that the new computation should be more precise than the initial one, and I strongly suspect that the baseline enforces a small numerical error.
Can anybody else confirm my analysis? Also, can some one check whether some SARcalibration cases are improved?
Final commit: Implement Horner's method on Y's as well
Once we agree about the first part regarding the precision improvement, I'll fully implement Horner's method (commented as of now)
The copyright owner is CS Group FRANCE and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
👍votes from core developers, no 👎vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
- Optionally, run
git diff develop... -U0 --no-color | clang-format-diff.py -p1 -ion latest changes and commit