
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (/ (+ 2.0 (* (- 1.0 t) (* 2.0 z))) (* t z))))) (if (<= t_1 INFINITY) t_1 (- (/ x y) 2.0))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (t * z));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (t * z));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x / y) - 2.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (t * z)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x / y) - 2.0 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(1.0 - t) * Float64(2.0 * z))) / Float64(t * z))) tmp = 0.0 if (t_1 <= Inf) 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 = (x / y) + ((2.0 + ((1.0 - t) * (2.0 * z))) / (t * z)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x / y) - 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(1.0 - t), $MachinePrecision] * N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x / y), $MachinePrecision] - 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2 + \left(1 - t\right) \cdot \left(2 \cdot z\right)}{t \cdot z}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - 2\\
\end{array}
\end{array}
if (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) < +inf.0Initial program 99.8%
if +inf.0 < (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) Initial program 0.0%
Taylor expanded in t around inf 96.9%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ 2.0 t))) (t_2 (+ (/ x y) (/ 2.0 t))))
(if (<= (/ x y) -70.0)
t_2
(if (<= (/ x y) -3.1e-114)
t_1
(if (<= (/ x y) -1e-179)
(/ (/ 2.0 t) z)
(if (<= (/ x y) 3.9e-83)
t_1
(if (<= (/ x y) 86000000000000.0) (/ 2.0 (* t z)) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (2.0 / t);
double t_2 = (x / y) + (2.0 / t);
double tmp;
if ((x / y) <= -70.0) {
tmp = t_2;
} else if ((x / y) <= -3.1e-114) {
tmp = t_1;
} else if ((x / y) <= -1e-179) {
tmp = (2.0 / t) / z;
} else if ((x / y) <= 3.9e-83) {
tmp = t_1;
} else if ((x / y) <= 86000000000000.0) {
tmp = 2.0 / (t * z);
} 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) + (2.0d0 / t)
t_2 = (x / y) + (2.0d0 / t)
if ((x / y) <= (-70.0d0)) then
tmp = t_2
else if ((x / y) <= (-3.1d-114)) then
tmp = t_1
else if ((x / y) <= (-1d-179)) then
tmp = (2.0d0 / t) / z
else if ((x / y) <= 3.9d-83) then
tmp = t_1
else if ((x / y) <= 86000000000000.0d0) then
tmp = 2.0d0 / (t * z)
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 + (2.0 / t);
double t_2 = (x / y) + (2.0 / t);
double tmp;
if ((x / y) <= -70.0) {
tmp = t_2;
} else if ((x / y) <= -3.1e-114) {
tmp = t_1;
} else if ((x / y) <= -1e-179) {
tmp = (2.0 / t) / z;
} else if ((x / y) <= 3.9e-83) {
tmp = t_1;
} else if ((x / y) <= 86000000000000.0) {
tmp = 2.0 / (t * z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (2.0 / t) t_2 = (x / y) + (2.0 / t) tmp = 0 if (x / y) <= -70.0: tmp = t_2 elif (x / y) <= -3.1e-114: tmp = t_1 elif (x / y) <= -1e-179: tmp = (2.0 / t) / z elif (x / y) <= 3.9e-83: tmp = t_1 elif (x / y) <= 86000000000000.0: tmp = 2.0 / (t * z) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(2.0 / t)) t_2 = Float64(Float64(x / y) + Float64(2.0 / t)) tmp = 0.0 if (Float64(x / y) <= -70.0) tmp = t_2; elseif (Float64(x / y) <= -3.1e-114) tmp = t_1; elseif (Float64(x / y) <= -1e-179) tmp = Float64(Float64(2.0 / t) / z); elseif (Float64(x / y) <= 3.9e-83) tmp = t_1; elseif (Float64(x / y) <= 86000000000000.0) tmp = Float64(2.0 / Float64(t * z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (2.0 / t); t_2 = (x / y) + (2.0 / t); tmp = 0.0; if ((x / y) <= -70.0) tmp = t_2; elseif ((x / y) <= -3.1e-114) tmp = t_1; elseif ((x / y) <= -1e-179) tmp = (2.0 / t) / z; elseif ((x / y) <= 3.9e-83) tmp = t_1; elseif ((x / y) <= 86000000000000.0) tmp = 2.0 / (t * z); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -70.0], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -3.1e-114], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -1e-179], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 3.9e-83], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 86000000000000.0], N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{2}{t}\\
t_2 := \frac{x}{y} + \frac{2}{t}\\
\mathbf{if}\;\frac{x}{y} \leq -70:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq -3.1 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -1 \cdot 10^{-179}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{elif}\;\frac{x}{y} \leq 3.9 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 86000000000000:\\
\;\;\;\;\frac{2}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 x y) < -70 or 8.6e13 < (/.f64 x y) Initial program 85.6%
Taylor expanded in t around 0 97.9%
Taylor expanded in z around inf 82.6%
associate-*r/82.6%
metadata-eval82.6%
+-commutative82.6%
Simplified82.6%
if -70 < (/.f64 x y) < -3.1e-114 or -1e-179 < (/.f64 x y) < 3.9e-83Initial program 85.4%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 98.8%
associate-*r/98.8%
metadata-eval98.8%
associate-/r*98.7%
+-commutative98.7%
associate-/l/98.8%
div-sub98.8%
sub-neg98.8%
*-inverses98.8%
metadata-eval98.8%
distribute-lft-in98.8%
associate-*r/98.8%
metadata-eval98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around inf 64.5%
sub-neg64.5%
metadata-eval64.5%
associate-*r/64.5%
metadata-eval64.5%
+-commutative64.5%
Simplified64.5%
if -3.1e-114 < (/.f64 x y) < -1e-179Initial program 99.6%
Taylor expanded in t around 0 82.8%
Taylor expanded in x around 0 82.8%
associate-*r/82.8%
metadata-eval82.8%
associate-+r+82.8%
associate-*r/82.8%
metadata-eval82.8%
associate-/r*82.9%
+-commutative82.9%
associate-+r+82.9%
+-commutative82.9%
+-commutative82.9%
associate-+l+82.9%
+-commutative82.9%
+-commutative82.9%
metadata-eval82.9%
associate-*r/82.9%
*-commutative82.9%
*-rgt-identity82.9%
associate-*r/82.8%
Simplified82.5%
Taylor expanded in z around 0 74.1%
associate-/r*74.3%
Simplified74.3%
if 3.9e-83 < (/.f64 x y) < 8.6e13Initial program 99.9%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification74.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)) (t_2 (/ 2.0 (* t z))))
(if (<= (/ x y) -3e+115)
(/ x y)
(if (<= (/ x y) -1.18e+89)
t_2
(if (<= (/ x y) -1.6e-15)
t_1
(if (<= (/ x y) 1.12e-81)
(+ -2.0 (/ 2.0 t))
(if (<= (/ x y) 4.2e+15) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) - 2.0;
double t_2 = 2.0 / (t * z);
double tmp;
if ((x / y) <= -3e+115) {
tmp = x / y;
} else if ((x / y) <= -1.18e+89) {
tmp = t_2;
} else if ((x / y) <= -1.6e-15) {
tmp = t_1;
} else if ((x / y) <= 1.12e-81) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 4.2e+15) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / y) - 2.0d0
t_2 = 2.0d0 / (t * z)
if ((x / y) <= (-3d+115)) then
tmp = x / y
else if ((x / y) <= (-1.18d+89)) then
tmp = t_2
else if ((x / y) <= (-1.6d-15)) then
tmp = t_1
else if ((x / y) <= 1.12d-81) then
tmp = (-2.0d0) + (2.0d0 / t)
else if ((x / y) <= 4.2d+15) then
tmp = t_2
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 t_2 = 2.0 / (t * z);
double tmp;
if ((x / y) <= -3e+115) {
tmp = x / y;
} else if ((x / y) <= -1.18e+89) {
tmp = t_2;
} else if ((x / y) <= -1.6e-15) {
tmp = t_1;
} else if ((x / y) <= 1.12e-81) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 4.2e+15) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) - 2.0 t_2 = 2.0 / (t * z) tmp = 0 if (x / y) <= -3e+115: tmp = x / y elif (x / y) <= -1.18e+89: tmp = t_2 elif (x / y) <= -1.6e-15: tmp = t_1 elif (x / y) <= 1.12e-81: tmp = -2.0 + (2.0 / t) elif (x / y) <= 4.2e+15: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) - 2.0) t_2 = Float64(2.0 / Float64(t * z)) tmp = 0.0 if (Float64(x / y) <= -3e+115) tmp = Float64(x / y); elseif (Float64(x / y) <= -1.18e+89) tmp = t_2; elseif (Float64(x / y) <= -1.6e-15) tmp = t_1; elseif (Float64(x / y) <= 1.12e-81) tmp = Float64(-2.0 + Float64(2.0 / t)); elseif (Float64(x / y) <= 4.2e+15) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) - 2.0; t_2 = 2.0 / (t * z); tmp = 0.0; if ((x / y) <= -3e+115) tmp = x / y; elseif ((x / y) <= -1.18e+89) tmp = t_2; elseif ((x / y) <= -1.6e-15) tmp = t_1; elseif ((x / y) <= 1.12e-81) tmp = -2.0 + (2.0 / t); elseif ((x / y) <= 4.2e+15) tmp = t_2; 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]}, Block[{t$95$2 = N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -3e+115], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -1.18e+89], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -1.6e-15], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 1.12e-81], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 4.2e+15], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - 2\\
t_2 := \frac{2}{t \cdot z}\\
\mathbf{if}\;\frac{x}{y} \leq -3 \cdot 10^{+115}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -1.18 \cdot 10^{+89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq -1.6 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 1.12 \cdot 10^{-81}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -3e115Initial program 83.7%
Taylor expanded in x around inf 78.0%
if -3e115 < (/.f64 x y) < -1.17999999999999993e89 or 1.1200000000000001e-81 < (/.f64 x y) < 4.2e15Initial program 99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in z around 0 68.0%
*-commutative68.0%
Simplified68.0%
if -1.17999999999999993e89 < (/.f64 x y) < -1.6e-15 or 4.2e15 < (/.f64 x y) Initial program 84.8%
Taylor expanded in t around inf 74.6%
if -1.6e-15 < (/.f64 x y) < 1.1200000000000001e-81Initial program 87.4%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-/r*99.9%
+-commutative99.9%
associate-/l/99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
distribute-lft-in99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 61.1%
sub-neg61.1%
metadata-eval61.1%
associate-*r/61.1%
metadata-eval61.1%
+-commutative61.1%
Simplified61.1%
Final simplification69.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x y) 2.0)))
(if (<= (/ x y) -2.8e+115)
(/ x y)
(if (<= (/ x y) -2.8e+83)
(/ (/ 2.0 t) z)
(if (<= (/ x y) -8e-16)
t_1
(if (<= (/ x y) 1.02e-81)
(+ -2.0 (/ 2.0 t))
(if (<= (/ x y) 2.7e+14) (/ 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 ((x / y) <= -2.8e+115) {
tmp = x / y;
} else if ((x / y) <= -2.8e+83) {
tmp = (2.0 / t) / z;
} else if ((x / y) <= -8e-16) {
tmp = t_1;
} else if ((x / y) <= 1.02e-81) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 2.7e+14) {
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 ((x / y) <= (-2.8d+115)) then
tmp = x / y
else if ((x / y) <= (-2.8d+83)) then
tmp = (2.0d0 / t) / z
else if ((x / y) <= (-8d-16)) then
tmp = t_1
else if ((x / y) <= 1.02d-81) then
tmp = (-2.0d0) + (2.0d0 / t)
else if ((x / y) <= 2.7d+14) 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 ((x / y) <= -2.8e+115) {
tmp = x / y;
} else if ((x / y) <= -2.8e+83) {
tmp = (2.0 / t) / z;
} else if ((x / y) <= -8e-16) {
tmp = t_1;
} else if ((x / y) <= 1.02e-81) {
tmp = -2.0 + (2.0 / t);
} else if ((x / y) <= 2.7e+14) {
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 (x / y) <= -2.8e+115: tmp = x / y elif (x / y) <= -2.8e+83: tmp = (2.0 / t) / z elif (x / y) <= -8e-16: tmp = t_1 elif (x / y) <= 1.02e-81: tmp = -2.0 + (2.0 / t) elif (x / y) <= 2.7e+14: 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 (Float64(x / y) <= -2.8e+115) tmp = Float64(x / y); elseif (Float64(x / y) <= -2.8e+83) tmp = Float64(Float64(2.0 / t) / z); elseif (Float64(x / y) <= -8e-16) tmp = t_1; elseif (Float64(x / y) <= 1.02e-81) tmp = Float64(-2.0 + Float64(2.0 / t)); elseif (Float64(x / y) <= 2.7e+14) 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 ((x / y) <= -2.8e+115) tmp = x / y; elseif ((x / y) <= -2.8e+83) tmp = (2.0 / t) / z; elseif ((x / y) <= -8e-16) tmp = t_1; elseif ((x / y) <= 1.02e-81) tmp = -2.0 + (2.0 / t); elseif ((x / y) <= 2.7e+14) 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[N[(x / y), $MachinePrecision], -2.8e+115], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -2.8e+83], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -8e-16], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 1.02e-81], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2.7e+14], 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}\;\frac{x}{y} \leq -2.8 \cdot 10^{+115}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -2.8 \cdot 10^{+83}:\\
\;\;\;\;\frac{\frac{2}{t}}{z}\\
\mathbf{elif}\;\frac{x}{y} \leq -8 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 1.02 \cdot 10^{-81}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{elif}\;\frac{x}{y} \leq 2.7 \cdot 10^{+14}:\\
\;\;\;\;\frac{2}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -2.8e115Initial program 83.7%
Taylor expanded in x around inf 78.0%
if -2.8e115 < (/.f64 x y) < -2.8e83Initial program 99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in x around 0 99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-+r+99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/r*100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
+-commutative100.0%
metadata-eval100.0%
associate-*r/100.0%
*-commutative100.0%
*-rgt-identity100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in z around 0 63.8%
associate-/r*64.0%
Simplified64.0%
if -2.8e83 < (/.f64 x y) < -7.9999999999999998e-16 or 2.7e14 < (/.f64 x y) Initial program 84.8%
Taylor expanded in t around inf 74.6%
if -7.9999999999999998e-16 < (/.f64 x y) < 1.01999999999999998e-81Initial program 87.4%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-/r*99.9%
+-commutative99.9%
associate-/l/99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
distribute-lft-in99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 61.1%
sub-neg61.1%
metadata-eval61.1%
associate-*r/61.1%
metadata-eval61.1%
+-commutative61.1%
Simplified61.1%
if 1.01999999999999998e-81 < (/.f64 x y) < 2.7e14Initial program 99.9%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification69.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ 2.0 (/ 2.0 z))))
(if (or (<= (/ x y) -2e+30) (not (<= (/ x y) 5e+76)))
(/ (+ x (* y (/ t_1 t))) y)
(/ (+ t_1 (* t (+ (/ x y) -2.0))) t))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 + (2.0 / z);
double tmp;
if (((x / y) <= -2e+30) || !((x / y) <= 5e+76)) {
tmp = (x + (y * (t_1 / t))) / y;
} else {
tmp = (t_1 + (t * ((x / y) + -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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 + (2.0d0 / z)
if (((x / y) <= (-2d+30)) .or. (.not. ((x / y) <= 5d+76))) then
tmp = (x + (y * (t_1 / t))) / y
else
tmp = (t_1 + (t * ((x / y) + (-2.0d0)))) / t
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);
double tmp;
if (((x / y) <= -2e+30) || !((x / y) <= 5e+76)) {
tmp = (x + (y * (t_1 / t))) / y;
} else {
tmp = (t_1 + (t * ((x / y) + -2.0))) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 + (2.0 / z) tmp = 0 if ((x / y) <= -2e+30) or not ((x / y) <= 5e+76): tmp = (x + (y * (t_1 / t))) / y else: tmp = (t_1 + (t * ((x / y) + -2.0))) / t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 + Float64(2.0 / z)) tmp = 0.0 if ((Float64(x / y) <= -2e+30) || !(Float64(x / y) <= 5e+76)) tmp = Float64(Float64(x + Float64(y * Float64(t_1 / t))) / y); else tmp = Float64(Float64(t_1 + Float64(t * Float64(Float64(x / y) + -2.0))) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 + (2.0 / z); tmp = 0.0; if (((x / y) <= -2e+30) || ~(((x / y) <= 5e+76))) tmp = (x + (y * (t_1 / t))) / y; else tmp = (t_1 + (t * ((x / y) + -2.0))) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(x / y), $MachinePrecision], -2e+30], N[Not[LessEqual[N[(x / y), $MachinePrecision], 5e+76]], $MachinePrecision]], N[(N[(x + N[(y * N[(t$95$1 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(t$95$1 + N[(t * N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 + \frac{2}{z}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+30} \lor \neg \left(\frac{x}{y} \leq 5 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{t\_1}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 + t \cdot \left(\frac{x}{y} + -2\right)}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -2e30 or 4.99999999999999991e76 < (/.f64 x y) Initial program 86.2%
Taylor expanded in t around 0 98.2%
Taylor expanded in y around 0 98.3%
associate-*r/98.3%
metadata-eval98.3%
associate-*r/98.3%
metadata-eval98.3%
associate-/r*98.3%
+-commutative98.3%
+-commutative98.3%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in t around 0 99.2%
associate-/l*98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
if -2e30 < (/.f64 x y) < 4.99999999999999991e76Initial program 88.3%
Taylor expanded in t around 0 99.8%
associate-+r+99.8%
associate-*r/99.8%
metadata-eval99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -5000.0) (not (<= (/ x y) 1.0))) (+ (/ x y) (/ (+ 2.0 (/ 2.0 z)) t)) (+ (/ 2.0 (* t z)) (+ -2.0 (/ 2.0 t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5000.0) || !((x / y) <= 1.0)) {
tmp = (x / y) + ((2.0 + (2.0 / z)) / t);
} else {
tmp = (2.0 / (t * z)) + (-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) <= (-5000.0d0)) .or. (.not. ((x / y) <= 1.0d0))) then
tmp = (x / y) + ((2.0d0 + (2.0d0 / z)) / t)
else
tmp = (2.0d0 / (t * z)) + ((-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) <= -5000.0) || !((x / y) <= 1.0)) {
tmp = (x / y) + ((2.0 + (2.0 / z)) / t);
} else {
tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5000.0) or not ((x / y) <= 1.0): tmp = (x / y) + ((2.0 + (2.0 / z)) / t) else: tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5000.0) || !(Float64(x / y) <= 1.0)) tmp = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(2.0 / z)) / t)); else tmp = Float64(Float64(2.0 / Float64(t * z)) + 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) <= -5000.0) || ~(((x / y) <= 1.0))) tmp = (x / y) + ((2.0 + (2.0 / z)) / t); else tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1.0]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5000 \lor \neg \left(\frac{x}{y} \leq 1\right):\\
\;\;\;\;\frac{x}{y} + \frac{2 + \frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot z} + \left(-2 + \frac{2}{t}\right)\\
\end{array}
\end{array}
if (/.f64 x y) < -5e3 or 1 < (/.f64 x y) Initial program 86.0%
Taylor expanded in t around 0 97.8%
Taylor expanded in x around 0 97.8%
associate-*r/97.8%
metadata-eval97.8%
associate-+r+97.8%
associate-*r/97.8%
metadata-eval97.8%
associate-/r*97.8%
+-commutative97.8%
associate-+r+97.8%
+-commutative97.8%
+-commutative97.8%
associate-+l+97.8%
+-commutative97.8%
+-commutative97.8%
metadata-eval97.8%
associate-*r/97.8%
*-commutative97.8%
*-rgt-identity97.8%
associate-*r/97.8%
Simplified97.8%
if -5e3 < (/.f64 x y) < 1Initial program 88.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.0%
associate-*r/99.0%
metadata-eval99.0%
associate-/r*99.0%
+-commutative99.0%
associate-/l/99.0%
div-sub99.0%
sub-neg99.0%
*-inverses99.0%
metadata-eval99.0%
distribute-lft-in99.0%
associate-*r/99.0%
metadata-eval99.0%
metadata-eval99.0%
Simplified99.0%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e+33) (not (<= z 1.0))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (+ (/ x y) (/ (+ 2.0 (* z (* t -2.0))) (* t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e+33) || !(z <= 1.0)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + ((2.0 + (z * (t * -2.0))) / (t * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.7d+33)) .or. (.not. (z <= 1.0d0))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
else
tmp = (x / y) + ((2.0d0 + (z * (t * (-2.0d0)))) / (t * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e+33) || !(z <= 1.0)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + ((2.0 + (z * (t * -2.0))) / (t * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.7e+33) or not (z <= 1.0): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = (x / y) + ((2.0 + (z * (t * -2.0))) / (t * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.7e+33) || !(z <= 1.0)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(z * Float64(t * -2.0))) / Float64(t * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.7e+33) || ~((z <= 1.0))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = (x / y) + ((2.0 + (z * (t * -2.0))) / (t * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e+33], N[Not[LessEqual[z, 1.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[(z * N[(t * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+33} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{2 + z \cdot \left(t \cdot -2\right)}{t \cdot z}\\
\end{array}
\end{array}
if z < -1.7e33 or 1 < z Initial program 75.5%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 100.0%
+-commutative100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
distribute-lft-in100.0%
associate-*r/100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
if -1.7e33 < z < 1Initial program 98.4%
Taylor expanded in t around inf 97.1%
associate-*r*97.1%
*-commutative97.1%
Simplified97.1%
Final simplification98.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ 2.0 (/ 2.0 z)) t)))
(if (<= (/ x y) -50.0)
(/ (+ x (* y t_1)) y)
(if (<= (/ x y) 1.0)
(+ (/ 2.0 (* t z)) (+ -2.0 (/ 2.0 t)))
(+ (/ x y) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (2.0 + (2.0 / z)) / t;
double tmp;
if ((x / y) <= -50.0) {
tmp = (x + (y * t_1)) / y;
} else if ((x / y) <= 1.0) {
tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + 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 + (2.0d0 / z)) / t
if ((x / y) <= (-50.0d0)) then
tmp = (x + (y * t_1)) / y
else if ((x / y) <= 1.0d0) then
tmp = (2.0d0 / (t * z)) + ((-2.0d0) + (2.0d0 / t))
else
tmp = (x / y) + 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 + (2.0 / z)) / t;
double tmp;
if ((x / y) <= -50.0) {
tmp = (x + (y * t_1)) / y;
} else if ((x / y) <= 1.0) {
tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t));
} else {
tmp = (x / y) + t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (2.0 + (2.0 / z)) / t tmp = 0 if (x / y) <= -50.0: tmp = (x + (y * t_1)) / y elif (x / y) <= 1.0: tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t)) else: tmp = (x / y) + t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(2.0 + Float64(2.0 / z)) / t) tmp = 0.0 if (Float64(x / y) <= -50.0) tmp = Float64(Float64(x + Float64(y * t_1)) / y); elseif (Float64(x / y) <= 1.0) tmp = Float64(Float64(2.0 / Float64(t * z)) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(Float64(x / y) + t_1); 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) <= -50.0) tmp = (x + (y * t_1)) / y; elseif ((x / y) <= 1.0) tmp = (2.0 / (t * z)) + (-2.0 + (2.0 / t)); else tmp = (x / y) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -50.0], N[(N[(x + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1.0], N[(N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2 + \frac{2}{z}}{t}\\
\mathbf{if}\;\frac{x}{y} \leq -50:\\
\;\;\;\;\frac{x + y \cdot t\_1}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 1:\\
\;\;\;\;\frac{2}{t \cdot z} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -50Initial program 83.5%
Taylor expanded in t around 0 95.9%
Taylor expanded in y around 0 96.1%
associate-*r/96.1%
metadata-eval96.1%
associate-*r/96.1%
metadata-eval96.1%
associate-/r*96.1%
+-commutative96.1%
+-commutative96.1%
associate-/l/96.1%
Simplified96.1%
Taylor expanded in t around 0 97.5%
associate-/l*96.1%
associate-*r/96.1%
metadata-eval96.1%
Simplified96.1%
if -50 < (/.f64 x y) < 1Initial program 88.8%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.0%
associate-*r/99.0%
metadata-eval99.0%
associate-/r*98.9%
+-commutative98.9%
associate-/l/99.0%
div-sub99.0%
sub-neg99.0%
*-inverses99.0%
metadata-eval99.0%
distribute-lft-in99.0%
associate-*r/99.0%
metadata-eval99.0%
metadata-eval99.0%
Simplified99.0%
if 1 < (/.f64 x y) Initial program 88.6%
Taylor expanded in t around 0 99.5%
Taylor expanded in x around 0 99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-+r+99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-/r*99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
+-commutative99.5%
metadata-eval99.5%
associate-*r/99.5%
*-commutative99.5%
*-rgt-identity99.5%
associate-*r/99.5%
Simplified99.5%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -7600.0) (not (<= (/ x y) 10000000000.0))) (/ x y) (+ -2.0 (/ 2.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -7600.0) || !((x / y) <= 10000000000.0)) {
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) <= (-7600.0d0)) .or. (.not. ((x / y) <= 10000000000.0d0))) 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) <= -7600.0) || !((x / y) <= 10000000000.0)) {
tmp = x / y;
} else {
tmp = -2.0 + (2.0 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -7600.0) or not ((x / y) <= 10000000000.0): 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) <= -7600.0) || !(Float64(x / y) <= 10000000000.0)) 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) <= -7600.0) || ~(((x / y) <= 10000000000.0))) 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], -7600.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 10000000000.0]], $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 -7600 \lor \neg \left(\frac{x}{y} \leq 10000000000\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -7600 or 1e10 < (/.f64 x y) Initial program 85.8%
Taylor expanded in x around inf 71.0%
if -7600 < (/.f64 x y) < 1e10Initial program 89.1%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.0%
associate-*r/99.0%
metadata-eval99.0%
associate-/r*99.0%
+-commutative99.0%
associate-/l/99.0%
div-sub99.0%
sub-neg99.0%
*-inverses99.0%
metadata-eval99.0%
distribute-lft-in99.0%
associate-*r/99.0%
metadata-eval99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in z around inf 55.9%
sub-neg55.9%
metadata-eval55.9%
associate-*r/55.9%
metadata-eval55.9%
+-commutative55.9%
Simplified55.9%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1.6e-15) (not (<= (/ x y) 11500000000.0))) (- (/ x y) 2.0) (+ -2.0 (/ 2.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1.6e-15) || !((x / y) <= 11500000000.0)) {
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) <= (-1.6d-15)) .or. (.not. ((x / y) <= 11500000000.0d0))) 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) <= -1.6e-15) || !((x / y) <= 11500000000.0)) {
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) <= -1.6e-15) or not ((x / y) <= 11500000000.0): 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) <= -1.6e-15) || !(Float64(x / y) <= 11500000000.0)) 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) <= -1.6e-15) || ~(((x / y) <= 11500000000.0))) 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], -1.6e-15], N[Not[LessEqual[N[(x / y), $MachinePrecision], 11500000000.0]], $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 -1.6 \cdot 10^{-15} \lor \neg \left(\frac{x}{y} \leq 11500000000\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\end{array}
\end{array}
if (/.f64 x y) < -1.6e-15 or 1.15e10 < (/.f64 x y) Initial program 85.5%
Taylor expanded in t around inf 71.8%
if -1.6e-15 < (/.f64 x y) < 1.15e10Initial program 89.6%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-/r*99.8%
+-commutative99.8%
associate-/l/99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
distribute-lft-in99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 56.1%
sub-neg56.1%
metadata-eval56.1%
associate-*r/56.1%
metadata-eval56.1%
+-commutative56.1%
Simplified56.1%
Final simplification64.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e-44) (not (<= z 7.5e-91))) (+ (/ x y) (+ -2.0 (/ 2.0 t))) (/ 2.0 (* t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-44) || !(z <= 7.5e-91)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = 2.0 / (t * z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.7d-44)) .or. (.not. (z <= 7.5d-91))) then
tmp = (x / y) + ((-2.0d0) + (2.0d0 / t))
else
tmp = 2.0d0 / (t * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-44) || !(z <= 7.5e-91)) {
tmp = (x / y) + (-2.0 + (2.0 / t));
} else {
tmp = 2.0 / (t * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.7e-44) or not (z <= 7.5e-91): tmp = (x / y) + (-2.0 + (2.0 / t)) else: tmp = 2.0 / (t * z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.7e-44) || !(z <= 7.5e-91)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(2.0 / Float64(t * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.7e-44) || ~((z <= 7.5e-91))) tmp = (x / y) + (-2.0 + (2.0 / t)); else tmp = 2.0 / (t * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-44], N[Not[LessEqual[z, 7.5e-91]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-44} \lor \neg \left(z \leq 7.5 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot z}\\
\end{array}
\end{array}
if z < -1.70000000000000008e-44 or 7.50000000000000051e-91 < z Initial program 80.7%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 92.7%
+-commutative92.7%
div-sub92.7%
sub-neg92.7%
*-inverses92.7%
metadata-eval92.7%
distribute-lft-in92.7%
associate-*r/92.7%
metadata-eval92.7%
metadata-eval92.7%
Simplified92.7%
if -1.70000000000000008e-44 < z < 7.50000000000000051e-91Initial program 97.9%
Taylor expanded in x around 0 97.9%
Taylor expanded in z around 0 67.9%
*-commutative67.9%
Simplified67.9%
Final simplification83.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e-14) (not (<= z 0.00205))) (+ (/ 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 <= -1.7e-14) || !(z <= 0.00205)) {
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 <= (-1.7d-14)) .or. (.not. (z <= 0.00205d0))) 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 <= -1.7e-14) || !(z <= 0.00205)) {
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 <= -1.7e-14) or not (z <= 0.00205): 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 <= -1.7e-14) || !(z <= 0.00205)) tmp = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))); else tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(t * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.7e-14) || ~((z <= 0.00205))) 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, -1.7e-14], N[Not[LessEqual[z, 0.00205]], $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[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-14} \lor \neg \left(z \leq 0.00205\right):\\
\;\;\;\;\frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{t \cdot z}\\
\end{array}
\end{array}
if z < -1.70000000000000001e-14 or 0.00205000000000000017 < z Initial program 77.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 99.2%
+-commutative99.2%
div-sub99.2%
sub-neg99.2%
*-inverses99.2%
metadata-eval99.2%
distribute-lft-in99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
if -1.70000000000000001e-14 < z < 0.00205000000000000017Initial program 98.3%
Taylor expanded in z around 0 88.7%
Final simplification94.1%
(FPCore (x y z t) :precision binary64 (+ (* 2.0 (/ 1.0 (* t z))) (+ (* 2.0 (/ (- 1.0 t) t)) (/ x y))))
double code(double x, double y, double z, double t) {
return (2.0 * (1.0 / (t * z))) + ((2.0 * ((1.0 - t) / t)) + (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 * (1.0d0 / (t * z))) + ((2.0d0 * ((1.0d0 - t) / t)) + (x / y))
end function
public static double code(double x, double y, double z, double t) {
return (2.0 * (1.0 / (t * z))) + ((2.0 * ((1.0 - t) / t)) + (x / y));
}
def code(x, y, z, t): return (2.0 * (1.0 / (t * z))) + ((2.0 * ((1.0 - t) / t)) + (x / y))
function code(x, y, z, t) return Float64(Float64(2.0 * Float64(1.0 / Float64(t * z))) + Float64(Float64(2.0 * Float64(Float64(1.0 - t) / t)) + Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = (2.0 * (1.0 / (t * z))) + ((2.0 * ((1.0 - t) / t)) + (x / y)); end
code[x_, y_, z_, t_] := N[(N[(2.0 * N[(1.0 / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{1}{t \cdot z} + \left(2 \cdot \frac{1 - t}{t} + \frac{x}{y}\right)
\end{array}
Initial program 87.4%
Taylor expanded in x around 0 99.2%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -70.0) (not (<= (/ x y) 1.85e-31))) (/ x y) -2.0))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -70.0) || !((x / y) <= 1.85e-31)) {
tmp = x / y;
} else {
tmp = -2.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((x / y) <= (-70.0d0)) .or. (.not. ((x / y) <= 1.85d-31))) then
tmp = x / y
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -70.0) || !((x / y) <= 1.85e-31)) {
tmp = x / y;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -70.0) or not ((x / y) <= 1.85e-31): tmp = x / y else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -70.0) || !(Float64(x / y) <= 1.85e-31)) tmp = Float64(x / y); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -70.0) || ~(((x / y) <= 1.85e-31))) tmp = x / y; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -70.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1.85e-31]], $MachinePrecision]], N[(x / y), $MachinePrecision], -2.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -70 \lor \neg \left(\frac{x}{y} \leq 1.85 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if (/.f64 x y) < -70 or 1.8499999999999999e-31 < (/.f64 x y) Initial program 87.0%
Taylor expanded in x around inf 65.5%
if -70 < (/.f64 x y) < 1.8499999999999999e-31Initial program 87.9%
Taylor expanded in t around inf 34.0%
Taylor expanded in x around 0 33.0%
Final simplification51.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.45e-35) (not (<= t 2.85e-15))) (- (/ x y) 2.0) (/ (+ 2.0 (/ 2.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.45e-35) || !(t <= 2.85e-15)) {
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 <= (-1.45d-35)) .or. (.not. (t <= 2.85d-15))) 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 <= -1.45e-35) || !(t <= 2.85e-15)) {
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 <= -1.45e-35) or not (t <= 2.85e-15): 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 <= -1.45e-35) || !(t <= 2.85e-15)) 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 <= -1.45e-35) || ~((t <= 2.85e-15))) 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, -1.45e-35], N[Not[LessEqual[t, 2.85e-15]], $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 -1.45 \cdot 10^{-35} \lor \neg \left(t \leq 2.85 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x}{y} - 2\\
\mathbf{else}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\end{array}
\end{array}
if t < -1.4500000000000001e-35 or 2.8500000000000002e-15 < t Initial program 78.0%
Taylor expanded in t around inf 79.6%
if -1.4500000000000001e-35 < t < 2.8500000000000002e-15Initial program 98.1%
Taylor expanded in t around 0 82.0%
associate-*r/82.0%
metadata-eval82.0%
Simplified82.0%
Final simplification80.7%
(FPCore (x y z t) :precision binary64 (if (<= t -1.0) -2.0 (if (<= t 1050000000.0) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.0) {
tmp = -2.0;
} else if (t <= 1050000000.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 <= (-1.0d0)) then
tmp = -2.0d0
else if (t <= 1050000000.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 <= -1.0) {
tmp = -2.0;
} else if (t <= 1050000000.0) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.0: tmp = -2.0 elif t <= 1050000000.0: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.0) tmp = -2.0; elseif (t <= 1050000000.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 <= -1.0) tmp = -2.0; elseif (t <= 1050000000.0) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.0], -2.0, If[LessEqual[t, 1050000000.0], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 1050000000:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -1 or 1.05e9 < t Initial program 76.7%
Taylor expanded in t around inf 79.8%
Taylor expanded in x around 0 28.4%
if -1 < t < 1.05e9Initial program 98.2%
Taylor expanded in t around 0 98.2%
Taylor expanded in z around inf 60.0%
associate-*r/60.0%
metadata-eval60.0%
+-commutative60.0%
Simplified60.0%
Taylor expanded in x around 0 36.9%
Final simplification32.6%
(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 87.4%
Taylor expanded in t around inf 52.4%
Taylor expanded in x around 0 15.4%
Final simplification15.4%
(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 2024095
(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))))