01:198:323 Lecture Notes - Lecture 3: Glossary Of Video Game Terms, Methamphetamine

71 views14 pages

Document Summary

Consider having a polynomial p(x) = a0 + a1x + a2x2 + + anxn which you need to evaluate for many values of x. This may seem a strange question, but the answer is not as obvious as you might think. The standard way, written in a loose algorithmic for- mat: poly = a0 f or j = 1 : n poly = poly + ajxj end. To compare the costs of di erent numerical meth- ods, we do an operations count, and then we compare these for the competing methods. Above, the counts are as follows: additions : n multiplications : 1 + 2 + 3 + + n = This assumes each term ajxj is computed indepen- dently of the remaining terms in the polynomial. Next, do the terms xj recursively: xj = x xj 1. Then to computenx2, x3, , xno will cost n 1 mul- tiplications.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents