
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ (+ x y) t))
(t_3 (* a (+ (/ t t_2) (/ y t_2))))
(t_4 (* (+ x y) z))
(t_5 (/ (- (+ t_4 (* (+ y t) a)) (* y b)) t_1))
(t_6 (+ t_3 (* (+ x y) (/ z t_1)))))
(if (<= t_5 (- INFINITY))
(- t_6 (/ y (/ t_1 b)))
(if (<= t_5 1e+307)
(- (+ t_3 (/ t_4 t_2)) (/ (* y b) t_2))
(- t_6 (* b (/ y t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (x + y) + t;
double t_3 = a * ((t / t_2) + (y / t_2));
double t_4 = (x + y) * z;
double t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_1;
double t_6 = t_3 + ((x + y) * (z / t_1));
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6 - (y / (t_1 / b));
} else if (t_5 <= 1e+307) {
tmp = (t_3 + (t_4 / t_2)) - ((y * b) / t_2);
} else {
tmp = t_6 - (b * (y / t_1));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (x + y) + t;
double t_3 = a * ((t / t_2) + (y / t_2));
double t_4 = (x + y) * z;
double t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_1;
double t_6 = t_3 + ((x + y) * (z / t_1));
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6 - (y / (t_1 / b));
} else if (t_5 <= 1e+307) {
tmp = (t_3 + (t_4 / t_2)) - ((y * b) / t_2);
} else {
tmp = t_6 - (b * (y / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (x + y) + t t_3 = a * ((t / t_2) + (y / t_2)) t_4 = (x + y) * z t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_1 t_6 = t_3 + ((x + y) * (z / t_1)) tmp = 0 if t_5 <= -math.inf: tmp = t_6 - (y / (t_1 / b)) elif t_5 <= 1e+307: tmp = (t_3 + (t_4 / t_2)) - ((y * b) / t_2) else: tmp = t_6 - (b * (y / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(x + y) + t) t_3 = Float64(a * Float64(Float64(t / t_2) + Float64(y / t_2))) t_4 = Float64(Float64(x + y) * z) t_5 = Float64(Float64(Float64(t_4 + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) t_6 = Float64(t_3 + Float64(Float64(x + y) * Float64(z / t_1))) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = Float64(t_6 - Float64(y / Float64(t_1 / b))); elseif (t_5 <= 1e+307) tmp = Float64(Float64(t_3 + Float64(t_4 / t_2)) - Float64(Float64(y * b) / t_2)); else tmp = Float64(t_6 - Float64(b * Float64(y / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (x + y) + t; t_3 = a * ((t / t_2) + (y / t_2)); t_4 = (x + y) * z; t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_1; t_6 = t_3 + ((x + y) * (z / t_1)); tmp = 0.0; if (t_5 <= -Inf) tmp = t_6 - (y / (t_1 / b)); elseif (t_5 <= 1e+307) tmp = (t_3 + (t_4 / t_2)) - ((y * b) / t_2); else tmp = t_6 - (b * (y / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(t$95$6 - N[(y / N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 1e+307], N[(N[(t$95$3 + N[(t$95$4 / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$6 - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(x + y\right) + t\\
t_3 := a \cdot \left(\frac{t}{t_2} + \frac{y}{t_2}\right)\\
t_4 := \left(x + y\right) \cdot z\\
t_5 := \frac{\left(t_4 + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
t_6 := t_3 + \left(x + y\right) \cdot \frac{z}{t_1}\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_6 - \frac{y}{\frac{t_1}{b}}\\
\mathbf{elif}\;t_5 \leq 10^{+307}:\\
\;\;\;\;\left(t_3 + \frac{t_4}{t_2}\right) - \frac{y \cdot b}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_6 - b \cdot \frac{y}{t_1}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 5.5%
Taylor expanded in a around 0 45.2%
*-un-lft-identity45.2%
times-frac58.5%
associate-+r+58.5%
+-commutative58.5%
+-commutative58.5%
Applied egg-rr58.5%
*-commutative58.5%
*-un-lft-identity58.5%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in b around 0 82.9%
*-commutative82.9%
+-commutative82.9%
+-commutative82.9%
associate-+r+82.9%
associate-/l*99.9%
+-commutative99.9%
Simplified99.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)) < 9.99999999999999986e306Initial program 99.0%
Taylor expanded in a around 0 99.0%
if 9.99999999999999986e306 < (/.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 38.9%
*-un-lft-identity38.9%
times-frac57.0%
associate-+r+57.0%
+-commutative57.0%
+-commutative57.0%
Applied egg-rr57.0%
*-commutative57.0%
*-un-lft-identity57.0%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Final simplification99.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (* (+ x y) z))
(t_3 (/ (- (+ t_2 (* (+ y t) a)) (* y b)) t_1))
(t_4 (+ (+ x y) t)))
(if (or (<= t_3 (- INFINITY)) (not (<= t_3 1e+307)))
(- (+ a (* (+ x y) (/ z t_1))) (* b (/ y t_1)))
(- (+ (* a (+ (/ t t_4) (/ y t_4))) (/ t_2 t_4)) (/ (* y b) t_4)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (x + y) * z;
double t_3 = ((t_2 + ((y + t) * a)) - (y * b)) / t_1;
double t_4 = (x + y) + t;
double tmp;
if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 1e+307)) {
tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1));
} else {
tmp = ((a * ((t / t_4) + (y / t_4))) + (t_2 / t_4)) - ((y * b) / t_4);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (x + y) * z;
double t_3 = ((t_2 + ((y + t) * a)) - (y * b)) / t_1;
double t_4 = (x + y) + t;
double tmp;
if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 1e+307)) {
tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1));
} else {
tmp = ((a * ((t / t_4) + (y / t_4))) + (t_2 / t_4)) - ((y * b) / t_4);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (x + y) * z t_3 = ((t_2 + ((y + t) * a)) - (y * b)) / t_1 t_4 = (x + y) + t tmp = 0 if (t_3 <= -math.inf) or not (t_3 <= 1e+307): tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1)) else: tmp = ((a * ((t / t_4) + (y / t_4))) + (t_2 / t_4)) - ((y * b) / t_4) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(x + y) * z) t_3 = Float64(Float64(Float64(t_2 + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) t_4 = Float64(Float64(x + y) + t) tmp = 0.0 if ((t_3 <= Float64(-Inf)) || !(t_3 <= 1e+307)) tmp = Float64(Float64(a + Float64(Float64(x + y) * Float64(z / t_1))) - Float64(b * Float64(y / t_1))); else tmp = Float64(Float64(Float64(a * Float64(Float64(t / t_4) + Float64(y / t_4))) + Float64(t_2 / t_4)) - Float64(Float64(y * b) / t_4)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (x + y) * z; t_3 = ((t_2 + ((y + t) * a)) - (y * b)) / t_1; t_4 = (x + y) + t; tmp = 0.0; if ((t_3 <= -Inf) || ~((t_3 <= 1e+307))) tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1)); else tmp = ((a * ((t / t_4) + (y / t_4))) + (t_2 / t_4)) - ((y * b) / t_4); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 1e+307]], $MachinePrecision]], N[(N[(a + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(N[(t / t$95$4), $MachinePrecision] + N[(y / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 / t$95$4), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(x + y\right) \cdot z\\
t_3 := \frac{\left(t_2 + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
t_4 := \left(x + y\right) + t\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+307}\right):\\
\;\;\;\;\left(a + \left(x + y\right) \cdot \frac{z}{t_1}\right) - b \cdot \frac{y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(\frac{t}{t_4} + \frac{y}{t_4}\right) + \frac{t_2}{t_4}\right) - \frac{y \cdot b}{t_4}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.2%
Taylor expanded in a around 0 42.0%
*-un-lft-identity42.0%
times-frac57.7%
associate-+r+57.7%
+-commutative57.7%
+-commutative57.7%
Applied egg-rr57.7%
*-commutative57.7%
*-un-lft-identity57.7%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 92.0%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999986e306Initial program 99.0%
Taylor expanded in a around 0 99.0%
Final simplification96.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x y) t))
(t_2 (* a (+ (/ t t_1) (/ y t_1))))
(t_3 (+ y (+ x t)))
(t_4 (* (+ x y) z))
(t_5 (/ (- (+ t_4 (* (+ y t) a)) (* y b)) t_3)))
(if (or (<= t_5 (- INFINITY)) (not (<= t_5 1e+307)))
(- (+ t_2 (* (+ x y) (/ z t_3))) (/ y (/ t_3 b)))
(- (+ t_2 (/ t_4 t_1)) (/ (* y b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + t;
double t_2 = a * ((t / t_1) + (y / t_1));
double t_3 = y + (x + t);
double t_4 = (x + y) * z;
double t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_3;
double tmp;
if ((t_5 <= -((double) INFINITY)) || !(t_5 <= 1e+307)) {
tmp = (t_2 + ((x + y) * (z / t_3))) - (y / (t_3 / b));
} else {
tmp = (t_2 + (t_4 / t_1)) - ((y * b) / t_1);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + t;
double t_2 = a * ((t / t_1) + (y / t_1));
double t_3 = y + (x + t);
double t_4 = (x + y) * z;
double t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_3;
double tmp;
if ((t_5 <= -Double.POSITIVE_INFINITY) || !(t_5 <= 1e+307)) {
tmp = (t_2 + ((x + y) * (z / t_3))) - (y / (t_3 / b));
} else {
tmp = (t_2 + (t_4 / t_1)) - ((y * b) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + y) + t t_2 = a * ((t / t_1) + (y / t_1)) t_3 = y + (x + t) t_4 = (x + y) * z t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_3 tmp = 0 if (t_5 <= -math.inf) or not (t_5 <= 1e+307): tmp = (t_2 + ((x + y) * (z / t_3))) - (y / (t_3 / b)) else: tmp = (t_2 + (t_4 / t_1)) - ((y * b) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + t) t_2 = Float64(a * Float64(Float64(t / t_1) + Float64(y / t_1))) t_3 = Float64(y + Float64(x + t)) t_4 = Float64(Float64(x + y) * z) t_5 = Float64(Float64(Float64(t_4 + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_3) tmp = 0.0 if ((t_5 <= Float64(-Inf)) || !(t_5 <= 1e+307)) tmp = Float64(Float64(t_2 + Float64(Float64(x + y) * Float64(z / t_3))) - Float64(y / Float64(t_3 / b))); else tmp = Float64(Float64(t_2 + Float64(t_4 / t_1)) - Float64(Float64(y * b) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + y) + t; t_2 = a * ((t / t_1) + (y / t_1)); t_3 = y + (x + t); t_4 = (x + y) * z; t_5 = ((t_4 + ((y + t) * a)) - (y * b)) / t_3; tmp = 0.0; if ((t_5 <= -Inf) || ~((t_5 <= 1e+307))) tmp = (t_2 + ((x + y) * (z / t_3))) - (y / (t_3 / b)); else tmp = (t_2 + (t_4 / t_1)) - ((y * b) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[Or[LessEqual[t$95$5, (-Infinity)], N[Not[LessEqual[t$95$5, 1e+307]], $MachinePrecision]], N[(N[(t$95$2 + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$3 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + t\\
t_2 := a \cdot \left(\frac{t}{t_1} + \frac{y}{t_1}\right)\\
t_3 := y + \left(x + t\right)\\
t_4 := \left(x + y\right) \cdot z\\
t_5 := \frac{\left(t_4 + \left(y + t\right) \cdot a\right) - y \cdot b}{t_3}\\
\mathbf{if}\;t_5 \leq -\infty \lor \neg \left(t_5 \leq 10^{+307}\right):\\
\;\;\;\;\left(t_2 + \left(x + y\right) \cdot \frac{z}{t_3}\right) - \frac{y}{\frac{t_3}{b}}\\
\mathbf{else}:\\
\;\;\;\;\left(t_2 + \frac{t_4}{t_1}\right) - \frac{y \cdot b}{t_1}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.2%
Taylor expanded in a around 0 42.0%
*-un-lft-identity42.0%
times-frac57.7%
associate-+r+57.7%
+-commutative57.7%
+-commutative57.7%
Applied egg-rr57.7%
*-commutative57.7%
*-un-lft-identity57.7%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in b around 0 76.9%
*-commutative76.9%
+-commutative76.9%
+-commutative76.9%
associate-+r+76.9%
associate-/l*99.9%
+-commutative99.9%
Simplified99.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)) < 9.99999999999999986e306Initial program 99.0%
Taylor expanded in a around 0 99.0%
Final simplification99.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* (+ y t) a)) (* y b)) t_1)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+307)))
(+ (* a (/ (+ y t) t_1)) (* (+ x y) (/ z t_1)))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+307)) {
tmp = (a * ((y + t) / t_1)) + ((x + y) * (z / t_1));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+307)) {
tmp = (a * ((y + t) / t_1)) + ((x + y) * (z / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+307): tmp = (a * ((y + t) / t_1)) + ((x + y) * (z / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+307)) tmp = Float64(Float64(a * Float64(Float64(y + t) / t_1)) + Float64(Float64(x + y) * Float64(z / t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+307))) tmp = (a * ((y + t) / t_1)) + ((x + y) * (z / t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+307]], $MachinePrecision]], N[(N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 10^{+307}\right):\\
\;\;\;\;a \cdot \frac{y + t}{t_1} + \left(x + y\right) \cdot \frac{z}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.2%
Taylor expanded in b around 0 5.0%
Taylor expanded in a around inf 5.0%
associate-/l*44.8%
associate-+r+44.8%
+-commutative44.8%
+-commutative44.8%
*-commutative44.8%
+-commutative44.8%
+-commutative44.8%
associate-+r+44.8%
associate-*r/81.3%
+-commutative81.3%
+-commutative81.3%
Simplified81.3%
div-inv81.3%
clear-num81.3%
+-commutative81.3%
Applied egg-rr81.3%
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.99999999999999986e306Initial program 99.0%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* (+ y t) a)) (* y b)) t_1)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+307)))
(- (+ a (* (+ x y) (/ z t_1))) (* b (/ y t_1)))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+307)) {
tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+307)) {
tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+307): tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+307)) tmp = Float64(Float64(a + Float64(Float64(x + y) * Float64(z / t_1))) - Float64(b * Float64(y / t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+307))) tmp = (a + ((x + y) * (z / t_1))) - (b * (y / t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+307]], $MachinePrecision]], N[(N[(a + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 10^{+307}\right):\\
\;\;\;\;\left(a + \left(x + y\right) \cdot \frac{z}{t_1}\right) - b \cdot \frac{y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.2%
Taylor expanded in a around 0 42.0%
*-un-lft-identity42.0%
times-frac57.7%
associate-+r+57.7%
+-commutative57.7%
+-commutative57.7%
Applied egg-rr57.7%
*-commutative57.7%
*-un-lft-identity57.7%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 92.0%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999986e306Initial program 99.0%
Final simplification96.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* (+ y t) a)) (* y b)) t_1)))
(if (<= t_2 (- INFINITY))
(+ a (* (+ x y) (/ z t_1)))
(if (<= t_2 2e+256) t_2 (- (+ z a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = a + ((x + y) * (z / t_1));
} else if (t_2 <= 2e+256) {
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 + (x + t);
double t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = a + ((x + y) * (z / t_1));
} else if (t_2 <= 2e+256) {
tmp = t_2;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = a + ((x + y) * (z / t_1)) elif t_2 <= 2e+256: tmp = t_2 else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(a + Float64(Float64(x + y) * Float64(z / t_1))); elseif (t_2 <= 2e+256) 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 + (x + t); t_2 = ((((x + y) * z) + ((y + t) * a)) - (y * b)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = a + ((x + y) * (z / t_1)); elseif (t_2 <= 2e+256) 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[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(a + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+256], t$95$2, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;a + \left(x + y\right) \cdot \frac{z}{t_1}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+256}:\\
\;\;\;\;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.5%
Taylor expanded in b around 0 5.3%
Taylor expanded in a around inf 5.3%
associate-/l*48.8%
associate-+r+48.8%
+-commutative48.8%
+-commutative48.8%
*-commutative48.8%
+-commutative48.8%
+-commutative48.8%
associate-+r+48.8%
associate-*r/86.4%
+-commutative86.4%
+-commutative86.4%
Simplified86.4%
Taylor expanded in y around inf 80.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)) < 2.0000000000000001e256Initial program 99.0%
if 2.0000000000000001e256 < (/.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 y around inf 70.0%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ (* (+ x y) (/ z t_1)) (/ a (+ 1.0 (/ x t))))))
(if (<= z -5200000000.0)
t_2
(if (<= z -3.5e-195)
(+ z (/ a (/ t_1 (+ y t))))
(if (<= z -2.1e-246)
(- (+ z a) b)
(if (<= z 6.4e+33) (+ z (* a (/ (+ y t) t_1))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((x + y) * (z / t_1)) + (a / (1.0 + (x / t)));
double tmp;
if (z <= -5200000000.0) {
tmp = t_2;
} else if (z <= -3.5e-195) {
tmp = z + (a / (t_1 / (y + t)));
} else if (z <= -2.1e-246) {
tmp = (z + a) - b;
} else if (z <= 6.4e+33) {
tmp = z + (a * ((y + t) / t_1));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = ((x + y) * (z / t_1)) + (a / (1.0d0 + (x / t)))
if (z <= (-5200000000.0d0)) then
tmp = t_2
else if (z <= (-3.5d-195)) then
tmp = z + (a / (t_1 / (y + t)))
else if (z <= (-2.1d-246)) then
tmp = (z + a) - b
else if (z <= 6.4d+33) then
tmp = z + (a * ((y + t) / t_1))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((x + y) * (z / t_1)) + (a / (1.0 + (x / t)));
double tmp;
if (z <= -5200000000.0) {
tmp = t_2;
} else if (z <= -3.5e-195) {
tmp = z + (a / (t_1 / (y + t)));
} else if (z <= -2.1e-246) {
tmp = (z + a) - b;
} else if (z <= 6.4e+33) {
tmp = z + (a * ((y + t) / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((x + y) * (z / t_1)) + (a / (1.0 + (x / t))) tmp = 0 if z <= -5200000000.0: tmp = t_2 elif z <= -3.5e-195: tmp = z + (a / (t_1 / (y + t))) elif z <= -2.1e-246: tmp = (z + a) - b elif z <= 6.4e+33: tmp = z + (a * ((y + t) / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(x + y) * Float64(z / t_1)) + Float64(a / Float64(1.0 + Float64(x / t)))) tmp = 0.0 if (z <= -5200000000.0) tmp = t_2; elseif (z <= -3.5e-195) tmp = Float64(z + Float64(a / Float64(t_1 / Float64(y + t)))); elseif (z <= -2.1e-246) tmp = Float64(Float64(z + a) - b); elseif (z <= 6.4e+33) tmp = Float64(z + Float64(a * Float64(Float64(y + t) / t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((x + y) * (z / t_1)) + (a / (1.0 + (x / t))); tmp = 0.0; if (z <= -5200000000.0) tmp = t_2; elseif (z <= -3.5e-195) tmp = z + (a / (t_1 / (y + t))); elseif (z <= -2.1e-246) tmp = (z + a) - b; elseif (z <= 6.4e+33) tmp = z + (a * ((y + t) / t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(a / N[(1.0 + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5200000000.0], t$95$2, If[LessEqual[z, -3.5e-195], N[(z + N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-246], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, 6.4e+33], N[(z + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(x + y\right) \cdot \frac{z}{t_1} + \frac{a}{1 + \frac{x}{t}}\\
\mathbf{if}\;z \leq -5200000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-195}:\\
\;\;\;\;z + \frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-246}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+33}:\\
\;\;\;\;z + a \cdot \frac{y + t}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.2e9 or 6.40000000000000034e33 < z Initial program 49.8%
Taylor expanded in b around 0 38.6%
Taylor expanded in a around inf 38.6%
associate-/l*50.5%
associate-+r+50.5%
+-commutative50.5%
+-commutative50.5%
*-commutative50.5%
+-commutative50.5%
+-commutative50.5%
associate-+r+50.5%
associate-*r/82.6%
+-commutative82.6%
+-commutative82.6%
Simplified82.6%
Taylor expanded in t around inf 80.1%
if -5.2e9 < z < -3.50000000000000014e-195Initial program 76.7%
Taylor expanded in b around 0 57.6%
Taylor expanded in a around inf 57.6%
associate-/l*69.0%
associate-+r+69.0%
+-commutative69.0%
+-commutative69.0%
*-commutative69.0%
+-commutative69.0%
+-commutative69.0%
associate-+r+69.0%
associate-*r/55.1%
+-commutative55.1%
+-commutative55.1%
Simplified55.1%
Taylor expanded in y around inf 66.8%
if -3.50000000000000014e-195 < z < -2.09999999999999995e-246Initial program 41.7%
Taylor expanded in y around inf 78.6%
if -2.09999999999999995e-246 < z < 6.40000000000000034e33Initial program 73.1%
Taylor expanded in b around 0 58.3%
Taylor expanded in a around inf 58.3%
associate-/l*77.2%
associate-+r+77.2%
+-commutative77.2%
+-commutative77.2%
*-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-+r+77.2%
associate-*r/73.9%
+-commutative73.9%
+-commutative73.9%
Simplified73.9%
div-inv73.9%
clear-num74.0%
+-commutative74.0%
Applied egg-rr74.0%
Taylor expanded in y around inf 75.1%
Final simplification76.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (- (+ z a) b))
(t_3 (+ a (* (+ x y) (/ z t_1)))))
(if (<= z -2.05e-60)
t_3
(if (<= z -8.4e-253)
t_2
(if (<= z 1.8e-61) (/ a (/ t_1 (+ y t))) (if (<= z 4e+88) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (z + a) - b;
double t_3 = a + ((x + y) * (z / t_1));
double tmp;
if (z <= -2.05e-60) {
tmp = t_3;
} else if (z <= -8.4e-253) {
tmp = t_2;
} else if (z <= 1.8e-61) {
tmp = a / (t_1 / (y + t));
} else if (z <= 4e+88) {
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 + (x + t)
t_2 = (z + a) - b
t_3 = a + ((x + y) * (z / t_1))
if (z <= (-2.05d-60)) then
tmp = t_3
else if (z <= (-8.4d-253)) then
tmp = t_2
else if (z <= 1.8d-61) then
tmp = a / (t_1 / (y + t))
else if (z <= 4d+88) 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 + (x + t);
double t_2 = (z + a) - b;
double t_3 = a + ((x + y) * (z / t_1));
double tmp;
if (z <= -2.05e-60) {
tmp = t_3;
} else if (z <= -8.4e-253) {
tmp = t_2;
} else if (z <= 1.8e-61) {
tmp = a / (t_1 / (y + t));
} else if (z <= 4e+88) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (z + a) - b t_3 = a + ((x + y) * (z / t_1)) tmp = 0 if z <= -2.05e-60: tmp = t_3 elif z <= -8.4e-253: tmp = t_2 elif z <= 1.8e-61: tmp = a / (t_1 / (y + t)) elif z <= 4e+88: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(z + a) - b) t_3 = Float64(a + Float64(Float64(x + y) * Float64(z / t_1))) tmp = 0.0 if (z <= -2.05e-60) tmp = t_3; elseif (z <= -8.4e-253) tmp = t_2; elseif (z <= 1.8e-61) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (z <= 4e+88) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (z + a) - b; t_3 = a + ((x + y) * (z / t_1)); tmp = 0.0; if (z <= -2.05e-60) tmp = t_3; elseif (z <= -8.4e-253) tmp = t_2; elseif (z <= 1.8e-61) tmp = a / (t_1 / (y + t)); elseif (z <= 4e+88) 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[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e-60], t$95$3, If[LessEqual[z, -8.4e-253], t$95$2, If[LessEqual[z, 1.8e-61], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+88], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(z + a\right) - b\\
t_3 := a + \left(x + y\right) \cdot \frac{z}{t_1}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{-60}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+88}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -2.05000000000000006e-60 or 3.99999999999999984e88 < z Initial program 50.7%
Taylor expanded in b around 0 42.5%
Taylor expanded in a around inf 42.5%
associate-/l*54.2%
associate-+r+54.2%
+-commutative54.2%
+-commutative54.2%
*-commutative54.2%
+-commutative54.2%
+-commutative54.2%
associate-+r+54.2%
associate-*r/84.9%
+-commutative84.9%
+-commutative84.9%
Simplified84.9%
Taylor expanded in y around inf 76.2%
if -2.05000000000000006e-60 < z < -8.3999999999999996e-253 or 1.80000000000000007e-61 < z < 3.99999999999999984e88Initial program 65.7%
Taylor expanded in y around inf 67.2%
if -8.3999999999999996e-253 < z < 1.80000000000000007e-61Initial program 74.3%
Taylor expanded in a around inf 50.0%
associate-/l*69.8%
associate-+r+69.8%
Simplified69.8%
Final simplification71.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ z (* a (/ (+ y t) t_1))))
(t_3 (+ a (* (+ x y) (/ z t_1)))))
(if (<= z -0.0007)
t_3
(if (<= z -6.2e-197)
t_2
(if (<= z -2.1e-246) (- (+ z a) b) (if (<= z 3.5e+58) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z + (a * ((y + t) / t_1));
double t_3 = a + ((x + y) * (z / t_1));
double tmp;
if (z <= -0.0007) {
tmp = t_3;
} else if (z <= -6.2e-197) {
tmp = t_2;
} else if (z <= -2.1e-246) {
tmp = (z + a) - b;
} else if (z <= 3.5e+58) {
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 + (x + t)
t_2 = z + (a * ((y + t) / t_1))
t_3 = a + ((x + y) * (z / t_1))
if (z <= (-0.0007d0)) then
tmp = t_3
else if (z <= (-6.2d-197)) then
tmp = t_2
else if (z <= (-2.1d-246)) then
tmp = (z + a) - b
else if (z <= 3.5d+58) 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 + (x + t);
double t_2 = z + (a * ((y + t) / t_1));
double t_3 = a + ((x + y) * (z / t_1));
double tmp;
if (z <= -0.0007) {
tmp = t_3;
} else if (z <= -6.2e-197) {
tmp = t_2;
} else if (z <= -2.1e-246) {
tmp = (z + a) - b;
} else if (z <= 3.5e+58) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z + (a * ((y + t) / t_1)) t_3 = a + ((x + y) * (z / t_1)) tmp = 0 if z <= -0.0007: tmp = t_3 elif z <= -6.2e-197: tmp = t_2 elif z <= -2.1e-246: tmp = (z + a) - b elif z <= 3.5e+58: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z + Float64(a * Float64(Float64(y + t) / t_1))) t_3 = Float64(a + Float64(Float64(x + y) * Float64(z / t_1))) tmp = 0.0 if (z <= -0.0007) tmp = t_3; elseif (z <= -6.2e-197) tmp = t_2; elseif (z <= -2.1e-246) tmp = Float64(Float64(z + a) - b); elseif (z <= 3.5e+58) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z + (a * ((y + t) / t_1)); t_3 = a + ((x + y) * (z / t_1)); tmp = 0.0; if (z <= -0.0007) tmp = t_3; elseif (z <= -6.2e-197) tmp = t_2; elseif (z <= -2.1e-246) tmp = (z + a) - b; elseif (z <= 3.5e+58) 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[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0007], t$95$3, If[LessEqual[z, -6.2e-197], t$95$2, If[LessEqual[z, -2.1e-246], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, 3.5e+58], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z + a \cdot \frac{y + t}{t_1}\\
t_3 := a + \left(x + y\right) \cdot \frac{z}{t_1}\\
\mathbf{if}\;z \leq -0.0007:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-246}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+58}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -6.99999999999999993e-4 or 3.4999999999999997e58 < z Initial program 49.8%
Taylor expanded in b around 0 39.4%
Taylor expanded in a around inf 39.4%
associate-/l*49.8%
associate-+r+49.8%
+-commutative49.8%
+-commutative49.8%
*-commutative49.8%
+-commutative49.8%
+-commutative49.8%
associate-+r+49.8%
associate-*r/82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in y around inf 76.1%
if -6.99999999999999993e-4 < z < -6.20000000000000057e-197 or -2.09999999999999995e-246 < z < 3.4999999999999997e58Initial program 73.9%
Taylor expanded in b around 0 57.1%
Taylor expanded in a around inf 57.1%
associate-/l*74.7%
associate-+r+74.7%
+-commutative74.7%
+-commutative74.7%
*-commutative74.7%
+-commutative74.7%
+-commutative74.7%
associate-+r+74.7%
associate-*r/68.1%
+-commutative68.1%
+-commutative68.1%
Simplified68.1%
div-inv68.1%
clear-num68.1%
+-commutative68.1%
Applied egg-rr68.1%
Taylor expanded in y around inf 72.4%
if -6.20000000000000057e-197 < z < -2.09999999999999995e-246Initial program 41.7%
Taylor expanded in y around inf 78.6%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (+ a (* (+ x y) (/ z t_1)))))
(if (<= z -2.6e-7)
t_2
(if (<= z -6.8e-197)
(+ z (/ a (/ t_1 (+ y t))))
(if (<= z -2.15e-246)
(- (+ z a) b)
(if (<= z 1.05e+52) (+ z (* a (/ (+ y t) t_1))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a + ((x + y) * (z / t_1));
double tmp;
if (z <= -2.6e-7) {
tmp = t_2;
} else if (z <= -6.8e-197) {
tmp = z + (a / (t_1 / (y + t)));
} else if (z <= -2.15e-246) {
tmp = (z + a) - b;
} else if (z <= 1.05e+52) {
tmp = z + (a * ((y + t) / t_1));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = a + ((x + y) * (z / t_1))
if (z <= (-2.6d-7)) then
tmp = t_2
else if (z <= (-6.8d-197)) then
tmp = z + (a / (t_1 / (y + t)))
else if (z <= (-2.15d-246)) then
tmp = (z + a) - b
else if (z <= 1.05d+52) then
tmp = z + (a * ((y + t) / t_1))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a + ((x + y) * (z / t_1));
double tmp;
if (z <= -2.6e-7) {
tmp = t_2;
} else if (z <= -6.8e-197) {
tmp = z + (a / (t_1 / (y + t)));
} else if (z <= -2.15e-246) {
tmp = (z + a) - b;
} else if (z <= 1.05e+52) {
tmp = z + (a * ((y + t) / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a + ((x + y) * (z / t_1)) tmp = 0 if z <= -2.6e-7: tmp = t_2 elif z <= -6.8e-197: tmp = z + (a / (t_1 / (y + t))) elif z <= -2.15e-246: tmp = (z + a) - b elif z <= 1.05e+52: tmp = z + (a * ((y + t) / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a + Float64(Float64(x + y) * Float64(z / t_1))) tmp = 0.0 if (z <= -2.6e-7) tmp = t_2; elseif (z <= -6.8e-197) tmp = Float64(z + Float64(a / Float64(t_1 / Float64(y + t)))); elseif (z <= -2.15e-246) tmp = Float64(Float64(z + a) - b); elseif (z <= 1.05e+52) tmp = Float64(z + Float64(a * Float64(Float64(y + t) / t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a + ((x + y) * (z / t_1)); tmp = 0.0; if (z <= -2.6e-7) tmp = t_2; elseif (z <= -6.8e-197) tmp = z + (a / (t_1 / (y + t))); elseif (z <= -2.15e-246) tmp = (z + a) - b; elseif (z <= 1.05e+52) tmp = z + (a * ((y + t) / t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e-7], t$95$2, If[LessEqual[z, -6.8e-197], N[(z + N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-246], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, 1.05e+52], N[(z + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a + \left(x + y\right) \cdot \frac{z}{t_1}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-197}:\\
\;\;\;\;z + \frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-246}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+52}:\\
\;\;\;\;z + a \cdot \frac{y + t}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.59999999999999999e-7 or 1.05e52 < z Initial program 49.8%
Taylor expanded in b around 0 39.4%
Taylor expanded in a around inf 39.4%
associate-/l*49.8%
associate-+r+49.8%
+-commutative49.8%
+-commutative49.8%
*-commutative49.8%
+-commutative49.8%
+-commutative49.8%
associate-+r+49.8%
associate-*r/82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in y around inf 76.1%
if -2.59999999999999999e-7 < z < -6.7999999999999996e-197Initial program 81.9%
Taylor expanded in b around 0 61.0%
Taylor expanded in a around inf 60.9%
associate-/l*70.9%
associate-+r+70.9%
+-commutative70.9%
+-commutative70.9%
*-commutative70.9%
+-commutative70.9%
+-commutative70.9%
associate-+r+70.9%
associate-*r/55.6%
+-commutative55.6%
+-commutative55.6%
Simplified55.6%
Taylor expanded in y around inf 68.6%
if -6.7999999999999996e-197 < z < -2.14999999999999996e-246Initial program 41.7%
Taylor expanded in y around inf 78.6%
if -2.14999999999999996e-246 < z < 1.05e52Initial program 70.6%
Taylor expanded in b around 0 55.5%
Taylor expanded in a around inf 55.5%
associate-/l*76.2%
associate-+r+76.2%
+-commutative76.2%
+-commutative76.2%
*-commutative76.2%
+-commutative76.2%
+-commutative76.2%
associate-+r+76.2%
associate-*r/73.2%
+-commutative73.2%
+-commutative73.2%
Simplified73.2%
div-inv73.2%
clear-num73.2%
+-commutative73.2%
Applied egg-rr73.2%
Taylor expanded in y around inf 74.0%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -8.6e+72)
(/ a (/ (+ x t) t))
(if (<= t 1.25e-261)
t_1
(if (<= t 3.7e-222)
z
(if (<= t 6.6e+101) t_1 (+ a (/ (* x (- z a)) t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -8.6e+72) {
tmp = a / ((x + t) / t);
} else if (t <= 1.25e-261) {
tmp = t_1;
} else if (t <= 3.7e-222) {
tmp = z;
} else if (t <= 6.6e+101) {
tmp = t_1;
} else {
tmp = a + ((x * (z - a)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (t <= (-8.6d+72)) then
tmp = a / ((x + t) / t)
else if (t <= 1.25d-261) then
tmp = t_1
else if (t <= 3.7d-222) then
tmp = z
else if (t <= 6.6d+101) then
tmp = t_1
else
tmp = a + ((x * (z - a)) / t)
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 <= -8.6e+72) {
tmp = a / ((x + t) / t);
} else if (t <= 1.25e-261) {
tmp = t_1;
} else if (t <= 3.7e-222) {
tmp = z;
} else if (t <= 6.6e+101) {
tmp = t_1;
} else {
tmp = a + ((x * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -8.6e+72: tmp = a / ((x + t) / t) elif t <= 1.25e-261: tmp = t_1 elif t <= 3.7e-222: tmp = z elif t <= 6.6e+101: tmp = t_1 else: tmp = a + ((x * (z - a)) / t) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -8.6e+72) tmp = Float64(a / Float64(Float64(x + t) / t)); elseif (t <= 1.25e-261) tmp = t_1; elseif (t <= 3.7e-222) tmp = z; elseif (t <= 6.6e+101) tmp = t_1; else tmp = Float64(a + Float64(Float64(x * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -8.6e+72) tmp = a / ((x + t) / t); elseif (t <= 1.25e-261) tmp = t_1; elseif (t <= 3.7e-222) tmp = z; elseif (t <= 6.6e+101) tmp = t_1; else tmp = a + ((x * (z - a)) / t); 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, -8.6e+72], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-261], t$95$1, If[LessEqual[t, 3.7e-222], z, If[LessEqual[t, 6.6e+101], t$95$1, N[(a + N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+72}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-261}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-222}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a + \frac{x \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if t < -8.6000000000000003e72Initial program 48.4%
Taylor expanded in y around 0 36.2%
Taylor expanded in a around inf 33.7%
associate-/l*65.5%
Simplified65.5%
if -8.6000000000000003e72 < t < 1.24999999999999995e-261 or 3.6999999999999999e-222 < t < 6.60000000000000022e101Initial program 68.9%
Taylor expanded in y around inf 62.1%
if 1.24999999999999995e-261 < t < 3.6999999999999999e-222Initial program 99.7%
Taylor expanded in x around inf 59.0%
if 6.60000000000000022e101 < t Initial program 39.1%
Taylor expanded in y around 0 31.4%
Taylor expanded in t around -inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
distribute-lft-out--59.4%
mul-1-neg59.4%
*-commutative59.4%
distribute-lft-out--59.5%
Simplified59.5%
Final simplification62.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= z 2.6e-304)
t_1
(if (<= z 7.2e-146)
(/ a (/ (+ x t) t))
(if (<= z 5.5e+94) t_1 (* (+ x y) (/ z (+ y (+ x t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (z <= 2.6e-304) {
tmp = t_1;
} else if (z <= 7.2e-146) {
tmp = a / ((x + t) / t);
} else if (z <= 5.5e+94) {
tmp = t_1;
} else {
tmp = (x + y) * (z / (y + (x + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (z <= 2.6d-304) then
tmp = t_1
else if (z <= 7.2d-146) then
tmp = a / ((x + t) / t)
else if (z <= 5.5d+94) then
tmp = t_1
else
tmp = (x + y) * (z / (y + (x + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (z <= 2.6e-304) {
tmp = t_1;
} else if (z <= 7.2e-146) {
tmp = a / ((x + t) / t);
} else if (z <= 5.5e+94) {
tmp = t_1;
} else {
tmp = (x + y) * (z / (y + (x + t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if z <= 2.6e-304: tmp = t_1 elif z <= 7.2e-146: tmp = a / ((x + t) / t) elif z <= 5.5e+94: tmp = t_1 else: tmp = (x + y) * (z / (y + (x + t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (z <= 2.6e-304) tmp = t_1; elseif (z <= 7.2e-146) tmp = Float64(a / Float64(Float64(x + t) / t)); elseif (z <= 5.5e+94) tmp = t_1; else tmp = Float64(Float64(x + y) * Float64(z / Float64(y + Float64(x + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (z <= 2.6e-304) tmp = t_1; elseif (z <= 7.2e-146) tmp = a / ((x + t) / t); elseif (z <= 5.5e+94) tmp = t_1; else tmp = (x + y) * (z / (y + (x + t))); 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[z, 2.6e-304], t$95$1, If[LessEqual[z, 7.2e-146], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+94], t$95$1, N[(N[(x + y), $MachinePrecision] * N[(z / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;z \leq 2.6 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-146}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{y + \left(x + t\right)}\\
\end{array}
\end{array}
if z < 2.59999999999999997e-304 or 7.19999999999999957e-146 < z < 5.4999999999999997e94Initial program 60.9%
Taylor expanded in y around inf 59.2%
if 2.59999999999999997e-304 < z < 7.19999999999999957e-146Initial program 74.6%
Taylor expanded in y around 0 42.5%
Taylor expanded in a around inf 42.0%
associate-/l*60.8%
Simplified60.8%
if 5.4999999999999997e94 < z Initial program 53.7%
Taylor expanded in b around 0 47.6%
Taylor expanded in a around 0 41.0%
*-commutative41.0%
+-commutative41.0%
+-commutative41.0%
associate-+r+41.0%
associate-*r/73.9%
+-commutative73.9%
+-commutative73.9%
Simplified73.9%
Final simplification61.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (- (+ z a) b)))
(if (<= z -5.1e-256)
t_2
(if (<= z 1.6e-61)
(/ a (/ t_1 (+ y t)))
(if (<= z 2.45e+94) t_2 (* (+ x y) (/ z t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (z + a) - b;
double tmp;
if (z <= -5.1e-256) {
tmp = t_2;
} else if (z <= 1.6e-61) {
tmp = a / (t_1 / (y + t));
} else if (z <= 2.45e+94) {
tmp = t_2;
} else {
tmp = (x + y) * (z / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = (z + a) - b
if (z <= (-5.1d-256)) then
tmp = t_2
else if (z <= 1.6d-61) then
tmp = a / (t_1 / (y + t))
else if (z <= 2.45d+94) then
tmp = t_2
else
tmp = (x + y) * (z / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (z + a) - b;
double tmp;
if (z <= -5.1e-256) {
tmp = t_2;
} else if (z <= 1.6e-61) {
tmp = a / (t_1 / (y + t));
} else if (z <= 2.45e+94) {
tmp = t_2;
} else {
tmp = (x + y) * (z / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (z + a) - b tmp = 0 if z <= -5.1e-256: tmp = t_2 elif z <= 1.6e-61: tmp = a / (t_1 / (y + t)) elif z <= 2.45e+94: tmp = t_2 else: tmp = (x + y) * (z / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (z <= -5.1e-256) tmp = t_2; elseif (z <= 1.6e-61) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (z <= 2.45e+94) tmp = t_2; else tmp = Float64(Float64(x + y) * Float64(z / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (z + a) - b; tmp = 0.0; if (z <= -5.1e-256) tmp = t_2; elseif (z <= 1.6e-61) tmp = a / (t_1 / (y + t)); elseif (z <= 2.45e+94) tmp = t_2; else tmp = (x + y) * (z / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[z, -5.1e-256], t$95$2, If[LessEqual[z, 1.6e-61], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+94], t$95$2, N[(N[(x + y), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{-256}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-61}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+94}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t_1}\\
\end{array}
\end{array}
if z < -5.10000000000000011e-256 or 1.6000000000000001e-61 < z < 2.4499999999999999e94Initial program 57.5%
Taylor expanded in y around inf 62.2%
if -5.10000000000000011e-256 < z < 1.6000000000000001e-61Initial program 74.3%
Taylor expanded in a around inf 50.0%
associate-/l*69.8%
associate-+r+69.8%
Simplified69.8%
if 2.4499999999999999e94 < z Initial program 53.7%
Taylor expanded in b around 0 47.6%
Taylor expanded in a around 0 41.0%
*-commutative41.0%
+-commutative41.0%
+-commutative41.0%
associate-+r+41.0%
associate-*r/73.9%
+-commutative73.9%
+-commutative73.9%
Simplified73.9%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (- (+ z a) b)))
(if (<= z -1.08e-246)
t_2
(if (<= z 2.55e-61)
(/ a (/ t_1 (+ y t)))
(if (<= z 7e+94) t_2 (/ z (/ t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (z + a) - b;
double tmp;
if (z <= -1.08e-246) {
tmp = t_2;
} else if (z <= 2.55e-61) {
tmp = a / (t_1 / (y + t));
} else if (z <= 7e+94) {
tmp = t_2;
} else {
tmp = z / (t_1 / (x + y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = (z + a) - b
if (z <= (-1.08d-246)) then
tmp = t_2
else if (z <= 2.55d-61) then
tmp = a / (t_1 / (y + t))
else if (z <= 7d+94) then
tmp = t_2
else
tmp = z / (t_1 / (x + y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (z + a) - b;
double tmp;
if (z <= -1.08e-246) {
tmp = t_2;
} else if (z <= 2.55e-61) {
tmp = a / (t_1 / (y + t));
} else if (z <= 7e+94) {
tmp = t_2;
} else {
tmp = z / (t_1 / (x + y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (z + a) - b tmp = 0 if z <= -1.08e-246: tmp = t_2 elif z <= 2.55e-61: tmp = a / (t_1 / (y + t)) elif z <= 7e+94: tmp = t_2 else: tmp = z / (t_1 / (x + y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (z <= -1.08e-246) tmp = t_2; elseif (z <= 2.55e-61) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (z <= 7e+94) tmp = t_2; else tmp = Float64(z / Float64(t_1 / Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (z + a) - b; tmp = 0.0; if (z <= -1.08e-246) tmp = t_2; elseif (z <= 2.55e-61) tmp = a / (t_1 / (y + t)); elseif (z <= 7e+94) tmp = t_2; else tmp = z / (t_1 / (x + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[z, -1.08e-246], t$95$2, If[LessEqual[z, 2.55e-61], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+94], t$95$2, N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-246}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-61}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+94}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\end{array}
\end{array}
if z < -1.08000000000000003e-246 or 2.54999999999999984e-61 < z < 6.9999999999999994e94Initial program 57.5%
Taylor expanded in y around inf 62.2%
if -1.08000000000000003e-246 < z < 2.54999999999999984e-61Initial program 74.3%
Taylor expanded in a around inf 50.0%
associate-/l*69.8%
associate-+r+69.8%
Simplified69.8%
if 6.9999999999999994e94 < z Initial program 53.7%
Taylor expanded in z around inf 41.0%
associate-/l*75.9%
associate-+r+75.9%
+-commutative75.9%
Simplified75.9%
Final simplification66.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -1.9e+81) (not (<= x 5.4e+144))) (+ z (* t (- (/ a x) (/ z x)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -1.9e+81) || !(x <= 5.4e+144)) {
tmp = z + (t * ((a / x) - (z / x)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-1.9d+81)) .or. (.not. (x <= 5.4d+144))) then
tmp = z + (t * ((a / x) - (z / x)))
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -1.9e+81) || !(x <= 5.4e+144)) {
tmp = z + (t * ((a / x) - (z / x)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -1.9e+81) or not (x <= 5.4e+144): tmp = z + (t * ((a / x) - (z / x))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -1.9e+81) || !(x <= 5.4e+144)) tmp = Float64(z + Float64(t * Float64(Float64(a / x) - Float64(z / x)))); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -1.9e+81) || ~((x <= 5.4e+144))) tmp = z + (t * ((a / x) - (z / x))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.9e+81], N[Not[LessEqual[x, 5.4e+144]], $MachinePrecision]], N[(z + N[(t * N[(N[(a / x), $MachinePrecision] - N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+81} \lor \neg \left(x \leq 5.4 \cdot 10^{+144}\right):\\
\;\;\;\;z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if x < -1.9e81 or 5.4000000000000003e144 < x Initial program 51.7%
Taylor expanded in y around 0 34.6%
Taylor expanded in t around 0 58.2%
if -1.9e81 < x < 5.4000000000000003e144Initial program 66.7%
Taylor expanded in y around inf 62.6%
Final simplification61.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.2e+143) (not (<= b 5e+178))) (/ (- b) (/ (+ y (+ x t)) y)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.2e+143) || !(b <= 5e+178)) {
tmp = -b / ((y + (x + t)) / y);
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.2d+143)) .or. (.not. (b <= 5d+178))) then
tmp = -b / ((y + (x + t)) / y)
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.2e+143) || !(b <= 5e+178)) {
tmp = -b / ((y + (x + t)) / y);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.2e+143) or not (b <= 5e+178): tmp = -b / ((y + (x + t)) / y) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.2e+143) || !(b <= 5e+178)) tmp = Float64(Float64(-b) / Float64(Float64(y + Float64(x + t)) / y)); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.2e+143) || ~((b <= 5e+178))) tmp = -b / ((y + (x + t)) / y); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.2e+143], N[Not[LessEqual[b, 5e+178]], $MachinePrecision]], N[((-b) / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{+143} \lor \neg \left(b \leq 5 \cdot 10^{+178}\right):\\
\;\;\;\;\frac{-b}{\frac{y + \left(x + t\right)}{y}}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if b < -1.1999999999999999e143 or 4.9999999999999999e178 < b Initial program 64.9%
Taylor expanded in b around inf 38.3%
mul-1-neg38.3%
associate-/l*53.1%
distribute-neg-frac53.1%
associate-+r+53.1%
Simplified53.1%
if -1.1999999999999999e143 < b < 4.9999999999999999e178Initial program 60.5%
Taylor expanded in y around inf 61.2%
Final simplification59.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z 3e-304) (not (<= z 1.26e-146))) (- (+ z a) b) (/ a (/ (+ x t) t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= 3e-304) || !(z <= 1.26e-146)) {
tmp = (z + a) - b;
} else {
tmp = a / ((x + t) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= 3d-304) .or. (.not. (z <= 1.26d-146))) then
tmp = (z + a) - b
else
tmp = a / ((x + t) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= 3e-304) || !(z <= 1.26e-146)) {
tmp = (z + a) - b;
} else {
tmp = a / ((x + t) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= 3e-304) or not (z <= 1.26e-146): tmp = (z + a) - b else: tmp = a / ((x + t) / t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= 3e-304) || !(z <= 1.26e-146)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a / Float64(Float64(x + t) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= 3e-304) || ~((z <= 1.26e-146))) tmp = (z + a) - b; else tmp = a / ((x + t) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, 3e-304], N[Not[LessEqual[z, 1.26e-146]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3 \cdot 10^{-304} \lor \neg \left(z \leq 1.26 \cdot 10^{-146}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\end{array}
\end{array}
if z < 3.0000000000000001e-304 or 1.2599999999999999e-146 < z Initial program 59.5%
Taylor expanded in y around inf 57.5%
if 3.0000000000000001e-304 < z < 1.2599999999999999e-146Initial program 74.6%
Taylor expanded in y around 0 42.5%
Taylor expanded in a around inf 42.0%
associate-/l*60.8%
Simplified60.8%
Final simplification57.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.4e-53) (not (<= y 5.1e-17))) (- (+ z a) b) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.4e-53) || !(y <= 5.1e-17)) {
tmp = (z + a) - b;
} else {
tmp = z + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.4d-53)) .or. (.not. (y <= 5.1d-17))) then
tmp = (z + a) - b
else
tmp = z + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.4e-53) || !(y <= 5.1e-17)) {
tmp = (z + a) - b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.4e-53) or not (y <= 5.1e-17): tmp = (z + a) - b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.4e-53) || !(y <= 5.1e-17)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.4e-53) || ~((y <= 5.1e-17))) tmp = (z + a) - b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.4e-53], N[Not[LessEqual[y, 5.1e-17]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-53} \lor \neg \left(y \leq 5.1 \cdot 10^{-17}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if y < -1.39999999999999993e-53 or 5.1000000000000003e-17 < y Initial program 50.0%
Taylor expanded in y around inf 65.7%
if -1.39999999999999993e-53 < y < 5.1000000000000003e-17Initial program 75.1%
Taylor expanded in b around 0 64.5%
Taylor expanded in y around inf 52.2%
+-commutative52.2%
Simplified52.2%
Final simplification59.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3e-21) a (if (<= a 1.4e+35) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3e-21) {
tmp = a;
} else if (a <= 1.4e+35) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-3d-21)) then
tmp = a
else if (a <= 1.4d+35) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3e-21) {
tmp = a;
} else if (a <= 1.4e+35) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3e-21: tmp = a elif a <= 1.4e+35: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3e-21) tmp = a; elseif (a <= 1.4e+35) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3e-21) tmp = a; elseif (a <= 1.4e+35) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3e-21], a, If[LessEqual[a, 1.4e+35], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-21}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+35}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -2.99999999999999991e-21 or 1.39999999999999999e35 < a Initial program 47.5%
Taylor expanded in t around inf 51.9%
if -2.99999999999999991e-21 < a < 1.39999999999999999e35Initial program 74.0%
Taylor expanded in x around inf 42.2%
Final simplification46.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -9.6e+183) a (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9.6e+183) {
tmp = a;
} 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 (t <= (-9.6d+183)) then
tmp = a
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 (t <= -9.6e+183) {
tmp = a;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -9.6e+183: tmp = a else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -9.6e+183) tmp = a; else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -9.6e+183) tmp = a; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9.6e+183], a, N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{+183}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if t < -9.6000000000000006e183Initial program 39.6%
Taylor expanded in t around inf 77.9%
if -9.6000000000000006e183 < t Initial program 63.0%
Taylor expanded in b around 0 46.9%
Taylor expanded in y around inf 51.1%
+-commutative51.1%
Simplified51.1%
Final simplification53.1%
(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 61.3%
Taylor expanded in t around inf 32.4%
Final simplification32.4%
(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 2024020
(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)))