\[\left(0 \leq s \land s \leq 256\right) \land \left(2.328306437 \cdot 10^{-10} \leq u \land u \leq 0.25\right)\]
\[s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)
\]
↓
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
t_1 := t_0 \cdot t_0\\
\mathbf{if}\;t_0 \leq 0.9559999704360962:\\
\;\;\;\;s \cdot \log \left(\frac{t_1}{t_0 \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;u \cdot \left(4 \cdot s\right) + s \cdot \left(21.333333333333332 \cdot {u}^{3} + \left(8 \cdot {u}^{2} + 64 \cdot {u}^{4}\right)\right)\\
\end{array}
\]
(FPCore (s u) :precision binary32 (* s (log (/ 1.0 (- 1.0 (* 4.0 u))))))
↓
(FPCore (s u)
:precision binary32
(let* ((t_0 (- 1.0 (* 4.0 u))) (t_1 (* t_0 t_0)))
(if (<= t_0 0.9559999704360962)
(* s (log (/ t_1 (* t_0 t_1))))
(+
(* u (* 4.0 s))
(*
s
(+
(* 21.333333333333332 (pow u 3.0))
(+ (* 8.0 (pow u 2.0)) (* 64.0 (pow u 4.0)))))))))float code(float s, float u) {
return s * logf((1.0f / (1.0f - (4.0f * u))));
}
↓
float code(float s, float u) {
float t_0 = 1.0f - (4.0f * u);
float t_1 = t_0 * t_0;
float tmp;
if (t_0 <= 0.9559999704360962f) {
tmp = s * logf((t_1 / (t_0 * t_1)));
} else {
tmp = (u * (4.0f * s)) + (s * ((21.333333333333332f * powf(u, 3.0f)) + ((8.0f * powf(u, 2.0f)) + (64.0f * powf(u, 4.0f)))));
}
return tmp;
}
real(4) function code(s, u)
real(4), intent (in) :: s
real(4), intent (in) :: u
code = s * log((1.0e0 / (1.0e0 - (4.0e0 * u))))
end function
↓
real(4) function code(s, u)
real(4), intent (in) :: s
real(4), intent (in) :: u
real(4) :: t_0
real(4) :: t_1
real(4) :: tmp
t_0 = 1.0e0 - (4.0e0 * u)
t_1 = t_0 * t_0
if (t_0 <= 0.9559999704360962e0) then
tmp = s * log((t_1 / (t_0 * t_1)))
else
tmp = (u * (4.0e0 * s)) + (s * ((21.333333333333332e0 * (u ** 3.0e0)) + ((8.0e0 * (u ** 2.0e0)) + (64.0e0 * (u ** 4.0e0)))))
end if
code = tmp
end function
function code(s, u)
return Float32(s * log(Float32(Float32(1.0) / Float32(Float32(1.0) - Float32(Float32(4.0) * u)))))
end
↓
function code(s, u)
t_0 = Float32(Float32(1.0) - Float32(Float32(4.0) * u))
t_1 = Float32(t_0 * t_0)
tmp = Float32(0.0)
if (t_0 <= Float32(0.9559999704360962))
tmp = Float32(s * log(Float32(t_1 / Float32(t_0 * t_1))));
else
tmp = Float32(Float32(u * Float32(Float32(4.0) * s)) + Float32(s * Float32(Float32(Float32(21.333333333333332) * (u ^ Float32(3.0))) + Float32(Float32(Float32(8.0) * (u ^ Float32(2.0))) + Float32(Float32(64.0) * (u ^ Float32(4.0)))))));
end
return tmp
end
function tmp = code(s, u)
tmp = s * log((single(1.0) / (single(1.0) - (single(4.0) * u))));
end
↓
function tmp_2 = code(s, u)
t_0 = single(1.0) - (single(4.0) * u);
t_1 = t_0 * t_0;
tmp = single(0.0);
if (t_0 <= single(0.9559999704360962))
tmp = s * log((t_1 / (t_0 * t_1)));
else
tmp = (u * (single(4.0) * s)) + (s * ((single(21.333333333333332) * (u ^ single(3.0))) + ((single(8.0) * (u ^ single(2.0))) + (single(64.0) * (u ^ single(4.0))))));
end
tmp_2 = tmp;
end
s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)
↓
\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
t_1 := t_0 \cdot t_0\\
\mathbf{if}\;t_0 \leq 0.9559999704360962:\\
\;\;\;\;s \cdot \log \left(\frac{t_1}{t_0 \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;u \cdot \left(4 \cdot s\right) + s \cdot \left(21.333333333333332 \cdot {u}^{3} + \left(8 \cdot {u}^{2} + 64 \cdot {u}^{4}\right)\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.4 |
|---|
| Cost | 10436 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
t_1 := t_0 \cdot t_0\\
\mathbf{if}\;t_0 \leq 0.9559999704360962:\\
\;\;\;\;s \cdot \log \left(\frac{t_1}{t_0 \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \left(21.333333333333332 \cdot {u}^{3} + \left(\left(4 \cdot u + 8 \cdot {u}^{2}\right) + 64 \cdot {u}^{4}\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.4 |
|---|
| Cost | 10436 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
t_1 := t_0 \cdot t_0\\
\mathbf{if}\;t_0 \leq 0.9559999704360962:\\
\;\;\;\;s \cdot \log \left(\frac{t_1}{t_0 \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \left(\left(4 \cdot u + 8 \cdot {u}^{2}\right) + \left(21.333333333333332 \cdot {u}^{3} + 64 \cdot {u}^{4}\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.4 |
|---|
| Cost | 10436 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
t_1 := t_0 \cdot t_0\\
\mathbf{if}\;t_0 \leq 0.9559999704360962:\\
\;\;\;\;s \cdot \log \left(\frac{t_1}{t_0 \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \left(\left(4 \cdot u + 64 \cdot {u}^{4}\right) + \left(8 \cdot {u}^{2} + 21.333333333333332 \cdot {u}^{3}\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.6 |
|---|
| Cost | 7140 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
\mathbf{if}\;t_0 \leq 0.9819999933242798:\\
\;\;\;\;s \cdot \log \left(\frac{t_0}{t_0 \cdot t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;u \cdot \left(4 \cdot s\right) + s \cdot \left(8 \cdot {u}^{2} + 21.333333333333332 \cdot {u}^{3}\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.6 |
|---|
| Cost | 7076 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
\mathbf{if}\;4 \cdot u \leq 0.017999999225139618:\\
\;\;\;\;s \cdot \left(8 \cdot {u}^{2}\right) + s \cdot \left(21.333333333333332 \cdot {u}^{3} + u \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{t_0}{t_0 \cdot t_0}\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 0.6 |
|---|
| Cost | 7012 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
\mathbf{if}\;4 \cdot u \leq 0.017999999225139618:\\
\;\;\;\;s \cdot \left(4 \cdot u + \left(21.333333333333332 \cdot {u}^{3} + 8 \cdot {u}^{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{t_0}{t_0 \cdot t_0}\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 1.2 |
|---|
| Cost | 3940 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
\mathbf{if}\;4 \cdot u \leq 0.005799999926239252:\\
\;\;\;\;u \cdot \left(4 \cdot s\right) + s \cdot \left(8 \cdot {u}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{t_0}{t_0 \cdot t_0}\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 1.2 |
|---|
| Cost | 3716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.005799999926239252:\\
\;\;\;\;u \cdot \left(4 \cdot s\right) + s \cdot \left(8 \cdot {u}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 3.5 |
|---|
| Cost | 3684 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
\mathbf{if}\;t_0 \leq 0.9997400045394897:\\
\;\;\;\;s \cdot \log \left(\frac{1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;u \cdot \left(4 \cdot s\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 1.3 |
|---|
| Cost | 3652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.004000000189989805:\\
\;\;\;\;8 \cdot \left(s \cdot \left({u}^{2} + u \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 1.1 |
|---|
| Cost | 3652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.005799999926239252:\\
\;\;\;\;\left(4 \cdot u + 8 \cdot {u}^{2}\right) \cdot s\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 8.3 |
|---|
| Cost | 160 |
|---|
\[4 \cdot \left(u \cdot s\right)
\]
| Alternative 13 |
|---|
| Error | 8.3 |
|---|
| Cost | 160 |
|---|
\[u \cdot \left(4 \cdot s\right)
\]