
(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 13 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 (if (<= (+ (/ x y) (/ (+ 2.0 (* (* 2.0 z) (- 1.0 t))) (* z t))) INFINITY) (+ (/ x y) (+ (/ (/ 2.0 z) t) (- (/ 2.0 t) 2.0))) (- (/ x y) 2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t))) <= ((double) INFINITY)) {
tmp = (x / y) + (((2.0 / z) / t) + ((2.0 / t) - 2.0));
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t))) <= Double.POSITIVE_INFINITY) {
tmp = (x / y) + (((2.0 / z) / t) + ((2.0 / t) - 2.0));
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t))) <= math.inf: tmp = (x / y) + (((2.0 / z) / t) + ((2.0 / t) - 2.0)) else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(2.0 * z) * Float64(1.0 - t))) / Float64(z * t))) <= Inf) tmp = Float64(Float64(x / y) + Float64(Float64(Float64(2.0 / z) / t) + Float64(Float64(2.0 / t) - 2.0))); else tmp = Float64(Float64(x / y) - 2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) + ((2.0 + ((2.0 * z) * (1.0 - t))) / (z * t))) <= Inf) tmp = (x / y) + (((2.0 / z) / t) + ((2.0 / t) - 2.0)); else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[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], Infinity], N[(N[(x / y), $MachinePrecision] + N[(N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision] + N[(N[(2.0 / t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} + \frac{2 + \left(2 \cdot z\right) \cdot \left(1 - t\right)}{z \cdot t} \leq \infty:\\
\;\;\;\;\frac{x}{y} + \left(\frac{\frac{2}{z}}{t} + \left(\frac{2}{t} - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ (/ 2.0 t) z))))
(if (<= (/ x y) -5e+111)
t_1
(if (<= (/ x y) 1.34e+17)
(+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))
(if (<= (/ x y) 1.55e+239) t_1 (+ (/ x y) (* 2.0 (/ (- 1.0 t) t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 / t) / z);
double tmp;
if ((x / y) <= -5e+111) {
tmp = t_1;
} else if ((x / y) <= 1.34e+17) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else if ((x / y) <= 1.55e+239) {
tmp = t_1;
} else {
tmp = (x / y) + (2.0 * ((1.0 - t) / 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 / t) / z)
if ((x / y) <= (-5d+111)) then
tmp = t_1
else if ((x / y) <= 1.34d+17) then
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
else if ((x / y) <= 1.55d+239) then
tmp = t_1
else
tmp = (x / y) + (2.0d0 * ((1.0d0 - t) / 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 / t) / z);
double tmp;
if ((x / y) <= -5e+111) {
tmp = t_1;
} else if ((x / y) <= 1.34e+17) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else if ((x / y) <= 1.55e+239) {
tmp = t_1;
} else {
tmp = (x / y) + (2.0 * ((1.0 - t) / t));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + ((2.0 / t) / z) tmp = 0 if (x / y) <= -5e+111: tmp = t_1 elif (x / y) <= 1.34e+17: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) elif (x / y) <= 1.55e+239: tmp = t_1 else: tmp = (x / y) + (2.0 * ((1.0 - t) / t)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(Float64(2.0 / t) / z)) tmp = 0.0 if (Float64(x / y) <= -5e+111) tmp = t_1; elseif (Float64(x / y) <= 1.34e+17) tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); elseif (Float64(x / y) <= 1.55e+239) tmp = t_1; else tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(Float64(1.0 - t) / t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + ((2.0 / t) / z); tmp = 0.0; if ((x / y) <= -5e+111) tmp = t_1; elseif ((x / y) <= 1.34e+17) tmp = -2.0 + ((2.0 + (2.0 / z)) / t); elseif ((x / y) <= 1.55e+239) tmp = t_1; else tmp = (x / y) + (2.0 * ((1.0 - t) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5e+111], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 1.34e+17], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1.55e+239], t$95$1, N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{\frac{2}{t}}{z}\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 1.34 \cdot 10^{+17}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 1.55 \cdot 10^{+239}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + 2 \cdot \frac{1 - t}{t}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -6.2e+111) (not (<= (/ x y) 2.55e+17))) (+ (/ x y) (/ (/ 2.0 t) z)) (+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -6.2e+111) || !((x / y) <= 2.55e+17)) {
tmp = (x / y) + ((2.0 / t) / z);
} else {
tmp = -2.0 + ((2.0 + (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 (((x / y) <= (-6.2d+111)) .or. (.not. ((x / y) <= 2.55d+17))) then
tmp = (x / y) + ((2.0d0 / t) / z)
else
tmp = (-2.0d0) + ((2.0d0 + (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 (((x / y) <= -6.2e+111) || !((x / y) <= 2.55e+17)) {
tmp = (x / y) + ((2.0 / t) / z);
} else {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -6.2e+111) or not ((x / y) <= 2.55e+17): tmp = (x / y) + ((2.0 / t) / z) else: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -6.2e+111) || !(Float64(x / y) <= 2.55e+17)) tmp = Float64(Float64(x / y) + Float64(Float64(2.0 / t) / z)); else tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -6.2e+111) || ~(((x / y) <= 2.55e+17))) tmp = (x / y) + ((2.0 / t) / z); else tmp = -2.0 + ((2.0 + (2.0 / z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -6.2e+111], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2.55e+17]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -6.2 \cdot 10^{+111} \lor \neg \left(\frac{x}{y} \leq 2.55 \cdot 10^{+17}\right):\\
\;\;\;\;\frac{x}{y} + \frac{\frac{2}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -1.06e+113)
(/ x y)
(if (<= (/ x y) 2.9e+113)
(+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))
(- (/ x y) 2.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1.06e+113) {
tmp = x / y;
} else if ((x / y) <= 2.9e+113) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else {
tmp = (x / y) - 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 ((x / y) <= (-1.06d+113)) then
tmp = x / y
else if ((x / y) <= 2.9d+113) then
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
else
tmp = (x / y) - 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1.06e+113) {
tmp = x / y;
} else if ((x / y) <= 2.9e+113) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -1.06e+113: tmp = x / y elif (x / y) <= 2.9e+113: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -1.06e+113) tmp = Float64(x / y); elseif (Float64(x / y) <= 2.9e+113) tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); else tmp = Float64(Float64(x / y) - 2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -1.06e+113) tmp = x / y; elseif ((x / y) <= 2.9e+113) tmp = -2.0 + ((2.0 + (2.0 / z)) / t); else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -1.06e+113], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2.9e+113], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1.06 \cdot 10^{+113}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 2.9 \cdot 10^{+113}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ 2.0 (/ 2.0 z)) t)) (t_2 (- (/ x y) 2.0)))
(if (<= t -1.18e-63)
t_2
(if (<= t 1.35e-126)
t_1
(if (<= t 1.5e-62) (/ x y) (if (<= t 1.6e-11) t_1 t_2))))))
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 <= -1.18e-63) {
tmp = t_2;
} else if (t <= 1.35e-126) {
tmp = t_1;
} else if (t <= 1.5e-62) {
tmp = x / y;
} else if (t <= 1.6e-11) {
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 = (2.0d0 + (2.0d0 / z)) / t
t_2 = (x / y) - 2.0d0
if (t <= (-1.18d-63)) then
tmp = t_2
else if (t <= 1.35d-126) then
tmp = t_1
else if (t <= 1.5d-62) then
tmp = x / y
else if (t <= 1.6d-11) 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 = (2.0 + (2.0 / z)) / t;
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -1.18e-63) {
tmp = t_2;
} else if (t <= 1.35e-126) {
tmp = t_1;
} else if (t <= 1.5e-62) {
tmp = x / y;
} else if (t <= 1.6e-11) {
tmp = t_1;
} else {
tmp = t_2;
}
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 <= -1.18e-63: tmp = t_2 elif t <= 1.35e-126: tmp = t_1 elif t <= 1.5e-62: tmp = x / y elif t <= 1.6e-11: tmp = t_1 else: tmp = t_2 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 <= -1.18e-63) tmp = t_2; elseif (t <= 1.35e-126) tmp = t_1; elseif (t <= 1.5e-62) tmp = Float64(x / y); elseif (t <= 1.6e-11) tmp = t_1; else tmp = t_2; 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 <= -1.18e-63) tmp = t_2; elseif (t <= 1.35e-126) tmp = t_1; elseif (t <= 1.5e-62) tmp = x / y; elseif (t <= 1.6e-11) tmp = t_1; else tmp = t_2; 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, -1.18e-63], t$95$2, If[LessEqual[t, 1.35e-126], t$95$1, If[LessEqual[t, 1.5e-62], N[(x / y), $MachinePrecision], If[LessEqual[t, 1.6e-11], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2 + \frac{2}{z}}{t}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-63}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-62}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (/ x y) (+ -2.0 (* (/ 1.0 t) (+ 2.0 (/ 2.0 z))))))
double code(double x, double y, double z, double t) {
return (x / y) + (-2.0 + ((1.0 / t) * (2.0 + (2.0 / 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) + ((1.0d0 / t) * (2.0d0 + (2.0d0 / z))))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + (-2.0 + ((1.0 / t) * (2.0 + (2.0 / z))));
}
def code(x, y, z, t): return (x / y) + (-2.0 + ((1.0 / t) * (2.0 + (2.0 / z))))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(-2.0 + Float64(Float64(1.0 / t) * Float64(2.0 + Float64(2.0 / z))))) end
function tmp = code(x, y, z, t) tmp = (x / y) + (-2.0 + ((1.0 / t) * (2.0 + (2.0 / z)))); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(N[(1.0 / t), $MachinePrecision] * N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \left(-2 + \frac{1}{t} \cdot \left(2 + \frac{2}{z}\right)\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= z -5.5e-71)
t_1
(if (<= z 4.8e-164)
(/ (/ 2.0 t) z)
(if (<= z 6e+200) t_1 (* 2.0 (/ (- 1.0 t) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (z <= -5.5e-71) {
tmp = t_1;
} else if (z <= 4.8e-164) {
tmp = (2.0 / t) / z;
} else if (z <= 6e+200) {
tmp = t_1;
} else {
tmp = 2.0 * ((1.0 - t) / 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 <= (-5.5d-71)) then
tmp = t_1
else if (z <= 4.8d-164) then
tmp = (2.0d0 / t) / z
else if (z <= 6d+200) then
tmp = t_1
else
tmp = 2.0d0 * ((1.0d0 - t) / 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 <= -5.5e-71) {
tmp = t_1;
} else if (z <= 4.8e-164) {
tmp = (2.0 / t) / z;
} else if (z <= 6e+200) {
tmp = t_1;
} else {
tmp = 2.0 * ((1.0 - t) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if z <= -5.5e-71: tmp = t_1 elif z <= 4.8e-164: tmp = (2.0 / t) / z elif z <= 6e+200: tmp = t_1 else: tmp = 2.0 * ((1.0 - t) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (z <= -5.5e-71) tmp = t_1; elseif (z <= 4.8e-164) tmp = Float64(Float64(2.0 / t) / z); elseif (z <= 6e+200) tmp = t_1; else tmp = Float64(2.0 * Float64(Float64(1.0 - t) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) - 2.0; tmp = 0.0; if (z <= -5.5e-71) tmp = t_1; elseif (z <= 4.8e-164) tmp = (2.0 / t) / z; elseif (z <= 6e+200) tmp = t_1; else tmp = 2.0 * ((1.0 - t) / 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, -5.5e-71], t$95$1, If[LessEqual[z, 4.8e-164], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6e+200], t$95$1, N[(2.0 * N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-164}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+200}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{1 - t}{t}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -0.00072) (not (<= (/ x y) 2.0))) (/ x y) -2.0))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -0.00072) || !((x / y) <= 2.0)) {
tmp = x / y;
} else {
tmp = -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 (((x / y) <= (-0.00072d0)) .or. (.not. ((x / y) <= 2.0d0))) then
tmp = x / y
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -0.00072) || !((x / y) <= 2.0)) {
tmp = x / y;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -0.00072) or not ((x / y) <= 2.0): tmp = x / y else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -0.00072) || !(Float64(x / y) <= 2.0)) tmp = Float64(x / y); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -0.00072) || ~(((x / y) <= 2.0))) tmp = x / y; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -0.00072], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2.0]], $MachinePrecision]], N[(x / y), $MachinePrecision], -2.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -0.00072 \lor \neg \left(\frac{x}{y} \leq 2\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.6e-70) (not (<= z 3.7e-161))) (- (/ x y) 2.0) (/ 2.0 (* z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.6e-70) || !(z <= 3.7e-161)) {
tmp = (x / y) - 2.0;
} else {
tmp = 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 <= (-3.6d-70)) .or. (.not. (z <= 3.7d-161))) then
tmp = (x / y) - 2.0d0
else
tmp = 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 <= -3.6e-70) || !(z <= 3.7e-161)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / (z * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.6e-70) or not (z <= 3.7e-161): tmp = (x / y) - 2.0 else: tmp = 2.0 / (z * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.6e-70) || !(z <= 3.7e-161)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(2.0 / Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.6e-70) || ~((z <= 3.7e-161))) tmp = (x / y) - 2.0; else tmp = 2.0 / (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.6e-70], N[Not[LessEqual[z, 3.7e-161]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-70} \lor \neg \left(z \leq 3.7 \cdot 10^{-161}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.1e-71) (not (<= z 5e-163))) (- (/ x y) 2.0) (/ (/ 2.0 t) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.1e-71) || !(z <= 5e-163)) {
tmp = (x / y) - 2.0;
} else {
tmp = (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 ((z <= (-6.1d-71)) .or. (.not. (z <= 5d-163))) then
tmp = (x / y) - 2.0d0
else
tmp = (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 ((z <= -6.1e-71) || !(z <= 5e-163)) {
tmp = (x / y) - 2.0;
} else {
tmp = (2.0 / t) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.1e-71) or not (z <= 5e-163): tmp = (x / y) - 2.0 else: tmp = (2.0 / t) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.1e-71) || !(z <= 5e-163)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(Float64(2.0 / t) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.1e-71) || ~((z <= 5e-163))) tmp = (x / y) - 2.0; else tmp = (2.0 / t) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.1e-71], N[Not[LessEqual[z, 5e-163]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{-71} \lor \neg \left(z \leq 5 \cdot 10^{-163}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= y -1.06e+200) (/ 1.0 (* t 0.5)) (- (/ x y) 2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.06e+200) {
tmp = 1.0 / (t * 0.5);
} else {
tmp = (x / y) - 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 (y <= (-1.06d+200)) then
tmp = 1.0d0 / (t * 0.5d0)
else
tmp = (x / y) - 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.06e+200) {
tmp = 1.0 / (t * 0.5);
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.06e+200: tmp = 1.0 / (t * 0.5) else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.06e+200) tmp = Float64(1.0 / Float64(t * 0.5)); else tmp = Float64(Float64(x / y) - 2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.06e+200) tmp = 1.0 / (t * 0.5); else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.06e+200], N[(1.0 / N[(t * 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+200}:\\
\;\;\;\;\frac{1}{t \cdot 0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (- (/ x y) 2.0))
double code(double x, double y, double z, double t) {
return (x / y) - 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
end function
public static double code(double x, double y, double z, double t) {
return (x / y) - 2.0;
}
def code(x, y, z, t): return (x / y) - 2.0
function code(x, y, z, t) return Float64(Float64(x / y) - 2.0) end
function tmp = code(x, y, z, t) tmp = (x / y) - 2.0; end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} - 2
\end{array}
(FPCore (x y z t) :precision binary64 -2.0)
double code(double x, double y, double z, double t) {
return -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 = -2.0d0
end function
public static double code(double x, double y, double z, double t) {
return -2.0;
}
def code(x, y, z, t): return -2.0
function code(x, y, z, t) return -2.0 end
function tmp = code(x, y, z, t) tmp = -2.0; end
code[x_, y_, z_, t_] := -2.0
\begin{array}{l}
\\
-2
\end{array}
(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 2023343
(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))))