Skip to content

Commit da085b5

Browse files
escape underscores
1 parent 111e9e0 commit da085b5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

content/mooreslaw-tutorial.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You'll use these NumPy and Matplotlib functions:
7777
Your empirical model assumes that the number of transistors per
7878
semiconductor follows an exponential growth,
7979

80-
$\log(\text{transistor_count})= f(\text{year}) = A\cdot \text{year}+B,$
80+
$\log(\text{transistor\_count})= f(\text{year}) = A\cdot \text{year}+B$,
8181

8282
where $A$ and $B$ are fitting constants. You use semiconductor
8383
manufacturers' data to find the fitting constants.
@@ -87,17 +87,17 @@ rate for added transistors, 2, and giving an initial number of transistors for a
8787

8888
You state Moore's law in an exponential form as follows,
8989

90-
$\text{transistor_count}= e^{A_M\cdot \text{year} +B_M}.$
90+
$\text{transistor\_count}= e^{A_M\cdot \text{year} +B_M}.$
9191

9292
Where $A_M$ and $B_M$ are constants that double the number of transistors every two years and start at 2250 transistors in 1971,
9393

94-
1. $\dfrac{\text{transistor_count}(\text{year} +2)}{\text{transistor_count}(\text{year})} = 2 = \dfrac{e^{B_M}e^{A_M \text{year} + 2A_M}}{e^{B_M}e^{A_M \text{year}}} = e^{2A_M} \rightarrow A_M = \frac{\log(2)}{2}$
94+
1. $\dfrac{\text{transistor\_count}(\text{year} +2)}{\text{transistor\_count}(\text{year})} = 2 = \dfrac{e^{B_M}e^{A_M \text{year} + 2A_M}}{e^{B_M}e^{A_M \text{year}}} = e^{2A_M} \rightarrow A_M = \frac{\log(2)}{2}$
9595

9696
2. $\log(2250) = \frac{\log(2)}{2}\cdot 1971 + B_M \rightarrow B_M = \log(2250)-\frac{\log(2)}{2}\cdot 1971$
9797

9898
so Moore's law stated as an exponential function is
9999

100-
$\log(\text{transistor_count})= A_M\cdot \text{year}+B_M,$
100+
$\log(\text{transistor\_count})= A_M\cdot \text{year}+B_M,$
101101

102102
where
103103

@@ -242,7 +242,7 @@ B, A = model
242242
Did manufacturers double the transistor count every two years? You have
243243
the final formula,
244244

245-
$\dfrac{\text{transistor_count}(\text{year} +2)}{\text{transistor_count}(\text{year})} = xFactor =
245+
$\dfrac{\text{transistor\_count}(\text{year} +2)}{\text{transistor\_count}(\text{year})} = xFactor =
246246
\dfrac{e^{B}e^{A( \text{year} + 2)}}{e^{B}e^{A \text{year}}} = e^{2A}$
247247

248248
where increase in number of transistors is $xFactor,$ number of years is
@@ -263,19 +263,19 @@ Here, use
263263
to plot the number of transistors on a log-scale and the year on a
264264
linear scale. You have defined a three arrays to get to a final model
265265

266-
$y_i = \log(\text{transistor_count}),$
266+
$y_i = \log(\text{transistor\_count}),$
267267

268268
$y_i = A \cdot \text{year} + B,$
269269

270270
and
271271

272-
$\log(\text{transistor_count}) = A\cdot \text{year} + B,$
272+
$\log(\text{transistor\_count}) = A\cdot \text{year} + B,$
273273

274274
your variables, `transistor_count`, `year`, and `yi` all have the same
275275
dimensions, `(179,)`. NumPy arrays need the same dimensions to make a
276276
plot. The predicted number of transistors is now
277277

278-
$\text{transistor_count}_{\text{predicted}} = e^Be^{A\cdot \text{year}}$.
278+
$\text{transistor\_count}_{\text{predicted}} = e^Be^{A\cdot \text{year}}$.
279279

280280
+++
281281

@@ -324,7 +324,7 @@ comparator,
324324
Then, make a prediction for 2017 with `Moores_law` defined above
325325
and plugging in your best fit constants into your function
326326

327-
$\text{transistor_count} = e^{B}e^{A\cdot \text{year}}$.
327+
$\text{transistor\_count} = e^{B}e^{A\cdot \text{year}}$.
328328

329329
A great way to compare these measurements is to compare your prediction
330330
and Moore's prediction to the average transistor count and look at the

0 commit comments

Comments
 (0)