So ..from below image we see that
cost less CPU to compute with Horner than old fashion!!!
Especially if we have a Polyonim like
F(x)=x^10-2x^9+5x^8...etc...
So..with Horner we need N multiplications and N adds.
Old fashion we need N+ N-1 +N-2+....1 =N+N*(N/2) mulyiplications!!!
Nice!!!! I just hadnt realise it!!!
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου