
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.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 * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.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 * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 -4e+22)
(/ 1.0 (* (/ (+ x 1.0) y) (/ t_1 z)))
(if (<= t_2 5e+236)
t_2
(-
(+ (/ y (* t (+ x 1.0))) (/ x (+ x 1.0)))
(/ x (* t (* z (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -4e+22) {
tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z));
} else if (t_2 <= 5e+236) {
tmp = t_2;
} else {
tmp = ((y / (t * (x + 1.0))) + (x / (x + 1.0))) - (x / (t * (z * (x + 1.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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * t) - x
t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0d0)
if (t_2 <= (-4d+22)) then
tmp = 1.0d0 / (((x + 1.0d0) / y) * (t_1 / z))
else if (t_2 <= 5d+236) then
tmp = t_2
else
tmp = ((y / (t * (x + 1.0d0))) + (x / (x + 1.0d0))) - (x / (t * (z * (x + 1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -4e+22) {
tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z));
} else if (t_2 <= 5e+236) {
tmp = t_2;
} else {
tmp = ((y / (t * (x + 1.0))) + (x / (x + 1.0))) - (x / (t * (z * (x + 1.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -4e+22: tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z)) elif t_2 <= 5e+236: tmp = t_2 else: tmp = ((y / (t * (x + 1.0))) + (x / (x + 1.0))) - (x / (t * (z * (x + 1.0)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -4e+22) tmp = Float64(1.0 / Float64(Float64(Float64(x + 1.0) / y) * Float64(t_1 / z))); elseif (t_2 <= 5e+236) tmp = t_2; else tmp = Float64(Float64(Float64(y / Float64(t * Float64(x + 1.0))) + Float64(x / Float64(x + 1.0))) - Float64(x / Float64(t * Float64(z * Float64(x + 1.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -4e+22) tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z)); elseif (t_2 <= 5e+236) tmp = t_2; else tmp = ((y / (t * (x + 1.0))) + (x / (x + 1.0))) - (x / (t * (z * (x + 1.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+22], N[(1.0 / N[(N[(N[(x + 1.0), $MachinePrecision] / y), $MachinePrecision] * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+236], t$95$2, N[(N[(N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(t * N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t_1}}{x + 1}\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{+22}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{y} \cdot \frac{t_1}{z}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+236}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{t \cdot \left(x + 1\right)} + \frac{x}{x + 1}\right) - \frac{x}{t \cdot \left(z \cdot \left(x + 1\right)\right)}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 -4e+22)
(/ 1.0 (* (/ (+ x 1.0) y) (/ t_1 z)))
(if (<= t_2 5e+236) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -4e+22) {
tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z));
} else if (t_2 <= 5e+236) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * t) - x
t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0d0)
if (t_2 <= (-4d+22)) then
tmp = 1.0d0 / (((x + 1.0d0) / y) * (t_1 / z))
else if (t_2 <= 5d+236) then
tmp = t_2
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -4e+22) {
tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z));
} else if (t_2 <= 5e+236) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -4e+22: tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z)) elif t_2 <= 5e+236: tmp = t_2 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -4e+22) tmp = Float64(1.0 / Float64(Float64(Float64(x + 1.0) / y) * Float64(t_1 / z))); elseif (t_2 <= 5e+236) tmp = t_2; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -4e+22) tmp = 1.0 / (((x + 1.0) / y) * (t_1 / z)); elseif (t_2 <= 5e+236) tmp = t_2; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+22], N[(1.0 / N[(N[(N[(x + 1.0), $MachinePrecision] / y), $MachinePrecision] * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+236], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t_1}}{x + 1}\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{+22}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{y} \cdot \frac{t_1}{z}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+236}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- (+ x 1.0) (/ y (/ x z))) (+ x 1.0))))
(if (<= t -8e-15)
(/ (+ x (/ y t)) (+ x 1.0))
(if (<= t 7.8e-178)
t_1
(if (<= t 2.1e-92)
(* (/ y (+ x 1.0)) (/ z (- (* z t) x)))
(if (<= t 55000000000.0)
t_1
(+ (/ x (+ x 1.0)) (/ (/ y t) (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = ((x + 1.0) - (y / (x / z))) / (x + 1.0);
double tmp;
if (t <= -8e-15) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (t <= 7.8e-178) {
tmp = t_1;
} else if (t <= 2.1e-92) {
tmp = (y / (x + 1.0)) * (z / ((z * t) - x));
} else if (t <= 55000000000.0) {
tmp = t_1;
} else {
tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.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) :: t_1
real(8) :: tmp
t_1 = ((x + 1.0d0) - (y / (x / z))) / (x + 1.0d0)
if (t <= (-8d-15)) then
tmp = (x + (y / t)) / (x + 1.0d0)
else if (t <= 7.8d-178) then
tmp = t_1
else if (t <= 2.1d-92) then
tmp = (y / (x + 1.0d0)) * (z / ((z * t) - x))
else if (t <= 55000000000.0d0) then
tmp = t_1
else
tmp = (x / (x + 1.0d0)) + ((y / t) / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = ((x + 1.0) - (y / (x / z))) / (x + 1.0);
double tmp;
if (t <= -8e-15) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (t <= 7.8e-178) {
tmp = t_1;
} else if (t <= 2.1e-92) {
tmp = (y / (x + 1.0)) * (z / ((z * t) - x));
} else if (t <= 55000000000.0) {
tmp = t_1;
} else {
tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x + 1.0) - (y / (x / z))) / (x + 1.0) tmp = 0 if t <= -8e-15: tmp = (x + (y / t)) / (x + 1.0) elif t <= 7.8e-178: tmp = t_1 elif t <= 2.1e-92: tmp = (y / (x + 1.0)) * (z / ((z * t) - x)) elif t <= 55000000000.0: tmp = t_1 else: tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.0)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x + 1.0) - Float64(y / Float64(x / z))) / Float64(x + 1.0)) tmp = 0.0 if (t <= -8e-15) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); elseif (t <= 7.8e-178) tmp = t_1; elseif (t <= 2.1e-92) tmp = Float64(Float64(y / Float64(x + 1.0)) * Float64(z / Float64(Float64(z * t) - x))); elseif (t <= 55000000000.0) tmp = t_1; else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(Float64(y / t) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x + 1.0) - (y / (x / z))) / (x + 1.0); tmp = 0.0; if (t <= -8e-15) tmp = (x + (y / t)) / (x + 1.0); elseif (t <= 7.8e-178) tmp = t_1; elseif (t <= 2.1e-92) tmp = (y / (x + 1.0)) * (z / ((z * t) - x)); elseif (t <= 55000000000.0) tmp = t_1; else tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x + 1.0), $MachinePrecision] - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e-15], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-178], t$95$1, If[LessEqual[t, 2.1e-92], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 55000000000.0], t$95$1, N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x + 1\right) - \frac{y}{\frac{x}{z}}}{x + 1}\\
\mathbf{if}\;t \leq -8 \cdot 10^{-15}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-92}:\\
\;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}\\
\mathbf{elif}\;t \leq 55000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(if (<= x -3.4e-39)
1.0
(if (<= x 3.5e-78)
(/ y t)
(if (<= x 7.2e-10)
(* x (+ 1.0 (/ -1.0 (* z t))))
(if (<= x 4.8e+137)
(+ 1.0 (/ (+ (/ y t) -1.0) x))
(+ 1.0 (/ -1.0 x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.4e-39) {
tmp = 1.0;
} else if (x <= 3.5e-78) {
tmp = y / t;
} else if (x <= 7.2e-10) {
tmp = x * (1.0 + (-1.0 / (z * t)));
} else if (x <= 4.8e+137) {
tmp = 1.0 + (((y / t) + -1.0) / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
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 <= (-3.4d-39)) then
tmp = 1.0d0
else if (x <= 3.5d-78) then
tmp = y / t
else if (x <= 7.2d-10) then
tmp = x * (1.0d0 + ((-1.0d0) / (z * t)))
else if (x <= 4.8d+137) then
tmp = 1.0d0 + (((y / t) + (-1.0d0)) / x)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.4e-39) {
tmp = 1.0;
} else if (x <= 3.5e-78) {
tmp = y / t;
} else if (x <= 7.2e-10) {
tmp = x * (1.0 + (-1.0 / (z * t)));
} else if (x <= 4.8e+137) {
tmp = 1.0 + (((y / t) + -1.0) / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.4e-39: tmp = 1.0 elif x <= 3.5e-78: tmp = y / t elif x <= 7.2e-10: tmp = x * (1.0 + (-1.0 / (z * t))) elif x <= 4.8e+137: tmp = 1.0 + (((y / t) + -1.0) / x) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.4e-39) tmp = 1.0; elseif (x <= 3.5e-78) tmp = Float64(y / t); elseif (x <= 7.2e-10) tmp = Float64(x * Float64(1.0 + Float64(-1.0 / Float64(z * t)))); elseif (x <= 4.8e+137) tmp = Float64(1.0 + Float64(Float64(Float64(y / t) + -1.0) / x)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.4e-39) tmp = 1.0; elseif (x <= 3.5e-78) tmp = y / t; elseif (x <= 7.2e-10) tmp = x * (1.0 + (-1.0 / (z * t))); elseif (x <= 4.8e+137) tmp = 1.0 + (((y / t) + -1.0) / x); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.4e-39], 1.0, If[LessEqual[x, 3.5e-78], N[(y / t), $MachinePrecision], If[LessEqual[x, 7.2e-10], N[(x * N[(1.0 + N[(-1.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+137], N[(1.0 + N[(N[(N[(y / t), $MachinePrecision] + -1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \left(1 + \frac{-1}{z \cdot t}\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+137}:\\
\;\;\;\;1 + \frac{\frac{y}{t} + -1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e-57) (not (<= z 8.5e-42))) (/ (+ x (/ y t)) (+ x 1.0)) (/ (- x (/ x (- (* z t) x))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-57) || !(z <= 8.5e-42)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x - (x / ((z * t) - x))) / (x + 1.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.7d-57)) .or. (.not. (z <= 8.5d-42))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = (x - (x / ((z * t) - x))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-57) || !(z <= 8.5e-42)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x - (x / ((z * t) - x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.7e-57) or not (z <= 8.5e-42): tmp = (x + (y / t)) / (x + 1.0) else: tmp = (x - (x / ((z * t) - x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.7e-57) || !(z <= 8.5e-42)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(x - Float64(x / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.7e-57) || ~((z <= 8.5e-42))) tmp = (x + (y / t)) / (x + 1.0); else tmp = (x - (x / ((z * t) - x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-57], N[Not[LessEqual[z, 8.5e-42]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(x / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-57} \lor \neg \left(z \leq 8.5 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x -7e-39) 1.0 (+ (/ x (+ x 1.0)) (/ (/ y t) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e-39) {
tmp = 1.0;
} else {
tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.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 <= (-7d-39)) then
tmp = 1.0d0
else
tmp = (x / (x + 1.0d0)) + ((y / t) / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e-39) {
tmp = 1.0;
} else {
tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7e-39: tmp = 1.0 else: tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7e-39) tmp = 1.0; else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(Float64(y / t) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7e-39) tmp = 1.0; else tmp = (x / (x + 1.0)) + ((y / t) / (x + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7e-39], 1.0, N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x -3.9e-39) 1.0 (if (<= x 3.3e-83) (/ y t) (/ 1.0 (/ (+ x 1.0) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e-39) {
tmp = 1.0;
} else if (x <= 3.3e-83) {
tmp = y / t;
} else {
tmp = 1.0 / ((x + 1.0) / x);
}
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 <= (-3.9d-39)) then
tmp = 1.0d0
else if (x <= 3.3d-83) then
tmp = y / t
else
tmp = 1.0d0 / ((x + 1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e-39) {
tmp = 1.0;
} else if (x <= 3.3e-83) {
tmp = y / t;
} else {
tmp = 1.0 / ((x + 1.0) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.9e-39: tmp = 1.0 elif x <= 3.3e-83: tmp = y / t else: tmp = 1.0 / ((x + 1.0) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.9e-39) tmp = 1.0; elseif (x <= 3.3e-83) tmp = Float64(y / t); else tmp = Float64(1.0 / Float64(Float64(x + 1.0) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.9e-39) tmp = 1.0; elseif (x <= 3.3e-83) tmp = y / t; else tmp = 1.0 / ((x + 1.0) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.9e-39], 1.0, If[LessEqual[x, 3.3e-83], N[(y / t), $MachinePrecision], N[(1.0 / N[(N[(x + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{x}}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x -7e-39) 1.0 (/ (+ x (/ y t)) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e-39) {
tmp = 1.0;
} else {
tmp = (x + (y / t)) / (x + 1.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 <= (-7d-39)) then
tmp = 1.0d0
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e-39) {
tmp = 1.0;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7e-39: tmp = 1.0 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7e-39) tmp = 1.0; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7e-39) tmp = 1.0; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7e-39], 1.0, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x -3.9e-39) 1.0 (if (<= x 3.3e-82) (/ y t) (/ x (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e-39) {
tmp = 1.0;
} else if (x <= 3.3e-82) {
tmp = y / t;
} else {
tmp = x / (x + 1.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 <= (-3.9d-39)) then
tmp = 1.0d0
else if (x <= 3.3d-82) then
tmp = y / t
else
tmp = x / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e-39) {
tmp = 1.0;
} else if (x <= 3.3e-82) {
tmp = y / t;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.9e-39: tmp = 1.0 elif x <= 3.3e-82: tmp = y / t else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.9e-39) tmp = 1.0; elseif (x <= 3.3e-82) tmp = Float64(y / t); else tmp = Float64(x / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.9e-39) tmp = 1.0; elseif (x <= 3.3e-82) tmp = y / t; else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.9e-39], 1.0, If[LessEqual[x, 3.3e-82], N[(y / t), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-82}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x -3.5e-39) 1.0 (if (<= x 1.8e-61) (/ y t) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.5e-39) {
tmp = 1.0;
} else if (x <= 1.8e-61) {
tmp = y / t;
} else {
tmp = 1.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 <= (-3.5d-39)) then
tmp = 1.0d0
else if (x <= 1.8d-61) then
tmp = y / t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.5e-39) {
tmp = 1.0;
} else if (x <= 1.8e-61) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.5e-39: tmp = 1.0 elif x <= 1.8e-61: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.5e-39) tmp = 1.0; elseif (x <= 1.8e-61) tmp = Float64(y / t); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.5e-39) tmp = 1.0; elseif (x <= 1.8e-61) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.5e-39], 1.0, If[LessEqual[x, 1.8e-61], N[(y / t), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.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 = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
(FPCore (x y z t) :precision binary64 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.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 / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
def code(x, y, z, t): return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}
herbie shell --seed 2023350
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))