Average Error: 13.7 → 0.6
Time: 16.5s
Precision: binary32
Cost: 18304
\[\left(\left(2.328306437 \cdot 10^{-10} \leq ux \land ux \leq 1\right) \land \left(2.328306437 \cdot 10^{-10} \leq uy \land uy \leq 1\right)\right) \land \left(0 \leq maxCos \land maxCos \leq 1\right)\]
\[\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)} \]
\[\begin{array}{l} t_0 := ux \cdot \left(1 - maxCos\right)\\ t_1 := ux \cdot \left(maxCos + -1\right)\\ t_2 := ux \cdot \left(\left(1 - maxCos\right) \cdot t_1\right)\\ \sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\frac{8 \cdot {t_0}^{3} + {t_2}^{3}}{4 \cdot \left(t_1 \cdot t_1\right) - t_2 \cdot \left(2 \cdot t_0 + ux \cdot \left(\left(maxCos + -1\right) \cdot t_1\right)\right)}} \end{array} \]
(FPCore (ux uy maxCos)
 :precision binary32
 (*
  (sin (* (* uy 2.0) PI))
  (sqrt
   (- 1.0 (* (+ (- 1.0 ux) (* ux maxCos)) (+ (- 1.0 ux) (* ux maxCos)))))))
(FPCore (ux uy maxCos)
 :precision binary32
 (let* ((t_0 (* ux (- 1.0 maxCos)))
        (t_1 (* ux (+ maxCos -1.0)))
        (t_2 (* ux (* (- 1.0 maxCos) t_1))))
   (*
    (sin (* uy (* 2.0 PI)))
    (sqrt
     (/
      (+ (* 8.0 (pow t_0 3.0)) (pow t_2 3.0))
      (-
       (* 4.0 (* t_1 t_1))
       (* t_2 (+ (* 2.0 t_0) (* ux (* (+ maxCos -1.0) t_1))))))))))
float code(float ux, float uy, float maxCos) {
	return sinf(((uy * 2.0f) * ((float) M_PI))) * sqrtf((1.0f - (((1.0f - ux) + (ux * maxCos)) * ((1.0f - ux) + (ux * maxCos)))));
}
float code(float ux, float uy, float maxCos) {
	float t_0 = ux * (1.0f - maxCos);
	float t_1 = ux * (maxCos + -1.0f);
	float t_2 = ux * ((1.0f - maxCos) * t_1);
	return sinf((uy * (2.0f * ((float) M_PI)))) * sqrtf((((8.0f * powf(t_0, 3.0f)) + powf(t_2, 3.0f)) / ((4.0f * (t_1 * t_1)) - (t_2 * ((2.0f * t_0) + (ux * ((maxCos + -1.0f) * t_1)))))));
}
function code(ux, uy, maxCos)
	return Float32(sin(Float32(Float32(uy * Float32(2.0)) * Float32(pi))) * sqrt(Float32(Float32(1.0) - Float32(Float32(Float32(Float32(1.0) - ux) + Float32(ux * maxCos)) * Float32(Float32(Float32(1.0) - ux) + Float32(ux * maxCos))))))
end
function code(ux, uy, maxCos)
	t_0 = Float32(ux * Float32(Float32(1.0) - maxCos))
	t_1 = Float32(ux * Float32(maxCos + Float32(-1.0)))
	t_2 = Float32(ux * Float32(Float32(Float32(1.0) - maxCos) * t_1))
	return Float32(sin(Float32(uy * Float32(Float32(2.0) * Float32(pi)))) * sqrt(Float32(Float32(Float32(Float32(8.0) * (t_0 ^ Float32(3.0))) + (t_2 ^ Float32(3.0))) / Float32(Float32(Float32(4.0) * Float32(t_1 * t_1)) - Float32(t_2 * Float32(Float32(Float32(2.0) * t_0) + Float32(ux * Float32(Float32(maxCos + Float32(-1.0)) * t_1))))))))
end
function tmp = code(ux, uy, maxCos)
	tmp = sin(((uy * single(2.0)) * single(pi))) * sqrt((single(1.0) - (((single(1.0) - ux) + (ux * maxCos)) * ((single(1.0) - ux) + (ux * maxCos)))));
