
(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 t) (+ (/ 2.0 (* t z)) -2.0))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 / t) + ((2.0 / (t * z)) + -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 / t) + ((2.0d0 / (t * z)) + (-2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 / t) + ((2.0 / (t * z)) + -2.0));
}
def code(x, y, z, t): return (x / y) + ((2.0 / t) + ((2.0 / (t * z)) + -2.0))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 / t) + Float64(Float64(2.0 / Float64(t * z)) + -2.0))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 / t) + ((2.0 / (t * z)) + -2.0)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / t), $MachinePrecision] + N[(N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \left(\frac{2}{t} + \left(\frac{2}{t \cdot z} + -2\right)\right)
\end{array}
Initial program 83.8%
Taylor expanded in t around inf 98.7%
associate--l+98.7%
associate-*r/98.7%
metadata-eval98.7%
metadata-eval98.7%
associate-*r/98.7%
sub-neg98.7%
associate-*r/98.7%
metadata-eval98.7%
metadata-eval98.7%
Simplified98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ 2.0 z) t)) (t_2 (- (/ x y) 2.0)))
(if (<= t -5.8e-7)
t_2
(if (<= t -1.2e-273)
t_1
(if (<= t 4.3e-306) (/ 2.0 t) (if (<= t 5.5e+19) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (2.0 / z) / t;
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -5.8e-7) {
tmp = t_2;
} else if (t <= -1.2e-273) {
tmp = t_1;
} else if (t <= 4.3e-306) {
tmp = 2.0 / t;
} else if (t <= 5.5e+19) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (2.0d0 / z) / t
t_2 = (x / y) - 2.0d0
if (t <= (-5.8d-7)) then
tmp = t_2
else if (t <= (-1.2d-273)) then
tmp = t_1
else if (t <= 4.3d-306) then
tmp = 2.0d0 / t
else if (t <= 5.5d+19) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (2.0 / z) / t;
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -5.8e-7) {
tmp = t_2;
} else if (t <= -1.2e-273) {
tmp = t_1;
} else if (t <= 4.3e-306) {
tmp = 2.0 / t;
} else if (t <= 5.5e+19) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (2.0 / z) / t t_2 = (x / y) - 2.0 tmp = 0 if t <= -5.8e-7: tmp = t_2 elif t <= -1.2e-273: tmp = t_1 elif t <= 4.3e-306: tmp = 2.0 / t elif t <= 5.5e+19: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(2.0 / z) / t) t_2 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (t <= -5.8e-7) tmp = t_2; elseif (t <= -1.2e-273) tmp = t_1; elseif (t <= 4.3e-306) tmp = Float64(2.0 / t); elseif (t <= 5.5e+19) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (2.0 / z) / t; t_2 = (x / y) - 2.0; tmp = 0.0; if (t <= -5.8e-7) tmp = t_2; elseif (t <= -1.2e-273) tmp = t_1; elseif (t <= 4.3e-306) tmp = 2.0 / t; elseif (t <= 5.5e+19) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[t, -5.8e-7], t$95$2, If[LessEqual[t, -1.2e-273], t$95$1, If[LessEqual[t, 4.3e-306], N[(2.0 / t), $MachinePrecision], If[LessEqual[t, 5.5e+19], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{2}{z}}{t}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-306}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.7999999999999995e-7 or 5.5e19 < t Initial program 73.4%
Taylor expanded in t around inf 90.3%
if -5.7999999999999995e-7 < t < -1.19999999999999991e-273 or 4.2999999999999999e-306 < t < 5.5e19Initial program 96.8%
Taylor expanded in z around 0 85.3%
Taylor expanded in t around 0 98.9%
Taylor expanded in z around 0 59.3%
*-commutative59.3%
associate-/r*59.4%
Simplified59.4%
if -1.19999999999999991e-273 < t < 4.2999999999999999e-306Initial program 99.5%
Taylor expanded in t around 0 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 78.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= t -6.2e-7)
t_1
(if (<= t -8e-271)
(/ (/ 2.0 t) z)
(if (<= t 2.7e-306)
(/ 2.0 t)
(if (<= t 1.6e+17) (/ 2.0 (* t z)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (t <= -6.2e-7) {
tmp = t_1;
} else if (t <= -8e-271) {
tmp = (2.0 / t) / z;
} else if (t <= 2.7e-306) {
tmp = 2.0 / t;
} else if (t <= 1.6e+17) {
tmp = 2.0 / (t * z);
} 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 <= (-6.2d-7)) then
tmp = t_1
else if (t <= (-8d-271)) then
tmp = (2.0d0 / t) / z
else if (t <= 2.7d-306) then
tmp = 2.0d0 / t
else if (t <= 1.6d+17) then
tmp = 2.0d0 / (t * z)
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 <= -6.2e-7) {
tmp = t_1;
} else if (t <= -8e-271) {
tmp = (2.0 / t) / z;
} else if (t <= 2.7e-306) {
tmp = 2.0 / t;
} else if (t <= 1.6e+17) {
tmp = 2.0 / (t * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if t <= -6.2e-7: tmp = t_1 elif t <= -8e-271: tmp = (2.0 / t) / z elif t <= 2.7e-306: tmp = 2.0 / t elif t <= 1.6e+17: tmp = 2.0 / (t * z) 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 <= -6.2e-7) tmp = t_1; elseif (t <= -8e-271) tmp = Float64(Float64(2.0 / t) / z); elseif (t <= 2.7e-306) tmp = Float64(2.0 / t); elseif (t <= 1.6e+17) tmp = Float64(2.0 / Float64(t * z)); 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 <= -6.2e-7) tmp = t_1; elseif (t <= -8e-271) tmp = (2.0 / t) / z; elseif (t <= 2.7e-306) tmp = 2.0 / t; elseif (t <= 1.6e+17) tmp = 2.0 / (t * z); 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, -6.2e-7], t$95$1, If[LessEqual[t, -8e-271], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.7e-306], N[(2.0 / t), $MachinePrecision], If[LessEqual[t, 1.6e+17], N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-271}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-306}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{2}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.1999999999999999e-7 or 1.6e17 < t Initial program 73.7%
Taylor expanded in t around inf 89.8%
if -6.1999999999999999e-7 < t < -7.9999999999999997e-271Initial program 99.6%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
metadata-eval99.8%
associate-*r/99.8%
sub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 63.4%
associate-/r*63.5%
Applied egg-rr63.5%
if -7.9999999999999997e-271 < t < 2.70000000000000009e-306Initial program 99.5%
Taylor expanded in t around 0 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 78.8%
if 2.70000000000000009e-306 < t < 1.6e17Initial program 94.4%
Taylor expanded in t around inf 94.5%
associate--l+94.5%
associate-*r/94.5%
metadata-eval94.5%
metadata-eval94.5%
associate-*r/94.5%
sub-neg94.5%
associate-*r/94.5%
metadata-eval94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in z around 0 56.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 2.0 (* t z))) (t_2 (- (/ x y) 2.0)))
(if (<= t -2.05e-7)
t_2
(if (<= t -6.5e-269)
t_1
(if (<= t 5e-306) (/ 2.0 t) (if (<= t 1.6e+17) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (t * z);
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -2.05e-7) {
tmp = t_2;
} else if (t <= -6.5e-269) {
tmp = t_1;
} else if (t <= 5e-306) {
tmp = 2.0 / t;
} else if (t <= 1.6e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 / (t * z)
t_2 = (x / y) - 2.0d0
if (t <= (-2.05d-7)) then
tmp = t_2
else if (t <= (-6.5d-269)) then
tmp = t_1
else if (t <= 5d-306) then
tmp = 2.0d0 / t
else if (t <= 1.6d+17) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (t * z);
double t_2 = (x / y) - 2.0;
double tmp;
if (t <= -2.05e-7) {
tmp = t_2;
} else if (t <= -6.5e-269) {
tmp = t_1;
} else if (t <= 5e-306) {
tmp = 2.0 / t;
} else if (t <= 1.6e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 / (t * z) t_2 = (x / y) - 2.0 tmp = 0 if t <= -2.05e-7: tmp = t_2 elif t <= -6.5e-269: tmp = t_1 elif t <= 5e-306: tmp = 2.0 / t elif t <= 1.6e+17: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 / Float64(t * z)) t_2 = Float64(Float64(x / y) - 2.0) tmp = 0.0 if (t <= -2.05e-7) tmp = t_2; elseif (t <= -6.5e-269) tmp = t_1; elseif (t <= 5e-306) tmp = Float64(2.0 / t); elseif (t <= 1.6e+17) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 / (t * z); t_2 = (x / y) - 2.0; tmp = 0.0; if (t <= -2.05e-7) tmp = t_2; elseif (t <= -6.5e-269) tmp = t_1; elseif (t <= 5e-306) tmp = 2.0 / t; elseif (t <= 1.6e+17) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[t, -2.05e-7], t$95$2, If[LessEqual[t, -6.5e-269], t$95$1, If[LessEqual[t, 5e-306], N[(2.0 / t), $MachinePrecision], If[LessEqual[t, 1.6e+17], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{t \cdot z}\\
t_2 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-306}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.05e-7 or 1.6e17 < t Initial program 73.7%
Taylor expanded in t around inf 89.8%
if -2.05e-7 < t < -6.50000000000000006e-269 or 4.99999999999999998e-306 < t < 1.6e17Initial program 96.8%
Taylor expanded in t around inf 96.9%
associate--l+96.9%
associate-*r/96.9%
metadata-eval96.9%
metadata-eval96.9%
associate-*r/96.9%
sub-neg96.9%
associate-*r/96.9%
metadata-eval96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in z around 0 59.5%
if -6.50000000000000006e-269 < t < 4.99999999999999998e-306Initial program 99.5%
Taylor expanded in t around 0 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 78.8%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -1300000000000.0) (/ x y) (if (<= (/ x y) 0.00055) -2.0 (if (<= (/ x y) 5.3e+41) (/ 2.0 t) (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1300000000000.0) {
tmp = x / y;
} else if ((x / y) <= 0.00055) {
tmp = -2.0;
} else if ((x / y) <= 5.3e+41) {
tmp = 2.0 / t;
} else {
tmp = x / 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) :: tmp
if ((x / y) <= (-1300000000000.0d0)) then
tmp = x / y
else if ((x / y) <= 0.00055d0) then
tmp = -2.0d0
else if ((x / y) <= 5.3d+41) then
tmp = 2.0d0 / t
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1300000000000.0) {
tmp = x / y;
} else if ((x / y) <= 0.00055) {
tmp = -2.0;
} else if ((x / y) <= 5.3e+41) {
tmp = 2.0 / t;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -1300000000000.0: tmp = x / y elif (x / y) <= 0.00055: tmp = -2.0 elif (x / y) <= 5.3e+41: tmp = 2.0 / t else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -1300000000000.0) tmp = Float64(x / y); elseif (Float64(x / y) <= 0.00055) tmp = -2.0; elseif (Float64(x / y) <= 5.3e+41) tmp = Float64(2.0 / t); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -1300000000000.0) tmp = x / y; elseif ((x / y) <= 0.00055) tmp = -2.0; elseif ((x / y) <= 5.3e+41) tmp = 2.0 / t; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -1300000000000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 0.00055], -2.0, If[LessEqual[N[(x / y), $MachinePrecision], 5.3e+41], N[(2.0 / t), $MachinePrecision], N[(x / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1300000000000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 0.00055:\\
\;\;\;\;-2\\
\mathbf{elif}\;\frac{x}{y} \leq 5.3 \cdot 10^{+41}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -1.3e12 or 5.2999999999999997e41 < (/.f64 x y) Initial program 82.8%
Taylor expanded in x around inf 77.4%
if -1.3e12 < (/.f64 x y) < 5.50000000000000033e-4Initial program 86.1%
Taylor expanded in z around 0 91.8%
Taylor expanded in x around 0 77.5%
associate-*r/77.5%
metadata-eval77.5%
+-commutative77.5%
associate-/l*90.3%
associate-*r*90.3%
*-commutative90.3%
div-sub90.3%
sub-neg90.3%
*-inverses90.3%
metadata-eval90.3%
associate-*r*90.3%
distribute-lft-in90.3%
associate-*r/90.3%
metadata-eval90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in t around inf 42.7%
if 5.50000000000000033e-4 < (/.f64 x y) < 5.2999999999999997e41Initial program 72.9%
Taylor expanded in t around 0 74.2%
associate-*r/74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around inf 55.0%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1e+17) (not (<= (/ x y) 1e+42))) (+ (/ x y) (/ 2.0 (* t z))) (+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1e+17) || !((x / y) <= 1e+42)) {
tmp = (x / y) + (2.0 / (t * z));
} else {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((x / y) <= (-1d+17)) .or. (.not. ((x / y) <= 1d+42))) then
tmp = (x / y) + (2.0d0 / (t * z))
else
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1e+17) || !((x / y) <= 1e+42)) {
tmp = (x / y) + (2.0 / (t * z));
} else {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1e+17) or not ((x / y) <= 1e+42): tmp = (x / y) + (2.0 / (t * z)) else: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -1e+17) || !(Float64(x / y) <= 1e+42)) tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(t * z))); else tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -1e+17) || ~(((x / y) <= 1e+42))) tmp = (x / y) + (2.0 / (t * z)); else tmp = -2.0 + ((2.0 + (2.0 / z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -1e+17], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e+42]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+17} \lor \neg \left(\frac{x}{y} \leq 10^{+42}\right):\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1e17 or 1.00000000000000004e42 < (/.f64 x y) Initial program 82.8%
Taylor expanded in z around 0 93.9%
if -1e17 < (/.f64 x y) < 1.00000000000000004e42Initial program 84.6%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
associate-*r/99.9%
sub-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.7%
sub-neg95.7%
associate-*r/95.7%
metadata-eval95.7%
associate-*r/95.7%
metadata-eval95.7%
associate-/r*95.8%
metadata-eval95.8%
associate-+r+95.8%
+-commutative95.8%
+-commutative95.8%
associate-+l+95.8%
metadata-eval95.8%
associate-*l/95.8%
associate-*r/95.7%
metadata-eval95.7%
associate-*l/95.7%
distribute-lft-in95.7%
+-commutative95.7%
associate-*l/95.7%
*-lft-identity95.7%
Simplified95.7%
Final simplification94.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.15e+15) (not (<= t 1.7e+21))) (- (/ x y) 2.0) (+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.15e+15) || !(t <= 1.7e+21)) {
tmp = (x / y) - 2.0;
} else {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.15d+15)) .or. (.not. (t <= 1.7d+21))) then
tmp = (x / y) - 2.0d0
else
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.15e+15) || !(t <= 1.7e+21)) {
tmp = (x / y) - 2.0;
} else {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.15e+15) or not (t <= 1.7e+21): tmp = (x / y) - 2.0 else: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.15e+15) || !(t <= 1.7e+21)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.15e+15) || ~((t <= 1.7e+21))) tmp = (x / y) - 2.0; else tmp = -2.0 + ((2.0 + (2.0 / z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.15e+15], N[Not[LessEqual[t, 1.7e+21]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+15} \lor \neg \left(t \leq 1.7 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -1.15e15 or 1.7e21 < t Initial program 73.2%
Taylor expanded in t around inf 90.9%
if -1.15e15 < t < 1.7e21Initial program 97.0%
Taylor expanded in t around inf 97.2%
associate--l+97.2%
associate-*r/97.2%
metadata-eval97.2%
metadata-eval97.2%
associate-*r/97.2%
sub-neg97.2%
associate-*r/97.2%
metadata-eval97.2%
metadata-eval97.2%
Simplified97.2%
Taylor expanded in x around 0 86.3%
sub-neg86.3%
associate-*r/86.3%
metadata-eval86.3%
associate-*r/86.3%
metadata-eval86.3%
associate-/r*86.3%
metadata-eval86.3%
associate-+r+86.3%
+-commutative86.3%
+-commutative86.3%
associate-+l+86.3%
metadata-eval86.3%
associate-*l/86.3%
associate-*r/86.3%
metadata-eval86.3%
associate-*l/86.3%
distribute-lft-in86.3%
+-commutative86.3%
associate-*l/86.3%
*-lft-identity86.3%
Simplified86.3%
Final simplification88.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1300000000000.0) (not (<= (/ x y) 5.3e+41))) (/ x y) (+ (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1300000000000.0) || !((x / y) <= 5.3e+41)) {
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) <= (-1300000000000.0d0)) .or. (.not. ((x / y) <= 5.3d+41))) 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) <= -1300000000000.0) || !((x / y) <= 5.3e+41)) {
tmp = x / y;
} else {
tmp = (2.0 / t) + -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1300000000000.0) or not ((x / y) <= 5.3e+41): 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) <= -1300000000000.0) || !(Float64(x / y) <= 5.3e+41)) 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) <= -1300000000000.0) || ~(((x / y) <= 5.3e+41))) 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], -1300000000000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 5.3e+41]], $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 -1300000000000 \lor \neg \left(\frac{x}{y} \leq 5.3 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t} + -2\\
\end{array}
\end{array}
if (/.f64 x y) < -1.3e12 or 5.2999999999999997e41 < (/.f64 x y) Initial program 82.8%
Taylor expanded in x around inf 77.4%
if -1.3e12 < (/.f64 x y) < 5.2999999999999997e41Initial program 84.6%
Taylor expanded in z around 0 89.2%
Taylor expanded in x around 0 73.7%
associate-*r/73.7%
metadata-eval73.7%
+-commutative73.7%
associate-/l*85.1%
associate-*r*85.1%
*-commutative85.1%
div-sub85.1%
sub-neg85.1%
*-inverses85.1%
metadata-eval85.1%
associate-*r*85.1%
distribute-lft-in85.1%
associate-*r/85.1%
metadata-eval85.1%
metadata-eval85.1%
Simplified85.1%
Taylor expanded in z around inf 59.8%
sub-neg59.8%
associate-*r/59.8%
metadata-eval59.8%
metadata-eval59.8%
+-commutative59.8%
Simplified59.8%
Final simplification67.8%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -1300000000000.0) (/ x y) (if (<= (/ x y) 3600000.0) (+ (/ 2.0 t) -2.0) (- (/ x y) 2.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1300000000000.0) {
tmp = x / y;
} else if ((x / y) <= 3600000.0) {
tmp = (2.0 / t) + -2.0;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x / y) <= (-1300000000000.0d0)) then
tmp = x / y
else if ((x / y) <= 3600000.0d0) then
tmp = (2.0d0 / t) + (-2.0d0)
else
tmp = (x / y) - 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -1300000000000.0) {
tmp = x / y;
} else if ((x / y) <= 3600000.0) {
tmp = (2.0 / t) + -2.0;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -1300000000000.0: tmp = x / y elif (x / y) <= 3600000.0: tmp = (2.0 / t) + -2.0 else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -1300000000000.0) tmp = Float64(x / y); elseif (Float64(x / y) <= 3600000.0) tmp = Float64(Float64(2.0 / t) + -2.0); else tmp = Float64(Float64(x / y) - 2.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -1300000000000.0) tmp = x / y; elseif ((x / y) <= 3600000.0) tmp = (2.0 / t) + -2.0; else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -1300000000000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 3600000.0], N[(N[(2.0 / t), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1300000000000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 3600000:\\
\;\;\;\;\frac{2}{t} + -2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
if (/.f64 x y) < -1.3e12Initial program 83.8%
Taylor expanded in x around inf 80.8%
if -1.3e12 < (/.f64 x y) < 3.6e6Initial program 86.6%
Taylor expanded in z around 0 91.3%
Taylor expanded in x around 0 77.7%
associate-*r/77.7%
metadata-eval77.7%
+-commutative77.7%
associate-/l*89.9%
associate-*r*89.9%
*-commutative89.9%
div-sub89.9%
sub-neg89.9%
*-inverses89.9%
metadata-eval89.9%
associate-*r*89.9%
distribute-lft-in89.9%
associate-*r/89.9%
metadata-eval89.9%
metadata-eval89.9%
Simplified89.9%
Taylor expanded in z around inf 61.2%
sub-neg61.2%
associate-*r/61.2%
metadata-eval61.2%
metadata-eval61.2%
+-commutative61.2%
Simplified61.2%
if 3.6e6 < (/.f64 x y) Initial program 78.3%
Taylor expanded in t around inf 68.6%
Final simplification67.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2020000000.0) (not (<= t 5e+19))) (- (/ x y) 2.0) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2020000000.0) || !(t <= 5e+19)) {
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 <= (-2020000000.0d0)) .or. (.not. (t <= 5d+19))) 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 <= -2020000000.0) || !(t <= 5e+19)) {
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 <= -2020000000.0) or not (t <= 5e+19): 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 <= -2020000000.0) || !(t <= 5e+19)) 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 <= -2020000000.0) || ~((t <= 5e+19))) 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, -2020000000.0], N[Not[LessEqual[t, 5e+19]], $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 -2020000000 \lor \neg \left(t \leq 5 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -2.02e9 or 5e19 < t Initial program 73.2%
Taylor expanded in t around inf 90.9%
if -2.02e9 < t < 5e19Initial program 97.0%
Taylor expanded in t around 0 85.5%
associate-*r/85.5%
metadata-eval85.5%
Simplified85.5%
Final simplification88.5%
(FPCore (x y z t) :precision binary64 (if (<= t -5.7e+20) -2.0 (if (<= t 1.6e+17) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.7e+20) {
tmp = -2.0;
} else if (t <= 1.6e+17) {
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 <= (-5.7d+20)) then
tmp = -2.0d0
else if (t <= 1.6d+17) 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 <= -5.7e+20) {
tmp = -2.0;
} else if (t <= 1.6e+17) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.7e+20: tmp = -2.0 elif t <= 1.6e+17: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.7e+20) tmp = -2.0; elseif (t <= 1.6e+17) 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 <= -5.7e+20) tmp = -2.0; elseif (t <= 1.6e+17) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.7e+20], -2.0, If[LessEqual[t, 1.6e+17], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.7 \cdot 10^{+20}:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -5.7e20 or 1.6e17 < t Initial program 73.4%
Taylor expanded in z around 0 94.0%
Taylor expanded in x around 0 37.4%
associate-*r/37.4%
metadata-eval37.4%
+-commutative37.4%
associate-/l*47.2%
associate-*r*47.2%
*-commutative47.2%
div-sub47.2%
sub-neg47.2%
*-inverses47.2%
metadata-eval47.2%
associate-*r*47.2%
distribute-lft-in47.2%
associate-*r/47.2%
metadata-eval47.2%
metadata-eval47.2%
Simplified47.2%
Taylor expanded in t around inf 37.5%
if -5.7e20 < t < 1.6e17Initial program 97.0%
Taylor expanded in t around 0 85.4%
associate-*r/85.4%
metadata-eval85.4%
Simplified85.4%
Taylor expanded in z around inf 32.0%
(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 83.8%
Taylor expanded in z around 0 88.2%
Taylor expanded in x around 0 52.8%
associate-*r/52.8%
metadata-eval52.8%
+-commutative52.8%
associate-/l*58.3%
associate-*r*58.3%
*-commutative58.3%
div-sub58.3%
sub-neg58.3%
*-inverses58.3%
metadata-eval58.3%
associate-*r*58.3%
distribute-lft-in58.3%
associate-*r/58.3%
metadata-eval58.3%
metadata-eval58.3%
Simplified58.3%
Taylor expanded in t around inf 22.1%
(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 2024096
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:alt
(- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y)))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))