I "look up". Quite literally.
I imagine you are one of the numbers, an then look up.
If the number sees one fraction line, or any odd number of them, then it belongs to the position where it will still see one fraction line above it (i.e., in the denominator)
If the number sees no fraction line, or two, or any even number of them, then it belongs to the position where it will still see no fraction line above it (i.e., in the numerator)
Note that wider lines hide the narrower lines above them
Example:
$\Large x=\frac{\frac{\frac{\frac{a}{b}}{c}}{d}}{\frac{\frac{\frac{e}{f}}{g}}{\frac{h}{i}}}$
Utterly confusing to simplify? Not really. It goes as:
- a sees 0 lines above it. Goes to the upper side of the final fraction.
- b sees 1 line above it. Goes to the down side of the final fraction.
- c sees 1 line above it (the line dividing a from b is narrower, so it can not be seen). Goes to the down side of the final fraction.
- d and e also sees 1 line. Down.
- f sees 2 lines. It goes to the upper side.
- g and h also both see 2 lines. Up.
- i sees 3 lines. That's the same as 1 line. Goes down.
So we get:
$x=\frac{a\,f\,g\,h}{b\,c\,d\,e\,i}$
We need to be careful when writing the fraction, so to have the correct line sizes - but we always do, it is not a special concern here.
The justification is simple. Each fraction line represents a "inverse of ", so every 2 of then cancel out.
\dfrac{(\frac{3}{8})}{(\frac{4}{5})}
yields $\dfrac{(\frac{3}{8})}{(\frac{4}{5})}$ whereas\frac{3}{8}\div \frac{4}{5}
yields $\frac{3}{8}\div \frac{4}{5}$. Alternatively still, one could use/
to represent division as well, as Subhadeep Dey has done with his edit, or you could fiddle with spacing and not use parenthesis, e.g. $\dfrac{~~\frac{3}{8}~~}{~~\frac{4}{5}~~}$ $\endgroup$