\[\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 := \log \left({\left(\mathsf{fma}\left(-4, u, 1\right)\right)}^{-1}\right)\\
t_1 := s \cdot t_0\\
\mathbf{if}\;1 - 4 \cdot u \leq 0.9995:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;t_1 \ne 0:\\
\;\;\;\;{\left(\frac{\frac{1}{s}}{t_0}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(64, {u}^{4}, 4 \cdot u\right), s, \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) \cdot s\right)\\
\end{array}
\]
(FPCore (s u) :precision binary64 (* s (log (/ 1.0 (- 1.0 (* 4.0 u))))))
↓
(FPCore (s u)
:precision binary64
(let* ((t_0 (log (pow (fma -4.0 u 1.0) -1.0))) (t_1 (* s t_0)))
(if (<= (- 1.0 (* 4.0 u)) 0.9995)
(if (!= t_1 0.0) (pow (/ (/ 1.0 s) t_0) -1.0) t_1)
(fma
(fma 64.0 (pow u 4.0) (* 4.0 u))
s
(* (* (pow u 2.0) (+ 8.0 (* 21.333333333333332 u))) s)))))double code(double s, double u) {
return s * log((1.0 / (1.0 - (4.0 * u))));
}
↓
double code(double s, double u) {
double t_0 = log(pow(fma(-4.0, u, 1.0), -1.0));
double t_1 = s * t_0;
double tmp_1;
if ((1.0 - (4.0 * u)) <= 0.9995) {
double tmp_2;
if (t_1 != 0.0) {
tmp_2 = pow(((1.0 / s) / t_0), -1.0);
} else {
tmp_2 = t_1;
}
tmp_1 = tmp_2;
} else {
tmp_1 = fma(fma(64.0, pow(u, 4.0), (4.0 * u)), s, ((pow(u, 2.0) * (8.0 + (21.333333333333332 * u))) * s));
}
return tmp_1;
}
function code(s, u)
return Float64(s * log(Float64(1.0 / Float64(1.0 - Float64(4.0 * u)))))
end
↓
function code(s, u)
t_0 = log((fma(-4.0, u, 1.0) ^ -1.0))
t_1 = Float64(s * t_0)
tmp_1 = 0.0
if (Float64(1.0 - Float64(4.0 * u)) <= 0.9995)
tmp_2 = 0.0
if (t_1 != 0.0)
tmp_2 = Float64(Float64(1.0 / s) / t_0) ^ -1.0;
else
tmp_2 = t_1;
end
tmp_1 = tmp_2;
else
tmp_1 = fma(fma(64.0, (u ^ 4.0), Float64(4.0 * u)), s, Float64(Float64((u ^ 2.0) * Float64(8.0 + Float64(21.333333333333332 * u))) * s));
end
return tmp_1
end
code[s_, u_] := N[(s * N[Log[N[(1.0 / N[(1.0 - N[(4.0 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[s_, u_] := Block[{t$95$0 = N[Log[N[Power[N[(-4.0 * u + 1.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(s * t$95$0), $MachinePrecision]}, If[LessEqual[N[(1.0 - N[(4.0 * u), $MachinePrecision]), $MachinePrecision], 0.9995], If[Unequal[t$95$1, 0.0], N[Power[N[(N[(1.0 / s), $MachinePrecision] / t$95$0), $MachinePrecision], -1.0], $MachinePrecision], t$95$1], N[(N[(64.0 * N[Power[u, 4.0], $MachinePrecision] + N[(4.0 * u), $MachinePrecision]), $MachinePrecision] * s + N[(N[(N[Power[u, 2.0], $MachinePrecision] * N[(8.0 + N[(21.333333333333332 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * s), $MachinePrecision]), $MachinePrecision]]]]
s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)
↓
\begin{array}{l}
t_0 := \log \left({\left(\mathsf{fma}\left(-4, u, 1\right)\right)}^{-1}\right)\\
t_1 := s \cdot t_0\\
\mathbf{if}\;1 - 4 \cdot u \leq 0.9995:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;t_1 \ne 0:\\
\;\;\;\;{\left(\frac{\frac{1}{s}}{t_0}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(64, {u}^{4}, 4 \cdot u\right), s, \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) \cdot s\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 1.7 |
|---|
| Cost | 26948 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(64, {u}^{4}, 4 \cdot u\right), s, \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) \cdot s\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left({\left(\frac{1}{{\left(\mathsf{fma}\left(-4, u, 1\right)\right)}^{3}}\right)}^{0.3333333333333333}\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.8 |
|---|
| Cost | 26436 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.0005:\\
\;\;\;\;\left(s \cdot \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) + \left(64 \cdot {u}^{4}\right) \cdot s\right) + \left(4 \cdot u\right) \cdot s\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left({\left(\frac{1}{{\left(\mathsf{fma}\left(-4, u, 1\right)\right)}^{3}}\right)}^{0.3333333333333333}\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.8 |
|---|
| Cost | 20100 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.0005:\\
\;\;\;\;\left(s \cdot \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) + \left(64 \cdot {u}^{4}\right) \cdot s\right) + \left(4 \cdot u\right) \cdot s\\
\mathbf{else}:\\
\;\;\;\;\frac{\log \left({\left(\mathsf{fma}\left(-4, u, 1\right)\right)}^{-1}\right) \cdot s}{3} \cdot 3\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.8 |
|---|
| Cost | 14532 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.0005:\\
\;\;\;\;\left(s \cdot \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) + \left(4 \cdot u\right) \cdot s\right) + \left(64 \cdot {u}^{4}\right) \cdot s\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.8 |
|---|
| Cost | 14532 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.0005:\\
\;\;\;\;\left(s \cdot \left({u}^{2} \cdot \left(8 + 21.333333333333332 \cdot u\right)\right) + \left(64 \cdot {u}^{4}\right) \cdot s\right) + \left(4 \cdot u\right) \cdot s\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.8 |
|---|
| Cost | 14212 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.0005:\\
\;\;\;\;s \cdot \left(\mathsf{fma}\left(64, {u}^{4}, 4 \cdot u\right) + \left(u \cdot u\right) \cdot \left(8 + 21.333333333333332 \cdot u\right)\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 3.0 |
|---|
| Cost | 7556 |
|---|
\[\begin{array}{l}
\mathbf{if}\;4 \cdot u \leq 0.000116:\\
\;\;\;\;s \cdot \left({u}^{2} \cdot \left(21.333333333333332 \cdot u + 8\right) + 4 \cdot u\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 6.3 |
|---|
| Cost | 7364 |
|---|
\[\begin{array}{l}
t_0 := 1 - 4 \cdot u\\
\mathbf{if}\;t_0 \leq 0.9999961:\\
\;\;\;\;s \cdot \log \left(\frac{1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;s \cdot \left(u \cdot 4 + 8 \cdot \left(u \cdot u\right)\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 21.8 |
|---|
| Cost | 704 |
|---|
\[s \cdot \left(u \cdot 4 + 8 \cdot \left(u \cdot u\right)\right)
\]
| Alternative 10 |
|---|
| Error | 21.9 |
|---|
| Cost | 576 |
|---|
\[s \cdot \left(u \cdot \left(4 - -8 \cdot u\right)\right)
\]
| Alternative 11 |
|---|
| Error | 36.5 |
|---|
| Cost | 320 |
|---|
\[4 \cdot \left(u \cdot s\right)
\]