Initial program 13.6
\[\sin \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.6
\[\leadsto \color{blue}{\sin \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)}}
\]
Proof
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 (-.f32 (fma.f32 ux maxCos 1) ux) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 uy 2) (PI.f32)))) (sqrt.f32 (fma.f32 (-.f32 (fma.f32 ux maxCos 1) ux) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (-.f32 (Rewrite<= fma-def_binary32 (+.f32 (*.f32 ux maxCos) 1)) ux) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (Rewrite<= associate-+r-_binary32 (+.f32 (*.f32 ux maxCos) (-.f32 1 ux))) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (Rewrite<= +-commutative_binary32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos))) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (-.f32 ux (Rewrite<= fma-def_binary32 (+.f32 (*.f32 ux maxCos) 1))) 1))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (Rewrite=> sub-neg_binary32 (+.f32 ux (neg.f32 (+.f32 (*.f32 ux maxCos) 1)))) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (+.f32 (Rewrite<= remove-double-neg_binary32 (neg.f32 (neg.f32 ux))) (neg.f32 (+.f32 (*.f32 ux maxCos) 1))) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (Rewrite<= distribute-neg-in_binary32 (neg.f32 (+.f32 (neg.f32 ux) (+.f32 (*.f32 ux maxCos) 1)))) 1))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (neg.f32 (Rewrite<= +-commutative_binary32 (+.f32 (+.f32 (*.f32 ux maxCos) 1) (neg.f32 ux)))) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (neg.f32 (Rewrite<= associate-+r+_binary32 (+.f32 (*.f32 ux maxCos) (+.f32 1 (neg.f32 ux))))) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (neg.f32 (+.f32 (*.f32 ux maxCos) (Rewrite<= sub-neg_binary32 (-.f32 1 ux)))) 1))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (neg.f32 (Rewrite<= +-commutative_binary32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)))) 1))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (Rewrite<= fma-def_binary32 (+.f32 (*.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (neg.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)))) 1)))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (+.f32 (Rewrite<= *-commutative_binary32 (*.f32 (neg.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos))) (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)))) 1))): 17 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (Rewrite<= +-commutative_binary32 (+.f32 1 (*.f32 (neg.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos))) (+.f32 (-.f32 1 ux) (*.f32 ux maxCos))))))): 0 points increase in error, 17 points decrease in error
(*.f32 (sin.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (Rewrite<= cancel-sign-sub-inv_binary32 (-.f32 1 (*.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (+.f32 (-.f32 1 ux) (*.f32 ux maxCos))))))): 0 points increase in error, 17 points decrease in error
Taylor expanded in ux around 0 0.6
\[\leadsto \sin \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.6
\[\leadsto \sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(ux, \left(2 + \left(-maxCos\right)\right) - maxCos, \left(1 - maxCos\right) \cdot \left(\left(-1 + maxCos\right) \cdot \left(ux \cdot ux\right)\right)\right)}}
\]
Proof
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 2 (neg.f32 maxCos)) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 (Rewrite<= metadata-eval (+.f32 1 1)) (neg.f32 maxCos)) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 18 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 (+.f32 1 1) (Rewrite<= mul-1-neg_binary32 (*.f32 -1 maxCos))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (Rewrite<= associate-+r+_binary32 (+.f32 1 (+.f32 1 (*.f32 -1 maxCos)))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (Rewrite=> +-commutative_binary32 (+.f32 (*.f32 -1 maxCos) 1))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (+.f32 (*.f32 -1 maxCos) (Rewrite<= metadata-eval (*.f32 -1 -1)))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (Rewrite<= distribute-lft-in_binary32 (*.f32 -1 (+.f32 maxCos -1)))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1))))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 18 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1)))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 -1 maxCos) (*.f32 ux ux)))))): 0 points increase in error, 18 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite<= +-commutative_binary32 (+.f32 maxCos -1)) (*.f32 ux ux)))))): 18 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1))) (*.f32 ux ux)))))): 0 points increase in error, 18 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1)) (*.f32 ux ux)))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (-.f32 1 maxCos) (*.f32 (-.f32 maxCos 1) (Rewrite<= unpow2_binary32 (pow.f32 ux 2))))))): 18 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 (-.f32 1 maxCos) (-.f32 maxCos 1)) (pow.f32 ux 2)))))): 0 points increase in error, 18 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (Rewrite<= *-commutative_binary32 (*.f32 (-.f32 maxCos 1) (-.f32 1 maxCos))) (pow.f32 ux 2))))): 18 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (Rewrite<= associate-*r*_binary32 (*.f32 (-.f32 maxCos 1) (*.f32 (-.f32 1 maxCos) (pow.f32 ux 2))))))): 0 points increase in error, 18 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (Rewrite<= fma-def_binary32 (+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (*.f32 (-.f32 maxCos 1) (*.f32 (-.f32 1 maxCos) (pow.f32 ux 2))))))): 18 points increase in error, 0 points decrease in error
(*.f32 (sin.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (Rewrite<= +-commutative_binary32 (+.f32 (*.f32 (-.f32 maxCos 1) (*.f32 (-.f32 1 maxCos) (pow.f32 ux 2))) (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)))))): 0 points increase in error, 18 points decrease in error
Taylor expanded in uy around inf 0.5
\[\leadsto \color{blue}{\sqrt{\left(2 - 2 \cdot maxCos\right) \cdot ux + \left(1 - maxCos\right) \cdot \left(\left(maxCos - 1\right) \cdot {ux}^{2}\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \pi\right)\right)}
\]
Simplified0.5
\[\leadsto \color{blue}{\sqrt{ux \cdot \left(\left(2 + maxCos \cdot -2\right) + \left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \pi\right)\right)}
\]
Proof
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (+.f32 2 (*.f32 maxCos -2)) (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (+.f32 2 (Rewrite<= *-commutative_binary32 (*.f32 -2 maxCos))) (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 6 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (+.f32 2 (*.f32 (Rewrite<= metadata-eval (neg.f32 2)) maxCos)) (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (Rewrite<= cancel-sign-sub-inv_binary32 (-.f32 2 (*.f32 2 maxCos))) (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (-.f32 2 (*.f32 2 maxCos)) (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1)))))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (-.f32 2 (*.f32 2 maxCos)) (*.f32 (-.f32 1 maxCos) (*.f32 ux (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1))))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (-.f32 2 (*.f32 2 maxCos)) (*.f32 (-.f32 1 maxCos) (Rewrite<= *-commutative_binary32 (*.f32 (-.f32 maxCos 1) ux)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (-.f32 2 (*.f32 2 maxCos)) (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite=> sub-neg_binary32 (+.f32 maxCos (neg.f32 1))) ux))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 15 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (*.f32 ux (+.f32 (-.f32 2 (*.f32 2 maxCos)) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos (Rewrite=> metadata-eval -1)) ux))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 15 points decrease in error
(*.f32 (sqrt.f32 (Rewrite<= distribute-rgt-out_binary32 (+.f32 (*.f32 (-.f32 2 (*.f32 2 maxCos)) ux) (*.f32 (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux)) ux)))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 15 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (+.f32 (*.f32 (-.f32 2 (*.f32 2 maxCos)) ux) (Rewrite<= associate-*r*_binary32 (*.f32 (-.f32 1 maxCos) (*.f32 (*.f32 (+.f32 maxCos -1) ux) ux))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 15 points decrease in error
(*.f32 (sqrt.f32 (+.f32 (*.f32 (-.f32 2 (*.f32 2 maxCos)) ux) (*.f32 (-.f32 1 maxCos) (Rewrite<= associate-*r*_binary32 (*.f32 (+.f32 maxCos -1) (*.f32 ux ux)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (+.f32 (*.f32 (-.f32 2 (*.f32 2 maxCos)) ux) (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1))) (*.f32 ux ux))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 15 points increase in error, 0 points decrease in error
(*.f32 (sqrt.f32 (+.f32 (*.f32 (-.f32 2 (*.f32 2 maxCos)) ux) (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1)) (*.f32 ux ux))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 0 points increase in error, 15 points decrease in error
(*.f32 (sqrt.f32 (+.f32 (*.f32 (-.f32 2 (*.f32 2 maxCos)) ux) (*.f32 (-.f32 1 maxCos) (*.f32 (-.f32 maxCos 1) (Rewrite<= unpow2_binary32 (pow.f32 ux 2)))))) (sin.f32 (*.f32 2 (*.f32 uy (PI.f32))))): 15 points increase in error, 0 points decrease in error
Final simplification0.5
\[\leadsto \sqrt{ux \cdot \left(\left(2 + maxCos \cdot -2\right) + \left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \pi\right)\right)
\]