\[\left(\left(\left(\left(0.0001 \leq alphax \land alphax \leq 1\right) \land \left(0.0001 \leq alphay \land alphay \leq 1\right)\right) \land \left(2.328306437 \cdot 10^{-10} \leq u0 \land u0 \leq 1\right)\right) \land \left(0 \leq cos2phi \land cos2phi \leq 1\right)\right) \land 0 \leq sin2phi\]
\[\frac{-\log \left(1 - u0\right)}{\frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}}
\]
↓
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}\\
t_1 := \log \left(1 - u0\right)\\
\mathbf{if}\;1 - u0 \leq 0.9599999785423279:\\
\;\;\;\;\frac{-\left(t_1 \cdot \frac{1}{\left(t_1 \cdot \frac{1}{t_1}\right) \cdot t_1}\right) \cdot t_1}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\left(-1 \cdot u0 + \left(-0.3333333333333333 \cdot {u0}^{3} + \left(-0.5 \cdot {u0}^{2} + -0.25 \cdot {u0}^{4}\right)\right)\right)}{t_0}\\
\end{array}
\]
(FPCore (alphax alphay u0 cos2phi sin2phi)
:precision binary32
(/
(- (log (- 1.0 u0)))
(+ (/ cos2phi (* alphax alphax)) (/ sin2phi (* alphay alphay)))))
↓
(FPCore (alphax alphay u0 cos2phi sin2phi)
:precision binary32
(let* ((t_0 (+ (/ cos2phi (* alphax alphax)) (/ sin2phi (* alphay alphay))))
(t_1 (log (- 1.0 u0))))
(if (<= (- 1.0 u0) 0.9599999785423279)
(/ (- (* (* t_1 (/ 1.0 (* (* t_1 (/ 1.0 t_1)) t_1))) t_1)) t_0)
(/
(-
(+
(* -1.0 u0)
(+
(* -0.3333333333333333 (pow u0 3.0))
(+ (* -0.5 (pow u0 2.0)) (* -0.25 (pow u0 4.0))))))
t_0))))float code(float alphax, float alphay, float u0, float cos2phi, float sin2phi) {
return -logf((1.0f - u0)) / ((cos2phi / (alphax * alphax)) + (sin2phi / (alphay * alphay)));
}
↓
float code(float alphax, float alphay, float u0, float cos2phi, float sin2phi) {
float t_0 = (cos2phi / (alphax * alphax)) + (sin2phi / (alphay * alphay));
float t_1 = logf((1.0f - u0));
float tmp;
if ((1.0f - u0) <= 0.9599999785423279f) {
tmp = -((t_1 * (1.0f / ((t_1 * (1.0f / t_1)) * t_1))) * t_1) / t_0;
} else {
tmp = -((-1.0f * u0) + ((-0.3333333333333333f * powf(u0, 3.0f)) + ((-0.5f * powf(u0, 2.0f)) + (-0.25f * powf(u0, 4.0f))))) / t_0;
}
return tmp;
}
real(4) function code(alphax, alphay, u0, cos2phi, sin2phi)
real(4), intent (in) :: alphax
real(4), intent (in) :: alphay
real(4), intent (in) :: u0
real(4), intent (in) :: cos2phi
real(4), intent (in) :: sin2phi
code = -log((1.0e0 - u0)) / ((cos2phi / (alphax * alphax)) + (sin2phi / (alphay * alphay)))
end function
↓
real(4) function code(alphax, alphay, u0, cos2phi, sin2phi)
real(4), intent (in) :: alphax
real(4), intent (in) :: alphay
real(4), intent (in) :: u0
real(4), intent (in) :: cos2phi
real(4), intent (in) :: sin2phi
real(4) :: t_0
real(4) :: t_1
real(4) :: tmp
t_0 = (cos2phi / (alphax * alphax)) + (sin2phi / (alphay * alphay))
t_1 = log((1.0e0 - u0))
if ((1.0e0 - u0) <= 0.9599999785423279e0) then
tmp = -((t_1 * (1.0e0 / ((t_1 * (1.0e0 / t_1)) * t_1))) * t_1) / t_0
else
tmp = -(((-1.0e0) * u0) + (((-0.3333333333333333e0) * (u0 ** 3.0e0)) + (((-0.5e0) * (u0 ** 2.0e0)) + ((-0.25e0) * (u0 ** 4.0e0))))) / t_0
end if
code = tmp
end function
function code(alphax, alphay, u0, cos2phi, sin2phi)
return Float32(Float32(-log(Float32(Float32(1.0) - u0))) / Float32(Float32(cos2phi / Float32(alphax * alphax)) + Float32(sin2phi / Float32(alphay * alphay))))
end
↓
function code(alphax, alphay, u0, cos2phi, sin2phi)
t_0 = Float32(Float32(cos2phi / Float32(alphax * alphax)) + Float32(sin2phi / Float32(alphay * alphay)))
t_1 = log(Float32(Float32(1.0) - u0))
tmp = Float32(0.0)
if (Float32(Float32(1.0) - u0) <= Float32(0.9599999785423279))
tmp = Float32(Float32(-Float32(Float32(t_1 * Float32(Float32(1.0) / Float32(Float32(t_1 * Float32(Float32(1.0) / t_1)) * t_1))) * t_1)) / t_0);
else
tmp = Float32(Float32(-Float32(Float32(Float32(-1.0) * u0) + Float32(Float32(Float32(-0.3333333333333333) * (u0 ^ Float32(3.0))) + Float32(Float32(Float32(-0.5) * (u0 ^ Float32(2.0))) + Float32(Float32(-0.25) * (u0 ^ Float32(4.0))))))) / t_0);
end
return tmp
end
function tmp = code(alphax, alphay, u0, cos2phi, sin2phi)
tmp = -log((single(1.0) - u0)) / ((cos2phi / (alphax * alphax)) + (sin2phi / (alphay * alphay)));
end
↓
function tmp_2 = code(alphax, alphay, u0, cos2phi, sin2phi)
t_0 = (cos2phi / (alphax * alphax)) + (sin2phi / (alphay * alphay));
t_1 = log((single(1.0) - u0));
tmp = single(0.0);
if ((single(1.0) - u0) <= single(0.9599999785423279))
tmp = -((t_1 * (single(1.0) / ((t_1 * (single(1.0) / t_1)) * t_1))) * t_1) / t_0;
else
tmp = -((single(-1.0) * u0) + ((single(-0.3333333333333333) * (u0 ^ single(3.0))) + ((single(-0.5) * (u0 ^ single(2.0))) + (single(-0.25) * (u0 ^ single(4.0)))))) / t_0;
end
tmp_2 = tmp;
end
\frac{-\log \left(1 - u0\right)}{\frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}}
↓
\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}\\
t_1 := \log \left(1 - u0\right)\\
\mathbf{if}\;1 - u0 \leq 0.9599999785423279:\\
\;\;\;\;\frac{-\left(t_1 \cdot \frac{1}{\left(t_1 \cdot \frac{1}{t_1}\right) \cdot t_1}\right) \cdot t_1}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\left(-1 \cdot u0 + \left(-0.3333333333333333 \cdot {u0}^{3} + \left(-0.5 \cdot {u0}^{2} + -0.25 \cdot {u0}^{4}\right)\right)\right)}{t_0}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.6 |
|---|
| Cost | 10724 |
|---|
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax}\\
t_1 := \frac{sin2phi}{alphay \cdot alphay}\\
\mathbf{if}\;1 - u0 \leq 0.9599999785423279:\\
\;\;\;\;\frac{-\log \left(1 - u0\right)}{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right) + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\left(-1 \cdot u0 + \left(-0.3333333333333333 \cdot {u0}^{3} + \left(-0.5 \cdot {u0}^{2} + -0.25 \cdot {u0}^{4}\right)\right)\right)}{t_0 + t_1}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.6 |
|---|
| Cost | 10628 |
|---|
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax}\\
t_1 := \frac{sin2phi}{alphay \cdot alphay}\\
\mathbf{if}\;1 - u0 \leq 0.9599999785423279:\\
\;\;\;\;\frac{-\log \left(1 - u0\right)}{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right) + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{u0 + \left(0.5 \cdot {u0}^{2} + \left(0.3333333333333333 \cdot {u0}^{3} + 0.25 \cdot {u0}^{4}\right)\right)}{t_0 + t_1}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.2 |
|---|
| Cost | 7524 |
|---|
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax}\\
t_1 := -\log \left(1 - u0\right)\\
t_2 := \frac{sin2phi}{alphay \cdot alphay}\\
\mathbf{if}\;t_1 \leq 0.002199999988079071:\\
\;\;\;\;\frac{-\left(\left(-u0\right) + -0.5 \cdot {u0}^{2}\right)}{t_0 + t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right) + t_2}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.8 |
|---|
| Cost | 7332 |
|---|
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax}\\
t_1 := \frac{sin2phi}{alphay \cdot alphay}\\
\mathbf{if}\;1 - u0 \leq 0.9879999756813049:\\
\;\;\;\;\frac{-\log \left(1 - u0\right)}{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right) + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\left(\left(-u0\right) + \left(-0.5 \cdot {u0}^{2} + -0.3333333333333333 \cdot {u0}^{3}\right)\right)}{t_0 + t_1}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.8 |
|---|
| Cost | 7268 |
|---|
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax}\\
t_1 := \frac{sin2phi}{alphay \cdot alphay}\\
\mathbf{if}\;1 - u0 \leq 0.9879999756813049:\\
\;\;\;\;\frac{-\log \left(1 - u0\right)}{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right) + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(u0 + 0.5 \cdot {u0}^{2}\right) + 0.3333333333333333 \cdot {u0}^{3}}{t_0 + t_1}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.2 |
|---|
| Cost | 7204 |
|---|
\[\begin{array}{l}
t_0 := \frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}\\
t_1 := -\log \left(1 - u0\right)\\
\mathbf{if}\;t_1 \leq 0.002199999988079071:\\
\;\;\;\;\frac{-\left(\left(-u0\right) + -0.5 \cdot {u0}^{2}\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_0}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 3.1 |
|---|
| Cost | 7076 |
|---|
\[\begin{array}{l}
t_0 := -\log \left(1 - u0\right)\\
t_1 := \frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}\\
\mathbf{if}\;t_0 \leq 0.00013000000035390258:\\
\;\;\;\;\frac{u0}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{t_1}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 7.7 |
|---|
| Cost | 416 |
|---|
\[\frac{u0}{\frac{cos2phi}{alphax \cdot alphax} + \frac{sin2phi}{alphay \cdot alphay}}
\]