
(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 (* a (+ y t)))
(t_2 (/ (- (+ (* (+ x y) z) t_1) (* y b)) (+ y (+ x t)))))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+235)))
(- (+ z a) b)
(/ (- (fma (+ x y) z t_1) (* y b)) (+ x (+ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = ((((x + y) * z) + t_1) - (y * b)) / (y + (x + t));
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+235)) {
tmp = (z + a) - b;
} else {
tmp = (fma((x + y), z, t_1) - (y * b)) / (x + (y + t));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + t_1) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+235)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(Float64(fma(Float64(x + y), z, t_1) - Float64(y * b)) / Float64(x + Float64(y + t))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+235]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(N[(x + y), $MachinePrecision] * z + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+235}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, t\_1\right) - y \cdot b}{x + \left(y + t\right)}\\
\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 5.00000000000000027e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.6%
Taylor expanded in y around inf 72.3%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000027e235Initial program 99.7%
fma-define99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Simplified99.8%
Final simplification88.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+235))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+235)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+235)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+235): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+235)) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+235))) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+235]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+235}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;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 5.00000000000000027e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.6%
Taylor expanded in y around inf 72.3%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000027e235Initial program 99.7%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= y -4.4e-73)
(- (+ z a) b)
(if (<= y -7e-208)
(/ (- (* a (+ y t)) (* y b)) t_1)
(if (<= y 4.6e-67)
(/ (+ (* x z) (* t a)) (+ x t))
(if (<= y 2.7e+33)
(* (+ y t) (/ a t_1))
(/ 1.0 (/ (/ t_1 y) (+ a (- z b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (y <= -4.4e-73) {
tmp = (z + a) - b;
} else if (y <= -7e-208) {
tmp = ((a * (y + t)) - (y * b)) / t_1;
} else if (y <= 4.6e-67) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 2.7e+33) {
tmp = (y + t) * (a / t_1);
} else {
tmp = 1.0 / ((t_1 / y) / (a + (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) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (y <= (-4.4d-73)) then
tmp = (z + a) - b
else if (y <= (-7d-208)) then
tmp = ((a * (y + t)) - (y * b)) / t_1
else if (y <= 4.6d-67) then
tmp = ((x * z) + (t * a)) / (x + t)
else if (y <= 2.7d+33) then
tmp = (y + t) * (a / t_1)
else
tmp = 1.0d0 / ((t_1 / y) / (a + (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 t_1 = y + (x + t);
double tmp;
if (y <= -4.4e-73) {
tmp = (z + a) - b;
} else if (y <= -7e-208) {
tmp = ((a * (y + t)) - (y * b)) / t_1;
} else if (y <= 4.6e-67) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 2.7e+33) {
tmp = (y + t) * (a / t_1);
} else {
tmp = 1.0 / ((t_1 / y) / (a + (z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if y <= -4.4e-73: tmp = (z + a) - b elif y <= -7e-208: tmp = ((a * (y + t)) - (y * b)) / t_1 elif y <= 4.6e-67: tmp = ((x * z) + (t * a)) / (x + t) elif y <= 2.7e+33: tmp = (y + t) * (a / t_1) else: tmp = 1.0 / ((t_1 / y) / (a + (z - b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (y <= -4.4e-73) tmp = Float64(Float64(z + a) - b); elseif (y <= -7e-208) tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / t_1); elseif (y <= 4.6e-67) tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t)); elseif (y <= 2.7e+33) tmp = Float64(Float64(y + t) * Float64(a / t_1)); else tmp = Float64(1.0 / Float64(Float64(t_1 / y) / Float64(a + Float64(z - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (y <= -4.4e-73) tmp = (z + a) - b; elseif (y <= -7e-208) tmp = ((a * (y + t)) - (y * b)) / t_1; elseif (y <= 4.6e-67) tmp = ((x * z) + (t * a)) / (x + t); elseif (y <= 2.7e+33) tmp = (y + t) * (a / t_1); else tmp = 1.0 / ((t_1 / y) / (a + (z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e-73], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, -7e-208], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4.6e-67], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+33], N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(t$95$1 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{-73}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-208}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t\_1}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+33}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{t\_1}{y}}{a + \left(z - b\right)}}\\
\end{array}
\end{array}
if y < -4.4e-73Initial program 44.9%
Taylor expanded in y around inf 74.3%
if -4.4e-73 < y < -6.99999999999999982e-208Initial program 82.0%
Taylor expanded in z around 0 63.7%
+-commutative63.7%
*-commutative63.7%
Simplified63.7%
if -6.99999999999999982e-208 < y < 4.6000000000000001e-67Initial program 82.3%
Taylor expanded in y around 0 66.0%
if 4.6000000000000001e-67 < y < 2.69999999999999991e33Initial program 72.0%
Taylor expanded in a around inf 49.5%
associate-/l*73.4%
+-commutative73.4%
+-commutative73.4%
associate-+r+73.4%
Simplified73.4%
associate-*r/49.5%
*-commutative49.5%
+-commutative49.5%
associate-+l+49.5%
+-commutative49.5%
Applied egg-rr49.5%
associate-/l*75.6%
Simplified75.6%
if 2.69999999999999991e33 < y Initial program 45.4%
Taylor expanded in y around inf 41.1%
clear-num41.0%
inv-pow41.0%
+-commutative41.0%
associate--l+41.0%
Applied egg-rr41.0%
unpow-141.0%
associate-/r*81.2%
Simplified81.2%
Final simplification72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ 1.0 (/ (/ (+ y (+ x t)) y) (+ a (- z b))))))
(if (<= y -8800000000000.0)
t_1
(if (<= y -8.2e-143)
(/ (- (+ (* y a) (* (+ x y) z)) (* y b)) (+ x y))
(if (<= y 2.95e+35)
(* a (+ (/ t (+ x t)) (/ (* x z) (* a (+ x t)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 / (((y + (x + t)) / y) / (a + (z - b)));
double tmp;
if (y <= -8800000000000.0) {
tmp = t_1;
} else if (y <= -8.2e-143) {
tmp = (((y * a) + ((x + y) * z)) - (y * b)) / (x + y);
} else if (y <= 2.95e+35) {
tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + 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 = 1.0d0 / (((y + (x + t)) / y) / (a + (z - b)))
if (y <= (-8800000000000.0d0)) then
tmp = t_1
else if (y <= (-8.2d-143)) then
tmp = (((y * a) + ((x + y) * z)) - (y * b)) / (x + y)
else if (y <= 2.95d+35) then
tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + 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 = 1.0 / (((y + (x + t)) / y) / (a + (z - b)));
double tmp;
if (y <= -8800000000000.0) {
tmp = t_1;
} else if (y <= -8.2e-143) {
tmp = (((y * a) + ((x + y) * z)) - (y * b)) / (x + y);
} else if (y <= 2.95e+35) {
tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 / (((y + (x + t)) / y) / (a + (z - b))) tmp = 0 if y <= -8800000000000.0: tmp = t_1 elif y <= -8.2e-143: tmp = (((y * a) + ((x + y) * z)) - (y * b)) / (x + y) elif y <= 2.95e+35: tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 / Float64(Float64(Float64(y + Float64(x + t)) / y) / Float64(a + Float64(z - b)))) tmp = 0.0 if (y <= -8800000000000.0) tmp = t_1; elseif (y <= -8.2e-143) tmp = Float64(Float64(Float64(Float64(y * a) + Float64(Float64(x + y) * z)) - Float64(y * b)) / Float64(x + y)); elseif (y <= 2.95e+35) tmp = Float64(a * Float64(Float64(t / Float64(x + t)) + Float64(Float64(x * z) / Float64(a * Float64(x + t))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 / (((y + (x + t)) / y) / (a + (z - b))); tmp = 0.0; if (y <= -8800000000000.0) tmp = t_1; elseif (y <= -8.2e-143) tmp = (((y * a) + ((x + y) * z)) - (y * b)) / (x + y); elseif (y <= 2.95e+35) tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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, -8800000000000.0], t$95$1, If[LessEqual[y, -8.2e-143], N[(N[(N[(N[(y * a), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+35], N[(a * N[(N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] / N[(a * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\
\mathbf{if}\;y \leq -8800000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-143}:\\
\;\;\;\;\frac{\left(y \cdot a + \left(x + y\right) \cdot z\right) - y \cdot b}{x + y}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+35}:\\
\;\;\;\;a \cdot \left(\frac{t}{x + t} + \frac{x \cdot z}{a \cdot \left(x + t\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.8e12 or 2.94999999999999993e35 < y Initial program 40.5%
Taylor expanded in y around inf 35.0%
clear-num34.9%
inv-pow34.9%
+-commutative34.9%
associate--l+34.9%
Applied egg-rr34.9%
unpow-134.9%
associate-/r*80.0%
Simplified80.0%
if -8.8e12 < y < -8.2e-143Initial program 84.2%
Taylor expanded in t around 0 79.1%
if -8.2e-143 < y < 2.94999999999999993e35Initial program 79.2%
Taylor expanded in a around inf 80.4%
associate-+r+80.4%
+-commutative80.4%
+-commutative80.4%
associate-+r+80.4%
+-commutative80.4%
associate-+r+80.4%
+-commutative80.4%
+-commutative80.4%
associate-+r+80.4%
associate-/r*78.8%
Simplified78.8%
Taylor expanded in y around 0 64.0%
Final simplification72.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= y -1.04e-81)
(- (+ z a) b)
(if (<= y -9.8e-175)
(/ (- (* a (+ y t)) (* y b)) t_1)
(if (<= y 2.1e+35)
(* a (+ (/ t (+ x t)) (/ (* x z) (* a (+ x t)))))
(/ 1.0 (/ (/ t_1 y) (+ a (- z b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (y <= -1.04e-81) {
tmp = (z + a) - b;
} else if (y <= -9.8e-175) {
tmp = ((a * (y + t)) - (y * b)) / t_1;
} else if (y <= 2.1e+35) {
tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t))));
} else {
tmp = 1.0 / ((t_1 / y) / (a + (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) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (y <= (-1.04d-81)) then
tmp = (z + a) - b
else if (y <= (-9.8d-175)) then
tmp = ((a * (y + t)) - (y * b)) / t_1
else if (y <= 2.1d+35) then
tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t))))
else
tmp = 1.0d0 / ((t_1 / y) / (a + (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 t_1 = y + (x + t);
double tmp;
if (y <= -1.04e-81) {
tmp = (z + a) - b;
} else if (y <= -9.8e-175) {
tmp = ((a * (y + t)) - (y * b)) / t_1;
} else if (y <= 2.1e+35) {
tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t))));
} else {
tmp = 1.0 / ((t_1 / y) / (a + (z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if y <= -1.04e-81: tmp = (z + a) - b elif y <= -9.8e-175: tmp = ((a * (y + t)) - (y * b)) / t_1 elif y <= 2.1e+35: tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t)))) else: tmp = 1.0 / ((t_1 / y) / (a + (z - b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (y <= -1.04e-81) tmp = Float64(Float64(z + a) - b); elseif (y <= -9.8e-175) tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / t_1); elseif (y <= 2.1e+35) tmp = Float64(a * Float64(Float64(t / Float64(x + t)) + Float64(Float64(x * z) / Float64(a * Float64(x + t))))); else tmp = Float64(1.0 / Float64(Float64(t_1 / y) / Float64(a + Float64(z - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (y <= -1.04e-81) tmp = (z + a) - b; elseif (y <= -9.8e-175) tmp = ((a * (y + t)) - (y * b)) / t_1; elseif (y <= 2.1e+35) tmp = a * ((t / (x + t)) + ((x * z) / (a * (x + t)))); else tmp = 1.0 / ((t_1 / y) / (a + (z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.04e-81], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, -9.8e-175], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 2.1e+35], N[(a * N[(N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] / N[(a * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(t$95$1 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;y \leq -1.04 \cdot 10^{-81}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t\_1}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+35}:\\
\;\;\;\;a \cdot \left(\frac{t}{x + t} + \frac{x \cdot z}{a \cdot \left(x + t\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{t\_1}{y}}{a + \left(z - b\right)}}\\
\end{array}
\end{array}
if y < -1.04e-81Initial program 44.9%
Taylor expanded in y around inf 74.3%
if -1.04e-81 < y < -9.79999999999999996e-175Initial program 87.1%
Taylor expanded in z around 0 68.4%
+-commutative68.4%
*-commutative68.4%
Simplified68.4%
if -9.79999999999999996e-175 < y < 2.0999999999999999e35Initial program 79.2%
Taylor expanded in a around inf 80.5%
associate-+r+80.5%
+-commutative80.5%
+-commutative80.5%
associate-+r+80.5%
+-commutative80.5%
associate-+r+80.5%
+-commutative80.5%
+-commutative80.5%
associate-+r+80.5%
associate-/r*78.8%
Simplified78.8%
Taylor expanded in y around 0 66.3%
if 2.0999999999999999e35 < y Initial program 46.1%
Taylor expanded in y around inf 41.7%
clear-num41.7%
inv-pow41.7%
+-commutative41.7%
associate--l+41.7%
Applied egg-rr41.7%
unpow-141.7%
associate-/r*82.6%
Simplified82.6%
Final simplification72.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ x (+ y t))))
(if (<= a -1.2e+100)
(* a (/ (+ y t) t_2))
(if (<= a -5.2e-243)
t_1
(if (<= a 2.8e-52)
(* z (/ (+ x y) t_2))
(if (<= a 2e+41) t_1 (* (+ y t) (/ a (+ y (+ x t))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = x + (y + t);
double tmp;
if (a <= -1.2e+100) {
tmp = a * ((y + t) / t_2);
} else if (a <= -5.2e-243) {
tmp = t_1;
} else if (a <= 2.8e-52) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2e+41) {
tmp = t_1;
} else {
tmp = (y + t) * (a / (y + (x + t)));
}
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 = x + (y + t)
if (a <= (-1.2d+100)) then
tmp = a * ((y + t) / t_2)
else if (a <= (-5.2d-243)) then
tmp = t_1
else if (a <= 2.8d-52) then
tmp = z * ((x + y) / t_2)
else if (a <= 2d+41) then
tmp = t_1
else
tmp = (y + t) * (a / (y + (x + t)))
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 = x + (y + t);
double tmp;
if (a <= -1.2e+100) {
tmp = a * ((y + t) / t_2);
} else if (a <= -5.2e-243) {
tmp = t_1;
} else if (a <= 2.8e-52) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2e+41) {
tmp = t_1;
} else {
tmp = (y + t) * (a / (y + (x + t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = x + (y + t) tmp = 0 if a <= -1.2e+100: tmp = a * ((y + t) / t_2) elif a <= -5.2e-243: tmp = t_1 elif a <= 2.8e-52: tmp = z * ((x + y) / t_2) elif a <= 2e+41: tmp = t_1 else: tmp = (y + t) * (a / (y + (x + t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(x + Float64(y + t)) tmp = 0.0 if (a <= -1.2e+100) tmp = Float64(a * Float64(Float64(y + t) / t_2)); elseif (a <= -5.2e-243) tmp = t_1; elseif (a <= 2.8e-52) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 2e+41) tmp = t_1; else tmp = Float64(Float64(y + t) * Float64(a / Float64(y + Float64(x + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = x + (y + t); tmp = 0.0; if (a <= -1.2e+100) tmp = a * ((y + t) / t_2); elseif (a <= -5.2e-243) tmp = t_1; elseif (a <= 2.8e-52) tmp = z * ((x + y) / t_2); elseif (a <= 2e+41) tmp = t_1; else tmp = (y + t) * (a / (y + (x + t))); 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[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+100], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.2e-243], t$95$1, If[LessEqual[a, 2.8e-52], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+41], t$95$1, N[(N[(y + t), $MachinePrecision] * N[(a / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := x + \left(y + t\right)\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+100}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_2}\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-52}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(x + t\right)}\\
\end{array}
\end{array}
if a < -1.20000000000000006e100Initial program 48.0%
Taylor expanded in a around inf 30.7%
associate-/l*68.6%
+-commutative68.6%
+-commutative68.6%
associate-+r+68.6%
Simplified68.6%
if -1.20000000000000006e100 < a < -5.1999999999999995e-243 or 2.79999999999999995e-52 < a < 2.00000000000000001e41Initial program 63.9%
Taylor expanded in y around inf 65.3%
if -5.1999999999999995e-243 < a < 2.79999999999999995e-52Initial program 75.6%
Taylor expanded in z around inf 40.9%
associate-/l*60.3%
+-commutative60.3%
+-commutative60.3%
associate-+r+60.3%
Simplified60.3%
if 2.00000000000000001e41 < a Initial program 56.7%
Taylor expanded in a around inf 44.8%
associate-/l*76.6%
+-commutative76.6%
+-commutative76.6%
associate-+r+76.6%
Simplified76.6%
associate-*r/44.8%
*-commutative44.8%
+-commutative44.8%
associate-+l+44.8%
+-commutative44.8%
Applied egg-rr44.8%
associate-/l*78.2%
Simplified78.2%
Final simplification67.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ x (+ y t))) (t_3 (* a (/ (+ y t) t_2))))
(if (<= a -4e+99)
t_3
(if (<= a -3.7e-241)
t_1
(if (<= a 1.2e-51)
(* z (/ (+ x y) t_2))
(if (<= a 3.05e+41) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = x + (y + t);
double t_3 = a * ((y + t) / t_2);
double tmp;
if (a <= -4e+99) {
tmp = t_3;
} else if (a <= -3.7e-241) {
tmp = t_1;
} else if (a <= 1.2e-51) {
tmp = z * ((x + y) / t_2);
} else if (a <= 3.05e+41) {
tmp = t_1;
} 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 = (z + a) - b
t_2 = x + (y + t)
t_3 = a * ((y + t) / t_2)
if (a <= (-4d+99)) then
tmp = t_3
else if (a <= (-3.7d-241)) then
tmp = t_1
else if (a <= 1.2d-51) then
tmp = z * ((x + y) / t_2)
else if (a <= 3.05d+41) then
tmp = t_1
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 = (z + a) - b;
double t_2 = x + (y + t);
double t_3 = a * ((y + t) / t_2);
double tmp;
if (a <= -4e+99) {
tmp = t_3;
} else if (a <= -3.7e-241) {
tmp = t_1;
} else if (a <= 1.2e-51) {
tmp = z * ((x + y) / t_2);
} else if (a <= 3.05e+41) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = x + (y + t) t_3 = a * ((y + t) / t_2) tmp = 0 if a <= -4e+99: tmp = t_3 elif a <= -3.7e-241: tmp = t_1 elif a <= 1.2e-51: tmp = z * ((x + y) / t_2) elif a <= 3.05e+41: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(x + Float64(y + t)) t_3 = Float64(a * Float64(Float64(y + t) / t_2)) tmp = 0.0 if (a <= -4e+99) tmp = t_3; elseif (a <= -3.7e-241) tmp = t_1; elseif (a <= 1.2e-51) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 3.05e+41) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = x + (y + t); t_3 = a * ((y + t) / t_2); tmp = 0.0; if (a <= -4e+99) tmp = t_3; elseif (a <= -3.7e-241) tmp = t_1; elseif (a <= 1.2e-51) tmp = z * ((x + y) / t_2); elseif (a <= 3.05e+41) tmp = t_1; else tmp = t_3; 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[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+99], t$95$3, If[LessEqual[a, -3.7e-241], t$95$1, If[LessEqual[a, 1.2e-51], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.05e+41], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := x + \left(y + t\right)\\
t_3 := a \cdot \frac{y + t}{t\_2}\\
\mathbf{if}\;a \leq -4 \cdot 10^{+99}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-241}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-51}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 3.05 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -3.9999999999999999e99 or 3.04999999999999999e41 < a Initial program 52.5%
Taylor expanded in a around inf 38.0%
associate-/l*72.7%
+-commutative72.7%
+-commutative72.7%
associate-+r+72.7%
Simplified72.7%
if -3.9999999999999999e99 < a < -3.6999999999999999e-241 or 1.2e-51 < a < 3.04999999999999999e41Initial program 63.9%
Taylor expanded in y around inf 65.3%
if -3.6999999999999999e-241 < a < 1.2e-51Initial program 75.6%
Taylor expanded in z around inf 40.9%
associate-/l*60.3%
+-commutative60.3%
+-commutative60.3%
associate-+r+60.3%
Simplified60.3%
Final simplification67.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= y -5.6e-200)
(- (+ z a) b)
(if (<= y 6.7e-65)
(/ (+ (* x z) (* t a)) (+ x t))
(if (<= y 2.35e+33)
(* (+ y t) (/ a t_1))
(/ 1.0 (/ (/ t_1 y) (+ a (- z b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (y <= -5.6e-200) {
tmp = (z + a) - b;
} else if (y <= 6.7e-65) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 2.35e+33) {
tmp = (y + t) * (a / t_1);
} else {
tmp = 1.0 / ((t_1 / y) / (a + (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) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (y <= (-5.6d-200)) then
tmp = (z + a) - b
else if (y <= 6.7d-65) then
tmp = ((x * z) + (t * a)) / (x + t)
else if (y <= 2.35d+33) then
tmp = (y + t) * (a / t_1)
else
tmp = 1.0d0 / ((t_1 / y) / (a + (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 t_1 = y + (x + t);
double tmp;
if (y <= -5.6e-200) {
tmp = (z + a) - b;
} else if (y <= 6.7e-65) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 2.35e+33) {
tmp = (y + t) * (a / t_1);
} else {
tmp = 1.0 / ((t_1 / y) / (a + (z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if y <= -5.6e-200: tmp = (z + a) - b elif y <= 6.7e-65: tmp = ((x * z) + (t * a)) / (x + t) elif y <= 2.35e+33: tmp = (y + t) * (a / t_1) else: tmp = 1.0 / ((t_1 / y) / (a + (z - b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (y <= -5.6e-200) tmp = Float64(Float64(z + a) - b); elseif (y <= 6.7e-65) tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t)); elseif (y <= 2.35e+33) tmp = Float64(Float64(y + t) * Float64(a / t_1)); else tmp = Float64(1.0 / Float64(Float64(t_1 / y) / Float64(a + Float64(z - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (y <= -5.6e-200) tmp = (z + a) - b; elseif (y <= 6.7e-65) tmp = ((x * z) + (t * a)) / (x + t); elseif (y <= 2.35e+33) tmp = (y + t) * (a / t_1); else tmp = 1.0 / ((t_1 / y) / (a + (z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e-200], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, 6.7e-65], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.35e+33], N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(t$95$1 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{-200}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq 6.7 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{+33}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{t\_1}{y}}{a + \left(z - b\right)}}\\
\end{array}
\end{array}
if y < -5.60000000000000013e-200Initial program 54.1%
Taylor expanded in y around inf 67.4%
if -5.60000000000000013e-200 < y < 6.7000000000000004e-65Initial program 81.9%
Taylor expanded in y around 0 66.2%
if 6.7000000000000004e-65 < y < 2.3499999999999999e33Initial program 72.0%
Taylor expanded in a around inf 49.5%
associate-/l*73.4%
+-commutative73.4%
+-commutative73.4%
associate-+r+73.4%
Simplified73.4%
associate-*r/49.5%
*-commutative49.5%
+-commutative49.5%
associate-+l+49.5%
+-commutative49.5%
Applied egg-rr49.5%
associate-/l*75.6%
Simplified75.6%
if 2.3499999999999999e33 < y Initial program 45.4%
Taylor expanded in y around inf 41.1%
clear-num41.0%
inv-pow41.0%
+-commutative41.0%
associate--l+41.0%
Applied egg-rr41.0%
unpow-141.0%
associate-/r*81.2%
Simplified81.2%
Final simplification70.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= y -6.4e-200)
(- (+ z a) b)
(if (<= y 4.6e-67)
(/ (+ (* x z) (* t a)) (+ x t))
(if (<= y 2.25e+33)
(* (+ y t) (/ a t_1))
(* y (* (+ a (- z b)) (/ 1.0 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (y <= -6.4e-200) {
tmp = (z + a) - b;
} else if (y <= 4.6e-67) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 2.25e+33) {
tmp = (y + t) * (a / t_1);
} else {
tmp = y * ((a + (z - b)) * (1.0 / 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 = y + (x + t)
if (y <= (-6.4d-200)) then
tmp = (z + a) - b
else if (y <= 4.6d-67) then
tmp = ((x * z) + (t * a)) / (x + t)
else if (y <= 2.25d+33) then
tmp = (y + t) * (a / t_1)
else
tmp = y * ((a + (z - b)) * (1.0d0 / 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 tmp;
if (y <= -6.4e-200) {
tmp = (z + a) - b;
} else if (y <= 4.6e-67) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 2.25e+33) {
tmp = (y + t) * (a / t_1);
} else {
tmp = y * ((a + (z - b)) * (1.0 / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if y <= -6.4e-200: tmp = (z + a) - b elif y <= 4.6e-67: tmp = ((x * z) + (t * a)) / (x + t) elif y <= 2.25e+33: tmp = (y + t) * (a / t_1) else: tmp = y * ((a + (z - b)) * (1.0 / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (y <= -6.4e-200) tmp = Float64(Float64(z + a) - b); elseif (y <= 4.6e-67) tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t)); elseif (y <= 2.25e+33) tmp = Float64(Float64(y + t) * Float64(a / t_1)); else tmp = Float64(y * Float64(Float64(a + Float64(z - b)) * Float64(1.0 / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (y <= -6.4e-200) tmp = (z + a) - b; elseif (y <= 4.6e-67) tmp = ((x * z) + (t * a)) / (x + t); elseif (y <= 2.25e+33) tmp = (y + t) * (a / t_1); else tmp = y * ((a + (z - b)) * (1.0 / 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]}, If[LessEqual[y, -6.4e-200], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, 4.6e-67], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+33], N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{-200}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+33}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(a + \left(z - b\right)\right) \cdot \frac{1}{t\_1}\right)\\
\end{array}
\end{array}
if y < -6.39999999999999965e-200Initial program 54.1%
Taylor expanded in y around inf 67.4%
if -6.39999999999999965e-200 < y < 4.6000000000000001e-67Initial program 81.9%
Taylor expanded in y around 0 66.2%
if 4.6000000000000001e-67 < y < 2.25e33Initial program 72.0%
Taylor expanded in a around inf 49.5%
associate-/l*73.4%
+-commutative73.4%
+-commutative73.4%
associate-+r+73.4%
Simplified73.4%
associate-*r/49.5%
*-commutative49.5%
+-commutative49.5%
associate-+l+49.5%
+-commutative49.5%
Applied egg-rr49.5%
associate-/l*75.6%
Simplified75.6%
if 2.25e33 < y Initial program 45.4%
Taylor expanded in y around inf 41.1%
div-inv40.8%
associate--l+40.8%
+-commutative40.8%
Applied egg-rr40.8%
associate-*l*77.8%
Simplified77.8%
Final simplification69.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.8e-200)
t_1
(if (<= y 4.3e-68)
(/ (+ (* x z) (* t a)) (+ x t))
(if (<= y 1.95e+30) (* (+ y t) (/ a (+ y (+ x t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.8e-200) {
tmp = t_1;
} else if (y <= 4.3e-68) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 1.95e+30) {
tmp = (y + t) * (a / (y + (x + 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 = (z + a) - b
if (y <= (-2.8d-200)) then
tmp = t_1
else if (y <= 4.3d-68) then
tmp = ((x * z) + (t * a)) / (x + t)
else if (y <= 1.95d+30) then
tmp = (y + t) * (a / (y + (x + 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 = (z + a) - b;
double tmp;
if (y <= -2.8e-200) {
tmp = t_1;
} else if (y <= 4.3e-68) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 1.95e+30) {
tmp = (y + t) * (a / (y + (x + t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.8e-200: tmp = t_1 elif y <= 4.3e-68: tmp = ((x * z) + (t * a)) / (x + t) elif y <= 1.95e+30: tmp = (y + t) * (a / (y + (x + t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.8e-200) tmp = t_1; elseif (y <= 4.3e-68) tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t)); elseif (y <= 1.95e+30) tmp = Float64(Float64(y + t) * Float64(a / Float64(y + Float64(x + t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.8e-200) tmp = t_1; elseif (y <= 4.3e-68) tmp = ((x * z) + (t * a)) / (x + t); elseif (y <= 1.95e+30) tmp = (y + t) * (a / (y + (x + t))); 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]}, If[LessEqual[y, -2.8e-200], t$95$1, If[LessEqual[y, 4.3e-68], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+30], N[(N[(y + t), $MachinePrecision] * N[(a / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+30}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.80000000000000007e-200 or 1.95000000000000005e30 < y Initial program 50.8%
Taylor expanded in y around inf 70.7%
if -2.80000000000000007e-200 < y < 4.3000000000000001e-68Initial program 81.9%
Taylor expanded in y around 0 66.2%
if 4.3000000000000001e-68 < y < 1.95000000000000005e30Initial program 74.7%
Taylor expanded in a around inf 49.2%
associate-/l*69.8%
+-commutative69.8%
+-commutative69.8%
associate-+r+69.8%
Simplified69.8%
associate-*r/49.2%
*-commutative49.2%
+-commutative49.2%
associate-+l+49.2%
+-commutative49.2%
Applied egg-rr49.2%
associate-/l*72.4%
Simplified72.4%
Final simplification69.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.75e+98) (not (<= a 3.3e+41))) (* a (/ (+ y t) (+ x (+ y t)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.75e+98) || !(a <= 3.3e+41)) {
tmp = a * ((y + t) / (x + (y + 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 ((a <= (-1.75d+98)) .or. (.not. (a <= 3.3d+41))) then
tmp = a * ((y + t) / (x + (y + 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 ((a <= -1.75e+98) || !(a <= 3.3e+41)) {
tmp = a * ((y + t) / (x + (y + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.75e+98) or not (a <= 3.3e+41): tmp = a * ((y + t) / (x + (y + t))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.75e+98) || !(a <= 3.3e+41)) tmp = Float64(a * Float64(Float64(y + t) / Float64(x + Float64(y + 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 ((a <= -1.75e+98) || ~((a <= 3.3e+41))) tmp = a * ((y + t) / (x + (y + t))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.75e+98], N[Not[LessEqual[a, 3.3e+41]], $MachinePrecision]], N[(a * N[(N[(y + t), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+98} \lor \neg \left(a \leq 3.3 \cdot 10^{+41}\right):\\
\;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if a < -1.75e98 or 3.3e41 < a Initial program 52.5%
Taylor expanded in a around inf 38.0%
associate-/l*72.7%
+-commutative72.7%
+-commutative72.7%
associate-+r+72.7%
Simplified72.7%
if -1.75e98 < a < 3.3e41Initial program 68.7%
Taylor expanded in y around inf 56.8%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4e+223) a (if (<= t 4.7e+82) (- (+ z a) b) (* a (/ t (+ x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4e+223) {
tmp = a;
} else if (t <= 4.7e+82) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
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 <= (-4d+223)) then
tmp = a
else if (t <= 4.7d+82) then
tmp = (z + a) - b
else
tmp = a * (t / (x + t))
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 <= -4e+223) {
tmp = a;
} else if (t <= 4.7e+82) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4e+223: tmp = a elif t <= 4.7e+82: tmp = (z + a) - b else: tmp = a * (t / (x + t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4e+223) tmp = a; elseif (t <= 4.7e+82) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(t / Float64(x + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4e+223) tmp = a; elseif (t <= 4.7e+82) tmp = (z + a) - b; else tmp = a * (t / (x + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4e+223], a, If[LessEqual[t, 4.7e+82], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+223}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+82}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\
\end{array}
\end{array}
if t < -4.00000000000000019e223Initial program 53.2%
Taylor expanded in t around inf 69.6%
if -4.00000000000000019e223 < t < 4.7e82Initial program 66.7%
Taylor expanded in y around inf 60.9%
if 4.7e82 < t Initial program 49.1%
Taylor expanded in a around inf 36.1%
associate-/l*66.6%
+-commutative66.6%
+-commutative66.6%
associate-+r+66.6%
Simplified66.6%
associate-*r/36.1%
*-commutative36.1%
+-commutative36.1%
associate-+l+36.1%
+-commutative36.1%
Applied egg-rr36.1%
associate-/l*60.5%
Simplified60.5%
Taylor expanded in y around 0 37.7%
associate-/l*64.7%
+-commutative64.7%
Simplified64.7%
Final simplification62.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.25e+223) a (if (<= t 5.6e+83) (- (+ z a) b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.25e+223) {
tmp = a;
} else if (t <= 5.6e+83) {
tmp = (z + a) - b;
} 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 (t <= (-2.25d+223)) then
tmp = a
else if (t <= 5.6d+83) then
tmp = (z + a) - b
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 (t <= -2.25e+223) {
tmp = a;
} else if (t <= 5.6e+83) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.25e+223: tmp = a elif t <= 5.6e+83: tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.25e+223) tmp = a; elseif (t <= 5.6e+83) tmp = Float64(Float64(z + a) - b); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.25e+223) tmp = a; elseif (t <= 5.6e+83) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.25e+223], a, If[LessEqual[t, 5.6e+83], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{+223}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+83}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -2.25e223 or 5.6000000000000001e83 < t Initial program 50.0%
Taylor expanded in t around inf 60.7%
if -2.25e223 < t < 5.6000000000000001e83Initial program 66.7%
Taylor expanded in y around inf 60.9%
Final simplification60.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7.5e+104) z (if (<= z 4.2e+25) (- a b) (- z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.5e+104) {
tmp = z;
} else if (z <= 4.2e+25) {
tmp = a - b;
} 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 (z <= (-7.5d+104)) then
tmp = z
else if (z <= 4.2d+25) then
tmp = a - b
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 (z <= -7.5e+104) {
tmp = z;
} else if (z <= 4.2e+25) {
tmp = a - b;
} else {
tmp = z - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.5e+104: tmp = z elif z <= 4.2e+25: tmp = a - b else: tmp = z - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.5e+104) tmp = z; elseif (z <= 4.2e+25) tmp = Float64(a - b); else tmp = Float64(z - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7.5e+104) tmp = z; elseif (z <= 4.2e+25) tmp = a - b; else tmp = z - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.5e+104], z, If[LessEqual[z, 4.2e+25], N[(a - b), $MachinePrecision], N[(z - b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+104}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+25}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z - b\\
\end{array}
\end{array}
if z < -7.5000000000000002e104Initial program 52.3%
Taylor expanded in x around inf 47.6%
if -7.5000000000000002e104 < z < 4.1999999999999998e25Initial program 67.4%
Taylor expanded in y around inf 57.7%
Taylor expanded in z around 0 54.9%
if 4.1999999999999998e25 < z Initial program 55.7%
Taylor expanded in y around inf 60.8%
Taylor expanded in a around 0 58.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8e+106) z (if (<= z 1.25e+26) (- a b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8e+106) {
tmp = z;
} else if (z <= 1.25e+26) {
tmp = a - b;
} else {
tmp = z;
}
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 (z <= (-8d+106)) then
tmp = z
else if (z <= 1.25d+26) then
tmp = a - b
else
tmp = z
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 (z <= -8e+106) {
tmp = z;
} else if (z <= 1.25e+26) {
tmp = a - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8e+106: tmp = z elif z <= 1.25e+26: tmp = a - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8e+106) tmp = z; elseif (z <= 1.25e+26) tmp = Float64(a - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8e+106) tmp = z; elseif (z <= 1.25e+26) tmp = a - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8e+106], z, If[LessEqual[z, 1.25e+26], N[(a - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+106}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+26}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -8.00000000000000073e106 or 1.25e26 < z Initial program 54.4%
Taylor expanded in x around inf 53.1%
if -8.00000000000000073e106 < z < 1.25e26Initial program 67.4%
Taylor expanded in y around inf 57.7%
Taylor expanded in z around 0 54.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.15e+104) z (if (<= z 5e+26) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.15e+104) {
tmp = z;
} else if (z <= 5e+26) {
tmp = a;
} else {
tmp = z;
}
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 (z <= (-1.15d+104)) then
tmp = z
else if (z <= 5d+26) then
tmp = a
else
tmp = z
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 (z <= -1.15e+104) {
tmp = z;
} else if (z <= 5e+26) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.15e+104: tmp = z elif z <= 5e+26: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.15e+104) tmp = z; elseif (z <= 5e+26) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.15e+104) tmp = z; elseif (z <= 5e+26) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.15e+104], z, If[LessEqual[z, 5e+26], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+104}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+26}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.14999999999999992e104 or 5.0000000000000001e26 < z Initial program 53.9%
Taylor expanded in x around inf 53.7%
if -1.14999999999999992e104 < z < 5.0000000000000001e26Initial program 67.6%
Taylor expanded in t around inf 47.4%
(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 62.3%
Taylor expanded in t around inf 37.0%
(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 2024165
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ 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)))