\[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\]
↓
\[\left(\frac{2}{t \cdot z} + \left(\frac{x}{y} + 2 \cdot \frac{1}{t}\right)\right) - 2
\]
(FPCore (x y z t)
:precision binary64
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
↓
(FPCore (x y z t)
:precision binary64
(- (+ (/ 2.0 (* t z)) (+ (/ x y) (* 2.0 (/ 1.0 t)))) 2.0))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
↓
double code(double x, double y, double z, double t) {
return ((2.0 / (t * z)) + ((x / y) + (2.0 * (1.0 / t)))) - 2.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) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
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 / (t * z)) + ((x / y) + (2.0d0 * (1.0d0 / t)))) - 2.0d0
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
↓
public static double code(double x, double y, double z, double t) {
return ((2.0 / (t * z)) + ((x / y) + (2.0 * (1.0 / t)))) - 2.0;
}
def code(x, y, z, t):
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
↓
def code(x, y, z, t):
return ((2.0 / (t * z)) + ((x / y) + (2.0 * (1.0 / t)))) - 2.0
function code(x, y, z, t)
return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z)))
end
↓
function code(x, y, z, t)
return Float64(Float64(Float64(2.0 / Float64(t * z)) + Float64(Float64(x / y) + Float64(2.0 * Float64(1.0 / t)))) - 2.0)
end
function tmp = code(x, y, z, t)
tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
end
↓
function tmp = code(x, y, z, t)
tmp = ((2.0 / (t * z)) + ((x / y) + (2.0 * (1.0 / t)))) - 2.0;
end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[(N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
↓
\left(\frac{2}{t \cdot z} + \left(\frac{x}{y} + 2 \cdot \frac{1}{t}\right)\right) - 2
Alternatives
| Alternative 1 |
|---|
| Error | 5.6 |
|---|
| Cost | 1744 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{t \cdot z}\\
t_2 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{if}\;\frac{x}{y} \leq -1.8 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\frac{x}{y} \leq 0.022:\\
\;\;\;\;\left(t_1 + \frac{2}{t}\right) - 2\\
\mathbf{elif}\;\frac{x}{y} \leq 4.5 \cdot 10^{+141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\frac{x}{y} \leq 4.6 \cdot 10^{+200}:\\
\;\;\;\;\frac{x}{y} + t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.1 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 17.0 |
|---|
| Cost | 1104 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{t \cdot z}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -3.05 \cdot 10^{+141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-199}:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 6.0 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{if}\;z \leq -0.00041:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-53}:\\
\;\;\;\;\frac{2}{z \cdot t} - 2\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 20.0 |
|---|
| Cost | 976 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{z \cdot t} - 2\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -41000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 11.5 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -41000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-27}:\\
\;\;\;\;\frac{2 + 2 \cdot \frac{1}{z}}{t}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 19.8 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{t \cdot z}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{-36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 20.4 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -8.5 \cdot 10^{+54}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 6.1 \cdot 10^{+26}:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 19.7 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 14.5:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 34.9 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 48.7 |
|---|
| Cost | 192 |
|---|
\[\frac{2}{t}
\]