
(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 11 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 (+ t (+ x y))) (t_2 (/ y t_1)))
(if (or (<= z -8.8e+102) (not (<= z 2e+29)))
(*
z
(+
(/ x t_1)
(- (+ t_2 (/ (* a (/ (+ t y) z)) t_1)) (/ (* b (/ y z)) t_1))))
(*
a
(+
(/ t t_1)
(- (+ t_2 (* (/ z a) (/ (+ x y) t_1))) (/ (* y b) (* t_1 a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (x + y);
double t_2 = y / t_1;
double tmp;
if ((z <= -8.8e+102) || !(z <= 2e+29)) {
tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1)));
} else {
tmp = a * ((t / t_1) + ((t_2 + ((z / a) * ((x + y) / t_1))) - ((y * b) / (t_1 * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t + (x + y)
t_2 = y / t_1
if ((z <= (-8.8d+102)) .or. (.not. (z <= 2d+29))) then
tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1)))
else
tmp = a * ((t / t_1) + ((t_2 + ((z / a) * ((x + y) / t_1))) - ((y * b) / (t_1 * a))))
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 + (x + y);
double t_2 = y / t_1;
double tmp;
if ((z <= -8.8e+102) || !(z <= 2e+29)) {
tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1)));
} else {
tmp = a * ((t / t_1) + ((t_2 + ((z / a) * ((x + y) / t_1))) - ((y * b) / (t_1 * a))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = y / t_1 tmp = 0 if (z <= -8.8e+102) or not (z <= 2e+29): tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1))) else: tmp = a * ((t / t_1) + ((t_2 + ((z / a) * ((x + y) / t_1))) - ((y * b) / (t_1 * a)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(x + y)) t_2 = Float64(y / t_1) tmp = 0.0 if ((z <= -8.8e+102) || !(z <= 2e+29)) tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_2 + Float64(Float64(a * Float64(Float64(t + y) / z)) / t_1)) - Float64(Float64(b * Float64(y / z)) / t_1)))); else tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(t_2 + Float64(Float64(z / a) * Float64(Float64(x + y) / t_1))) - Float64(Float64(y * b) / Float64(t_1 * a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (x + y); t_2 = y / t_1; tmp = 0.0; if ((z <= -8.8e+102) || ~((z <= 2e+29))) tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1))); else tmp = a * ((t / t_1) + ((t_2 + ((z / a) * ((x + y) / t_1))) - ((y * b) / (t_1 * a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / t$95$1), $MachinePrecision]}, If[Or[LessEqual[z, -8.8e+102], N[Not[LessEqual[z, 2e+29]], $MachinePrecision]], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$2 + N[(N[(a * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(y / z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(t$95$2 + N[(N[(z / a), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / N[(t$95$1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \frac{y}{t\_1}\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+102} \lor \neg \left(z \leq 2 \cdot 10^{+29}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_2 + \frac{a \cdot \frac{t + y}{z}}{t\_1}\right) - \frac{b \cdot \frac{y}{z}}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(t\_2 + \frac{z}{a} \cdot \frac{x + y}{t\_1}\right) - \frac{y \cdot b}{t\_1 \cdot a}\right)\right)\\
\end{array}
\end{array}
if z < -8.8000000000000003e102 or 1.99999999999999983e29 < z Initial program 44.8%
Taylor expanded in z around inf 72.2%
associate--l+72.2%
+-commutative72.2%
+-commutative72.2%
associate-/r*73.8%
associate-/l*85.1%
+-commutative85.1%
associate-/r*85.5%
associate-/l*94.1%
+-commutative94.1%
Simplified94.1%
if -8.8000000000000003e102 < z < 1.99999999999999983e29Initial program 66.6%
Taylor expanded in a around inf 82.3%
associate--l+82.3%
+-commutative82.3%
+-commutative82.3%
times-frac85.5%
+-commutative85.5%
+-commutative85.5%
*-commutative85.5%
+-commutative85.5%
Simplified85.5%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* z (+ x y)) (* a (+ t y))) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+236))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+236)) {
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 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+236)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+236): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(t + y))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+236)) 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 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+236))) 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t + y), $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+236]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(t + y\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^{+236}\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 4.9999999999999997e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 12.4%
Taylor expanded in y around inf 70.1%
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.9999999999999997e236Initial program 99.0%
Final simplification85.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -7.4e+33)
t_1
(if (<= y -6e-181)
(* z (/ (+ x y) (+ y (+ x t))))
(if (<= y 4.2e+17)
(* a (+ (/ t (+ x t)) (/ (* z x) (* a (+ 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 <= -7.4e+33) {
tmp = t_1;
} else if (y <= -6e-181) {
tmp = z * ((x + y) / (y + (x + t)));
} else if (y <= 4.2e+17) {
tmp = a * ((t / (x + t)) + ((z * x) / (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 = (z + a) - b
if (y <= (-7.4d+33)) then
tmp = t_1
else if (y <= (-6d-181)) then
tmp = z * ((x + y) / (y + (x + t)))
else if (y <= 4.2d+17) then
tmp = a * ((t / (x + t)) + ((z * x) / (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 = (z + a) - b;
double tmp;
if (y <= -7.4e+33) {
tmp = t_1;
} else if (y <= -6e-181) {
tmp = z * ((x + y) / (y + (x + t)));
} else if (y <= 4.2e+17) {
tmp = a * ((t / (x + t)) + ((z * x) / (a * (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 <= -7.4e+33: tmp = t_1 elif y <= -6e-181: tmp = z * ((x + y) / (y + (x + t))) elif y <= 4.2e+17: tmp = a * ((t / (x + t)) + ((z * x) / (a * (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 <= -7.4e+33) tmp = t_1; elseif (y <= -6e-181) tmp = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))); elseif (y <= 4.2e+17) tmp = Float64(a * Float64(Float64(t / Float64(x + t)) + Float64(Float64(z * x) / 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 = (z + a) - b; tmp = 0.0; if (y <= -7.4e+33) tmp = t_1; elseif (y <= -6e-181) tmp = z * ((x + y) / (y + (x + t))); elseif (y <= 4.2e+17) tmp = a * ((t / (x + t)) + ((z * x) / (a * (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, -7.4e+33], t$95$1, If[LessEqual[y, -6e-181], N[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+17], N[(a * N[(N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision] + N[(N[(z * x), $MachinePrecision] / N[(a * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -7.4 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-181}:\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(\frac{t}{x + t} + \frac{z \cdot x}{a \cdot \left(x + t\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.3999999999999997e33 or 4.2e17 < y Initial program 33.0%
Taylor expanded in y around inf 76.8%
if -7.3999999999999997e33 < y < -5.99999999999999948e-181Initial program 79.0%
Taylor expanded in z around inf 41.9%
associate-/l*57.4%
+-commutative57.4%
associate-+r+57.4%
Simplified57.4%
if -5.99999999999999948e-181 < y < 4.2e17Initial program 76.2%
Taylor expanded in a around inf 84.0%
associate--l+84.0%
+-commutative84.0%
+-commutative84.0%
times-frac87.1%
+-commutative87.1%
+-commutative87.1%
*-commutative87.1%
+-commutative87.1%
Simplified87.1%
Taylor expanded in y around 0 65.8%
Final simplification68.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -1.08e+60)
t_2
(if (<= z 8.4e-181)
(* a (/ (+ t y) t_1))
(if (<= z 2.1e+83) (/ (- (* a (+ t y)) (* y b)) t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.08e+60) {
tmp = t_2;
} else if (z <= 8.4e-181) {
tmp = a * ((t + y) / t_1);
} else if (z <= 2.1e+83) {
tmp = ((a * (t + y)) - (y * b)) / 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 = y + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-1.08d+60)) then
tmp = t_2
else if (z <= 8.4d-181) then
tmp = a * ((t + y) / t_1)
else if (z <= 2.1d+83) then
tmp = ((a * (t + y)) - (y * b)) / 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 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.08e+60) {
tmp = t_2;
} else if (z <= 8.4e-181) {
tmp = a * ((t + y) / t_1);
} else if (z <= 2.1e+83) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -1.08e+60: tmp = t_2 elif z <= 8.4e-181: tmp = a * ((t + y) / t_1) elif z <= 2.1e+83: tmp = ((a * (t + y)) - (y * b)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -1.08e+60) tmp = t_2; elseif (z <= 8.4e-181) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= 2.1e+83) tmp = Float64(Float64(Float64(a * Float64(t + y)) - Float64(y * b)) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -1.08e+60) tmp = t_2; elseif (z <= 8.4e-181) tmp = a * ((t + y) / t_1); elseif (z <= 2.1e+83) tmp = ((a * (t + y)) - (y * b)) / t_1; else tmp = t_2; 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[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e+60], t$95$2, If[LessEqual[z, 8.4e-181], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+83], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{+60}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-181}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.08e60 or 2.10000000000000002e83 < z Initial program 42.8%
Taylor expanded in z around inf 32.7%
associate-/l*73.0%
+-commutative73.0%
associate-+r+73.0%
Simplified73.0%
if -1.08e60 < z < 8.40000000000000013e-181Initial program 61.1%
Taylor expanded in a around inf 34.7%
associate-/l*64.3%
associate-+r+64.3%
Simplified64.3%
if 8.40000000000000013e-181 < z < 2.10000000000000002e83Initial program 80.5%
Taylor expanded in z around 0 57.1%
*-commutative57.1%
Simplified57.1%
Final simplification66.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* a (/ (+ t y) t_1))))
(if (<= a -3000000000.0)
t_2
(if (<= a 1.5e-102)
(* z (/ (+ x y) t_1))
(if (<= a 2.1e+156) (- (+ z a) b) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a * ((t + y) / t_1);
double tmp;
if (a <= -3000000000.0) {
tmp = t_2;
} else if (a <= 1.5e-102) {
tmp = z * ((x + y) / t_1);
} else if (a <= 2.1e+156) {
tmp = (z + a) - b;
} 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 = y + (x + t)
t_2 = a * ((t + y) / t_1)
if (a <= (-3000000000.0d0)) then
tmp = t_2
else if (a <= 1.5d-102) then
tmp = z * ((x + y) / t_1)
else if (a <= 2.1d+156) then
tmp = (z + a) - b
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 = y + (x + t);
double t_2 = a * ((t + y) / t_1);
double tmp;
if (a <= -3000000000.0) {
tmp = t_2;
} else if (a <= 1.5e-102) {
tmp = z * ((x + y) / t_1);
} else if (a <= 2.1e+156) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a * ((t + y) / t_1) tmp = 0 if a <= -3000000000.0: tmp = t_2 elif a <= 1.5e-102: tmp = z * ((x + y) / t_1) elif a <= 2.1e+156: tmp = (z + a) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a * Float64(Float64(t + y) / t_1)) tmp = 0.0 if (a <= -3000000000.0) tmp = t_2; elseif (a <= 1.5e-102) tmp = Float64(z * Float64(Float64(x + y) / t_1)); elseif (a <= 2.1e+156) tmp = Float64(Float64(z + a) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a * ((t + y) / t_1); tmp = 0.0; if (a <= -3000000000.0) tmp = t_2; elseif (a <= 1.5e-102) tmp = z * ((x + y) / t_1); elseif (a <= 2.1e+156) tmp = (z + a) - b; else tmp = t_2; 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[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3000000000.0], t$95$2, If[LessEqual[a, 1.5e-102], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+156], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a \cdot \frac{t + y}{t\_1}\\
\mathbf{if}\;a \leq -3000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-102}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_1}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+156}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3e9 or 2.09999999999999981e156 < a Initial program 43.0%
Taylor expanded in a around inf 37.2%
associate-/l*77.0%
associate-+r+77.0%
Simplified77.0%
if -3e9 < a < 1.5e-102Initial program 69.0%
Taylor expanded in z around inf 38.5%
associate-/l*57.9%
+-commutative57.9%
associate-+r+57.9%
Simplified57.9%
if 1.5e-102 < a < 2.09999999999999981e156Initial program 60.8%
Taylor expanded in y around inf 62.7%
Final simplification65.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.85e+157) (not (<= b 1.2e+181))) (* b (/ (- y) (+ x (+ t y)))) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.85e+157) || !(b <= 1.2e+181)) {
tmp = b * (-y / (x + (t + y)));
} 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 <= (-1.85d+157)) .or. (.not. (b <= 1.2d+181))) then
tmp = b * (-y / (x + (t + y)))
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 <= -1.85e+157) || !(b <= 1.2e+181)) {
tmp = b * (-y / (x + (t + y)));
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.85e+157) or not (b <= 1.2e+181): tmp = b * (-y / (x + (t + y))) else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.85e+157) || !(b <= 1.2e+181)) tmp = Float64(b * Float64(Float64(-y) / Float64(x + Float64(t + y)))); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.85e+157) || ~((b <= 1.2e+181))) tmp = b * (-y / (x + (t + y))); else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.85e+157], N[Not[LessEqual[b, 1.2e+181]], $MachinePrecision]], N[(b * N[((-y) / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85 \cdot 10^{+157} \lor \neg \left(b \leq 1.2 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot \frac{-y}{x + \left(t + y\right)}\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if b < -1.8499999999999999e157 or 1.20000000000000001e181 < b Initial program 53.1%
Taylor expanded in b around inf 33.1%
mul-1-neg33.1%
associate-/l*61.1%
distribute-rgt-neg-in61.1%
distribute-neg-frac261.1%
+-commutative61.1%
associate-+r+61.1%
distribute-neg-in61.1%
+-commutative61.1%
unsub-neg61.1%
Simplified61.1%
if -1.8499999999999999e157 < b < 1.20000000000000001e181Initial program 59.7%
Taylor expanded in y around inf 25.2%
associate--l+28.7%
associate-/l*27.8%
associate-/l*28.0%
associate-/l*37.6%
Simplified37.6%
Taylor expanded in z around inf 46.4%
Taylor expanded in t around 0 64.5%
+-commutative64.5%
Simplified64.5%
Final simplification63.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.4e+157) (* y (/ (- z b) (+ t (+ x y)))) (if (<= b 5.5e+180) (+ z a) (* b (/ (- y) (+ x (+ t y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.4e+157) {
tmp = y * ((z - b) / (t + (x + y)));
} else if (b <= 5.5e+180) {
tmp = z + a;
} else {
tmp = b * (-y / (x + (t + y)));
}
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 <= (-1.4d+157)) then
tmp = y * ((z - b) / (t + (x + y)))
else if (b <= 5.5d+180) then
tmp = z + a
else
tmp = b * (-y / (x + (t + y)))
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 <= -1.4e+157) {
tmp = y * ((z - b) / (t + (x + y)));
} else if (b <= 5.5e+180) {
tmp = z + a;
} else {
tmp = b * (-y / (x + (t + y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.4e+157: tmp = y * ((z - b) / (t + (x + y))) elif b <= 5.5e+180: tmp = z + a else: tmp = b * (-y / (x + (t + y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.4e+157) tmp = Float64(y * Float64(Float64(z - b) / Float64(t + Float64(x + y)))); elseif (b <= 5.5e+180) tmp = Float64(z + a); else tmp = Float64(b * Float64(Float64(-y) / Float64(x + Float64(t + y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.4e+157) tmp = y * ((z - b) / (t + (x + y))); elseif (b <= 5.5e+180) tmp = z + a; else tmp = b * (-y / (x + (t + y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.4e+157], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+180], N[(z + a), $MachinePrecision], N[(b * N[((-y) / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+157}:\\
\;\;\;\;y \cdot \frac{z - b}{t + \left(x + y\right)}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+180}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{-y}{x + \left(t + y\right)}\\
\end{array}
\end{array}
if b < -1.4000000000000001e157Initial program 57.8%
Taylor expanded in y around inf 36.0%
Taylor expanded in a around 0 33.9%
associate-/l*57.6%
+-commutative57.6%
Simplified57.6%
if -1.4000000000000001e157 < b < 5.5000000000000003e180Initial program 59.7%
Taylor expanded in y around inf 25.2%
associate--l+28.7%
associate-/l*27.8%
associate-/l*28.0%
associate-/l*37.6%
Simplified37.6%
Taylor expanded in z around inf 46.4%
Taylor expanded in t around 0 64.5%
+-commutative64.5%
Simplified64.5%
if 5.5000000000000003e180 < b Initial program 46.7%
Taylor expanded in b around inf 32.7%
mul-1-neg32.7%
associate-/l*66.8%
distribute-rgt-neg-in66.8%
distribute-neg-frac266.8%
+-commutative66.8%
associate-+r+66.8%
distribute-neg-in66.8%
+-commutative66.8%
unsub-neg66.8%
Simplified66.8%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.6e+31) (not (<= y 14500000000000.0))) (- (+ z a) b) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.6e+31) || !(y <= 14500000000000.0)) {
tmp = (z + a) - 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 ((y <= (-4.6d+31)) .or. (.not. (y <= 14500000000000.0d0))) then
tmp = (z + a) - 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 ((y <= -4.6e+31) || !(y <= 14500000000000.0)) {
tmp = (z + a) - b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.6e+31) or not (y <= 14500000000000.0): tmp = (z + a) - b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.6e+31) || !(y <= 14500000000000.0)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.6e+31) || ~((y <= 14500000000000.0))) tmp = (z + a) - b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.6e+31], N[Not[LessEqual[y, 14500000000000.0]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+31} \lor \neg \left(y \leq 14500000000000\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if y < -4.5999999999999999e31 or 1.45e13 < y Initial program 33.4%
Taylor expanded in y around inf 75.5%
if -4.5999999999999999e31 < y < 1.45e13Initial program 77.6%
Taylor expanded in y around inf 8.7%
associate--l+12.8%
associate-/l*11.3%
associate-/l*11.4%
associate-/l*8.7%
Simplified8.7%
Taylor expanded in z around inf 24.9%
Taylor expanded in t around 0 50.5%
+-commutative50.5%
Simplified50.5%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.3e+84) z (if (<= z 2.6e+39) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.3e+84) {
tmp = z;
} else if (z <= 2.6e+39) {
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 <= (-3.3d+84)) then
tmp = z
else if (z <= 2.6d+39) 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 <= -3.3e+84) {
tmp = z;
} else if (z <= 2.6e+39) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.3e+84: tmp = z elif z <= 2.6e+39: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.3e+84) tmp = z; elseif (z <= 2.6e+39) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.3e+84) tmp = z; elseif (z <= 2.6e+39) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.3e+84], z, If[LessEqual[z, 2.6e+39], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+84}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -3.30000000000000017e84 or 2.6e39 < z Initial program 44.1%
Taylor expanded in x around inf 51.5%
if -3.30000000000000017e84 < z < 2.6e39Initial program 67.4%
Taylor expanded in t around inf 48.9%
(FPCore (x y z t a b) :precision binary64 (+ z a))
double code(double x, double y, double z, double t, double a, double b) {
return z + 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 = z + a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z + a;
}
def code(x, y, z, t, a, b): return z + a
function code(x, y, z, t, a, b) return Float64(z + a) end
function tmp = code(x, y, z, t, a, b) tmp = z + a; end
code[x_, y_, z_, t_, a_, b_] := N[(z + a), $MachinePrecision]
\begin{array}{l}
\\
z + a
\end{array}
Initial program 58.1%
Taylor expanded in y around inf 24.0%
associate--l+26.7%
associate-/l*25.9%
associate-/l*26.2%
associate-/l*34.2%
Simplified34.2%
Taylor expanded in z around inf 38.4%
Taylor expanded in t around 0 55.0%
+-commutative55.0%
Simplified55.0%
(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 58.1%
Taylor expanded in t around inf 35.9%
(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 2024137
(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)))