\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\]
↓
\[\left(2 \cdot \left(\left(y + z\right) \cdot x\right) + x \cdot t\right) + y \cdot 5
\]
(FPCore (x y z t)
:precision binary64
(+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
↓
(FPCore (x y z t)
:precision binary64
(+ (+ (* 2.0 (* (+ y z) x)) (* x t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
↓
double code(double x, double y, double z, double t) {
return ((2.0 * ((y + z) * x)) + (x * t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((2.0d0 * ((y + z) * x)) + (x * t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
↓
public static double code(double x, double y, double z, double t) {
return ((2.0 * ((y + z) * x)) + (x * t)) + (y * 5.0);
}
def code(x, y, z, t):
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
↓
def code(x, y, z, t):
return ((2.0 * ((y + z) * x)) + (x * t)) + (y * 5.0)
function code(x, y, z, t)
return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0))
end
↓
function code(x, y, z, t)
return Float64(Float64(Float64(2.0 * Float64(Float64(y + z) * x)) + Float64(x * t)) + Float64(y * 5.0))
end
function tmp = code(x, y, z, t)
tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
end
↓
function tmp = code(x, y, z, t)
tmp = ((2.0 * ((y + z) * x)) + (x * t)) + (y * 5.0);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[(N[(2.0 * N[(N[(y + z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
↓
\left(2 \cdot \left(\left(y + z\right) \cdot x\right) + x \cdot t\right) + y \cdot 5
Alternatives
| Alternative 1 |
|---|
| Error | 26.9 |
|---|
| Cost | 1240 |
|---|
\[\begin{array}{l}
t_1 := z \cdot \left(2 \cdot x\right)\\
t_2 := y \cdot \left(5 - x \cdot -2\right)\\
t_3 := \left(y + t\right) \cdot x\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{-136}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-256}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-220}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-27}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 26.7 |
|---|
| Cost | 1240 |
|---|
\[\begin{array}{l}
t_1 := y \cdot \left(5 - x \cdot -2\right)\\
t_2 := \left(y + t\right) \cdot x\\
\mathbf{if}\;y \leq -1.24 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-257}:\\
\;\;\;\;\left(y + z\right) \cdot \left(2 \cdot x\right)\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-220}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-111}:\\
\;\;\;\;z \cdot \left(2 \cdot x\right)\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-27}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 9.9 |
|---|
| Cost | 1232 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \left(y + \left(y + t\right)\right) + y \cdot 5\\
t_2 := \left(t + 2 \cdot \left(y + z\right)\right) \cdot x\\
\mathbf{if}\;x \leq -1.42 \cdot 10^{-11}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-185}:\\
\;\;\;\;z \cdot \left(x + x\right) + y \cdot 5\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 31.6 |
|---|
| Cost | 1112 |
|---|
\[\begin{array}{l}
t_1 := y \cdot \left(x - -5\right)\\
t_2 := z \cdot \left(2 \cdot x\right)\\
\mathbf{if}\;y \leq -1.48 \cdot 10^{-136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.92 \cdot 10^{-256}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-219}:\\
\;\;\;\;t \cdot x\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-26}:\\
\;\;\;\;t \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 31.6 |
|---|
| Cost | 1112 |
|---|
\[\begin{array}{l}
t_1 := \left(y + t\right) \cdot x\\
t_2 := y \cdot \left(x - -5\right)\\
t_3 := z \cdot \left(2 \cdot x\right)\\
\mathbf{if}\;y \leq -1.76 \cdot 10^{-135}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.92 \cdot 10^{-256}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-110}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 15.1 |
|---|
| Cost | 1108 |
|---|
\[\begin{array}{l}
t_1 := t \cdot x + y \cdot 5\\
t_2 := y \cdot \left(5 - x \cdot -2\right)\\
t_3 := \left(2 \cdot z + t\right) \cdot x\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+63}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-109}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-26}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 9.7 |
|---|
| Cost | 1104 |
|---|
\[\begin{array}{l}
t_1 := t \cdot x + y \cdot 5\\
t_2 := \left(t + 2 \cdot \left(y + z\right)\right) \cdot x\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-184}:\\
\;\;\;\;z \cdot \left(x + x\right) + y \cdot 5\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 0.7 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
t_1 := \left(t + 2 \cdot \left(y + z\right)\right) \cdot x\\
\mathbf{if}\;x \leq -1700000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.5:\\
\;\;\;\;x \cdot \left(z + \left(z + t\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 0.1 |
|---|
| Cost | 960 |
|---|
\[x \cdot \left(y + \left(z + \left(y + \left(z + t\right)\right)\right)\right) + y \cdot 5
\]
| Alternative 10 |
|---|
| Error | 31.9 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_1 := y \cdot \left(x - -5\right)\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{-128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-131}:\\
\;\;\;\;t \cdot x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;t \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 10.0 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_1 := \left(t + 2 \cdot \left(y + z\right)\right) \cdot x\\
\mathbf{if}\;x \leq -5 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;t \cdot x + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 0.1 |
|---|
| Cost | 832 |
|---|
\[y \cdot 5 + x \cdot \left(t + 2 \cdot \left(z + y\right)\right)
\]
| Alternative 13 |
|---|
| Error | 32.8 |
|---|
| Cost | 720 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-130}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-125}:\\
\;\;\;\;t \cdot x\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-77}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-27}:\\
\;\;\;\;t \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 14.6 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_1 := y \cdot \left(5 - x \cdot -2\right)\\
\mathbf{if}\;y \leq -62:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-26}:\\
\;\;\;\;\left(2 \cdot z + t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 47.1 |
|---|
| Cost | 192 |
|---|
\[t \cdot x
\]