
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
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
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));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
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 tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); 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]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
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
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));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
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 tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); 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]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (/ (+ 2.0 (* (* 2.0 z) (- 1.0 t))) (* z t))))) (if (<= t_1 INFINITY) t_1 (- (/ x y) 2.0))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(2.0 * z) * Float64(1.0 - t))) / Float64(z * t))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x / y) - 2.0); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(2.0 * z), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2 + \left(2 \cdot z\right) \cdot \left(1 - t\right)}{z \cdot t}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
if (+.f64 (/.f64 x y) (/.f64 (+.f64 2 (*.f64 (*.f64 z 2) (-.f64 1 t))) (*.f64 t z))) < +inf.0Initial program 99.9%
if +inf.0 < (+.f64 (/.f64 x y) (/.f64 (+.f64 2 (*.f64 (*.f64 z 2) (-.f64 1 t))) (*.f64 t z))) Initial program 0.0%
Taylor expanded in t around inf 97.6%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ 2.0 (/ 2.0 z)) t)) (t_2 (- (/ x y) 2.0)))
(if (<= t -2.9e-21)
t_2
(if (<= t -1.5e-92)
t_1
(if (<= t -2.15e-144)
(+ (/ x y) (* 2.0 (/ 1.0 t)))
(if (<= t 0.47)
t_1
(if (or (<= t 1.9e+37) (not (<= t 1.75e+99)))
t_2
(+ -2.0 (/ (/ 2.0 t) z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (2.0 + (2.0 / z)) / t;
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -2.9e-21) {
tmp = t_2;
} else if (t <= -1.5e-92) {
tmp = t_1;
} else if (t <= -2.15e-144) {
tmp = (x / y) + (2.0 * (1.0 / t));
} else if (t <= 0.47) {
tmp = t_1;
} else if ((t <= 1.9e+37) || !(t <= 1.75e+99)) {
tmp = t_2;
} else {
tmp = -2.0 + ((2.0 / t) / z);
}
return tmp;
}
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
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (2.0d0 + (2.0d0 / z)) / t
t_2 = (x / y) - 2.0d0
if (t <= (-2.9d-21)) then
tmp = t_2
else if (t <= (-1.5d-92)) then
tmp = t_1
else if (t <= (-2.15d-144)) then
tmp = (x / y) + (2.0d0 * (1.0d0 / t))
else if (t <= 0.47d0) then
tmp = t_1
else if ((t <= 1.9d+37) .or. (.not. (t <= 1.75d+99))) then
tmp = t_2
else
tmp = (-2.0d0) + ((2.0d0 / t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (2.0 + (2.0 / z)) / t;
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -2.9e-21) {
tmp = t_2;
} else if (t <= -1.5e-92) {
tmp = t_1;
} else if (t <= -2.15e-144) {
tmp = (x / y) + (2.0 * (1.0 / t));
} else if (t <= 0.47) {
tmp = t_1;
} else if ((t <= 1.9e+37) || !(t <= 1.75e+99)) {
tmp = t_2;
} else {
tmp = -2.0 + ((2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (2.0 + (2.0 / z)) / t t_2 = (x / y) - 2.0 tmp = 0 if t <= -2.9e-21: tmp = t_2 elif t <= -1.5e-92: tmp = t_1 elif t <= -2.15e-144: tmp = (x / y) + (2.0 * (1.0 / t)) elif t <= 0.47: tmp = t_1 elif (t <= 1.9e+37) or not (t <= 1.75e+99): tmp = t_2 else: tmp = -2.0 + ((2.0 / t) / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(2.0 + Float64(2.0 / z)) / t) t_2 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (t <= -2.9e-21) tmp = t_2; elseif (t <= -1.5e-92) tmp = t_1; elseif (t <= -2.15e-144) tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(1.0 / t))); elseif (t <= 0.47) tmp = t_1; elseif ((t <= 1.9e+37) || !(t <= 1.75e+99)) tmp = t_2; else tmp = Float64(-2.0 + Float64(Float64(2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (2.0 + (2.0 / z)) / t; t_2 = (x / y) - 2.0; tmp = 0.0; if (t <= -2.9e-21) tmp = t_2; elseif (t <= -1.5e-92) tmp = t_1; elseif (t <= -2.15e-144) tmp = (x / y) + (2.0 * (1.0 / t)); elseif (t <= 0.47) tmp = t_1; elseif ((t <= 1.9e+37) || ~((t <= 1.75e+99))) tmp = t_2; else tmp = -2.0 + ((2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[t, -2.9e-21], t$95$2, If[LessEqual[t, -1.5e-92], t$95$1, If[LessEqual[t, -2.15e-144], N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.47], t$95$1, If[Or[LessEqual[t, 1.9e+37], N[Not[LessEqual[t, 1.75e+99]], $MachinePrecision]], t$95$2, N[(-2.0 + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2 + \frac{2}{z}}{t}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{-144}:\\
\;\;\;\;\frac{x}{y} + 2 \cdot \frac{1}{t}\\
\mathbf{elif}\;t \leq 0.47:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+37} \lor \neg \left(t \leq 1.75 \cdot 10^{+99}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
if t < -2.9e-21 or 0.46999999999999997 < t < 1.89999999999999995e37 or 1.7499999999999999e99 < t Initial program 65.2%
Taylor expanded in t around inf 84.8%
if -2.9e-21 < t < -1.50000000000000007e-92 or -2.14999999999999995e-144 < t < 0.46999999999999997Initial program 99.0%
Taylor expanded in t around 0 85.6%
associate-*r/85.6%
metadata-eval85.6%
Simplified85.6%
if -1.50000000000000007e-92 < t < -2.14999999999999995e-144Initial program 100.0%
Taylor expanded in z around inf 92.9%
Taylor expanded in t around 0 92.9%
if 1.89999999999999995e37 < t < 1.7499999999999999e99Initial program 99.8%
Taylor expanded in t around inf 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
sub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 83.9%
sub-neg83.9%
associate-*r/83.9%
metadata-eval83.9%
associate-/r*83.9%
metadata-eval83.9%
+-commutative83.9%
Simplified83.9%
Final simplification85.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= z -2.8e+203)
t_1
(if (<= z -4.1e+162)
(/ 2.0 t)
(if (<= z -1.85e-53)
t_1
(if (<= z 1e-94)
(/ 2.0 (* z t))
(if (or (<= z 4.2e+249) (not (<= z 2.6e+292))) t_1 (/ 2.0 t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (z <= -2.8e+203) {
tmp = t_1;
} else if (z <= -4.1e+162) {
tmp = 2.0 / t;
} else if (z <= -1.85e-53) {
tmp = t_1;
} else if (z <= 1e-94) {
tmp = 2.0 / (z * t);
} else if ((z <= 4.2e+249) || !(z <= 2.6e+292)) {
tmp = t_1;
} else {
tmp = 2.0 / t;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) - 2.0d0
if (z <= (-2.8d+203)) then
tmp = t_1
else if (z <= (-4.1d+162)) then
tmp = 2.0d0 / t
else if (z <= (-1.85d-53)) then
tmp = t_1
else if (z <= 1d-94) then
tmp = 2.0d0 / (z * t)
else if ((z <= 4.2d+249) .or. (.not. (z <= 2.6d+292))) then
tmp = t_1
else
tmp = 2.0d0 / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (z <= -2.8e+203) {
tmp = t_1;
} else if (z <= -4.1e+162) {
tmp = 2.0 / t;
} else if (z <= -1.85e-53) {
tmp = t_1;
} else if (z <= 1e-94) {
tmp = 2.0 / (z * t);
} else if ((z <= 4.2e+249) || !(z <= 2.6e+292)) {
tmp = t_1;
} else {
tmp = 2.0 / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if z <= -2.8e+203: tmp = t_1 elif z <= -4.1e+162: tmp = 2.0 / t elif z <= -1.85e-53: tmp = t_1 elif z <= 1e-94: tmp = 2.0 / (z * t) elif (z <= 4.2e+249) or not (z <= 2.6e+292): tmp = t_1 else: tmp = 2.0 / t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (z <= -2.8e+203) tmp = t_1; elseif (z <= -4.1e+162) tmp = Float64(2.0 / t); elseif (z <= -1.85e-53) tmp = t_1; elseif (z <= 1e-94) tmp = Float64(2.0 / Float64(z * t)); elseif ((z <= 4.2e+249) || !(z <= 2.6e+292)) tmp = t_1; else tmp = Float64(2.0 / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) - 2.0; tmp = 0.0; if (z <= -2.8e+203) tmp = t_1; elseif (z <= -4.1e+162) tmp = 2.0 / t; elseif (z <= -1.85e-53) tmp = t_1; elseif (z <= 1e-94) tmp = 2.0 / (z * t); elseif ((z <= 4.2e+249) || ~((z <= 2.6e+292))) tmp = t_1; else tmp = 2.0 / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[z, -2.8e+203], t$95$1, If[LessEqual[z, -4.1e+162], N[(2.0 / t), $MachinePrecision], If[LessEqual[z, -1.85e-53], t$95$1, If[LessEqual[z, 1e-94], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.2e+249], N[Not[LessEqual[z, 2.6e+292]], $MachinePrecision]], t$95$1, N[(2.0 / t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+203}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+162}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 10^{-94}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+249} \lor \neg \left(z \leq 2.6 \cdot 10^{+292}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t}\\
\end{array}
\end{array}
if z < -2.7999999999999999e203 or -4.0999999999999999e162 < z < -1.84999999999999991e-53 or 9.9999999999999996e-95 < z < 4.1999999999999997e249 or 2.5999999999999999e292 < z Initial program 74.2%
Taylor expanded in t around inf 69.1%
if -2.7999999999999999e203 < z < -4.0999999999999999e162 or 4.1999999999999997e249 < z < 2.5999999999999999e292Initial program 84.0%
Taylor expanded in t around 0 79.7%
associate-*r/79.7%
metadata-eval79.7%
Simplified79.7%
Taylor expanded in z around inf 79.7%
if -1.84999999999999991e-53 < z < 9.9999999999999996e-95Initial program 98.8%
Taylor expanded in t around 0 76.1%
associate-*r/76.1%
metadata-eval76.1%
Simplified76.1%
Taylor expanded in z around 0 76.2%
Final simplification72.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ 2.0 (* z t)))) (t_2 (- (/ x y) 2.0)))
(if (<= t -1.15e+153)
t_2
(if (<= t -5.5e-108)
t_1
(if (<= t 1.32e-58)
(/ (+ 2.0 (/ 2.0 z)) t)
(if (<= t 7.6e+137) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / (z * t));
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -1.15e+153) {
tmp = t_2;
} else if (t <= -5.5e-108) {
tmp = t_1;
} else if (t <= 1.32e-58) {
tmp = (2.0 + (2.0 / z)) / t;
} else if (t <= 7.6e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / y) + (2.0d0 / (z * t))
t_2 = (x / y) - 2.0d0
if (t <= (-1.15d+153)) then
tmp = t_2
else if (t <= (-5.5d-108)) then
tmp = t_1
else if (t <= 1.32d-58) then
tmp = (2.0d0 + (2.0d0 / z)) / t
else if (t <= 7.6d+137) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / (z * t));
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -1.15e+153) {
tmp = t_2;
} else if (t <= -5.5e-108) {
tmp = t_1;
} else if (t <= 1.32e-58) {
tmp = (2.0 + (2.0 / z)) / t;
} else if (t <= 7.6e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / (z * t)) t_2 = (x / y) - 2.0 tmp = 0 if t <= -1.15e+153: tmp = t_2 elif t <= -5.5e-108: tmp = t_1 elif t <= 1.32e-58: tmp = (2.0 + (2.0 / z)) / t elif t <= 7.6e+137: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))) t_2 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (t <= -1.15e+153) tmp = t_2; elseif (t <= -5.5e-108) tmp = t_1; elseif (t <= 1.32e-58) tmp = Float64(Float64(2.0 + Float64(2.0 / z)) / t); elseif (t <= 7.6e+137) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / (z * t)); t_2 = (x / y) - 2.0; tmp = 0.0; if (t <= -1.15e+153) tmp = t_2; elseif (t <= -5.5e-108) tmp = t_1; elseif (t <= 1.32e-58) tmp = (2.0 + (2.0 / z)) / t; elseif (t <= 7.6e+137) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[t, -1.15e+153], t$95$2, If[LessEqual[t, -5.5e-108], t$95$1, If[LessEqual[t, 1.32e-58], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 7.6e+137], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{z \cdot t}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+153}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-58}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.1500000000000001e153 or 7.59999999999999926e137 < t Initial program 47.7%
Taylor expanded in t around inf 98.6%
if -1.1500000000000001e153 < t < -5.50000000000000031e-108 or 1.31999999999999993e-58 < t < 7.59999999999999926e137Initial program 92.5%
Taylor expanded in z around 0 75.4%
if -5.50000000000000031e-108 < t < 1.31999999999999993e-58Initial program 98.8%
Taylor expanded in t around 0 87.8%
associate-*r/87.8%
metadata-eval87.8%
Simplified87.8%
Final simplification85.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= t -5e-18)
t_1
(if (<= t 0.82)
(/ (+ 2.0 (/ 2.0 z)) t)
(if (or (<= t 2.5e+38) (not (<= t 1.25e+97)))
t_1
(+ -2.0 (/ (/ 2.0 t) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (t <= -5e-18) {
tmp = t_1;
} else if (t <= 0.82) {
tmp = (2.0 + (2.0 / z)) / t;
} else if ((t <= 2.5e+38) || !(t <= 1.25e+97)) {
tmp = t_1;
} else {
tmp = -2.0 + ((2.0 / t) / z);
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) - 2.0d0
if (t <= (-5d-18)) then
tmp = t_1
else if (t <= 0.82d0) then
tmp = (2.0d0 + (2.0d0 / z)) / t
else if ((t <= 2.5d+38) .or. (.not. (t <= 1.25d+97))) then
tmp = t_1
else
tmp = (-2.0d0) + ((2.0d0 / t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (t <= -5e-18) {
tmp = t_1;
} else if (t <= 0.82) {
tmp = (2.0 + (2.0 / z)) / t;
} else if ((t <= 2.5e+38) || !(t <= 1.25e+97)) {
tmp = t_1;
} else {
tmp = -2.0 + ((2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if t <= -5e-18: tmp = t_1 elif t <= 0.82: tmp = (2.0 + (2.0 / z)) / t elif (t <= 2.5e+38) or not (t <= 1.25e+97): tmp = t_1 else: tmp = -2.0 + ((2.0 / t) / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (t <= -5e-18) tmp = t_1; elseif (t <= 0.82) tmp = Float64(Float64(2.0 + Float64(2.0 / z)) / t); elseif ((t <= 2.5e+38) || !(t <= 1.25e+97)) tmp = t_1; else tmp = Float64(-2.0 + Float64(Float64(2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) - 2.0; tmp = 0.0; if (t <= -5e-18) tmp = t_1; elseif (t <= 0.82) tmp = (2.0 + (2.0 / z)) / t; elseif ((t <= 2.5e+38) || ~((t <= 1.25e+97))) tmp = t_1; else tmp = -2.0 + ((2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[t, -5e-18], t$95$1, If[LessEqual[t, 0.82], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[t, 2.5e+38], N[Not[LessEqual[t, 1.25e+97]], $MachinePrecision]], t$95$1, N[(-2.0 + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -5 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 0.82:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+38} \lor \neg \left(t \leq 1.25 \cdot 10^{+97}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
if t < -5.00000000000000036e-18 or 0.819999999999999951 < t < 2.49999999999999985e38 or 1.25e97 < t Initial program 65.2%
Taylor expanded in t around inf 84.8%
if -5.00000000000000036e-18 < t < 0.819999999999999951Initial program 99.1%
Taylor expanded in t around 0 81.6%
associate-*r/81.6%
metadata-eval81.6%
Simplified81.6%
if 2.49999999999999985e38 < t < 1.25e97Initial program 99.8%
Taylor expanded in t around inf 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
sub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 83.9%
sub-neg83.9%
associate-*r/83.9%
metadata-eval83.9%
associate-/r*83.9%
metadata-eval83.9%
+-commutative83.9%
Simplified83.9%
Final simplification83.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -0.0013) (not (<= (/ x y) 9.8e+154))) (- (/ x y) 2.0) (+ -2.0 (/ (/ 2.0 t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -0.0013) || !((x / y) <= 9.8e+154)) {
tmp = (x / y) - 2.0;
} else {
tmp = -2.0 + ((2.0 / t) / z);
}
return tmp;
}
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
real(8) :: tmp
if (((x / y) <= (-0.0013d0)) .or. (.not. ((x / y) <= 9.8d+154))) then
tmp = (x / y) - 2.0d0
else
tmp = (-2.0d0) + ((2.0d0 / t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -0.0013) || !((x / y) <= 9.8e+154)) {
tmp = (x / y) - 2.0;
} else {
tmp = -2.0 + ((2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -0.0013) or not ((x / y) <= 9.8e+154): tmp = (x / y) - 2.0 else: tmp = -2.0 + ((2.0 / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -0.0013) || !(Float64(x / y) <= 9.8e+154)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(-2.0 + Float64(Float64(2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -0.0013) || ~(((x / y) <= 9.8e+154))) tmp = (x / y) - 2.0; else tmp = -2.0 + ((2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -0.0013], N[Not[LessEqual[N[(x / y), $MachinePrecision], 9.8e+154]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(-2.0 + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -0.0013 \lor \neg \left(\frac{x}{y} \leq 9.8 \cdot 10^{+154}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
if (/.f64 x y) < -0.0012999999999999999 or 9.8000000000000003e154 < (/.f64 x y) Initial program 81.7%
Taylor expanded in t around inf 73.6%
if -0.0012999999999999999 < (/.f64 x y) < 9.8000000000000003e154Initial program 84.7%
Taylor expanded in t around inf 57.0%
*-commutative57.0%
associate-*l*57.0%
Simplified57.0%
Taylor expanded in t around 0 72.1%
sub-neg72.1%
associate-*r/72.1%
metadata-eval72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in x around 0 70.2%
sub-neg70.2%
associate-*r/70.2%
metadata-eval70.2%
associate-/r*70.1%
metadata-eval70.1%
+-commutative70.1%
Simplified70.1%
Final simplification71.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -9e-27) (not (<= z 4.7e-19))) (+ (/ x y) (* 2.0 (/ (- 1.0 t) t))) (+ (/ x y) (/ 2.0 (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9e-27) || !(z <= 4.7e-19)) {
tmp = (x / y) + (2.0 * ((1.0 - t) / t));
} else {
tmp = (x / y) + (2.0 / (z * t));
}
return tmp;
}
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
real(8) :: tmp
if ((z <= (-9d-27)) .or. (.not. (z <= 4.7d-19))) then
tmp = (x / y) + (2.0d0 * ((1.0d0 - t) / t))
else
tmp = (x / y) + (2.0d0 / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9e-27) || !(z <= 4.7e-19)) {
tmp = (x / y) + (2.0 * ((1.0 - t) / t));
} else {
tmp = (x / y) + (2.0 / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -9e-27) or not (z <= 4.7e-19): tmp = (x / y) + (2.0 * ((1.0 - t) / t)) else: tmp = (x / y) + (2.0 / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -9e-27) || !(z <= 4.7e-19)) tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(Float64(1.0 - t) / t))); else tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -9e-27) || ~((z <= 4.7e-19))) tmp = (x / y) + (2.0 * ((1.0 - t) / t)); else tmp = (x / y) + (2.0 / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9e-27], N[Not[LessEqual[z, 4.7e-19]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-27} \lor \neg \left(z \leq 4.7 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\end{array}
\end{array}
if z < -9.0000000000000003e-27 or 4.7e-19 < z Initial program 72.9%
Taylor expanded in z around inf 97.7%
if -9.0000000000000003e-27 < z < 4.7e-19Initial program 98.9%
Taylor expanded in z around 0 87.8%
Final simplification93.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 2.05e-17))) (+ (/ x y) (* 2.0 (/ (- 1.0 t) t))) (+ (/ x y) (+ (/ 2.0 (* z t)) -2.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 2.05e-17)) {
tmp = (x / y) + (2.0 * ((1.0 - t) / t));
} else {
tmp = (x / y) + ((2.0 / (z * t)) + -2.0);
}
return tmp;
}
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
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= 2.05d-17))) then
tmp = (x / y) + (2.0d0 * ((1.0d0 - t) / t))
else
tmp = (x / y) + ((2.0d0 / (z * t)) + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 2.05e-17)) {
tmp = (x / y) + (2.0 * ((1.0 - t) / t));
} else {
tmp = (x / y) + ((2.0 / (z * t)) + -2.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 2.05e-17): tmp = (x / y) + (2.0 * ((1.0 - t) / t)) else: tmp = (x / y) + ((2.0 / (z * t)) + -2.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 2.05e-17)) tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(Float64(1.0 - t) / t))); else tmp = Float64(Float64(x / y) + Float64(Float64(2.0 / Float64(z * t)) + -2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 2.05e-17))) tmp = (x / y) + (2.0 * ((1.0 - t) / t)); else tmp = (x / y) + ((2.0 / (z * t)) + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 2.05e-17]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 2.05 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \left(\frac{2}{z \cdot t} + -2\right)\\
\end{array}
\end{array}
if z < -1 or 2.05e-17 < z Initial program 72.2%
Taylor expanded in z around inf 98.3%
if -1 < z < 2.05e-17Initial program 99.0%
Taylor expanded in t around inf 98.5%
*-commutative98.5%
associate-*l*98.5%
Simplified98.5%
Taylor expanded in t around 0 98.5%
sub-neg98.5%
associate-*r/98.5%
metadata-eval98.5%
metadata-eval98.5%
Simplified98.5%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -7500.0) (not (<= (/ x y) 1.6e+43))) (/ x y) (/ 2.0 t)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -7500.0) || !((x / y) <= 1.6e+43)) {
tmp = x / y;
} else {
tmp = 2.0 / t;
}
return tmp;
}
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
real(8) :: tmp
if (((x / y) <= (-7500.0d0)) .or. (.not. ((x / y) <= 1.6d+43))) then
tmp = x / y
else
tmp = 2.0d0 / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -7500.0) || !((x / y) <= 1.6e+43)) {
tmp = x / y;
} else {
tmp = 2.0 / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -7500.0) or not ((x / y) <= 1.6e+43): tmp = x / y else: tmp = 2.0 / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -7500.0) || !(Float64(x / y) <= 1.6e+43)) tmp = Float64(x / y); else tmp = Float64(2.0 / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -7500.0) || ~(((x / y) <= 1.6e+43))) tmp = x / y; else tmp = 2.0 / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -7500.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1.6e+43]], $MachinePrecision]], N[(x / y), $MachinePrecision], N[(2.0 / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -7500 \lor \neg \left(\frac{x}{y} \leq 1.6 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -7500 or 1.60000000000000007e43 < (/.f64 x y) Initial program 81.4%
Taylor expanded in x around inf 70.3%
if -7500 < (/.f64 x y) < 1.60000000000000007e43Initial program 85.1%
Taylor expanded in t around 0 64.9%
associate-*r/64.9%
metadata-eval64.9%
Simplified64.9%
Taylor expanded in z around inf 29.7%
Final simplification47.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.8e-144) (not (<= t 4.8e-63))) (- (/ x y) 2.0) (/ 2.0 t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.8e-144) || !(t <= 4.8e-63)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / t;
}
return tmp;
}
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
real(8) :: tmp
if ((t <= (-2.8d-144)) .or. (.not. (t <= 4.8d-63))) then
tmp = (x / y) - 2.0d0
else
tmp = 2.0d0 / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.8e-144) || !(t <= 4.8e-63)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.8e-144) or not (t <= 4.8e-63): tmp = (x / y) - 2.0 else: tmp = 2.0 / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.8e-144) || !(t <= 4.8e-63)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(2.0 / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.8e-144) || ~((t <= 4.8e-63))) tmp = (x / y) - 2.0; else tmp = 2.0 / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.8e-144], N[Not[LessEqual[t, 4.8e-63]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(2.0 / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-144} \lor \neg \left(t \leq 4.8 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t}\\
\end{array}
\end{array}
if t < -2.79999999999999998e-144 or 4.8000000000000001e-63 < t Initial program 75.8%
Taylor expanded in t around inf 70.3%
if -2.79999999999999998e-144 < t < 4.8000000000000001e-63Initial program 98.7%
Taylor expanded in t around 0 90.0%
associate-*r/90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in z around inf 47.1%
Final simplification62.5%
(FPCore (x y z t) :precision binary64 (/ 2.0 t))
double code(double x, double y, double z, double t) {
return 2.0 / t;
}
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
end function
public static double code(double x, double y, double z, double t) {
return 2.0 / t;
}
def code(x, y, z, t): return 2.0 / t
function code(x, y, z, t) return Float64(2.0 / t) end
function tmp = code(x, y, z, t) tmp = 2.0 / t; end
code[x_, y_, z_, t_] := N[(2.0 / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{t}
\end{array}
Initial program 83.5%
Taylor expanded in t around 0 51.1%
associate-*r/51.1%
metadata-eval51.1%
Simplified51.1%
Taylor expanded in z around inf 22.4%
Final simplification22.4%
(FPCore (x y z t) :precision binary64 (- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y))))
double code(double x, double y, double z, double t) {
return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
}
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 / z) + 2.0d0) / t) - (2.0d0 - (x / y))
end function
public static double code(double x, double y, double z, double t) {
return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
}
def code(x, y, z, t): return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(2.0 / z) + 2.0) / t) - Float64(2.0 - Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = (((2.0 / z) + 2.0) / t) - (2.0 - (x / y)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(2.0 / z), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision] - N[(2.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{2}{z} + 2}{t} - \left(2 - \frac{x}{y}\right)
\end{array}
herbie shell --seed 2023310
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:herbie-target
(- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y)))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))