\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
\]
↓
\[\begin{array}{l}
t_0 := \mathsf{fma}\left(3, x, 2 \cdot y\right)\\
\mathbf{if}\;x \leq -5.87097160796506 \cdot 10^{+78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.0335898143874315 \cdot 10^{-79}:\\
\;\;\;\;2 \cdot y + z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (+ (+ (+ (+ (+ x y) y) x) z) x))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fma 3.0 x (* 2.0 y))))
(if (<= x -5.87097160796506e+78)
t_0
(if (<= x 5.0335898143874315e-79) (+ (* 2.0 y) z) t_0))))double code(double x, double y, double z) {
return ((((x + y) + y) + x) + z) + x;
}
↓
double code(double x, double y, double z) {
double t_0 = fma(3.0, x, (2.0 * y));
double tmp;
if (x <= -5.87097160796506e+78) {
tmp = t_0;
} else if (x <= 5.0335898143874315e-79) {
tmp = (2.0 * y) + z;
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z)
return Float64(Float64(Float64(Float64(Float64(x + y) + y) + x) + z) + x)
end
↓
function code(x, y, z)
t_0 = fma(3.0, x, Float64(2.0 * y))
tmp = 0.0
if (x <= -5.87097160796506e+78)
tmp = t_0;
elseif (x <= 5.0335898143874315e-79)
tmp = Float64(Float64(2.0 * y) + z);
else
tmp = t_0;
end
return tmp
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] + y), $MachinePrecision] + x), $MachinePrecision] + z), $MachinePrecision] + x), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(3.0 * x + N[(2.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.87097160796506e+78], t$95$0, If[LessEqual[x, 5.0335898143874315e-79], N[(N[(2.0 * y), $MachinePrecision] + z), $MachinePrecision], t$95$0]]]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
↓
\begin{array}{l}
t_0 := \mathsf{fma}\left(3, x, 2 \cdot y\right)\\
\mathbf{if}\;x \leq -5.87097160796506 \cdot 10^{+78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.0335898143874315 \cdot 10^{-79}:\\
\;\;\;\;2 \cdot y + z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 30.5 |
|---|
| Cost | 984 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -9.906000573868237 \cdot 10^{+105}:\\
\;\;\;\;2 \cdot y\\
\mathbf{elif}\;y \leq -1.5549344809234205 \cdot 10^{-12}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;y \leq -1.5724751903470384 \cdot 10^{-58}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq -4.625530957357437 \cdot 10^{-189}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;y \leq 4.7855004166108063 \cdot 10^{-122}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 1.942263938761878 \cdot 10^{+61}:\\
\;\;\;\;x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;2 \cdot y\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 10.6 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot y + x \cdot 3\\
\mathbf{if}\;x \leq -5.87097160796506 \cdot 10^{+78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.0335898143874315 \cdot 10^{-79}:\\
\;\;\;\;2 \cdot y + z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 10.6 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.87097160796506 \cdot 10^{+78}:\\
\;\;\;\;x + 2 \cdot \left(x + y\right)\\
\mathbf{elif}\;x \leq 5.0335898143874315 \cdot 10^{-79}:\\
\;\;\;\;2 \cdot y + z\\
\mathbf{else}:\\
\;\;\;\;2 \cdot y + x \cdot 3\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 13.1 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.103738092206764 \cdot 10^{+131}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;x \leq 6.197589223043809 \cdot 10^{+164}:\\
\;\;\;\;2 \cdot y + z\\
\mathbf{else}:\\
\;\;\;\;x \cdot 3\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 9.9 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot y + z\\
\mathbf{if}\;y \leq -6.515588583622846 \cdot 10^{+76}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.2365694893506352 \cdot 10^{+78}:\\
\;\;\;\;z + x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 31.0 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.87097160796506 \cdot 10^{+78}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;x \leq 1.1238387012004244 \cdot 10^{-65}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x \cdot 3\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 41.6 |
|---|
| Cost | 64 |
|---|
\[z
\]