Rational numbers $a,b$ are chosen at random among all rationals in $[0,2)$ writable as $n/d$ with $1\le d\le6$. What is the probability that $(\cos(a\pi)+i\sin(b\pi))^4$ is real?
Expanding $(x+iy)^4$ with $x=\cos(a\pi),y=\sin(b\pi)$, the imaginary part is $4xy(x^2-y^2)$, which vanishes iff $x=0$, $y=0$, or $x=\pm y$.
The values in $[0,2)$ are $0,1$, the $2$ halves, $4$ thirds, $4$ quarters, $8$ fifths and $4$ sixths ($\frac16,\frac56,\frac76,\frac{11}6$): $24$ values, so $576$ pairs.
$x=0$ ($a=\frac12,\frac32$): $48$ pairs; $y=0$ ($b=0,1$): $48$ pairs; both: $4$. So $92$ pairs have $xy=0$.
$x^2=y^2\ne0$: the common values of $|\cos a\pi|$ and $|\sin b\pi|$ are $1$ ($2\cdot2=4$ pairs), $\frac{\sqrt2}2$ ($4\cdot4=16$), $\frac12$ ($a$ in thirds, $b$ in sixths: $16$) and $\frac{\sqrt3}2$ ($a$ in sixths, $b$ in thirds: $16$); the fifths give $\cos36^\circ,\cos72^\circ$ against $\sin36^\circ,\sin72^\circ$, which never match. That is $52$ pairs.