
(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 15 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 b) t_1))
(t_3 (* a (+ (/ t t_1) (/ y t_1))))
(t_4 (* z (+ x y)))
(t_5 (/ (- (+ t_4 (* a (+ y t))) (* y b)) (+ y (+ x t))))
(t_6 (+ z t_3)))
(if (<= t_5 (- INFINITY))
(- t_6 t_2)
(if (<= t_5 2e+277) (- (+ t_3 (/ t_4 t_1)) t_2) (- t_6 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (x + y);
double t_2 = (y * b) / t_1;
double t_3 = a * ((t / t_1) + (y / t_1));
double t_4 = z * (x + y);
double t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_6 = z + t_3;
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6 - t_2;
} else if (t_5 <= 2e+277) {
tmp = (t_3 + (t_4 / t_1)) - t_2;
} else {
tmp = t_6 - b;
}
return tmp;
}
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 * b) / t_1;
double t_3 = a * ((t / t_1) + (y / t_1));
double t_4 = z * (x + y);
double t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_6 = z + t_3;
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6 - t_2;
} else if (t_5 <= 2e+277) {
tmp = (t_3 + (t_4 / t_1)) - t_2;
} else {
tmp = t_6 - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = (y * b) / t_1 t_3 = a * ((t / t_1) + (y / t_1)) t_4 = z * (x + y) t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t)) t_6 = z + t_3 tmp = 0 if t_5 <= -math.inf: tmp = t_6 - t_2 elif t_5 <= 2e+277: tmp = (t_3 + (t_4 / t_1)) - t_2 else: tmp = t_6 - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(x + y)) t_2 = Float64(Float64(y * b) / t_1) t_3 = Float64(a * Float64(Float64(t / t_1) + Float64(y / t_1))) t_4 = Float64(z * Float64(x + y)) t_5 = Float64(Float64(Float64(t_4 + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) t_6 = Float64(z + t_3) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = Float64(t_6 - t_2); elseif (t_5 <= 2e+277) tmp = Float64(Float64(t_3 + Float64(t_4 / t_1)) - t_2); else tmp = Float64(t_6 - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (x + y); t_2 = (y * b) / t_1; t_3 = a * ((t / t_1) + (y / t_1)); t_4 = z * (x + y); t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t)); t_6 = z + t_3; tmp = 0.0; if (t_5 <= -Inf) tmp = t_6 - t_2; elseif (t_5 <= 2e+277) tmp = (t_3 + (t_4 / t_1)) - t_2; else tmp = t_6 - b; 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[(N[(y * b), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(z + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(t$95$6 - t$95$2), $MachinePrecision], If[LessEqual[t$95$5, 2e+277], N[(N[(t$95$3 + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t$95$6 - b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \frac{y \cdot b}{t_1}\\
t_3 := a \cdot \left(\frac{t}{t_1} + \frac{y}{t_1}\right)\\
t_4 := z \cdot \left(x + y\right)\\
t_5 := \frac{\left(t_4 + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
t_6 := z + t_3\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_6 - t_2\\
\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;\left(t_3 + \frac{t_4}{t_1}\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;t_6 - b\\
\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.0Initial program 6.7%
Taylor expanded in a around 0 40.5%
Taylor expanded in x around inf 78.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)) < 2.00000000000000001e277Initial program 99.7%
Taylor expanded in a around 0 99.7%
if 2.00000000000000001e277 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.1%
Taylor expanded in a around 0 31.9%
Taylor expanded in x around inf 59.3%
Taylor expanded in y around inf 74.1%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ x y)))
(t_2 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 2e+277)))
(- (+ z (* a (+ (/ t t_1) (/ y t_1)))) b)
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (x + y);
double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 2e+277)) {
tmp = (z + (a * ((t / t_1) + (y / t_1)))) - b;
} else {
tmp = t_2;
}
return tmp;
}
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 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 2e+277)) {
tmp = (z + (a * ((t / t_1) + (y / t_1)))) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 2e+277): tmp = (z + (a * ((t / t_1) + (y / t_1)))) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(x + y)) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 2e+277)) tmp = Float64(Float64(z + Float64(a * Float64(Float64(t / t_1) + Float64(y / t_1)))) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (x + y); t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 2e+277))) tmp = (z + (a * ((t / t_1) + (y / t_1)))) - b; else tmp = t_2; 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[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $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$2, (-Infinity)], N[Not[LessEqual[t$95$2, 2e+277]], $MachinePrecision]], N[(N[(z + N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+277}\right):\\
\;\;\;\;\left(z + a \cdot \left(\frac{t}{t_1} + \frac{y}{t_1}\right)\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\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 2.00000000000000001e277 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.9%
Taylor expanded in a around 0 36.0%
Taylor expanded in x around inf 68.3%
Taylor expanded in y around inf 74.0%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000001e277Initial program 99.7%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t))))
(t_2 (+ t (+ x y)))
(t_3 (+ z (* a (+ (/ t t_2) (/ y t_2))))))
(if (<= t_1 (- INFINITY))
(- t_3 (/ (* y b) t_2))
(if (<= t_1 2e+277) t_1 (- t_3 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = t + (x + y);
double t_3 = z + (a * ((t / t_2) + (y / t_2)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_3 - ((y * b) / t_2);
} else if (t_1 <= 2e+277) {
tmp = t_1;
} else {
tmp = t_3 - b;
}
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 * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = t + (x + y);
double t_3 = z + (a * ((t / t_2) + (y / t_2)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_3 - ((y * b) / t_2);
} else if (t_1 <= 2e+277) {
tmp = t_1;
} else {
tmp = t_3 - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)) t_2 = t + (x + y) t_3 = z + (a * ((t / t_2) + (y / t_2))) tmp = 0 if t_1 <= -math.inf: tmp = t_3 - ((y * b) / t_2) elif t_1 <= 2e+277: tmp = t_1 else: tmp = t_3 - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) t_2 = Float64(t + Float64(x + y)) t_3 = Float64(z + Float64(a * Float64(Float64(t / t_2) + Float64(y / t_2)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(t_3 - Float64(Float64(y * b) / t_2)); elseif (t_1 <= 2e+277) tmp = t_1; else tmp = Float64(t_3 - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)); t_2 = t + (x + y); t_3 = z + (a * ((t / t_2) + (y / t_2))); tmp = 0.0; if (t_1 <= -Inf) tmp = t_3 - ((y * b) / t_2); elseif (t_1 <= 2e+277) tmp = t_1; else tmp = t_3 - b; 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[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(a * N[(N[(t / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$3 - N[(N[(y * b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+277], t$95$1, N[(t$95$3 - b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := t + \left(x + y\right)\\
t_3 := z + a \cdot \left(\frac{t}{t_2} + \frac{y}{t_2}\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_3 - \frac{y \cdot b}{t_2}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3 - b\\
\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.0Initial program 6.7%
Taylor expanded in a around 0 40.5%
Taylor expanded in x around inf 78.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)) < 2.00000000000000001e277Initial program 99.7%
if 2.00000000000000001e277 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.1%
Taylor expanded in a around 0 31.9%
Taylor expanded in x around inf 59.3%
Taylor expanded in y around inf 74.1%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (* y (- (/ z t) (/ b t))))) (t_2 (+ t (+ x y))))
(if (<= t -2.45e+79)
t_1
(if (<= t -7e-126)
(- (+ z (* a (+ (/ t t_2) (/ y t_2)))) b)
(if (<= t 1.45e+61)
(- (+ z (/ a (/ (+ x y) y))) (/ (* y b) t_2))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (y * ((z / t) - (b / t)));
double t_2 = t + (x + y);
double tmp;
if (t <= -2.45e+79) {
tmp = t_1;
} else if (t <= -7e-126) {
tmp = (z + (a * ((t / t_2) + (y / t_2)))) - b;
} else if (t <= 1.45e+61) {
tmp = (z + (a / ((x + y) / y))) - ((y * b) / t_2);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (y * ((z / t) - (b / t)))
t_2 = t + (x + y)
if (t <= (-2.45d+79)) then
tmp = t_1
else if (t <= (-7d-126)) then
tmp = (z + (a * ((t / t_2) + (y / t_2)))) - b
else if (t <= 1.45d+61) then
tmp = (z + (a / ((x + y) / y))) - ((y * b) / t_2)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (y * ((z / t) - (b / t)));
double t_2 = t + (x + y);
double tmp;
if (t <= -2.45e+79) {
tmp = t_1;
} else if (t <= -7e-126) {
tmp = (z + (a * ((t / t_2) + (y / t_2)))) - b;
} else if (t <= 1.45e+61) {
tmp = (z + (a / ((x + y) / y))) - ((y * b) / t_2);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (y * ((z / t) - (b / t))) t_2 = t + (x + y) tmp = 0 if t <= -2.45e+79: tmp = t_1 elif t <= -7e-126: tmp = (z + (a * ((t / t_2) + (y / t_2)))) - b elif t <= 1.45e+61: tmp = (z + (a / ((x + y) / y))) - ((y * b) / t_2) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))) t_2 = Float64(t + Float64(x + y)) tmp = 0.0 if (t <= -2.45e+79) tmp = t_1; elseif (t <= -7e-126) tmp = Float64(Float64(z + Float64(a * Float64(Float64(t / t_2) + Float64(y / t_2)))) - b); elseif (t <= 1.45e+61) tmp = Float64(Float64(z + Float64(a / Float64(Float64(x + y) / y))) - Float64(Float64(y * b) / t_2)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (y * ((z / t) - (b / t))); t_2 = t + (x + y); tmp = 0.0; if (t <= -2.45e+79) tmp = t_1; elseif (t <= -7e-126) tmp = (z + (a * ((t / t_2) + (y / t_2)))) - b; elseif (t <= 1.45e+61) tmp = (z + (a / ((x + y) / y))) - ((y * b) / t_2); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e+79], t$95$1, If[LessEqual[t, -7e-126], N[(N[(z + N[(a * N[(N[(t / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t, 1.45e+61], N[(N[(z + N[(a / N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+79}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-126}:\\
\;\;\;\;\left(z + a \cdot \left(\frac{t}{t_2} + \frac{y}{t_2}\right)\right) - b\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+61}:\\
\;\;\;\;\left(z + \frac{a}{\frac{x + y}{y}}\right) - \frac{y \cdot b}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.4499999999999999e79 or 1.45e61 < t Initial program 51.4%
Taylor expanded in t around inf 58.6%
associate--l+58.6%
associate-/l*58.9%
+-commutative58.9%
associate-/l*63.6%
+-commutative63.6%
associate-/l*65.8%
Simplified65.8%
Taylor expanded in y around inf 67.9%
if -2.4499999999999999e79 < t < -7e-126Initial program 69.6%
Taylor expanded in a around 0 71.9%
Taylor expanded in x around inf 65.1%
Taylor expanded in y around inf 66.4%
if -7e-126 < t < 1.45e61Initial program 63.5%
Taylor expanded in a around 0 70.2%
Taylor expanded in x around inf 88.8%
Taylor expanded in t around 0 78.3%
associate-/l*86.7%
+-commutative86.7%
Simplified86.7%
Final simplification75.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.65e+91) (not (<= t 1.5e+61))) (+ a (* y (- (/ z t) (/ b t)))) (- (+ z (/ a (/ (+ x y) y))) (/ (* y b) (+ t (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.65e+91) || !(t <= 1.5e+61)) {
tmp = a + (y * ((z / t) - (b / t)));
} else {
tmp = (z + (a / ((x + y) / y))) - ((y * b) / (t + (x + 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 ((t <= (-1.65d+91)) .or. (.not. (t <= 1.5d+61))) then
tmp = a + (y * ((z / t) - (b / t)))
else
tmp = (z + (a / ((x + y) / y))) - ((y * b) / (t + (x + 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 ((t <= -1.65e+91) || !(t <= 1.5e+61)) {
tmp = a + (y * ((z / t) - (b / t)));
} else {
tmp = (z + (a / ((x + y) / y))) - ((y * b) / (t + (x + y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.65e+91) or not (t <= 1.5e+61): tmp = a + (y * ((z / t) - (b / t))) else: tmp = (z + (a / ((x + y) / y))) - ((y * b) / (t + (x + y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.65e+91) || !(t <= 1.5e+61)) tmp = Float64(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))); else tmp = Float64(Float64(z + Float64(a / Float64(Float64(x + y) / y))) - Float64(Float64(y * b) / Float64(t + Float64(x + y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.65e+91) || ~((t <= 1.5e+61))) tmp = a + (y * ((z / t) - (b / t))); else tmp = (z + (a / ((x + y) / y))) - ((y * b) / (t + (x + y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.65e+91], N[Not[LessEqual[t, 1.5e+61]], $MachinePrecision]], N[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(a / N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+91} \lor \neg \left(t \leq 1.5 \cdot 10^{+61}\right):\\
\;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \frac{a}{\frac{x + y}{y}}\right) - \frac{y \cdot b}{t + \left(x + y\right)}\\
\end{array}
\end{array}
if t < -1.65000000000000009e91 or 1.5e61 < t Initial program 50.9%
Taylor expanded in t around inf 59.1%
associate--l+59.1%
associate-/l*59.4%
+-commutative59.4%
associate-/l*64.1%
+-commutative64.1%
associate-/l*66.3%
Simplified66.3%
Taylor expanded in y around inf 68.6%
if -1.65000000000000009e91 < t < 1.5e61Initial program 65.4%
Taylor expanded in a around 0 70.8%
Taylor expanded in x around inf 82.2%
Taylor expanded in t around 0 70.8%
associate-/l*77.6%
+-commutative77.6%
Simplified77.6%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ a (* y (- (/ z t) (/ b t))))))
(if (<= t -9.5e+26)
t_2
(if (<= t 2.95e+21)
t_1
(if (<= t 2e+42)
(/ z (+ 1.0 (/ t (+ x y))))
(if (<= t 1.3e+61) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a + (y * ((z / t) - (b / t)));
double tmp;
if (t <= -9.5e+26) {
tmp = t_2;
} else if (t <= 2.95e+21) {
tmp = t_1;
} else if (t <= 2e+42) {
tmp = z / (1.0 + (t / (x + y)));
} else if (t <= 1.3e+61) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z + a) - b
t_2 = a + (y * ((z / t) - (b / t)))
if (t <= (-9.5d+26)) then
tmp = t_2
else if (t <= 2.95d+21) then
tmp = t_1
else if (t <= 2d+42) then
tmp = z / (1.0d0 + (t / (x + y)))
else if (t <= 1.3d+61) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a + (y * ((z / t) - (b / t)));
double tmp;
if (t <= -9.5e+26) {
tmp = t_2;
} else if (t <= 2.95e+21) {
tmp = t_1;
} else if (t <= 2e+42) {
tmp = z / (1.0 + (t / (x + y)));
} else if (t <= 1.3e+61) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a + (y * ((z / t) - (b / t))) tmp = 0 if t <= -9.5e+26: tmp = t_2 elif t <= 2.95e+21: tmp = t_1 elif t <= 2e+42: tmp = z / (1.0 + (t / (x + y))) elif t <= 1.3e+61: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))) tmp = 0.0 if (t <= -9.5e+26) tmp = t_2; elseif (t <= 2.95e+21) tmp = t_1; elseif (t <= 2e+42) tmp = Float64(z / Float64(1.0 + Float64(t / Float64(x + y)))); elseif (t <= 1.3e+61) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a + (y * ((z / t) - (b / t))); tmp = 0.0; if (t <= -9.5e+26) tmp = t_2; elseif (t <= 2.95e+21) tmp = t_1; elseif (t <= 2e+42) tmp = z / (1.0 + (t / (x + y))); elseif (t <= 1.3e+61) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+26], t$95$2, If[LessEqual[t, 2.95e+21], t$95$1, If[LessEqual[t, 2e+42], N[(z / N[(1.0 + N[(t / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+61], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+42}:\\
\;\;\;\;\frac{z}{1 + \frac{t}{x + y}}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -9.50000000000000054e26 or 1.29999999999999986e61 < t Initial program 54.4%
Taylor expanded in t around inf 56.5%
associate--l+56.5%
associate-/l*56.8%
+-commutative56.8%
associate-/l*61.8%
+-commutative61.8%
associate-/l*63.7%
Simplified63.7%
Taylor expanded in y around inf 64.8%
if -9.50000000000000054e26 < t < 2.95e21 or 2.00000000000000009e42 < t < 1.29999999999999986e61Initial program 63.4%
Taylor expanded in y around inf 66.1%
if 2.95e21 < t < 2.00000000000000009e42Initial program 80.8%
+-commutative80.8%
associate--l+80.8%
fma-def80.8%
+-commutative80.8%
+-commutative80.8%
Simplified80.8%
div-inv80.2%
fma-udef80.2%
*-commutative80.2%
fma-def80.2%
+-commutative80.2%
associate-+l+80.2%
+-commutative80.2%
Applied egg-rr80.2%
Taylor expanded in z around inf 80.8%
associate-/l*99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 99.7%
+-commutative99.7%
Simplified99.7%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -9.5e+26)
(+ a (* y (- (/ z t) (/ b t))))
(if (<= t -1.36e-219)
(- (+ z a) b)
(if (<= t 3.1e+162)
(- (+ z a) (/ (* y b) (+ t (+ x y))))
(+ a (* z (+ (/ y t) (/ x t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9.5e+26) {
tmp = a + (y * ((z / t) - (b / t)));
} else if (t <= -1.36e-219) {
tmp = (z + a) - b;
} else if (t <= 3.1e+162) {
tmp = (z + a) - ((y * b) / (t + (x + y)));
} else {
tmp = a + (z * ((y / 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 <= (-9.5d+26)) then
tmp = a + (y * ((z / t) - (b / t)))
else if (t <= (-1.36d-219)) then
tmp = (z + a) - b
else if (t <= 3.1d+162) then
tmp = (z + a) - ((y * b) / (t + (x + y)))
else
tmp = a + (z * ((y / 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 <= -9.5e+26) {
tmp = a + (y * ((z / t) - (b / t)));
} else if (t <= -1.36e-219) {
tmp = (z + a) - b;
} else if (t <= 3.1e+162) {
tmp = (z + a) - ((y * b) / (t + (x + y)));
} else {
tmp = a + (z * ((y / t) + (x / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -9.5e+26: tmp = a + (y * ((z / t) - (b / t))) elif t <= -1.36e-219: tmp = (z + a) - b elif t <= 3.1e+162: tmp = (z + a) - ((y * b) / (t + (x + y))) else: tmp = a + (z * ((y / t) + (x / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -9.5e+26) tmp = Float64(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))); elseif (t <= -1.36e-219) tmp = Float64(Float64(z + a) - b); elseif (t <= 3.1e+162) tmp = Float64(Float64(z + a) - Float64(Float64(y * b) / Float64(t + Float64(x + y)))); else tmp = Float64(a + Float64(z * Float64(Float64(y / t) + Float64(x / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -9.5e+26) tmp = a + (y * ((z / t) - (b / t))); elseif (t <= -1.36e-219) tmp = (z + a) - b; elseif (t <= 3.1e+162) tmp = (z + a) - ((y * b) / (t + (x + y))); else tmp = a + (z * ((y / t) + (x / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9.5e+26], N[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.36e-219], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t, 3.1e+162], N[(N[(z + a), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z * N[(N[(y / t), $MachinePrecision] + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+26}:\\
\;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
\mathbf{elif}\;t \leq -1.36 \cdot 10^{-219}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+162}:\\
\;\;\;\;\left(z + a\right) - \frac{y \cdot b}{t + \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;a + z \cdot \left(\frac{y}{t} + \frac{x}{t}\right)\\
\end{array}
\end{array}
if t < -9.50000000000000054e26Initial program 57.5%
Taylor expanded in t around inf 57.5%
associate--l+57.5%
associate-/l*57.9%
+-commutative57.9%
associate-/l*64.6%
+-commutative64.6%
associate-/l*65.6%
Simplified65.6%
Taylor expanded in y around inf 65.9%
if -9.50000000000000054e26 < t < -1.35999999999999997e-219Initial program 67.5%
Taylor expanded in y around inf 71.1%
if -1.35999999999999997e-219 < t < 3.1e162Initial program 63.0%
Taylor expanded in a around 0 72.6%
Taylor expanded in x around inf 87.2%
Taylor expanded in t around inf 69.5%
if 3.1e162 < t Initial program 41.8%
Taylor expanded in t around inf 53.0%
associate--l+53.0%
associate-/l*53.2%
+-commutative53.2%
associate-/l*56.3%
+-commutative56.3%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in z around inf 66.3%
+-commutative66.3%
Simplified66.3%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- a (* y (/ b t)))))
(if (<= t -5.6e+128)
t_1
(if (<= t 2.95e+21)
(- (+ z a) b)
(if (<= t 8.5e+80) (* (+ x y) (/ z (+ x (+ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a - (y * (b / t));
double tmp;
if (t <= -5.6e+128) {
tmp = t_1;
} else if (t <= 2.95e+21) {
tmp = (z + a) - b;
} else if (t <= 8.5e+80) {
tmp = (x + y) * (z / (x + (y + t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a - (y * (b / t))
if (t <= (-5.6d+128)) then
tmp = t_1
else if (t <= 2.95d+21) then
tmp = (z + a) - b
else if (t <= 8.5d+80) then
tmp = (x + y) * (z / (x + (y + t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a - (y * (b / t));
double tmp;
if (t <= -5.6e+128) {
tmp = t_1;
} else if (t <= 2.95e+21) {
tmp = (z + a) - b;
} else if (t <= 8.5e+80) {
tmp = (x + y) * (z / (x + (y + t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a - (y * (b / t)) tmp = 0 if t <= -5.6e+128: tmp = t_1 elif t <= 2.95e+21: tmp = (z + a) - b elif t <= 8.5e+80: tmp = (x + y) * (z / (x + (y + t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a - Float64(y * Float64(b / t))) tmp = 0.0 if (t <= -5.6e+128) tmp = t_1; elseif (t <= 2.95e+21) tmp = Float64(Float64(z + a) - b); elseif (t <= 8.5e+80) tmp = Float64(Float64(x + y) * Float64(z / Float64(x + Float64(y + t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a - (y * (b / t)); tmp = 0.0; if (t <= -5.6e+128) tmp = t_1; elseif (t <= 2.95e+21) tmp = (z + a) - b; elseif (t <= 8.5e+80) tmp = (x + y) * (z / (x + (y + t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+128], t$95$1, If[LessEqual[t, 2.95e+21], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t, 8.5e+80], N[(N[(x + y), $MachinePrecision] * N[(z / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a - y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+80}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{x + \left(y + t\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.59999999999999965e128 or 8.50000000000000007e80 < t Initial program 47.9%
Taylor expanded in t around inf 58.5%
associate--l+58.5%
associate-/l*58.8%
+-commutative58.8%
associate-/l*63.0%
+-commutative63.0%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in b around inf 55.9%
mul-1-neg55.9%
associate-*l/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
distribute-frac-neg61.9%
Simplified61.9%
if -5.59999999999999965e128 < t < 2.95e21Initial program 66.4%
Taylor expanded in y around inf 62.3%
if 2.95e21 < t < 8.50000000000000007e80Initial program 61.2%
+-commutative61.2%
associate--l+61.2%
fma-def61.2%
+-commutative61.2%
+-commutative61.2%
Simplified61.2%
div-inv60.8%
fma-udef60.8%
*-commutative60.8%
fma-def60.8%
+-commutative60.8%
associate-+l+60.8%
+-commutative60.8%
Applied egg-rr60.8%
Taylor expanded in z around inf 52.6%
associate-/l*75.6%
associate-+r+75.6%
+-commutative75.6%
+-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 52.6%
+-commutative52.6%
associate-+r+52.6%
associate-*l/75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
+-commutative75.9%
+-commutative75.9%
Simplified75.9%
Final simplification62.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- a (* y (/ b t)))))
(if (<= t -5.5e+129)
t_1
(if (<= t 2.7e+21)
(- (+ z a) b)
(if (<= t 3.5e+80) (/ z (+ 1.0 (/ t (+ x y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a - (y * (b / t));
double tmp;
if (t <= -5.5e+129) {
tmp = t_1;
} else if (t <= 2.7e+21) {
tmp = (z + a) - b;
} else if (t <= 3.5e+80) {
tmp = z / (1.0 + (t / (x + y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a - (y * (b / t))
if (t <= (-5.5d+129)) then
tmp = t_1
else if (t <= 2.7d+21) then
tmp = (z + a) - b
else if (t <= 3.5d+80) then
tmp = z / (1.0d0 + (t / (x + y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a - (y * (b / t));
double tmp;
if (t <= -5.5e+129) {
tmp = t_1;
} else if (t <= 2.7e+21) {
tmp = (z + a) - b;
} else if (t <= 3.5e+80) {
tmp = z / (1.0 + (t / (x + y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a - (y * (b / t)) tmp = 0 if t <= -5.5e+129: tmp = t_1 elif t <= 2.7e+21: tmp = (z + a) - b elif t <= 3.5e+80: tmp = z / (1.0 + (t / (x + y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a - Float64(y * Float64(b / t))) tmp = 0.0 if (t <= -5.5e+129) tmp = t_1; elseif (t <= 2.7e+21) tmp = Float64(Float64(z + a) - b); elseif (t <= 3.5e+80) tmp = Float64(z / Float64(1.0 + Float64(t / Float64(x + y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a - (y * (b / t)); tmp = 0.0; if (t <= -5.5e+129) tmp = t_1; elseif (t <= 2.7e+21) tmp = (z + a) - b; elseif (t <= 3.5e+80) tmp = z / (1.0 + (t / (x + y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+129], t$95$1, If[LessEqual[t, 2.7e+21], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t, 3.5e+80], N[(z / N[(1.0 + N[(t / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a - y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+21}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{z}{1 + \frac{t}{x + y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.49999999999999984e129 or 3.49999999999999994e80 < t Initial program 47.9%
Taylor expanded in t around inf 58.5%
associate--l+58.5%
associate-/l*58.8%
+-commutative58.8%
associate-/l*63.0%
+-commutative63.0%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in b around inf 55.9%
mul-1-neg55.9%
associate-*l/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
distribute-frac-neg61.9%
Simplified61.9%
if -5.49999999999999984e129 < t < 2.7e21Initial program 66.4%
Taylor expanded in y around inf 62.3%
if 2.7e21 < t < 3.49999999999999994e80Initial program 61.2%
+-commutative61.2%
associate--l+61.2%
fma-def61.2%
+-commutative61.2%
+-commutative61.2%
Simplified61.2%
div-inv60.8%
fma-udef60.8%
*-commutative60.8%
fma-def60.8%
+-commutative60.8%
associate-+l+60.8%
+-commutative60.8%
Applied egg-rr60.8%
Taylor expanded in z around inf 52.6%
associate-/l*75.6%
associate-+r+75.6%
+-commutative75.6%
+-commutative75.6%
Simplified75.6%
Taylor expanded in t around 0 75.6%
+-commutative75.6%
Simplified75.6%
Final simplification62.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -5e+99) (not (<= x 5.5e+216))) (/ z (/ (+ x t) x)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -5e+99) || !(x <= 5.5e+216)) {
tmp = z / ((x + t) / x);
} 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 ((x <= (-5d+99)) .or. (.not. (x <= 5.5d+216))) then
tmp = z / ((x + t) / x)
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 ((x <= -5e+99) || !(x <= 5.5e+216)) {
tmp = z / ((x + t) / x);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -5e+99) or not (x <= 5.5e+216): tmp = z / ((x + t) / x) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -5e+99) || !(x <= 5.5e+216)) tmp = Float64(z / Float64(Float64(x + t) / x)); 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 ((x <= -5e+99) || ~((x <= 5.5e+216))) tmp = z / ((x + t) / x); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5e+99], N[Not[LessEqual[x, 5.5e+216]], $MachinePrecision]], N[(z / N[(N[(x + t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+99} \lor \neg \left(x \leq 5.5 \cdot 10^{+216}\right):\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if x < -5.00000000000000008e99 or 5.5e216 < x Initial program 50.7%
+-commutative50.7%
associate--l+50.7%
fma-def50.8%
+-commutative50.8%
+-commutative50.8%
Simplified50.8%
div-inv50.7%
fma-udef50.5%
*-commutative50.5%
fma-def50.7%
+-commutative50.7%
associate-+l+50.7%
+-commutative50.7%
Applied egg-rr50.7%
Taylor expanded in z around inf 27.4%
associate-/l*62.3%
associate-+r+62.3%
+-commutative62.3%
+-commutative62.3%
Simplified62.3%
Taylor expanded in y around 0 60.8%
if -5.00000000000000008e99 < x < 5.5e216Initial program 63.0%
Taylor expanded in y around inf 58.9%
Final simplification59.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9e+129) (not (<= t 2.45e+162))) (- a (* y (/ b t))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9e+129) || !(t <= 2.45e+162)) {
tmp = a - (y * (b / 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 ((t <= (-9d+129)) .or. (.not. (t <= 2.45d+162))) then
tmp = a - (y * (b / 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 ((t <= -9e+129) || !(t <= 2.45e+162)) {
tmp = a - (y * (b / t));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9e+129) or not (t <= 2.45e+162): tmp = a - (y * (b / t)) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9e+129) || !(t <= 2.45e+162)) tmp = Float64(a - Float64(y * Float64(b / 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 ((t <= -9e+129) || ~((t <= 2.45e+162))) tmp = a - (y * (b / t)); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9e+129], N[Not[LessEqual[t, 2.45e+162]], $MachinePrecision]], N[(a - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+129} \lor \neg \left(t \leq 2.45 \cdot 10^{+162}\right):\\
\;\;\;\;a - y \cdot \frac{b}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -9.0000000000000003e129 or 2.45000000000000017e162 < t Initial program 46.1%
Taylor expanded in t around inf 59.5%
associate--l+59.5%
associate-/l*59.8%
+-commutative59.8%
associate-/l*64.5%
+-commutative64.5%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in b around inf 56.7%
mul-1-neg56.7%
associate-*l/63.5%
*-commutative63.5%
distribute-rgt-neg-in63.5%
distribute-frac-neg63.5%
Simplified63.5%
if -9.0000000000000003e129 < t < 2.45000000000000017e162Initial program 65.8%
Taylor expanded in y around inf 60.1%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.4e+153) z (if (<= x 8.8e+219) (- (+ z a) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.4e+153) {
tmp = z;
} else if (x <= 8.8e+219) {
tmp = (z + 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 (x <= (-1.4d+153)) then
tmp = z
else if (x <= 8.8d+219) then
tmp = (z + 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 (x <= -1.4e+153) {
tmp = z;
} else if (x <= 8.8e+219) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.4e+153: tmp = z elif x <= 8.8e+219: tmp = (z + a) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.4e+153) tmp = z; elseif (x <= 8.8e+219) tmp = Float64(Float64(z + a) - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.4e+153) tmp = z; elseif (x <= 8.8e+219) tmp = (z + a) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.4e+153], z, If[LessEqual[x, 8.8e+219], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+153}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+219}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -1.39999999999999993e153 or 8.8000000000000006e219 < x Initial program 45.7%
Taylor expanded in x around inf 58.6%
if -1.39999999999999993e153 < x < 8.8000000000000006e219Initial program 63.5%
Taylor expanded in y around inf 57.6%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (<= x -5.4e+119) z (if (<= x 5.8e+138) (- a b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -5.4e+119) {
tmp = z;
} else if (x <= 5.8e+138) {
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 (x <= (-5.4d+119)) then
tmp = z
else if (x <= 5.8d+138) 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 (x <= -5.4e+119) {
tmp = z;
} else if (x <= 5.8e+138) {
tmp = a - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -5.4e+119: tmp = z elif x <= 5.8e+138: tmp = a - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -5.4e+119) tmp = z; elseif (x <= 5.8e+138) 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 (x <= -5.4e+119) tmp = z; elseif (x <= 5.8e+138) tmp = a - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -5.4e+119], z, If[LessEqual[x, 5.8e+138], N[(a - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+119}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+138}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -5.3999999999999997e119 or 5.80000000000000019e138 < x Initial program 48.8%
Taylor expanded in x around inf 53.2%
if -5.3999999999999997e119 < x < 5.80000000000000019e138Initial program 64.8%
+-commutative64.8%
associate--l+64.8%
fma-def64.9%
+-commutative64.9%
+-commutative64.9%
Simplified64.9%
div-inv64.7%
fma-udef64.6%
*-commutative64.6%
fma-def64.7%
+-commutative64.7%
associate-+l+64.7%
+-commutative64.7%
Applied egg-rr64.7%
Taylor expanded in z around 0 42.3%
Taylor expanded in y around inf 46.6%
Final simplification48.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6e+28) a (if (<= a 1.52e-6) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6e+28) {
tmp = a;
} else if (a <= 1.52e-6) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-6d+28)) then
tmp = a
else if (a <= 1.52d-6) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6e+28) {
tmp = a;
} else if (a <= 1.52e-6) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6e+28: tmp = a elif a <= 1.52e-6: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6e+28) tmp = a; elseif (a <= 1.52e-6) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6e+28) tmp = a; elseif (a <= 1.52e-6) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6e+28], a, If[LessEqual[a, 1.52e-6], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+28}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 1.52 \cdot 10^{-6}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -6.0000000000000002e28 or 1.52000000000000006e-6 < a Initial program 49.9%
Taylor expanded in t around inf 53.1%
if -6.0000000000000002e28 < a < 1.52000000000000006e-6Initial program 69.5%
Taylor expanded in x around inf 40.2%
Final simplification46.6%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 59.7%
Taylor expanded in t around inf 32.9%
Final simplification32.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 2023285
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))