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.8
\[\leadsto \color{blue}{\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos - 1, 1\right), ux - \mathsf{fma}\left(ux, maxCos, 1\right), 1\right)}}
\]
Proof
(*.f32 (cos.f32 (*.f32 uy (*.f32 2 (PI.f32)))) (sqrt.f32 (fma.f32 (fma.f32 ux (-.f32 maxCos 1) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 uy 2) (PI.f32)))) (sqrt.f32 (fma.f32 (fma.f32 ux (-.f32 maxCos 1) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (fma.f32 ux (Rewrite=> sub-neg_binary32 (+.f32 maxCos (neg.f32 1))) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (fma.f32 ux (+.f32 maxCos (Rewrite=> metadata-eval -1)) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (fma.f32 ux (Rewrite<= +-commutative_binary32 (+.f32 -1 maxCos)) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (Rewrite<= fma-def_binary32 (+.f32 (*.f32 ux (+.f32 -1 maxCos)) 1)) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (Rewrite<= distribute-rgt-out_binary32 (+.f32 (*.f32 -1 ux) (*.f32 maxCos ux))) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (+.f32 (Rewrite<= neg-mul-1_binary32 (neg.f32 ux)) (*.f32 maxCos ux)) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (+.f32 (neg.f32 ux) (Rewrite<= *-commutative_binary32 (*.f32 ux maxCos))) 1) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (Rewrite<= +-commutative_binary32 (+.f32 1 (+.f32 (neg.f32 ux) (*.f32 ux maxCos)))) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (Rewrite<= associate-+l+_binary32 (+.f32 (+.f32 1 (neg.f32 ux)) (*.f32 ux maxCos))) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 5 points increase in error, 1 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (Rewrite<= sub-neg_binary32 (-.f32 1 ux)) (*.f32 ux maxCos)) (-.f32 ux (fma.f32 ux maxCos 1)) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.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))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.f32 (*.f32 (*.f32 uy 2) (PI.f32))) (sqrt.f32 (fma.f32 (+.f32 (-.f32 1 ux) (*.f32 ux maxCos)) (Rewrite<= unsub-neg_binary32 (+.f32 ux (neg.f32 (+.f32 (*.f32 ux maxCos) 1)))) 1))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.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, 0 points decrease in error
(*.f32 (cos.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))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.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, 0 points decrease in error
(*.f32 (cos.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))): 4 points increase in error, 1 points decrease in error
(*.f32 (cos.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))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.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, 0 points decrease in error
(*.f32 (cos.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)))): 91 points increase in error, 69 points decrease in error
(*.f32 (cos.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))): 0 points increase in error, 0 points decrease in error
(*.f32 (cos.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, 0 points decrease in error
(*.f32 (cos.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, 0 points decrease in error
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}{\mathsf{fma}\left(ux, \left(1 - maxCos\right) + \left(1 - maxCos\right), \left(ux \cdot ux\right) \cdot \left(\left(-1 + maxCos\right) \cdot \left(1 - maxCos\right)\right)\right)}}
\]
Proof
(fma.f32 ux (+.f32 (-.f32 1 maxCos) (-.f32 1 maxCos)) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (+.f32 (Rewrite=> sub-neg_binary32 (+.f32 1 (neg.f32 maxCos))) (-.f32 1 maxCos)) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (+.f32 (+.f32 1 (Rewrite<= mul-1-neg_binary32 (*.f32 -1 maxCos))) (-.f32 1 maxCos)) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (Rewrite<= associate--l+_binary32 (-.f32 (+.f32 (+.f32 1 (*.f32 -1 maxCos)) 1) maxCos)) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 2 points increase in error, 6 points decrease in error
(fma.f32 ux (-.f32 (+.f32 (+.f32 (Rewrite<= metadata-eval (*.f32 -1 -1)) (*.f32 -1 maxCos)) 1) maxCos) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 (Rewrite<= distribute-lft-in_binary32 (*.f32 -1 (+.f32 -1 maxCos))) 1) maxCos) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 (*.f32 -1 (Rewrite<= +-commutative_binary32 (+.f32 maxCos -1))) 1) maxCos) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 (*.f32 -1 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1)))) 1) maxCos) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 (*.f32 -1 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1))) 1) maxCos) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (Rewrite<= +-commutative_binary32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1)))) maxCos) (*.f32 (*.f32 ux ux) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (Rewrite<= unpow2_binary32 (pow.f32 ux 2)) (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (pow.f32 ux 2) (*.f32 (Rewrite<= +-commutative_binary32 (+.f32 maxCos -1)) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (pow.f32 ux 2) (*.f32 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1))) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (pow.f32 ux 2) (*.f32 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1)) (-.f32 1 maxCos)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (pow.f32 ux 2) (*.f32 (-.f32 maxCos 1) (Rewrite=> sub-neg_binary32 (+.f32 1 (neg.f32 maxCos)))))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (pow.f32 ux 2) (*.f32 (-.f32 maxCos 1) (+.f32 1 (Rewrite<= mul-1-neg_binary32 (*.f32 -1 maxCos)))))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (pow.f32 ux 2) (Rewrite=> *-commutative_binary32 (*.f32 (+.f32 1 (*.f32 -1 maxCos)) (-.f32 maxCos 1))))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (Rewrite<= associate-*l*_binary32 (*.f32 (*.f32 (pow.f32 ux 2) (+.f32 1 (*.f32 -1 maxCos))) (-.f32 maxCos 1)))): 0 points increase in error, 0 points decrease in error
(fma.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (Rewrite<= *-commutative_binary32 (*.f32 (-.f32 maxCos 1) (*.f32 (pow.f32 ux 2) (+.f32 1 (*.f32 -1 maxCos)))))): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-def_binary32 (+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (*.f32 (-.f32 maxCos 1) (*.f32 (pow.f32 ux 2) (+.f32 1 (*.f32 -1 maxCos)))))): 3 points increase in error, 4 points decrease in error
(+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (*.f32 (-.f32 maxCos 1) (*.f32 (pow.f32 ux 2) (+.f32 1 (Rewrite=> mul-1-neg_binary32 (neg.f32 maxCos)))))): 0 points increase in error, 0 points decrease in error
(+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (*.f32 (-.f32 maxCos 1) (*.f32 (pow.f32 ux 2) (Rewrite<= sub-neg_binary32 (-.f32 1 maxCos))))): 0 points increase in error, 0 points decrease in error
(+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (*.f32 (-.f32 maxCos 1) (Rewrite<= *-commutative_binary32 (*.f32 (-.f32 1 maxCos) (pow.f32 ux 2))))): 0 points increase in error, 0 points decrease in error
(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, 0 points decrease in error
Applied egg-rr0.3
\[\leadsto \cos \color{blue}{\left(\sqrt[3]{{\left(2 \cdot \pi\right)}^{3} \cdot {uy}^{3}}\right)} \cdot \sqrt{\mathsf{fma}\left(ux, \left(1 - maxCos\right) + \left(1 - maxCos\right), \left(ux \cdot ux\right) \cdot \left(\left(-1 + maxCos\right) \cdot \left(1 - maxCos\right)\right)\right)}
\]
Final simplification0.3
\[\leadsto \cos \left(\sqrt[3]{{\left(2 \cdot \pi\right)}^{3} \cdot {uy}^{3}}\right) \cdot \sqrt{\mathsf{fma}\left(ux, \left(1 - maxCos\right) + \left(1 - maxCos\right), \left(ux \cdot ux\right) \cdot \left(\left(1 - maxCos\right) \cdot \left(maxCos + -1\right)\right)\right)}
\]