Besides that, there is a question what was the comparison reference: were both forms compared to a higher-precision version of the respective formula (Horner to Horner, factored to factored), or was a higher-precision Horner form always the reference. This is related to the question of the error source: precision losses during computation or coefficient quantization.mystran wrote: ↑Tue Feb 12, 2019 8:36 pmI'm curious, did you solve the factors from the monomial, or build the monomial from the factors?2DaT wrote: ↑Tue Feb 12, 2019 6:11 pm I did my own tests.The error is not dramatic, but not neligible either. And i have a feeling that it will be worse for higher orders.Code: Select all
Factored: 3.8990848138928413ulp Horner: 0.76185148768126965ulp
Anyway, FWIW, I personally usually wouldn't have any second thoughts using a 4ulp precise routine. If this precision is insufficient, then probably the representation precision is not sufficient for the surrounding computation either. IIRC some implementations of the C math library have lower precision.
Returning to the original question: I wonder if the factored form of e.g. this specific polynomial will be faster than Horner form (due to better parallelizability) and than Estrin's form (due to having less operations) and whether the answer depends on the FMA support Maybe one day I'll bother checking this, so far my interest is mostly academic.