
(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 22 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 (/ (- (+ (* z (+ x y)) t_1) (* y b)) (+ y (+ x t))))
(t_3 (+ x (+ y t)))
(t_4 (/ y t_3)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 4e+287)))
(+ (/ (+ x y) (/ t_3 z)) (- (* a (+ t_4 (/ t t_3))) (/ y (/ t_3 b))))
(+ (* z (+ t_4 (/ x t_3))) (/ (- t_1 (* y b)) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t));
double t_3 = x + (y + t);
double t_4 = y / t_3;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 4e+287)) {
tmp = ((x + y) / (t_3 / z)) + ((a * (t_4 + (t / t_3))) - (y / (t_3 / b)));
} else {
tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3);
}
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 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t));
double t_3 = x + (y + t);
double t_4 = y / t_3;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 4e+287)) {
tmp = ((x + y) / (t_3 / z)) + ((a * (t_4 + (t / t_3))) - (y / (t_3 / b)));
} else {
tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (y + t) t_2 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t)) t_3 = x + (y + t) t_4 = y / t_3 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 4e+287): tmp = ((x + y) / (t_3 / z)) + ((a * (t_4 + (t / t_3))) - (y / (t_3 / b))) else: tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + t_1) - Float64(y * b)) / Float64(y + Float64(x + t))) t_3 = Float64(x + Float64(y + t)) t_4 = Float64(y / t_3) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 4e+287)) tmp = Float64(Float64(Float64(x + y) / Float64(t_3 / z)) + Float64(Float64(a * Float64(t_4 + Float64(t / t_3))) - Float64(y / Float64(t_3 / b)))); else tmp = Float64(Float64(z * Float64(t_4 + Float64(x / t_3))) + Float64(Float64(t_1 - Float64(y * b)) / t_3)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (y + t); t_2 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t)); t_3 = x + (y + t); t_4 = y / t_3; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 4e+287))) tmp = ((x + y) / (t_3 / z)) + ((a * (t_4 + (t / t_3))) - (y / (t_3 / b))); else tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3); 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[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y / t$95$3), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 4e+287]], $MachinePrecision]], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$3 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(t$95$4 + N[(t / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$3 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(t$95$4 + N[(x / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{y + \left(x + t\right)}\\
t_3 := x + \left(y + t\right)\\
t_4 := \frac{y}{t_3}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 4 \cdot 10^{+287}\right):\\
\;\;\;\;\frac{x + y}{\frac{t_3}{z}} + \left(a \cdot \left(t_4 + \frac{t}{t_3}\right) - \frac{y}{\frac{t_3}{b}}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t_4 + \frac{x}{t_3}\right) + \frac{t_1 - y \cdot b}{t_3}\\
\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.0000000000000003e287 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.7%
Taylor expanded in a around 0 30.4%
associate--l+30.4%
associate-/l*69.7%
associate-+r+69.7%
associate-+r+69.7%
associate-+r+69.7%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.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)) < 4.0000000000000003e287Initial program 99.6%
Taylor expanded in z around 0 99.7%
associate--l+99.7%
*-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
div-sub99.6%
associate-+r+99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ y t)))
(t_2 (/ (- (+ (* z (+ x y)) t_1) (* y b)) (+ y (+ x t))))
(t_3 (+ x (+ y t)))
(t_4 (/ y t_3))
(t_5 (/ y (/ t_3 b))))
(if (<= t_2 (- INFINITY))
(+ (/ (+ x y) (/ t_3 z)) (- a t_5))
(if (<= t_2 4e+287)
(+ (* z (+ t_4 (/ x t_3))) (/ (- t_1 (* y b)) t_3))
(+ z (- (* a (+ t_4 (/ t t_3))) 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 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t));
double t_3 = x + (y + t);
double t_4 = y / t_3;
double t_5 = y / (t_3 / b);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((x + y) / (t_3 / z)) + (a - t_5);
} else if (t_2 <= 4e+287) {
tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3);
} else {
tmp = z + ((a * (t_4 + (t / t_3))) - 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 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t));
double t_3 = x + (y + t);
double t_4 = y / t_3;
double t_5 = y / (t_3 / b);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((x + y) / (t_3 / z)) + (a - t_5);
} else if (t_2 <= 4e+287) {
tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3);
} else {
tmp = z + ((a * (t_4 + (t / t_3))) - t_5);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (y + t) t_2 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t)) t_3 = x + (y + t) t_4 = y / t_3 t_5 = y / (t_3 / b) tmp = 0 if t_2 <= -math.inf: tmp = ((x + y) / (t_3 / z)) + (a - t_5) elif t_2 <= 4e+287: tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3) else: tmp = z + ((a * (t_4 + (t / t_3))) - t_5) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + t_1) - Float64(y * b)) / Float64(y + Float64(x + t))) t_3 = Float64(x + Float64(y + t)) t_4 = Float64(y / t_3) t_5 = Float64(y / Float64(t_3 / b)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(x + y) / Float64(t_3 / z)) + Float64(a - t_5)); elseif (t_2 <= 4e+287) tmp = Float64(Float64(z * Float64(t_4 + Float64(x / t_3))) + Float64(Float64(t_1 - Float64(y * b)) / t_3)); else tmp = Float64(z + Float64(Float64(a * Float64(t_4 + Float64(t / t_3))) - t_5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (y + t); t_2 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t)); t_3 = x + (y + t); t_4 = y / t_3; t_5 = y / (t_3 / b); tmp = 0.0; if (t_2 <= -Inf) tmp = ((x + y) / (t_3 / z)) + (a - t_5); elseif (t_2 <= 4e+287) tmp = (z * (t_4 + (x / t_3))) + ((t_1 - (y * b)) / t_3); else tmp = z + ((a * (t_4 + (t / t_3))) - 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[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(y / N[(t$95$3 / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$3 / z), $MachinePrecision]), $MachinePrecision] + N[(a - t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+287], N[(N[(z * N[(t$95$4 + N[(x / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], N[(z + N[(N[(a * N[(t$95$4 + N[(t / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{y + \left(x + t\right)}\\
t_3 := x + \left(y + t\right)\\
t_4 := \frac{y}{t_3}\\
t_5 := \frac{y}{\frac{t_3}{b}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{x + y}{\frac{t_3}{z}} + \left(a - t_5\right)\\
\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+287}:\\
\;\;\;\;z \cdot \left(t_4 + \frac{x}{t_3}\right) + \frac{t_1 - y \cdot b}{t_3}\\
\mathbf{else}:\\
\;\;\;\;z + \left(a \cdot \left(t_4 + \frac{t}{t_3}\right) - 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 6.5%
Taylor expanded in a around 0 27.4%
associate--l+27.4%
associate-/l*74.9%
associate-+r+74.9%
associate-+r+74.9%
associate-+r+74.9%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 97.6%
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.0000000000000003e287Initial program 99.6%
Taylor expanded in z around 0 99.7%
associate--l+99.7%
*-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
div-sub99.6%
associate-+r+99.6%
Simplified99.6%
if 4.0000000000000003e287 < (/.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%
Taylor expanded in a around 0 32.8%
associate--l+32.8%
associate-/l*65.5%
associate-+r+65.5%
associate-+r+65.5%
associate-+r+65.5%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 92.5%
Final simplification97.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t))))
(t_2 (+ x (+ y t)))
(t_3 (/ y (/ t_2 b))))
(if (<= t_1 (- INFINITY))
(+ (/ (+ x y) (/ t_2 z)) (- a t_3))
(if (<= t_1 4e+287) t_1 (+ z (- (* a (+ (/ y t_2) (/ t t_2))) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = x + (y + t);
double t_3 = y / (t_2 / b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((x + y) / (t_2 / z)) + (a - t_3);
} else if (t_1 <= 4e+287) {
tmp = t_1;
} else {
tmp = z + ((a * ((y / t_2) + (t / t_2))) - t_3);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = x + (y + t);
double t_3 = y / (t_2 / b);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = ((x + y) / (t_2 / z)) + (a - t_3);
} else if (t_1 <= 4e+287) {
tmp = t_1;
} else {
tmp = z + ((a * ((y / t_2) + (t / t_2))) - t_3);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)) t_2 = x + (y + t) t_3 = y / (t_2 / b) tmp = 0 if t_1 <= -math.inf: tmp = ((x + y) / (t_2 / z)) + (a - t_3) elif t_1 <= 4e+287: tmp = t_1 else: tmp = z + ((a * ((y / t_2) + (t / t_2))) - t_3) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) t_2 = Float64(x + Float64(y + t)) t_3 = Float64(y / Float64(t_2 / b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(x + y) / Float64(t_2 / z)) + Float64(a - t_3)); elseif (t_1 <= 4e+287) tmp = t_1; else tmp = Float64(z + Float64(Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))) - t_3)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)); t_2 = x + (y + t); t_3 = y / (t_2 / b); tmp = 0.0; if (t_1 <= -Inf) tmp = ((x + y) / (t_2 / z)) + (a - t_3); elseif (t_1 <= 4e+287) tmp = t_1; else tmp = z + ((a * ((y / t_2) + (t / t_2))) - t_3); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y / N[(t$95$2 / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision] + N[(a - t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+287], t$95$1, N[(z + N[(N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := x + \left(y + t\right)\\
t_3 := \frac{y}{\frac{t_2}{b}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{x + y}{\frac{t_2}{z}} + \left(a - t_3\right)\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+287}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z + \left(a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) - t_3\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 6.5%
Taylor expanded in a around 0 27.4%
associate--l+27.4%
associate-/l*74.9%
associate-+r+74.9%
associate-+r+74.9%
associate-+r+74.9%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 97.6%
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.0000000000000003e287Initial program 99.6%
if 4.0000000000000003e287 < (/.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%
Taylor expanded in a around 0 32.8%
associate--l+32.8%
associate-/l*65.5%
associate-+r+65.5%
associate-+r+65.5%
associate-+r+65.5%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 92.5%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t)))
(t_2 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+276)))
(+ (/ (+ x y) (/ t_1 z)) (- a (/ y (/ t_1 b))))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+276)) {
tmp = ((x + y) / (t_1 / z)) + (a - (y / (t_1 / b)));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+276)) {
tmp = ((x + y) / (t_1 / z)) + (a - (y / (t_1 / b)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+276): tmp = ((x + y) / (t_1 / z)) + (a - (y / (t_1 / b))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+276)) tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(a - Float64(y / Float64(t_1 / b)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+276))) tmp = ((x + y) / (t_1 / z)) + (a - (y / (t_1 / b))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+276]], $MachinePrecision]], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(a - N[(y / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 10^{+276}\right):\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(a - \frac{y}{\frac{t_1}{b}}\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 1.0000000000000001e276 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 8.4%
Taylor expanded in a around 0 32.4%
associate--l+32.4%
associate-/l*70.6%
associate-+r+70.6%
associate-+r+70.6%
associate-+r+70.6%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 94.6%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.0000000000000001e276Initial program 99.6%
Final simplification97.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t))))
(t_2 (+ x (+ y t))))
(if (<= t_1 (- INFINITY))
(+ z (- a (/ y (/ t_2 b))))
(if (<= t_1 5e+278) t_1 (+ (/ (+ x y) (/ t_2 z)) (- a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = x + (y + t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z + (a - (y / (t_2 / b)));
} else if (t_1 <= 5e+278) {
tmp = t_1;
} else {
tmp = ((x + y) / (t_2 / z)) + (a - b);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = x + (y + t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z + (a - (y / (t_2 / b)));
} else if (t_1 <= 5e+278) {
tmp = t_1;
} else {
tmp = ((x + y) / (t_2 / z)) + (a - b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)) t_2 = x + (y + t) tmp = 0 if t_1 <= -math.inf: tmp = z + (a - (y / (t_2 / b))) elif t_1 <= 5e+278: tmp = t_1 else: tmp = ((x + y) / (t_2 / z)) + (a - b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) t_2 = Float64(x + Float64(y + t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z + Float64(a - Float64(y / Float64(t_2 / b)))); elseif (t_1 <= 5e+278) tmp = t_1; else tmp = Float64(Float64(Float64(x + y) / Float64(t_2 / z)) + Float64(a - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t)); t_2 = x + (y + t); tmp = 0.0; if (t_1 <= -Inf) tmp = z + (a - (y / (t_2 / b))); elseif (t_1 <= 5e+278) tmp = t_1; else tmp = ((x + y) / (t_2 / z)) + (a - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z + N[(a - N[(y / N[(t$95$2 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+278], t$95$1, N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision] + N[(a - b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := x + \left(y + t\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;z + \left(a - \frac{y}{\frac{t_2}{b}}\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+278}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y}{\frac{t_2}{z}} + \left(a - b\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 6.5%
Taylor expanded in a around 0 27.4%
associate--l+27.4%
associate-/l*74.9%
associate-+r+74.9%
associate-+r+74.9%
associate-+r+74.9%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 88.1%
Taylor expanded in y around inf 85.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)) < 5.00000000000000029e278Initial program 99.6%
if 5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 8.3%
Taylor expanded in a around 0 35.2%
associate--l+35.2%
associate-/l*66.7%
associate-+r+66.7%
associate-+r+66.7%
associate-+r+66.7%
associate-/l*99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 92.1%
Taylor expanded in y around inf 87.2%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t)))
(t_2 (/ y (/ t_1 b)))
(t_3 (+ z (- (* a (/ (+ y t) x)) t_2)))
(t_4 (+ z (- a t_2))))
(if (<= x -4.5e+169)
t_3
(if (<= x -1.15e-113)
t_4
(if (<= x 1.1e-141)
(+ (/ (+ x y) (/ t_1 z)) (- a b))
(if (<= x 1.1e+33) t_4 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = y / (t_1 / b);
double t_3 = z + ((a * ((y + t) / x)) - t_2);
double t_4 = z + (a - t_2);
double tmp;
if (x <= -4.5e+169) {
tmp = t_3;
} else if (x <= -1.15e-113) {
tmp = t_4;
} else if (x <= 1.1e-141) {
tmp = ((x + y) / (t_1 / z)) + (a - b);
} else if (x <= 1.1e+33) {
tmp = t_4;
} 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) :: t_4
real(8) :: tmp
t_1 = x + (y + t)
t_2 = y / (t_1 / b)
t_3 = z + ((a * ((y + t) / x)) - t_2)
t_4 = z + (a - t_2)
if (x <= (-4.5d+169)) then
tmp = t_3
else if (x <= (-1.15d-113)) then
tmp = t_4
else if (x <= 1.1d-141) then
tmp = ((x + y) / (t_1 / z)) + (a - b)
else if (x <= 1.1d+33) then
tmp = t_4
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 = x + (y + t);
double t_2 = y / (t_1 / b);
double t_3 = z + ((a * ((y + t) / x)) - t_2);
double t_4 = z + (a - t_2);
double tmp;
if (x <= -4.5e+169) {
tmp = t_3;
} else if (x <= -1.15e-113) {
tmp = t_4;
} else if (x <= 1.1e-141) {
tmp = ((x + y) / (t_1 / z)) + (a - b);
} else if (x <= 1.1e+33) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = y / (t_1 / b) t_3 = z + ((a * ((y + t) / x)) - t_2) t_4 = z + (a - t_2) tmp = 0 if x <= -4.5e+169: tmp = t_3 elif x <= -1.15e-113: tmp = t_4 elif x <= 1.1e-141: tmp = ((x + y) / (t_1 / z)) + (a - b) elif x <= 1.1e+33: tmp = t_4 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(y / Float64(t_1 / b)) t_3 = Float64(z + Float64(Float64(a * Float64(Float64(y + t) / x)) - t_2)) t_4 = Float64(z + Float64(a - t_2)) tmp = 0.0 if (x <= -4.5e+169) tmp = t_3; elseif (x <= -1.15e-113) tmp = t_4; elseif (x <= 1.1e-141) tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(a - b)); elseif (x <= 1.1e+33) tmp = t_4; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = y / (t_1 / b); t_3 = z + ((a * ((y + t) / x)) - t_2); t_4 = z + (a - t_2); tmp = 0.0; if (x <= -4.5e+169) tmp = t_3; elseif (x <= -1.15e-113) tmp = t_4; elseif (x <= 1.1e-141) tmp = ((x + y) / (t_1 / z)) + (a - b); elseif (x <= 1.1e+33) tmp = t_4; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(N[(a * N[(N[(y + t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z + N[(a - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+169], t$95$3, If[LessEqual[x, -1.15e-113], t$95$4, If[LessEqual[x, 1.1e-141], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(a - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+33], t$95$4, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := \frac{y}{\frac{t_1}{b}}\\
t_3 := z + \left(a \cdot \frac{y + t}{x} - t_2\right)\\
t_4 := z + \left(a - t_2\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+169}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-113}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-141}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(a - b\right)\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+33}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -4.5e169 or 1.09999999999999997e33 < x Initial program 57.3%
Taylor expanded in a around 0 62.3%
associate--l+62.3%
associate-/l*82.1%
associate-+r+82.1%
associate-+r+82.1%
associate-+r+82.1%
associate-/l*91.7%
associate-+r+91.7%
+-commutative91.7%
+-commutative91.7%
Simplified91.7%
Taylor expanded in y around inf 88.8%
Taylor expanded in x around inf 80.2%
if -4.5e169 < x < -1.15000000000000004e-113 or 1.10000000000000005e-141 < x < 1.09999999999999997e33Initial program 62.1%
Taylor expanded in a around 0 73.9%
associate--l+73.9%
associate-/l*81.9%
associate-+r+81.9%
associate-+r+81.9%
associate-+r+81.9%
associate-/l*92.6%
associate-+r+92.6%
+-commutative92.6%
+-commutative92.6%
Simplified92.6%
Taylor expanded in y around inf 81.0%
Taylor expanded in y around inf 74.4%
if -1.15000000000000004e-113 < x < 1.10000000000000005e-141Initial program 70.4%
Taylor expanded in a around 0 81.2%
associate--l+81.2%
associate-/l*79.9%
associate-+r+79.9%
associate-+r+79.9%
associate-+r+79.9%
associate-/l*91.8%
associate-+r+91.8%
+-commutative91.8%
+-commutative91.8%
Simplified91.8%
Taylor expanded in y around inf 90.6%
Taylor expanded in y around inf 81.0%
Final simplification78.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t)))
(t_2 (+ z (- (/ a (/ (+ x t) t)) (/ y (/ t_1 b))))))
(if (<= z -2.55e-292)
t_2
(if (<= z 2.05e-209)
(/ (* y (- (+ z a) b)) (+ y (+ x t)))
(if (<= z 2.05e+152) t_2 (+ (/ (+ x y) (/ t_1 z)) (- a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = z + ((a / ((x + t) / t)) - (y / (t_1 / b)));
double tmp;
if (z <= -2.55e-292) {
tmp = t_2;
} else if (z <= 2.05e-209) {
tmp = (y * ((z + a) - b)) / (y + (x + t));
} else if (z <= 2.05e+152) {
tmp = t_2;
} else {
tmp = ((x + y) / (t_1 / z)) + (a - b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y + t)
t_2 = z + ((a / ((x + t) / t)) - (y / (t_1 / b)))
if (z <= (-2.55d-292)) then
tmp = t_2
else if (z <= 2.05d-209) then
tmp = (y * ((z + a) - b)) / (y + (x + t))
else if (z <= 2.05d+152) then
tmp = t_2
else
tmp = ((x + y) / (t_1 / z)) + (a - b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = z + ((a / ((x + t) / t)) - (y / (t_1 / b)));
double tmp;
if (z <= -2.55e-292) {
tmp = t_2;
} else if (z <= 2.05e-209) {
tmp = (y * ((z + a) - b)) / (y + (x + t));
} else if (z <= 2.05e+152) {
tmp = t_2;
} else {
tmp = ((x + y) / (t_1 / z)) + (a - b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = z + ((a / ((x + t) / t)) - (y / (t_1 / b))) tmp = 0 if z <= -2.55e-292: tmp = t_2 elif z <= 2.05e-209: tmp = (y * ((z + a) - b)) / (y + (x + t)) elif z <= 2.05e+152: tmp = t_2 else: tmp = ((x + y) / (t_1 / z)) + (a - b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(z + Float64(Float64(a / Float64(Float64(x + t) / t)) - Float64(y / Float64(t_1 / b)))) tmp = 0.0 if (z <= -2.55e-292) tmp = t_2; elseif (z <= 2.05e-209) tmp = Float64(Float64(y * Float64(Float64(z + a) - b)) / Float64(y + Float64(x + t))); elseif (z <= 2.05e+152) tmp = t_2; else tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(a - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = z + ((a / ((x + t) / t)) - (y / (t_1 / b))); tmp = 0.0; if (z <= -2.55e-292) tmp = t_2; elseif (z <= 2.05e-209) tmp = (y * ((z + a) - b)) / (y + (x + t)); elseif (z <= 2.05e+152) tmp = t_2; else tmp = ((x + y) / (t_1 / z)) + (a - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e-292], t$95$2, If[LessEqual[z, 2.05e-209], N[(N[(y * N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+152], t$95$2, N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(a - b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := z + \left(\frac{a}{\frac{x + t}{t}} - \frac{y}{\frac{t_1}{b}}\right)\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{-292}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-209}:\\
\;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+152}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(a - b\right)\\
\end{array}
\end{array}
if z < -2.55e-292 or 2.04999999999999989e-209 < z < 2.0499999999999999e152Initial program 63.7%
Taylor expanded in a around 0 74.2%
associate--l+74.2%
associate-/l*81.1%
associate-+r+81.1%
associate-+r+81.1%
associate-+r+81.1%
associate-/l*92.5%
associate-+r+92.5%
+-commutative92.5%
+-commutative92.5%
Simplified92.5%
Taylor expanded in y around inf 86.5%
Taylor expanded in y around 0 70.1%
associate-/l*78.7%
+-commutative78.7%
Simplified78.7%
if -2.55e-292 < z < 2.04999999999999989e-209Initial program 81.9%
Taylor expanded in y around inf 78.5%
if 2.0499999999999999e152 < z Initial program 49.6%
Taylor expanded in a around 0 52.1%
associate--l+52.1%
associate-/l*75.7%
associate-+r+75.7%
associate-+r+75.7%
associate-+r+75.7%
associate-/l*86.7%
associate-+r+86.7%
+-commutative86.7%
+-commutative86.7%
Simplified86.7%
Taylor expanded in y around inf 86.7%
Taylor expanded in y around inf 79.7%
Final simplification78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t))) (t_2 (+ z (- a (/ y (/ t_1 b))))))
(if (<= z -7.6e-302)
t_2
(if (<= z 5.4e-207)
(/ (* y (- (+ z a) b)) (+ y (+ x t)))
(if (<= z 1.7e+29) t_2 (+ (/ (+ x y) (/ t_1 z)) (- a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = z + (a - (y / (t_1 / b)));
double tmp;
if (z <= -7.6e-302) {
tmp = t_2;
} else if (z <= 5.4e-207) {
tmp = (y * ((z + a) - b)) / (y + (x + t));
} else if (z <= 1.7e+29) {
tmp = t_2;
} else {
tmp = ((x + y) / (t_1 / z)) + (a - b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y + t)
t_2 = z + (a - (y / (t_1 / b)))
if (z <= (-7.6d-302)) then
tmp = t_2
else if (z <= 5.4d-207) then
tmp = (y * ((z + a) - b)) / (y + (x + t))
else if (z <= 1.7d+29) then
tmp = t_2
else
tmp = ((x + y) / (t_1 / z)) + (a - b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = z + (a - (y / (t_1 / b)));
double tmp;
if (z <= -7.6e-302) {
tmp = t_2;
} else if (z <= 5.4e-207) {
tmp = (y * ((z + a) - b)) / (y + (x + t));
} else if (z <= 1.7e+29) {
tmp = t_2;
} else {
tmp = ((x + y) / (t_1 / z)) + (a - b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = z + (a - (y / (t_1 / b))) tmp = 0 if z <= -7.6e-302: tmp = t_2 elif z <= 5.4e-207: tmp = (y * ((z + a) - b)) / (y + (x + t)) elif z <= 1.7e+29: tmp = t_2 else: tmp = ((x + y) / (t_1 / z)) + (a - b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(z + Float64(a - Float64(y / Float64(t_1 / b)))) tmp = 0.0 if (z <= -7.6e-302) tmp = t_2; elseif (z <= 5.4e-207) tmp = Float64(Float64(y * Float64(Float64(z + a) - b)) / Float64(y + Float64(x + t))); elseif (z <= 1.7e+29) tmp = t_2; else tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(a - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = z + (a - (y / (t_1 / b))); tmp = 0.0; if (z <= -7.6e-302) tmp = t_2; elseif (z <= 5.4e-207) tmp = (y * ((z + a) - b)) / (y + (x + t)); elseif (z <= 1.7e+29) tmp = t_2; else tmp = ((x + y) / (t_1 / z)) + (a - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(a - N[(y / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.6e-302], t$95$2, If[LessEqual[z, 5.4e-207], N[(N[(y * N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+29], t$95$2, N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(a - b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := z + \left(a - \frac{y}{\frac{t_1}{b}}\right)\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{-302}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-207}:\\
\;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(a - b\right)\\
\end{array}
\end{array}
if z < -7.5999999999999999e-302 or 5.4e-207 < z < 1.69999999999999991e29Initial program 65.0%
Taylor expanded in a around 0 74.6%
associate--l+74.6%
associate-/l*80.8%
associate-+r+80.8%
associate-+r+80.8%
associate-+r+80.8%
associate-/l*92.1%
associate-+r+92.1%
+-commutative92.1%
+-commutative92.1%
Simplified92.1%
Taylor expanded in y around inf 86.2%
Taylor expanded in y around inf 75.2%
if -7.5999999999999999e-302 < z < 5.4e-207Initial program 78.0%
Taylor expanded in y around inf 74.5%
if 1.69999999999999991e29 < z Initial program 52.6%
Taylor expanded in a around 0 58.6%
associate--l+58.6%
associate-/l*78.3%
associate-+r+78.3%
associate-+r+78.3%
associate-+r+78.3%
associate-/l*89.8%
associate-+r+89.8%
+-commutative89.8%
+-commutative89.8%
Simplified89.8%
Taylor expanded in y around inf 83.2%
Taylor expanded in y around inf 78.7%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t))) (t_2 (+ z (- a (/ y (/ t_1 b))))))
(if (<= y -1.06e-218)
t_2
(if (<= y 1.5e-119)
(/ (+ (* x z) (* t a)) (+ x t))
(if (<= y 6.5e-40) (/ a (/ t_1 (+ y t))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = z + (a - (y / (t_1 / b)));
double tmp;
if (y <= -1.06e-218) {
tmp = t_2;
} else if (y <= 1.5e-119) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 6.5e-40) {
tmp = a / (t_1 / (y + t));
} 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 = x + (y + t)
t_2 = z + (a - (y / (t_1 / b)))
if (y <= (-1.06d-218)) then
tmp = t_2
else if (y <= 1.5d-119) then
tmp = ((x * z) + (t * a)) / (x + t)
else if (y <= 6.5d-40) then
tmp = a / (t_1 / (y + t))
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 = x + (y + t);
double t_2 = z + (a - (y / (t_1 / b)));
double tmp;
if (y <= -1.06e-218) {
tmp = t_2;
} else if (y <= 1.5e-119) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 6.5e-40) {
tmp = a / (t_1 / (y + t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = z + (a - (y / (t_1 / b))) tmp = 0 if y <= -1.06e-218: tmp = t_2 elif y <= 1.5e-119: tmp = ((x * z) + (t * a)) / (x + t) elif y <= 6.5e-40: tmp = a / (t_1 / (y + t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(z + Float64(a - Float64(y / Float64(t_1 / b)))) tmp = 0.0 if (y <= -1.06e-218) tmp = t_2; elseif (y <= 1.5e-119) tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t)); elseif (y <= 6.5e-40) tmp = Float64(a / Float64(t_1 / Float64(y + t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = z + (a - (y / (t_1 / b))); tmp = 0.0; if (y <= -1.06e-218) tmp = t_2; elseif (y <= 1.5e-119) tmp = ((x * z) + (t * a)) / (x + t); elseif (y <= 6.5e-40) tmp = a / (t_1 / (y + t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(a - N[(y / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e-218], t$95$2, If[LessEqual[y, 1.5e-119], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-40], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := z + \left(a - \frac{y}{\frac{t_1}{b}}\right)\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{-218}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-119}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.0600000000000001e-218 or 6.4999999999999999e-40 < y Initial program 57.1%
Taylor expanded in a around 0 67.2%
associate--l+67.2%
associate-/l*78.4%
associate-+r+78.4%
associate-+r+78.4%
associate-+r+78.4%
associate-/l*94.0%
associate-+r+94.0%
+-commutative94.0%
+-commutative94.0%
Simplified94.0%
Taylor expanded in y around inf 89.6%
Taylor expanded in y around inf 79.4%
if -1.0600000000000001e-218 < y < 1.5000000000000001e-119Initial program 76.1%
Taylor expanded in y around 0 63.6%
if 1.5000000000000001e-119 < y < 6.4999999999999999e-40Initial program 80.2%
Taylor expanded in a around inf 72.4%
associate-/l*85.7%
associate-+r+85.7%
Simplified85.7%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -1.5e-240)
t_1
(if (<= y 2.2e-126)
(/ (* x z) (+ y (+ x t)))
(if (<= y 1.4e-19) (/ a (/ (+ x (+ y t)) (+ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.5e-240) {
tmp = t_1;
} else if (y <= 2.2e-126) {
tmp = (x * z) / (y + (x + t));
} else if (y <= 1.4e-19) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-1.5d-240)) then
tmp = t_1
else if (y <= 2.2d-126) then
tmp = (x * z) / (y + (x + t))
else if (y <= 1.4d-19) then
tmp = a / ((x + (y + t)) / (y + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.5e-240) {
tmp = t_1;
} else if (y <= 2.2e-126) {
tmp = (x * z) / (y + (x + t));
} else if (y <= 1.4e-19) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -1.5e-240: tmp = t_1 elif y <= 2.2e-126: tmp = (x * z) / (y + (x + t)) elif y <= 1.4e-19: tmp = a / ((x + (y + t)) / (y + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.5e-240) tmp = t_1; elseif (y <= 2.2e-126) tmp = Float64(Float64(x * z) / Float64(y + Float64(x + t))); elseif (y <= 1.4e-19) tmp = Float64(a / Float64(Float64(x + Float64(y + t)) / Float64(y + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -1.5e-240) tmp = t_1; elseif (y <= 2.2e-126) tmp = (x * z) / (y + (x + t)); elseif (y <= 1.4e-19) tmp = a / ((x + (y + t)) / (y + t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.5e-240], t$95$1, If[LessEqual[y, 2.2e-126], N[(N[(x * z), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e-19], N[(a / N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{-240}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-126}:\\
\;\;\;\;\frac{x \cdot z}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-19}:\\
\;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.49999999999999995e-240 or 1.40000000000000001e-19 < y Initial program 56.5%
Taylor expanded in y around inf 67.3%
if -1.49999999999999995e-240 < y < 2.20000000000000014e-126Initial program 77.5%
Taylor expanded in x around inf 52.6%
Taylor expanded in z around inf 43.6%
if 2.20000000000000014e-126 < y < 1.40000000000000001e-19Initial program 82.0%
Taylor expanded in a around inf 54.6%
associate-/l*68.0%
associate-+r+68.0%
Simplified68.0%
Final simplification62.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -1.3e-242)
t_1
(if (<= y 3.1e-124)
(/ (* z (+ x y)) (+ y (+ x t)))
(if (<= y 5.4e-20) (/ a (/ (+ x (+ y t)) (+ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.3e-242) {
tmp = t_1;
} else if (y <= 3.1e-124) {
tmp = (z * (x + y)) / (y + (x + t));
} else if (y <= 5.4e-20) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-1.3d-242)) then
tmp = t_1
else if (y <= 3.1d-124) then
tmp = (z * (x + y)) / (y + (x + t))
else if (y <= 5.4d-20) then
tmp = a / ((x + (y + t)) / (y + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.3e-242) {
tmp = t_1;
} else if (y <= 3.1e-124) {
tmp = (z * (x + y)) / (y + (x + t));
} else if (y <= 5.4e-20) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -1.3e-242: tmp = t_1 elif y <= 3.1e-124: tmp = (z * (x + y)) / (y + (x + t)) elif y <= 5.4e-20: tmp = a / ((x + (y + t)) / (y + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.3e-242) tmp = t_1; elseif (y <= 3.1e-124) tmp = Float64(Float64(z * Float64(x + y)) / Float64(y + Float64(x + t))); elseif (y <= 5.4e-20) tmp = Float64(a / Float64(Float64(x + Float64(y + t)) / Float64(y + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -1.3e-242) tmp = t_1; elseif (y <= 3.1e-124) tmp = (z * (x + y)) / (y + (x + t)); elseif (y <= 5.4e-20) tmp = a / ((x + (y + t)) / (y + t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.3e-242], t$95$1, If[LessEqual[y, 3.1e-124], N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-20], N[(a / N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-124}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right)}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.30000000000000009e-242 or 5.3999999999999999e-20 < y Initial program 56.5%
Taylor expanded in y around inf 67.3%
if -1.30000000000000009e-242 < y < 3.0999999999999998e-124Initial program 77.5%
Taylor expanded in z around inf 45.4%
if 3.0999999999999998e-124 < y < 5.3999999999999999e-20Initial program 82.0%
Taylor expanded in a around inf 54.6%
associate-/l*68.0%
associate-+r+68.0%
Simplified68.0%
Final simplification63.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t))) (t_2 (- (+ z a) b)))
(if (<= y -1.05e-227)
t_2
(if (<= y 1.95e-126)
(/ (+ x y) (/ t_1 z))
(if (<= y 5.9e-18) (/ a (/ t_1 (+ y t))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = (z + a) - b;
double tmp;
if (y <= -1.05e-227) {
tmp = t_2;
} else if (y <= 1.95e-126) {
tmp = (x + y) / (t_1 / z);
} else if (y <= 5.9e-18) {
tmp = a / (t_1 / (y + t));
} 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 = x + (y + t)
t_2 = (z + a) - b
if (y <= (-1.05d-227)) then
tmp = t_2
else if (y <= 1.95d-126) then
tmp = (x + y) / (t_1 / z)
else if (y <= 5.9d-18) then
tmp = a / (t_1 / (y + t))
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 = x + (y + t);
double t_2 = (z + a) - b;
double tmp;
if (y <= -1.05e-227) {
tmp = t_2;
} else if (y <= 1.95e-126) {
tmp = (x + y) / (t_1 / z);
} else if (y <= 5.9e-18) {
tmp = a / (t_1 / (y + t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = (z + a) - b tmp = 0 if y <= -1.05e-227: tmp = t_2 elif y <= 1.95e-126: tmp = (x + y) / (t_1 / z) elif y <= 5.9e-18: tmp = a / (t_1 / (y + t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.05e-227) tmp = t_2; elseif (y <= 1.95e-126) tmp = Float64(Float64(x + y) / Float64(t_1 / z)); elseif (y <= 5.9e-18) tmp = Float64(a / Float64(t_1 / Float64(y + t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = (z + a) - b; tmp = 0.0; if (y <= -1.05e-227) tmp = t_2; elseif (y <= 1.95e-126) tmp = (x + y) / (t_1 / z); elseif (y <= 5.9e-18) tmp = a / (t_1 / (y + t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.05e-227], t$95$2, If[LessEqual[y, 1.95e-126], N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e-18], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{-227}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-126}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.05e-227 or 5.90000000000000019e-18 < y Initial program 56.9%
Taylor expanded in y around inf 67.9%
if -1.05e-227 < y < 1.9499999999999999e-126Initial program 75.2%
Taylor expanded in z around inf 44.4%
associate-/l*53.2%
associate-+r+53.2%
Simplified53.2%
if 1.9499999999999999e-126 < y < 5.90000000000000019e-18Initial program 82.0%
Taylor expanded in a around inf 54.6%
associate-/l*68.0%
associate-+r+68.0%
Simplified68.0%
Final simplification64.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.45e-113)
t_1
(if (<= y 9.8e-105)
(/ (+ (* x z) (* t a)) (+ x t))
(if (<= y 3.3e-18) (/ a (/ (+ x (+ y t)) (+ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.45e-113) {
tmp = t_1;
} else if (y <= 9.8e-105) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 3.3e-18) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2.45d-113)) then
tmp = t_1
else if (y <= 9.8d-105) then
tmp = ((x * z) + (t * a)) / (x + t)
else if (y <= 3.3d-18) then
tmp = a / ((x + (y + t)) / (y + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.45e-113) {
tmp = t_1;
} else if (y <= 9.8e-105) {
tmp = ((x * z) + (t * a)) / (x + t);
} else if (y <= 3.3e-18) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.45e-113: tmp = t_1 elif y <= 9.8e-105: tmp = ((x * z) + (t * a)) / (x + t) elif y <= 3.3e-18: tmp = a / ((x + (y + t)) / (y + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.45e-113) tmp = t_1; elseif (y <= 9.8e-105) tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t)); elseif (y <= 3.3e-18) tmp = Float64(a / Float64(Float64(x + Float64(y + t)) / Float64(y + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.45e-113) tmp = t_1; elseif (y <= 9.8e-105) tmp = ((x * z) + (t * a)) / (x + t); elseif (y <= 3.3e-18) tmp = a / ((x + (y + t)) / (y + t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.45e-113], t$95$1, If[LessEqual[y, 9.8e-105], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-18], N[(a / N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-105}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.4500000000000001e-113 or 3.3000000000000002e-18 < y Initial program 53.2%
Taylor expanded in y around inf 70.2%
if -2.4500000000000001e-113 < y < 9.7999999999999999e-105Initial program 77.8%
Taylor expanded in y around 0 60.2%
if 9.7999999999999999e-105 < y < 3.3000000000000002e-18Initial program 82.4%
Taylor expanded in a around inf 63.9%
associate-/l*75.7%
associate-+r+75.7%
Simplified75.7%
Final simplification67.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2e-38)
t_1
(if (<= y 5.2e-113)
(+ z a)
(if (<= y 4.6e-20) (/ a (/ (+ x t) t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2e-38) {
tmp = t_1;
} else if (y <= 5.2e-113) {
tmp = z + a;
} else if (y <= 4.6e-20) {
tmp = a / ((x + t) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2d-38)) then
tmp = t_1
else if (y <= 5.2d-113) then
tmp = z + a
else if (y <= 4.6d-20) then
tmp = a / ((x + t) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2e-38) {
tmp = t_1;
} else if (y <= 5.2e-113) {
tmp = z + a;
} else if (y <= 4.6e-20) {
tmp = a / ((x + t) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2e-38: tmp = t_1 elif y <= 5.2e-113: tmp = z + a elif y <= 4.6e-20: tmp = a / ((x + t) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2e-38) tmp = t_1; elseif (y <= 5.2e-113) tmp = Float64(z + a); elseif (y <= 4.6e-20) tmp = Float64(a / Float64(Float64(x + t) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2e-38) tmp = t_1; elseif (y <= 5.2e-113) tmp = z + a; elseif (y <= 4.6e-20) tmp = a / ((x + t) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2e-38], t$95$1, If[LessEqual[y, 5.2e-113], N[(z + a), $MachinePrecision], If[LessEqual[y, 4.6e-20], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-113}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.9999999999999999e-38 or 4.5999999999999998e-20 < y Initial program 50.5%
Taylor expanded in y around inf 74.9%
if -1.9999999999999999e-38 < y < 5.1999999999999998e-113Initial program 76.1%
Taylor expanded in y around inf 35.1%
Taylor expanded in b around 0 42.6%
+-commutative42.6%
Simplified42.6%
if 5.1999999999999998e-113 < y < 4.5999999999999998e-20Initial program 84.2%
Taylor expanded in t around inf 51.4%
Taylor expanded in y around 0 39.7%
associate-/l*49.4%
Simplified49.4%
Final simplification60.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -1.45e-245)
t_1
(if (<= y 2.9e-125)
(/ (* x z) (+ x t))
(if (<= y 4.6e-20) (/ a (/ (+ x t) t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.45e-245) {
tmp = t_1;
} else if (y <= 2.9e-125) {
tmp = (x * z) / (x + t);
} else if (y <= 4.6e-20) {
tmp = a / ((x + t) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-1.45d-245)) then
tmp = t_1
else if (y <= 2.9d-125) then
tmp = (x * z) / (x + t)
else if (y <= 4.6d-20) then
tmp = a / ((x + t) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.45e-245) {
tmp = t_1;
} else if (y <= 2.9e-125) {
tmp = (x * z) / (x + t);
} else if (y <= 4.6e-20) {
tmp = a / ((x + t) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -1.45e-245: tmp = t_1 elif y <= 2.9e-125: tmp = (x * z) / (x + t) elif y <= 4.6e-20: tmp = a / ((x + t) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.45e-245) tmp = t_1; elseif (y <= 2.9e-125) tmp = Float64(Float64(x * z) / Float64(x + t)); elseif (y <= 4.6e-20) tmp = Float64(a / Float64(Float64(x + t) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -1.45e-245) tmp = t_1; elseif (y <= 2.9e-125) tmp = (x * z) / (x + t); elseif (y <= 4.6e-20) tmp = a / ((x + t) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.45e-245], t$95$1, If[LessEqual[y, 2.9e-125], N[(N[(x * z), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-20], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-125}:\\
\;\;\;\;\frac{x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.45e-245 or 4.5999999999999998e-20 < y Initial program 56.5%
Taylor expanded in y around inf 67.3%
if -1.45e-245 < y < 2.9000000000000002e-125Initial program 77.5%
Taylor expanded in z around inf 45.4%
associate-/l*52.8%
associate-+r+52.8%
Simplified52.8%
Taylor expanded in y around 0 43.6%
+-commutative43.6%
Simplified43.6%
if 2.9000000000000002e-125 < y < 4.5999999999999998e-20Initial program 82.0%
Taylor expanded in t around inf 49.4%
Taylor expanded in y around 0 34.7%
associate-/l*47.4%
Simplified47.4%
Final simplification60.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.1e-240)
t_1
(if (<= y 1.15e-125)
(/ (* x z) (+ y (+ x t)))
(if (<= y 9e-20) (/ a (/ (+ x t) t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.1e-240) {
tmp = t_1;
} else if (y <= 1.15e-125) {
tmp = (x * z) / (y + (x + t));
} else if (y <= 9e-20) {
tmp = a / ((x + t) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2.1d-240)) then
tmp = t_1
else if (y <= 1.15d-125) then
tmp = (x * z) / (y + (x + t))
else if (y <= 9d-20) then
tmp = a / ((x + t) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.1e-240) {
tmp = t_1;
} else if (y <= 1.15e-125) {
tmp = (x * z) / (y + (x + t));
} else if (y <= 9e-20) {
tmp = a / ((x + t) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.1e-240: tmp = t_1 elif y <= 1.15e-125: tmp = (x * z) / (y + (x + t)) elif y <= 9e-20: tmp = a / ((x + t) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.1e-240) tmp = t_1; elseif (y <= 1.15e-125) tmp = Float64(Float64(x * z) / Float64(y + Float64(x + t))); elseif (y <= 9e-20) tmp = Float64(a / Float64(Float64(x + t) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.1e-240) tmp = t_1; elseif (y <= 1.15e-125) tmp = (x * z) / (y + (x + t)); elseif (y <= 9e-20) tmp = a / ((x + t) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.1e-240], t$95$1, If[LessEqual[y, 1.15e-125], N[(N[(x * z), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-20], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{-240}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-125}:\\
\;\;\;\;\frac{x \cdot z}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-20}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.09999999999999994e-240 or 9.0000000000000003e-20 < y Initial program 56.5%
Taylor expanded in y around inf 67.3%
if -2.09999999999999994e-240 < y < 1.15e-125Initial program 77.5%
Taylor expanded in x around inf 52.6%
Taylor expanded in z around inf 43.6%
if 1.15e-125 < y < 9.0000000000000003e-20Initial program 82.0%
Taylor expanded in t around inf 49.4%
Taylor expanded in y around 0 34.7%
associate-/l*47.4%
Simplified47.4%
Final simplification60.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -5e-40)
t_1
(if (<= y 1.7e-113) (+ z a) (if (<= y 1.6e-60) a 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 <= -5e-40) {
tmp = t_1;
} else if (y <= 1.7e-113) {
tmp = z + a;
} else if (y <= 1.6e-60) {
tmp = a;
} 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 <= (-5d-40)) then
tmp = t_1
else if (y <= 1.7d-113) then
tmp = z + a
else if (y <= 1.6d-60) then
tmp = a
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 <= -5e-40) {
tmp = t_1;
} else if (y <= 1.7e-113) {
tmp = z + a;
} else if (y <= 1.6e-60) {
tmp = a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -5e-40: tmp = t_1 elif y <= 1.7e-113: tmp = z + a elif y <= 1.6e-60: tmp = a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -5e-40) tmp = t_1; elseif (y <= 1.7e-113) tmp = Float64(z + a); elseif (y <= 1.6e-60) tmp = a; 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 <= -5e-40) tmp = t_1; elseif (y <= 1.7e-113) tmp = z + a; elseif (y <= 1.6e-60) tmp = a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5e-40], t$95$1, If[LessEqual[y, 1.7e-113], N[(z + a), $MachinePrecision], If[LessEqual[y, 1.6e-60], a, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -5 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-113}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-60}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.99999999999999965e-40 or 1.6000000000000001e-60 < y Initial program 52.1%
Taylor expanded in y around inf 71.2%
if -4.99999999999999965e-40 < y < 1.7000000000000001e-113Initial program 76.1%
Taylor expanded in y around inf 35.1%
Taylor expanded in b around 0 42.6%
+-commutative42.6%
Simplified42.6%
if 1.7000000000000001e-113 < y < 1.6000000000000001e-60Initial program 89.9%
Taylor expanded in t around inf 80.9%
Final simplification60.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.5e+25) (not (<= a 3.1e-24))) (+ z a) (- z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.5e+25) || !(a <= 3.1e-24)) {
tmp = z + a;
} else {
tmp = z - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.5d+25)) .or. (.not. (a <= 3.1d-24))) then
tmp = z + a
else
tmp = z - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.5e+25) || !(a <= 3.1e-24)) {
tmp = z + a;
} else {
tmp = z - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.5e+25) or not (a <= 3.1e-24): tmp = z + a else: tmp = z - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.5e+25) || !(a <= 3.1e-24)) tmp = Float64(z + a); else tmp = Float64(z - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.5e+25) || ~((a <= 3.1e-24))) tmp = z + a; else tmp = z - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.5e+25], N[Not[LessEqual[a, 3.1e-24]], $MachinePrecision]], N[(z + a), $MachinePrecision], N[(z - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+25} \lor \neg \left(a \leq 3.1 \cdot 10^{-24}\right):\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;z - b\\
\end{array}
\end{array}
if a < -1.50000000000000003e25 or 3.1e-24 < a Initial program 53.6%
Taylor expanded in y around inf 59.5%
Taylor expanded in b around 0 60.0%
+-commutative60.0%
Simplified60.0%
if -1.50000000000000003e25 < a < 3.1e-24Initial program 71.2%
Taylor expanded in y around inf 52.3%
Taylor expanded in a around 0 50.3%
Final simplification54.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -5.8e-100) (+ z a) (if (<= z 2.9e-166) (- a b) (+ z a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.8e-100) {
tmp = z + a;
} else if (z <= 2.9e-166) {
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 (z <= (-5.8d-100)) then
tmp = z + a
else if (z <= 2.9d-166) 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 (z <= -5.8e-100) {
tmp = z + a;
} else if (z <= 2.9e-166) {
tmp = a - b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.8e-100: tmp = z + a elif z <= 2.9e-166: tmp = a - b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.8e-100) tmp = Float64(z + a); elseif (z <= 2.9e-166) 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 (z <= -5.8e-100) tmp = z + a; elseif (z <= 2.9e-166) tmp = a - b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.8e-100], N[(z + a), $MachinePrecision], If[LessEqual[z, 2.9e-166], N[(a - b), $MachinePrecision], N[(z + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-100}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-166}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if z < -5.79999999999999951e-100 or 2.9e-166 < z Initial program 56.4%
Taylor expanded in y around inf 59.1%
Taylor expanded in b around 0 54.8%
+-commutative54.8%
Simplified54.8%
if -5.79999999999999951e-100 < z < 2.9e-166Initial program 78.3%
Taylor expanded in y around inf 47.7%
Taylor expanded in z around 0 50.2%
Final simplification53.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -108000000.0) z (if (<= z 1.22e-26) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -108000000.0) {
tmp = z;
} else if (z <= 1.22e-26) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-108000000.0d0)) then
tmp = z
else if (z <= 1.22d-26) then
tmp = a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -108000000.0) {
tmp = z;
} else if (z <= 1.22e-26) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -108000000.0: tmp = z elif z <= 1.22e-26: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -108000000.0) tmp = z; elseif (z <= 1.22e-26) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -108000000.0) tmp = z; elseif (z <= 1.22e-26) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -108000000.0], z, If[LessEqual[z, 1.22e-26], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -108000000:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-26}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.08e8 or 1.22e-26 < z Initial program 49.1%
Taylor expanded in x around inf 50.4%
if -1.08e8 < z < 1.22e-26Initial program 77.1%
Taylor expanded in t around inf 42.0%
Final simplification46.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.3e+216) (+ z a) (- b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.3e+216) {
tmp = z + a;
} else {
tmp = -b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.3d+216) then
tmp = z + a
else
tmp = -b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.3e+216) {
tmp = z + a;
} else {
tmp = -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.3e+216: tmp = z + a else: tmp = -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.3e+216) tmp = Float64(z + a); else tmp = Float64(-b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.3e+216) tmp = z + a; else tmp = -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.3e+216], N[(z + a), $MachinePrecision], (-b)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.3 \cdot 10^{+216}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;-b\\
\end{array}
\end{array}
if b < 2.29999999999999996e216Initial program 63.7%
Taylor expanded in y around inf 55.4%
Taylor expanded in b around 0 51.2%
+-commutative51.2%
Simplified51.2%
if 2.29999999999999996e216 < b Initial program 50.3%
Taylor expanded in y around inf 61.0%
Taylor expanded in b around inf 48.7%
neg-mul-148.7%
Simplified48.7%
Final simplification51.0%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 62.9%
Taylor expanded in t around inf 27.5%
Final simplification27.5%
(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 2023268
(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)))