\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\]
↓
\[\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \log y, y\right)\\
\frac{t_1}{\frac{t_1}{x \cdot \log y - y}} + \left(\log t - z\right)
\end{array}
\]
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma x (log y) y)))
(+ (/ t_1 (/ t_1 (- (* x (log y)) y))) (- (log t) z))))
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) {
double t_1 = fma(x, log(y), y);
return (t_1 / (t_1 / ((x * log(y)) - y))) + (log(t) - z);
}
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)
t_1 = fma(x, log(y), y)
return Float64(Float64(t_1 / Float64(t_1 / Float64(Float64(x * log(y)) - y))) + Float64(log(t) - z))
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_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision] + y), $MachinePrecision]}, N[(N[(t$95$1 / N[(t$95$1 / N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
↓
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \log y, y\right)\\
\frac{t_1}{\frac{t_1}{x \cdot \log y - y}} + \left(\log t - z\right)
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.13% |
|---|
| Cost | 13376 |
|---|
\[\log t + \left(\left(x \cdot \log y - y\right) - z\right)
\]
| Alternative 2 |
|---|
| Error | 34.57% |
|---|
| Cost | 7516 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(-z\right) - y\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -2.15 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1160000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-249}:\\
\;\;\;\;\log t - z\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-83}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{+167}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 31.54% |
|---|
| Cost | 7384 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(-z\right) - y\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+99}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-272}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-81}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+167}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 16.68% |
|---|
| Cost | 7250 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+152} \lor \neg \left(x \leq -2.4 \cdot 10^{+104} \lor \neg \left(x \leq -5.7 \cdot 10^{+76}\right) \land x \leq 1.2 \cdot 10^{+168}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 29.46% |
|---|
| Cost | 7122 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+151} \lor \neg \left(x \leq -1 \cdot 10^{+98} \lor \neg \left(x \leq -3.2 \cdot 10^{+76}\right) \land x \leq 7.5 \cdot 10^{+167}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 0.69% |
|---|
| Cost | 7113 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \lor \neg \left(x \leq 1\right):\\
\;\;\;\;\left(x \cdot \log y - y\right) - z\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 10.98% |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+22} \lor \neg \left(x \leq 5.8 \cdot 10^{+109}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 10.7% |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.82 \cdot 10^{+22}:\\
\;\;\;\;t_1 - y\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+115}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 - z\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 51.02% |
|---|
| Cost | 260 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 2.4 \cdot 10^{+37}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 41.93% |
|---|
| Cost | 256 |
|---|
\[\left(-z\right) - y
\]
| Alternative 11 |
|---|
| Error | 70.48% |
|---|
| Cost | 128 |
|---|
\[-y
\]