end
function tmp = code(ux, uy, maxCos)
	t_0 = ux * (single(1.0) - maxCos);
	t_1 = ux * (maxCos + single(-1.0));
	t_2 = ux * ((single(1.0) - maxCos) * t_1);
	tmp = sin((uy * (single(2.0) * single(pi)))) * sqrt((((single(8.0) * (t_0 ^ single(3.0))) + (t_2 ^ single(3.0))) / ((single(4.0) * (t_1 * t_1)) - (t_2 * ((single(2.0) * t_0) + (ux * ((maxCos + single(-1.0)) * t_1)))))));
end
\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)}
\begin{array}{l}
t_0 := ux \cdot \left(1 - maxCos\right)\\
t_1 := ux \cdot \left(maxCos + -1\right)\\
t_2 := ux \cdot \left(\left(1 - maxCos\right) \cdot t_1\right)\\
\sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\frac{8 \cdot {t_0}^{3} + {t_2}^{3}}{4 \cdot \left(t_1 \cdot t_1\right) - t_2 \cdot \left(2 \cdot t_0 + ux \cdot \left(\left(maxCos + -1\right) \cdot t_1\right)\right)}}
\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.7

    \[\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)} \]
  2. Simplified13.7

    \[\leadsto \color{blue}{\sin \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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (sin.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 (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))): 0 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<= unsub-neg_binary32 (+.f32 ux (neg.f32 (+.f32 (*.f32 ux maxCos) 1)))) 1))): 0 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)) (+.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 (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))): 0 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, 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<= associate-+r+_binary32 (+.f32 (*.f32 ux maxCos) (+.f32 1 (neg.f32 ux))))) 1))): 4 points increase in error, 1 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))): 0 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, 0 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)))): 89 points increase in error, 70 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))): 0 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, 0 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, 0 points decrease in error
  3. 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)}} \]
  4. Simplified0.6

    \[\leadsto \sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{ux \cdot \left(2 \cdot \left(1 - maxCos\right) + \left(\left(-1 + maxCos\right) \cdot \left(1 - maxCos\right)\right) \cdot ux\right)}} \]
    Proof
    (*.f32 ux (+.f32 (*.f32 2 (-.f32 1 maxCos)) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (*.f32 2 (Rewrite=> sub-neg_binary32 (+.f32 1 (neg.f32 maxCos)))) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (*.f32 2 (+.f32 1 (Rewrite<= mul-1-neg_binary32 (*.f32 -1 maxCos)))) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (Rewrite<= count-2_binary32 (+.f32 (+.f32 1 (*.f32 -1 maxCos)) (+.f32 1 (*.f32 -1 maxCos)))) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (+.f32 (+.f32 1 (*.f32 -1 maxCos)) (+.f32 1 (Rewrite=> mul-1-neg_binary32 (neg.f32 maxCos)))) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (+.f32 (+.f32 1 (*.f32 -1 maxCos)) (Rewrite<= sub-neg_binary32 (-.f32 1 maxCos))) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (Rewrite<= associate--l+_binary32 (-.f32 (+.f32 (+.f32 1 (*.f32 -1 maxCos)) 1) maxCos)) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 5 points increase in error, 4 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 (+.f32 (Rewrite<= metadata-eval (*.f32 -1 -1)) (*.f32 -1 maxCos)) 1) maxCos) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 (Rewrite<= distribute-lft-in_binary32 (*.f32 -1 (+.f32 -1 maxCos))) 1) maxCos) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 (*.f32 -1 (Rewrite<= +-commutative_binary32 (+.f32 maxCos -1))) 1) maxCos) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 (*.f32 -1 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1)))) 1) maxCos) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 (*.f32 -1 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1))) 1) maxCos) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (Rewrite<= +-commutative_binary32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1)))) maxCos) (*.f32 (*.f32 (+.f32 -1 maxCos) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (*.f32 (Rewrite<= +-commutative_binary32 (+.f32 maxCos -1)) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (*.f32 (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1))) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (*.f32 ux (+.f32 (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) (*.f32 (*.f32 (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1)) (-.f32 1 maxCos)) ux))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= distribute-rgt-out_binary32 (+.f32 (*.f32 (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos) ux) (*.f32 (*.f32 (*.f32 (-.f32 maxCos 1) (-.f32 1 maxCos)) ux) ux))): 19 points increase in error, 24 points decrease in error
    (+.f32 (Rewrite<= *-commutative_binary32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos))) (*.f32 (*.f32 (*.f32 (-.f32 maxCos 1) (-.f32 1 maxCos)) ux) ux)): 0 points increase in error, 0 points decrease in error
    (+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (Rewrite<= associate-*r*_binary32 (*.f32 (*.f32 (-.f32 maxCos 1) (-.f32 1 maxCos)) (*.f32 ux ux)))): 0 points increase in error, 0 points decrease in error
    (+.f32 (*.f32 ux (-.f32 (+.f32 1 (*.f32 -1 (-.f32 maxCos 1))) maxCos)) (*.f32 (*.f32 (-.f32 maxCos 1) (-.f32 1 maxCos)) (Rewrite<= unpow2_binary32 (pow.f32 ux 2)))): 0 points increase in error, 0 points decrease in error
    (+.f32 (*.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, 1 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
  5. Applied egg-rr0.6

    \[\leadsto \sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\frac{{\left(2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right)\right)}^{3} + {\left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(\left(maxCos + -1\right) \cdot ux\right)\right)\right)}^{3}}{\mathsf{fma}\left(2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right), 2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right), \left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(\left(maxCos + -1\right) \cdot ux\right)\right)\right) \cdot \left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(\left(maxCos + -1\right) \cdot ux\right)\right)\right) - \left(2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right)\right) \cdot \left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(\left(maxCos + -1\right) \cdot ux\right)\right)\right)\right)}}} \]
  6. Simplified0.6

    \[\leadsto \sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\frac{8 \cdot {\left(ux \cdot \left(1 - maxCos\right)\right)}^{3} + {\left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)\right)}^{3}}{4 \cdot \left(\left(ux \cdot \left(1 - maxCos\right)\right) \cdot \left(ux \cdot \left(1 - maxCos\right)\right)\right) + \left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)\right) \cdot \left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right) - 2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right)\right)}}} \]
    Proof
    (/.f32 (+.f32 (*.f32 8 (pow.f32 (*.f32 ux (-.f32 1 maxCos)) 3)) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (*.f32 (Rewrite<= metadata-eval (pow.f32 2 3)) (pow.f32 (*.f32 ux (-.f32 1 maxCos)) 3)) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (Rewrite<= cube-prod_binary32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3)) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1)))))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1))))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (Rewrite=> *-commutative_binary32 (*.f32 (-.f32 maxCos 1) ux)))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite=> sub-neg_binary32 (+.f32 maxCos (neg.f32 1))) ux))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos (Rewrite=> metadata-eval -1)) ux))) 3)) (+.f32 (*.f32 4 (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (Rewrite<= metadata-eval (*.f32 2 2)) (*.f32 (*.f32 ux (-.f32 1 maxCos)) (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (Rewrite<= swap-sqr_binary32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1)))))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1))))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (Rewrite=> *-commutative_binary32 (*.f32 (-.f32 maxCos 1) ux)))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite=> sub-neg_binary32 (+.f32 maxCos (neg.f32 1))) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos (Rewrite=> metadata-eval -1)) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos -1)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (+.f32 maxCos (Rewrite<= metadata-eval (neg.f32 1)))))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 ux (Rewrite<= sub-neg_binary32 (-.f32 maxCos 1))))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (Rewrite=> *-commutative_binary32 (*.f32 (-.f32 maxCos 1) ux)))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (Rewrite=> sub-neg_binary32 (+.f32 maxCos (neg.f32 1))) ux))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (-.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos (Rewrite=> metadata-eval -1)) ux))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (+.f32 (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos)))) (Rewrite<= distribute-rgt-out--_binary32 (-.f32 (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux)))) (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux)))))))): 0 points increase in error, 0 points decrease in error
    (/.f32 (+.f32 (pow.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) 3) (pow.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) 3)) (Rewrite<= fma-udef_binary32 (fma.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (-.f32 (*.f32 (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux))) (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux)))) (*.f32 (*.f32 2 (*.f32 ux (-.f32 1 maxCos))) (*.f32 ux (*.f32 (-.f32 1 maxCos) (*.f32 (+.f32 maxCos -1) ux)))))))): 24 points increase in error, 32 points decrease in error
  7. Final simplification0.6

    \[\leadsto \sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\frac{8 \cdot {\left(ux \cdot \left(1 - maxCos\right)\right)}^{3} + {\left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)\right)}^{3}}{4 \cdot \left(\left(ux \cdot \left(maxCos + -1\right)\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right) - \left(ux \cdot \left(\left(1 - maxCos\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)\right) \cdot \left(2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right) + ux \cdot \left(\left(maxCos + -1\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)\right)}} \]

