\[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\]
↓
\[\mathsf{fma}\left(y - x, \mathsf{fma}\left(z, -6, 4\right), x\right)
\]
(FPCore (x y z)
:precision binary64
(+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
↓
(FPCore (x y z) :precision binary64 (fma (- y x) (fma z -6.0 4.0) x))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
↓
double code(double x, double y, double z) {
return fma((y - x), fma(z, -6.0, 4.0), x);
}
function code(x, y, z)
return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z)))
end
↓
function code(x, y, z)
return fma(Float64(y - x), fma(z, -6.0, 4.0), x)
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(z * -6.0 + 4.0), $MachinePrecision] + x), $MachinePrecision]
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
↓
\mathsf{fma}\left(y - x, \mathsf{fma}\left(z, -6, 4\right), x\right)
Alternatives
| Alternative 1 |
|---|
| Accuracy | 49.1% |
|---|
| Cost | 2036 |
|---|
\[\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-60}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-176}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-268}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-235}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-179}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 49.0% |
|---|
| Cost | 2036 |
|---|
\[\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := z \cdot \left(y \cdot -6\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{+125}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+68}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+36}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-60}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-175}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-269}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-306}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-233}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-179}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 49.1% |
|---|
| Cost | 2036 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
t_1 := z \cdot \left(y \cdot -6\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+123}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+71}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+36}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-62}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-176}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-269}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-233}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-182}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 67.0% |
|---|
| Cost | 1768 |
|---|
\[\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-61}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-175}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-269}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-303}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-235}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-181}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 67.4% |
|---|
| Cost | 1768 |
|---|
\[\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-175}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-269}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-302}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-232}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-176}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 62000000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 67.4% |
|---|
| Cost | 1768 |
|---|
\[\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-175}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-269}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-232}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-180}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 62000000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 67.4% |
|---|
| Cost | 1768 |
|---|
\[\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+15}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-59}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-176}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-268}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-235}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-173}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 62000000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 67.4% |
|---|
| Cost | 1768 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+15}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-175}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-270}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-235}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.45 \cdot 10^{-178}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 62000000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 49.0% |
|---|
| Cost | 1640 |
|---|
\[\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-61}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-176}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-268}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-304}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-234}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-171}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 97.3% |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.56 \lor \neg \left(z \leq 0.66\right):\\
\;\;\;\;z \cdot \left(x \cdot 6 + y \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 99.3% |
|---|
| Cost | 832 |
|---|
\[x + \left(0.6666666666666666 - z\right) \cdot \left(y \cdot 6 + x \cdot -6\right)
\]
| Alternative 12 |
|---|
| Accuracy | 99.5% |
|---|
| Cost | 832 |
|---|
\[x + \frac{\left(y - x\right) \cdot 6}{\frac{1}{0.6666666666666666 - z}}
\]
| Alternative 13 |
|---|
| Accuracy | 97.3% |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 99.3% |
|---|
| Cost | 704 |
|---|
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\]
| Alternative 15 |
|---|
| Accuracy | 47.8% |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+39}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;y \leq 11.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\]
| Alternative 16 |
|---|
| Accuracy | 32.9% |
|---|
| Cost | 192 |
|---|
\[y \cdot 4
\]