Clarify formula that computes number of dies on wafer I want to compute the number of dies per wafer (also DPW in the following).

There are some formulas, that can be used to do so:

https://en.wikipedia.org/wiki/Wafer_(electronics)#Analytical_die_count_estimation
The formulas all have the same schema; first the upper bound is computed, which is them diminished by a correction term.
The upper bound is easy to get. The area of a circle is $A_{circle} = \pi * r^2$ (or if you use d: $\pi * (\frac{d}{2})^2 = \pi * \frac{d^2}{4}$), the area of a single die is $S$. That results in the quotient being $\pi * \frac{r^2}{S}$ or $\pi * \frac{d^2}{4S}$ which displays the upper bound on the number of dies per wafer.
But I have difficulties wrapping my head around the correction terms.
Can someone explain them geometrically? I'm especially interested in the first formula.
 A: In the formulas, $d$ is the diameter of the wafer, in some linear unit (such as $\text{mm}$), and $S$ is the area of each die, in the relevant area unit (such as $\text{mm}^2$). In the diagram you gave I do not count the two dies at the top or at the bottom, since they seem to be identical with the ones at the left and top which were not counted. This gives $172$ dies on that wafer. We could use $d=16$ and $S=1$ in this example.
As you point out, $\dfrac{\pi d^2}{4S}$ is the ratio of the area of the wafer to the area of each die. We then need to remove those partial-dies at the circumference of the circle.
We see that most of the removed dies are either at the top, bottom, left, or right of the circle, which removes about one die for each unit length of the circle's circumference.
Most of the rest are removed at the upper-left etc. "corners" of the circle where the curve is at about a $45°$ angle to the axes. In those regions, the circumference through the die is roughly equal to the diagonal of the die. If the die's side is $x$ then the diagonal is $x\sqrt 2$ and the area is $S=x^2$, so we can get the diagonal from the area $S$ by $\text{diagonal}=\sqrt{2S}$. So the number of dies removed in those regions is about one die for each $\sqrt{2S}$ length of the circle's circumference. If you look at the diagram you will see that the number of dies removed is actually higher than that, since the dies "fill in the corners" of each other.
So a fair approximation of dies removed at the circumference will use an average of $1$ and something greater than $\sqrt{2S}$. We might as well then use $\sqrt{2S}$ as the average dies removed per unit circumference length.
Using this average per unit then gives us this formula for the total number of dies removed at the circumference:
$$\frac{\pi d}{\sqrt{2S}}$$
and that gives the first formula you give.
The formula gives a value about $165.52$, pretty close to the actual value of $172$.

I suspect that the other two formulas just use exponential and polynomial curve-fitting using the ratio $\dfrac{\sqrt S}{d}$ of the diagonals of the die and the circle. I don't see anything geometrically profound there.
