\[\left(\left(\left(\left(-1 \leq cosTheta_i \land cosTheta_i \leq 1\right) \land \left(-1 \leq cosTheta_O \land cosTheta_O \leq 1\right)\right) \land \left(-1 \leq sinTheta_i \land sinTheta_i \leq 1\right)\right) \land \left(-1 \leq sinTheta_O \land sinTheta_O \leq 1\right)\right) \land \left(-1.5707964 \leq v \land v \leq 0.1\right)\]
\[e^{\left(\left(\left(\frac{cosTheta_i \cdot cosTheta_O}{v} - \frac{sinTheta_i \cdot sinTheta_O}{v}\right) - \frac{1}{v}\right) + 0.6931\right) + \log \left(\frac{1}{2 \cdot v}\right)}
\]
↓
\[\begin{array}{l}
t_0 := e^{\frac{cosTheta_i \cdot cosTheta_O + \left(-1 - sinTheta_i \cdot sinTheta_O\right)}{v} + \left(\log \left(\frac{0.5}{v}\right) + 0.6931\right)}\\
\left(\left(t_0 \cdot 8 - t_0 \cdot 7\right) \cdot 2\right) \cdot 2 - t_0 \cdot 3
\end{array}
\]
(FPCore (cosTheta_i cosTheta_O sinTheta_i sinTheta_O v)
:precision binary32
(exp
(+
(+
(-
(- (/ (* cosTheta_i cosTheta_O) v) (/ (* sinTheta_i sinTheta_O) v))
(/ 1.0 v))
0.6931)
(log (/ 1.0 (* 2.0 v))))))↓
(FPCore (cosTheta_i cosTheta_O sinTheta_i sinTheta_O v)
:precision binary32
(let* ((t_0
(exp
(+
(/
(+ (* cosTheta_i cosTheta_O) (- -1.0 (* sinTheta_i sinTheta_O)))
v)
(+ (log (/ 0.5 v)) 0.6931)))))
(- (* (* (- (* t_0 8.0) (* t_0 7.0)) 2.0) 2.0) (* t_0 3.0))))float code(float cosTheta_i, float cosTheta_O, float sinTheta_i, float sinTheta_O, float v) {
return expf(((((((cosTheta_i * cosTheta_O) / v) - ((sinTheta_i * sinTheta_O) / v)) - (1.0f / v)) + 0.6931f) + logf((1.0f / (2.0f * v)))));
}
↓
float code(float cosTheta_i, float cosTheta_O, float sinTheta_i, float sinTheta_O, float v) {
float t_0 = expf(((((cosTheta_i * cosTheta_O) + (-1.0f - (sinTheta_i * sinTheta_O))) / v) + (logf((0.5f / v)) + 0.6931f)));
return ((((t_0 * 8.0f) - (t_0 * 7.0f)) * 2.0f) * 2.0f) - (t_0 * 3.0f);
}
real(4) function code(costheta_i, costheta_o, sintheta_i, sintheta_o, v)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: costheta_o
real(4), intent (in) :: sintheta_i
real(4), intent (in) :: sintheta_o
real(4), intent (in) :: v
code = exp(((((((costheta_i * costheta_o) / v) - ((sintheta_i * sintheta_o) / v)) - (1.0e0 / v)) + 0.6931e0) + log((1.0e0 / (2.0e0 * v)))))
end function
↓
real(4) function code(costheta_i, costheta_o, sintheta_i, sintheta_o, v)
real(4), intent (in) :: costheta_i
real(4), intent (in) :: costheta_o
real(4), intent (in) :: sintheta_i
real(4), intent (in) :: sintheta_o
real(4), intent (in) :: v
real(4) :: t_0
t_0 = exp(((((costheta_i * costheta_o) + ((-1.0e0) - (sintheta_i * sintheta_o))) / v) + (log((0.5e0 / v)) + 0.6931e0)))
code = ((((t_0 * 8.0e0) - (t_0 * 7.0e0)) * 2.0e0) * 2.0e0) - (t_0 * 3.0e0)
end function
function code(cosTheta_i, cosTheta_O, sinTheta_i, sinTheta_O, v)
return exp(Float32(Float32(Float32(Float32(Float32(Float32(cosTheta_i * cosTheta_O) / v) - Float32(Float32(sinTheta_i * sinTheta_O) / v)) - Float32(Float32(1.0) / v)) + Float32(0.6931)) + log(Float32(Float32(1.0) / Float32(Float32(2.0) * v)))))
end
↓
function code(cosTheta_i, cosTheta_O, sinTheta_i, sinTheta_O, v)
t_0 = exp(Float32(Float32(Float32(Float32(cosTheta_i * cosTheta_O) + Float32(Float32(-1.0) - Float32(sinTheta_i * sinTheta_O))) / v) + Float32(log(Float32(Float32(0.5) / v)) + Float32(0.6931))))
return Float32(Float32(Float32(Float32(Float32(t_0 * Float32(8.0)) - Float32(t_0 * Float32(7.0))) * Float32(2.0)) * Float32(2.0)) - Float32(t_0 * Float32(3.0)))
end
function tmp = code(cosTheta_i, cosTheta_O, sinTheta_i, sinTheta_O, v)
tmp = exp(((((((cosTheta_i * cosTheta_O) / v) - ((sinTheta_i * sinTheta_O) / v)) - (single(1.0) / v)) + single(0.6931)) + log((single(1.0) / (single(2.0) * v)))));
end
↓
function tmp = code(cosTheta_i, cosTheta_O, sinTheta_i, sinTheta_O, v)
t_0 = exp(((((cosTheta_i * cosTheta_O) + (single(-1.0) - (sinTheta_i * sinTheta_O))) / v) + (log((single(0.5) / v)) + single(0.6931))));
tmp = ((((t_0 * single(8.0)) - (t_0 * single(7.0))) * single(2.0)) * single(2.0)) - (t_0 * single(3.0));
end
e^{\left(\left(\left(\frac{cosTheta_i \cdot cosTheta_O}{v} - \frac{sinTheta_i \cdot sinTheta_O}{v}\right) - \frac{1}{v}\right) + 0.6931\right) + \log \left(\frac{1}{2 \cdot v}\right)}
↓
\begin{array}{l}
t_0 := e^{\frac{cosTheta_i \cdot cosTheta_O + \left(-1 - sinTheta_i \cdot sinTheta_O\right)}{v} + \left(\log \left(\frac{0.5}{v}\right) + 0.6931\right)}\\
\left(\left(t_0 \cdot 8 - t_0 \cdot 7\right) \cdot 2\right) \cdot 2 - t_0 \cdot 3
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.1 |
|---|
| Cost | 21216 |
|---|
\[\begin{array}{l}
t_0 := e^{\frac{cosTheta_i \cdot cosTheta_O + \left(-1 - sinTheta_i \cdot sinTheta_O\right)}{v} + \left(\log \left(\frac{0.5}{v}\right) + 0.6931\right)}\\
t_1 := t_0 \cdot 2\\
t_1 \cdot 2 - \left(t_0 \cdot 3 - t_1\right) \cdot 3
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.1 |
|---|
| Cost | 14048 |
|---|
\[\begin{array}{l}
t_0 := e^{\frac{cosTheta_i \cdot cosTheta_O + \left(-1 - sinTheta_i \cdot sinTheta_O\right)}{v} + \left(0.6931 + \log \left(\frac{0.5}{v}\right)\right)}\\
t_0 \cdot 12 - t_0 \cdot 11
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.1 |
|---|
| Cost | 6816 |
|---|
\[e^{\frac{cosTheta_i \cdot cosTheta_O - 1}{v} + \left(\log \left(\frac{0.5}{v}\right) + 0.6931\right)}
\]
| Alternative 4 |
|---|
| Error | 0.1 |
|---|
| Cost | 6688 |
|---|
\[e^{\left(0.6931 + \log \left(\frac{0.5}{v}\right)\right) - \frac{1}{v}}
\]
| Alternative 5 |
|---|
| Error | 0.7 |
|---|
| Cost | 3424 |
|---|
\[\frac{1}{\frac{1}{e^{\frac{-1}{v}}}}
\]
| Alternative 6 |
|---|
| Error | 0.7 |
|---|
| Cost | 3296 |
|---|
\[e^{\frac{-1}{v}}
\]
| Alternative 7 |
|---|
| Error | 10.5 |
|---|
| Cost | 552 |
|---|
\[\begin{array}{l}
t_0 := -1 \cdot \frac{sinTheta_i \cdot sinTheta_O}{v}\\
\mathbf{if}\;cosTheta_i \cdot cosTheta_O \leq -8.000000040884509 \cdot 10^{-38}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;cosTheta_i \cdot cosTheta_O \leq 4.000000861221333 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{1}{v}}{\frac{\frac{1}{cosTheta_O}}{cosTheta_i}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 13.3 |
|---|
| Cost | 488 |
|---|
\[\begin{array}{l}
t_0 := \frac{cosTheta_i \cdot cosTheta_O}{v}\\
\mathbf{if}\;sinTheta_i \cdot sinTheta_O \leq -1.401298464324817 \cdot 10^{-45}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;sinTheta_i \cdot sinTheta_O \leq 0:\\
\;\;\;\;-1 \cdot \frac{sinTheta_i \cdot sinTheta_O}{v}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 13.3 |
|---|
| Cost | 488 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{\frac{v}{cosTheta_i \cdot cosTheta_O}}\\
\mathbf{if}\;sinTheta_i \cdot sinTheta_O \leq -1.401298464324817 \cdot 10^{-45}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;sinTheta_i \cdot sinTheta_O \leq 0:\\
\;\;\;\;-1 \cdot \frac{sinTheta_i \cdot sinTheta_O}{v}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 17.4 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
t_0 := sinTheta_O \cdot \frac{-sinTheta_i}{v}\\
\mathbf{if}\;cosTheta_i \cdot cosTheta_O \leq -5.002635517639597 \cdot 10^{-43}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;cosTheta_i \cdot cosTheta_O \leq 9.80908925027372 \cdot 10^{-45}:\\
\;\;\;\;\frac{cosTheta_i \cdot cosTheta_O}{v}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 25.5 |
|---|
| Cost | 160 |
|---|
\[cosTheta_O \cdot \frac{cosTheta_i}{v}
\]
| Alternative 12 |
|---|
| Error | 25.5 |
|---|
| Cost | 160 |
|---|
\[cosTheta_i \cdot \frac{cosTheta_O}{v}
\]
| Alternative 13 |
|---|
| Error | 25.5 |
|---|
| Cost | 160 |
|---|
\[\frac{cosTheta_O}{\frac{v}{cosTheta_i}}
\]
| Alternative 14 |
|---|
| Error | 19.8 |
|---|
| Cost | 160 |
|---|
\[\frac{cosTheta_i \cdot cosTheta_O}{v}
\]
| Alternative 15 |
|---|
| Error | 29.9 |
|---|
| Cost | 32 |
|---|
\[1
\]