
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ y t)))
(t_2 (+ y (+ t x)))
(t_3 (/ (- (+ (* z (+ y x)) t_1) (* b y)) t_2)))
(if (or (<= t_3 (- INFINITY)) (not (<= t_3 2e+290)))
(+ (/ (- z b) (/ t_2 y)) (+ (/ z (/ t_2 x)) (* (+ y t) (/ a t_2))))
(+ (* z (+ (/ x t_2) (/ y t_2))) (/ (- t_1 (* b y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = y + (t + x);
double t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2;
double tmp;
if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 2e+290)) {
tmp = ((z - b) / (t_2 / y)) + ((z / (t_2 / x)) + ((y + t) * (a / t_2)));
} else {
tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = y + (t + x);
double t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2;
double tmp;
if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 2e+290)) {
tmp = ((z - b) / (t_2 / y)) + ((z / (t_2 / x)) + ((y + t) * (a / t_2)));
} else {
tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (y + t) t_2 = y + (t + x) t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2 tmp = 0 if (t_3 <= -math.inf) or not (t_3 <= 2e+290): tmp = ((z - b) / (t_2 / y)) + ((z / (t_2 / x)) + ((y + t) * (a / t_2))) else: tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(y + Float64(t + x)) t_3 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + t_1) - Float64(b * y)) / t_2) tmp = 0.0 if ((t_3 <= Float64(-Inf)) || !(t_3 <= 2e+290)) tmp = Float64(Float64(Float64(z - b) / Float64(t_2 / y)) + Float64(Float64(z / Float64(t_2 / x)) + Float64(Float64(y + t) * Float64(a / t_2)))); else tmp = Float64(Float64(z * Float64(Float64(x / t_2) + Float64(y / t_2))) + Float64(Float64(t_1 - Float64(b * y)) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (y + t); t_2 = y + (t + x); t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2; tmp = 0.0; if ((t_3 <= -Inf) || ~((t_3 <= 2e+290))) tmp = ((z - b) / (t_2 / y)) + ((z / (t_2 / x)) + ((y + t) * (a / t_2))); else tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 2e+290]], $MachinePrecision]], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(z / N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(x / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := y + \left(t + x\right)\\
t_3 := \frac{\left(z \cdot \left(y + x\right) + t_1\right) - b \cdot y}{t_2}\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 2 \cdot 10^{+290}\right):\\
\;\;\;\;\frac{z - b}{\frac{t_2}{y}} + \left(\frac{z}{\frac{t_2}{x}} + \left(y + t\right) \cdot \frac{a}{t_2}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_2} + \frac{y}{t_2}\right) + \frac{t_1 - b \cdot y}{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.00000000000000012e290 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.0%
Simplified6.0%
Taylor expanded in a around inf 5.2%
associate-/l*30.5%
+-commutative30.5%
associate-/l*69.6%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
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.00000000000000012e290Initial program 99.2%
Taylor expanded in z around 0 99.3%
associate--l+99.3%
*-commutative99.3%
div-sub99.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ y t)))
(t_2 (+ y (+ t x)))
(t_3 (/ (- (+ (* z (+ y x)) t_1) (* b y)) t_2))
(t_4 (/ (- z b) (/ t_2 y)))
(t_5 (/ z (/ t_2 x))))
(if (<= t_3 (- INFINITY))
(+ t_4 (+ t_5 (/ a (+ 1.0 (/ x t)))))
(if (<= t_3 5e+130)
(+ (* z (+ (/ x t_2) (/ y t_2))) (/ (- t_1 (* b y)) t_2))
(+ t_4 (+ a t_5))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = y + (t + x);
double t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2;
double t_4 = (z - b) / (t_2 / y);
double t_5 = z / (t_2 / x);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4 + (t_5 + (a / (1.0 + (x / t))));
} else if (t_3 <= 5e+130) {
tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2);
} else {
tmp = t_4 + (a + t_5);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = y + (t + x);
double t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2;
double t_4 = (z - b) / (t_2 / y);
double t_5 = z / (t_2 / x);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4 + (t_5 + (a / (1.0 + (x / t))));
} else if (t_3 <= 5e+130) {
tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2);
} else {
tmp = t_4 + (a + t_5);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (y + t) t_2 = y + (t + x) t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2 t_4 = (z - b) / (t_2 / y) t_5 = z / (t_2 / x) tmp = 0 if t_3 <= -math.inf: tmp = t_4 + (t_5 + (a / (1.0 + (x / t)))) elif t_3 <= 5e+130: tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2) else: tmp = t_4 + (a + t_5) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(y + Float64(t + x)) t_3 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + t_1) - Float64(b * y)) / t_2) t_4 = Float64(Float64(z - b) / Float64(t_2 / y)) t_5 = Float64(z / Float64(t_2 / x)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(t_4 + Float64(t_5 + Float64(a / Float64(1.0 + Float64(x / t))))); elseif (t_3 <= 5e+130) tmp = Float64(Float64(z * Float64(Float64(x / t_2) + Float64(y / t_2))) + Float64(Float64(t_1 - Float64(b * y)) / t_2)); else tmp = Float64(t_4 + Float64(a + t_5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (y + t); t_2 = y + (t + x); t_3 = (((z * (y + x)) + t_1) - (b * y)) / t_2; t_4 = (z - b) / (t_2 / y); t_5 = z / (t_2 / x); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4 + (t_5 + (a / (1.0 + (x / t)))); elseif (t_3 <= 5e+130) tmp = (z * ((x / t_2) + (y / t_2))) + ((t_1 - (b * y)) / t_2); else tmp = t_4 + (a + t_5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z - b), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(z / N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(t$95$4 + N[(t$95$5 + N[(a / N[(1.0 + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+130], N[(N[(z * N[(N[(x / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$4 + N[(a + t$95$5), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := y + \left(t + x\right)\\
t_3 := \frac{\left(z \cdot \left(y + x\right) + t_1\right) - b \cdot y}{t_2}\\
t_4 := \frac{z - b}{\frac{t_2}{y}}\\
t_5 := \frac{z}{\frac{t_2}{x}}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4 + \left(t_5 + \frac{a}{1 + \frac{x}{t}}\right)\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+130}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_2} + \frac{y}{t_2}\right) + \frac{t_1 - b \cdot y}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_4 + \left(a + t_5\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 5.7%
Simplified5.7%
Taylor expanded in a around inf 5.7%
associate-/l*32.8%
+-commutative32.8%
associate-/l*70.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 98.2%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.9999999999999996e130Initial program 99.1%
Taylor expanded in z around 0 99.3%
associate--l+99.3%
*-commutative99.3%
div-sub99.3%
Simplified99.3%
if 4.9999999999999996e130 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 29.3%
Simplified30.5%
Taylor expanded in a around inf 29.6%
associate-/l*47.3%
+-commutative47.3%
associate-/l*76.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 96.3%
Final simplification98.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* b y)) t_1)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+130)))
(+ (/ (- z b) (/ t_1 y)) (+ a (/ z (/ t_1 x))))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+130)) {
tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x)));
} 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 + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 5e+130)) {
tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 5e+130): tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(b * y)) / t_1) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+130)) tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(a + Float64(z / Float64(t_1 / x)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 5e+130))) tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+130]], $MachinePrecision]], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - b \cdot y}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(a + \frac{z}{\frac{t_1}{x}}\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 4.9999999999999996e130 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 20.9%
Simplified21.8%
Taylor expanded in a around inf 21.1%
associate-/l*42.2%
+-commutative42.2%
associate-/l*74.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 93.9%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.9999999999999996e130Initial program 99.1%
Final simplification96.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* b y)) t_1))
(t_3 (/ (- z b) (/ t_1 y)))
(t_4 (/ z (/ t_1 x))))
(if (<= t_2 (- INFINITY))
(+ t_3 (+ t_4 (/ a (+ 1.0 (/ x t)))))
(if (<= t_2 5e+130) t_2 (+ t_3 (+ a t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1;
double t_3 = (z - b) / (t_1 / y);
double t_4 = z / (t_1 / x);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3 + (t_4 + (a / (1.0 + (x / t))));
} else if (t_2 <= 5e+130) {
tmp = t_2;
} else {
tmp = t_3 + (a + t_4);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1;
double t_3 = (z - b) / (t_1 / y);
double t_4 = z / (t_1 / x);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3 + (t_4 + (a / (1.0 + (x / t))));
} else if (t_2 <= 5e+130) {
tmp = t_2;
} else {
tmp = t_3 + (a + t_4);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1 t_3 = (z - b) / (t_1 / y) t_4 = z / (t_1 / x) tmp = 0 if t_2 <= -math.inf: tmp = t_3 + (t_4 + (a / (1.0 + (x / t)))) elif t_2 <= 5e+130: tmp = t_2 else: tmp = t_3 + (a + t_4) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(b * y)) / t_1) t_3 = Float64(Float64(z - b) / Float64(t_1 / y)) t_4 = Float64(z / Float64(t_1 / x)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(t_3 + Float64(t_4 + Float64(a / Float64(1.0 + Float64(x / t))))); elseif (t_2 <= 5e+130) tmp = t_2; else tmp = Float64(t_3 + Float64(a + t_4)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1; t_3 = (z - b) / (t_1 / y); t_4 = z / (t_1 / x); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3 + (t_4 + (a / (1.0 + (x / t)))); elseif (t_2 <= 5e+130) tmp = t_2; else tmp = t_3 + (a + t_4); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$3 + N[(t$95$4 + N[(a / N[(1.0 + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+130], t$95$2, N[(t$95$3 + N[(a + t$95$4), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - b \cdot y}{t_1}\\
t_3 := \frac{z - b}{\frac{t_1}{y}}\\
t_4 := \frac{z}{\frac{t_1}{x}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3 + \left(t_4 + \frac{a}{1 + \frac{x}{t}}\right)\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+130}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 + \left(a + t_4\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 5.7%
Simplified5.7%
Taylor expanded in a around inf 5.7%
associate-/l*32.8%
+-commutative32.8%
associate-/l*70.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 98.2%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.9999999999999996e130Initial program 99.1%
if 4.9999999999999996e130 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 29.3%
Simplified30.5%
Taylor expanded in a around inf 29.6%
associate-/l*47.3%
+-commutative47.3%
associate-/l*76.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 96.3%
Final simplification98.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* b y)) t_1)))
(if (<= t_2 (- INFINITY))
(+ (/ (- z b) (/ t_1 y)) (+ z a))
(if (<= t_2 1e+237) t_2 (- (+ z a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((z - b) / (t_1 / y)) + (z + a);
} else if (t_2 <= 1e+237) {
tmp = t_2;
} else {
tmp = (z + a) - b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((z - b) / (t_1 / y)) + (z + a);
} else if (t_2 <= 1e+237) {
tmp = t_2;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = ((z - b) / (t_1 / y)) + (z + a) elif t_2 <= 1e+237: tmp = t_2 else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(b * y)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(z + a)); elseif (t_2 <= 1e+237) tmp = t_2; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = (((z * (y + x)) + (a * (y + t))) - (b * y)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = ((z - b) / (t_1 / y)) + (z + a); elseif (t_2 <= 1e+237) tmp = t_2; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+237], t$95$2, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - b \cdot y}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(z + a\right)\\
\mathbf{elif}\;t_2 \leq 10^{+237}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - 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 5.7%
Simplified5.7%
Taylor expanded in a around inf 5.7%
associate-/l*32.8%
+-commutative32.8%
associate-/l*70.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 89.6%
Taylor expanded in x around inf 63.5%
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.9999999999999994e236Initial program 99.2%
if 9.9999999999999994e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 13.6%
Taylor expanded in y around inf 78.6%
+-commutative78.6%
Simplified78.6%
Final simplification88.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ y (+ t x)))) (+ (/ (- z b) (/ t_1 y)) (+ (/ a (/ t_1 (+ y t))) (/ z (/ t_1 x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
return ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + (z / (t_1 / x)));
}
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
t_1 = y + (t + x)
code = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + (z / (t_1 / x)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
return ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + (z / (t_1 / x)));
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) return ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + (z / (t_1 / x)))
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) return Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(Float64(a / Float64(t_1 / Float64(y + t))) + Float64(z / Float64(t_1 / x)))) end
function tmp = code(x, y, z, t, a, b) t_1 = y + (t + x); tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + (z / (t_1 / x))); end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\frac{z - b}{\frac{t_1}{y}} + \left(\frac{a}{\frac{t_1}{y + t}} + \frac{z}{\frac{t_1}{x}}\right)
\end{array}
\end{array}
Initial program 62.8%
Simplified63.1%
Taylor expanded in a around inf 62.9%
associate-/l*71.6%
+-commutative71.6%
associate-/l*86.3%
associate-/l*98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (+ (/ (- z b) (/ t_1 y)) (+ z a)))
(t_3 (- (+ z a) b)))
(if (<= y -5e+58)
t_3
(if (<= y -2e-92)
t_2
(if (<= y -2.1e-166)
(* z (/ (+ y x) t_1))
(if (<= y -5.8e-213)
(/ a (/ t_1 (+ y t)))
(if (<= y 9.5e-50)
(/ (+ (* z x) (* t a)) (+ t x))
(if (<= y 3.5e+152) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = ((z - b) / (t_1 / y)) + (z + a);
double t_3 = (z + a) - b;
double tmp;
if (y <= -5e+58) {
tmp = t_3;
} else if (y <= -2e-92) {
tmp = t_2;
} else if (y <= -2.1e-166) {
tmp = z * ((y + x) / t_1);
} else if (y <= -5.8e-213) {
tmp = a / (t_1 / (y + t));
} else if (y <= 9.5e-50) {
tmp = ((z * x) + (t * a)) / (t + x);
} else if (y <= 3.5e+152) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (t + x)
t_2 = ((z - b) / (t_1 / y)) + (z + a)
t_3 = (z + a) - b
if (y <= (-5d+58)) then
tmp = t_3
else if (y <= (-2d-92)) then
tmp = t_2
else if (y <= (-2.1d-166)) then
tmp = z * ((y + x) / t_1)
else if (y <= (-5.8d-213)) then
tmp = a / (t_1 / (y + t))
else if (y <= 9.5d-50) then
tmp = ((z * x) + (t * a)) / (t + x)
else if (y <= 3.5d+152) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = ((z - b) / (t_1 / y)) + (z + a);
double t_3 = (z + a) - b;
double tmp;
if (y <= -5e+58) {
tmp = t_3;
} else if (y <= -2e-92) {
tmp = t_2;
} else if (y <= -2.1e-166) {
tmp = z * ((y + x) / t_1);
} else if (y <= -5.8e-213) {
tmp = a / (t_1 / (y + t));
} else if (y <= 9.5e-50) {
tmp = ((z * x) + (t * a)) / (t + x);
} else if (y <= 3.5e+152) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = ((z - b) / (t_1 / y)) + (z + a) t_3 = (z + a) - b tmp = 0 if y <= -5e+58: tmp = t_3 elif y <= -2e-92: tmp = t_2 elif y <= -2.1e-166: tmp = z * ((y + x) / t_1) elif y <= -5.8e-213: tmp = a / (t_1 / (y + t)) elif y <= 9.5e-50: tmp = ((z * x) + (t * a)) / (t + x) elif y <= 3.5e+152: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(z + a)) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -5e+58) tmp = t_3; elseif (y <= -2e-92) tmp = t_2; elseif (y <= -2.1e-166) tmp = Float64(z * Float64(Float64(y + x) / t_1)); elseif (y <= -5.8e-213) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= 9.5e-50) tmp = Float64(Float64(Float64(z * x) + Float64(t * a)) / Float64(t + x)); elseif (y <= 3.5e+152) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = ((z - b) / (t_1 / y)) + (z + a); t_3 = (z + a) - b; tmp = 0.0; if (y <= -5e+58) tmp = t_3; elseif (y <= -2e-92) tmp = t_2; elseif (y <= -2.1e-166) tmp = z * ((y + x) / t_1); elseif (y <= -5.8e-213) tmp = a / (t_1 / (y + t)); elseif (y <= 9.5e-50) tmp = ((z * x) + (t * a)) / (t + x); elseif (y <= 3.5e+152) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5e+58], t$95$3, If[LessEqual[y, -2e-92], t$95$2, If[LessEqual[y, -2.1e-166], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e-213], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e-50], N[(N[(N[(z * x), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+152], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{z - b}{\frac{t_1}{y}} + \left(z + a\right)\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -5 \cdot 10^{+58}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-166}:\\
\;\;\;\;z \cdot \frac{y + x}{t_1}\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-213}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{z \cdot x + t \cdot a}{t + x}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+152}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -4.99999999999999986e58 or 3.49999999999999981e152 < y Initial program 43.4%
Taylor expanded in y around inf 73.9%
+-commutative73.9%
Simplified73.9%
if -4.99999999999999986e58 < y < -1.99999999999999998e-92 or 9.4999999999999993e-50 < y < 3.49999999999999981e152Initial program 61.1%
Simplified61.3%
Taylor expanded in a around inf 61.3%
associate-/l*67.7%
+-commutative67.7%
associate-/l*88.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 95.3%
Taylor expanded in x around inf 72.4%
if -1.99999999999999998e-92 < y < -2.0999999999999999e-166Initial program 83.3%
Taylor expanded in z around inf 55.0%
associate-/l*57.3%
Simplified57.3%
associate-/r/71.6%
Applied egg-rr71.6%
if -2.0999999999999999e-166 < y < -5.7999999999999999e-213Initial program 47.8%
Taylor expanded in a around inf 47.5%
associate-/l*88.9%
Simplified88.9%
if -5.7999999999999999e-213 < y < 9.4999999999999993e-50Initial program 83.2%
Taylor expanded in y around 0 67.6%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))) (t_2 (/ (- z b) (/ t_1 y))) (t_3 (+ t_2 (+ z a))))
(if (<= x -7.4e+168)
(+ z (/ y (/ x (- a b))))
(if (<= x -3.8e+39)
t_3
(if (<= x -1.4e-23)
(/ (+ (* z x) (* t a)) (+ t x))
(if (<= x 3.9e+68)
(+ t_2 (+ a (/ (* z x) y)))
(if (<= x 9.4e+145)
(/ a (/ t_1 (+ y t)))
(if (<= x 8.2e+197) t_3 (+ z (* y (/ (- a b) x)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (z - b) / (t_1 / y);
double t_3 = t_2 + (z + a);
double tmp;
if (x <= -7.4e+168) {
tmp = z + (y / (x / (a - b)));
} else if (x <= -3.8e+39) {
tmp = t_3;
} else if (x <= -1.4e-23) {
tmp = ((z * x) + (t * a)) / (t + x);
} else if (x <= 3.9e+68) {
tmp = t_2 + (a + ((z * x) / y));
} else if (x <= 9.4e+145) {
tmp = a / (t_1 / (y + t));
} else if (x <= 8.2e+197) {
tmp = t_3;
} else {
tmp = z + (y * ((a - b) / x));
}
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 = y + (t + x)
t_2 = (z - b) / (t_1 / y)
t_3 = t_2 + (z + a)
if (x <= (-7.4d+168)) then
tmp = z + (y / (x / (a - b)))
else if (x <= (-3.8d+39)) then
tmp = t_3
else if (x <= (-1.4d-23)) then
tmp = ((z * x) + (t * a)) / (t + x)
else if (x <= 3.9d+68) then
tmp = t_2 + (a + ((z * x) / y))
else if (x <= 9.4d+145) then
tmp = a / (t_1 / (y + t))
else if (x <= 8.2d+197) then
tmp = t_3
else
tmp = z + (y * ((a - b) / x))
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 + (t + x);
double t_2 = (z - b) / (t_1 / y);
double t_3 = t_2 + (z + a);
double tmp;
if (x <= -7.4e+168) {
tmp = z + (y / (x / (a - b)));
} else if (x <= -3.8e+39) {
tmp = t_3;
} else if (x <= -1.4e-23) {
tmp = ((z * x) + (t * a)) / (t + x);
} else if (x <= 3.9e+68) {
tmp = t_2 + (a + ((z * x) / y));
} else if (x <= 9.4e+145) {
tmp = a / (t_1 / (y + t));
} else if (x <= 8.2e+197) {
tmp = t_3;
} else {
tmp = z + (y * ((a - b) / x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = (z - b) / (t_1 / y) t_3 = t_2 + (z + a) tmp = 0 if x <= -7.4e+168: tmp = z + (y / (x / (a - b))) elif x <= -3.8e+39: tmp = t_3 elif x <= -1.4e-23: tmp = ((z * x) + (t * a)) / (t + x) elif x <= 3.9e+68: tmp = t_2 + (a + ((z * x) / y)) elif x <= 9.4e+145: tmp = a / (t_1 / (y + t)) elif x <= 8.2e+197: tmp = t_3 else: tmp = z + (y * ((a - b) / x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(z - b) / Float64(t_1 / y)) t_3 = Float64(t_2 + Float64(z + a)) tmp = 0.0 if (x <= -7.4e+168) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (x <= -3.8e+39) tmp = t_3; elseif (x <= -1.4e-23) tmp = Float64(Float64(Float64(z * x) + Float64(t * a)) / Float64(t + x)); elseif (x <= 3.9e+68) tmp = Float64(t_2 + Float64(a + Float64(Float64(z * x) / y))); elseif (x <= 9.4e+145) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (x <= 8.2e+197) tmp = t_3; else tmp = Float64(z + Float64(y * Float64(Float64(a - b) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = (z - b) / (t_1 / y); t_3 = t_2 + (z + a); tmp = 0.0; if (x <= -7.4e+168) tmp = z + (y / (x / (a - b))); elseif (x <= -3.8e+39) tmp = t_3; elseif (x <= -1.4e-23) tmp = ((z * x) + (t * a)) / (t + x); elseif (x <= 3.9e+68) tmp = t_2 + (a + ((z * x) / y)); elseif (x <= 9.4e+145) tmp = a / (t_1 / (y + t)); elseif (x <= 8.2e+197) tmp = t_3; else tmp = z + (y * ((a - b) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(z + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.4e+168], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.8e+39], t$95$3, If[LessEqual[x, -1.4e-23], N[(N[(N[(z * x), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+68], N[(t$95$2 + N[(a + N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.4e+145], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e+197], t$95$3, N[(z + N[(y * N[(N[(a - b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{z - b}{\frac{t_1}{y}}\\
t_3 := t_2 + \left(z + a\right)\\
\mathbf{if}\;x \leq -7.4 \cdot 10^{+168}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;x \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{z \cdot x + t \cdot a}{t + x}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+68}:\\
\;\;\;\;t_2 + \left(a + \frac{z \cdot x}{y}\right)\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{+145}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+197}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot \frac{a - b}{x}\\
\end{array}
\end{array}
if x < -7.40000000000000018e168Initial program 55.6%
associate--l+55.6%
fma-def55.6%
*-commutative55.6%
distribute-rgt-in55.6%
associate--l+55.6%
fma-def55.6%
distribute-lft-out--55.6%
+-commutative55.6%
Simplified55.6%
Taylor expanded in t around 0 49.5%
Taylor expanded in x around inf 71.7%
+-commutative71.7%
associate-/l*81.2%
Simplified81.2%
if -7.40000000000000018e168 < x < -3.7999999999999998e39 or 9.4000000000000004e145 < x < 8.2000000000000006e197Initial program 53.0%
Simplified53.6%
Taylor expanded in a around inf 52.8%
associate-/l*63.4%
+-commutative63.4%
associate-/l*72.8%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in y around inf 89.2%
Taylor expanded in x around inf 72.0%
if -3.7999999999999998e39 < x < -1.3999999999999999e-23Initial program 65.0%
Taylor expanded in y around 0 66.1%
if -1.3999999999999999e-23 < x < 3.90000000000000019e68Initial program 68.4%
Simplified68.8%
Taylor expanded in a around inf 68.6%
associate-/l*80.8%
+-commutative80.8%
associate-/l*98.7%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in y around inf 95.8%
Taylor expanded in y around inf 77.0%
if 3.90000000000000019e68 < x < 9.4000000000000004e145Initial program 56.5%
Taylor expanded in a around inf 39.3%
associate-/l*73.7%
Simplified73.7%
if 8.2000000000000006e197 < x Initial program 55.7%
associate--l+55.7%
fma-def55.7%
*-commutative55.7%
distribute-rgt-in55.5%
associate--l+55.5%
fma-def55.5%
distribute-lft-out--55.7%
+-commutative55.7%
Simplified55.7%
Taylor expanded in t around 0 54.1%
Taylor expanded in z around 0 73.7%
Taylor expanded in y around 0 73.0%
associate-*r/84.4%
Simplified84.4%
Final simplification76.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))) (t_2 (* z (/ (+ y x) t_1))) (t_3 (- (+ z a) b)))
(if (<= t -3.5e+109)
a
(if (<= t -3.4e-137)
t_3
(if (<= t 1.05e+48)
(+ z (/ (* y (- a b)) (+ y x)))
(if (<= t 1.95e+80)
t_3
(if (<= t 1.4e+109)
t_2
(if (<= t 7.5e+123)
(/ (- y) (/ t_1 b))
(if (<= t 6.5e+213) t_2 a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = z * ((y + x) / t_1);
double t_3 = (z + a) - b;
double tmp;
if (t <= -3.5e+109) {
tmp = a;
} else if (t <= -3.4e-137) {
tmp = t_3;
} else if (t <= 1.05e+48) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (t <= 1.95e+80) {
tmp = t_3;
} else if (t <= 1.4e+109) {
tmp = t_2;
} else if (t <= 7.5e+123) {
tmp = -y / (t_1 / b);
} else if (t <= 6.5e+213) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (t + x)
t_2 = z * ((y + x) / t_1)
t_3 = (z + a) - b
if (t <= (-3.5d+109)) then
tmp = a
else if (t <= (-3.4d-137)) then
tmp = t_3
else if (t <= 1.05d+48) then
tmp = z + ((y * (a - b)) / (y + x))
else if (t <= 1.95d+80) then
tmp = t_3
else if (t <= 1.4d+109) then
tmp = t_2
else if (t <= 7.5d+123) then
tmp = -y / (t_1 / b)
else if (t <= 6.5d+213) then
tmp = t_2
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 t_1 = y + (t + x);
double t_2 = z * ((y + x) / t_1);
double t_3 = (z + a) - b;
double tmp;
if (t <= -3.5e+109) {
tmp = a;
} else if (t <= -3.4e-137) {
tmp = t_3;
} else if (t <= 1.05e+48) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (t <= 1.95e+80) {
tmp = t_3;
} else if (t <= 1.4e+109) {
tmp = t_2;
} else if (t <= 7.5e+123) {
tmp = -y / (t_1 / b);
} else if (t <= 6.5e+213) {
tmp = t_2;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = z * ((y + x) / t_1) t_3 = (z + a) - b tmp = 0 if t <= -3.5e+109: tmp = a elif t <= -3.4e-137: tmp = t_3 elif t <= 1.05e+48: tmp = z + ((y * (a - b)) / (y + x)) elif t <= 1.95e+80: tmp = t_3 elif t <= 1.4e+109: tmp = t_2 elif t <= 7.5e+123: tmp = -y / (t_1 / b) elif t <= 6.5e+213: tmp = t_2 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(z * Float64(Float64(y + x) / t_1)) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -3.5e+109) tmp = a; elseif (t <= -3.4e-137) tmp = t_3; elseif (t <= 1.05e+48) tmp = Float64(z + Float64(Float64(y * Float64(a - b)) / Float64(y + x))); elseif (t <= 1.95e+80) tmp = t_3; elseif (t <= 1.4e+109) tmp = t_2; elseif (t <= 7.5e+123) tmp = Float64(Float64(-y) / Float64(t_1 / b)); elseif (t <= 6.5e+213) tmp = t_2; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = z * ((y + x) / t_1); t_3 = (z + a) - b; tmp = 0.0; if (t <= -3.5e+109) tmp = a; elseif (t <= -3.4e-137) tmp = t_3; elseif (t <= 1.05e+48) tmp = z + ((y * (a - b)) / (y + x)); elseif (t <= 1.95e+80) tmp = t_3; elseif (t <= 1.4e+109) tmp = t_2; elseif (t <= 7.5e+123) tmp = -y / (t_1 / b); elseif (t <= 6.5e+213) tmp = t_2; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -3.5e+109], a, If[LessEqual[t, -3.4e-137], t$95$3, If[LessEqual[t, 1.05e+48], N[(z + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+80], t$95$3, If[LessEqual[t, 1.4e+109], t$95$2, If[LessEqual[t, 7.5e+123], N[((-y) / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+213], t$95$2, a]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := z \cdot \frac{y + x}{t_1}\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+109}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-137}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+48}:\\
\;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+123}:\\
\;\;\;\;\frac{-y}{\frac{t_1}{b}}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+213}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -3.49999999999999983e109 or 6.49999999999999982e213 < t Initial program 48.9%
Taylor expanded in t around inf 63.9%
if -3.49999999999999983e109 < t < -3.40000000000000014e-137 or 1.0499999999999999e48 < t < 1.94999999999999999e80Initial program 54.5%
Taylor expanded in y around inf 67.4%
+-commutative67.4%
Simplified67.4%
if -3.40000000000000014e-137 < t < 1.0499999999999999e48Initial program 75.5%
associate--l+75.5%
fma-def75.6%
*-commutative75.6%
distribute-rgt-in75.6%
associate--l+75.6%
fma-def75.6%
distribute-lft-out--75.8%
+-commutative75.8%
Simplified75.8%
Taylor expanded in t around 0 68.7%
Taylor expanded in z around 0 77.0%
if 1.94999999999999999e80 < t < 1.4000000000000001e109 or 7.4999999999999999e123 < t < 6.49999999999999982e213Initial program 54.8%
Taylor expanded in z around inf 45.0%
associate-/l*79.4%
Simplified79.4%
associate-/r/79.7%
Applied egg-rr79.7%
if 1.4000000000000001e109 < t < 7.4999999999999999e123Initial program 60.3%
Taylor expanded in b around inf 45.7%
mul-1-neg45.7%
associate-/l*66.9%
distribute-neg-frac66.9%
Simplified66.9%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ y (+ t x)))
(t_3 (* z (/ (+ y x) t_2)))
(t_4 (/ a (/ t_2 (+ y t)))))
(if (<= t -7.4e+105)
t_4
(if (<= t -3.1e-137)
t_1
(if (<= t 1.15e+48)
(+ z (/ (* y (- a b)) (+ y x)))
(if (<= t 1.05e+86)
t_1
(if (<= t 1.42e+109)
t_3
(if (<= t 1.4e+123)
(/ (- y) (/ t_2 b))
(if (<= t 7e+207) t_3 t_4)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (t + x);
double t_3 = z * ((y + x) / t_2);
double t_4 = a / (t_2 / (y + t));
double tmp;
if (t <= -7.4e+105) {
tmp = t_4;
} else if (t <= -3.1e-137) {
tmp = t_1;
} else if (t <= 1.15e+48) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (t <= 1.05e+86) {
tmp = t_1;
} else if (t <= 1.42e+109) {
tmp = t_3;
} else if (t <= 1.4e+123) {
tmp = -y / (t_2 / b);
} else if (t <= 7e+207) {
tmp = t_3;
} 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 = (z + a) - b
t_2 = y + (t + x)
t_3 = z * ((y + x) / t_2)
t_4 = a / (t_2 / (y + t))
if (t <= (-7.4d+105)) then
tmp = t_4
else if (t <= (-3.1d-137)) then
tmp = t_1
else if (t <= 1.15d+48) then
tmp = z + ((y * (a - b)) / (y + x))
else if (t <= 1.05d+86) then
tmp = t_1
else if (t <= 1.42d+109) then
tmp = t_3
else if (t <= 1.4d+123) then
tmp = -y / (t_2 / b)
else if (t <= 7d+207) then
tmp = t_3
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 = (z + a) - b;
double t_2 = y + (t + x);
double t_3 = z * ((y + x) / t_2);
double t_4 = a / (t_2 / (y + t));
double tmp;
if (t <= -7.4e+105) {
tmp = t_4;
} else if (t <= -3.1e-137) {
tmp = t_1;
} else if (t <= 1.15e+48) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (t <= 1.05e+86) {
tmp = t_1;
} else if (t <= 1.42e+109) {
tmp = t_3;
} else if (t <= 1.4e+123) {
tmp = -y / (t_2 / b);
} else if (t <= 7e+207) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (t + x) t_3 = z * ((y + x) / t_2) t_4 = a / (t_2 / (y + t)) tmp = 0 if t <= -7.4e+105: tmp = t_4 elif t <= -3.1e-137: tmp = t_1 elif t <= 1.15e+48: tmp = z + ((y * (a - b)) / (y + x)) elif t <= 1.05e+86: tmp = t_1 elif t <= 1.42e+109: tmp = t_3 elif t <= 1.4e+123: tmp = -y / (t_2 / b) elif t <= 7e+207: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(t + x)) t_3 = Float64(z * Float64(Float64(y + x) / t_2)) t_4 = Float64(a / Float64(t_2 / Float64(y + t))) tmp = 0.0 if (t <= -7.4e+105) tmp = t_4; elseif (t <= -3.1e-137) tmp = t_1; elseif (t <= 1.15e+48) tmp = Float64(z + Float64(Float64(y * Float64(a - b)) / Float64(y + x))); elseif (t <= 1.05e+86) tmp = t_1; elseif (t <= 1.42e+109) tmp = t_3; elseif (t <= 1.4e+123) tmp = Float64(Float64(-y) / Float64(t_2 / b)); elseif (t <= 7e+207) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (t + x); t_3 = z * ((y + x) / t_2); t_4 = a / (t_2 / (y + t)); tmp = 0.0; if (t <= -7.4e+105) tmp = t_4; elseif (t <= -3.1e-137) tmp = t_1; elseif (t <= 1.15e+48) tmp = z + ((y * (a - b)) / (y + x)); elseif (t <= 1.05e+86) tmp = t_1; elseif (t <= 1.42e+109) tmp = t_3; elseif (t <= 1.4e+123) tmp = -y / (t_2 / b); elseif (t <= 7e+207) tmp = t_3; else tmp = t_4; 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[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a / N[(t$95$2 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.4e+105], t$95$4, If[LessEqual[t, -3.1e-137], t$95$1, If[LessEqual[t, 1.15e+48], N[(z + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+86], t$95$1, If[LessEqual[t, 1.42e+109], t$95$3, If[LessEqual[t, 1.4e+123], N[((-y) / N[(t$95$2 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+207], t$95$3, t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(t + x\right)\\
t_3 := z \cdot \frac{y + x}{t_2}\\
t_4 := \frac{a}{\frac{t_2}{y + t}}\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{+105}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+48}:\\
\;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{+109}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+123}:\\
\;\;\;\;\frac{-y}{\frac{t_2}{b}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+207}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if t < -7.3999999999999997e105 or 7.00000000000000056e207 < t Initial program 48.9%
Taylor expanded in a around inf 34.5%
associate-/l*67.4%
Simplified67.4%
if -7.3999999999999997e105 < t < -3.09999999999999978e-137 or 1.15e48 < t < 1.0499999999999999e86Initial program 54.5%
Taylor expanded in y around inf 67.4%
+-commutative67.4%
Simplified67.4%
if -3.09999999999999978e-137 < t < 1.15e48Initial program 75.5%
associate--l+75.5%
fma-def75.6%
*-commutative75.6%
distribute-rgt-in75.6%
associate--l+75.6%
fma-def75.6%
distribute-lft-out--75.8%
+-commutative75.8%
Simplified75.8%
Taylor expanded in t around 0 68.7%
Taylor expanded in z around 0 77.0%
if 1.0499999999999999e86 < t < 1.4200000000000001e109 or 1.40000000000000006e123 < t < 7.00000000000000056e207Initial program 54.8%
Taylor expanded in z around inf 45.0%
associate-/l*79.4%
Simplified79.4%
associate-/r/79.7%
Applied egg-rr79.7%
if 1.4200000000000001e109 < t < 1.40000000000000006e123Initial program 60.3%
Taylor expanded in b around inf 45.7%
mul-1-neg45.7%
associate-/l*66.9%
distribute-neg-frac66.9%
Simplified66.9%
Final simplification72.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (/ y (/ x (- a b))))))
(if (<= x -1.9e+66)
t_2
(if (<= x -3.5e-244)
t_1
(if (<= x 3.7e-292) a (if (<= x 2.8e+111) 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 = z + (y / (x / (a - b)));
double tmp;
if (x <= -1.9e+66) {
tmp = t_2;
} else if (x <= -3.5e-244) {
tmp = t_1;
} else if (x <= 3.7e-292) {
tmp = a;
} else if (x <= 2.8e+111) {
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 = z + (y / (x / (a - b)))
if (x <= (-1.9d+66)) then
tmp = t_2
else if (x <= (-3.5d-244)) then
tmp = t_1
else if (x <= 3.7d-292) then
tmp = a
else if (x <= 2.8d+111) 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 = z + (y / (x / (a - b)));
double tmp;
if (x <= -1.9e+66) {
tmp = t_2;
} else if (x <= -3.5e-244) {
tmp = t_1;
} else if (x <= 3.7e-292) {
tmp = a;
} else if (x <= 2.8e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z + (y / (x / (a - b))) tmp = 0 if x <= -1.9e+66: tmp = t_2 elif x <= -3.5e-244: tmp = t_1 elif x <= 3.7e-292: tmp = a elif x <= 2.8e+111: 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(z + Float64(y / Float64(x / Float64(a - b)))) tmp = 0.0 if (x <= -1.9e+66) tmp = t_2; elseif (x <= -3.5e-244) tmp = t_1; elseif (x <= 3.7e-292) tmp = a; elseif (x <= 2.8e+111) 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 = z + (y / (x / (a - b))); tmp = 0.0; if (x <= -1.9e+66) tmp = t_2; elseif (x <= -3.5e-244) tmp = t_1; elseif (x <= 3.7e-292) tmp = a; elseif (x <= 2.8e+111) 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[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+66], t$95$2, If[LessEqual[x, -3.5e-244], t$95$1, If[LessEqual[x, 3.7e-292], a, If[LessEqual[x, 2.8e+111], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+66}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-292}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.9000000000000001e66 or 2.7999999999999999e111 < x Initial program 54.5%
associate--l+54.5%
fma-def54.5%
*-commutative54.5%
distribute-rgt-in54.4%
associate--l+54.4%
fma-def54.4%
distribute-lft-out--54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.3%
Taylor expanded in x around inf 64.8%
+-commutative64.8%
associate-/l*72.1%
Simplified72.1%
if -1.9000000000000001e66 < x < -3.49999999999999992e-244 or 3.69999999999999997e-292 < x < 2.7999999999999999e111Initial program 66.8%
Taylor expanded in y around inf 60.3%
+-commutative60.3%
Simplified60.3%
if -3.49999999999999992e-244 < x < 3.69999999999999997e-292Initial program 73.5%
Taylor expanded in t around inf 58.1%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (* y (/ (- a b) x)))))
(if (<= x -1.15e+66)
t_2
(if (<= x -4.6e-244)
t_1
(if (<= x 3.2e-292) a (if (<= x 6.8e+113) 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 = z + (y * ((a - b) / x));
double tmp;
if (x <= -1.15e+66) {
tmp = t_2;
} else if (x <= -4.6e-244) {
tmp = t_1;
} else if (x <= 3.2e-292) {
tmp = a;
} else if (x <= 6.8e+113) {
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 = z + (y * ((a - b) / x))
if (x <= (-1.15d+66)) then
tmp = t_2
else if (x <= (-4.6d-244)) then
tmp = t_1
else if (x <= 3.2d-292) then
tmp = a
else if (x <= 6.8d+113) 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 = z + (y * ((a - b) / x));
double tmp;
if (x <= -1.15e+66) {
tmp = t_2;
} else if (x <= -4.6e-244) {
tmp = t_1;
} else if (x <= 3.2e-292) {
tmp = a;
} else if (x <= 6.8e+113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z + (y * ((a - b) / x)) tmp = 0 if x <= -1.15e+66: tmp = t_2 elif x <= -4.6e-244: tmp = t_1 elif x <= 3.2e-292: tmp = a elif x <= 6.8e+113: 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(z + Float64(y * Float64(Float64(a - b) / x))) tmp = 0.0 if (x <= -1.15e+66) tmp = t_2; elseif (x <= -4.6e-244) tmp = t_1; elseif (x <= 3.2e-292) tmp = a; elseif (x <= 6.8e+113) 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 = z + (y * ((a - b) / x)); tmp = 0.0; if (x <= -1.15e+66) tmp = t_2; elseif (x <= -4.6e-244) tmp = t_1; elseif (x <= 3.2e-292) tmp = a; elseif (x <= 6.8e+113) 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[(z + N[(y * N[(N[(a - b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+66], t$95$2, If[LessEqual[x, -4.6e-244], t$95$1, If[LessEqual[x, 3.2e-292], a, If[LessEqual[x, 6.8e+113], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + y \cdot \frac{a - b}{x}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+66}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-292}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.15e66 or 6.80000000000000038e113 < x Initial program 54.5%
associate--l+54.5%
fma-def54.5%
*-commutative54.5%
distribute-rgt-in54.4%
associate--l+54.4%
fma-def54.4%
distribute-lft-out--54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.3%
Taylor expanded in z around 0 67.2%
Taylor expanded in y around 0 64.8%
associate-*r/72.1%
Simplified72.1%
if -1.15e66 < x < -4.6e-244 or 3.2000000000000002e-292 < x < 6.80000000000000038e113Initial program 66.8%
Taylor expanded in y around inf 60.3%
+-commutative60.3%
Simplified60.3%
if -4.6e-244 < x < 3.2000000000000002e-292Initial program 73.5%
Taylor expanded in t around inf 58.1%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (* y (/ a x)))))
(if (<= x -5.6e+179)
t_2
(if (<= x -3.2e-244)
t_1
(if (<= x 3e-292) a (if (<= x 2.4e+109) 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 = z + (y * (a / x));
double tmp;
if (x <= -5.6e+179) {
tmp = t_2;
} else if (x <= -3.2e-244) {
tmp = t_1;
} else if (x <= 3e-292) {
tmp = a;
} else if (x <= 2.4e+109) {
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 = z + (y * (a / x))
if (x <= (-5.6d+179)) then
tmp = t_2
else if (x <= (-3.2d-244)) then
tmp = t_1
else if (x <= 3d-292) then
tmp = a
else if (x <= 2.4d+109) 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 = z + (y * (a / x));
double tmp;
if (x <= -5.6e+179) {
tmp = t_2;
} else if (x <= -3.2e-244) {
tmp = t_1;
} else if (x <= 3e-292) {
tmp = a;
} else if (x <= 2.4e+109) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z + (y * (a / x)) tmp = 0 if x <= -5.6e+179: tmp = t_2 elif x <= -3.2e-244: tmp = t_1 elif x <= 3e-292: tmp = a elif x <= 2.4e+109: 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(z + Float64(y * Float64(a / x))) tmp = 0.0 if (x <= -5.6e+179) tmp = t_2; elseif (x <= -3.2e-244) tmp = t_1; elseif (x <= 3e-292) tmp = a; elseif (x <= 2.4e+109) 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 = z + (y * (a / x)); tmp = 0.0; if (x <= -5.6e+179) tmp = t_2; elseif (x <= -3.2e-244) tmp = t_1; elseif (x <= 3e-292) tmp = a; elseif (x <= 2.4e+109) 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[(z + N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+179], t$95$2, If[LessEqual[x, -3.2e-244], t$95$1, If[LessEqual[x, 3e-292], a, If[LessEqual[x, 2.4e+109], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + y \cdot \frac{a}{x}\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+179}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-292}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -5.60000000000000001e179 or 2.39999999999999987e109 < x Initial program 55.6%
associate--l+55.6%
fma-def55.6%
*-commutative55.6%
distribute-rgt-in55.5%
associate--l+55.5%
fma-def55.5%
distribute-lft-out--55.7%
+-commutative55.7%
Simplified55.7%
Taylor expanded in t around 0 48.8%
Taylor expanded in x around inf 66.6%
Taylor expanded in a around inf 60.9%
*-commutative60.9%
associate-/l*64.9%
associate-/r/64.9%
Simplified64.9%
Taylor expanded in y around 0 60.9%
*-commutative60.9%
associate-*l/64.9%
*-commutative64.9%
Simplified64.9%
if -5.60000000000000001e179 < x < -3.1999999999999998e-244 or 3.00000000000000015e-292 < x < 2.39999999999999987e109Initial program 64.8%
Taylor expanded in y around inf 60.7%
+-commutative60.7%
Simplified60.7%
if -3.1999999999999998e-244 < x < 3.00000000000000015e-292Initial program 73.5%
Taylor expanded in t around inf 58.1%
Final simplification61.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -1.25e+109)
a
(if (<= t 9.8e-206)
t_1
(if (<= t 5.5e+15) z (if (<= t 2.2e+209) t_1 a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -1.25e+109) {
tmp = a;
} else if (t <= 9.8e-206) {
tmp = t_1;
} else if (t <= 5.5e+15) {
tmp = z;
} else if (t <= 2.2e+209) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (t <= (-1.25d+109)) then
tmp = a
else if (t <= 9.8d-206) then
tmp = t_1
else if (t <= 5.5d+15) then
tmp = z
else if (t <= 2.2d+209) then
tmp = t_1
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 t_1 = (z + a) - b;
double tmp;
if (t <= -1.25e+109) {
tmp = a;
} else if (t <= 9.8e-206) {
tmp = t_1;
} else if (t <= 5.5e+15) {
tmp = z;
} else if (t <= 2.2e+209) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -1.25e+109: tmp = a elif t <= 9.8e-206: tmp = t_1 elif t <= 5.5e+15: tmp = z elif t <= 2.2e+209: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -1.25e+109) tmp = a; elseif (t <= 9.8e-206) tmp = t_1; elseif (t <= 5.5e+15) tmp = z; elseif (t <= 2.2e+209) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -1.25e+109) tmp = a; elseif (t <= 9.8e-206) tmp = t_1; elseif (t <= 5.5e+15) tmp = z; elseif (t <= 2.2e+209) tmp = t_1; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -1.25e+109], a, If[LessEqual[t, 9.8e-206], t$95$1, If[LessEqual[t, 5.5e+15], z, If[LessEqual[t, 2.2e+209], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+109}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-206}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.25e109 or 2.1999999999999999e209 < t Initial program 48.9%
Taylor expanded in t around inf 63.9%
if -1.25e109 < t < 9.7999999999999999e-206 or 5.5e15 < t < 2.1999999999999999e209Initial program 65.5%
Taylor expanded in y around inf 60.5%
+-commutative60.5%
Simplified60.5%
if 9.7999999999999999e-206 < t < 5.5e15Initial program 75.0%
Taylor expanded in x around inf 59.9%
Final simplification61.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -3.5e+109)
a
(if (<= t 3e-205)
t_1
(if (<= t 7.5e+32) (+ z (* a (/ y x))) (if (<= t 1.65e+208) t_1 a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -3.5e+109) {
tmp = a;
} else if (t <= 3e-205) {
tmp = t_1;
} else if (t <= 7.5e+32) {
tmp = z + (a * (y / x));
} else if (t <= 1.65e+208) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (t <= (-3.5d+109)) then
tmp = a
else if (t <= 3d-205) then
tmp = t_1
else if (t <= 7.5d+32) then
tmp = z + (a * (y / x))
else if (t <= 1.65d+208) then
tmp = t_1
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 t_1 = (z + a) - b;
double tmp;
if (t <= -3.5e+109) {
tmp = a;
} else if (t <= 3e-205) {
tmp = t_1;
} else if (t <= 7.5e+32) {
tmp = z + (a * (y / x));
} else if (t <= 1.65e+208) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -3.5e+109: tmp = a elif t <= 3e-205: tmp = t_1 elif t <= 7.5e+32: tmp = z + (a * (y / x)) elif t <= 1.65e+208: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -3.5e+109) tmp = a; elseif (t <= 3e-205) tmp = t_1; elseif (t <= 7.5e+32) tmp = Float64(z + Float64(a * Float64(y / x))); elseif (t <= 1.65e+208) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -3.5e+109) tmp = a; elseif (t <= 3e-205) tmp = t_1; elseif (t <= 7.5e+32) tmp = z + (a * (y / x)); elseif (t <= 1.65e+208) tmp = t_1; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -3.5e+109], a, If[LessEqual[t, 3e-205], t$95$1, If[LessEqual[t, 7.5e+32], N[(z + N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+208], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+109}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+32}:\\
\;\;\;\;z + a \cdot \frac{y}{x}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+208}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -3.49999999999999983e109 or 1.65e208 < t Initial program 48.9%
Taylor expanded in t around inf 63.9%
if -3.49999999999999983e109 < t < 3e-205 or 7.49999999999999959e32 < t < 1.65e208Initial program 65.7%
Taylor expanded in y around inf 61.3%
+-commutative61.3%
Simplified61.3%
if 3e-205 < t < 7.49999999999999959e32Initial program 74.1%
associate--l+74.1%
fma-def74.3%
*-commutative74.3%
distribute-rgt-in74.3%
associate--l+74.3%
fma-def74.3%
distribute-lft-out--74.3%
+-commutative74.3%
Simplified74.3%
Taylor expanded in t around 0 58.9%
Taylor expanded in x around inf 62.5%
Taylor expanded in a around inf 57.8%
*-commutative57.8%
associate-/l*59.7%
associate-/r/60.0%
Simplified60.0%
Final simplification61.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.2e-78) (not (<= y 1.8e-107))) (- (+ z a) b) (* z (/ (+ y x) (+ t x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e-78) || !(y <= 1.8e-107)) {
tmp = (z + a) - b;
} else {
tmp = z * ((y + x) / (t + x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-7.2d-78)) .or. (.not. (y <= 1.8d-107))) then
tmp = (z + a) - b
else
tmp = z * ((y + x) / (t + x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e-78) || !(y <= 1.8e-107)) {
tmp = (z + a) - b;
} else {
tmp = z * ((y + x) / (t + x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.2e-78) or not (y <= 1.8e-107): tmp = (z + a) - b else: tmp = z * ((y + x) / (t + x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.2e-78) || !(y <= 1.8e-107)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z * Float64(Float64(y + x) / Float64(t + x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.2e-78) || ~((y <= 1.8e-107))) tmp = (z + a) - b; else tmp = z * ((y + x) / (t + x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.2e-78], N[Not[LessEqual[y, 1.8e-107]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z * N[(N[(y + x), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-78} \lor \neg \left(y \leq 1.8 \cdot 10^{-107}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + x}{t + x}\\
\end{array}
\end{array}
if y < -7.2000000000000005e-78 or 1.79999999999999988e-107 < y Initial program 55.6%
Taylor expanded in y around inf 63.1%
+-commutative63.1%
Simplified63.1%
if -7.2000000000000005e-78 < y < 1.79999999999999988e-107Initial program 77.4%
Taylor expanded in z around inf 43.8%
associate-/l*39.9%
Simplified39.9%
Taylor expanded in y around 0 38.3%
associate-/r/53.0%
Applied egg-rr53.0%
Final simplification59.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e-80) (not (<= y 2.25e-107))) (- (+ z a) b) (/ z (/ (+ t x) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.2e-80) || !(y <= 2.25e-107)) {
tmp = (z + a) - b;
} else {
tmp = z / ((t + x) / x);
}
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 <= (-8.2d-80)) .or. (.not. (y <= 2.25d-107))) then
tmp = (z + a) - b
else
tmp = z / ((t + x) / x)
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 <= -8.2e-80) || !(y <= 2.25e-107)) {
tmp = (z + a) - b;
} else {
tmp = z / ((t + x) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.2e-80) or not (y <= 2.25e-107): tmp = (z + a) - b else: tmp = z / ((t + x) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.2e-80) || !(y <= 2.25e-107)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z / Float64(Float64(t + x) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.2e-80) || ~((y <= 2.25e-107))) tmp = (z + a) - b; else tmp = z / ((t + x) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.2e-80], N[Not[LessEqual[y, 2.25e-107]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z / N[(N[(t + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-80} \lor \neg \left(y \leq 2.25 \cdot 10^{-107}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t + x}{x}}\\
\end{array}
\end{array}
if y < -8.1999999999999999e-80 or 2.25000000000000008e-107 < y Initial program 55.6%
Taylor expanded in y around inf 63.1%
+-commutative63.1%
Simplified63.1%
if -8.1999999999999999e-80 < y < 2.25000000000000008e-107Initial program 77.4%
Taylor expanded in z around inf 43.8%
associate-/l*39.9%
Simplified39.9%
Taylor expanded in y around 0 38.3%
Taylor expanded in y around 0 40.4%
associate-/l*52.7%
Simplified52.7%
Final simplification59.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -880000000.0) a (if (<= t 4.2e+212) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -880000000.0) {
tmp = a;
} else if (t <= 4.2e+212) {
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 (t <= (-880000000.0d0)) then
tmp = a
else if (t <= 4.2d+212) 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 (t <= -880000000.0) {
tmp = a;
} else if (t <= 4.2e+212) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -880000000.0: tmp = a elif t <= 4.2e+212: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -880000000.0) tmp = a; elseif (t <= 4.2e+212) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -880000000.0) tmp = a; elseif (t <= 4.2e+212) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -880000000.0], a, If[LessEqual[t, 4.2e+212], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -880000000:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+212}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -8.8e8 or 4.2e212 < t Initial program 54.1%
Taylor expanded in t around inf 60.4%
if -8.8e8 < t < 4.2e212Initial program 67.1%
Taylor expanded in x around inf 46.8%
Final simplification51.3%
(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.8%
Taylor expanded in t around inf 31.1%
Final simplification31.1%
(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 2023240
(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)))