Difference between revisions of "Math for CS Review"
(Created page with "Miscellaneous Order of operations: first parenthesis, then exponents, then multiplication and division, then addition and subtraction. And left to right. Powers/exponents 2...") |
|||
Line 1: | Line 1: | ||
− | + | =Memorize= | |
− | + | These are things you need to memorize. | |
− | Order of operations: first parenthesis, then exponents, then multiplication | + | * ''Order of operations:'' first parenthesis, then exponents, then multiplication/division/modulus, then addition and subtraction. And left to right. |
− | + | * ''Powers/exponents'' | |
− | Powers/exponents | + | ** 2<sup>10</sup> = 1024, roughly 1 thousand |
− | 2<sup>10</sup> = 1024, roughly 1 thousand | + | ** 2<sup>a+b</sup> = 2<sup>a</sup> * 2<sup>b</sup> |
− | + | ** y<sup>a+b</sup> = y<sup>a</sup> * y<sup>b</sup> | |
− | + | ** 2<sup>-a</sup> = 1 / (2<sup>a</sup>) | |
− | 2-a = 1 / ( | + | ** 2<sup>20</sup> = 1024 × 1024, roughly 1 million |
− | + | ** 2<sup>30</sup> = 1024 × 1024 × 1024, roughly 1 billion | |
− | + | * ''Logarithms'' | |
− | Logarithms | + | ** log<sub>b</sub>x = y, means by = x, for any b > 1 |
− | + | ** log<sub>b</sub>x = log<sub>c</sub>x / log<sub>c</sub>b, for any b > 1, c > 1 | |
− | + | ** log<sub>2</sub>10 is about 3.32 | |
− | + | ** log<sub>b</sub>(xy) = y log<sub>b</sub> x, for any b > 1 | |
− |
Revision as of 19:00, 6 January 2020
Memorize
These are things you need to memorize.
- Order of operations: first parenthesis, then exponents, then multiplication/division/modulus, then addition and subtraction. And left to right.
- Powers/exponents
- 210 = 1024, roughly 1 thousand
- 2a+b = 2a * 2b
- ya+b = ya * yb
- 2-a = 1 / (2a)
- 220 = 1024 × 1024, roughly 1 million
- 230 = 1024 × 1024 × 1024, roughly 1 billion
- Logarithms
- logbx = y, means by = x, for any b > 1
- logbx = logcx / logcb, for any b > 1, c > 1
- log210 is about 3.32
- logb(xy) = y logb x, for any b > 1