
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (/ x y) (+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
return (x / y) + (-2.0 + ((2.0 + (2.0 / z)) / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + (-2.0 + ((2.0 + (2.0 / z)) / t));
}
def code(x, y, z, t): return (x / y) + (-2.0 + ((2.0 + (2.0 / z)) / t))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t))) end
function tmp = code(x, y, z, t) tmp = (x / y) + (-2.0 + ((2.0 + (2.0 / z)) / t)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \left(-2 + \frac{2 + \frac{2}{z}}{t}\right)
\end{array}
Initial program 90.8%
Taylor expanded in t around 0 99.9%
associate--l+99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
associate--l+99.9%
associate-*r/99.9%
metadata-eval99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
metadata-eval99.9%
associate-*l/99.9%
metadata-eval99.9%
associate-*l/99.9%
associate-/r/99.9%
associate-/l*99.9%
metadata-eval99.9%
associate-*r/99.9%
associate-/r/99.9%
distribute-lft-in99.9%
associate-*r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.3e-53) (not (<= z 160000000000.0))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (+ (/ x y) (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.3e-53) || !(z <= 160000000000.0)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} 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 <= (-5.3d-53)) .or. (.not. (z <= 160000000000.0d0))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
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 <= -5.3e-53) || !(z <= 160000000000.0)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.3e-53) or not (z <= 160000000000.0): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = (x / y) + ((2.0 + (2.0 / z)) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.3e-53) || !(z <= 160000000000.0)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(Float64(x / y) + 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 ((z <= -5.3e-53) || ~((z <= 160000000000.0))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = (x / y) + ((2.0 + (2.0 / z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.3e-53], N[Not[LessEqual[z, 160000000000.0]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{-53} \lor \neg \left(z \leq 160000000000\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if z < -5.3e-53 or 1.6e11 < z Initial program 81.3%
Taylor expanded in t around 0 100.0%
associate--l+100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 97.2%
sub-neg97.2%
associate-*r/97.2%
metadata-eval97.2%
metadata-eval97.2%
+-commutative97.2%
Simplified97.2%
if -5.3e-53 < z < 1.6e11Initial program 99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 92.3%
associate-*r/92.3%
metadata-eval92.3%
Simplified92.3%
Final simplification94.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (+ (/ 1.0 t) -1.0))))
(if (<= z -6.2e+124)
t_1
(if (<= z -2.35e-122)
(- (/ x y) 2.0)
(if (<= z 4e-28) (/ (/ 2.0 t) z) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((1.0 / t) + -1.0);
double tmp;
if (z <= -6.2e+124) {
tmp = t_1;
} else if (z <= -2.35e-122) {
tmp = (x / y) - 2.0;
} else if (z <= 4e-28) {
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 = 2.0d0 * ((1.0d0 / t) + (-1.0d0))
if (z <= (-6.2d+124)) then
tmp = t_1
else if (z <= (-2.35d-122)) then
tmp = (x / y) - 2.0d0
else if (z <= 4d-28) 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 = 2.0 * ((1.0 / t) + -1.0);
double tmp;
if (z <= -6.2e+124) {
tmp = t_1;
} else if (z <= -2.35e-122) {
tmp = (x / y) - 2.0;
} else if (z <= 4e-28) {
tmp = (2.0 / t) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((1.0 / t) + -1.0) tmp = 0 if z <= -6.2e+124: tmp = t_1 elif z <= -2.35e-122: tmp = (x / y) - 2.0 elif z <= 4e-28: tmp = (2.0 / t) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(1.0 / t) + -1.0)) tmp = 0.0 if (z <= -6.2e+124) tmp = t_1; elseif (z <= -2.35e-122) tmp = Float64(Float64(x / y) - 2.0); elseif (z <= 4e-28) tmp = Float64(Float64(2.0 / t) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((1.0 / t) + -1.0); tmp = 0.0; if (z <= -6.2e+124) tmp = t_1; elseif (z <= -2.35e-122) tmp = (x / y) - 2.0; elseif (z <= 4e-28) tmp = (2.0 / t) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+124], t$95$1, If[LessEqual[z, -2.35e-122], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], If[LessEqual[z, 4e-28], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\frac{1}{t} + -1\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-122}:\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.2000000000000004e124 or 3.99999999999999988e-28 < z Initial program 78.6%
Taylor expanded in z around inf 95.7%
div-sub95.8%
sub-neg95.8%
*-inverses95.8%
metadata-eval95.8%
Simplified95.8%
Taylor expanded in x around 0 70.1%
if -6.2000000000000004e124 < z < -2.35e-122Initial program 95.0%
Taylor expanded in t around inf 68.4%
if -2.35e-122 < z < 3.99999999999999988e-28Initial program 99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
metadata-eval99.8%
associate-*l/99.8%
metadata-eval99.8%
associate-*l/99.8%
associate-/r/99.8%
associate-/l*99.7%
metadata-eval99.7%
associate-*r/99.7%
associate-/r/99.8%
distribute-lft-in99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around 0 72.7%
associate-/r*72.7%
Simplified72.7%
Final simplification71.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.7e+25)
(+ (/ x y) (/ 2.0 t))
(if (<= z -1.05e-121)
(- (/ x y) 2.0)
(if (<= z 4.6e-33) (/ (/ 2.0 t) z) (* 2.0 (+ (/ 1.0 t) -1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.7e+25) {
tmp = (x / y) + (2.0 / t);
} else if (z <= -1.05e-121) {
tmp = (x / y) - 2.0;
} else if (z <= 4.6e-33) {
tmp = (2.0 / t) / z;
} else {
tmp = 2.0 * ((1.0 / t) + -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 <= (-2.7d+25)) then
tmp = (x / y) + (2.0d0 / t)
else if (z <= (-1.05d-121)) then
tmp = (x / y) - 2.0d0
else if (z <= 4.6d-33) then
tmp = (2.0d0 / t) / z
else
tmp = 2.0d0 * ((1.0d0 / t) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.7e+25) {
tmp = (x / y) + (2.0 / t);
} else if (z <= -1.05e-121) {
tmp = (x / y) - 2.0;
} else if (z <= 4.6e-33) {
tmp = (2.0 / t) / z;
} else {
tmp = 2.0 * ((1.0 / t) + -1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.7e+25: tmp = (x / y) + (2.0 / t) elif z <= -1.05e-121: tmp = (x / y) - 2.0 elif z <= 4.6e-33: tmp = (2.0 / t) / z else: tmp = 2.0 * ((1.0 / t) + -1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.7e+25) tmp = Float64(Float64(x / y) + Float64(2.0 / t)); elseif (z <= -1.05e-121) tmp = Float64(Float64(x / y) - 2.0); elseif (z <= 4.6e-33) tmp = Float64(Float64(2.0 / t) / z); else tmp = Float64(2.0 * Float64(Float64(1.0 / t) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.7e+25) tmp = (x / y) + (2.0 / t); elseif (z <= -1.05e-121) tmp = (x / y) - 2.0; elseif (z <= 4.6e-33) tmp = (2.0 / t) / z; else tmp = 2.0 * ((1.0 / t) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.7e+25], N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e-121], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], If[LessEqual[z, 4.6e-33], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], N[(2.0 * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+25}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t}\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-121}:\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-33}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{1}{t} + -1\right)\\
\end{array}
\end{array}
if z < -2.7e25Initial program 80.8%
associate-/r*58.7%
div-inv58.7%
+-commutative58.7%
*-commutative58.7%
associate-*l*58.7%
fma-def58.7%
Applied egg-rr58.7%
Taylor expanded in t around 0 82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in z around inf 82.3%
associate-*r/82.3%
metadata-eval82.3%
Simplified82.3%
if -2.7e25 < z < -1.0499999999999999e-121Initial program 99.8%
Taylor expanded in t around inf 72.6%
if -1.0499999999999999e-121 < z < 4.59999999999999971e-33Initial program 99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
metadata-eval99.8%
associate-*l/99.8%
metadata-eval99.8%
associate-*l/99.8%
associate-/r/99.8%
associate-/l*99.7%
metadata-eval99.7%
associate-*r/99.7%
associate-/r/99.8%
distribute-lft-in99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around 0 72.7%
associate-/r*72.7%
Simplified72.7%
if 4.59999999999999971e-33 < z Initial program 79.8%
Taylor expanded in z around inf 93.0%
div-sub93.0%
sub-neg93.0%
*-inverses93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in x around 0 68.2%
Final simplification73.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -0.0029) (not (<= t 6.5e+18))) (- (/ x y) 2.0) (* (+ 2.0 (/ 2.0 z)) (/ 1.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.0029) || !(t <= 6.5e+18)) {
tmp = (x / y) - 2.0;
} else {
tmp = (2.0 + (2.0 / z)) * (1.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 ((t <= (-0.0029d0)) .or. (.not. (t <= 6.5d+18))) then
tmp = (x / y) - 2.0d0
else
tmp = (2.0d0 + (2.0d0 / z)) * (1.0d0 / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.0029) || !(t <= 6.5e+18)) {
tmp = (x / y) - 2.0;
} else {
tmp = (2.0 + (2.0 / z)) * (1.0 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.0029) or not (t <= 6.5e+18): tmp = (x / y) - 2.0 else: tmp = (2.0 + (2.0 / z)) * (1.0 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -0.0029) || !(t <= 6.5e+18)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(Float64(2.0 + Float64(2.0 / z)) * Float64(1.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -0.0029) || ~((t <= 6.5e+18))) tmp = (x / y) - 2.0; else tmp = (2.0 + (2.0 / z)) * (1.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -0.0029], N[Not[LessEqual[t, 6.5e+18]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0029 \lor \neg \left(t \leq 6.5 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\left(2 + \frac{2}{z}\right) \cdot \frac{1}{t}\\
\end{array}
\end{array}
if t < -0.0029 or 6.5e18 < t Initial program 79.5%
Taylor expanded in t around inf 82.1%
if -0.0029 < t < 6.5e18Initial program 99.8%
Taylor expanded in t around 0 85.8%
associate-*r/85.8%
metadata-eval85.8%
Simplified85.8%
div-inv85.8%
Applied egg-rr85.8%
Final simplification84.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -5.2e-17) (not (<= t 7.5e-53))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.2e-17) || !(t <= 7.5e-53)) {
tmp = (x / y) + (-2.0 + (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 ((t <= (-5.2d-17)) .or. (.not. (t <= 7.5d-53))) then
tmp = (x / y) + ((-2.0d0) + (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 ((t <= -5.2e-17) || !(t <= 7.5e-53)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (2.0 + (2.0 / z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -5.2e-17) or not (t <= 7.5e-53): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = (2.0 + (2.0 / z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -5.2e-17) || !(t <= 7.5e-53)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); 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-17) || ~((t <= 7.5e-53))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = (2.0 + (2.0 / z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.2e-17], N[Not[LessEqual[t, 7.5e-53]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $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^{-17} \lor \neg \left(t \leq 7.5 \cdot 10^{-53}\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -5.20000000000000006e-17 or 7.5000000000000001e-53 < t Initial program 81.0%
Taylor expanded in t around 0 99.9%
associate--l+99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 81.0%
sub-neg81.0%
associate-*r/81.0%
metadata-eval81.0%
metadata-eval81.0%
+-commutative81.0%
Simplified81.0%
if -5.20000000000000006e-17 < t < 7.5000000000000001e-53Initial program 99.8%
Taylor expanded in t around 0 87.4%
associate-*r/87.4%
metadata-eval87.4%
Simplified87.4%
Final simplification84.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.3e-53) (not (<= z 1.35e-30))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (+ (/ x y) (/ 2.0 (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.3e-53) || !(z <= 1.35e-30)) {
tmp = (x / y) + (-2.0 + (2.0 / 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 ((z <= (-5.3d-53)) .or. (.not. (z <= 1.35d-30))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / 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 ((z <= -5.3e-53) || !(z <= 1.35e-30)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + (2.0 / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.3e-53) or not (z <= 1.35e-30): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = (x / y) + (2.0 / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.3e-53) || !(z <= 1.35e-30)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.3e-53) || ~((z <= 1.35e-30))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = (x / y) + (2.0 / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.3e-53], N[Not[LessEqual[z, 1.35e-30]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{-53} \lor \neg \left(z \leq 1.35 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\end{array}
\end{array}
if z < -5.3e-53 or 1.34999999999999994e-30 < z Initial program 82.5%
Taylor expanded in t around 0 100.0%
associate--l+100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 94.2%
sub-neg94.2%
associate-*r/94.2%
metadata-eval94.2%
metadata-eval94.2%
+-commutative94.2%
Simplified94.2%
if -5.3e-53 < z < 1.34999999999999994e-30Initial program 99.8%
Taylor expanded in z around 0 92.6%
Final simplification93.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.3e-53) (not (<= z 3.85e-28))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (+ (/ x y) (/ (/ 2.0 t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.3e-53) || !(z <= 3.85e-28)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + ((2.0 / t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-5.3d-53)) .or. (.not. (z <= 3.85d-28))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
else
tmp = (x / y) + ((2.0d0 / t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.3e-53) || !(z <= 3.85e-28)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + ((2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.3e-53) or not (z <= 3.85e-28): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = (x / y) + ((2.0 / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.3e-53) || !(z <= 3.85e-28)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(Float64(x / y) + Float64(Float64(2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.3e-53) || ~((z <= 3.85e-28))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = (x / y) + ((2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.3e-53], N[Not[LessEqual[z, 3.85e-28]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{-53} \lor \neg \left(z \leq 3.85 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{\frac{2}{t}}{z}\\
\end{array}
\end{array}
if z < -5.3e-53 or 3.85e-28 < z Initial program 82.5%
Taylor expanded in t around 0 100.0%
associate--l+100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 94.2%
sub-neg94.2%
associate-*r/94.2%
metadata-eval94.2%
metadata-eval94.2%
+-commutative94.2%
Simplified94.2%
if -5.3e-53 < z < 3.85e-28Initial program 99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in x around 0 92.6%
+-commutative92.6%
associate-*r/92.6%
metadata-eval92.6%
associate-/r*92.6%
Simplified92.6%
Final simplification93.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.65e+125)
(/ 2.0 t)
(if (or (<= z -8.5e-122) (not (<= z 3.3e-19)))
(- (/ x y) 2.0)
(/ 2.0 (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.65e+125) {
tmp = 2.0 / t;
} else if ((z <= -8.5e-122) || !(z <= 3.3e-19)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.65d+125)) then
tmp = 2.0d0 / t
else if ((z <= (-8.5d-122)) .or. (.not. (z <= 3.3d-19))) then
tmp = (x / y) - 2.0d0
else
tmp = 2.0d0 / (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.65e+125) {
tmp = 2.0 / t;
} else if ((z <= -8.5e-122) || !(z <= 3.3e-19)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / (z * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.65e+125: tmp = 2.0 / t elif (z <= -8.5e-122) or not (z <= 3.3e-19): tmp = (x / y) - 2.0 else: tmp = 2.0 / (z * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.65e+125) tmp = Float64(2.0 / t); elseif ((z <= -8.5e-122) || !(z <= 3.3e-19)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(2.0 / Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.65e+125) tmp = 2.0 / t; elseif ((z <= -8.5e-122) || ~((z <= 3.3e-19))) tmp = (x / y) - 2.0; else tmp = 2.0 / (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.65e+125], N[(2.0 / t), $MachinePrecision], If[Or[LessEqual[z, -8.5e-122], N[Not[LessEqual[z, 3.3e-19]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+125}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-122} \lor \neg \left(z \leq 3.3 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\end{array}
\end{array}
if z < -1.65000000000000003e125Initial program 76.8%
Taylor expanded in t around 0 56.0%
associate-*r/56.0%
metadata-eval56.0%
Simplified56.0%
div-inv56.0%
Applied egg-rr56.0%
Taylor expanded in z around inf 56.0%
if -1.65000000000000003e125 < z < -8.50000000000000003e-122 or 3.2999999999999998e-19 < z Initial program 85.8%
Taylor expanded in t around inf 61.7%
if -8.50000000000000003e-122 < z < 3.2999999999999998e-19Initial program 99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
associate--l+99.8%
associate-*r/99.8%
metadata-eval99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
metadata-eval99.8%
associate-*l/99.8%
metadata-eval99.8%
associate-*l/99.8%
associate-/r/99.8%
associate-/l*99.7%
metadata-eval99.7%
associate-*r/99.7%
associate-/r/99.8%
distribute-lft-in99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around 0 72.3%
Final simplification65.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -0.0045) (not (<= t 6.4e+18))) (- (/ x y) 2.0) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.0045) || !(t <= 6.4e+18)) {
tmp = (x / y) - 2.0;
} else {
tmp = (2.0 + (2.0 / z)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-0.0045d0)) .or. (.not. (t <= 6.4d+18))) then
tmp = (x / y) - 2.0d0
else
tmp = (2.0d0 + (2.0d0 / z)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.0045) || !(t <= 6.4e+18)) {
tmp = (x / y) - 2.0;
} else {
tmp = (2.0 + (2.0 / z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.0045) or not (t <= 6.4e+18): tmp = (x / y) - 2.0 else: tmp = (2.0 + (2.0 / z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -0.0045) || !(t <= 6.4e+18)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(Float64(2.0 + Float64(2.0 / z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -0.0045) || ~((t <= 6.4e+18))) tmp = (x / y) - 2.0; else tmp = (2.0 + (2.0 / z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -0.0045], N[Not[LessEqual[t, 6.4e+18]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0045 \lor \neg \left(t \leq 6.4 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -0.00449999999999999966 or 6.4e18 < t Initial program 79.5%
Taylor expanded in t around inf 82.1%
if -0.00449999999999999966 < t < 6.4e18Initial program 99.8%
Taylor expanded in t around 0 85.8%
associate-*r/85.8%
metadata-eval85.8%
Simplified85.8%
Final simplification84.1%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -40000000000000.0) (/ x y) (if (<= (/ x y) 3.65e+90) (/ 2.0 t) (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -40000000000000.0) {
tmp = x / y;
} else if ((x / y) <= 3.65e+90) {
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) <= (-40000000000000.0d0)) then
tmp = x / y
else if ((x / y) <= 3.65d+90) 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) <= -40000000000000.0) {
tmp = x / y;
} else if ((x / y) <= 3.65e+90) {
tmp = 2.0 / t;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -40000000000000.0: tmp = x / y elif (x / y) <= 3.65e+90: tmp = 2.0 / t else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -40000000000000.0) tmp = Float64(x / y); elseif (Float64(x / y) <= 3.65e+90) 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) <= -40000000000000.0) tmp = x / y; elseif ((x / y) <= 3.65e+90) tmp = 2.0 / t; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -40000000000000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 3.65e+90], N[(2.0 / t), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -40000000000000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 3.65 \cdot 10^{+90}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -4e13 or 3.64999999999999997e90 < (/.f64 x y) Initial program 90.8%
Taylor expanded in x around inf 69.1%
if -4e13 < (/.f64 x y) < 3.64999999999999997e90Initial program 90.8%
Taylor expanded in t around 0 72.2%
associate-*r/72.2%
metadata-eval72.2%
Simplified72.2%
div-inv72.2%
Applied egg-rr72.2%
Taylor expanded in z around inf 30.1%
Final simplification45.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.95e-57) (not (<= t 1.3e-33))) (- (/ x y) 2.0) (/ 2.0 t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.95e-57) || !(t <= 1.3e-33)) {
tmp = (x / y) - 2.0;
} else {
tmp = 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 ((t <= (-3.95d-57)) .or. (.not. (t <= 1.3d-33))) then
tmp = (x / y) - 2.0d0
else
tmp = 2.0d0 / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.95e-57) || !(t <= 1.3e-33)) {
tmp = (x / y) - 2.0;
} else {
tmp = 2.0 / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.95e-57) or not (t <= 1.3e-33): tmp = (x / y) - 2.0 else: tmp = 2.0 / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.95e-57) || !(t <= 1.3e-33)) tmp = Float64(Float64(x / y) - 2.0); else tmp = Float64(2.0 / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.95e-57) || ~((t <= 1.3e-33))) tmp = (x / y) - 2.0; else tmp = 2.0 / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.95e-57], N[Not[LessEqual[t, 1.3e-33]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(2.0 / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.95 \cdot 10^{-57} \lor \neg \left(t \leq 1.3 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t}\\
\end{array}
\end{array}
if t < -3.9499999999999999e-57 or 1.29999999999999997e-33 < t Initial program 82.2%
Taylor expanded in t around inf 75.5%
if -3.9499999999999999e-57 < t < 1.29999999999999997e-33Initial program 99.8%
Taylor expanded in t around 0 88.9%
associate-*r/88.9%
metadata-eval88.9%
Simplified88.9%
div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in z around inf 39.3%
Final simplification57.7%
(FPCore (x y z t) :precision binary64 (/ 2.0 t))
double code(double x, double y, double z, double t) {
return 2.0 / t;
}
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 / t
end function
public static double code(double x, double y, double z, double t) {
return 2.0 / t;
}
def code(x, y, z, t): return 2.0 / t
function code(x, y, z, t) return Float64(2.0 / t) end
function tmp = code(x, y, z, t) tmp = 2.0 / t; end
code[x_, y_, z_, t_] := N[(2.0 / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{t}
\end{array}
Initial program 90.8%
Taylor expanded in t around 0 57.0%
associate-*r/57.0%
metadata-eval57.0%
Simplified57.0%
div-inv57.0%
Applied egg-rr57.0%
Taylor expanded in z around inf 22.1%
Final simplification22.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 2023279
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:herbie-target
(- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y)))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))