I'm reading this textbook:
Randal E. Bryant, David R. O’Hallaron - Computer Systems. A Programmer’s Perspective [3rd ed.] (2016, Pearson).
Currently I am unsure about Problem 5.5 in the text book. Below, I have attached a link to the book to make it easier to find.
And this is the answer they give:
Could someone please tell me how the authors arrive at the answer for this question? I am not sure about how they count the number of computations (n additions and 2n multiplications).
Thank you in advance, any help is appreciated :)