\[x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
\]
↓
\[\begin{array}{l}
t_0 := x \cdot \left(1 + z \cdot \left(y + -1\right)\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\left(1 - y\right) \cdot \frac{z}{\frac{-1}{x}}\\
\mathbf{elif}\;t_0 \leq 10^{+248}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot z, y + -1, x\right)\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* (- 1.0 y) z))))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ 1.0 (* z (+ y -1.0))))))
(if (<= t_0 (- INFINITY))
(* (- 1.0 y) (/ z (/ -1.0 x)))
(if (<= t_0 1e+248) t_0 (fma (* x z) (+ y -1.0) x)))))double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
↓
double code(double x, double y, double z) {
double t_0 = x * (1.0 + (z * (y + -1.0)));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (1.0 - y) * (z / (-1.0 / x));
} else if (t_0 <= 1e+248) {
tmp = t_0;
} else {
tmp = fma((x * z), (y + -1.0), x);
}
return tmp;
}
function code(x, y, z)
return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z)))
end
↓
function code(x, y, z)
t_0 = Float64(x * Float64(1.0 + Float64(z * Float64(y + -1.0))))
tmp = 0.0
if (t_0 <= Float64(-Inf))
tmp = Float64(Float64(1.0 - y) * Float64(z / Float64(-1.0 / x)));
elseif (t_0 <= 1e+248)
tmp = t_0;
else
tmp = fma(Float64(x * z), Float64(y + -1.0), x);
end
return tmp
end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(1.0 + N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(1.0 - y), $MachinePrecision] * N[(z / N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+248], t$95$0, N[(N[(x * z), $MachinePrecision] * N[(y + -1.0), $MachinePrecision] + x), $MachinePrecision]]]]
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
↓
\begin{array}{l}
t_0 := x \cdot \left(1 + z \cdot \left(y + -1\right)\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\left(1 - y\right) \cdot \frac{z}{\frac{-1}{x}}\\
\mathbf{elif}\;t_0 \leq 10^{+248}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot z, y + -1, x\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 98.9% |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_0 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;t_0 \leq 10^{+272}:\\
\;\;\;\;x \cdot \left(1 + z \cdot \left(y + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 68.4% |
|---|
| Cost | 981 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := y \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -180000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+130} \lor \neg \left(z \leq 4.4 \cdot 10^{+147}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 68.5% |
|---|
| Cost | 981 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -80000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+130} \lor \neg \left(z \leq 5 \cdot 10^{+147}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 81.5% |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 81.5% |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot z}{\frac{1}{y}}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+139}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 69.4% |
|---|
| Cost | 521 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-7} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 47.3% |
|---|
| Cost | 64 |
|---|
\[x
\]