| Alternative 1 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 16576 |
(FPCore (ux uy maxCos) :precision binary32 (* (cos (* (* 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 (cbrt (pow (sin (* uy PI)) 2.0))) (t_1 (- t_0)) (t_2 (* t_0 t_0)))
(*
(+
(fma 1.0 (pow (cos (* uy PI)) 2.0) (* t_0 (* t_0 t_1)))
(fma t_1 t_2 (* t_0 t_2)))
(sqrt (* (- 1.0 maxCos) (* ux (- 2.0 (* (- 1.0 maxCos) ux))))))))float code(float ux, float uy, float maxCos) {
return cosf(((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 = cbrtf(powf(sinf((uy * ((float) M_PI))), 2.0f));
float t_1 = -t_0;
float t_2 = t_0 * t_0;
return (fmaf(1.0f, powf(cosf((uy * ((float) M_PI))), 2.0f), (t_0 * (t_0 * t_1))) + fmaf(t_1, t_2, (t_0 * t_2))) * sqrtf(((1.0f - maxCos) * (ux * (2.0f - ((1.0f - maxCos) * ux)))));
}
function code(ux, uy, maxCos) return Float32(cos(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 = cbrt((sin(Float32(uy * Float32(pi))) ^ Float32(2.0))) t_1 = Float32(-t_0) t_2 = Float32(t_0 * t_0) return Float32(Float32(fma(Float32(1.0), (cos(Float32(uy * Float32(pi))) ^ Float32(2.0)), Float32(t_0 * Float32(t_0 * t_1))) + fma(t_1, t_2, Float32(t_0 * t_2))) * sqrt(Float32(Float32(Float32(1.0) - maxCos) * Float32(ux * Float32(Float32(2.0) - Float32(Float32(Float32(1.0) - maxCos) * ux)))))) end
\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)}
\begin{array}{l}
t_0 := \sqrt[3]{{\sin \left(uy \cdot \pi\right)}^{2}}\\
t_1 := -t_0\\
t_2 := t_0 \cdot t_0\\
\left(\mathsf{fma}\left(1, {\cos \left(uy \cdot \pi\right)}^{2}, t_0 \cdot \left(t_0 \cdot t_1\right)\right) + \mathsf{fma}\left(t_1, t_2, t_0 \cdot t_2\right)\right) \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - \left(1 - maxCos\right) \cdot ux\right)\right)}
\end{array}
Initial program 56.9%
Simplified56.9%
[Start]56.9 | \[ \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)}
\] |
|---|---|
associate-*l* [=>]56.9 | \[ \cos \color{blue}{\left(uy \cdot \left(2 \cdot \pi\right)\right)} \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)}
\] |
sub-neg [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{1 + \left(-\left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)\right)}}
\] |
+-commutative [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(-\left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)\right) + 1}}
\] |
distribute-rgt-neg-in [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(-\left(\left(1 - ux\right) + ux \cdot maxCos\right)\right)} + 1}
\] |
fma-def [=>]57.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(\left(1 - ux\right) + ux \cdot maxCos, -\left(\left(1 - ux\right) + ux \cdot maxCos\right), 1\right)}}
\] |
+-commutative [=>]57.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{ux \cdot maxCos + \left(1 - ux\right)}, -\left(\left(1 - ux\right) + ux \cdot maxCos\right), 1\right)}
\] |
associate-+r- [=>]57.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(ux \cdot maxCos + 1\right) - ux}, -\left(\left(1 - ux\right) + ux \cdot maxCos\right), 1\right)}
\] |
fma-def [=>]57.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(ux, maxCos, 1\right)} - ux, -\left(\left(1 - ux\right) + ux \cdot maxCos\right), 1\right)}
\] |
neg-sub0 [=>]57.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, \color{blue}{0 - \left(\left(1 - ux\right) + ux \cdot maxCos\right)}, 1\right)}
\] |
+-commutative [=>]57.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, 0 - \color{blue}{\left(ux \cdot maxCos + \left(1 - ux\right)\right)}, 1\right)}
\] |
associate-+r- [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, 0 - \color{blue}{\left(\left(ux \cdot maxCos + 1\right) - ux\right)}, 1\right)}
\] |
associate--r- [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, \color{blue}{\left(0 - \left(ux \cdot maxCos + 1\right)\right) + ux}, 1\right)}
\] |
neg-sub0 [<=]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, \color{blue}{\left(-\left(ux \cdot maxCos + 1\right)\right)} + ux, 1\right)}
\] |
+-commutative [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, \color{blue}{ux + \left(-\left(ux \cdot maxCos + 1\right)\right)}, 1\right)}
\] |
sub-neg [<=]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, \color{blue}{ux - \left(ux \cdot maxCos + 1\right)}, 1\right)}
\] |
fma-def [=>]56.9 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1\right) - ux, ux - \color{blue}{\mathsf{fma}\left(ux, maxCos, 1\right)}, 1\right)}
\] |
Taylor expanded in ux around -inf 99.0%
Simplified99.0%
[Start]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{-1 \cdot \left({ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}\right) + 2 \cdot \left(ux \cdot \left(1 + -1 \cdot maxCos\right)\right)}
\] |
|---|---|
+-commutative [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(ux \cdot \left(1 + -1 \cdot maxCos\right)\right) + -1 \cdot \left({ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}\right)}}
\] |
mul-1-neg [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{2 \cdot \left(ux \cdot \left(1 + -1 \cdot maxCos\right)\right) + \color{blue}{\left(-{ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}\right)}}
\] |
unsub-neg [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(ux \cdot \left(1 + -1 \cdot maxCos\right)\right) - {ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}}}
\] |
*-commutative [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot \left(1 + -1 \cdot maxCos\right)\right) \cdot 2} - {ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}}
\] |
mul-1-neg [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\left(ux \cdot \left(1 + \color{blue}{\left(-maxCos\right)}\right)\right) \cdot 2 - {ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}}
\] |
sub-neg [<=]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\left(ux \cdot \color{blue}{\left(1 - maxCos\right)}\right) \cdot 2 - {ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}}
\] |
associate-*l* [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right)} - {ux}^{2} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}}
\] |
unpow2 [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \color{blue}{\left(ux \cdot ux\right)} \cdot {\left(1 + -1 \cdot maxCos\right)}^{2}}
\] |
mul-1-neg [=>]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 + \color{blue}{\left(-maxCos\right)}\right)}^{2}}
\] |
sub-neg [<=]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\color{blue}{\left(1 - maxCos\right)}}^{2}}
\] |
Applied egg-rr94.8%
[Start]99.0 | \[ \cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}
\] |
|---|---|
add-sqr-sqrt [=>]93.5 | \[ \color{blue}{\sqrt{\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}} \cdot \sqrt{\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}}}
\] |
sqrt-unprod [=>]94.7 | \[ \color{blue}{\sqrt{\left(\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}\right) \cdot \left(\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}\right)}}
\] |
*-commutative [=>]94.7 | \[ \sqrt{\color{blue}{\left(\sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}} \cdot \cos \left(uy \cdot \left(2 \cdot \pi\right)\right)\right)} \cdot \left(\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}\right)}
\] |
*-commutative [=>]94.7 | \[ \sqrt{\left(\sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}} \cdot \cos \left(uy \cdot \left(2 \cdot \pi\right)\right)\right) \cdot \color{blue}{\left(\sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}} \cdot \cos \left(uy \cdot \left(2 \cdot \pi\right)\right)\right)}}
\] |
swap-sqr [=>]94.6 | \[ \sqrt{\color{blue}{\left(\sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}} \cdot \sqrt{ux \cdot \left(\left(1 - maxCos\right) \cdot 2\right) - \left(ux \cdot ux\right) \cdot {\left(1 - maxCos\right)}^{2}}\right) \cdot \left(\cos \left(uy \cdot \left(2 \cdot \pi\right)\right) \cdot \cos \left(uy \cdot \left(2 \cdot \pi\right)\right)\right)}}
\] |
Simplified94.8%
[Start]94.8 | \[ \sqrt{\left(2 \cdot \left(ux \cdot \left(1 - maxCos\right)\right) - {\left(ux \cdot \left(1 - maxCos\right)\right)}^{2}\right) \cdot {\cos \left(uy \cdot \left(2 \cdot \pi\right)\right)}^{2}}
\] |
|---|---|
*-commutative [=>]94.8 | \[ \sqrt{\left(2 \cdot \color{blue}{\left(\left(1 - maxCos\right) \cdot ux\right)} - {\left(ux \cdot \left(1 - maxCos\right)\right)}^{2}\right) \cdot {\cos \left(uy \cdot \left(2 \cdot \pi\right)\right)}^{2}}
\] |
*-commutative [=>]94.8 | \[ \sqrt{\left(2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) - {\color{blue}{\left(\left(1 - maxCos\right) \cdot ux\right)}}^{2}\right) \cdot {\cos \left(uy \cdot \left(2 \cdot \pi\right)\right)}^{2}}
\] |
associate-*r* [=>]94.8 | \[ \sqrt{\left(2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) - {\left(\left(1 - maxCos\right) \cdot ux\right)}^{2}\right) \cdot {\cos \color{blue}{\left(\left(uy \cdot 2\right) \cdot \pi\right)}}^{2}}
\] |
Taylor expanded in uy around inf 99.0%
Simplified99.0%
[Start]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) - {\left(1 - maxCos\right)}^{2} \cdot {ux}^{2}}
\] |
|---|---|
unpow2 [=>]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) - \color{blue}{\left(\left(1 - maxCos\right) \cdot \left(1 - maxCos\right)\right)} \cdot {ux}^{2}}
\] |
unpow2 [=>]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) - \left(\left(1 - maxCos\right) \cdot \left(1 - maxCos\right)\right) \cdot \color{blue}{\left(ux \cdot ux\right)}}
\] |
swap-sqr [<=]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) - \color{blue}{\left(\left(1 - maxCos\right) \cdot ux\right) \cdot \left(\left(1 - maxCos\right) \cdot ux\right)}}
\] |
cancel-sign-sub-inv [=>]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\left(1 - maxCos\right) \cdot ux\right) + \left(-\left(1 - maxCos\right) \cdot ux\right) \cdot \left(\left(1 - maxCos\right) \cdot ux\right)}}
\] |
distribute-rgt-in [<=]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(\left(1 - maxCos\right) \cdot ux\right) \cdot \left(2 + \left(-\left(1 - maxCos\right) \cdot ux\right)\right)}}
\] |
sub-neg [<=]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{\left(\left(1 - maxCos\right) \cdot ux\right) \cdot \color{blue}{\left(2 - \left(1 - maxCos\right) \cdot ux\right)}}
\] |
associate-*l* [=>]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{\color{blue}{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - \left(1 - maxCos\right) \cdot ux\right)\right)}}
\] |
*-commutative [=>]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - \color{blue}{ux \cdot \left(1 - maxCos\right)}\right)\right)}
\] |
Applied egg-rr98.7%
[Start]99.0 | \[ \cos \left(2 \cdot \left(uy \cdot \pi\right)\right) \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - ux \cdot \left(1 - maxCos\right)\right)\right)}
\] |
|---|---|
cos-2 [=>]98.8 | \[ \color{blue}{\left(\cos \left(uy \cdot \pi\right) \cdot \cos \left(uy \cdot \pi\right) - \sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)\right)} \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - ux \cdot \left(1 - maxCos\right)\right)\right)}
\] |
*-un-lft-identity [=>]98.8 | \[ \left(\color{blue}{1 \cdot \left(\cos \left(uy \cdot \pi\right) \cdot \cos \left(uy \cdot \pi\right)\right)} - \sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)\right) \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - ux \cdot \left(1 - maxCos\right)\right)\right)}
\] |
add-cube-cbrt [=>]98.7 | \[ \left(1 \cdot \left(\cos \left(uy \cdot \pi\right) \cdot \cos \left(uy \cdot \pi\right)\right) - \color{blue}{\left(\sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)} \cdot \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)}\right) \cdot \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)}}\right) \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - ux \cdot \left(1 - maxCos\right)\right)\right)}
\] |
prod-diff [=>]98.7 | \[ \color{blue}{\left(\mathsf{fma}\left(1, \cos \left(uy \cdot \pi\right) \cdot \cos \left(uy \cdot \pi\right), -\sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)} \cdot \left(\sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)} \cdot \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)}, \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)} \cdot \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)}, \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)} \cdot \left(\sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)} \cdot \sqrt[3]{\sin \left(uy \cdot \pi\right) \cdot \sin \left(uy \cdot \pi\right)}\right)\right)\right)} \cdot \sqrt{\left(1 - maxCos\right) \cdot \left(ux \cdot \left(2 - ux \cdot \left(1 - maxCos\right)\right)\right)}
\] |
Final simplification98.7%
| Alternative 1 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 16576 |
| Alternative 2 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 13600 |
| Alternative 3 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 13568 |
| Alternative 4 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 10176 |
| Alternative 5 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 10176 |
| Alternative 6 | |
|---|---|
| Accuracy | 97.6% |
| Cost | 10048 |
| Alternative 7 | |
|---|---|
| Accuracy | 90.1% |
| Cost | 9988 |
| Alternative 8 | |
|---|---|
| Accuracy | 92.6% |
| Cost | 9984 |
| Alternative 9 | |
|---|---|
| Accuracy | 92.6% |
| Cost | 9920 |
| Alternative 10 | |
|---|---|
| Accuracy | 80.4% |
| Cost | 7008 |
| Alternative 11 | |
|---|---|
| Accuracy | 80.4% |
| Cost | 6848 |
| Alternative 12 | |
|---|---|
| Accuracy | 80.4% |
| Cost | 3616 |
| Alternative 13 | |
|---|---|
| Accuracy | 75.8% |
| Cost | 3424 |
| Alternative 14 | |
|---|---|
| Accuracy | 75.7% |
| Cost | 3360 |
| Alternative 15 | |
|---|---|
| Accuracy | 62.4% |
| Cost | 3296 |
| Alternative 16 | |
|---|---|
| Accuracy | 6.6% |
| Cost | 32 |
herbie shell --seed 2023151
(FPCore (ux uy maxCos)
:name "UniformSampleCone, x"
: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)))
(* (cos (* (* uy 2.0) PI)) (sqrt (- 1.0 (* (+ (- 1.0 ux) (* ux maxCos)) (+ (- 1.0 ux) (* ux maxCos)))))))