Skip to content

Commit af27e97

Browse files
Fix typos and add alt text tom imgs in example chapter03_02
1 parent b6a9961 commit af27e97

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

examples/chapter03_02/readme.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
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

910
Example chapter03_02 focuses on integer types having fixed widths.
1011
The 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
1213
and portability of fixed-width integer types.
1314

1415
## Fixed-Width Integer Types
@@ -50,7 +51,7 @@ with the input `Prime[100]`.
5051

5152
The example begins by querying the number of entries required
5253
in 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.
5455
Instead of 100, the approximation returns 108, which is
5556
adequately close to the desired limit and large enough.
5657

@@ -70,17 +71,17 @@ The approximate runtime of each task call required for the
7071
entire sieve calculation of $100$ prime numbers is approximately $5\text{ms}$.
7172

7273
A 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
7576
a timing indication for the runtime of the prime sieve cycle task.
7677

7778
A running hardware setup is shown in the picture below.
7879

79-
![](./images/board03_02.jpg)
80+
![running hardware setup](./images/board03_02.jpg)
8081

8182
The 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

125126
Consider the following input.
126127

127-
```
128+
```text
128129
N[(LogIntegral[10006721] - LogIntegral[2])/664999, 20]
129130
```
130131

0 commit comments

Comments
 (0)