\[1 + \frac{4 \cdot \left(\left(x + y \cdot 0.25\right) - z\right)}{y}
\]
↓
\[\frac{4 \cdot x}{y} + \left(2 + \frac{z}{y} \cdot -4\right)
\]
(FPCore (x y z)
:precision binary64
(+ 1.0 (/ (* 4.0 (- (+ x (* y 0.25)) z)) y)))
↓
(FPCore (x y z)
:precision binary64
(+ (/ (* 4.0 x) y) (+ 2.0 (* (/ z y) -4.0))))
double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
↓
double code(double x, double y, double z) {
return ((4.0 * x) / y) + (2.0 + ((z / y) * -4.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 + ((4.0d0 * ((x + (y * 0.25d0)) - z)) / y)
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((4.0d0 * x) / y) + (2.0d0 + ((z / y) * (-4.0d0)))
end function
public static double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
↓
public static double code(double x, double y, double z) {
return ((4.0 * x) / y) + (2.0 + ((z / y) * -4.0));
}
def code(x, y, z):
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y)
↓
def code(x, y, z):
return ((4.0 * x) / y) + (2.0 + ((z / y) * -4.0))
function code(x, y, z)
return Float64(1.0 + Float64(Float64(4.0 * Float64(Float64(x + Float64(y * 0.25)) - z)) / y))
end
↓
function code(x, y, z)
return Float64(Float64(Float64(4.0 * x) / y) + Float64(2.0 + Float64(Float64(z / y) * -4.0)))
end
function tmp = code(x, y, z)
tmp = 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
end
↓
function tmp = code(x, y, z)
tmp = ((4.0 * x) / y) + (2.0 + ((z / y) * -4.0));
end
code[x_, y_, z_] := N[(1.0 + N[(N[(4.0 * N[(N[(x + N[(y * 0.25), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(N[(4.0 * x), $MachinePrecision] / y), $MachinePrecision] + N[(2.0 + N[(N[(z / y), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
1 + \frac{4 \cdot \left(\left(x + y \cdot 0.25\right) - z\right)}{y}
↓
\frac{4 \cdot x}{y} + \left(2 + \frac{z}{y} \cdot -4\right)
Alternatives
| Alternative 1 |
|---|
| Error | 47.8% |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{z}{y} \cdot -4\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-289}:\\
\;\;\;\;2\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-284}:\\
\;\;\;\;\frac{4}{\frac{y}{x}}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+59}:\\
\;\;\;\;2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 47.75% |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{z}{y} \cdot -4\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-292}:\\
\;\;\;\;2\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-283}:\\
\;\;\;\;\frac{4 \cdot x}{y}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+62}:\\
\;\;\;\;2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.27% |
|---|
| Cost | 832 |
|---|
\[1 + \frac{4}{\frac{y}{x + \left(y \cdot 0.25 - z\right)}}
\]
| Alternative 4 |
|---|
| Error | 17.96% |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+35} \lor \neg \left(z \leq 3.9 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{-4}{y} \cdot \left(z - x\right)\\
\mathbf{else}:\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 13.84% |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-18} \lor \neg \left(x \leq 3.2 \cdot 10^{-31}\right):\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;2 + z \cdot \frac{-4}{y}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 26.37% |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+171}:\\
\;\;\;\;2\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+184}:\\
\;\;\;\;\frac{-4}{y} \cdot \left(z - x\right)\\
\mathbf{else}:\\
\;\;\;\;2\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 46.55% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+35} \lor \neg \left(z \leq 3.2 \cdot 10^{+59}\right):\\
\;\;\;\;\frac{z}{y} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;2\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 57.09% |
|---|
| Cost | 64 |
|---|
\[2
\]