11# Example Chapter03_02
2+
23## Integer Types Having Fixed Widths and Prime Numbers
34
45<p align =" center " >
5- <a href="https://godbolt.org/z/dPbM7v4ff" alt="godbolt" >
6- <img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" /></a>
6+ <a href="https://godbolt.org/z/dPbM7v4ff">
7+ <img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" alt="godbolt" /></a>
78</p >
89
910Example chapter03_02 focuses on integer types having fixed widths.
1011The example gets into a fascinating calculation of prime numbers
11- that is simultaneously intended to emphasize the usefullness
12+ that is simultaneously intended to emphasize the usefulness
1213and portability of fixed-width integer types.
1314
1415## Fixed-Width Integer Types
@@ -50,7 +51,7 @@ with the input `Prime[100]`.
5051
5152The example begins by querying the number of entries required
5253in the sieve to calculate the prime 541. For this, a simple divergent
53- asymptotic series approximation of the lograithmic integral function is used.
54+ asymptotic series approximation of the logarithmic integral function is used.
5455Instead of 100, the approximation returns 108, which is
5556adequately close to the desired limit and large enough.
5657
@@ -70,17 +71,17 @@ The approximate runtime of each task call required for the
7071entire sieve calculation of $100$ prime numbers is approximately $5\text{ms}$.
7172
7273A debug port, in this case ` portd.3 ` is toggled high and low
73- just prior to and after the call of the prime sieve cacle task.
74- A straightofrward digital oscilloscope measurement provides
74+ just prior to and after the call of the prime sieve cycle task.
75+ A straightforward digital oscilloscope measurement provides
7576a timing indication for the runtime of the prime sieve cycle task.
7677
7778A running hardware setup is shown in the picture below.
7879
79- ![ ] ( ./images/board03_02.jpg )
80+ ![ running hardware setup ] ( ./images/board03_02.jpg )
8081
8182The runtime of the prime sieve cycle task is depicted below.
8283
83- ![ ] ( ./images/scope03_02.jpg )
84+ ![ runtime curve on oscilloscope ] ( ./images/scope03_02.jpg )
8485
8586## A PC-Based example
8687
@@ -124,7 +125,7 @@ at this numerical point?
124125
125126Consider the following input.
126127
127- ```
128+ ``` text
128129N[(LogIntegral[10006721] - LogIntegral[2])/664999, 20]
129130```
130131
0 commit comments