Initial program 13.8
\[\cos \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)}
\]
Simplified13.9
\[\leadsto \color{blue}{\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, ux - \mathsf{fma}\left(ux, maxCos, 1\right), 1\right)}}
\]
Taylor expanded in ux around 0 0.3
\[\leadsto \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(maxCos - 1\right) \cdot \left(\left(1 - maxCos\right) \cdot {ux}^{2}\right) + ux \cdot \left(\left(1 + -1 \cdot \left(maxCos - 1\right)\right) - maxCos\right)}}
\]
Simplified0.3
\[\leadsto \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(ux - ux \cdot maxCos\right) \cdot \left(2 - \left(ux - ux \cdot maxCos\right)\right)}}
\]
Final simplification0.3
\[\leadsto \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\left(2 + \left(ux \cdot maxCos - ux\right)\right) \cdot \left(ux - ux \cdot maxCos\right)}
\]