rukawakaede
- 58
- 0
Firstly, I am not sure if I am in the right section. Pardon me.
I was reading something related to computational efficiency when evaluating polynomials. Suppose we want to evaluate
f(x)=1-4 x+6 x^2-4 x^3+x^4
it would take n=4 additions and (n^2+n)/2 =10 multiplications to evaluate this f(x) on computer.
We know that it would be better (efficiency and stability) to evaluate f(x) using Horner's method, i.e
f(x)=1+x (-4+x (6+(-4+x) x))
which only take n=4 additions and n=4 multiplications on the computer, (i.e. round-off error will be minimised).
So here is my question: wouldn't it better to evaluate
f(x)=(x-1)^4
since it would only need 1 addition and 4 multiplication?
Could anyone share some insights on this?
I was reading something related to computational efficiency when evaluating polynomials. Suppose we want to evaluate
f(x)=1-4 x+6 x^2-4 x^3+x^4
it would take n=4 additions and (n^2+n)/2 =10 multiplications to evaluate this f(x) on computer.
We know that it would be better (efficiency and stability) to evaluate f(x) using Horner's method, i.e
f(x)=1+x (-4+x (6+(-4+x) x))
which only take n=4 additions and n=4 multiplications on the computer, (i.e. round-off error will be minimised).
So here is my question: wouldn't it better to evaluate
f(x)=(x-1)^4
since it would only need 1 addition and 4 multiplication?
Could anyone share some insights on this?
Last edited: