\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\]
↓
\[\mathsf{fma}\left(\log y, x, \left(\log t - z\right) - y\right)
\]
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
↓
(FPCore (x y z t) :precision binary64 (fma (log y) x (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(t);
}
↓
double code(double x, double y, double z, double t) {
return fma(log(y), x, ((log(t) - z) - y));
}
function code(x, y, z, t)
return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t))
end
↓
function code(x, y, z, t)
return fma(log(y), x, Float64(Float64(log(t) - z) - y))
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[Log[y], $MachinePrecision] * x + N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
↓
\mathsf{fma}\left(\log y, x, \left(\log t - z\right) - y\right)
Alternatives
| Alternative 1 |
|---|
| Accuracy | 97.6% |
|---|
| Cost | 26953 |
|---|
\[\begin{array}{l}
t_1 := \left(\log y \cdot x - y\right) - z\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+17} \lor \neg \left(t_1 \leq 5 \cdot 10^{-13}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{t}{e^{y + z}}\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 98.5% |
|---|
| Cost | 26889 |
|---|
\[\begin{array}{l}
t_1 := \log y \cdot x - y\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+17} \lor \neg \left(t_1 \leq 2 \cdot 10^{-18}\right):\\
\;\;\;\;t_1 - z\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(t \cdot {y}^{x}\right) - z\right) - y\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 98.7% |
|---|
| Cost | 20425 |
|---|
\[\begin{array}{l}
t_1 := \log y \cdot x - y\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+17} \lor \neg \left(t_1 \leq 2 \cdot 10^{-18}\right):\\
\;\;\;\;t_1 - z\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 99.9% |
|---|
| Cost | 13376 |
|---|
\[\log t + \left(\left(\log y \cdot x - y\right) - z\right)
\]
| Alternative 5 |
|---|
| Accuracy | 69.6% |
|---|
| Cost | 7912 |
|---|
\[\begin{array}{l}
t_1 := \log y \cdot x\\
t_2 := \log t - y\\
t_3 := \left(-z\right) - y\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{+135}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-17}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-82}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-244}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-101}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-66}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{+119}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 68.6% |
|---|
| Cost | 7648 |
|---|
\[\begin{array}{l}
t_1 := \log y \cdot x\\
t_2 := \left(-z\right) - y\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1 \cdot 10^{+137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6.3 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-81}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-289}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-49}:\\
\;\;\;\;\log t - z\\
\mathbf{elif}\;x \leq 1.26 \cdot 10^{+120}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 70.6% |
|---|
| Cost | 7384 |
|---|
\[\begin{array}{l}
t_1 := \log y \cdot x\\
t_2 := \left(-z\right) - y\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{+137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-101}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-72}:\\
\;\;\;\;\log t\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+119}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 84.3% |
|---|
| Cost | 7249 |
|---|
\[\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.72 \cdot 10^{+137}:\\
\;\;\;\;\left(-z\right) - y\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{+106} \lor \neg \left(x \leq 3.6 \cdot 10^{+120}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 89.7% |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+18} \lor \neg \left(x \leq 8.6 \cdot 10^{+86}\right):\\
\;\;\;\;\log y \cdot x - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 89.5% |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+41} \lor \neg \left(x \leq 1.5 \cdot 10^{+81}\right):\\
\;\;\;\;\log y \cdot x - z\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 57.1% |
|---|
| Cost | 6729 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 3.8 \cdot 10^{-102} \lor \neg \left(x \leq 8.2 \cdot 10^{-72}\right):\\
\;\;\;\;\left(-z\right) - y\\
\mathbf{else}:\\
\;\;\;\;\log t\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 47.8% |
|---|
| Cost | 260 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 7.4 \cdot 10^{+106}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 58.0% |
|---|
| Cost | 256 |
|---|
\[\left(-z\right) - y
\]
| Alternative 14 |
|---|
| Accuracy | 30.4% |
|---|
| Cost | 128 |
|---|
\[-y
\]