\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\]
↓
\[x + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(a + -0.5, b, y\right)\right)
\]
(FPCore (x y z t a b)
:precision binary64
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
↓
(FPCore (x y z t a b)
:precision binary64
(+ x (fma z (- 1.0 (log t)) (fma (+ a -0.5) b y))))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
↓
double code(double x, double y, double z, double t, double a, double b) {
return x + fma(z, (1.0 - log(t)), fma((a + -0.5), b, y));
}
function code(x, y, z, t, a, b)
return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
↓
function code(x, y, z, t, a, b)
return Float64(x + fma(z, Float64(1.0 - log(t)), fma(Float64(a + -0.5), b, y)))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
↓
x + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(a + -0.5, b, y\right)\right)
Alternatives
| Alternative 1 |
|---|
| Accuracy | 88.0% |
|---|
| Cost | 9561 |
|---|
\[\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
t_2 := \left(t_1 + \left(x + z\right)\right) - z \cdot \log t\\
t_3 := \left(x + y\right) + t_1\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+170}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{+92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -6 \cdot 10^{+46}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-31}:\\
\;\;\;\;\left(x + y\right) + z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+45} \lor \neg \left(t_1 \leq 10^{+150}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 88.7% |
|---|
| Cost | 7753 |
|---|
\[\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;t_1 \leq -6 \cdot 10^{+46} \lor \neg \left(t_1 \leq 4 \cdot 10^{+55}\right):\\
\;\;\;\;\left(x + y\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + z \cdot \left(1 - \log t\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 99.8% |
|---|
| Cost | 7360 |
|---|
\[\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b
\]
| Alternative 4 |
|---|
| Accuracy | 86.2% |
|---|
| Cost | 7113 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+166} \lor \neg \left(z \leq 1.95 \cdot 10^{+191}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(a + -0.5\right) \cdot b\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 86.1% |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+168}:\\
\;\;\;\;x + \left(z - z \cdot \log t\right)\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+191}:\\
\;\;\;\;\left(x + y\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 86.1% |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+168}:\\
\;\;\;\;y + t_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+191}:\\
\;\;\;\;\left(x + y\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 83.0% |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+248} \lor \neg \left(z \leq 6 \cdot 10^{+226}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(a + -0.5\right) \cdot b\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 83.0% |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+248}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+226}:\\
\;\;\;\;\left(x + y\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 42.7% |
|---|
| Cost | 1361 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{+22}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;x + y \leq 2 \cdot 10^{-98}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b\\
\mathbf{elif}\;x + y \leq 10^{+126} \lor \neg \left(x + y \leq 5 \cdot 10^{+200}\right):\\
\;\;\;\;y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 47.2% |
|---|
| Cost | 1101 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x + y \leq 2 \cdot 10^{-98}:\\
\;\;\;\;x + \left(a + -0.5\right) \cdot b\\
\mathbf{elif}\;x + y \leq 10^{+126} \lor \neg \left(x + y \leq 5 \cdot 10^{+200}\right):\\
\;\;\;\;y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 60.6% |
|---|
| Cost | 1097 |
|---|
\[\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+188} \lor \neg \left(t_1 \leq 2 \cdot 10^{+163}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 29.7% |
|---|
| Cost | 984 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-41}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -2.65 \cdot 10^{-79}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-120}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -3.35 \cdot 10^{-202}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{-269}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 31.0% |
|---|
| Cost | 852 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -7.3 \cdot 10^{-25}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-31}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-115}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq -1.52 \cdot 10^{-201}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 51.4% |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{+22}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;x + y \leq 5 \cdot 10^{+100}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
| Alternative 15 |
|---|
| Accuracy | 42.7% |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{+22}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;x + y \leq 2 \cdot 10^{-98}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\]
| Alternative 16 |
|---|
| Accuracy | 53.1% |
|---|
| Cost | 720 |
|---|
\[\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+170}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;b \leq 240000000000:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+188}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot b\\
\end{array}
\]
| Alternative 17 |
|---|
| Accuracy | 52.4% |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;x + y \leq -2 \cdot 10^{-150}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\]
| Alternative 18 |
|---|
| Accuracy | 75.8% |
|---|
| Cost | 576 |
|---|
\[\left(x + y\right) + \left(a + -0.5\right) \cdot b
\]
| Alternative 19 |
|---|
| Accuracy | 31.6% |
|---|
| Cost | 196 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 20 |
|---|
| Accuracy | 25.4% |
|---|
| Cost | 64 |
|---|
\[x
\]