
(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 12 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 (+ (+ (/ x y) (/ (+ 2.0 (/ 2.0 z)) t)) -2.0))
double code(double x, double y, double z, double t) {
return ((x / y) + ((2.0 + (2.0 / z)) / 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 + (2.0d0 / z)) / t)) + (-2.0d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x / y) + ((2.0 + (2.0 / z)) / t)) + -2.0;
}
def code(x, y, z, t): return ((x / y) + ((2.0 + (2.0 / z)) / t)) + -2.0
function code(x, y, z, t) return Float64(Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(2.0 / z)) / t)) + -2.0) end
function tmp = code(x, y, z, t) tmp = ((x / y) + ((2.0 + (2.0 / z)) / t)) + -2.0; end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{x}{y} + \frac{2 + \frac{2}{z}}{t}\right) + -2
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ (/ 2.0 t) z))))
(if (<= (/ x y) -0.016)
t_1
(if (<= (/ x y) 5.2e-177)
(+ (/ 2.0 t) -2.0)
(if (<= (/ x y) 1.55e-8) (+ (/ 2.0 (* z t)) -2.0) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 / t) / z);
double tmp;
if ((x / y) <= -0.016) {
tmp = t_1;
} else if ((x / y) <= 5.2e-177) {
tmp = (2.0 / t) + -2.0;
} else if ((x / y) <= 1.55e-8) {
tmp = (2.0 / (z * t)) + -2.0;
} else {
tmp = t_1;
}
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) <= (-0.016d0)) then
tmp = t_1
else if ((x / y) <= 5.2d-177) then
tmp = (2.0d0 / t) + (-2.0d0)
else if ((x / y) <= 1.55d-8) then
tmp = (2.0d0 / (z * t)) + (-2.0d0)
else
tmp = t_1
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) <= -0.016) {
tmp = t_1;
} else if ((x / y) <= 5.2e-177) {
tmp = (2.0 / t) + -2.0;
} else if ((x / y) <= 1.55e-8) {
tmp = (2.0 / (z * t)) + -2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + ((2.0 / t) / z) tmp = 0 if (x / y) <= -0.016: tmp = t_1 elif (x / y) <= 5.2e-177: tmp = (2.0 / t) + -2.0 elif (x / y) <= 1.55e-8: tmp = (2.0 / (z * t)) + -2.0 else: tmp = t_1 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) <= -0.016) tmp = t_1; elseif (Float64(x / y) <= 5.2e-177) tmp = Float64(Float64(2.0 / t) + -2.0); elseif (Float64(x / y) <= 1.55e-8) tmp = Float64(Float64(2.0 / Float64(z * t)) + -2.0); else tmp = t_1; 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) <= -0.016) tmp = t_1; elseif ((x / y) <= 5.2e-177) tmp = (2.0 / t) + -2.0; elseif ((x / y) <= 1.55e-8) tmp = (2.0 / (z * t)) + -2.0; else tmp = t_1; 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], -0.016], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 5.2e-177], N[(N[(2.0 / t), $MachinePrecision] + -2.0), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1.55e-8], N[(N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{\frac{2}{t}}{z}\\
\mathbf{if}\;\frac{x}{y} \leq -0.016:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 5.2 \cdot 10^{-177}:\\
\;\;\;\;\frac{2}{t} + -2\\
\mathbf{elif}\;\frac{x}{y} \leq 1.55 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{z \cdot t} + -2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) -2.0)))
(if (<= (/ x y) -0.0022)
t_1
(if (<= (/ x y) 6.2e-179)
(+ (/ 2.0 t) -2.0)
(if (<= (/ x y) 7e+51) (+ (/ 2.0 (* z t)) -2.0) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + -2.0;
double tmp;
if ((x / y) <= -0.0022) {
tmp = t_1;
} else if ((x / y) <= 6.2e-179) {
tmp = (2.0 / t) + -2.0;
} else if ((x / y) <= 7e+51) {
tmp = (2.0 / (z * t)) + -2.0;
} else {
tmp = t_1;
}
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 ((x / y) <= (-0.0022d0)) then
tmp = t_1
else if ((x / y) <= 6.2d-179) then
tmp = (2.0d0 / t) + (-2.0d0)
else if ((x / y) <= 7d+51) then
tmp = (2.0d0 / (z * t)) + (-2.0d0)
else
tmp = t_1
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 ((x / y) <= -0.0022) {
tmp = t_1;
} else if ((x / y) <= 6.2e-179) {
tmp = (2.0 / t) + -2.0;
} else if ((x / y) <= 7e+51) {
tmp = (2.0 / (z * t)) + -2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + -2.0 tmp = 0 if (x / y) <= -0.0022: tmp = t_1 elif (x / y) <= 6.2e-179: tmp = (2.0 / t) + -2.0 elif (x / y) <= 7e+51: tmp = (2.0 / (z * t)) + -2.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + -2.0) tmp = 0.0 if (Float64(x / y) <= -0.0022) tmp = t_1; elseif (Float64(x / y) <= 6.2e-179) tmp = Float64(Float64(2.0 / t) + -2.0); elseif (Float64(x / y) <= 7e+51) tmp = Float64(Float64(2.0 / Float64(z * t)) + -2.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + -2.0; tmp = 0.0; if ((x / y) <= -0.0022) tmp = t_1; elseif ((x / y) <= 6.2e-179) tmp = (2.0 / t) + -2.0; elseif ((x / y) <= 7e+51) tmp = (2.0 / (z * t)) + -2.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -0.0022], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 6.2e-179], N[(N[(2.0 / t), $MachinePrecision] + -2.0), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 7e+51], N[(N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + -2\\
\mathbf{if}\;\frac{x}{y} \leq -0.0022:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 6.2 \cdot 10^{-179}:\\
\;\;\;\;\frac{2}{t} + -2\\
\mathbf{elif}\;\frac{x}{y} \leq 7 \cdot 10^{+51}:\\
\;\;\;\;\frac{2}{z \cdot t} + -2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 5.2e-32))) (+ (+ (/ x y) (/ 2.0 t)) -2.0) (+ (+ (/ 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 <= 5.2e-32)) {
tmp = ((x / y) + (2.0 / t)) + -2.0;
} 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 <= 5.2d-32))) then
tmp = ((x / y) + (2.0d0 / t)) + (-2.0d0)
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 <= 5.2e-32)) {
tmp = ((x / y) + (2.0 / t)) + -2.0;
} 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 <= 5.2e-32): tmp = ((x / y) + (2.0 / t)) + -2.0 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 <= 5.2e-32)) tmp = Float64(Float64(Float64(x / y) + Float64(2.0 / t)) + -2.0); else tmp = Float64(Float64(Float64(x / y) + Float64(Float64(2.0 / z) / t)) + -2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 5.2e-32))) tmp = ((x / y) + (2.0 / t)) + -2.0; 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, 5.2e-32]], $MachinePrecision]], N[(N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 5.2 \cdot 10^{-32}\right):\\
\;\;\;\;\left(\frac{x}{y} + \frac{2}{t}\right) + -2\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{y} + \frac{\frac{2}{z}}{t}\right) + -2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -21.0) (not (<= (/ x y) 2e+45))) (/ x y) (+ (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -21.0) || !((x / y) <= 2e+45)) {
tmp = x / y;
} else {
tmp = (2.0 / 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 (((x / y) <= (-21.0d0)) .or. (.not. ((x / y) <= 2d+45))) then
tmp = x / y
else
tmp = (2.0d0 / t) + (-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) <= -21.0) || !((x / y) <= 2e+45)) {
tmp = x / y;
} else {
tmp = (2.0 / t) + -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -21.0) or not ((x / y) <= 2e+45): tmp = x / y else: tmp = (2.0 / t) + -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -21.0) || !(Float64(x / y) <= 2e+45)) tmp = Float64(x / y); else tmp = Float64(Float64(2.0 / t) + -2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -21.0) || ~(((x / y) <= 2e+45))) tmp = x / y; else tmp = (2.0 / t) + -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -21.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e+45]], $MachinePrecision]], N[(x / y), $MachinePrecision], N[(N[(2.0 / t), $MachinePrecision] + -2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -21 \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{+45}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t} + -2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -5.6e-5) (not (<= (/ x y) 2e+45))) (+ (/ x y) -2.0) (+ (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5.6e-5) || !((x / y) <= 2e+45)) {
tmp = (x / y) + -2.0;
} else {
tmp = (2.0 / 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 (((x / y) <= (-5.6d-5)) .or. (.not. ((x / y) <= 2d+45))) then
tmp = (x / y) + (-2.0d0)
else
tmp = (2.0d0 / t) + (-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) <= -5.6e-5) || !((x / y) <= 2e+45)) {
tmp = (x / y) + -2.0;
} else {
tmp = (2.0 / t) + -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5.6e-5) or not ((x / y) <= 2e+45): tmp = (x / y) + -2.0 else: tmp = (2.0 / t) + -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5.6e-5) || !(Float64(x / y) <= 2e+45)) tmp = Float64(Float64(x / y) + -2.0); else tmp = Float64(Float64(2.0 / t) + -2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -5.6e-5) || ~(((x / y) <= 2e+45))) tmp = (x / y) + -2.0; else tmp = (2.0 / t) + -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5.6e-5], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e+45]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(2.0 / t), $MachinePrecision] + -2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5.6 \cdot 10^{-5} \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{+45}\right):\\
\;\;\;\;\frac{x}{y} + -2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t} + -2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= z -0.00019) (not (<= z 2.9e-46))) (+ (+ (/ x y) (/ 2.0 t)) -2.0) (+ (/ x y) (/ (/ 2.0 t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.00019) || !(z <= 2.9e-46)) {
tmp = ((x / y) + (2.0 / t)) + -2.0;
} else {
tmp = (x / y) + ((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 <= (-0.00019d0)) .or. (.not. (z <= 2.9d-46))) then
tmp = ((x / y) + (2.0d0 / t)) + (-2.0d0)
else
tmp = (x / y) + ((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 <= -0.00019) || !(z <= 2.9e-46)) {
tmp = ((x / y) + (2.0 / t)) + -2.0;
} else {
tmp = (x / y) + ((2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -0.00019) or not (z <= 2.9e-46): tmp = ((x / y) + (2.0 / t)) + -2.0 else: tmp = (x / y) + ((2.0 / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -0.00019) || !(z <= 2.9e-46)) tmp = Float64(Float64(Float64(x / y) + Float64(2.0 / t)) + -2.0); else tmp = Float64(Float64(x / y) + Float64(Float64(2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -0.00019) || ~((z <= 2.9e-46))) tmp = ((x / y) + (2.0 / t)) + -2.0; else tmp = (x / y) + ((2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.00019], N[Not[LessEqual[z, 2.9e-46]], $MachinePrecision]], N[(N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00019 \lor \neg \left(z \leq 2.9 \cdot 10^{-46}\right):\\
\;\;\;\;\left(\frac{x}{y} + \frac{2}{t}\right) + -2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(if (<= z -1.4e+129)
(+ (/ 2.0 t) -2.0)
(if (or (<= z -2e-213) (not (<= z 3.3e-67)))
(+ (/ x y) -2.0)
(/ (/ 2.0 z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.4e+129) {
tmp = (2.0 / t) + -2.0;
} else if ((z <= -2e-213) || !(z <= 3.3e-67)) {
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 <= (-1.4d+129)) then
tmp = (2.0d0 / t) + (-2.0d0)
else if ((z <= (-2d-213)) .or. (.not. (z <= 3.3d-67))) 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 <= -1.4e+129) {
tmp = (2.0 / t) + -2.0;
} else if ((z <= -2e-213) || !(z <= 3.3e-67)) {
tmp = (x / y) + -2.0;
} else {
tmp = (2.0 / z) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.4e+129: tmp = (2.0 / t) + -2.0 elif (z <= -2e-213) or not (z <= 3.3e-67): tmp = (x / y) + -2.0 else: tmp = (2.0 / z) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.4e+129) tmp = Float64(Float64(2.0 / t) + -2.0); elseif ((z <= -2e-213) || !(z <= 3.3e-67)) tmp = Float64(Float64(x / y) + -2.0); else tmp = Float64(Float64(2.0 / z) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.4e+129) tmp = (2.0 / t) + -2.0; elseif ((z <= -2e-213) || ~((z <= 3.3e-67))) tmp = (x / y) + -2.0; else tmp = (2.0 / z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.4e+129], N[(N[(2.0 / t), $MachinePrecision] + -2.0), $MachinePrecision], If[Or[LessEqual[z, -2e-213], N[Not[LessEqual[z, 3.3e-67]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+129}:\\
\;\;\;\;\frac{2}{t} + -2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-213} \lor \neg \left(z \leq 3.3 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{x}{y} + -2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{z}}{t}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -5.4e-5) (not (<= (/ x y) 1.05e-7))) (/ x y) -2.0))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5.4e-5) || !((x / y) <= 1.05e-7)) {
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) <= (-5.4d-5)) .or. (.not. ((x / y) <= 1.05d-7))) 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) <= -5.4e-5) || !((x / y) <= 1.05e-7)) {
tmp = x / y;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5.4e-5) or not ((x / y) <= 1.05e-7): tmp = x / y else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5.4e-5) || !(Float64(x / y) <= 1.05e-7)) 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) <= -5.4e-5) || ~(((x / y) <= 1.05e-7))) tmp = x / y; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5.4e-5], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1.05e-7]], $MachinePrecision]], N[(x / y), $MachinePrecision], -2.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5.4 \cdot 10^{-5} \lor \neg \left(\frac{x}{y} \leq 1.05 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -0.000112) (not (<= t 3e-25))) (+ (/ x y) -2.0) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.000112) || !(t <= 3e-25)) {
tmp = (x / y) + -2.0;
} else {
tmp = (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 ((t <= (-0.000112d0)) .or. (.not. (t <= 3d-25))) then
tmp = (x / y) + (-2.0d0)
else
tmp = (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 ((t <= -0.000112) || !(t <= 3e-25)) {
tmp = (x / y) + -2.0;
} else {
tmp = (2.0 + (2.0 / z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.000112) or not (t <= 3e-25): tmp = (x / y) + -2.0 else: tmp = (2.0 + (2.0 / z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -0.000112) || !(t <= 3e-25)) tmp = Float64(Float64(x / y) + -2.0); else tmp = 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 ((t <= -0.000112) || ~((t <= 3e-25))) tmp = (x / y) + -2.0; else tmp = (2.0 + (2.0 / z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -0.000112], N[Not[LessEqual[t, 3e-25]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.000112 \lor \neg \left(t \leq 3 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{x}{y} + -2\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= t -1.0) -2.0 (if (<= t 1.0) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.0) {
tmp = -2.0;
} else if (t <= 1.0) {
tmp = 2.0 / t;
} 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 (t <= (-1.0d0)) then
tmp = -2.0d0
else if (t <= 1.0d0) then
tmp = 2.0d0 / t
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 (t <= -1.0) {
tmp = -2.0;
} else if (t <= 1.0) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.0: tmp = -2.0 elif t <= 1.0: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.0) tmp = -2.0; elseif (t <= 1.0) tmp = Float64(2.0 / t); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.0) tmp = -2.0; elseif (t <= 1.0) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.0], -2.0, If[LessEqual[t, 1.0], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\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 2023350
(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))))