
(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 18 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)))
(if (<= t -14200000.0)
(- t_1 (/ (/ -2.0 t) z))
(if (<= t 8.4e-29)
(/ (+ (+ 2.0 (/ 2.0 z)) (/ (* x t) y)) t)
(+ t_1 (/ (/ 2.0 z) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + -2.0;
double tmp;
if (t <= -14200000.0) {
tmp = t_1 - ((-2.0 / t) / z);
} else if (t <= 8.4e-29) {
tmp = ((2.0 + (2.0 / z)) + ((x * t) / y)) / t;
} else {
tmp = t_1 + ((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) :: t_1
real(8) :: tmp
t_1 = (x / y) + (-2.0d0)
if (t <= (-14200000.0d0)) then
tmp = t_1 - (((-2.0d0) / t) / z)
else if (t <= 8.4d-29) then
tmp = ((2.0d0 + (2.0d0 / z)) + ((x * t) / y)) / t
else
tmp = t_1 + ((2.0d0 / z) / 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 (t <= -14200000.0) {
tmp = t_1 - ((-2.0 / t) / z);
} else if (t <= 8.4e-29) {
tmp = ((2.0 + (2.0 / z)) + ((x * t) / y)) / t;
} else {
tmp = t_1 + ((2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + -2.0 tmp = 0 if t <= -14200000.0: tmp = t_1 - ((-2.0 / t) / z) elif t <= 8.4e-29: tmp = ((2.0 + (2.0 / z)) + ((x * t) / y)) / t else: tmp = t_1 + ((2.0 / z) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + -2.0) tmp = 0.0 if (t <= -14200000.0) tmp = Float64(t_1 - Float64(Float64(-2.0 / t) / z)); elseif (t <= 8.4e-29) tmp = Float64(Float64(Float64(2.0 + Float64(2.0 / z)) + Float64(Float64(x * t) / y)) / t); else tmp = Float64(t_1 + Float64(Float64(2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + -2.0; tmp = 0.0; if (t <= -14200000.0) tmp = t_1 - ((-2.0 / t) / z); elseif (t <= 8.4e-29) tmp = ((2.0 + (2.0 / z)) + ((x * t) / y)) / t; else tmp = t_1 + ((2.0 / z) / 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[t, -14200000.0], N[(t$95$1 - N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.4e-29], N[(N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(t$95$1 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + -2\\
\mathbf{if}\;t \leq -14200000:\\
\;\;\;\;t\_1 - \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{-29}:\\
\;\;\;\;\frac{\left(2 + \frac{2}{z}\right) + \frac{x \cdot t}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{\frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -1.42e7Initial program 78.5%
Taylor expanded in t around 0 86.0%
associate-+r+86.0%
associate-*r/86.0%
metadata-eval86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around 0 86.0%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l/99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
associate-/l/99.8%
associate-/r*100.0%
frac-2neg100.0%
distribute-frac-neg2100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Applied egg-rr100.0%
if -1.42e7 < t < 8.39999999999999958e-29Initial program 97.4%
Taylor expanded in t around 0 98.3%
associate-+r+98.3%
associate-*r/98.3%
metadata-eval98.3%
sub-neg98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in x around inf 99.3%
if 8.39999999999999958e-29 < t Initial program 82.6%
Taylor expanded in t around 0 90.4%
associate-+r+90.4%
associate-*r/90.4%
metadata-eval90.4%
sub-neg90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in z around 0 90.4%
Taylor expanded in z around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-/l/100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ (+ 2.0 (* (- 1.0 t) (* 2.0 z))) (* z t)))))
(if (<= t_1 2e+305)
t_1
(/ (+ x (* y (+ (* 2.0 (/ (- 1.0 t) t)) (* 2.0 (/ 1.0 (* z t)))))) y))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t));
double tmp;
if (t_1 <= 2e+305) {
tmp = t_1;
} else {
tmp = (x + (y * ((2.0 * ((1.0 - t) / t)) + (2.0 * (1.0 / (z * t)))))) / y;
}
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 + ((1.0d0 - t) * (2.0d0 * z))) / (z * t))
if (t_1 <= 2d+305) then
tmp = t_1
else
tmp = (x + (y * ((2.0d0 * ((1.0d0 - t) / t)) + (2.0d0 * (1.0d0 / (z * t)))))) / y
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 + ((1.0 - t) * (2.0 * z))) / (z * t));
double tmp;
if (t_1 <= 2e+305) {
tmp = t_1;
} else {
tmp = (x + (y * ((2.0 * ((1.0 - t) / t)) + (2.0 * (1.0 / (z * t)))))) / y;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t)) tmp = 0 if t_1 <= 2e+305: tmp = t_1 else: tmp = (x + (y * ((2.0 * ((1.0 - t) / t)) + (2.0 * (1.0 / (z * t)))))) / y return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(1.0 - t) * Float64(2.0 * z))) / Float64(z * t))) tmp = 0.0 if (t_1 <= 2e+305) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(Float64(2.0 * Float64(Float64(1.0 - t) / t)) + Float64(2.0 * Float64(1.0 / Float64(z * t)))))) / y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t)); tmp = 0.0; if (t_1 <= 2e+305) tmp = t_1; else tmp = (x + (y * ((2.0 * ((1.0 - t) / t)) + (2.0 * (1.0 / (z * t)))))) / y; 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[(1.0 - t), $MachinePrecision] * N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+305], t$95$1, N[(N[(x + N[(y * N[(N[(2.0 * N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(1.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2 + \left(1 - t\right) \cdot \left(2 \cdot z\right)}{z \cdot t}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+305}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(2 \cdot \frac{1 - t}{t} + 2 \cdot \frac{1}{z \cdot t}\right)}{y}\\
\end{array}
\end{array}
if (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) < 1.9999999999999999e305Initial program 99.8%
if 1.9999999999999999e305 < (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) Initial program 49.1%
Taylor expanded in y around 0 98.2%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (/ (+ 2.0 (* (- 1.0 t) (* 2.0 z))) (* z t))))) (if (<= t_1 INFINITY) t_1 (/ (+ x (* y (+ -2.0 (/ 2.0 t)))) y))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x + (y * (-2.0 + (2.0 / t)))) / y;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x + (y * (-2.0 + (2.0 / t)))) / y;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x + (y * (-2.0 + (2.0 / t)))) / y return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(1.0 - t) * Float64(2.0 * z))) / Float64(z * t))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(-2.0 + Float64(2.0 / t)))) / y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (z * t)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x + (y * (-2.0 + (2.0 / t)))) / y; 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[(1.0 - t), $MachinePrecision] * N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x + N[(y * N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2 + \left(1 - t\right) \cdot \left(2 \cdot z\right)}{z \cdot t}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(-2 + \frac{2}{t}\right)}{y}\\
\end{array}
\end{array}
if (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) < +inf.0Initial program 99.8%
if +inf.0 < (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) Initial program 0.0%
Taylor expanded in z around inf 92.9%
div-sub92.9%
sub-neg92.9%
*-inverses92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in y around 0 92.9%
*-commutative92.9%
sub-neg92.9%
metadata-eval92.9%
associate-*l*92.9%
*-commutative92.9%
distribute-lft-in92.9%
metadata-eval92.9%
associate-*r/92.9%
metadata-eval92.9%
+-commutative92.9%
Simplified92.9%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= t -1.5e+35)
t_1
(if (<= t -6e-29)
(/ (/ 2.0 t) z)
(if (<= t -9.8e-164)
(+ (/ x y) (/ 2.0 t))
(if (<= t 3.5e-64) (/ 2.0 (* z t)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (t <= -1.5e+35) {
tmp = t_1;
} else if (t <= -6e-29) {
tmp = (2.0 / t) / z;
} else if (t <= -9.8e-164) {
tmp = (x / y) + (2.0 / t);
} else if (t <= 3.5e-64) {
tmp = 2.0 / (z * t);
} 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 (t <= (-1.5d+35)) then
tmp = t_1
else if (t <= (-6d-29)) then
tmp = (2.0d0 / t) / z
else if (t <= (-9.8d-164)) then
tmp = (x / y) + (2.0d0 / t)
else if (t <= 3.5d-64) then
tmp = 2.0d0 / (z * t)
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 (t <= -1.5e+35) {
tmp = t_1;
} else if (t <= -6e-29) {
tmp = (2.0 / t) / z;
} else if (t <= -9.8e-164) {
tmp = (x / y) + (2.0 / t);
} else if (t <= 3.5e-64) {
tmp = 2.0 / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if t <= -1.5e+35: tmp = t_1 elif t <= -6e-29: tmp = (2.0 / t) / z elif t <= -9.8e-164: tmp = (x / y) + (2.0 / t) elif t <= 3.5e-64: tmp = 2.0 / (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (t <= -1.5e+35) tmp = t_1; elseif (t <= -6e-29) tmp = Float64(Float64(2.0 / t) / z); elseif (t <= -9.8e-164) tmp = Float64(Float64(x / y) + Float64(2.0 / t)); elseif (t <= 3.5e-64) tmp = Float64(2.0 / Float64(z * t)); 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 (t <= -1.5e+35) tmp = t_1; elseif (t <= -6e-29) tmp = (2.0 / t) / z; elseif (t <= -9.8e-164) tmp = (x / y) + (2.0 / t); elseif (t <= 3.5e-64) tmp = 2.0 / (z * t); 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[t, -1.5e+35], t$95$1, If[LessEqual[t, -6e-29], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -9.8e-164], N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-64], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-164}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.49999999999999995e35 or 3.5000000000000003e-64 < t Initial program 81.0%
Taylor expanded in t around inf 82.0%
if -1.49999999999999995e35 < t < -6.0000000000000005e-29Initial program 99.3%
Taylor expanded in z around 0 63.9%
associate-/r*64.2%
div-inv63.8%
Applied egg-rr63.8%
un-div-inv64.2%
Applied egg-rr64.2%
if -6.0000000000000005e-29 < t < -9.7999999999999993e-164Initial program 99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in z around inf 65.3%
+-commutative65.3%
associate-*r/65.3%
metadata-eval65.3%
Simplified65.3%
if -9.7999999999999993e-164 < t < 3.5000000000000003e-64Initial program 95.8%
Taylor expanded in z around 0 58.2%
Final simplification71.8%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1e+16) (not (<= (/ x y) 4e-19))) (+ (/ x y) (/ 2.0 (* z t))) (+ -2.0 (/ (/ 2.0 z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1e+16) || !((x / y) <= 4e-19)) {
tmp = (x / y) + (2.0 / (z * t));
} 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 (((x / y) <= (-1d+16)) .or. (.not. ((x / y) <= 4d-19))) then
tmp = (x / y) + (2.0d0 / (z * t))
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 (((x / y) <= -1e+16) || !((x / y) <= 4e-19)) {
tmp = (x / y) + (2.0 / (z * t));
} else {
tmp = -2.0 + ((2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1e+16) or not ((x / y) <= 4e-19): tmp = (x / y) + (2.0 / (z * t)) else: tmp = -2.0 + ((2.0 / z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -1e+16) || !(Float64(x / y) <= 4e-19)) tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))); else tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -1e+16) || ~(((x / y) <= 4e-19))) tmp = (x / y) + (2.0 / (z * t)); else tmp = -2.0 + ((2.0 / z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -1e+16], N[Not[LessEqual[N[(x / y), $MachinePrecision], 4e-19]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+16} \lor \neg \left(\frac{x}{y} \leq 4 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1e16 or 3.9999999999999999e-19 < (/.f64 x y) Initial program 90.3%
Taylor expanded in z around 0 89.2%
if -1e16 < (/.f64 x y) < 3.9999999999999999e-19Initial program 87.6%
Taylor expanded in t around 0 99.9%
associate-+r+99.9%
associate-*r/99.9%
metadata-eval99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.6%
Taylor expanded in z around inf 79.7%
associate--l+79.7%
associate-*r/79.7%
metadata-eval79.7%
associate-/l/79.6%
sub-neg79.6%
metadata-eval79.6%
Simplified79.6%
Taylor expanded in x around 0 79.1%
Final simplification84.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) -2.0)))
(if (<= t -14200000.0)
(- t_1 (/ (/ -2.0 t) z))
(if (<= t 8.4e-29)
(+ (/ x y) (/ (+ 2.0 (* 2.0 z)) (* z t)))
(+ t_1 (/ (/ 2.0 z) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + -2.0;
double tmp;
if (t <= -14200000.0) {
tmp = t_1 - ((-2.0 / t) / z);
} else if (t <= 8.4e-29) {
tmp = (x / y) + ((2.0 + (2.0 * z)) / (z * t));
} else {
tmp = t_1 + ((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) :: t_1
real(8) :: tmp
t_1 = (x / y) + (-2.0d0)
if (t <= (-14200000.0d0)) then
tmp = t_1 - (((-2.0d0) / t) / z)
else if (t <= 8.4d-29) then
tmp = (x / y) + ((2.0d0 + (2.0d0 * z)) / (z * t))
else
tmp = t_1 + ((2.0d0 / z) / 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 (t <= -14200000.0) {
tmp = t_1 - ((-2.0 / t) / z);
} else if (t <= 8.4e-29) {
tmp = (x / y) + ((2.0 + (2.0 * z)) / (z * t));
} else {
tmp = t_1 + ((2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + -2.0 tmp = 0 if t <= -14200000.0: tmp = t_1 - ((-2.0 / t) / z) elif t <= 8.4e-29: tmp = (x / y) + ((2.0 + (2.0 * z)) / (z * t)) else: tmp = t_1 + ((2.0 / z) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + -2.0) tmp = 0.0 if (t <= -14200000.0) tmp = Float64(t_1 - Float64(Float64(-2.0 / t) / z)); elseif (t <= 8.4e-29) tmp = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(2.0 * z)) / Float64(z * t))); else tmp = Float64(t_1 + Float64(Float64(2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + -2.0; tmp = 0.0; if (t <= -14200000.0) tmp = t_1 - ((-2.0 / t) / z); elseif (t <= 8.4e-29) tmp = (x / y) + ((2.0 + (2.0 * z)) / (z * t)); else tmp = t_1 + ((2.0 / z) / 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[t, -14200000.0], N[(t$95$1 - N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.4e-29], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(2.0 * z), $MachinePrecision]), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + -2\\
\mathbf{if}\;t \leq -14200000:\\
\;\;\;\;t\_1 - \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{y} + \frac{2 + 2 \cdot z}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{\frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -1.42e7Initial program 78.5%
Taylor expanded in t around 0 86.0%
associate-+r+86.0%
associate-*r/86.0%
metadata-eval86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around 0 86.0%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l/99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
associate-/l/99.8%
associate-/r*100.0%
frac-2neg100.0%
distribute-frac-neg2100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Applied egg-rr100.0%
if -1.42e7 < t < 8.39999999999999958e-29Initial program 97.4%
Taylor expanded in t around 0 96.9%
if 8.39999999999999958e-29 < t Initial program 82.6%
Taylor expanded in t around 0 90.4%
associate-+r+90.4%
associate-*r/90.4%
metadata-eval90.4%
sub-neg90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in z around 0 90.4%
Taylor expanded in z around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-/l/100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -1e+16)
(+ (/ x y) (/ 2.0 (* z t)))
(if (<= (/ x y) 4e-19)
(+ -2.0 (/ (/ 2.0 z) t))
(- (/ x y) (/ (/ -2.0 z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1e+16) {
tmp = (x / y) + (2.0 / (z * t));
} else if ((x / y) <= 4e-19) {
tmp = -2.0 + ((2.0 / z) / 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 ((x / y) <= (-1d+16)) then
tmp = (x / y) + (2.0d0 / (z * t))
else if ((x / y) <= 4d-19) then
tmp = (-2.0d0) + ((2.0d0 / z) / 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 ((x / y) <= -1e+16) {
tmp = (x / y) + (2.0 / (z * t));
} else if ((x / y) <= 4e-19) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = (x / y) - ((-2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -1e+16: tmp = (x / y) + (2.0 / (z * t)) elif (x / y) <= 4e-19: tmp = -2.0 + ((2.0 / z) / t) else: tmp = (x / y) - ((-2.0 / z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -1e+16) tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))); elseif (Float64(x / y) <= 4e-19) tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); else tmp = Float64(Float64(x / y) - Float64(Float64(-2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -1e+16) tmp = (x / y) + (2.0 / (z * t)); elseif ((x / y) <= 4e-19) tmp = -2.0 + ((2.0 / z) / t); else tmp = (x / y) - ((-2.0 / z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -1e+16], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 4e-19], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-19}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - \frac{\frac{-2}{z}}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1e16Initial program 92.8%
Taylor expanded in z around 0 91.9%
if -1e16 < (/.f64 x y) < 3.9999999999999999e-19Initial program 87.6%
Taylor expanded in t around 0 99.9%
associate-+r+99.9%
associate-*r/99.9%
metadata-eval99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.6%
Taylor expanded in z around inf 79.7%
associate--l+79.7%
associate-*r/79.7%
metadata-eval79.7%
associate-/l/79.6%
sub-neg79.6%
metadata-eval79.6%
Simplified79.6%
Taylor expanded in x around 0 79.1%
if 3.9999999999999999e-19 < (/.f64 x y) Initial program 88.2%
Taylor expanded in z around 0 87.0%
Taylor expanded in x around 0 87.0%
associate-*r/87.0%
metadata-eval87.0%
associate-/l/87.1%
+-commutative87.1%
associate-/r*87.0%
metadata-eval87.0%
distribute-neg-frac87.0%
unsub-neg87.0%
associate-/r*87.1%
Simplified87.1%
Final simplification84.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.55e+57) (not (<= z 0.52))) (+ (/ x y) (* 2.0 (+ (/ 1.0 t) -1.0))) (- (+ (/ x y) -2.0) (/ (/ -2.0 t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.55e+57) || !(z <= 0.52)) {
tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0));
} else {
tmp = ((x / y) + -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 ((z <= (-1.55d+57)) .or. (.not. (z <= 0.52d0))) then
tmp = (x / y) + (2.0d0 * ((1.0d0 / t) + (-1.0d0)))
else
tmp = ((x / y) + (-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 ((z <= -1.55e+57) || !(z <= 0.52)) {
tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0));
} else {
tmp = ((x / y) + -2.0) - ((-2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.55e+57) or not (z <= 0.52): tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0)) else: tmp = ((x / y) + -2.0) - ((-2.0 / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.55e+57) || !(z <= 0.52)) tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(Float64(1.0 / t) + -1.0))); else tmp = Float64(Float64(Float64(x / y) + -2.0) - Float64(Float64(-2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.55e+57) || ~((z <= 0.52))) tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0)); else tmp = ((x / y) + -2.0) - ((-2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.55e+57], N[Not[LessEqual[z, 0.52]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision] - N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+57} \lor \neg \left(z \leq 0.52\right):\\
\;\;\;\;\frac{x}{y} + 2 \cdot \left(\frac{1}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{y} + -2\right) - \frac{\frac{-2}{t}}{z}\\
\end{array}
\end{array}
if z < -1.55000000000000007e57 or 0.52000000000000002 < z Initial program 76.8%
Taylor expanded in z around inf 99.2%
div-sub99.2%
sub-neg99.2%
*-inverses99.2%
metadata-eval99.2%
Simplified99.2%
if -1.55000000000000007e57 < z < 0.52000000000000002Initial program 97.2%
Taylor expanded in t around 0 91.7%
associate-+r+91.7%
associate-*r/91.7%
metadata-eval91.7%
sub-neg91.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in z around 0 90.6%
Taylor expanded in z around inf 96.7%
associate--l+96.7%
associate-*r/96.7%
metadata-eval96.7%
associate-/l/96.7%
sub-neg96.7%
metadata-eval96.7%
Simplified96.7%
associate-/l/96.7%
associate-/r*96.7%
frac-2neg96.7%
distribute-frac-neg296.7%
distribute-neg-frac96.7%
metadata-eval96.7%
Applied egg-rr96.7%
Final simplification97.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.55e+57) (not (<= z 0.52))) (+ (/ x y) (* 2.0 (+ (/ 1.0 t) -1.0))) (+ (+ (/ x y) -2.0) (/ (/ 2.0 z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.55e+57) || !(z <= 0.52)) {
tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0));
} else {
tmp = ((x / y) + -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 ((z <= (-1.55d+57)) .or. (.not. (z <= 0.52d0))) then
tmp = (x / y) + (2.0d0 * ((1.0d0 / t) + (-1.0d0)))
else
tmp = ((x / y) + (-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 ((z <= -1.55e+57) || !(z <= 0.52)) {
tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0));
} else {
tmp = ((x / y) + -2.0) + ((2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.55e+57) or not (z <= 0.52): tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0)) else: tmp = ((x / y) + -2.0) + ((2.0 / z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.55e+57) || !(z <= 0.52)) tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(Float64(1.0 / t) + -1.0))); else tmp = Float64(Float64(Float64(x / y) + -2.0) + Float64(Float64(2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.55e+57) || ~((z <= 0.52))) tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0)); else tmp = ((x / y) + -2.0) + ((2.0 / z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.55e+57], N[Not[LessEqual[z, 0.52]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+57} \lor \neg \left(z \leq 0.52\right):\\
\;\;\;\;\frac{x}{y} + 2 \cdot \left(\frac{1}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{y} + -2\right) + \frac{\frac{2}{z}}{t}\\
\end{array}
\end{array}
if z < -1.55000000000000007e57 or 0.52000000000000002 < z Initial program 76.8%
Taylor expanded in z around inf 99.2%
div-sub99.2%
sub-neg99.2%
*-inverses99.2%
metadata-eval99.2%
Simplified99.2%
if -1.55000000000000007e57 < z < 0.52000000000000002Initial program 97.2%
Taylor expanded in t around 0 91.7%
associate-+r+91.7%
associate-*r/91.7%
metadata-eval91.7%
sub-neg91.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in z around 0 90.6%
Taylor expanded in z around inf 96.7%
associate--l+96.7%
associate-*r/96.7%
metadata-eval96.7%
associate-/l/96.7%
sub-neg96.7%
metadata-eval96.7%
Simplified96.7%
Final simplification97.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.1e-9) (not (<= z 0.00076))) (+ (/ x y) (* 2.0 (+ (/ 1.0 t) -1.0))) (- (/ x y) (/ (/ -2.0 z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.1e-9) || !(z <= 0.00076)) {
tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0));
} 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 <= (-4.1d-9)) .or. (.not. (z <= 0.00076d0))) then
tmp = (x / y) + (2.0d0 * ((1.0d0 / t) + (-1.0d0)))
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 <= -4.1e-9) || !(z <= 0.00076)) {
tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0));
} else {
tmp = (x / y) - ((-2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.1e-9) or not (z <= 0.00076): tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0)) else: tmp = (x / y) - ((-2.0 / z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.1e-9) || !(z <= 0.00076)) tmp = Float64(Float64(x / y) + Float64(2.0 * Float64(Float64(1.0 / t) + -1.0))); else tmp = Float64(Float64(x / y) - Float64(Float64(-2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.1e-9) || ~((z <= 0.00076))) tmp = (x / y) + (2.0 * ((1.0 / t) + -1.0)); else tmp = (x / y) - ((-2.0 / z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.1e-9], N[Not[LessEqual[z, 0.00076]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{-9} \lor \neg \left(z \leq 0.00076\right):\\
\;\;\;\;\frac{x}{y} + 2 \cdot \left(\frac{1}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - \frac{\frac{-2}{z}}{t}\\
\end{array}
\end{array}
if z < -4.1000000000000003e-9 or 7.6000000000000004e-4 < z Initial program 77.6%
Taylor expanded in z around inf 98.4%
div-sub98.4%
sub-neg98.4%
*-inverses98.4%
metadata-eval98.4%
Simplified98.4%
if -4.1000000000000003e-9 < z < 7.6000000000000004e-4Initial program 97.7%
Taylor expanded in z around 0 83.0%
Taylor expanded in x around 0 83.0%
associate-*r/83.0%
metadata-eval83.0%
associate-/l/83.0%
+-commutative83.0%
associate-/r*83.0%
metadata-eval83.0%
distribute-neg-frac83.0%
unsub-neg83.0%
associate-/r*83.0%
Simplified83.0%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1.5e+147) (not (<= (/ x y) 2e+25))) (+ (/ x y) (/ 2.0 t)) (+ -2.0 (/ (/ 2.0 z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1.5e+147) || !((x / y) <= 2e+25)) {
tmp = (x / y) + (2.0 / t);
} 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 (((x / y) <= (-1.5d+147)) .or. (.not. ((x / y) <= 2d+25))) then
tmp = (x / y) + (2.0d0 / t)
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 (((x / y) <= -1.5e+147) || !((x / y) <= 2e+25)) {
tmp = (x / y) + (2.0 / t);
} else {
tmp = -2.0 + ((2.0 / z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1.5e+147) or not ((x / y) <= 2e+25): tmp = (x / y) + (2.0 / t) else: tmp = -2.0 + ((2.0 / z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -1.5e+147) || !(Float64(x / y) <= 2e+25)) tmp = Float64(Float64(x / y) + Float64(2.0 / t)); else tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -1.5e+147) || ~(((x / y) <= 2e+25))) tmp = (x / y) + (2.0 / t); else tmp = -2.0 + ((2.0 / z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -1.5e+147], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e+25]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1.5 \cdot 10^{+147} \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x}{y} + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1.49999999999999997e147 or 2.00000000000000018e25 < (/.f64 x y) Initial program 89.8%
Taylor expanded in t around 0 96.8%
Taylor expanded in z around inf 79.4%
+-commutative79.4%
associate-*r/79.4%
metadata-eval79.4%
Simplified79.4%
if -1.49999999999999997e147 < (/.f64 x y) < 2.00000000000000018e25Initial program 88.3%
Taylor expanded in t around 0 98.6%
associate-+r+98.6%
associate-*r/98.6%
metadata-eval98.6%
sub-neg98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in z around 0 79.8%
Taylor expanded in z around inf 81.1%
associate--l+81.1%
associate-*r/81.1%
metadata-eval81.1%
associate-/l/81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in x around 0 75.5%
Final simplification77.0%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -2e+71) (not (<= (/ x y) 2e+25))) (/ x y) (+ -2.0 (/ 2.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -2e+71) || !((x / y) <= 2e+25)) {
tmp = x / y;
} else {
tmp = -2.0 + (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) <= (-2d+71)) .or. (.not. ((x / y) <= 2d+25))) then
tmp = x / y
else
tmp = (-2.0d0) + (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) <= -2e+71) || !((x / y) <= 2e+25)) {
tmp = x / y;
} else {
tmp = -2.0 + (2.0 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -2e+71) or not ((x / y) <= 2e+25): tmp = x / y else: tmp = -2.0 + (2.0 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -2e+71) || !(Float64(x / y) <= 2e+25)) tmp = Float64(x / y); else tmp = Float64(-2.0 + Float64(2.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -2e+71) || ~(((x / y) <= 2e+25))) tmp = x / y; else tmp = -2.0 + (2.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -2e+71], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e+25]], $MachinePrecision]], N[(x / y), $MachinePrecision], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+71} \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -2.0000000000000001e71 or 2.00000000000000018e25 < (/.f64 x y) Initial program 90.4%
Taylor expanded in x around inf 67.4%
if -2.0000000000000001e71 < (/.f64 x y) < 2.00000000000000018e25Initial program 87.6%
Taylor expanded in z around inf 59.4%
div-sub59.4%
sub-neg59.4%
*-inverses59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in x around 0 57.5%
sub-neg57.5%
metadata-eval57.5%
+-commutative57.5%
distribute-lft-in57.5%
metadata-eval57.5%
associate-*r/57.5%
metadata-eval57.5%
Simplified57.5%
Final simplification62.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -5.2e+32) (not (<= t 3.5e-64))) (- (/ x y) 2.0) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.2e+32) || !(t <= 3.5e-64)) {
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 <= (-5.2d+32)) .or. (.not. (t <= 3.5d-64))) 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 <= -5.2e+32) || !(t <= 3.5e-64)) {
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 <= -5.2e+32) or not (t <= 3.5e-64): 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 <= -5.2e+32) || !(t <= 3.5e-64)) 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 <= -5.2e+32) || ~((t <= 3.5e-64))) 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, -5.2e+32], N[Not[LessEqual[t, 3.5e-64]], $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 -5.2 \cdot 10^{+32} \lor \neg \left(t \leq 3.5 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -5.2000000000000004e32 or 3.5000000000000003e-64 < t Initial program 81.0%
Taylor expanded in t around inf 82.0%
if -5.2000000000000004e32 < t < 3.5000000000000003e-64Initial program 97.3%
Taylor expanded in t around 0 78.7%
associate-*r/78.7%
metadata-eval78.7%
Simplified78.7%
Final simplification80.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1e+16) (not (<= (/ x y) 4e-19))) (/ x y) -2.0))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1e+16) || !((x / y) <= 4e-19)) {
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) <= (-1d+16)) .or. (.not. ((x / y) <= 4d-19))) 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) <= -1e+16) || !((x / y) <= 4e-19)) {
tmp = x / y;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1e+16) or not ((x / y) <= 4e-19): tmp = x / y else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -1e+16) || !(Float64(x / y) <= 4e-19)) 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) <= -1e+16) || ~(((x / y) <= 4e-19))) tmp = x / y; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -1e+16], N[Not[LessEqual[N[(x / y), $MachinePrecision], 4e-19]], $MachinePrecision]], N[(x / y), $MachinePrecision], -2.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+16} \lor \neg \left(\frac{x}{y} \leq 4 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if (/.f64 x y) < -1e16 or 3.9999999999999999e-19 < (/.f64 x y) Initial program 90.3%
Taylor expanded in x around inf 63.9%
if -1e16 < (/.f64 x y) < 3.9999999999999999e-19Initial program 87.6%
Taylor expanded in t around 0 99.9%
associate-+r+99.9%
associate-*r/99.9%
metadata-eval99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in t around inf 40.5%
Final simplification52.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.18e+33) (not (<= t 3.5e-64))) (- (/ x y) 2.0) (/ (/ 2.0 t) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.18e+33) || !(t <= 3.5e-64)) {
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 ((t <= (-1.18d+33)) .or. (.not. (t <= 3.5d-64))) 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 ((t <= -1.18e+33) || !(t <= 3.5e-64)) {
tmp = (x / y) - 2.0;
} else {
tmp = (2.0 / t) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.18e+33) or not (t <= 3.5e-64): tmp = (x / y) - 2.0 else: tmp = (2.0 / t) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.18e+33) || !(t <= 3.5e-64)) 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 ((t <= -1.18e+33) || ~((t <= 3.5e-64))) tmp = (x / y) - 2.0; else tmp = (2.0 / t) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.18e+33], N[Not[LessEqual[t, 3.5e-64]], $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}\;t \leq -1.18 \cdot 10^{+33} \lor \neg \left(t \leq 3.5 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
if t < -1.17999999999999993e33 or 3.5000000000000003e-64 < t Initial program 81.0%
Taylor expanded in t around inf 82.0%
if -1.17999999999999993e33 < t < 3.5000000000000003e-64Initial program 97.3%
Taylor expanded in z around 0 52.2%
associate-/r*52.2%
div-inv52.2%
Applied egg-rr52.2%
un-div-inv52.2%
Applied egg-rr52.2%
Final simplification67.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -5.9e+32) (not (<= t 3.3e-64))) (- (/ x y) 2.0) (/ 2.0 (* z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.9e+32) || !(t <= 3.3e-64)) {
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 ((t <= (-5.9d+32)) .or. (.not. (t <= 3.3d-64))) 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 ((t <= -5.9e+32) || !(t <= 3.3e-64)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / (z * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -5.9e+32) or not (t <= 3.3e-64): tmp = (x / y) - 2.0 else: tmp = 2.0 / (z * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -5.9e+32) || !(t <= 3.3e-64)) 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 ((t <= -5.9e+32) || ~((t <= 3.3e-64))) tmp = (x / y) - 2.0; else tmp = 2.0 / (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.9e+32], N[Not[LessEqual[t, 3.3e-64]], $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}\;t \leq -5.9 \cdot 10^{+32} \lor \neg \left(t \leq 3.3 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\end{array}
\end{array}
if t < -5.89999999999999965e32 or 3.2999999999999999e-64 < t Initial program 81.0%
Taylor expanded in t around inf 82.0%
if -5.89999999999999965e32 < t < 3.2999999999999999e-64Initial program 97.3%
Taylor expanded in z around 0 52.2%
Final simplification67.5%
(FPCore (x y z t) :precision binary64 (if (<= t -1.0) -2.0 (if (<= t 2.1e-16) (/ 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 <= 2.1e-16) {
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 <= 2.1d-16) 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 <= 2.1e-16) {
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 <= 2.1e-16: 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 <= 2.1e-16) 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 <= 2.1e-16) 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, 2.1e-16], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -1 or 2.1000000000000001e-16 < t Initial program 80.5%
Taylor expanded in t around 0 88.2%
associate-+r+88.2%
associate-*r/88.2%
metadata-eval88.2%
sub-neg88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in x around 0 60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in t around inf 40.6%
if -1 < t < 2.1000000000000001e-16Initial program 97.4%
Taylor expanded in z around inf 52.7%
div-sub52.7%
sub-neg52.7%
*-inverses52.7%
metadata-eval52.7%
Simplified52.7%
Taylor expanded in t around 0 28.3%
(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}
Initial program 88.9%
Taylor expanded in t around 0 93.2%
associate-+r+93.2%
associate-*r/93.2%
metadata-eval93.2%
sub-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in x around 0 68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in t around inf 21.7%
(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 2024137
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (/ 2 z) 2) t) (- 2 (/ x y))))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))