
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ y t) a) (* z (+ x y))) (* y b)) t_1))
(t_3 (- (+ z a) b)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+284)))
t_3
(/ (+ (* t a) (+ (* x z) (* y t_3))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1;
double t_3 = (z + a) - b;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+284)) {
tmp = t_3;
} else {
tmp = ((t * a) + ((x * z) + (y * t_3))) / t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1;
double t_3 = (z + a) - b;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 5e+284)) {
tmp = t_3;
} else {
tmp = ((t * a) + ((x * z) + (y * t_3))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1 t_3 = (z + a) - b tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 5e+284): tmp = t_3 else: tmp = ((t * a) + ((x * z) + (y * t_3))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+284)) tmp = t_3; else tmp = Float64(Float64(Float64(t * a) + Float64(Float64(x * z) + Float64(y * t_3))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1; t_3 = (z + a) - b; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 5e+284))) tmp = t_3; else tmp = ((t * a) + ((x * z) + (y * t_3))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+284]], $MachinePrecision]], t$95$3, N[(N[(N[(t * a), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] + N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(y + t\right) \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{t\_1}\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+284}\right):\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot t\_3\right)}{t\_1}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 4.9999999999999999e284 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.1%
Taylor expanded in y around inf 75.6%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.9999999999999999e284Initial program 99.6%
Taylor expanded in y around 0 99.6%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* t a) (* x z)) (+ x t)))
(t_2 (+ y (+ x t)))
(t_3 (/ 1.0 (/ (/ t_2 y) (+ a (- z b))))))
(if (<= y -2.7e+156)
t_3
(if (<= y -5.2e+111)
(- (+ z a) b)
(if (<= y -6e-137)
t_3
(if (<= y -1.15e-226)
t_1
(if (<= y -2.1e-265)
(- (+ z (/ (* y a) x)) (/ (* y b) x))
(if (<= y 1.7e-135)
t_1
(if (<= y 1.3e+49)
(/ (- (* z (+ x y)) (* y b)) t_2)
t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x * z)) / (x + t);
double t_2 = y + (x + t);
double t_3 = 1.0 / ((t_2 / y) / (a + (z - b)));
double tmp;
if (y <= -2.7e+156) {
tmp = t_3;
} else if (y <= -5.2e+111) {
tmp = (z + a) - b;
} else if (y <= -6e-137) {
tmp = t_3;
} else if (y <= -1.15e-226) {
tmp = t_1;
} else if (y <= -2.1e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 1.7e-135) {
tmp = t_1;
} else if (y <= 1.3e+49) {
tmp = ((z * (x + y)) - (y * b)) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((t * a) + (x * z)) / (x + t)
t_2 = y + (x + t)
t_3 = 1.0d0 / ((t_2 / y) / (a + (z - b)))
if (y <= (-2.7d+156)) then
tmp = t_3
else if (y <= (-5.2d+111)) then
tmp = (z + a) - b
else if (y <= (-6d-137)) then
tmp = t_3
else if (y <= (-1.15d-226)) then
tmp = t_1
else if (y <= (-2.1d-265)) then
tmp = (z + ((y * a) / x)) - ((y * b) / x)
else if (y <= 1.7d-135) then
tmp = t_1
else if (y <= 1.3d+49) then
tmp = ((z * (x + y)) - (y * b)) / t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x * z)) / (x + t);
double t_2 = y + (x + t);
double t_3 = 1.0 / ((t_2 / y) / (a + (z - b)));
double tmp;
if (y <= -2.7e+156) {
tmp = t_3;
} else if (y <= -5.2e+111) {
tmp = (z + a) - b;
} else if (y <= -6e-137) {
tmp = t_3;
} else if (y <= -1.15e-226) {
tmp = t_1;
} else if (y <= -2.1e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 1.7e-135) {
tmp = t_1;
} else if (y <= 1.3e+49) {
tmp = ((z * (x + y)) - (y * b)) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x * z)) / (x + t) t_2 = y + (x + t) t_3 = 1.0 / ((t_2 / y) / (a + (z - b))) tmp = 0 if y <= -2.7e+156: tmp = t_3 elif y <= -5.2e+111: tmp = (z + a) - b elif y <= -6e-137: tmp = t_3 elif y <= -1.15e-226: tmp = t_1 elif y <= -2.1e-265: tmp = (z + ((y * a) / x)) - ((y * b) / x) elif y <= 1.7e-135: tmp = t_1 elif y <= 1.3e+49: tmp = ((z * (x + y)) - (y * b)) / t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(1.0 / Float64(Float64(t_2 / y) / Float64(a + Float64(z - b)))) tmp = 0.0 if (y <= -2.7e+156) tmp = t_3; elseif (y <= -5.2e+111) tmp = Float64(Float64(z + a) - b); elseif (y <= -6e-137) tmp = t_3; elseif (y <= -1.15e-226) tmp = t_1; elseif (y <= -2.1e-265) tmp = Float64(Float64(z + Float64(Float64(y * a) / x)) - Float64(Float64(y * b) / x)); elseif (y <= 1.7e-135) tmp = t_1; elseif (y <= 1.3e+49) tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_2); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x * z)) / (x + t); t_2 = y + (x + t); t_3 = 1.0 / ((t_2 / y) / (a + (z - b))); tmp = 0.0; if (y <= -2.7e+156) tmp = t_3; elseif (y <= -5.2e+111) tmp = (z + a) - b; elseif (y <= -6e-137) tmp = t_3; elseif (y <= -1.15e-226) tmp = t_1; elseif (y <= -2.1e-265) tmp = (z + ((y * a) / x)) - ((y * b) / x); elseif (y <= 1.7e-135) tmp = t_1; elseif (y <= 1.3e+49) tmp = ((z * (x + y)) - (y * b)) / t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(N[(t$95$2 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+156], t$95$3, If[LessEqual[y, -5.2e+111], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, -6e-137], t$95$3, If[LessEqual[y, -1.15e-226], t$95$1, If[LessEqual[y, -2.1e-265], N[(N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-135], t$95$1, If[LessEqual[y, 1.3e+49], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot a + x \cdot z}{x + t}\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{1}{\frac{\frac{t\_2}{y}}{a + \left(z - b\right)}}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+156}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-137}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\
\;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+49}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -2.7e156 or -5.1999999999999997e111 < y < -5.9999999999999996e-137 or 1.29999999999999994e49 < y Initial program 45.7%
Taylor expanded in y around inf 39.4%
clear-num39.3%
inv-pow39.3%
associate-+l+39.3%
+-commutative39.3%
associate--l+39.3%
Applied egg-rr39.3%
unpow-139.3%
associate-/r*82.6%
associate-+r+82.6%
+-commutative82.6%
associate-+r+82.6%
Simplified82.6%
if -2.7e156 < y < -5.1999999999999997e111Initial program 31.3%
Taylor expanded in y around inf 84.2%
if -5.9999999999999996e-137 < y < -1.15e-226 or -2.10000000000000004e-265 < y < 1.69999999999999995e-135Initial program 79.7%
Taylor expanded in y around 0 68.4%
if -1.15e-226 < y < -2.10000000000000004e-265Initial program 65.4%
Taylor expanded in x around inf 64.5%
associate-/l*55.7%
associate-/l*55.7%
associate-/l*47.7%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in t around 0 82.0%
if 1.69999999999999995e-135 < y < 1.29999999999999994e49Initial program 77.9%
Taylor expanded in a around 0 59.3%
+-commutative59.3%
*-commutative59.3%
Simplified59.3%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* t a) (* x z)) (+ x t)))
(t_2 (/ 1.0 (/ (/ (+ y (+ x t)) y) (+ a (- z b))))))
(if (<= y -3.7e+164)
t_2
(if (<= y -5.2e+111)
(- (+ z a) b)
(if (<= y -8.1e-137)
t_2
(if (<= y -1.15e-226)
t_1
(if (<= y -2.1e-265)
(- (+ z (/ (* y a) x)) (/ (* y b) x))
(if (<= y 1.55e-78) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x * z)) / (x + t);
double t_2 = 1.0 / (((y + (x + t)) / y) / (a + (z - b)));
double tmp;
if (y <= -3.7e+164) {
tmp = t_2;
} else if (y <= -5.2e+111) {
tmp = (z + a) - b;
} else if (y <= -8.1e-137) {
tmp = t_2;
} else if (y <= -1.15e-226) {
tmp = t_1;
} else if (y <= -2.1e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 1.55e-78) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((t * a) + (x * z)) / (x + t)
t_2 = 1.0d0 / (((y + (x + t)) / y) / (a + (z - b)))
if (y <= (-3.7d+164)) then
tmp = t_2
else if (y <= (-5.2d+111)) then
tmp = (z + a) - b
else if (y <= (-8.1d-137)) then
tmp = t_2
else if (y <= (-1.15d-226)) then
tmp = t_1
else if (y <= (-2.1d-265)) then
tmp = (z + ((y * a) / x)) - ((y * b) / x)
else if (y <= 1.55d-78) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x * z)) / (x + t);
double t_2 = 1.0 / (((y + (x + t)) / y) / (a + (z - b)));
double tmp;
if (y <= -3.7e+164) {
tmp = t_2;
} else if (y <= -5.2e+111) {
tmp = (z + a) - b;
} else if (y <= -8.1e-137) {
tmp = t_2;
} else if (y <= -1.15e-226) {
tmp = t_1;
} else if (y <= -2.1e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 1.55e-78) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x * z)) / (x + t) t_2 = 1.0 / (((y + (x + t)) / y) / (a + (z - b))) tmp = 0 if y <= -3.7e+164: tmp = t_2 elif y <= -5.2e+111: tmp = (z + a) - b elif y <= -8.1e-137: tmp = t_2 elif y <= -1.15e-226: tmp = t_1 elif y <= -2.1e-265: tmp = (z + ((y * a) / x)) - ((y * b) / x) elif y <= 1.55e-78: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)) t_2 = Float64(1.0 / Float64(Float64(Float64(y + Float64(x + t)) / y) / Float64(a + Float64(z - b)))) tmp = 0.0 if (y <= -3.7e+164) tmp = t_2; elseif (y <= -5.2e+111) tmp = Float64(Float64(z + a) - b); elseif (y <= -8.1e-137) tmp = t_2; elseif (y <= -1.15e-226) tmp = t_1; elseif (y <= -2.1e-265) tmp = Float64(Float64(z + Float64(Float64(y * a) / x)) - Float64(Float64(y * b) / x)); elseif (y <= 1.55e-78) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x * z)) / (x + t); t_2 = 1.0 / (((y + (x + t)) / y) / (a + (z - b))); tmp = 0.0; if (y <= -3.7e+164) tmp = t_2; elseif (y <= -5.2e+111) tmp = (z + a) - b; elseif (y <= -8.1e-137) tmp = t_2; elseif (y <= -1.15e-226) tmp = t_1; elseif (y <= -2.1e-265) tmp = (z + ((y * a) / x)) - ((y * b) / x); elseif (y <= 1.55e-78) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e+164], t$95$2, If[LessEqual[y, -5.2e+111], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, -8.1e-137], t$95$2, If[LessEqual[y, -1.15e-226], t$95$1, If[LessEqual[y, -2.1e-265], N[(N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-78], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot a + x \cdot z}{x + t}\\
t_2 := \frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq -8.1 \cdot 10^{-137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\
\;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-78}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.7000000000000001e164 or -5.1999999999999997e111 < y < -8.1000000000000003e-137 or 1.55000000000000009e-78 < y Initial program 51.7%
Taylor expanded in y around inf 41.4%
clear-num41.2%
inv-pow41.2%
associate-+l+41.2%
+-commutative41.2%
associate--l+41.2%
Applied egg-rr41.2%
unpow-141.2%
associate-/r*77.2%
associate-+r+77.2%
+-commutative77.2%
associate-+r+77.2%
Simplified77.2%
if -3.7000000000000001e164 < y < -5.1999999999999997e111Initial program 31.3%
Taylor expanded in y around inf 84.2%
if -8.1000000000000003e-137 < y < -1.15e-226 or -2.10000000000000004e-265 < y < 1.55000000000000009e-78Initial program 78.4%
Taylor expanded in y around 0 64.9%
if -1.15e-226 < y < -2.10000000000000004e-265Initial program 65.4%
Taylor expanded in x around inf 64.5%
associate-/l*55.7%
associate-/l*55.7%
associate-/l*47.7%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in t around 0 82.0%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (/ 1.0 (/ (/ t_1 y) (+ a (- z b))))))
(if (<= y -4.5e+162)
t_2
(if (<= y -5.2e+111)
(- (+ z a) b)
(if (or (<= y -8.1e-137) (not (<= y 4200000000.0)))
t_2
(/ (+ (* (+ y t) a) (* z (+ x y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = 1.0 / ((t_1 / y) / (a + (z - b)));
double tmp;
if (y <= -4.5e+162) {
tmp = t_2;
} else if (y <= -5.2e+111) {
tmp = (z + a) - b;
} else if ((y <= -8.1e-137) || !(y <= 4200000000.0)) {
tmp = t_2;
} else {
tmp = (((y + t) * a) + (z * (x + y))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = 1.0d0 / ((t_1 / y) / (a + (z - b)))
if (y <= (-4.5d+162)) then
tmp = t_2
else if (y <= (-5.2d+111)) then
tmp = (z + a) - b
else if ((y <= (-8.1d-137)) .or. (.not. (y <= 4200000000.0d0))) then
tmp = t_2
else
tmp = (((y + t) * a) + (z * (x + y))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = 1.0 / ((t_1 / y) / (a + (z - b)));
double tmp;
if (y <= -4.5e+162) {
tmp = t_2;
} else if (y <= -5.2e+111) {
tmp = (z + a) - b;
} else if ((y <= -8.1e-137) || !(y <= 4200000000.0)) {
tmp = t_2;
} else {
tmp = (((y + t) * a) + (z * (x + y))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = 1.0 / ((t_1 / y) / (a + (z - b))) tmp = 0 if y <= -4.5e+162: tmp = t_2 elif y <= -5.2e+111: tmp = (z + a) - b elif (y <= -8.1e-137) or not (y <= 4200000000.0): tmp = t_2 else: tmp = (((y + t) * a) + (z * (x + y))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(1.0 / Float64(Float64(t_1 / y) / Float64(a + Float64(z - b)))) tmp = 0.0 if (y <= -4.5e+162) tmp = t_2; elseif (y <= -5.2e+111) tmp = Float64(Float64(z + a) - b); elseif ((y <= -8.1e-137) || !(y <= 4200000000.0)) tmp = t_2; else tmp = Float64(Float64(Float64(Float64(y + t) * a) + Float64(z * Float64(x + y))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = 1.0 / ((t_1 / y) / (a + (z - b))); tmp = 0.0; if (y <= -4.5e+162) tmp = t_2; elseif (y <= -5.2e+111) tmp = (z + a) - b; elseif ((y <= -8.1e-137) || ~((y <= 4200000000.0))) tmp = t_2; else tmp = (((y + t) * a) + (z * (x + y))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(N[(t$95$1 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+162], t$95$2, If[LessEqual[y, -5.2e+111], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[Or[LessEqual[y, -8.1e-137], N[Not[LessEqual[y, 4200000000.0]], $MachinePrecision]], t$95$2, N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{1}{\frac{\frac{t\_1}{y}}{a + \left(z - b\right)}}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq -8.1 \cdot 10^{-137} \lor \neg \left(y \leq 4200000000\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y + t\right) \cdot a + z \cdot \left(x + y\right)}{t\_1}\\
\end{array}
\end{array}
if y < -4.49999999999999972e162 or -5.1999999999999997e111 < y < -8.1000000000000003e-137 or 4.2e9 < y Initial program 48.9%
Taylor expanded in y around inf 41.0%
clear-num40.9%
inv-pow40.9%
associate-+l+40.9%
+-commutative40.9%
associate--l+40.9%
Applied egg-rr40.9%
unpow-140.9%
associate-/r*81.6%
associate-+r+81.6%
+-commutative81.6%
associate-+r+81.6%
Simplified81.6%
if -4.49999999999999972e162 < y < -5.1999999999999997e111Initial program 31.3%
Taylor expanded in y around inf 84.2%
if -8.1000000000000003e-137 < y < 4.2e9Initial program 76.2%
Taylor expanded in b around 0 67.1%
Final simplification75.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (/ (+ (* t a) (* x z)) (+ x t))))
(if (<= y -5e+111)
t_1
(if (<= y -3.05e-139)
(/ (* y t_1) (+ y (+ x t)))
(if (<= y -1.18e-226)
t_2
(if (<= y -2.1e-265)
(- (+ z (/ (* y a) x)) (/ (* y b) x))
(if (<= y 3.1e-157) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = ((t * a) + (x * z)) / (x + t);
double tmp;
if (y <= -5e+111) {
tmp = t_1;
} else if (y <= -3.05e-139) {
tmp = (y * t_1) / (y + (x + t));
} else if (y <= -1.18e-226) {
tmp = t_2;
} else if (y <= -2.1e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 3.1e-157) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z + a) - b
t_2 = ((t * a) + (x * z)) / (x + t)
if (y <= (-5d+111)) then
tmp = t_1
else if (y <= (-3.05d-139)) then
tmp = (y * t_1) / (y + (x + t))
else if (y <= (-1.18d-226)) then
tmp = t_2
else if (y <= (-2.1d-265)) then
tmp = (z + ((y * a) / x)) - ((y * b) / x)
else if (y <= 3.1d-157) 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 a, double b) {
double t_1 = (z + a) - b;
double t_2 = ((t * a) + (x * z)) / (x + t);
double tmp;
if (y <= -5e+111) {
tmp = t_1;
} else if (y <= -3.05e-139) {
tmp = (y * t_1) / (y + (x + t));
} else if (y <= -1.18e-226) {
tmp = t_2;
} else if (y <= -2.1e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 3.1e-157) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = ((t * a) + (x * z)) / (x + t) tmp = 0 if y <= -5e+111: tmp = t_1 elif y <= -3.05e-139: tmp = (y * t_1) / (y + (x + t)) elif y <= -1.18e-226: tmp = t_2 elif y <= -2.1e-265: tmp = (z + ((y * a) / x)) - ((y * b) / x) elif y <= 3.1e-157: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)) tmp = 0.0 if (y <= -5e+111) tmp = t_1; elseif (y <= -3.05e-139) tmp = Float64(Float64(y * t_1) / Float64(y + Float64(x + t))); elseif (y <= -1.18e-226) tmp = t_2; elseif (y <= -2.1e-265) tmp = Float64(Float64(z + Float64(Float64(y * a) / x)) - Float64(Float64(y * b) / x)); elseif (y <= 3.1e-157) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = ((t * a) + (x * z)) / (x + t); tmp = 0.0; if (y <= -5e+111) tmp = t_1; elseif (y <= -3.05e-139) tmp = (y * t_1) / (y + (x + t)); elseif (y <= -1.18e-226) tmp = t_2; elseif (y <= -2.1e-265) tmp = (z + ((y * a) / x)) - ((y * b) / x); elseif (y <= 3.1e-157) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+111], t$95$1, If[LessEqual[y, -3.05e-139], N[(N[(y * t$95$1), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.18e-226], t$95$2, If[LessEqual[y, -2.1e-265], N[(N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e-157], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := \frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.05 \cdot 10^{-139}:\\
\;\;\;\;\frac{y \cdot t\_1}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\
\;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-157}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.9999999999999997e111 or 3.0999999999999998e-157 < y Initial program 44.4%
Taylor expanded in y around inf 72.3%
if -4.9999999999999997e111 < y < -3.0499999999999999e-139Initial program 79.2%
Taylor expanded in y around inf 62.9%
if -3.0499999999999999e-139 < y < -1.1799999999999999e-226 or -2.10000000000000004e-265 < y < 3.0999999999999998e-157Initial program 81.1%
Taylor expanded in y around 0 68.8%
if -1.1799999999999999e-226 < y < -2.10000000000000004e-265Initial program 65.4%
Taylor expanded in x around inf 64.5%
associate-/l*55.7%
associate-/l*55.7%
associate-/l*47.7%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in t around 0 82.0%
Final simplification70.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* a (/ (+ y t) (+ t (+ x y))))))
(if (<= a -2e+32)
t_2
(if (<= a -1.9e-131)
t_1
(if (<= a -6.1e-299)
(* z (/ (+ x y) (+ y (+ x t))))
(if (<= a 2.55e-121)
(* y (/ (- z b) (+ y t)))
(if (<= a 2.7e+194) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a * ((y + t) / (t + (x + y)));
double tmp;
if (a <= -2e+32) {
tmp = t_2;
} else if (a <= -1.9e-131) {
tmp = t_1;
} else if (a <= -6.1e-299) {
tmp = z * ((x + y) / (y + (x + t)));
} else if (a <= 2.55e-121) {
tmp = y * ((z - b) / (y + t));
} else if (a <= 2.7e+194) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z + a) - b
t_2 = a * ((y + t) / (t + (x + y)))
if (a <= (-2d+32)) then
tmp = t_2
else if (a <= (-1.9d-131)) then
tmp = t_1
else if (a <= (-6.1d-299)) then
tmp = z * ((x + y) / (y + (x + t)))
else if (a <= 2.55d-121) then
tmp = y * ((z - b) / (y + t))
else if (a <= 2.7d+194) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a * ((y + t) / (t + (x + y)));
double tmp;
if (a <= -2e+32) {
tmp = t_2;
} else if (a <= -1.9e-131) {
tmp = t_1;
} else if (a <= -6.1e-299) {
tmp = z * ((x + y) / (y + (x + t)));
} else if (a <= 2.55e-121) {
tmp = y * ((z - b) / (y + t));
} else if (a <= 2.7e+194) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a * ((y + t) / (t + (x + y))) tmp = 0 if a <= -2e+32: tmp = t_2 elif a <= -1.9e-131: tmp = t_1 elif a <= -6.1e-299: tmp = z * ((x + y) / (y + (x + t))) elif a <= 2.55e-121: tmp = y * ((z - b) / (y + t)) elif a <= 2.7e+194: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a * Float64(Float64(y + t) / Float64(t + Float64(x + y)))) tmp = 0.0 if (a <= -2e+32) tmp = t_2; elseif (a <= -1.9e-131) tmp = t_1; elseif (a <= -6.1e-299) tmp = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))); elseif (a <= 2.55e-121) tmp = Float64(y * Float64(Float64(z - b) / Float64(y + t))); elseif (a <= 2.7e+194) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a * ((y + t) / (t + (x + y))); tmp = 0.0; if (a <= -2e+32) tmp = t_2; elseif (a <= -1.9e-131) tmp = t_1; elseif (a <= -6.1e-299) tmp = z * ((x + y) / (y + (x + t))); elseif (a <= 2.55e-121) tmp = y * ((z - b) / (y + t)); elseif (a <= 2.7e+194) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(y + t), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+32], t$95$2, If[LessEqual[a, -1.9e-131], t$95$1, If[LessEqual[a, -6.1e-299], N[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.55e-121], N[(y * N[(N[(z - b), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e+194], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a \cdot \frac{y + t}{t + \left(x + y\right)}\\
\mathbf{if}\;a \leq -2 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.1 \cdot 10^{-299}:\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\
\mathbf{elif}\;a \leq 2.55 \cdot 10^{-121}:\\
\;\;\;\;y \cdot \frac{z - b}{y + t}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.00000000000000011e32 or 2.7000000000000002e194 < a Initial program 49.6%
Taylor expanded in a around inf 36.5%
associate-/l*73.2%
+-commutative73.2%
Simplified73.2%
if -2.00000000000000011e32 < a < -1.89999999999999997e-131 or 2.5499999999999999e-121 < a < 2.7000000000000002e194Initial program 64.9%
Taylor expanded in y around inf 65.4%
if -1.89999999999999997e-131 < a < -6.10000000000000034e-299Initial program 65.7%
Taylor expanded in z around inf 39.2%
associate-/l*70.8%
+-commutative70.8%
+-commutative70.8%
associate-+r+70.8%
+-commutative70.8%
associate-+l+70.8%
Simplified70.8%
if -6.10000000000000034e-299 < a < 2.5499999999999999e-121Initial program 62.4%
Taylor expanded in y around inf 39.3%
Taylor expanded in x around 0 41.3%
Taylor expanded in a around 0 41.3%
associate-/l*65.6%
Simplified65.6%
Final simplification68.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* t a) (* x z)) (+ x t))))
(if (<= y -7.8e-137)
(* (+ a (- z b)) (/ y (+ y t)))
(if (<= y -1.18e-226)
t_1
(if (<= y -1.7e-265)
(- (+ z (/ (* y a) x)) (/ (* y b) x))
(if (<= y 3.7e-160) t_1 (- (+ z a) b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x * z)) / (x + t);
double tmp;
if (y <= -7.8e-137) {
tmp = (a + (z - b)) * (y / (y + t));
} else if (y <= -1.18e-226) {
tmp = t_1;
} else if (y <= -1.7e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 3.7e-160) {
tmp = t_1;
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((t * a) + (x * z)) / (x + t)
if (y <= (-7.8d-137)) then
tmp = (a + (z - b)) * (y / (y + t))
else if (y <= (-1.18d-226)) then
tmp = t_1
else if (y <= (-1.7d-265)) then
tmp = (z + ((y * a) / x)) - ((y * b) / x)
else if (y <= 3.7d-160) then
tmp = t_1
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x * z)) / (x + t);
double tmp;
if (y <= -7.8e-137) {
tmp = (a + (z - b)) * (y / (y + t));
} else if (y <= -1.18e-226) {
tmp = t_1;
} else if (y <= -1.7e-265) {
tmp = (z + ((y * a) / x)) - ((y * b) / x);
} else if (y <= 3.7e-160) {
tmp = t_1;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x * z)) / (x + t) tmp = 0 if y <= -7.8e-137: tmp = (a + (z - b)) * (y / (y + t)) elif y <= -1.18e-226: tmp = t_1 elif y <= -1.7e-265: tmp = (z + ((y * a) / x)) - ((y * b) / x) elif y <= 3.7e-160: tmp = t_1 else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)) tmp = 0.0 if (y <= -7.8e-137) tmp = Float64(Float64(a + Float64(z - b)) * Float64(y / Float64(y + t))); elseif (y <= -1.18e-226) tmp = t_1; elseif (y <= -1.7e-265) tmp = Float64(Float64(z + Float64(Float64(y * a) / x)) - Float64(Float64(y * b) / x)); elseif (y <= 3.7e-160) tmp = t_1; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x * z)) / (x + t); tmp = 0.0; if (y <= -7.8e-137) tmp = (a + (z - b)) * (y / (y + t)); elseif (y <= -1.18e-226) tmp = t_1; elseif (y <= -1.7e-265) tmp = (z + ((y * a) / x)) - ((y * b) / x); elseif (y <= 3.7e-160) tmp = t_1; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e-137], N[(N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.18e-226], t$95$1, If[LessEqual[y, -1.7e-265], N[(N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-160], t$95$1, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{-137}:\\
\;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + t}\\
\mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-265}:\\
\;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if y < -7.7999999999999999e-137Initial program 49.9%
Taylor expanded in y around inf 39.5%
Taylor expanded in x around 0 34.6%
associate-/l*65.0%
+-commutative65.0%
associate--l+65.0%
Applied egg-rr65.0%
associate-*r/34.6%
associate-*l/66.9%
associate-+r-66.8%
+-commutative66.8%
associate--l+66.8%
Simplified66.8%
if -7.7999999999999999e-137 < y < -1.1799999999999999e-226 or -1.7e-265 < y < 3.69999999999999977e-160Initial program 81.1%
Taylor expanded in y around 0 68.8%
if -1.1799999999999999e-226 < y < -1.7e-265Initial program 65.4%
Taylor expanded in x around inf 64.5%
associate-/l*55.7%
associate-/l*55.7%
associate-/l*47.7%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in t around 0 82.0%
if 3.69999999999999977e-160 < y Initial program 53.0%
Taylor expanded in y around inf 68.4%
Final simplification68.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (/ (+ y t) (+ t (+ x y))))))
(if (<= a -1.55e+32)
t_1
(if (<= a -1.15e-131)
(- (+ z a) b)
(if (<= a -4e-300)
(* z (/ (+ x y) (+ y (+ x t))))
(if (<= a 9e+97) (* (+ a (- z b)) (/ y (+ y t))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((y + t) / (t + (x + y)));
double tmp;
if (a <= -1.55e+32) {
tmp = t_1;
} else if (a <= -1.15e-131) {
tmp = (z + a) - b;
} else if (a <= -4e-300) {
tmp = z * ((x + y) / (y + (x + t)));
} else if (a <= 9e+97) {
tmp = (a + (z - b)) * (y / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((y + t) / (t + (x + y)))
if (a <= (-1.55d+32)) then
tmp = t_1
else if (a <= (-1.15d-131)) then
tmp = (z + a) - b
else if (a <= (-4d-300)) then
tmp = z * ((x + y) / (y + (x + t)))
else if (a <= 9d+97) then
tmp = (a + (z - b)) * (y / (y + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((y + t) / (t + (x + y)));
double tmp;
if (a <= -1.55e+32) {
tmp = t_1;
} else if (a <= -1.15e-131) {
tmp = (z + a) - b;
} else if (a <= -4e-300) {
tmp = z * ((x + y) / (y + (x + t)));
} else if (a <= 9e+97) {
tmp = (a + (z - b)) * (y / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * ((y + t) / (t + (x + y))) tmp = 0 if a <= -1.55e+32: tmp = t_1 elif a <= -1.15e-131: tmp = (z + a) - b elif a <= -4e-300: tmp = z * ((x + y) / (y + (x + t))) elif a <= 9e+97: tmp = (a + (z - b)) * (y / (y + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(Float64(y + t) / Float64(t + Float64(x + y)))) tmp = 0.0 if (a <= -1.55e+32) tmp = t_1; elseif (a <= -1.15e-131) tmp = Float64(Float64(z + a) - b); elseif (a <= -4e-300) tmp = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))); elseif (a <= 9e+97) tmp = Float64(Float64(a + Float64(z - b)) * Float64(y / Float64(y + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * ((y + t) / (t + (x + y))); tmp = 0.0; if (a <= -1.55e+32) tmp = t_1; elseif (a <= -1.15e-131) tmp = (z + a) - b; elseif (a <= -4e-300) tmp = z * ((x + y) / (y + (x + t))); elseif (a <= 9e+97) tmp = (a + (z - b)) * (y / (y + t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(N[(y + t), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.55e+32], t$95$1, If[LessEqual[a, -1.15e-131], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[a, -4e-300], N[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+97], N[(N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{y + t}{t + \left(x + y\right)}\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-131}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-300}:\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+97}:\\
\;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.54999999999999997e32 or 8.99999999999999952e97 < a Initial program 48.8%
Taylor expanded in a around inf 34.3%
associate-/l*69.5%
+-commutative69.5%
Simplified69.5%
if -1.54999999999999997e32 < a < -1.15000000000000011e-131Initial program 76.0%
Taylor expanded in y around inf 72.4%
if -1.15000000000000011e-131 < a < -4.0000000000000001e-300Initial program 65.7%
Taylor expanded in z around inf 39.2%
associate-/l*70.8%
+-commutative70.8%
+-commutative70.8%
associate-+r+70.8%
+-commutative70.8%
associate-+l+70.8%
Simplified70.8%
if -4.0000000000000001e-300 < a < 8.99999999999999952e97Initial program 62.7%
Taylor expanded in y around inf 37.5%
Taylor expanded in x around 0 37.9%
associate-/l*61.1%
+-commutative61.1%
associate--l+61.1%
Applied egg-rr61.1%
associate-*r/37.9%
associate-*l/64.5%
associate-+r-64.5%
+-commutative64.5%
associate--l+64.5%
Simplified64.5%
Final simplification68.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* a (/ (+ y t) (+ t (+ x y))))))
(if (<= a -2e+32)
t_2
(if (<= a -4.2e-297)
t_1
(if (<= a 5.4e-122)
(* y (/ (- z b) (+ y t)))
(if (<= a 1.52e+193) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a * ((y + t) / (t + (x + y)));
double tmp;
if (a <= -2e+32) {
tmp = t_2;
} else if (a <= -4.2e-297) {
tmp = t_1;
} else if (a <= 5.4e-122) {
tmp = y * ((z - b) / (y + t));
} else if (a <= 1.52e+193) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z + a) - b
t_2 = a * ((y + t) / (t + (x + y)))
if (a <= (-2d+32)) then
tmp = t_2
else if (a <= (-4.2d-297)) then
tmp = t_1
else if (a <= 5.4d-122) then
tmp = y * ((z - b) / (y + t))
else if (a <= 1.52d+193) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a * ((y + t) / (t + (x + y)));
double tmp;
if (a <= -2e+32) {
tmp = t_2;
} else if (a <= -4.2e-297) {
tmp = t_1;
} else if (a <= 5.4e-122) {
tmp = y * ((z - b) / (y + t));
} else if (a <= 1.52e+193) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a * ((y + t) / (t + (x + y))) tmp = 0 if a <= -2e+32: tmp = t_2 elif a <= -4.2e-297: tmp = t_1 elif a <= 5.4e-122: tmp = y * ((z - b) / (y + t)) elif a <= 1.52e+193: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a * Float64(Float64(y + t) / Float64(t + Float64(x + y)))) tmp = 0.0 if (a <= -2e+32) tmp = t_2; elseif (a <= -4.2e-297) tmp = t_1; elseif (a <= 5.4e-122) tmp = Float64(y * Float64(Float64(z - b) / Float64(y + t))); elseif (a <= 1.52e+193) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a * ((y + t) / (t + (x + y))); tmp = 0.0; if (a <= -2e+32) tmp = t_2; elseif (a <= -4.2e-297) tmp = t_1; elseif (a <= 5.4e-122) tmp = y * ((z - b) / (y + t)); elseif (a <= 1.52e+193) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(y + t), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+32], t$95$2, If[LessEqual[a, -4.2e-297], t$95$1, If[LessEqual[a, 5.4e-122], N[(y * N[(N[(z - b), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.52e+193], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a \cdot \frac{y + t}{t + \left(x + y\right)}\\
\mathbf{if}\;a \leq -2 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-122}:\\
\;\;\;\;y \cdot \frac{z - b}{y + t}\\
\mathbf{elif}\;a \leq 1.52 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.00000000000000011e32 or 1.52e193 < a Initial program 49.6%
Taylor expanded in a around inf 36.5%
associate-/l*73.2%
+-commutative73.2%
Simplified73.2%
if -2.00000000000000011e32 < a < -4.20000000000000027e-297 or 5.40000000000000019e-122 < a < 1.52e193Initial program 65.1%
Taylor expanded in y around inf 62.3%
if -4.20000000000000027e-297 < a < 5.40000000000000019e-122Initial program 62.4%
Taylor expanded in y around inf 39.3%
Taylor expanded in x around 0 41.3%
Taylor expanded in a around 0 41.3%
associate-/l*65.6%
Simplified65.6%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.5e-137) (* (+ a (- z b)) (/ y (+ y t))) (if (<= y 3.1e-157) (/ (+ (* t a) (* x z)) (+ x t)) (- (+ z a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.5e-137) {
tmp = (a + (z - b)) * (y / (y + t));
} else if (y <= 3.1e-157) {
tmp = ((t * a) + (x * z)) / (x + t);
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7.5d-137)) then
tmp = (a + (z - b)) * (y / (y + t))
else if (y <= 3.1d-157) then
tmp = ((t * a) + (x * z)) / (x + t)
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.5e-137) {
tmp = (a + (z - b)) * (y / (y + t));
} else if (y <= 3.1e-157) {
tmp = ((t * a) + (x * z)) / (x + t);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.5e-137: tmp = (a + (z - b)) * (y / (y + t)) elif y <= 3.1e-157: tmp = ((t * a) + (x * z)) / (x + t) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.5e-137) tmp = Float64(Float64(a + Float64(z - b)) * Float64(y / Float64(y + t))); elseif (y <= 3.1e-157) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.5e-137) tmp = (a + (z - b)) * (y / (y + t)); elseif (y <= 3.1e-157) tmp = ((t * a) + (x * z)) / (x + t); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.5e-137], N[(N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e-157], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-137}:\\
\;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + t}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-157}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if y < -7.4999999999999995e-137Initial program 49.9%
Taylor expanded in y around inf 39.5%
Taylor expanded in x around 0 34.6%
associate-/l*65.0%
+-commutative65.0%
associate--l+65.0%
Applied egg-rr65.0%
associate-*r/34.6%
associate-*l/66.9%
associate-+r-66.8%
+-commutative66.8%
associate--l+66.8%
Simplified66.8%
if -7.4999999999999995e-137 < y < 3.0999999999999998e-157Initial program 78.8%
Taylor expanded in y around 0 64.8%
if 3.0999999999999998e-157 < y Initial program 53.0%
Taylor expanded in y around inf 68.4%
Final simplification66.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8e+95) (not (<= b 2e+161))) (* b (/ y (- (- y) (+ x t)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8e+95) || !(b <= 2e+161)) {
tmp = b * (y / (-y - (x + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-8d+95)) .or. (.not. (b <= 2d+161))) then
tmp = b * (y / (-y - (x + t)))
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8e+95) || !(b <= 2e+161)) {
tmp = b * (y / (-y - (x + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8e+95) or not (b <= 2e+161): tmp = b * (y / (-y - (x + t))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8e+95) || !(b <= 2e+161)) tmp = Float64(b * Float64(y / Float64(Float64(-y) - Float64(x + t)))); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8e+95) || ~((b <= 2e+161))) tmp = b * (y / (-y - (x + t))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8e+95], N[Not[LessEqual[b, 2e+161]], $MachinePrecision]], N[(b * N[(y / N[((-y) - N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+95} \lor \neg \left(b \leq 2 \cdot 10^{+161}\right):\\
\;\;\;\;b \cdot \frac{y}{\left(-y\right) - \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if b < -8.00000000000000016e95 or 2.0000000000000001e161 < b Initial program 53.2%
Taylor expanded in b around inf 30.5%
mul-1-neg30.5%
associate-/l*58.3%
distribute-rgt-neg-in58.3%
mul-1-neg58.3%
associate-*r/58.3%
neg-mul-158.3%
+-commutative58.3%
associate-+r+58.3%
+-commutative58.3%
associate-+l+58.3%
Simplified58.3%
if -8.00000000000000016e95 < b < 2.0000000000000001e161Initial program 62.5%
Taylor expanded in y around inf 65.6%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.4e+223) (not (<= b 2.4e+190))) (- b) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.4e+223) || !(b <= 2.4e+190)) {
tmp = -b;
} else {
tmp = z + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-4.4d+223)) .or. (.not. (b <= 2.4d+190))) then
tmp = -b
else
tmp = z + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.4e+223) || !(b <= 2.4e+190)) {
tmp = -b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.4e+223) or not (b <= 2.4e+190): tmp = -b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.4e+223) || !(b <= 2.4e+190)) tmp = Float64(-b); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.4e+223) || ~((b <= 2.4e+190))) tmp = -b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.4e+223], N[Not[LessEqual[b, 2.4e+190]], $MachinePrecision]], (-b), N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+223} \lor \neg \left(b \leq 2.4 \cdot 10^{+190}\right):\\
\;\;\;\;-b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if b < -4.3999999999999999e223 or 2.3999999999999999e190 < b Initial program 40.3%
Taylor expanded in b around inf 26.7%
associate-*r*26.7%
neg-mul-126.7%
*-commutative26.7%
Simplified26.7%
Taylor expanded in y around inf 41.9%
neg-mul-141.9%
Simplified41.9%
if -4.3999999999999999e223 < b < 2.3999999999999999e190Initial program 63.9%
Taylor expanded in y around inf 59.5%
Taylor expanded in b around 0 56.2%
Final simplification53.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.75e+219) (- a b) (if (<= b 2.6e+185) (+ z a) (- z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.75e+219) {
tmp = a - b;
} else if (b <= 2.6e+185) {
tmp = z + a;
} else {
tmp = z - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.75d+219)) then
tmp = a - b
else if (b <= 2.6d+185) then
tmp = z + a
else
tmp = z - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.75e+219) {
tmp = a - b;
} else if (b <= 2.6e+185) {
tmp = z + a;
} else {
tmp = z - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.75e+219: tmp = a - b elif b <= 2.6e+185: tmp = z + a else: tmp = z - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.75e+219) tmp = Float64(a - b); elseif (b <= 2.6e+185) tmp = Float64(z + a); else tmp = Float64(z - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.75e+219) tmp = a - b; elseif (b <= 2.6e+185) tmp = z + a; else tmp = z - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.75e+219], N[(a - b), $MachinePrecision], If[LessEqual[b, 2.6e+185], N[(z + a), $MachinePrecision], N[(z - b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.75 \cdot 10^{+219}:\\
\;\;\;\;a - b\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{+185}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;z - b\\
\end{array}
\end{array}
if b < -2.74999999999999986e219Initial program 35.9%
Taylor expanded in z around 0 26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in y around inf 54.5%
if -2.74999999999999986e219 < b < 2.60000000000000001e185Initial program 63.9%
Taylor expanded in y around inf 59.5%
Taylor expanded in b around 0 56.2%
if 2.60000000000000001e185 < b Initial program 43.2%
Taylor expanded in y around inf 37.5%
Taylor expanded in a around 0 37.5%
Final simplification54.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.25e+222) (- a b) (if (<= b 2.5e+188) (+ z a) (- b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.25e+222) {
tmp = a - b;
} else if (b <= 2.5e+188) {
tmp = z + a;
} else {
tmp = -b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.25d+222)) then
tmp = a - b
else if (b <= 2.5d+188) then
tmp = z + a
else
tmp = -b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.25e+222) {
tmp = a - b;
} else if (b <= 2.5e+188) {
tmp = z + a;
} else {
tmp = -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.25e+222: tmp = a - b elif b <= 2.5e+188: tmp = z + a else: tmp = -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.25e+222) tmp = Float64(a - b); elseif (b <= 2.5e+188) tmp = Float64(z + a); else tmp = Float64(-b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.25e+222) tmp = a - b; elseif (b <= 2.5e+188) tmp = z + a; else tmp = -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.25e+222], N[(a - b), $MachinePrecision], If[LessEqual[b, 2.5e+188], N[(z + a), $MachinePrecision], (-b)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+222}:\\
\;\;\;\;a - b\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+188}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;-b\\
\end{array}
\end{array}
if b < -2.24999999999999994e222Initial program 35.9%
Taylor expanded in z around 0 26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in y around inf 54.5%
if -2.24999999999999994e222 < b < 2.5000000000000001e188Initial program 63.9%
Taylor expanded in y around inf 59.5%
Taylor expanded in b around 0 56.2%
if 2.5000000000000001e188 < b Initial program 43.2%
Taylor expanded in b around inf 29.9%
associate-*r*29.9%
neg-mul-129.9%
*-commutative29.9%
Simplified29.9%
Taylor expanded in y around inf 37.2%
neg-mul-137.2%
Simplified37.2%
Final simplification54.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.8e-19) a (if (<= a 3.3e-156) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.8e-19) {
tmp = a;
} else if (a <= 3.3e-156) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-7.8d-19)) then
tmp = a
else if (a <= 3.3d-156) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.8e-19) {
tmp = a;
} else if (a <= 3.3e-156) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.8e-19: tmp = a elif a <= 3.3e-156: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.8e-19) tmp = a; elseif (a <= 3.3e-156) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.8e-19) tmp = a; elseif (a <= 3.3e-156) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.8e-19], a, If[LessEqual[a, 3.3e-156], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-19}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-156}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -7.7999999999999999e-19 or 3.2999999999999999e-156 < a Initial program 56.8%
Taylor expanded in t around inf 44.2%
if -7.7999999999999999e-19 < a < 3.2999999999999999e-156Initial program 64.3%
Taylor expanded in x around inf 44.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.35e+145) a (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.35e+145) {
tmp = a;
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.35d+145)) then
tmp = a
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.35e+145) {
tmp = a;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.35e+145: tmp = a else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.35e+145) tmp = a; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.35e+145) tmp = a; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.35e+145], a, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+145}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -2.3500000000000001e145Initial program 53.0%
Taylor expanded in t around inf 59.3%
if -2.3500000000000001e145 < t Initial program 60.9%
Taylor expanded in y around inf 60.4%
Final simplification60.2%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 59.8%
Taylor expanded in t around inf 31.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
herbie shell --seed 2024088
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))