\[\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 | 17.1 |
|---|
| Cost | 1636 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
t_2 := \frac{2}{z \cdot t} - 2\\
t_3 := \frac{x}{y} + \frac{2}{t \cdot z}\\
t_4 := \frac{x}{y} + 2 \cdot \frac{1}{t}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{+111}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -440000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-155}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-63}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-14}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+21}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+168}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 13.4 |
|---|
| Cost | 1372 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
t_2 := \frac{2}{z \cdot t} - 2\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{+111}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\mathbf{elif}\;t \leq -1 \cdot 10^{+62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -440000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{y} + 2 \cdot \frac{1}{t}\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;\frac{2 + 2 \cdot \frac{1}{z}}{t}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+167}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.8 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2 \cdot z + 2}{t \cdot z}\\
\mathbf{if}\;\frac{x}{y} \leq -2.2:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2:\\
\;\;\;\;\left(\frac{2}{t \cdot z} + \frac{2}{t}\right) - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.1 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 720000000000:\\
\;\;\;\;\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 5 |
|---|
| Error | 30.6 |
|---|
| Cost | 1232 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -45000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -3.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 9.5 \cdot 10^{-19}:\\
\;\;\;\;-2\\
\mathbf{elif}\;\frac{x}{y} \leq 1.5 \cdot 10^{+31}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 6.5 |
|---|
| Cost | 1232 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{z \cdot t} - 2\\
t_2 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{-26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.04 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\mathbf{elif}\;z \leq 0.000116:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 6.5 |
|---|
| Cost | 1232 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
t_2 := \frac{2}{t \cdot z}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-132}:\\
\;\;\;\;\frac{2}{z \cdot t} - 2\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y} + t_2\\
\mathbf{elif}\;z \leq 16000000000:\\
\;\;\;\;\left(t_2 + \frac{2}{t}\right) - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 6.4 |
|---|
| Cost | 1232 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{if}\;z \leq -4 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-132}:\\
\;\;\;\;\frac{2}{z \cdot t} - 2\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\mathbf{elif}\;z \leq 6100:\\
\;\;\;\;\frac{2 + 2 \cdot \frac{1}{z}}{t} - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 18.8 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{t} - 2\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 30.5:\\
\;\;\;\;\frac{2}{z \cdot t} - 2\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+128}:\\
\;\;\;\;\frac{x}{y} + 2 \cdot \frac{1}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 20.1 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -45000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 2.95 \cdot 10^{+38}:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 23.5 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{t} - 2\\
\mathbf{if}\;z \leq -0.0305:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-69}:\\
\;\;\;\;\frac{2}{t \cdot z}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 18.9 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_1 := \frac{2}{t} - 2\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2450:\\
\;\;\;\;\frac{2}{z \cdot t} - 2\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+86}:\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 19.9 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -29:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 70000:\\
\;\;\;\;\frac{2}{t} - 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 33.7 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -150:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 80000000000000:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 47.0 |
|---|
| Cost | 64 |
|---|
\[-2
\]