Alternatives

Alternative 1
Error0.6
Cost10304
\[\sin \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(maxCos + -1\right) \cdot -2 - ux \cdot \left(\left(1 - maxCos\right) \cdot \left(1 - maxCos\right)\right)\right)} \]
Alternative 2
Error0.6
Cost10176
\[\sqrt{\left(ux \cdot \left(1 - maxCos\right)\right) \cdot \left(2 + \left(ux \cdot maxCos - ux\right)\right)} \cdot \sin \left(\pi \cdot \left(uy \cdot 2\right)\right) \]
Alternative 3
Error0.6
Cost10176
\[\sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(\left(2 + ux \cdot maxCos\right) - ux\right)\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \pi\right)\right) \]
Alternative 4
Error3.4
Cost9988
\[\begin{array}{l} \mathbf{if}\;uy \cdot 2 \leq 0.0012000000569969416:\\ \;\;\;\;2 \cdot \left(uy \cdot \left(\pi \cdot \sqrt{ux \cdot \left(\left(maxCos + -1\right) \cdot -2\right) - ux \cdot \left(\left(maxCos + -1\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{2 \cdot ux}\\ \end{array} \]
Alternative 5
Error2.5
Cost9920
\[\sin \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{ux \cdot \left(2 - ux\right)} \]
Alternative 6
Error6.0
Cost7168
\[2 \cdot \left(uy \cdot \left(\pi \cdot \sqrt{ux \cdot \left(\left(maxCos + -1\right) \cdot -2\right) - ux \cdot \left(\left(maxCos + -1\right) \cdot \left(ux \cdot \left(maxCos + -1\right)\right)\right)}\right)\right) \]
Alternative 7
Error6.0
Cost6976
\[2 \cdot \left(uy \cdot \left(\pi \cdot \sqrt{\left(ux \cdot \left(1 - maxCos\right)\right) \cdot \left(2 + \left(ux \cdot maxCos - ux\right)\right)}\right)\right) \]
Alternative 8
Error7.3
Cost6720
\[2 \cdot \left(uy \cdot \left(\pi \cdot \sqrt{ux \cdot \left(2 - ux\right)}\right)\right) \]
Alternative 9
Error11.7
Cost6656
\[2 \cdot \left(\left(uy \cdot \pi\right) \cdot \sqrt{2 \cdot ux}\right) \]
Alternative 10
Error29.7
Cost6592
\[2 \cdot \left(\left(uy \cdot \pi\right) \cdot \sqrt{0}\right) \]

Error

Reproduce

herbie shell --seed 2022325 
(FPCore (ux uy maxCos)
  :name "UniformSampleCone, y"
  :precision binary32
  :pre (and (and (and (<= 2.328306437e-10 ux) (<= ux 1.0)) (and (<= 2.328306437e-10 uy) (<= uy 1.0))) (and (<= 0.0 maxCos) (<= maxCos 1.0)))
  (* (sin (* (* uy 2.0) PI)) (sqrt (- 1.0 (* (+ (- 1.0 ux) (* ux maxCos)) (+ (- 1.0 ux) (* ux maxCos)))))))