
(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 16 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 (+ -2.0 (+ (/ x y) (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
return -2.0 + ((x / y) + ((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 = (-2.0d0) + ((x / y) + ((2.0d0 + (2.0d0 / z)) / t))
end function
public static double code(double x, double y, double z, double t) {
return -2.0 + ((x / y) + ((2.0 + (2.0 / z)) / t));
}
def code(x, y, z, t): return -2.0 + ((x / y) + ((2.0 + (2.0 / z)) / t))
function code(x, y, z, t) return Float64(-2.0 + Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(2.0 / z)) / t))) end
function tmp = code(x, y, z, t) tmp = -2.0 + ((x / y) + ((2.0 + (2.0 / z)) / t)); end
code[x_, y_, z_, t_] := N[(-2.0 + N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-2 + \left(\frac{x}{y} + \frac{2 + \frac{2}{z}}{t}\right)
\end{array}
Initial program 86.9%
Taylor expanded in t around 0 99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
associate-+r+99.5%
metadata-eval99.5%
associate-*r/99.5%
+-commutative99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-/l/99.5%
associate-*r/99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.5%
associate-+r+99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
*-commutative99.5%
metadata-eval99.5%
associate-*r/99.5%
associate-/r*99.5%
*-rgt-identity99.5%
associate-*r/99.5%
distribute-rgt-in99.5%
+-commutative99.5%
associate-*l/99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ 2.0 (* z t)))))
(if (<= (/ x y) -7.8e+155)
(/ x y)
(if (<= (/ x y) 3.35e-161)
t_1
(if (<= (/ x y) 4.1e-36)
(+ -2.0 (/ 2.0 t))
(if (<= (/ x y) 9.2e+17) t_1 (- (/ x y) 2.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (2.0 / (z * t));
double tmp;
if ((x / y) <= -7.8e+155) {
tmp = x / y;
} else if ((x / y) <= 3.35e-161) {
tmp = t_1;
} else if ((x / y) <= 4.1e-36) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 9.2e+17) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) + (2.0d0 / (z * t))
if ((x / y) <= (-7.8d+155)) then
tmp = x / y
else if ((x / y) <= 3.35d-161) then
tmp = t_1
else if ((x / y) <= 4.1d-36) then
tmp = (-2.0d0) + (2.0d0 / t)
else if ((x / y) <= 9.2d+17) then
tmp = t_1
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 t_1 = -2.0 + (2.0 / (z * t));
double tmp;
if ((x / y) <= -7.8e+155) {
tmp = x / y;
} else if ((x / y) <= 3.35e-161) {
tmp = t_1;
} else if ((x / y) <= 4.1e-36) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 9.2e+17) {
tmp = t_1;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (2.0 / (z * t)) tmp = 0 if (x / y) <= -7.8e+155: tmp = x / y elif (x / y) <= 3.35e-161: tmp = t_1 elif (x / y) <= 4.1e-36: tmp = -2.0 + (2.0 / t) elif (x / y) <= 9.2e+17: tmp = t_1 else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(2.0 / Float64(z * t))) tmp = 0.0 if (Float64(x / y) <= -7.8e+155) tmp = Float64(x / y); elseif (Float64(x / y) <= 3.35e-161) tmp = t_1; elseif (Float64(x / y) <= 4.1e-36) tmp = Float64(-2.0 + Float64(2.0 / t)); elseif (Float64(x / y) <= 9.2e+17) tmp = t_1; else tmp = Float64(Float64(x / y) - 2.0); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (2.0 / (z * t)); tmp = 0.0; if ((x / y) <= -7.8e+155) tmp = x / y; elseif ((x / y) <= 3.35e-161) tmp = t_1; elseif ((x / y) <= 4.1e-36) tmp = -2.0 + (2.0 / t); elseif ((x / y) <= 9.2e+17) tmp = t_1; else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -7.8e+155], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 3.35e-161], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 4.1e-36], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 9.2e+17], t$95$1, N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{2}{z \cdot t}\\
\mathbf{if}\;\frac{x}{y} \leq -7.8 \cdot 10^{+155}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 3.35 \cdot 10^{-161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 4.1 \cdot 10^{-36}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 9.2 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
if (/.f64 x y) < -7.7999999999999996e155Initial program 89.3%
Taylor expanded in x around inf 89.8%
if -7.7999999999999996e155 < (/.f64 x y) < 3.35e-161 or 4.10000000000000013e-36 < (/.f64 x y) < 9.2e17Initial program 87.9%
Taylor expanded in t around 0 99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+r+99.8%
metadata-eval99.8%
associate-*r/99.8%
+-commutative99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l/99.9%
associate-*r/99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 71.8%
if 3.35e-161 < (/.f64 x y) < 4.10000000000000013e-36Initial program 81.6%
Taylor expanded in z around inf 82.4%
div-sub82.5%
sub-neg82.5%
*-inverses82.5%
metadata-eval82.5%
Simplified82.5%
Taylor expanded in x around 0 82.5%
sub-neg82.5%
metadata-eval82.5%
distribute-lft-in82.5%
associate-*r/82.5%
metadata-eval82.5%
metadata-eval82.5%
Simplified82.5%
if 9.2e17 < (/.f64 x y) Initial program 85.8%
Taylor expanded in t around inf 70.1%
Final simplification74.2%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -6e+154)
(/ x y)
(if (<= (/ x y) 3.8e-161)
(+ -2.0 (/ (/ 2.0 z) t))
(if (<= (/ x y) 2.15e-36)
(+ -2.0 (/ 2.0 t))
(if (<= (/ x y) 6e+16) (+ -2.0 (/ 2.0 (* z t))) (- (/ x y) 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -6e+154) {
tmp = x / y;
} else if ((x / y) <= 3.8e-161) {
tmp = -2.0 + ((2.0 / z) / t);
} else if ((x / y) <= 2.15e-36) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 6e+16) {
tmp = -2.0 + (2.0 / (z * t));
} 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) <= (-6d+154)) then
tmp = x / y
else if ((x / y) <= 3.8d-161) then
tmp = (-2.0d0) + ((2.0d0 / z) / t)
else if ((x / y) <= 2.15d-36) then
tmp = (-2.0d0) + (2.0d0 / t)
else if ((x / y) <= 6d+16) then
tmp = (-2.0d0) + (2.0d0 / (z * t))
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) <= -6e+154) {
tmp = x / y;
} else if ((x / y) <= 3.8e-161) {
tmp = -2.0 + ((2.0 / z) / t);
} else if ((x / y) <= 2.15e-36) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 6e+16) {
tmp = -2.0 + (2.0 / (z * t));
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -6e+154: tmp = x / y elif (x / y) <= 3.8e-161: tmp = -2.0 + ((2.0 / z) / t) elif (x / y) <= 2.15e-36: tmp = -2.0 + (2.0 / t) elif (x / y) <= 6e+16: tmp = -2.0 + (2.0 / (z * t)) else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -6e+154) tmp = Float64(x / y); elseif (Float64(x / y) <= 3.8e-161) tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); elseif (Float64(x / y) <= 2.15e-36) tmp = Float64(-2.0 + Float64(2.0 / t)); elseif (Float64(x / y) <= 6e+16) tmp = Float64(-2.0 + Float64(2.0 / Float64(z * t))); 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) <= -6e+154) tmp = x / y; elseif ((x / y) <= 3.8e-161) tmp = -2.0 + ((2.0 / z) / t); elseif ((x / y) <= 2.15e-36) tmp = -2.0 + (2.0 / t); elseif ((x / y) <= 6e+16) tmp = -2.0 + (2.0 / (z * t)); else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -6e+154], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 3.8e-161], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2.15e-36], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 6e+16], N[(-2.0 + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -6 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 3.8 \cdot 10^{-161}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 2.15 \cdot 10^{-36}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 6 \cdot 10^{+16}:\\
\;\;\;\;-2 + \frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
if (/.f64 x y) < -6.00000000000000052e154Initial program 89.3%
Taylor expanded in x around inf 89.8%
if -6.00000000000000052e154 < (/.f64 x y) < 3.8000000000000001e-161Initial program 87.1%
Taylor expanded in t around 0 99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+r+99.8%
metadata-eval99.8%
associate-*r/99.8%
+-commutative99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l/99.9%
associate-*r/99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
associate-+r+99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
*-commutative99.8%
metadata-eval99.8%
associate-*r/99.8%
associate-/r*99.9%
*-rgt-identity99.9%
associate-*r/99.8%
distribute-rgt-in99.8%
+-commutative99.8%
associate-*l/99.9%
*-lft-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 81.9%
Taylor expanded in x around 0 71.6%
associate-/l/71.6%
Simplified71.6%
if 3.8000000000000001e-161 < (/.f64 x y) < 2.1500000000000001e-36Initial program 81.6%
Taylor expanded in z around inf 82.4%
div-sub82.5%
sub-neg82.5%
*-inverses82.5%
metadata-eval82.5%
Simplified82.5%
Taylor expanded in x around 0 82.5%
sub-neg82.5%
metadata-eval82.5%
distribute-lft-in82.5%
associate-*r/82.5%
metadata-eval82.5%
metadata-eval82.5%
Simplified82.5%
if 2.1500000000000001e-36 < (/.f64 x y) < 6e16Initial program 99.8%
Taylor expanded in t around 0 99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+r+99.8%
metadata-eval99.8%
associate-*r/99.8%
+-commutative99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l/99.8%
associate-*r/99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 75.0%
if 6e16 < (/.f64 x y) Initial program 85.8%
Taylor expanded in t around inf 70.1%
Final simplification74.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ 2.0 (* z t)))))
(if (<= (/ x y) -200000000000.0)
t_1
(if (<= (/ x y) 8.8e+20)
(+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))
(if (<= (/ x y) 2.9e+118) (+ (/ x y) (+ -2.0 (/ 2.0 t))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / (z * t));
double tmp;
if ((x / y) <= -200000000000.0) {
tmp = t_1;
} else if ((x / y) <= 8.8e+20) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else if ((x / y) <= 2.9e+118) {
tmp = (x / y) + (-2.0 + (2.0 / 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 / (z * t))
if ((x / y) <= (-200000000000.0d0)) then
tmp = t_1
else if ((x / y) <= 8.8d+20) then
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
else if ((x / y) <= 2.9d+118) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / 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 / (z * t));
double tmp;
if ((x / y) <= -200000000000.0) {
tmp = t_1;
} else if ((x / y) <= 8.8e+20) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else if ((x / y) <= 2.9e+118) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / (z * t)) tmp = 0 if (x / y) <= -200000000000.0: tmp = t_1 elif (x / y) <= 8.8e+20: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) elif (x / y) <= 2.9e+118: tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))) tmp = 0.0 if (Float64(x / y) <= -200000000000.0) tmp = t_1; elseif (Float64(x / y) <= 8.8e+20) tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); elseif (Float64(x / y) <= 2.9e+118) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / (z * t)); tmp = 0.0; if ((x / y) <= -200000000000.0) tmp = t_1; elseif ((x / y) <= 8.8e+20) tmp = -2.0 + ((2.0 + (2.0 / z)) / t); elseif ((x / y) <= 2.9e+118) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -200000000000.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 8.8e+20], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2.9e+118], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{if}\;\frac{x}{y} \leq -200000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 8.8 \cdot 10^{+20}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 2.9 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x y) < -2e11 or 2.90000000000000016e118 < (/.f64 x y) Initial program 87.2%
Taylor expanded in z around 0 95.1%
if -2e11 < (/.f64 x y) < 8.8e20Initial program 86.3%
Taylor expanded in t around 0 99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+r+99.9%
metadata-eval99.9%
associate-*r/99.9%
+-commutative99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-/l/99.9%
associate-*r/99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 98.5%
associate-*r/98.5%
metadata-eval98.5%
Simplified98.5%
if 8.8e20 < (/.f64 x y) < 2.90000000000000016e118Initial program 89.9%
Taylor expanded in z around inf 85.7%
div-sub85.7%
sub-neg85.7%
*-inverses85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in x around 0 85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
distribute-lft-in85.7%
associate-*r/85.7%
metadata-eval85.7%
metadata-eval85.7%
Simplified85.7%
Final simplification96.0%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -200000000000.0)
(+ (/ x y) (/ (/ 2.0 z) t))
(if (<= (/ x y) 5e+15)
(+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))
(if (<= (/ x y) 4e+118)
(+ (/ 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 ((x / y) <= -200000000000.0) {
tmp = (x / y) + ((2.0 / z) / t);
} else if ((x / y) <= 5e+15) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else if ((x / y) <= 4e+118) {
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 ((x / y) <= (-200000000000.0d0)) then
tmp = (x / y) + ((2.0d0 / z) / t)
else if ((x / y) <= 5d+15) then
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
else if ((x / y) <= 4d+118) 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 ((x / y) <= -200000000000.0) {
tmp = (x / y) + ((2.0 / z) / t);
} else if ((x / y) <= 5e+15) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else if ((x / y) <= 4e+118) {
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 (x / y) <= -200000000000.0: tmp = (x / y) + ((2.0 / z) / t) elif (x / y) <= 5e+15: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) elif (x / y) <= 4e+118: 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 (Float64(x / y) <= -200000000000.0) tmp = Float64(Float64(x / y) + Float64(Float64(2.0 / z) / t)); elseif (Float64(x / y) <= 5e+15) tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); elseif (Float64(x / y) <= 4e+118) 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 ((x / y) <= -200000000000.0) tmp = (x / y) + ((2.0 / z) / t); elseif ((x / y) <= 5e+15) tmp = -2.0 + ((2.0 + (2.0 / z)) / t); elseif ((x / y) <= 4e+118) 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[LessEqual[N[(x / y), $MachinePrecision], -200000000000.0], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 5e+15], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 4e+118], 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}\;\frac{x}{y} \leq -200000000000:\\
\;\;\;\;\frac{x}{y} + \frac{\frac{2}{z}}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+15}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\end{array}
\end{array}
if (/.f64 x y) < -2e11Initial program 89.7%
Taylor expanded in z around 0 92.7%
*-commutative92.7%
associate-/r*92.7%
Simplified92.7%
if -2e11 < (/.f64 x y) < 5e15Initial program 86.3%
Taylor expanded in t around 0 99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+r+99.9%
metadata-eval99.9%
associate-*r/99.9%
+-commutative99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-/l/99.9%
associate-*r/99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 98.5%
associate-*r/98.5%
metadata-eval98.5%
Simplified98.5%
if 5e15 < (/.f64 x y) < 3.99999999999999987e118Initial program 89.9%
Taylor expanded in z around inf 85.7%
div-sub85.7%
sub-neg85.7%
*-inverses85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in x around 0 85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
distribute-lft-in85.7%
associate-*r/85.7%
metadata-eval85.7%
metadata-eval85.7%
Simplified85.7%
if 3.99999999999999987e118 < (/.f64 x y) Initial program 84.3%
Taylor expanded in z around 0 97.9%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1e+155) (not (<= (/ x y) 1.7e+17))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1e+155) || !((x / y) <= 1.7e+17)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} 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+155)) .or. (.not. ((x / y) <= 1.7d+17))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
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+155) || !((x / y) <= 1.7e+17)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1e+155) or not ((x / y) <= 1.7e+17): tmp = (x / y) + (-2.0 + (2.0 / t)) 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+155) || !(Float64(x / y) <= 1.7e+17)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); 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+155) || ~(((x / y) <= 1.7e+17))) tmp = (x / y) + (-2.0 + (2.0 / t)); 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+155], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1.7e+17]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $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^{+155} \lor \neg \left(\frac{x}{y} \leq 1.7 \cdot 10^{+17}\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1.00000000000000001e155 or 1.7e17 < (/.f64 x y) Initial program 86.8%
Taylor expanded in z around inf 85.5%
div-sub85.5%
sub-neg85.5%
*-inverses85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in x around 0 85.5%
+-commutative85.5%
sub-neg85.5%
metadata-eval85.5%
distribute-lft-in85.5%
associate-*r/85.5%
metadata-eval85.5%
metadata-eval85.5%
Simplified85.5%
if -1.00000000000000001e155 < (/.f64 x y) < 1.7e17Initial program 87.0%
Taylor expanded in t around 0 99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+r+99.8%
metadata-eval99.8%
associate-*r/99.8%
+-commutative99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l/99.9%
associate-*r/99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 91.2%
associate-*r/91.2%
metadata-eval91.2%
Simplified91.2%
Final simplification89.0%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -5.2e+154)
(/ x y)
(if (<= (/ x y) 1.16e+120)
(+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))
(- (/ x y) 2.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -5.2e+154) {
tmp = x / y;
} else if ((x / y) <= 1.16e+120) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} 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) <= (-5.2d+154)) then
tmp = x / y
else if ((x / y) <= 1.16d+120) then
tmp = (-2.0d0) + ((2.0d0 + (2.0d0 / z)) / t)
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) <= -5.2e+154) {
tmp = x / y;
} else if ((x / y) <= 1.16e+120) {
tmp = -2.0 + ((2.0 + (2.0 / z)) / t);
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -5.2e+154: tmp = x / y elif (x / y) <= 1.16e+120: tmp = -2.0 + ((2.0 + (2.0 / z)) / t) else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -5.2e+154) tmp = Float64(x / y); elseif (Float64(x / y) <= 1.16e+120) tmp = Float64(-2.0 + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); 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) <= -5.2e+154) tmp = x / y; elseif ((x / y) <= 1.16e+120) tmp = -2.0 + ((2.0 + (2.0 / z)) / t); else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -5.2e+154], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1.16e+120], N[(-2.0 + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5.2 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 1.16 \cdot 10^{+120}:\\
\;\;\;\;-2 + \frac{2 + \frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
if (/.f64 x y) < -5.19999999999999978e154Initial program 89.3%
Taylor expanded in x around inf 89.8%
if -5.19999999999999978e154 < (/.f64 x y) < 1.16000000000000003e120Initial program 87.5%
Taylor expanded in t around 0 99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+r+99.9%
metadata-eval99.9%
associate-*r/99.9%
+-commutative99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-/l/99.9%
associate-*r/99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 87.9%
associate-*r/87.9%
metadata-eval87.9%
Simplified87.9%
if 1.16000000000000003e120 < (/.f64 x y) Initial program 83.6%
Taylor expanded in t around inf 84.2%
Final simplification87.4%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -28200000.0)
(/ x y)
(if (<= (/ x y) 1.4e-42)
-2.0
(if (<= (/ x y) 1.45e+119) (/ 2.0 t) (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -28200000.0) {
tmp = x / y;
} else if ((x / y) <= 1.4e-42) {
tmp = -2.0;
} else if ((x / y) <= 1.45e+119) {
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) <= (-28200000.0d0)) then
tmp = x / y
else if ((x / y) <= 1.4d-42) then
tmp = -2.0d0
else if ((x / y) <= 1.45d+119) 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) <= -28200000.0) {
tmp = x / y;
} else if ((x / y) <= 1.4e-42) {
tmp = -2.0;
} else if ((x / y) <= 1.45e+119) {
tmp = 2.0 / t;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -28200000.0: tmp = x / y elif (x / y) <= 1.4e-42: tmp = -2.0 elif (x / y) <= 1.45e+119: tmp = 2.0 / t else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -28200000.0) tmp = Float64(x / y); elseif (Float64(x / y) <= 1.4e-42) tmp = -2.0; elseif (Float64(x / y) <= 1.45e+119) 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) <= -28200000.0) tmp = x / y; elseif ((x / y) <= 1.4e-42) tmp = -2.0; elseif ((x / y) <= 1.45e+119) tmp = 2.0 / t; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -28200000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1.4e-42], -2.0, If[LessEqual[N[(x / y), $MachinePrecision], 1.45e+119], N[(2.0 / t), $MachinePrecision], N[(x / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -28200000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 1.4 \cdot 10^{-42}:\\
\;\;\;\;-2\\
\mathbf{elif}\;\frac{x}{y} \leq 1.45 \cdot 10^{+119}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -2.82e7 or 1.45000000000000004e119 < (/.f64 x y) Initial program 87.3%
Taylor expanded in x around inf 71.1%
if -2.82e7 < (/.f64 x y) < 1.39999999999999999e-42Initial program 84.6%
Taylor expanded in z around inf 66.3%
div-sub66.3%
sub-neg66.3%
*-inverses66.3%
metadata-eval66.3%
Simplified66.3%
Taylor expanded in x around 0 64.8%
sub-neg64.8%
metadata-eval64.8%
distribute-lft-in64.8%
associate-*r/64.8%
metadata-eval64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in t around inf 42.1%
if 1.39999999999999999e-42 < (/.f64 x y) < 1.45000000000000004e119Initial program 93.8%
Taylor expanded in t around 0 74.1%
associate-*r/74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in z around inf 44.6%
Final simplification55.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.2e+15) (not (<= z 0.26))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (+ -2.0 (+ (/ x y) (/ (/ 2.0 z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.2e+15) || !(z <= 0.26)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = -2.0 + ((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 <= (-6.2d+15)) .or. (.not. (z <= 0.26d0))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
else
tmp = (-2.0d0) + ((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 <= -6.2e+15) || !(z <= 0.26)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = -2.0 + ((x / y) + ((2.0 / z) / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.2e+15) or not (z <= 0.26): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = -2.0 + ((x / y) + ((2.0 / z) / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.2e+15) || !(z <= 0.26)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(-2.0 + 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 <= -6.2e+15) || ~((z <= 0.26))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = -2.0 + ((x / y) + ((2.0 / z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.2e+15], N[Not[LessEqual[z, 0.26]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+15} \lor \neg \left(z \leq 0.26\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;-2 + \left(\frac{x}{y} + \frac{\frac{2}{z}}{t}\right)\\
\end{array}
\end{array}
if z < -6.2e15 or 0.26000000000000001 < z Initial program 71.5%
Taylor expanded in z around inf 100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
distribute-lft-in100.0%
associate-*r/100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
if -6.2e15 < z < 0.26000000000000001Initial program 99.1%
Taylor expanded in t around 0 99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
associate-+r+99.1%
metadata-eval99.1%
associate-*r/99.1%
+-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
associate-/l/99.2%
associate-*r/99.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in z around 0 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
associate-*r/99.1%
metadata-eval99.1%
*-commutative99.1%
metadata-eval99.1%
associate-*r/99.1%
associate-/r*99.2%
*-rgt-identity99.2%
associate-*r/99.1%
distribute-rgt-in99.1%
+-commutative99.1%
associate-*l/99.2%
*-lft-identity99.2%
Simplified99.2%
Taylor expanded in z around 0 98.6%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -190000000000.0) (not (<= (/ x y) 3.5e+27))) (/ x y) (+ -2.0 (/ 2.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -190000000000.0) || !((x / y) <= 3.5e+27)) {
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) <= (-190000000000.0d0)) .or. (.not. ((x / y) <= 3.5d+27))) 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) <= -190000000000.0) || !((x / y) <= 3.5e+27)) {
tmp = x / y;
} else {
tmp = -2.0 + (2.0 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -190000000000.0) or not ((x / y) <= 3.5e+27): 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) <= -190000000000.0) || !(Float64(x / y) <= 3.5e+27)) 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) <= -190000000000.0) || ~(((x / y) <= 3.5e+27))) 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], -190000000000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 3.5e+27]], $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 -190000000000 \lor \neg \left(\frac{x}{y} \leq 3.5 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1.9e11 or 3.5000000000000002e27 < (/.f64 x y) Initial program 87.2%
Taylor expanded in x around inf 68.4%
if -1.9e11 < (/.f64 x y) < 3.5000000000000002e27Initial program 86.7%
Taylor expanded in z around inf 64.1%
div-sub64.1%
sub-neg64.1%
*-inverses64.1%
metadata-eval64.1%
Simplified64.1%
Taylor expanded in x around 0 62.0%
sub-neg62.0%
metadata-eval62.0%
distribute-lft-in62.0%
associate-*r/62.0%
metadata-eval62.0%
metadata-eval62.0%
Simplified62.0%
Final simplification65.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -6.3e-25) (not (<= (/ x y) 3.5e+27))) (- (/ x y) 2.0) (+ -2.0 (/ 2.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -6.3e-25) || !((x / y) <= 3.5e+27)) {
tmp = (x / y) - 2.0;
} 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) <= (-6.3d-25)) .or. (.not. ((x / y) <= 3.5d+27))) then
tmp = (x / y) - 2.0d0
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) <= -6.3e-25) || !((x / y) <= 3.5e+27)) {
tmp = (x / y) - 2.0;
} else {
tmp = -2.0 + (2.0 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -6.3e-25) or not ((x / y) <= 3.5e+27): tmp = (x / y) - 2.0 else: tmp = -2.0 + (2.0 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -6.3e-25) || !(Float64(x / y) <= 3.5e+27)) tmp = Float64(Float64(x / y) - 2.0); 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) <= -6.3e-25) || ~(((x / y) <= 3.5e+27))) tmp = (x / y) - 2.0; else tmp = -2.0 + (2.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -6.3e-25], N[Not[LessEqual[N[(x / y), $MachinePrecision], 3.5e+27]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -6.3 \cdot 10^{-25} \lor \neg \left(\frac{x}{y} \leq 3.5 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -6.29999999999999961e-25 or 3.5000000000000002e27 < (/.f64 x y) Initial program 86.8%
Taylor expanded in t around inf 65.5%
if -6.29999999999999961e-25 < (/.f64 x y) < 3.5000000000000002e27Initial program 87.1%
Taylor expanded in z around inf 66.4%
div-sub66.5%
sub-neg66.5%
*-inverses66.5%
metadata-eval66.5%
Simplified66.5%
Taylor expanded in x around 0 65.6%
sub-neg65.6%
metadata-eval65.6%
distribute-lft-in65.6%
associate-*r/65.6%
metadata-eval65.6%
metadata-eval65.6%
Simplified65.6%
Final simplification65.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= t -1.72e-71)
t_1
(if (<= t 1.05e-234)
(/ 2.0 (* z t))
(if (<= t 3.9e-56) (+ -2.0 (/ 2.0 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.72e-71) {
tmp = t_1;
} else if (t <= 1.05e-234) {
tmp = 2.0 / (z * t);
} else if (t <= 3.9e-56) {
tmp = -2.0 + (2.0 / 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.72d-71)) then
tmp = t_1
else if (t <= 1.05d-234) then
tmp = 2.0d0 / (z * t)
else if (t <= 3.9d-56) then
tmp = (-2.0d0) + (2.0d0 / 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.72e-71) {
tmp = t_1;
} else if (t <= 1.05e-234) {
tmp = 2.0 / (z * t);
} else if (t <= 3.9e-56) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if t <= -1.72e-71: tmp = t_1 elif t <= 1.05e-234: tmp = 2.0 / (z * t) elif t <= 3.9e-56: tmp = -2.0 + (2.0 / 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.72e-71) tmp = t_1; elseif (t <= 1.05e-234) tmp = Float64(2.0 / Float64(z * t)); elseif (t <= 3.9e-56) tmp = Float64(-2.0 + Float64(2.0 / 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.72e-71) tmp = t_1; elseif (t <= 1.05e-234) tmp = 2.0 / (z * t); elseif (t <= 3.9e-56) tmp = -2.0 + (2.0 / 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.72e-71], t$95$1, If[LessEqual[t, 1.05e-234], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-56], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -1.72 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-234}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-56}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.72e-71 or 3.9e-56 < t Initial program 80.3%
Taylor expanded in t around inf 76.9%
if -1.72e-71 < t < 1.04999999999999996e-234Initial program 98.1%
Taylor expanded in z around 0 67.6%
*-commutative67.6%
associate-/r*67.6%
Simplified67.6%
Taylor expanded in x around 0 61.1%
if 1.04999999999999996e-234 < t < 3.9e-56Initial program 99.6%
Taylor expanded in z around inf 67.9%
div-sub67.9%
sub-neg67.9%
*-inverses67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in x around 0 56.0%
sub-neg56.0%
metadata-eval56.0%
distribute-lft-in56.0%
associate-*r/56.0%
metadata-eval56.0%
metadata-eval56.0%
Simplified56.0%
Final simplification70.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= t -7.2e-71)
t_1
(if (<= t 1.15e-235)
(/ (/ 2.0 z) t)
(if (<= t 9.4e-57) (+ -2.0 (/ 2.0 t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double tmp;
if (t <= -7.2e-71) {
tmp = t_1;
} else if (t <= 1.15e-235) {
tmp = (2.0 / z) / t;
} else if (t <= 9.4e-57) {
tmp = -2.0 + (2.0 / 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 <= (-7.2d-71)) then
tmp = t_1
else if (t <= 1.15d-235) then
tmp = (2.0d0 / z) / t
else if (t <= 9.4d-57) then
tmp = (-2.0d0) + (2.0d0 / 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 <= -7.2e-71) {
tmp = t_1;
} else if (t <= 1.15e-235) {
tmp = (2.0 / z) / t;
} else if (t <= 9.4e-57) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 tmp = 0 if t <= -7.2e-71: tmp = t_1 elif t <= 1.15e-235: tmp = (2.0 / z) / t elif t <= 9.4e-57: tmp = -2.0 + (2.0 / 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 <= -7.2e-71) tmp = t_1; elseif (t <= 1.15e-235) tmp = Float64(Float64(2.0 / z) / t); elseif (t <= 9.4e-57) tmp = Float64(-2.0 + Float64(2.0 / 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 <= -7.2e-71) tmp = t_1; elseif (t <= 1.15e-235) tmp = (2.0 / z) / t; elseif (t <= 9.4e-57) tmp = -2.0 + (2.0 / 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, -7.2e-71], t$95$1, If[LessEqual[t, 1.15e-235], N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 9.4e-57], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-235}:\\
\;\;\;\;\frac{\frac{2}{z}}{t}\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{-57}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.2e-71 or 9.3999999999999996e-57 < t Initial program 80.3%
Taylor expanded in t around inf 76.9%
if -7.2e-71 < t < 1.14999999999999999e-235Initial program 98.1%
Taylor expanded in t around 0 91.9%
associate-*r/91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in z around 0 61.2%
if 1.14999999999999999e-235 < t < 9.3999999999999996e-57Initial program 99.6%
Taylor expanded in z around inf 67.9%
div-sub67.9%
sub-neg67.9%
*-inverses67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in x around 0 56.0%
sub-neg56.0%
metadata-eval56.0%
distribute-lft-in56.0%
associate-*r/56.0%
metadata-eval56.0%
metadata-eval56.0%
Simplified56.0%
Final simplification70.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -13.0) (not (<= t 1.5e-51))) (- (/ x y) 2.0) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -13.0) || !(t <= 1.5e-51)) {
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 <= (-13.0d0)) .or. (.not. (t <= 1.5d-51))) 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 <= -13.0) || !(t <= 1.5e-51)) {
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 <= -13.0) or not (t <= 1.5e-51): 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 <= -13.0) || !(t <= 1.5e-51)) 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 <= -13.0) || ~((t <= 1.5e-51))) 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, -13.0], N[Not[LessEqual[t, 1.5e-51]], $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 -13 \lor \neg \left(t \leq 1.5 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -13 or 1.50000000000000001e-51 < t Initial program 77.7%
Taylor expanded in t around inf 80.5%
if -13 < t < 1.50000000000000001e-51Initial program 98.8%
Taylor expanded in t around 0 84.5%
associate-*r/84.5%
metadata-eval84.5%
Simplified84.5%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (if (<= t -4e-10) -2.0 (if (<= t 1.0) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4e-10) {
tmp = -2.0;
} else if (t <= 1.0) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4d-10)) then
tmp = -2.0d0
else if (t <= 1.0d0) then
tmp = 2.0d0 / t
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4e-10) {
tmp = -2.0;
} else if (t <= 1.0) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4e-10: tmp = -2.0 elif t <= 1.0: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4e-10) tmp = -2.0; elseif (t <= 1.0) tmp = Float64(2.0 / t); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -4e-10) tmp = -2.0; elseif (t <= 1.0) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4e-10], -2.0, If[LessEqual[t, 1.0], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{-10}:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -4.00000000000000015e-10 or 1 < t Initial program 76.4%
Taylor expanded in z around inf 82.7%
div-sub82.7%
sub-neg82.7%
*-inverses82.7%
metadata-eval82.7%
Simplified82.7%
Taylor expanded in x around 0 37.0%
sub-neg37.0%
metadata-eval37.0%
distribute-lft-in37.0%
associate-*r/37.0%
metadata-eval37.0%
metadata-eval37.0%
Simplified37.0%
Taylor expanded in t around inf 35.8%
if -4.00000000000000015e-10 < t < 1Initial program 98.9%
Taylor expanded in t around 0 80.9%
associate-*r/80.9%
metadata-eval80.9%
Simplified80.9%
Taylor expanded in z around inf 36.7%
Final simplification36.2%
(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 86.9%
Taylor expanded in z around inf 70.6%
div-sub70.6%
sub-neg70.6%
*-inverses70.6%
metadata-eval70.6%
Simplified70.6%
Taylor expanded in x around 0 36.9%
sub-neg36.9%
metadata-eval36.9%
distribute-lft-in36.9%
associate-*r/36.9%
metadata-eval36.9%
metadata-eval36.9%
Simplified36.9%
Taylor expanded in t around inf 20.1%
Final simplification20.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 2023320
(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))))