\[\left(\left(\left(\left(\left(-10000 \leq xi \land xi \leq 10000\right) \land \left(-10000 \leq yi \land yi \leq 10000\right)\right) \land \left(-10000 \leq zi \land zi \leq 10000\right)\right) \land \left(2.328306437 \cdot 10^{-10} \leq ux \land ux \leq 1\right)\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)\]
\[\left(\left(\cos \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right)}\right) \cdot xi + \left(\sin \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right)}\right) \cdot yi\right) + \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot zi
\]
↓
\[\begin{array}{l}
t_0 := ux \cdot \left(\left(1 - ux\right) \cdot maxCos\right)\\
\left(\left(\cos \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{1 + t_0 \cdot \left(ux \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)}\right) \cdot xi + 2 \cdot \left(\cos \left(uy \cdot \pi\right) \cdot \left(yi \cdot \sin \left(uy \cdot \pi\right)\right)\right)\right) + t_0 \cdot zi
\end{array}
\]
(FPCore (xi yi zi ux uy maxCos)
:precision binary32
(+
(+
(*
(*
(cos (* (* uy 2.0) PI))
(sqrt
(- 1.0 (* (* (* (- 1.0 ux) maxCos) ux) (* (* (- 1.0 ux) maxCos) ux)))))
xi)
(*
(*
(sin (* (* uy 2.0) PI))
(sqrt
(- 1.0 (* (* (* (- 1.0 ux) maxCos) ux) (* (* (- 1.0 ux) maxCos) ux)))))
yi))
(* (* (* (- 1.0 ux) maxCos) ux) zi)))↓
(FPCore (xi yi zi ux uy maxCos)
:precision binary32
(let* ((t_0 (* ux (* (- 1.0 ux) maxCos))))
(+
(+
(*
(*
(cos (* PI (* uy 2.0)))
(sqrt (+ 1.0 (* t_0 (* ux (* maxCos (+ ux -1.0)))))))
xi)
(* 2.0 (* (cos (* uy PI)) (* yi (sin (* uy PI))))))
(* t_0 zi))))float code(float xi, float yi, float zi, float ux, float uy, float maxCos) {
return (((cosf(((uy * 2.0f) * ((float) M_PI))) * sqrtf((1.0f - ((((1.0f - ux) * maxCos) * ux) * (((1.0f - ux) * maxCos) * ux))))) * xi) + ((sinf(((uy * 2.0f) * ((float) M_PI))) * sqrtf((1.0f - ((((1.0f - ux) * maxCos) * ux) * (((1.0f - ux) * maxCos) * ux))))) * yi)) + ((((1.0f - ux) * maxCos) * ux) * zi);
}
↓
float code(float xi, float yi, float zi, float ux, float uy, float maxCos) {
float t_0 = ux * ((1.0f - ux) * maxCos);
return (((cosf((((float) M_PI) * (uy * 2.0f))) * sqrtf((1.0f + (t_0 * (ux * (maxCos * (ux + -1.0f))))))) * xi) + (2.0f * (cosf((uy * ((float) M_PI))) * (yi * sinf((uy * ((float) M_PI))))))) + (t_0 * zi);
}
function code(xi, yi, zi, ux, uy, maxCos)
return Float32(Float32(Float32(Float32(cos(Float32(Float32(uy * Float32(2.0)) * Float32(pi))) * sqrt(Float32(Float32(1.0) - Float32(Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux) * Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux))))) * xi) + Float32(Float32(sin(Float32(Float32(uy * Float32(2.0)) * Float32(pi))) * sqrt(Float32(Float32(1.0) - Float32(Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux) * Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux))))) * yi)) + Float32(Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux) * zi))
end
↓
function code(xi, yi, zi, ux, uy, maxCos)
t_0 = Float32(ux * Float32(Float32(Float32(1.0) - ux) * maxCos))
return Float32(Float32(Float32(Float32(cos(Float32(Float32(pi) * Float32(uy * Float32(2.0)))) * sqrt(Float32(Float32(1.0) + Float32(t_0 * Float32(ux * Float32(maxCos * Float32(ux + Float32(-1.0)))))))) * xi) + Float32(Float32(2.0) * Float32(cos(Float32(uy * Float32(pi))) * Float32(yi * sin(Float32(uy * Float32(pi))))))) + Float32(t_0 * zi))
end
function tmp = code(xi, yi, zi, ux, uy, maxCos)
tmp = (((cos(((uy * single(2.0)) * single(pi))) * sqrt((single(1.0) - ((((single(1.0) - ux) * maxCos) * ux) * (((single(1.0) - ux) * maxCos) * ux))))) * xi) + ((sin(((uy * single(2.0)) * single(pi))) * sqrt((single(1.0) - ((((single(1.0) - ux) * maxCos) * ux) * (((single(1.0) - ux) * maxCos) * ux))))) * yi)) + ((((single(1.0) - ux) * maxCos) * ux) * zi);
end
↓
function tmp = code(xi, yi, zi, ux, uy, maxCos)
t_0 = ux * ((single(1.0) - ux) * maxCos);
tmp = (((cos((single(pi) * (uy * single(2.0)))) * sqrt((single(1.0) + (t_0 * (ux * (maxCos * (ux + single(-1.0)))))))) * xi) + (single(2.0) * (cos((uy * single(pi))) * (yi * sin((uy * single(pi))))))) + (t_0 * zi);
end
\left(\left(\cos \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right)}\right) \cdot xi + \left(\sin \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right)}\right) \cdot yi\right) + \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot zi
↓
\begin{array}{l}
t_0 := ux \cdot \left(\left(1 - ux\right) \cdot maxCos\right)\\
\left(\left(\cos \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{1 + t_0 \cdot \left(ux \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)}\right) \cdot xi + 2 \cdot \left(\cos \left(uy \cdot \pi\right) \cdot \left(yi \cdot \sin \left(uy \cdot \pi\right)\right)\right)\right) + t_0 \cdot zi
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 1.17% |
|---|
| Cost | 17312 |
|---|
\[\begin{array}{l}
t_0 := \pi \cdot \left(uy \cdot 2\right)\\
t_1 := ux \cdot \left(\left(1 - ux\right) \cdot maxCos\right)\\
t_1 \cdot zi + \left(\left(\cos t_0 \cdot \sqrt{1 + t_1 \cdot \left(ux \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)}\right) \cdot xi + yi \cdot \sin t_0\right)
\end{array}
\]
| Alternative 2 |
|---|
| Error | 9.97% |
|---|
| Cost | 13984 |
|---|
\[\left(ux \cdot \left(\left(1 - ux\right) \cdot maxCos\right)\right) \cdot zi + \left(xi \cdot \left(\cos \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{1 + \left(ux \cdot maxCos\right) \cdot \left(ux \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)}\right) + \left(uy \cdot 2\right) \cdot \left(\pi \cdot yi\right)\right)
\]
| Alternative 3 |
|---|
| Error | 12.81% |
|---|
| Cost | 13856 |
|---|
\[\left(xi \cdot \left(\cos \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{1 + \left(ux \cdot maxCos\right) \cdot \left(ux \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)}\right) + \left(uy \cdot 2\right) \cdot \left(\pi \cdot yi\right)\right) + zi \cdot \left(ux \cdot maxCos\right)
\]
| Alternative 4 |
|---|
| Error | 40.66% |
|---|
| Cost | 13824 |
|---|
\[\mathsf{fma}\left(\cos \left(\pi \cdot \left(uy \cdot 2\right)\right), xi \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(maxCos \cdot \left(\left(ux \cdot ux\right) \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)\right)}, \left(\left(1 - ux\right) \cdot maxCos\right) \cdot \left(ux \cdot zi\right)\right)
\]
| Alternative 5 |
|---|
| Error | 40.65% |
|---|
| Cost | 10816 |
|---|
\[\begin{array}{l}
t_0 := ux \cdot \left(\left(1 - ux\right) \cdot maxCos\right)\\
t_0 \cdot zi + \left(\left(\cos \left(\pi \cdot \left(uy \cdot 2\right)\right) \cdot \sqrt{1 + t_0 \cdot \left(ux \cdot \left(maxCos \cdot \left(ux + -1\right)\right)\right)}\right) \cdot xi + yi \cdot 0\right)
\end{array}
\]
| Alternative 6 |
|---|
| Error | 48.7% |
|---|
| Cost | 7328 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, zi \cdot \left(ux \cdot maxCos\right) - \left(ux \cdot maxCos\right) \cdot \left(ux \cdot zi\right)\right)
\]
| Alternative 7 |
|---|
| Error | 48.71% |
|---|
| Cost | 7264 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, \frac{zi \cdot \left(ux \cdot maxCos\right)}{\frac{1}{1 - ux}}\right)
\]
| Alternative 8 |
|---|
| Error | 48.69% |
|---|
| Cost | 7200 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, maxCos \cdot \left(ux \cdot \left(\left(1 - ux\right) \cdot zi\right)\right)\right)
\]
| Alternative 9 |
|---|
| Error | 48.7% |
|---|
| Cost | 7200 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, maxCos \cdot \left(\left(1 - ux\right) \cdot \left(ux \cdot zi\right)\right)\right)
\]
| Alternative 10 |
|---|
| Error | 48.69% |
|---|
| Cost | 7200 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, ux \cdot \left(maxCos \cdot \left(zi - ux \cdot zi\right)\right)\right)
\]
| Alternative 11 |
|---|
| Error | 50.76% |
|---|
| Cost | 7072 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, maxCos \cdot \left(ux \cdot zi\right)\right)
\]
| Alternative 12 |
|---|
| Error | 50.76% |
|---|
| Cost | 7072 |
|---|
\[\mathsf{fma}\left(1, xi \cdot \sqrt{1 + \left(maxCos \cdot \left(maxCos \cdot \left(ux \cdot ux\right)\right)\right) \cdot \left(ux + -1\right)}, ux \cdot \left(maxCos \cdot zi\right)\right)
\]