
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ y t_1))
(t_3 (* (+ y t) a))
(t_4 (/ (- (+ t_3 (* z (+ x y))) (* y b)) t_1)))
(if (or (<= t_4 (- INFINITY)) (not (<= t_4 1e+253)))
(+ z (* a (+ t_2 (/ t t_1))))
(+ (* z (+ t_2 (/ x t_1))) (/ (- t_3 (* y b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = y / t_1;
double t_3 = (y + t) * a;
double t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_4 <= -((double) INFINITY)) || !(t_4 <= 1e+253)) {
tmp = z + (a * (t_2 + (t / t_1)));
} else {
tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = y / t_1;
double t_3 = (y + t) * a;
double t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_4 <= -Double.POSITIVE_INFINITY) || !(t_4 <= 1e+253)) {
tmp = z + (a * (t_2 + (t / t_1)));
} else {
tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = y / t_1 t_3 = (y + t) * a t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1 tmp = 0 if (t_4 <= -math.inf) or not (t_4 <= 1e+253): tmp = z + (a * (t_2 + (t / t_1))) else: tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(y / t_1) t_3 = Float64(Float64(y + t) * a) t_4 = Float64(Float64(Float64(t_3 + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_4 <= Float64(-Inf)) || !(t_4 <= 1e+253)) tmp = Float64(z + Float64(a * Float64(t_2 + Float64(t / t_1)))); else tmp = Float64(Float64(z * Float64(t_2 + Float64(x / t_1))) + Float64(Float64(t_3 - Float64(y * b)) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = y / t_1; t_3 = (y + t) * a; t_4 = ((t_3 + (z * (x + y))) - (y * b)) / t_1; tmp = 0.0; if ((t_4 <= -Inf) || ~((t_4 <= 1e+253))) tmp = z + (a * (t_2 + (t / t_1))); else tmp = (z * (t_2 + (x / t_1))) + ((t_3 - (y * b)) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$4, (-Infinity)], N[Not[LessEqual[t$95$4, 1e+253]], $MachinePrecision]], N[(z + N[(a * N[(t$95$2 + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(t$95$2 + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{y}{t_1}\\
t_3 := \left(y + t\right) \cdot a\\
t_4 := \frac{\left(t_3 + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_4 \leq -\infty \lor \neg \left(t_4 \leq 10^{+253}\right):\\
\;\;\;\;z + a \cdot \left(t_2 + \frac{t}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t_2 + \frac{x}{t_1}\right) + \frac{t_3 - y \cdot b}{t_1}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.9999999999999994e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.6%
Taylor expanded in a around 0 39.9%
associate--l+39.9%
+-commutative39.9%
associate-+r+39.9%
associate-+r+39.9%
div-sub39.9%
+-commutative39.9%
*-commutative39.9%
associate-+r+39.9%
Simplified39.9%
Taylor expanded in x around inf 74.2%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999994e252Initial program 99.0%
Taylor expanded in z around 0 99.1%
associate--l+99.1%
associate-+r+99.1%
associate-+r+99.1%
div-sub99.1%
*-commutative99.1%
associate-+r+99.1%
Simplified99.1%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ x y)))
(t_2 (+ y (+ x t)))
(t_3 (/ (- (+ (* (+ y t) a) t_1) (* y b)) t_2))
(t_4 (* a (+ (/ y t_2) (/ t t_2)))))
(if (or (<= t_3 (- INFINITY)) (not (<= t_3 1e+253)))
(+ z t_4)
(+ t_4 (/ (- t_1 (* y b)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (x + y);
double t_2 = y + (x + t);
double t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
double t_4 = a * ((y / t_2) + (t / t_2));
double tmp;
if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 1e+253)) {
tmp = z + t_4;
} else {
tmp = t_4 + ((t_1 - (y * b)) / t_2);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (x + y);
double t_2 = y + (x + t);
double t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
double t_4 = a * ((y / t_2) + (t / t_2));
double tmp;
if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 1e+253)) {
tmp = z + t_4;
} else {
tmp = t_4 + ((t_1 - (y * b)) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (x + y) t_2 = y + (x + t) t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2 t_4 = a * ((y / t_2) + (t / t_2)) tmp = 0 if (t_3 <= -math.inf) or not (t_3 <= 1e+253): tmp = z + t_4 else: tmp = t_4 + ((t_1 - (y * b)) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(x + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + t_1) - Float64(y * b)) / t_2) t_4 = Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))) tmp = 0.0 if ((t_3 <= Float64(-Inf)) || !(t_3 <= 1e+253)) tmp = Float64(z + t_4); else tmp = Float64(t_4 + Float64(Float64(t_1 - Float64(y * b)) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (x + y); t_2 = y + (x + t); t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2; t_4 = a * ((y / t_2) + (t / t_2)); tmp = 0.0; if ((t_3 <= -Inf) || ~((t_3 <= 1e+253))) tmp = z + t_4; else tmp = t_4 + ((t_1 - (y * b)) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 1e+253]], $MachinePrecision]], N[(z + t$95$4), $MachinePrecision], N[(t$95$4 + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(\left(y + t\right) \cdot a + t_1\right) - y \cdot b}{t_2}\\
t_4 := a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right)\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+253}\right):\\
\;\;\;\;z + t_4\\
\mathbf{else}:\\
\;\;\;\;t_4 + \frac{t_1 - y \cdot b}{t_2}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.9999999999999994e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.6%
Taylor expanded in a around 0 39.9%
associate--l+39.9%
+-commutative39.9%
associate-+r+39.9%
associate-+r+39.9%
div-sub39.9%
+-commutative39.9%
*-commutative39.9%
associate-+r+39.9%
Simplified39.9%
Taylor expanded in x around inf 74.2%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999994e252Initial program 99.0%
Taylor expanded in a around 0 99.1%
associate--l+99.1%
+-commutative99.1%
associate-+r+99.1%
associate-+r+99.1%
div-sub99.1%
+-commutative99.1%
*-commutative99.1%
associate-+r+99.1%
Simplified99.1%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ y t) a) (* z (+ x y))) (* y b)) t_1)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+253)))
(+ z (* a (+ (/ y t_1) (/ t t_1))))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+253)) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+253)) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+253): tmp = z + (a * ((y / t_1) + (t / t_1))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+253)) tmp = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((((y + t) * a) + (z * (x + y))) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+253))) tmp = z + (a * ((y / t_1) + (t / t_1))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+253]], $MachinePrecision]], N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(y + t\right) \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 10^{+253}\right):\\
\;\;\;\;z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 9.9999999999999994e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.6%
Taylor expanded in a around 0 39.9%
associate--l+39.9%
+-commutative39.9%
associate-+r+39.9%
associate-+r+39.9%
div-sub39.9%
+-commutative39.9%
*-commutative39.9%
associate-+r+39.9%
Simplified39.9%
Taylor expanded in x around inf 74.2%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999994e252Initial program 99.0%
Final simplification89.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ z (- a b)))
(t_3 (/ (- (* (+ y t) a) (* y b)) t_1)))
(if (<= y -2.5e+59)
t_2
(if (<= y -900000.0)
(/ z (/ t_1 (+ x y)))
(if (<= y -2.8e-48)
(/ a (/ (+ x t) t))
(if (<= y -4.8e-123)
(+ z (/ y (/ x (- a b))))
(if (<= y 5.2e-227)
(/ a (/ t_1 (+ y t)))
(if (<= y 3.6e-83)
t_3
(if (<= y 2e-71)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= y 2.8e-29) t_3 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z + (a - b);
double t_3 = (((y + t) * a) - (y * b)) / t_1;
double tmp;
if (y <= -2.5e+59) {
tmp = t_2;
} else if (y <= -900000.0) {
tmp = z / (t_1 / (x + y));
} else if (y <= -2.8e-48) {
tmp = a / ((x + t) / t);
} else if (y <= -4.8e-123) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 5.2e-227) {
tmp = a / (t_1 / (y + t));
} else if (y <= 3.6e-83) {
tmp = t_3;
} else if (y <= 2e-71) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 2.8e-29) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = y + (x + t)
t_2 = z + (a - b)
t_3 = (((y + t) * a) - (y * b)) / t_1
if (y <= (-2.5d+59)) then
tmp = t_2
else if (y <= (-900000.0d0)) then
tmp = z / (t_1 / (x + y))
else if (y <= (-2.8d-48)) then
tmp = a / ((x + t) / t)
else if (y <= (-4.8d-123)) then
tmp = z + (y / (x / (a - b)))
else if (y <= 5.2d-227) then
tmp = a / (t_1 / (y + t))
else if (y <= 3.6d-83) then
tmp = t_3
else if (y <= 2d-71) then
tmp = (x + y) * (z / (t + (x + y)))
else if (y <= 2.8d-29) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z + (a - b);
double t_3 = (((y + t) * a) - (y * b)) / t_1;
double tmp;
if (y <= -2.5e+59) {
tmp = t_2;
} else if (y <= -900000.0) {
tmp = z / (t_1 / (x + y));
} else if (y <= -2.8e-48) {
tmp = a / ((x + t) / t);
} else if (y <= -4.8e-123) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 5.2e-227) {
tmp = a / (t_1 / (y + t));
} else if (y <= 3.6e-83) {
tmp = t_3;
} else if (y <= 2e-71) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 2.8e-29) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z + (a - b) t_3 = (((y + t) * a) - (y * b)) / t_1 tmp = 0 if y <= -2.5e+59: tmp = t_2 elif y <= -900000.0: tmp = z / (t_1 / (x + y)) elif y <= -2.8e-48: tmp = a / ((x + t) / t) elif y <= -4.8e-123: tmp = z + (y / (x / (a - b))) elif y <= 5.2e-227: tmp = a / (t_1 / (y + t)) elif y <= 3.6e-83: tmp = t_3 elif y <= 2e-71: tmp = (x + y) * (z / (t + (x + y))) elif y <= 2.8e-29: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z + Float64(a - b)) t_3 = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / t_1) tmp = 0.0 if (y <= -2.5e+59) tmp = t_2; elseif (y <= -900000.0) tmp = Float64(z / Float64(t_1 / Float64(x + y))); elseif (y <= -2.8e-48) tmp = Float64(a / Float64(Float64(x + t) / t)); elseif (y <= -4.8e-123) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= 5.2e-227) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= 3.6e-83) tmp = t_3; elseif (y <= 2e-71) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (y <= 2.8e-29) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z + (a - b); t_3 = (((y + t) * a) - (y * b)) / t_1; tmp = 0.0; if (y <= -2.5e+59) tmp = t_2; elseif (y <= -900000.0) tmp = z / (t_1 / (x + y)); elseif (y <= -2.8e-48) tmp = a / ((x + t) / t); elseif (y <= -4.8e-123) tmp = z + (y / (x / (a - b))); elseif (y <= 5.2e-227) tmp = a / (t_1 / (y + t)); elseif (y <= 3.6e-83) tmp = t_3; elseif (y <= 2e-71) tmp = (x + y) * (z / (t + (x + y))); elseif (y <= 2.8e-29) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -2.5e+59], t$95$2, If[LessEqual[y, -900000.0], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-48], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-123], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-227], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e-83], t$95$3, If[LessEqual[y, 2e-71], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-29], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z + \left(a - b\right)\\
t_3 := \frac{\left(y + t\right) \cdot a - y \cdot b}{t_1}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -900000:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-123}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-227}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-83}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-71}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-29}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.4999999999999999e59 or 2.8000000000000002e-29 < y Initial program 43.3%
Taylor expanded in y around inf 74.8%
Taylor expanded in b around 0 74.8%
neg-mul-174.8%
associate-+r+74.8%
+-commutative74.8%
associate-+l+74.8%
sub-neg74.8%
Simplified74.8%
if -2.4999999999999999e59 < y < -9e5Initial program 60.4%
Taylor expanded in z around inf 36.1%
associate-/l*67.4%
associate-+r+67.4%
+-commutative67.4%
Simplified67.4%
if -9e5 < y < -2.80000000000000005e-48Initial program 73.8%
Taylor expanded in t around inf 33.4%
div-inv33.1%
+-commutative33.1%
associate-+l+33.1%
+-commutative33.1%
Applied egg-rr33.1%
Taylor expanded in y around 0 33.5%
associate-/l*59.5%
Simplified59.5%
if -2.80000000000000005e-48 < y < -4.8e-123Initial program 91.1%
Taylor expanded in t around 0 82.5%
sub-neg82.5%
mul-1-neg82.5%
+-commutative82.5%
associate-+r+82.5%
+-commutative82.5%
associate-*r*82.5%
distribute-rgt-in82.5%
mul-1-neg82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in x around inf 82.8%
associate-/l*82.7%
Simplified82.7%
if -4.8e-123 < y < 5.20000000000000023e-227Initial program 75.4%
Taylor expanded in a around inf 44.7%
associate-/l*63.6%
associate-+r+63.6%
Simplified63.6%
if 5.20000000000000023e-227 < y < 3.60000000000000012e-83 or 1.9999999999999998e-71 < y < 2.8000000000000002e-29Initial program 92.3%
Taylor expanded in z around 0 67.6%
*-commutative67.6%
Simplified67.6%
if 3.60000000000000012e-83 < y < 1.9999999999999998e-71Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (+ z (- a b))))
(if (<= y -1.25e+59)
t_2
(if (<= y -27000000.0)
(/ z (/ t_1 (+ x y)))
(if (<= y -4.2e-42)
(/ a (/ (+ x t) t))
(if (<= y -2.4e-121)
(+ z (/ y (/ x (- a b))))
(if (<= y 5.3e-83)
(/ a (/ t_1 (+ y t)))
(if (<= y 1.75e-69)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= y 1.05e-63) (/ y (/ (+ x y) (- a b))) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z + (a - b);
double tmp;
if (y <= -1.25e+59) {
tmp = t_2;
} else if (y <= -27000000.0) {
tmp = z / (t_1 / (x + y));
} else if (y <= -4.2e-42) {
tmp = a / ((x + t) / t);
} else if (y <= -2.4e-121) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 5.3e-83) {
tmp = a / (t_1 / (y + t));
} else if (y <= 1.75e-69) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1.05e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = z + (a - b)
if (y <= (-1.25d+59)) then
tmp = t_2
else if (y <= (-27000000.0d0)) then
tmp = z / (t_1 / (x + y))
else if (y <= (-4.2d-42)) then
tmp = a / ((x + t) / t)
else if (y <= (-2.4d-121)) then
tmp = z + (y / (x / (a - b)))
else if (y <= 5.3d-83) then
tmp = a / (t_1 / (y + t))
else if (y <= 1.75d-69) then
tmp = (x + y) * (z / (t + (x + y)))
else if (y <= 1.05d-63) then
tmp = y / ((x + y) / (a - b))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z + (a - b);
double tmp;
if (y <= -1.25e+59) {
tmp = t_2;
} else if (y <= -27000000.0) {
tmp = z / (t_1 / (x + y));
} else if (y <= -4.2e-42) {
tmp = a / ((x + t) / t);
} else if (y <= -2.4e-121) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 5.3e-83) {
tmp = a / (t_1 / (y + t));
} else if (y <= 1.75e-69) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1.05e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z + (a - b) tmp = 0 if y <= -1.25e+59: tmp = t_2 elif y <= -27000000.0: tmp = z / (t_1 / (x + y)) elif y <= -4.2e-42: tmp = a / ((x + t) / t) elif y <= -2.4e-121: tmp = z + (y / (x / (a - b))) elif y <= 5.3e-83: tmp = a / (t_1 / (y + t)) elif y <= 1.75e-69: tmp = (x + y) * (z / (t + (x + y))) elif y <= 1.05e-63: tmp = y / ((x + y) / (a - b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z + Float64(a - b)) tmp = 0.0 if (y <= -1.25e+59) tmp = t_2; elseif (y <= -27000000.0) tmp = Float64(z / Float64(t_1 / Float64(x + y))); elseif (y <= -4.2e-42) tmp = Float64(a / Float64(Float64(x + t) / t)); elseif (y <= -2.4e-121) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= 5.3e-83) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= 1.75e-69) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (y <= 1.05e-63) tmp = Float64(y / Float64(Float64(x + y) / Float64(a - b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z + (a - b); tmp = 0.0; if (y <= -1.25e+59) tmp = t_2; elseif (y <= -27000000.0) tmp = z / (t_1 / (x + y)); elseif (y <= -4.2e-42) tmp = a / ((x + t) / t); elseif (y <= -2.4e-121) tmp = z + (y / (x / (a - b))); elseif (y <= 5.3e-83) tmp = a / (t_1 / (y + t)); elseif (y <= 1.75e-69) tmp = (x + y) * (z / (t + (x + y))); elseif (y <= 1.05e-63) tmp = y / ((x + y) / (a - b)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+59], t$95$2, If[LessEqual[y, -27000000.0], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2e-42], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-121], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.3e-83], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-69], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-63], N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z + \left(a - b\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -27000000:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-42}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-121}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-69}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.2499999999999999e59 or 1.05e-63 < y Initial program 44.6%
Taylor expanded in y around inf 73.5%
Taylor expanded in b around 0 73.5%
neg-mul-173.5%
associate-+r+73.5%
+-commutative73.5%
associate-+l+73.6%
sub-neg73.6%
Simplified73.6%
if -1.2499999999999999e59 < y < -2.7e7Initial program 60.4%
Taylor expanded in z around inf 36.1%
associate-/l*67.4%
associate-+r+67.4%
+-commutative67.4%
Simplified67.4%
if -2.7e7 < y < -4.20000000000000013e-42Initial program 73.8%
Taylor expanded in t around inf 33.4%
div-inv33.1%
+-commutative33.1%
associate-+l+33.1%
+-commutative33.1%
Applied egg-rr33.1%
Taylor expanded in y around 0 33.5%
associate-/l*59.5%
Simplified59.5%
if -4.20000000000000013e-42 < y < -2.40000000000000003e-121Initial program 91.1%
Taylor expanded in t around 0 82.5%
sub-neg82.5%
mul-1-neg82.5%
+-commutative82.5%
associate-+r+82.5%
+-commutative82.5%
associate-*r*82.5%
distribute-rgt-in82.5%
mul-1-neg82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in x around inf 82.8%
associate-/l*82.7%
Simplified82.7%
if -2.40000000000000003e-121 < y < 5.3e-83Initial program 82.3%
Taylor expanded in a around inf 46.7%
associate-/l*60.7%
associate-+r+60.7%
Simplified60.7%
if 5.3e-83 < y < 1.7500000000000001e-69Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
if 1.7500000000000001e-69 < y < 1.05e-63Initial program 99.5%
Taylor expanded in t around 0 68.3%
sub-neg68.3%
mul-1-neg68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-*r*68.3%
distribute-rgt-in68.3%
mul-1-neg68.3%
+-commutative68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in z around 0 68.3%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
Final simplification69.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (- a b))))
(if (<= y -7.6e+21)
t_1
(if (<= y -1.45e-112)
(+ z (/ y (/ x (- a b))))
(if (<= y -2.4e-145)
t_1
(if (<= y 8.5e-84)
(/ a (/ (+ x t) t))
(if (<= y 1.15e-70)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= y 1e-63) (/ y (/ (+ x y) (- a b))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double tmp;
if (y <= -7.6e+21) {
tmp = t_1;
} else if (y <= -1.45e-112) {
tmp = z + (y / (x / (a - b)));
} else if (y <= -2.4e-145) {
tmp = t_1;
} else if (y <= 8.5e-84) {
tmp = a / ((x + t) / t);
} else if (y <= 1.15e-70) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z + (a - b)
if (y <= (-7.6d+21)) then
tmp = t_1
else if (y <= (-1.45d-112)) then
tmp = z + (y / (x / (a - b)))
else if (y <= (-2.4d-145)) then
tmp = t_1
else if (y <= 8.5d-84) then
tmp = a / ((x + t) / t)
else if (y <= 1.15d-70) then
tmp = (x + y) * (z / (t + (x + y)))
else if (y <= 1d-63) then
tmp = y / ((x + y) / (a - b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double tmp;
if (y <= -7.6e+21) {
tmp = t_1;
} else if (y <= -1.45e-112) {
tmp = z + (y / (x / (a - b)));
} else if (y <= -2.4e-145) {
tmp = t_1;
} else if (y <= 8.5e-84) {
tmp = a / ((x + t) / t);
} else if (y <= 1.15e-70) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a - b) tmp = 0 if y <= -7.6e+21: tmp = t_1 elif y <= -1.45e-112: tmp = z + (y / (x / (a - b))) elif y <= -2.4e-145: tmp = t_1 elif y <= 8.5e-84: tmp = a / ((x + t) / t) elif y <= 1.15e-70: tmp = (x + y) * (z / (t + (x + y))) elif y <= 1e-63: tmp = y / ((x + y) / (a - b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a - b)) tmp = 0.0 if (y <= -7.6e+21) tmp = t_1; elseif (y <= -1.45e-112) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= -2.4e-145) tmp = t_1; elseif (y <= 8.5e-84) tmp = Float64(a / Float64(Float64(x + t) / t)); elseif (y <= 1.15e-70) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (y <= 1e-63) tmp = Float64(y / Float64(Float64(x + y) / Float64(a - b))); else tmp = t_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 <= -7.6e+21) tmp = t_1; elseif (y <= -1.45e-112) tmp = z + (y / (x / (a - b))); elseif (y <= -2.4e-145) tmp = t_1; elseif (y <= 8.5e-84) tmp = a / ((x + t) / t); elseif (y <= 1.15e-70) tmp = (x + y) * (z / (t + (x + y))); elseif (y <= 1e-63) tmp = y / ((x + y) / (a - b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.6e+21], t$95$1, If[LessEqual[y, -1.45e-112], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-145], t$95$1, If[LessEqual[y, 8.5e-84], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-70], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-63], N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(a - b\right)\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-112}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-70}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;y \leq 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.6e21 or -1.44999999999999996e-112 < y < -2.40000000000000015e-145 or 1.00000000000000007e-63 < y Initial program 47.7%
Taylor expanded in y around inf 70.8%
Taylor expanded in b around 0 70.8%
neg-mul-170.8%
associate-+r+70.8%
+-commutative70.8%
associate-+l+70.8%
sub-neg70.8%
Simplified70.8%
if -7.6e21 < y < -1.44999999999999996e-112Initial program 82.0%
Taylor expanded in t around 0 67.6%
sub-neg67.6%
mul-1-neg67.6%
+-commutative67.6%
associate-+r+67.6%
+-commutative67.6%
associate-*r*67.6%
distribute-rgt-in67.6%
mul-1-neg67.6%
+-commutative67.6%
+-commutative67.6%
Simplified67.6%
Taylor expanded in x around inf 60.9%
associate-/l*60.9%
Simplified60.9%
if -2.40000000000000015e-145 < y < 8.4999999999999994e-84Initial program 81.7%
Taylor expanded in t around inf 46.0%
div-inv45.9%
+-commutative45.9%
associate-+l+45.9%
+-commutative45.9%
Applied egg-rr45.9%
Taylor expanded in y around 0 45.9%
associate-/l*60.3%
Simplified60.3%
if 8.4999999999999994e-84 < y < 1.15e-70Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
if 1.15e-70 < y < 1.00000000000000007e-63Initial program 99.5%
Taylor expanded in t around 0 68.3%
sub-neg68.3%
mul-1-neg68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-*r*68.3%
distribute-rgt-in68.3%
mul-1-neg68.3%
+-commutative68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in z around 0 68.3%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
Final simplification67.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (- a b))) (t_2 (+ t (+ x y))))
(if (<= y -9e+23)
t_1
(if (<= y -1.95e-116)
(+ z (/ y (/ x (- a b))))
(if (<= y -2.4e-145)
t_1
(if (<= y 3.5e-83)
(* a (/ t t_2))
(if (<= y 1.1e-69)
(* (+ x y) (/ z t_2))
(if (<= y 1e-63) (/ y (/ (+ x y) (- a b))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double t_2 = t + (x + y);
double tmp;
if (y <= -9e+23) {
tmp = t_1;
} else if (y <= -1.95e-116) {
tmp = z + (y / (x / (a - b)));
} else if (y <= -2.4e-145) {
tmp = t_1;
} else if (y <= 3.5e-83) {
tmp = a * (t / t_2);
} else if (y <= 1.1e-69) {
tmp = (x + y) * (z / t_2);
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z + (a - b)
t_2 = t + (x + y)
if (y <= (-9d+23)) then
tmp = t_1
else if (y <= (-1.95d-116)) then
tmp = z + (y / (x / (a - b)))
else if (y <= (-2.4d-145)) then
tmp = t_1
else if (y <= 3.5d-83) then
tmp = a * (t / t_2)
else if (y <= 1.1d-69) then
tmp = (x + y) * (z / t_2)
else if (y <= 1d-63) then
tmp = y / ((x + y) / (a - b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double t_2 = t + (x + y);
double tmp;
if (y <= -9e+23) {
tmp = t_1;
} else if (y <= -1.95e-116) {
tmp = z + (y / (x / (a - b)));
} else if (y <= -2.4e-145) {
tmp = t_1;
} else if (y <= 3.5e-83) {
tmp = a * (t / t_2);
} else if (y <= 1.1e-69) {
tmp = (x + y) * (z / t_2);
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a - b) t_2 = t + (x + y) tmp = 0 if y <= -9e+23: tmp = t_1 elif y <= -1.95e-116: tmp = z + (y / (x / (a - b))) elif y <= -2.4e-145: tmp = t_1 elif y <= 3.5e-83: tmp = a * (t / t_2) elif y <= 1.1e-69: tmp = (x + y) * (z / t_2) elif y <= 1e-63: tmp = y / ((x + y) / (a - b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a - b)) t_2 = Float64(t + Float64(x + y)) tmp = 0.0 if (y <= -9e+23) tmp = t_1; elseif (y <= -1.95e-116) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= -2.4e-145) tmp = t_1; elseif (y <= 3.5e-83) tmp = Float64(a * Float64(t / t_2)); elseif (y <= 1.1e-69) tmp = Float64(Float64(x + y) * Float64(z / t_2)); elseif (y <= 1e-63) tmp = Float64(y / Float64(Float64(x + y) / Float64(a - b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (a - b); t_2 = t + (x + y); tmp = 0.0; if (y <= -9e+23) tmp = t_1; elseif (y <= -1.95e-116) tmp = z + (y / (x / (a - b))); elseif (y <= -2.4e-145) tmp = t_1; elseif (y <= 3.5e-83) tmp = a * (t / t_2); elseif (y <= 1.1e-69) tmp = (x + y) * (z / t_2); elseif (y <= 1e-63) tmp = y / ((x + y) / (a - b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+23], t$95$1, If[LessEqual[y, -1.95e-116], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-145], t$95$1, If[LessEqual[y, 3.5e-83], N[(a * N[(t / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-69], N[(N[(x + y), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-63], N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(a - b\right)\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-116}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-83}:\\
\;\;\;\;a \cdot \frac{t}{t_2}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-69}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t_2}\\
\mathbf{elif}\;y \leq 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -8.99999999999999958e23 or -1.95e-116 < y < -2.40000000000000015e-145 or 1.00000000000000007e-63 < y Initial program 47.7%
Taylor expanded in y around inf 70.8%
Taylor expanded in b around 0 70.8%
neg-mul-170.8%
associate-+r+70.8%
+-commutative70.8%
associate-+l+70.8%
sub-neg70.8%
Simplified70.8%
if -8.99999999999999958e23 < y < -1.95e-116Initial program 82.0%
Taylor expanded in t around 0 67.6%
sub-neg67.6%
mul-1-neg67.6%
+-commutative67.6%
associate-+r+67.6%
+-commutative67.6%
associate-*r*67.6%
distribute-rgt-in67.6%
mul-1-neg67.6%
+-commutative67.6%
+-commutative67.6%
Simplified67.6%
Taylor expanded in x around inf 60.9%
associate-/l*60.9%
Simplified60.9%
if -2.40000000000000015e-145 < y < 3.5000000000000003e-83Initial program 81.7%
Taylor expanded in t around inf 46.0%
+-commutative46.0%
*-un-lft-identity46.0%
times-frac60.3%
associate-+l+60.3%
+-commutative60.3%
Applied egg-rr60.3%
if 3.5000000000000003e-83 < y < 1.1e-69Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
if 1.1e-69 < y < 1.00000000000000007e-63Initial program 99.5%
Taylor expanded in t around 0 68.3%
sub-neg68.3%
mul-1-neg68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-*r*68.3%
distribute-rgt-in68.3%
mul-1-neg68.3%
+-commutative68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in z around 0 68.3%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
Final simplification67.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= a -3e-7)
(not
(or (<= a -4.2e-40) (and (not (<= a -9.5e-89)) (<= a 1.25e-138)))))
(+ z (* a (+ (/ y t_1) (/ t t_1))))
(/ (- (* z (+ x y)) (* y b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((a <= -3e-7) || !((a <= -4.2e-40) || (!(a <= -9.5e-89) && (a <= 1.25e-138)))) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = ((z * (x + y)) - (y * b)) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((a <= (-3d-7)) .or. (.not. (a <= (-4.2d-40)) .or. (.not. (a <= (-9.5d-89))) .and. (a <= 1.25d-138))) then
tmp = z + (a * ((y / t_1) + (t / t_1)))
else
tmp = ((z * (x + y)) - (y * b)) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((a <= -3e-7) || !((a <= -4.2e-40) || (!(a <= -9.5e-89) && (a <= 1.25e-138)))) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = ((z * (x + y)) - (y * b)) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (a <= -3e-7) or not ((a <= -4.2e-40) or (not (a <= -9.5e-89) and (a <= 1.25e-138))): tmp = z + (a * ((y / t_1) + (t / t_1))) else: tmp = ((z * (x + y)) - (y * b)) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((a <= -3e-7) || !((a <= -4.2e-40) || (!(a <= -9.5e-89) && (a <= 1.25e-138)))) tmp = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1)))); else tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((a <= -3e-7) || ~(((a <= -4.2e-40) || (~((a <= -9.5e-89)) && (a <= 1.25e-138))))) tmp = z + (a * ((y / t_1) + (t / t_1))); else tmp = ((z * (x + y)) - (y * b)) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -3e-7], N[Not[Or[LessEqual[a, -4.2e-40], And[N[Not[LessEqual[a, -9.5e-89]], $MachinePrecision], LessEqual[a, 1.25e-138]]]], $MachinePrecision]], N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;a \leq -3 \cdot 10^{-7} \lor \neg \left(a \leq -4.2 \cdot 10^{-40} \lor \neg \left(a \leq -9.5 \cdot 10^{-89}\right) \land a \leq 1.25 \cdot 10^{-138}\right):\\
\;\;\;\;z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\
\end{array}
\end{array}
if a < -2.9999999999999999e-7 or -4.20000000000000036e-40 < a < -9.50000000000000028e-89 or 1.24999999999999997e-138 < a Initial program 53.9%
Taylor expanded in a around 0 73.3%
associate--l+73.3%
+-commutative73.3%
associate-+r+73.3%
associate-+r+73.3%
div-sub73.3%
+-commutative73.3%
*-commutative73.3%
associate-+r+73.3%
Simplified73.3%
Taylor expanded in x around inf 77.1%
if -2.9999999999999999e-7 < a < -4.20000000000000036e-40 or -9.50000000000000028e-89 < a < 1.24999999999999997e-138Initial program 80.8%
Taylor expanded in a around 0 71.6%
+-commutative71.6%
*-commutative71.6%
Simplified71.6%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (- a b))))
(if (<= y -2e+22)
t_1
(if (<= y -1.95e-122)
(+ z (/ y (/ x (- a b))))
(if (<= y 5.3e-83)
(/ a (/ (+ y (+ x t)) (+ y t)))
(if (<= y 4.6e-71)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= y 1e-63) (/ y (/ (+ x y) (- a b))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double tmp;
if (y <= -2e+22) {
tmp = t_1;
} else if (y <= -1.95e-122) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 5.3e-83) {
tmp = a / ((y + (x + t)) / (y + t));
} else if (y <= 4.6e-71) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z + (a - b)
if (y <= (-2d+22)) then
tmp = t_1
else if (y <= (-1.95d-122)) then
tmp = z + (y / (x / (a - b)))
else if (y <= 5.3d-83) then
tmp = a / ((y + (x + t)) / (y + t))
else if (y <= 4.6d-71) then
tmp = (x + y) * (z / (t + (x + y)))
else if (y <= 1d-63) then
tmp = y / ((x + y) / (a - b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double tmp;
if (y <= -2e+22) {
tmp = t_1;
} else if (y <= -1.95e-122) {
tmp = z + (y / (x / (a - b)));
} else if (y <= 5.3e-83) {
tmp = a / ((y + (x + t)) / (y + t));
} else if (y <= 4.6e-71) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (y <= 1e-63) {
tmp = y / ((x + y) / (a - b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a - b) tmp = 0 if y <= -2e+22: tmp = t_1 elif y <= -1.95e-122: tmp = z + (y / (x / (a - b))) elif y <= 5.3e-83: tmp = a / ((y + (x + t)) / (y + t)) elif y <= 4.6e-71: tmp = (x + y) * (z / (t + (x + y))) elif y <= 1e-63: tmp = y / ((x + y) / (a - b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a - b)) tmp = 0.0 if (y <= -2e+22) tmp = t_1; elseif (y <= -1.95e-122) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif (y <= 5.3e-83) tmp = Float64(a / Float64(Float64(y + Float64(x + t)) / Float64(y + t))); elseif (y <= 4.6e-71) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (y <= 1e-63) tmp = Float64(y / Float64(Float64(x + y) / Float64(a - b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (a - b); tmp = 0.0; if (y <= -2e+22) tmp = t_1; elseif (y <= -1.95e-122) tmp = z + (y / (x / (a - b))); elseif (y <= 5.3e-83) tmp = a / ((y + (x + t)) / (y + t)); elseif (y <= 4.6e-71) tmp = (x + y) * (z / (t + (x + y))); elseif (y <= 1e-63) tmp = y / ((x + y) / (a - b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+22], t$95$1, If[LessEqual[y, -1.95e-122], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.3e-83], N[(a / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-71], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-63], N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(a - b\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-122}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-71}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;y \leq 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2e22 or 1.00000000000000007e-63 < y Initial program 44.7%
Taylor expanded in y around inf 72.1%
Taylor expanded in b around 0 72.1%
neg-mul-172.1%
associate-+r+72.1%
+-commutative72.1%
associate-+l+72.1%
sub-neg72.1%
Simplified72.1%
if -2e22 < y < -1.94999999999999995e-122Initial program 83.5%
Taylor expanded in t around 0 66.3%
sub-neg66.3%
mul-1-neg66.3%
+-commutative66.3%
associate-+r+66.3%
+-commutative66.3%
associate-*r*66.3%
distribute-rgt-in66.3%
mul-1-neg66.3%
+-commutative66.3%
+-commutative66.3%
Simplified66.3%
Taylor expanded in x around inf 60.2%
associate-/l*60.1%
Simplified60.1%
if -1.94999999999999995e-122 < y < 5.3e-83Initial program 82.3%
Taylor expanded in a around inf 46.7%
associate-/l*60.7%
associate-+r+60.7%
Simplified60.7%
if 5.3e-83 < y < 4.5999999999999997e-71Initial program 99.4%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
+-commutative91.9%
*-commutative91.9%
associate-*r/92.5%
Simplified92.5%
if 4.5999999999999997e-71 < y < 1.00000000000000007e-63Initial program 99.5%
Taylor expanded in t around 0 68.3%
sub-neg68.3%
mul-1-neg68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-*r*68.3%
distribute-rgt-in68.3%
mul-1-neg68.3%
+-commutative68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in z around 0 68.3%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
Final simplification67.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (- a b))))
(if (<= y -1e+22)
t_1
(if (<= y -5.5e-96)
(+ z (/ y (/ x (- a b))))
(if (or (<= y -3e-145) (not (<= y 3.7e-72)))
t_1
(/ a (/ (+ x t) t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a - b);
double tmp;
if (y <= -1e+22) {
tmp = t_1;
} else if (y <= -5.5e-96) {
tmp = z + (y / (x / (a - b)));
} else if ((y <= -3e-145) || !(y <= 3.7e-72)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z + (a - b)
if (y <= (-1d+22)) then
tmp = t_1
else if (y <= (-5.5d-96)) then
tmp = z + (y / (x / (a - b)))
else if ((y <= (-3d-145)) .or. (.not. (y <= 3.7d-72))) then
tmp = t_1
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 t_1 = z + (a - b);
double tmp;
if (y <= -1e+22) {
tmp = t_1;
} else if (y <= -5.5e-96) {
tmp = z + (y / (x / (a - b)));
} else if ((y <= -3e-145) || !(y <= 3.7e-72)) {
tmp = t_1;
} else {
tmp = a / ((x + t) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a - b) tmp = 0 if y <= -1e+22: tmp = t_1 elif y <= -5.5e-96: tmp = z + (y / (x / (a - b))) elif (y <= -3e-145) or not (y <= 3.7e-72): tmp = t_1 else: tmp = a / ((x + t) / t) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a - b)) tmp = 0.0 if (y <= -1e+22) tmp = t_1; elseif (y <= -5.5e-96) tmp = Float64(z + Float64(y / Float64(x / Float64(a - b)))); elseif ((y <= -3e-145) || !(y <= 3.7e-72)) tmp = t_1; else tmp = Float64(a / Float64(Float64(x + t) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (a - b); tmp = 0.0; if (y <= -1e+22) tmp = t_1; elseif (y <= -5.5e-96) tmp = z + (y / (x / (a - b))); elseif ((y <= -3e-145) || ~((y <= 3.7e-72))) tmp = t_1; else tmp = a / ((x + t) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+22], t$95$1, If[LessEqual[y, -5.5e-96], N[(z + N[(y / N[(x / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3e-145], N[Not[LessEqual[y, 3.7e-72]], $MachinePrecision]], t$95$1, N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(a - b\right)\\
\mathbf{if}\;y \leq -1 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-96}:\\
\;\;\;\;z + \frac{y}{\frac{x}{a - b}}\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-145} \lor \neg \left(y \leq 3.7 \cdot 10^{-72}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\end{array}
\end{array}
if y < -1e22 or -5.4999999999999997e-96 < y < -2.99999999999999992e-145 or 3.6999999999999998e-72 < y Initial program 49.0%
Taylor expanded in y around inf 70.3%
Taylor expanded in b around 0 70.3%
neg-mul-170.3%
associate-+r+70.3%
+-commutative70.3%
associate-+l+70.3%
sub-neg70.3%
Simplified70.3%
if -1e22 < y < -5.4999999999999997e-96Initial program 82.0%
Taylor expanded in t around 0 67.6%
sub-neg67.6%
mul-1-neg67.6%
+-commutative67.6%
associate-+r+67.6%
+-commutative67.6%
associate-*r*67.6%
distribute-rgt-in67.6%
mul-1-neg67.6%
+-commutative67.6%
+-commutative67.6%
Simplified67.6%
Taylor expanded in x around inf 60.9%
associate-/l*60.9%
Simplified60.9%
if -2.99999999999999992e-145 < y < 3.6999999999999998e-72Initial program 82.6%
Taylor expanded in t around inf 43.8%
div-inv43.7%
+-commutative43.7%
associate-+l+43.7%
+-commutative43.7%
Applied egg-rr43.7%
Taylor expanded in y around 0 43.8%
associate-/l*57.4%
Simplified57.4%
Final simplification65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ y t) (/ a (+ y (+ x t))))))
(if (<= a -1.7e+33)
t_1
(if (<= a -3.6e-250)
(* (+ x y) (/ z (+ t (+ x y))))
(if (<= a 9.5e+19) (+ z (- a b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + t) * (a / (y + (x + t)));
double tmp;
if (a <= -1.7e+33) {
tmp = t_1;
} else if (a <= -3.6e-250) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (a <= 9.5e+19) {
tmp = z + (a - b);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y + t) * (a / (y + (x + t)))
if (a <= (-1.7d+33)) then
tmp = t_1
else if (a <= (-3.6d-250)) then
tmp = (x + y) * (z / (t + (x + y)))
else if (a <= 9.5d+19) then
tmp = z + (a - b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + t) * (a / (y + (x + t)));
double tmp;
if (a <= -1.7e+33) {
tmp = t_1;
} else if (a <= -3.6e-250) {
tmp = (x + y) * (z / (t + (x + y)));
} else if (a <= 9.5e+19) {
tmp = z + (a - b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y + t) * (a / (y + (x + t))) tmp = 0 if a <= -1.7e+33: tmp = t_1 elif a <= -3.6e-250: tmp = (x + y) * (z / (t + (x + y))) elif a <= 9.5e+19: tmp = z + (a - b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + t) * Float64(a / Float64(y + Float64(x + t)))) tmp = 0.0 if (a <= -1.7e+33) tmp = t_1; elseif (a <= -3.6e-250) tmp = Float64(Float64(x + y) * Float64(z / Float64(t + Float64(x + y)))); elseif (a <= 9.5e+19) tmp = Float64(z + Float64(a - b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y + t) * (a / (y + (x + t))); tmp = 0.0; if (a <= -1.7e+33) tmp = t_1; elseif (a <= -3.6e-250) tmp = (x + y) * (z / (t + (x + y))); elseif (a <= 9.5e+19) tmp = z + (a - b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + t), $MachinePrecision] * N[(a / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e+33], t$95$1, If[LessEqual[a, -3.6e-250], N[(N[(x + y), $MachinePrecision] * N[(z / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+19], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot \frac{a}{y + \left(x + t\right)}\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-250}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{t + \left(x + y\right)}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+19}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.7e33 or 9.5e19 < a Initial program 48.2%
Taylor expanded in a around inf 37.5%
expm1-log1p-u19.2%
expm1-udef15.1%
associate-+r+15.1%
associate-/l*33.0%
+-commutative33.0%
+-commutative33.0%
+-commutative33.0%
Applied egg-rr33.0%
expm1-def36.4%
expm1-log1p72.3%
associate-/r/70.5%
+-commutative70.5%
Simplified70.5%
if -1.7e33 < a < -3.59999999999999982e-250Initial program 76.8%
Taylor expanded in z around inf 46.5%
+-commutative46.5%
Simplified46.5%
Taylor expanded in z around 0 46.5%
+-commutative46.5%
+-commutative46.5%
*-commutative46.5%
associate-*r/57.5%
Simplified57.5%
if -3.59999999999999982e-250 < a < 9.5e19Initial program 73.7%
Taylor expanded in y around inf 56.6%
Taylor expanded in b around 0 56.6%
neg-mul-156.6%
associate-+r+56.6%
+-commutative56.6%
associate-+l+56.6%
sub-neg56.6%
Simplified56.6%
Final simplification63.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (/ a (/ t_1 (+ y t)))))
(if (<= a -1e+15)
t_2
(if (<= a 1.7e-170)
(/ (- (* z (+ x y)) (* y b)) t_1)
(if (<= a 1.05e-12) (/ z (/ t_1 (+ x y))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a / (t_1 / (y + t));
double tmp;
if (a <= -1e+15) {
tmp = t_2;
} else if (a <= 1.7e-170) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (a <= 1.05e-12) {
tmp = z / (t_1 / (x + y));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = a / (t_1 / (y + t))
if (a <= (-1d+15)) then
tmp = t_2
else if (a <= 1.7d-170) then
tmp = ((z * (x + y)) - (y * b)) / t_1
else if (a <= 1.05d-12) then
tmp = z / (t_1 / (x + y))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a / (t_1 / (y + t));
double tmp;
if (a <= -1e+15) {
tmp = t_2;
} else if (a <= 1.7e-170) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (a <= 1.05e-12) {
tmp = z / (t_1 / (x + y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a / (t_1 / (y + t)) tmp = 0 if a <= -1e+15: tmp = t_2 elif a <= 1.7e-170: tmp = ((z * (x + y)) - (y * b)) / t_1 elif a <= 1.05e-12: tmp = z / (t_1 / (x + y)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a / Float64(t_1 / Float64(y + t))) tmp = 0.0 if (a <= -1e+15) tmp = t_2; elseif (a <= 1.7e-170) tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); elseif (a <= 1.05e-12) tmp = Float64(z / Float64(t_1 / Float64(x + y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a / (t_1 / (y + t)); tmp = 0.0; if (a <= -1e+15) tmp = t_2; elseif (a <= 1.7e-170) tmp = ((z * (x + y)) - (y * b)) / t_1; elseif (a <= 1.05e-12) tmp = z / (t_1 / (x + y)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e+15], t$95$2, If[LessEqual[a, 1.7e-170], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[a, 1.05e-12], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{a}{\frac{t_1}{y + t}}\\
\mathbf{if}\;a \leq -1 \cdot 10^{+15}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-170}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-12}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1e15 or 1.04999999999999997e-12 < a Initial program 49.2%
Taylor expanded in a around inf 37.7%
associate-/l*70.7%
associate-+r+70.7%
Simplified70.7%
if -1e15 < a < 1.70000000000000006e-170Initial program 79.9%
Taylor expanded in a around 0 69.1%
+-commutative69.1%
*-commutative69.1%
Simplified69.1%
if 1.70000000000000006e-170 < a < 1.04999999999999997e-12Initial program 64.6%
Taylor expanded in z around inf 30.3%
associate-/l*61.8%
associate-+r+61.8%
+-commutative61.8%
Simplified61.8%
Final simplification69.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.6e-145) (not (<= y 3.5e-72))) (+ z (- a b)) (/ a (/ (+ x t) t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.6e-145) || !(y <= 3.5e-72)) {
tmp = z + (a - b);
} else {
tmp = a / ((x + t) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.6d-145)) .or. (.not. (y <= 3.5d-72))) then
tmp = z + (a - b)
else
tmp = a / ((x + t) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.6e-145) || !(y <= 3.5e-72)) {
tmp = z + (a - b);
} else {
tmp = a / ((x + t) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.6e-145) or not (y <= 3.5e-72): tmp = z + (a - b) else: tmp = a / ((x + t) / t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.6e-145) || !(y <= 3.5e-72)) tmp = Float64(z + Float64(a - b)); else tmp = Float64(a / Float64(Float64(x + t) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.6e-145) || ~((y <= 3.5e-72))) tmp = z + (a - b); else tmp = a / ((x + t) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.6e-145], N[Not[LessEqual[y, 3.5e-72]], $MachinePrecision]], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-145} \lor \neg \left(y \leq 3.5 \cdot 10^{-72}\right):\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\end{array}
\end{array}
if y < -2.6e-145 or 3.5e-72 < y Initial program 52.9%
Taylor expanded in y around inf 66.7%
Taylor expanded in b around 0 66.7%
neg-mul-166.7%
associate-+r+66.7%
+-commutative66.7%
associate-+l+66.7%
sub-neg66.7%
Simplified66.7%
if -2.6e-145 < y < 3.5e-72Initial program 82.6%
Taylor expanded in t around inf 43.8%
div-inv43.7%
+-commutative43.7%
associate-+l+43.7%
+-commutative43.7%
Applied egg-rr43.7%
Taylor expanded in y around 0 43.8%
associate-/l*57.4%
Simplified57.4%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.3e+246) z (if (<= x 1e+218) (+ z (- a b)) (* t (/ a x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.3e+246) {
tmp = z;
} else if (x <= 1e+218) {
tmp = z + (a - b);
} else {
tmp = t * (a / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-4.3d+246)) then
tmp = z
else if (x <= 1d+218) then
tmp = z + (a - b)
else
tmp = t * (a / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.3e+246) {
tmp = z;
} else if (x <= 1e+218) {
tmp = z + (a - b);
} else {
tmp = t * (a / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.3e+246: tmp = z elif x <= 1e+218: tmp = z + (a - b) else: tmp = t * (a / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.3e+246) tmp = z; elseif (x <= 1e+218) tmp = Float64(z + Float64(a - b)); else tmp = Float64(t * Float64(a / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.3e+246) tmp = z; elseif (x <= 1e+218) tmp = z + (a - b); else tmp = t * (a / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.3e+246], z, If[LessEqual[x, 1e+218], N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision], N[(t * N[(a / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+246}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 10^{+218}:\\
\;\;\;\;z + \left(a - b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{a}{x}\\
\end{array}
\end{array}
if x < -4.30000000000000028e246Initial program 59.1%
Taylor expanded in x around inf 58.3%
if -4.30000000000000028e246 < x < 1.00000000000000008e218Initial program 62.9%
Taylor expanded in y around inf 59.5%
Taylor expanded in b around 0 59.5%
neg-mul-159.5%
associate-+r+59.5%
+-commutative59.5%
associate-+l+59.5%
sub-neg59.5%
Simplified59.5%
if 1.00000000000000008e218 < x Initial program 37.0%
Taylor expanded in t around inf 25.6%
div-inv25.4%
+-commutative25.4%
associate-+l+25.4%
+-commutative25.4%
Applied egg-rr25.4%
Taylor expanded in x around inf 25.6%
associate-/l*52.6%
associate-/r/63.0%
Simplified63.0%
Final simplification59.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.5e+14) a (if (<= a 3.2e-13) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.5e+14) {
tmp = a;
} else if (a <= 3.2e-13) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-7.5d+14)) then
tmp = a
else if (a <= 3.2d-13) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.5e+14) {
tmp = a;
} else if (a <= 3.2e-13) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.5e+14: tmp = a elif a <= 3.2e-13: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.5e+14) tmp = a; elseif (a <= 3.2e-13) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.5e+14) tmp = a; elseif (a <= 3.2e-13) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.5e+14], a, If[LessEqual[a, 3.2e-13], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+14}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-13}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -7.5e14 or 3.2e-13 < a Initial program 49.2%
Taylor expanded in t around inf 51.9%
if -7.5e14 < a < 3.2e-13Initial program 76.1%
Taylor expanded in x around inf 41.2%
Final simplification46.9%
(FPCore (x y z t a b) :precision binary64 (+ z a))
double code(double x, double y, double z, double t, double a, double b) {
return z + a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = z + a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z + a;
}
def code(x, y, z, t, a, b): return z + a
function code(x, y, z, t, a, b) return Float64(z + a) end
function tmp = code(x, y, z, t, a, b) tmp = z + a; end
code[x_, y_, z_, t_, a_, b_] := N[(z + a), $MachinePrecision]
\begin{array}{l}
\\
z + a
\end{array}
Initial program 61.8%
Taylor expanded in y around inf 56.1%
Taylor expanded in b around 0 50.7%
+-commutative50.7%
Simplified50.7%
Final simplification50.7%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 61.8%
Taylor expanded in t around inf 34.9%
Final simplification34.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t_2}{t_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
herbie shell --seed 2024024
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))