
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ y t_1))
(t_3 (* (+ y t) a))
(t_4 (/ (- (+ t_3 (* z (+ x y))) (* y b)) t_1)))
(if (or (<= t_4 (- INFINITY)) (not (<= t_4 1e+253)))
(+ z (* a (+ t_2 (/ t t_1))))
(+ (* z (+ t_2 (/ x t_1))) (/ (- t_3 (* y b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = y / t_1;
double t_3 = (y + t) * a;
double t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_4 <= -((double) INFINITY)) || !(t_4 <= 1e+253)) {
tmp = z + (a * (t_2 + (t / t_1)));
} else {
tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = y / t_1;
double t_3 = (y + t) * a;
double t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_4 <= -Double.POSITIVE_INFINITY) || !(t_4 <= 1e+253)) {
tmp = z + (a * (t_2 + (t / t_1)));
} else {
tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = y / t_1 t_3 = (y + t) * a t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1 tmp = 0 if (t_4 <= -math.inf) or not (t_4 <= 1e+253): tmp = z + (a * (t_2 + (t / t_1))) else: tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(y / t_1) t_3 = Float64(Float64(y + t) * a) t_4 = Float64(Float64(Float64(t_3 + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_4 <= Float64(-Inf)) || !(t_4 <= 1e+253)) tmp = Float64(z + Float64(a * Float64(t_2 + Float64(t / t_1)))); else tmp = Float64(Float64(z * Float64(t_2 + Float64(x / t_1))) + Float64(Float64(t_3 - Float64(y * b)) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = y / t_1; t_3 = (y + t) * a; t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1; tmp = 0.0; if ((t_4 <= -Inf) || ~((t_4 <= 1e+253))) tmp = z + (a * (t_2 + (t / t_1))); else tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$4, (-Infinity)], N[Not[LessEqual[t$95$4, 1e+253]], $MachinePrecision]], N[(z + N[(a * N[(t$95$2 + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(t$95$2 + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{y}{t_1}\\
t_3 := \left(y + t\right) \cdot a\\
t_4 := \frac{\left(t_3 + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_4 \leq -\infty \lor \neg \left(t_4 \leq 10^{+253}\right):\\
\;\;\;\;z + a \cdot \left(t_2 + \frac{t}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t_2 + \frac{x}{t_1}\right) + \frac{t_3 - y \cdot b}{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 9.9999999999999994e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.6%
Taylor expanded in a around 0 40.2%
associate--l+40.2%
+-commutative40.2%
associate-+r+40.2%
associate-+r+40.2%
div-sub40.2%
+-commutative40.2%
*-commutative40.2%
associate-+r+40.2%
Simplified40.2%
Taylor expanded in x 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)) < 9.9999999999999994e252Initial program 99.0%
Taylor expanded in z around 0 99.1%
associate--l+99.1%
associate-+r+99.1%
associate-+r+99.1%
div-sub99.1%
*-commutative99.1%
associate-+r+99.1%
Simplified99.1%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ x y)))
(t_2 (+ y (+ x t)))
(t_3 (/ (- (+ (* (+ y t) a) t_1) (* y b)) t_2))
(t_4 (* a (+ (/ y t_2) (/ t t_2)))))
(if (or (<= t_3 (- INFINITY)) (not (<= t_3 1e+253)))
(+ z t_4)
(+ t_4 (/ (- t_1 (* y b)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (x + y);
double t_2 = y + (x + t);
double t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
double t_4 = a * ((y / t_2) + (t / t_2));
double tmp;
if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 1e+253)) {
tmp = z + t_4;
} else {
tmp = t_4 + ((t_1 - (y * b)) / t_2);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (x + y);
double t_2 = y + (x + t);
double t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
double t_4 = a * ((y / t_2) + (t / t_2));
double tmp;
if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 1e+253)) {
tmp = z + t_4;
} else {
tmp = t_4 + ((t_1 - (y * b)) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (x + y) t_2 = y + (x + t) t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2 t_4 = a * ((y / t_2) + (t / t_2)) tmp = 0 if (t_3 <= -math.inf) or not (t_3 <= 1e+253): tmp = z + t_4 else: tmp = t_4 + ((t_1 - (y * b)) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(x + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + t_1) - Float64(y * b)) / t_2) t_4 = Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))) tmp = 0.0 if ((t_3 <= Float64(-Inf)) || !(t_3 <= 1e+253)) tmp = Float64(z + t_4); else tmp = Float64(t_4 + Float64(Float64(t_1 - Float64(y * b)) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (x + y); t_2 = y + (x + t); t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2; t_4 = a * ((y / t_2) + (t / t_2)); tmp = 0.0; if ((t_3 <= -Inf) || ~((t_3 <= 1e+253))) tmp = z + t_4; else tmp = t_4 + ((t_1 - (y * b)) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 1e+253]], $MachinePrecision]], N[(z + t$95$4), $MachinePrecision], N[(t$95$4 + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(\left(y + t\right) \cdot a + t_1\right) - y \cdot b}{t_2}\\
t_4 := a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right)\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+253}\right):\\
\;\;\;\;z + t_4\\
\mathbf{else}:\\
\;\;\;\;t_4 + \frac{t_1 - y \cdot b}{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 9.9999999999999994e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.6%
Taylor expanded in a around 0 40.2%
associate--l+40.2%
+-commutative40.2%
associate-+r+40.2%
associate-+r+40.2%
div-sub40.2%
+-commutative40.2%
*-commutative40.2%
associate-+r+40.2%
Simplified40.2%
Taylor expanded in x 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)) < 9.9999999999999994e252Initial program 99.0%
Taylor expanded in a around 0 99.1%
associate--l+99.1%
+-commutative99.1%
associate-+r+99.1%
associate-+r+99.1%
div-sub99.1%
+-commutative99.1%
*-commutative99.1%
associate-+r+99.1%
Simplified99.1%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ y t) a) (* z (+ x y))) (* y b)) t_1)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+253)))
(+ z (* a (+ (/ y t_1) (/ t 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 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+253)) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} 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 = y + (x + t);
double t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+253)) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+253): tmp = z + (a * ((y / t_1) + (t / 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(Float64(Float64(Float64(Float64(y + t) * a) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+253)) tmp = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / 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 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+253))) tmp = z + (a * ((y / t_1) + (t / 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[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+253]], $MachinePrecision]], N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(y + t\right) \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 10^{+253}\right):\\
\;\;\;\;z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\
\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 9.9999999999999994e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.6%
Taylor expanded in a around 0 40.2%
associate--l+40.2%
+-commutative40.2%
associate-+r+40.2%
associate-+r+40.2%
div-sub40.2%
+-commutative40.2%
*-commutative40.2%
associate-+r+40.2%
Simplified40.2%
Taylor expanded in x 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)) < 9.9999999999999994e252Initial program 99.0%
Final simplification89.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (+ z (- a b))))
(if (<= y -1.25e+59)
t_2
(if (<= y -96000000.0)
(/ z (/ t_1 (+ x y)))
(if (<= y -8e-43)
(/ a (/ (+ x t) t))
(if (<= y -2e-121)
(+ z (/ y (/ x (- a b))))
(if (<= y 2e-86)
(/ a (/ t_1 (+ y t)))
(if (<= y 1.1e-70)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= y 1e-63) (/ y (/ (+ x y) (- 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 = z + (a - b);
double tmp;
if (y <= -1.25e+59) {
tmp = t_2;
} else if (y <= -96000000.0) {
tmp = z / (t_1 / (x + y));
} else if (y <= -8e-43) {
tmp = a / ((x + t) / t);
} else if (y <= -2e-121) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 2e-86) {
tmp = a / (t_1 / (y + t));
} else if (y <= 1.1e-70) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (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 = z + (a - b)
if (y <= (-1.25d+59)) then
tmp = t_2
else if (y <= (-96000000.0d0)) then
tmp = z / (t_1 / (x + y))
else if (y <= (-8d-43)) then
tmp = a / ((x + t) / t)
else if (y <= (-2d-121)) then
tmp = z + (y / (x / (a - b)))
else if (y <= 2d-86) then
tmp = a / (t_1 / (y + t))
else if (y <= 1.1d-70) then
tmp = (x + y) * (z / (t + (x + y)))
else if (y <= 1d-63) then
tmp = y / ((x + y) / (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 = z + (a - b);
double tmp;
if (y <= -1.25e+59) {
tmp = t_2;
} else if (y <= -96000000.0) {
tmp = z / (t_1 / (x + y));
} else if (y <= -8e-43) {
tmp = a / ((x + t) / t);
} else if (y <= -2e-121) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 2e-86) {
tmp = a / (t_1 / (y + t));
} else if (y <= 1.1e-70) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z + (a - b) tmp = 0 if y <= -1.25e+59: tmp = t_2 elif y <= -96000000.0: tmp = z / (t_1 / (x + y)) elif y <= -8e-43: tmp = a / ((x + t) / t) elif y <= -2e-121: tmp = z + (y / (x / (a - b))) elif y <= 2e-86: tmp = a / (t_1 / (y + t)) elif y <= 1.1e-70: tmp = (x + y) * (z / (t + (x + y))) elif y <= 1e-63: tmp = y / ((x + y) / (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(z + Float64(a - b)) tmp = 0.0 if (y <= -1.25e+59) tmp = t_2; elseif (y <= -96000000.0) tmp = Float64(z / Float64(t_1 / Float64(x + y))); elseif (y <= -8e-43) tmp = Float64(a / Float64(Float64(x + t) / t)); elseif (y <= -2e-121) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= 2e-86) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= 1.1e-70) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (y <= 1e-63) tmp = Float64(y / Float64(Float64(x + y) / Float64(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 = z + (a - b); tmp = 0.0; if (y <= -1.25e+59) tmp = t_2; elseif (y <= -96000000.0) tmp = z / (t_1 / (x + y)); elseif (y <= -8e-43) tmp = a / ((x + t) / t); elseif (y <= -2e-121) tmp = z + (y / (x / (a - b))); elseif (y <= 2e-86) tmp = a / (t_1 / (y + t)); elseif (y <= 1.1e-70) tmp = (x + y) * (z / (t + (x + y))); elseif (y <= 1e-63) tmp = y / ((x + y) / (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[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+59], t$95$2, If[LessEqual[y, -96000000.0], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-43], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-121], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-86], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-70], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-63], N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z + \left(a - b\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -96000000:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-43}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-121}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-86}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-70}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;y \leq 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.2499999999999999e59 or 1.00000000000000007e-63 < y Initial program 44.6%
Taylor expanded in y around inf 73.5%
Taylor expanded in b around 0 73.5%
neg-mul-173.5%
associate-+r+73.5%
+-commutative73.5%
associate-+l+73.6%
sub-neg73.6%
Simplified73.6%
if -1.2499999999999999e59 < y < -9.6e7Initial program 60.4%
Taylor expanded in z around inf 36.1%
associate-/l*67.4%
associate-+r+67.4%
+-commutative67.4%
Simplified67.4%
if -9.6e7 < y < -8.00000000000000062e-43Initial program 73.8%
Taylor expanded in t around inf 33.4%
div-inv33.1%
+-commutative33.1%
associate-+l+33.1%
+-commutative33.1%
Applied egg-rr33.1%
Taylor expanded in y around 0 33.5%
associate-/l*59.5%
Simplified59.5%
if -8.00000000000000062e-43 < y < -2e-121Initial program 99.5%
Taylor expanded in t around 0 90.1%
sub-neg90.1%
mul-1-neg90.1%
+-commutative90.1%
associate-+r+90.1%
+-commutative90.1%
associate-*r*90.1%
distribute-rgt-in90.1%
mul-1-neg90.1%
+-commutative90.1%
+-commutative90.1%
Simplified90.1%
Taylor expanded in x around inf 81.1%
associate-/l*81.0%
Simplified81.0%
if -2e-121 < y < 2.00000000000000017e-86Initial program 82.5%
Taylor expanded in a around inf 46.2%
associate-/l*60.0%
associate-+r+60.0%
Simplified60.0%
if 2.00000000000000017e-86 < y < 1.0999999999999999e-70Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
if 1.0999999999999999e-70 < y < 1.00000000000000007e-63Initial program 99.5%
Taylor expanded in t around 0 68.3%
sub-neg68.3%
mul-1-neg68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-*r*68.3%
distribute-rgt-in68.3%
mul-1-neg68.3%
+-commutative68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in z around 0 68.3%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
Final simplification69.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (- a b))) (t_2 (+ y (+ x t))) (t_3 (/ z (/ t_2 (+ x y)))))
(if (<= z -3.2e+223)
t_3
(if (<= z -8.6e-96)
t_1
(if (<= z 2.2e-179)
(/ (- (* (+ y t) a) (* y b)) t_2)
(if (or (<= z 4.45e-72) (and (not (<= z 4.6e-11)) (<= z 6.2e+156)))
t_1
t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double t_2 = y + (x + t);
double t_3 = z / (t_2 / (x + y));
double tmp;
if (z <= -3.2e+223) {
tmp = t_3;
} else if (z <= -8.6e-96) {
tmp = t_1;
} else if (z <= 2.2e-179) {
tmp = (((y + t) * a) - (y * b)) / t_2;
} else if ((z <= 4.45e-72) || (!(z <= 4.6e-11) && (z <= 6.2e+156))) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z + (a - b)
t_2 = y + (x + t)
t_3 = z / (t_2 / (x + y))
if (z <= (-3.2d+223)) then
tmp = t_3
else if (z <= (-8.6d-96)) then
tmp = t_1
else if (z <= 2.2d-179) then
tmp = (((y + t) * a) - (y * b)) / t_2
else if ((z <= 4.45d-72) .or. (.not. (z <= 4.6d-11)) .and. (z <= 6.2d+156)) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double t_2 = y + (x + t);
double t_3 = z / (t_2 / (x + y));
double tmp;
if (z <= -3.2e+223) {
tmp = t_3;
} else if (z <= -8.6e-96) {
tmp = t_1;
} else if (z <= 2.2e-179) {
tmp = (((y + t) * a) - (y * b)) / t_2;
} else if ((z <= 4.45e-72) || (!(z <= 4.6e-11) && (z <= 6.2e+156))) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a - b) t_2 = y + (x + t) t_3 = z / (t_2 / (x + y)) tmp = 0 if z <= -3.2e+223: tmp = t_3 elif z <= -8.6e-96: tmp = t_1 elif z <= 2.2e-179: tmp = (((y + t) * a) - (y * b)) / t_2 elif (z <= 4.45e-72) or (not (z <= 4.6e-11) and (z <= 6.2e+156)): tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a - b)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z / Float64(t_2 / Float64(x + y))) tmp = 0.0 if (z <= -3.2e+223) tmp = t_3; elseif (z <= -8.6e-96) tmp = t_1; elseif (z <= 2.2e-179) tmp = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / t_2); elseif ((z <= 4.45e-72) || (!(z <= 4.6e-11) && (z <= 6.2e+156))) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (a - b); t_2 = y + (x + t); t_3 = z / (t_2 / (x + y)); tmp = 0.0; if (z <= -3.2e+223) tmp = t_3; elseif (z <= -8.6e-96) tmp = t_1; elseif (z <= 2.2e-179) tmp = (((y + t) * a) - (y * b)) / t_2; elseif ((z <= 4.45e-72) || (~((z <= 4.6e-11)) && (z <= 6.2e+156))) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z / N[(t$95$2 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+223], t$95$3, If[LessEqual[z, -8.6e-96], t$95$1, If[LessEqual[z, 2.2e-179], N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[Or[LessEqual[z, 4.45e-72], And[N[Not[LessEqual[z, 4.6e-11]], $MachinePrecision], LessEqual[z, 6.2e+156]]], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(a - b\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{z}{\frac{t_2}{x + y}}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+223}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-179}:\\
\;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{t_2}\\
\mathbf{elif}\;z \leq 4.45 \cdot 10^{-72} \lor \neg \left(z \leq 4.6 \cdot 10^{-11}\right) \land z \leq 6.2 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -3.2000000000000001e223 or 4.4499999999999999e-72 < z < 4.60000000000000027e-11 or 6.2000000000000004e156 < z Initial program 53.6%
Taylor expanded in z around inf 46.4%
associate-/l*81.3%
associate-+r+81.3%
+-commutative81.3%
Simplified81.3%
if -3.2000000000000001e223 < z < -8.59999999999999961e-96 or 2.20000000000000005e-179 < z < 4.4499999999999999e-72 or 4.60000000000000027e-11 < z < 6.2000000000000004e156Initial program 57.8%
Taylor expanded in y around inf 65.7%
Taylor expanded in b around 0 65.7%
neg-mul-165.7%
associate-+r+65.7%
+-commutative65.7%
associate-+l+65.7%
sub-neg65.7%
Simplified65.7%
if -8.59999999999999961e-96 < z < 2.20000000000000005e-179Initial program 75.4%
Taylor expanded in z around 0 67.0%
*-commutative67.0%
Simplified67.0%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= a -2.5e-7)
(not
(or (<= a -2.4e-39) (and (not (<= a -4.7e-91)) (<= a 5.8e-139)))))
(+ z (* a (+ (/ y t_1) (/ t t_1))))
(/ (- (* z (+ x y)) (* y b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((a <= -2.5e-7) || !((a <= -2.4e-39) || (!(a <= -4.7e-91) && (a <= 5.8e-139)))) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = ((z * (x + y)) - (y * b)) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((a <= (-2.5d-7)) .or. (.not. (a <= (-2.4d-39)) .or. (.not. (a <= (-4.7d-91))) .and. (a <= 5.8d-139))) then
tmp = z + (a * ((y / t_1) + (t / t_1)))
else
tmp = ((z * (x + y)) - (y * b)) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((a <= -2.5e-7) || !((a <= -2.4e-39) || (!(a <= -4.7e-91) && (a <= 5.8e-139)))) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = ((z * (x + y)) - (y * b)) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (a <= -2.5e-7) or not ((a <= -2.4e-39) or (not (a <= -4.7e-91) and (a <= 5.8e-139))): tmp = z + (a * ((y / t_1) + (t / t_1))) else: tmp = ((z * (x + y)) - (y * b)) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((a <= -2.5e-7) || !((a <= -2.4e-39) || (!(a <= -4.7e-91) && (a <= 5.8e-139)))) tmp = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1)))); else tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((a <= -2.5e-7) || ~(((a <= -2.4e-39) || (~((a <= -4.7e-91)) && (a <= 5.8e-139))))) tmp = z + (a * ((y / t_1) + (t / t_1))); else tmp = ((z * (x + y)) - (y * b)) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -2.5e-7], N[Not[Or[LessEqual[a, -2.4e-39], And[N[Not[LessEqual[a, -4.7e-91]], $MachinePrecision], LessEqual[a, 5.8e-139]]]], $MachinePrecision]], N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-7} \lor \neg \left(a \leq -2.4 \cdot 10^{-39} \lor \neg \left(a \leq -4.7 \cdot 10^{-91}\right) \land a \leq 5.8 \cdot 10^{-139}\right):\\
\;\;\;\;z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\
\end{array}
\end{array}
if a < -2.49999999999999989e-7 or -2.40000000000000016e-39 < a < -4.70000000000000006e-91 or 5.7999999999999998e-139 < a Initial program 54.2%
Taylor expanded in a around 0 73.7%
associate--l+73.7%
+-commutative73.7%
associate-+r+73.7%
associate-+r+73.7%
div-sub73.7%
+-commutative73.7%
*-commutative73.7%
associate-+r+73.7%
Simplified73.7%
Taylor expanded in x around inf 76.9%
if -2.49999999999999989e-7 < a < -2.40000000000000016e-39 or -4.70000000000000006e-91 < a < 5.7999999999999998e-139Initial program 81.0%
Taylor expanded in a around 0 72.0%
+-commutative72.0%
*-commutative72.0%
Simplified72.0%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (- a b))))
(if (<= y -5.9e+22)
t_1
(if (<= y -1.8e-121)
(+ z (/ y (/ x (- a b))))
(if (<= y 3.15e-83)
(/ a (/ (+ y (+ x t)) (+ y t)))
(if (<= y 4.6e-71)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= y 1.05e-63) (/ y (/ (+ x y) (- a b))) 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 <= -5.9e+22) {
tmp = t_1;
} else if (y <= -1.8e-121) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 3.15e-83) {
tmp = a / ((y + (x + t)) / (y + t));
} else if (y <= 4.6e-71) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1.05e-63) {
tmp = y / ((x + y) / (a - b));
} 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 <= (-5.9d+22)) then
tmp = t_1
else if (y <= (-1.8d-121)) then
tmp = z + (y / (x / (a - b)))
else if (y <= 3.15d-83) then
tmp = a / ((y + (x + t)) / (y + t))
else if (y <= 4.6d-71) then
tmp = (x + y) * (z / (t + (x + y)))
else if (y <= 1.05d-63) then
tmp = y / ((x + y) / (a - b))
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 <= -5.9e+22) {
tmp = t_1;
} else if (y <= -1.8e-121) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 3.15e-83) {
tmp = a / ((y + (x + t)) / (y + t));
} else if (y <= 4.6e-71) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1.05e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a - b) tmp = 0 if y <= -5.9e+22: tmp = t_1 elif y <= -1.8e-121: tmp = z + (y / (x / (a - b))) elif y <= 3.15e-83: tmp = a / ((y + (x + t)) / (y + t)) elif y <= 4.6e-71: tmp = (x + y) * (z / (t + (x + y))) elif y <= 1.05e-63: tmp = y / ((x + y) / (a - b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a - b)) tmp = 0.0 if (y <= -5.9e+22) tmp = t_1; elseif (y <= -1.8e-121) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= 3.15e-83) tmp = Float64(a / Float64(Float64(y + Float64(x + t)) / Float64(y + t))); elseif (y <= 4.6e-71) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (y <= 1.05e-63) tmp = Float64(y / Float64(Float64(x + y) / Float64(a - b))); 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 <= -5.9e+22) tmp = t_1; elseif (y <= -1.8e-121) tmp = z + (y / (x / (a - b))); elseif (y <= 3.15e-83) tmp = a / ((y + (x + t)) / (y + t)); elseif (y <= 4.6e-71) tmp = (x + y) * (z / (t + (x + y))); elseif (y <= 1.05e-63) tmp = y / ((x + y) / (a - b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.9e+22], t$95$1, If[LessEqual[y, -1.8e-121], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.15e-83], N[(a / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-71], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-63], N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(a - b\right)\\
\mathbf{if}\;y \leq -5.9 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-121}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{-83}:\\
\;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-71}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.9000000000000002e22 or 1.05e-63 < y Initial program 44.7%
Taylor expanded in y around inf 72.1%
Taylor expanded in b around 0 72.1%
neg-mul-172.1%
associate-+r+72.1%
+-commutative72.1%
associate-+l+72.1%
sub-neg72.1%
Simplified72.1%
if -5.9000000000000002e22 < y < -1.79999999999999992e-121Initial program 87.0%
Taylor expanded in t around 0 69.0%
sub-neg69.0%
mul-1-neg69.0%
+-commutative69.0%
associate-+r+69.0%
+-commutative69.0%
associate-*r*69.0%
distribute-rgt-in69.0%
mul-1-neg69.0%
+-commutative69.0%
+-commutative69.0%
Simplified69.0%
Taylor expanded in x around inf 58.4%
associate-/l*58.3%
Simplified58.3%
if -1.79999999999999992e-121 < y < 3.14999999999999983e-83Initial program 82.5%
Taylor expanded in a around inf 46.2%
associate-/l*60.0%
associate-+r+60.0%
Simplified60.0%
if 3.14999999999999983e-83 < y < 4.5999999999999997e-71Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
if 4.5999999999999997e-71 < y < 1.05e-63Initial program 99.5%
Taylor expanded in t around 0 68.3%
sub-neg68.3%
mul-1-neg68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-*r*68.3%
distribute-rgt-in68.3%
mul-1-neg68.3%
+-commutative68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in z around 0 68.3%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
Final simplification67.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (/ a (/ t_1 (+ y t)))))
(if (<= a -6.5e+14)
t_2
(if (<= a 4.6e-170)
(/ (- (* z (+ x y)) (* y b)) t_1)
(if (<= a 8.2e-16) (/ z (/ t_1 (+ x y))) 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_1 / (y + t));
double tmp;
if (a <= -6.5e+14) {
tmp = t_2;
} else if (a <= 4.6e-170) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (a <= 8.2e-16) {
tmp = z / (t_1 / (x + y));
} 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_1 / (y + t))
if (a <= (-6.5d+14)) then
tmp = t_2
else if (a <= 4.6d-170) then
tmp = ((z * (x + y)) - (y * b)) / t_1
else if (a <= 8.2d-16) then
tmp = z / (t_1 / (x + y))
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_1 / (y + t));
double tmp;
if (a <= -6.5e+14) {
tmp = t_2;
} else if (a <= 4.6e-170) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (a <= 8.2e-16) {
tmp = z / (t_1 / (x + y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a / (t_1 / (y + t)) tmp = 0 if a <= -6.5e+14: tmp = t_2 elif a <= 4.6e-170: tmp = ((z * (x + y)) - (y * b)) / t_1 elif a <= 8.2e-16: tmp = z / (t_1 / (x + y)) 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(t_1 / Float64(y + t))) tmp = 0.0 if (a <= -6.5e+14) tmp = t_2; elseif (a <= 4.6e-170) tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); elseif (a <= 8.2e-16) tmp = Float64(z / Float64(t_1 / Float64(x + y))); 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_1 / (y + t)); tmp = 0.0; if (a <= -6.5e+14) tmp = t_2; elseif (a <= 4.6e-170) tmp = ((z * (x + y)) - (y * b)) / t_1; elseif (a <= 8.2e-16) tmp = z / (t_1 / (x + y)); 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[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e+14], t$95$2, If[LessEqual[a, 4.6e-170], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[a, 8.2e-16], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{a}{\frac{t_1}{y + t}}\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{+14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-170}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -6.5e14 or 8.20000000000000012e-16 < a Initial program 49.6%
Taylor expanded in a around inf 38.0%
associate-/l*71.2%
associate-+r+71.2%
Simplified71.2%
if -6.5e14 < a < 4.59999999999999974e-170Initial program 80.1%
Taylor expanded in a around 0 69.4%
+-commutative69.4%
*-commutative69.4%
Simplified69.4%
if 4.59999999999999974e-170 < a < 8.20000000000000012e-16Initial program 64.6%
Taylor expanded in z around inf 30.3%
associate-/l*61.8%
associate-+r+61.8%
+-commutative61.8%
Simplified61.8%
Final simplification69.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (/ (- y) (+ y (+ x t))))))
(if (<= b -1.6e+125)
t_1
(if (<= b 1.8e+223)
(+ z (- a b))
(if (<= b 2.05e+285) (+ z (/ y (/ x (- a b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (-y / (y + (x + t)));
double tmp;
if (b <= -1.6e+125) {
tmp = t_1;
} else if (b <= 1.8e+223) {
tmp = z + (a - b);
} else if (b <= 2.05e+285) {
tmp = z + (y / (x / (a - b)));
} 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 = b * (-y / (y + (x + t)))
if (b <= (-1.6d+125)) then
tmp = t_1
else if (b <= 1.8d+223) then
tmp = z + (a - b)
else if (b <= 2.05d+285) then
tmp = z + (y / (x / (a - b)))
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 = b * (-y / (y + (x + t)));
double tmp;
if (b <= -1.6e+125) {
tmp = t_1;
} else if (b <= 1.8e+223) {
tmp = z + (a - b);
} else if (b <= 2.05e+285) {
tmp = z + (y / (x / (a - b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (-y / (y + (x + t))) tmp = 0 if b <= -1.6e+125: tmp = t_1 elif b <= 1.8e+223: tmp = z + (a - b) elif b <= 2.05e+285: tmp = z + (y / (x / (a - b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(-y) / Float64(y + Float64(x + t)))) tmp = 0.0 if (b <= -1.6e+125) tmp = t_1; elseif (b <= 1.8e+223) tmp = Float64(z + Float64(a - b)); elseif (b <= 2.05e+285) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (-y / (y + (x + t))); tmp = 0.0; if (b <= -1.6e+125) tmp = t_1; elseif (b <= 1.8e+223) tmp = z + (a - b); elseif (b <= 2.05e+285) tmp = z + (y / (x / (a - b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[((-y) / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.6e+125], t$95$1, If[LessEqual[b, 1.8e+223], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.05e+285], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \frac{-y}{y + \left(x + t\right)}\\
\mathbf{if}\;b \leq -1.6 \cdot 10^{+125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+223}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{+285}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.59999999999999992e125 or 2.05e285 < b Initial program 55.3%
Taylor expanded in b around inf 38.6%
mul-1-neg38.6%
associate-/l*66.8%
distribute-neg-frac66.8%
associate-+r+66.8%
Simplified66.8%
div-inv66.8%
clear-num66.7%
+-commutative66.7%
+-commutative66.7%
Applied egg-rr66.7%
if -1.59999999999999992e125 < b < 1.79999999999999996e223Initial program 63.4%
Taylor expanded in y around inf 61.9%
Taylor expanded in b around 0 61.9%
neg-mul-161.9%
associate-+r+61.9%
+-commutative61.9%
associate-+l+61.9%
sub-neg61.9%
Simplified61.9%
if 1.79999999999999996e223 < b < 2.05e285Initial program 67.2%
Taylor expanded in t around 0 50.8%
sub-neg50.8%
mul-1-neg50.8%
+-commutative50.8%
associate-+r+50.8%
+-commutative50.8%
associate-*r*50.8%
distribute-rgt-in51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
Simplified51.4%
Taylor expanded in x around inf 60.6%
associate-/l*76.4%
Simplified76.4%
Final simplification63.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= b -2.05e+125)
(/ (- b) (/ t_1 y))
(if (<= b 4.3e+223)
(+ z (- a b))
(if (<= b 2.05e+285) (+ z (/ y (/ x (- a b)))) (* b (/ (- y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (b <= -2.05e+125) {
tmp = -b / (t_1 / y);
} else if (b <= 4.3e+223) {
tmp = z + (a - b);
} else if (b <= 2.05e+285) {
tmp = z + (y / (x / (a - b)));
} else {
tmp = b * (-y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (b <= (-2.05d+125)) then
tmp = -b / (t_1 / y)
else if (b <= 4.3d+223) then
tmp = z + (a - b)
else if (b <= 2.05d+285) then
tmp = z + (y / (x / (a - b)))
else
tmp = b * (-y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (b <= -2.05e+125) {
tmp = -b / (t_1 / y);
} else if (b <= 4.3e+223) {
tmp = z + (a - b);
} else if (b <= 2.05e+285) {
tmp = z + (y / (x / (a - b)));
} else {
tmp = b * (-y / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if b <= -2.05e+125: tmp = -b / (t_1 / y) elif b <= 4.3e+223: tmp = z + (a - b) elif b <= 2.05e+285: tmp = z + (y / (x / (a - b))) else: tmp = b * (-y / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (b <= -2.05e+125) tmp = Float64(Float64(-b) / Float64(t_1 / y)); elseif (b <= 4.3e+223) tmp = Float64(z + Float64(a - b)); elseif (b <= 2.05e+285) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); else tmp = Float64(b * Float64(Float64(-y) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (b <= -2.05e+125) tmp = -b / (t_1 / y); elseif (b <= 4.3e+223) tmp = z + (a - b); elseif (b <= 2.05e+285) tmp = z + (y / (x / (a - b))); else tmp = b * (-y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.05e+125], N[((-b) / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.3e+223], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.05e+285], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[((-y) / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+125}:\\
\;\;\;\;\frac{-b}{\frac{t_1}{y}}\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{+223}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{+285}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{-y}{t_1}\\
\end{array}
\end{array}
if b < -2.04999999999999996e125Initial program 60.0%
Taylor expanded in b around inf 40.7%
mul-1-neg40.7%
associate-/l*61.6%
distribute-neg-frac61.6%
associate-+r+61.6%
Simplified61.6%
if -2.04999999999999996e125 < b < 4.3e223Initial program 63.4%
Taylor expanded in y around inf 61.9%
Taylor expanded in b around 0 61.9%
neg-mul-161.9%
associate-+r+61.9%
+-commutative61.9%
associate-+l+61.9%
sub-neg61.9%
Simplified61.9%
if 4.3e223 < b < 2.05e285Initial program 67.2%
Taylor expanded in t around 0 50.8%
sub-neg50.8%
mul-1-neg50.8%
+-commutative50.8%
associate-+r+50.8%
+-commutative50.8%
associate-*r*50.8%
distribute-rgt-in51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
Simplified51.4%
Taylor expanded in x around inf 60.6%
associate-/l*76.4%
Simplified76.4%
if 2.05e285 < b Initial program 25.3%
Taylor expanded in b around inf 25.3%
mul-1-neg25.3%
associate-/l*99.5%
distribute-neg-frac99.5%
associate-+r+99.5%
Simplified99.5%
div-inv99.7%
clear-num99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.7e+83) (+ z (/ y (/ x (- a b)))) (if (<= x 6.1e+154) (+ z (- a b)) (* t (/ a (+ t (+ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.7e+83) {
tmp = z + (y / (x / (a - b)));
} else if (x <= 6.1e+154) {
tmp = z + (a - b);
} else {
tmp = t * (a / (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 (x <= (-2.7d+83)) then
tmp = z + (y / (x / (a - b)))
else if (x <= 6.1d+154) then
tmp = z + (a - b)
else
tmp = t * (a / (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 (x <= -2.7e+83) {
tmp = z + (y / (x / (a - b)));
} else if (x <= 6.1e+154) {
tmp = z + (a - b);
} else {
tmp = t * (a / (t + (x + y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.7e+83: tmp = z + (y / (x / (a - b))) elif x <= 6.1e+154: tmp = z + (a - b) else: tmp = t * (a / (t + (x + y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.7e+83) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (x <= 6.1e+154) tmp = Float64(z + Float64(a - b)); else tmp = Float64(t * Float64(a / Float64(t + Float64(x + y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.7e+83) tmp = z + (y / (x / (a - b))); elseif (x <= 6.1e+154) tmp = z + (a - b); else tmp = t * (a / (t + (x + y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.7e+83], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.1e+154], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], N[(t * N[(a / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+83}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;x \leq 6.1 \cdot 10^{+154}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{a}{t + \left(x + y\right)}\\
\end{array}
\end{array}
if x < -2.70000000000000007e83Initial program 60.9%
Taylor expanded in t around 0 43.4%
sub-neg43.4%
mul-1-neg43.4%
+-commutative43.4%
associate-+r+43.4%
+-commutative43.4%
associate-*r*43.4%
distribute-rgt-in43.4%
mul-1-neg43.4%
+-commutative43.4%
+-commutative43.4%
Simplified43.4%
Taylor expanded in x around inf 50.3%
associate-/l*58.1%
Simplified58.1%
if -2.70000000000000007e83 < x < 6.09999999999999979e154Initial program 64.1%
Taylor expanded in y around inf 64.3%
Taylor expanded in b around 0 64.3%
neg-mul-164.3%
associate-+r+64.3%
+-commutative64.3%
associate-+l+64.4%
sub-neg64.4%
Simplified64.4%
if 6.09999999999999979e154 < x Initial program 47.6%
Taylor expanded in t around inf 27.9%
Taylor expanded in a around 0 27.9%
+-commutative27.9%
*-commutative27.9%
associate-*r/56.1%
Simplified56.1%
Final simplification62.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.7e+83) (+ z (/ y (/ x (- a b)))) (if (<= x 6.2e+159) (+ z (- a b)) (/ t (/ (+ t (+ x y)) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.7e+83) {
tmp = z + (y / (x / (a - b)));
} else if (x <= 6.2e+159) {
tmp = z + (a - b);
} else {
tmp = t / ((t + (x + y)) / 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 (x <= (-2.7d+83)) then
tmp = z + (y / (x / (a - b)))
else if (x <= 6.2d+159) then
tmp = z + (a - b)
else
tmp = t / ((t + (x + y)) / 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 (x <= -2.7e+83) {
tmp = z + (y / (x / (a - b)));
} else if (x <= 6.2e+159) {
tmp = z + (a - b);
} else {
tmp = t / ((t + (x + y)) / a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.7e+83: tmp = z + (y / (x / (a - b))) elif x <= 6.2e+159: tmp = z + (a - b) else: tmp = t / ((t + (x + y)) / a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.7e+83) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (x <= 6.2e+159) tmp = Float64(z + Float64(a - b)); else tmp = Float64(t / Float64(Float64(t + Float64(x + y)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.7e+83) tmp = z + (y / (x / (a - b))); elseif (x <= 6.2e+159) tmp = z + (a - b); else tmp = t / ((t + (x + y)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.7e+83], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+159], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+83}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+159}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{t + \left(x + y\right)}{a}}\\
\end{array}
\end{array}
if x < -2.70000000000000007e83Initial program 60.9%
Taylor expanded in t around 0 43.4%
sub-neg43.4%
mul-1-neg43.4%
+-commutative43.4%
associate-+r+43.4%
+-commutative43.4%
associate-*r*43.4%
distribute-rgt-in43.4%
mul-1-neg43.4%
+-commutative43.4%
+-commutative43.4%
Simplified43.4%
Taylor expanded in x around inf 50.3%
associate-/l*58.1%
Simplified58.1%
if -2.70000000000000007e83 < x < 6.1999999999999996e159Initial program 64.1%
Taylor expanded in y around inf 64.3%
Taylor expanded in b around 0 64.3%
neg-mul-164.3%
associate-+r+64.3%
+-commutative64.3%
associate-+l+64.4%
sub-neg64.4%
Simplified64.4%
if 6.1999999999999996e159 < x Initial program 47.6%
Taylor expanded in t around inf 27.9%
div-inv27.9%
+-commutative27.9%
associate-+l+27.9%
+-commutative27.9%
Applied egg-rr27.9%
un-div-inv27.9%
*-commutative27.9%
associate-/l*56.2%
Applied egg-rr56.2%
Final simplification62.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.5e-145) (not (<= y 1.3e-72))) (+ z (- a b)) (/ a (/ (+ x t) t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.5e-145) || !(y <= 1.3e-72)) {
tmp = z + (a - b);
} else {
tmp = a / ((x + t) / 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 ((y <= (-3.5d-145)) .or. (.not. (y <= 1.3d-72))) then
tmp = z + (a - b)
else
tmp = a / ((x + t) / 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 ((y <= -3.5e-145) || !(y <= 1.3e-72)) {
tmp = z + (a - b);
} else {
tmp = a / ((x + t) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.5e-145) or not (y <= 1.3e-72): tmp = z + (a - b) else: tmp = a / ((x + t) / t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.5e-145) || !(y <= 1.3e-72)) tmp = Float64(z + Float64(a - b)); else tmp = Float64(a / Float64(Float64(x + t) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.5e-145) || ~((y <= 1.3e-72))) tmp = z + (a - b); else tmp = a / ((x + t) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.5e-145], N[Not[LessEqual[y, 1.3e-72]], $MachinePrecision]], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-145} \lor \neg \left(y \leq 1.3 \cdot 10^{-72}\right):\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\end{array}
\end{array}
if y < -3.49999999999999997e-145 or 1.29999999999999998e-72 < y Initial program 53.1%
Taylor expanded in y around inf 66.5%
Taylor expanded in b around 0 66.5%
neg-mul-166.5%
associate-+r+66.5%
+-commutative66.5%
associate-+l+66.5%
sub-neg66.5%
Simplified66.5%
if -3.49999999999999997e-145 < y < 1.29999999999999998e-72Initial program 82.8%
Taylor expanded in t around inf 43.3%
div-inv43.2%
+-commutative43.2%
associate-+l+43.2%
+-commutative43.2%
Applied egg-rr43.2%
Taylor expanded in y around 0 43.3%
associate-/l*56.7%
Simplified56.7%
Final simplification63.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4.5e+14) a (if (<= a 1.8e-13) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.5e+14) {
tmp = a;
} else if (a <= 1.8e-13) {
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 <= (-4.5d+14)) then
tmp = a
else if (a <= 1.8d-13) 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 <= -4.5e+14) {
tmp = a;
} else if (a <= 1.8e-13) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.5e+14: tmp = a elif a <= 1.8e-13: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.5e+14) tmp = a; elseif (a <= 1.8e-13) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.5e+14) tmp = a; elseif (a <= 1.8e-13) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.5e+14], a, If[LessEqual[a, 1.8e-13], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+14}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-13}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -4.5e14 or 1.7999999999999999e-13 < a Initial program 49.6%
Taylor expanded in t around inf 52.2%
if -4.5e14 < a < 1.7999999999999999e-13Initial program 76.3%
Taylor expanded in x around inf 41.7%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t 7e+230) (+ z (- a b)) a))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 7e+230) {
tmp = z + (a - b);
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 7d+230) then
tmp = z + (a - b)
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 7e+230) {
tmp = z + (a - b);
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 7e+230: tmp = z + (a - b) else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 7e+230) tmp = Float64(z + Float64(a - b)); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 7e+230) tmp = z + (a - b); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 7e+230], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7 \cdot 10^{+230}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < 7.0000000000000001e230Initial program 64.6%
Taylor expanded in y around inf 57.6%
Taylor expanded in b around 0 57.6%
neg-mul-157.6%
associate-+r+57.6%
+-commutative57.6%
associate-+l+57.6%
sub-neg57.6%
Simplified57.6%
if 7.0000000000000001e230 < t Initial program 37.7%
Taylor expanded in t around inf 66.5%
Final simplification58.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.85e+177) (- a b) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.85e+177) {
tmp = 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 (b <= (-2.85d+177)) then
tmp = 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 (b <= -2.85e+177) {
tmp = a - b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.85e+177: tmp = a - b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.85e+177) tmp = Float64(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 (b <= -2.85e+177) tmp = a - b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.85e+177], N[(a - b), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.85 \cdot 10^{+177}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if b < -2.85000000000000008e177Initial program 54.6%
Taylor expanded in y around inf 43.2%
Taylor expanded in z around 0 39.5%
if -2.85000000000000008e177 < b Initial program 63.1%
Taylor expanded in y around inf 57.6%
Taylor expanded in b around 0 54.0%
+-commutative54.0%
Simplified54.0%
Final simplification52.4%
(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 62.2%
Taylor expanded in y around inf 56.1%
Taylor expanded in b around 0 50.7%
+-commutative50.7%
Simplified50.7%
Final simplification50.7%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 62.2%
Taylor expanded in t around inf 34.9%
Final simplification34.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 2024024
(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)))