
(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 16 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 t) a) (* (+ x y) z)) (* y b)) (+ y (+ x t))))
(t_2 (+ (+ x y) t)))
(if (<= t_1 (- INFINITY))
(- (+ a (* z (+ (/ x t_2) (/ y t_2)))) (/ (* y b) t_2))
(if (<= t_1 2e+265) t_1 (- (+ z a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t));
double t_2 = (x + y) + t;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (a + (z * ((x / t_2) + (y / t_2)))) - ((y * b) / t_2);
} else if (t_1 <= 2e+265) {
tmp = t_1;
} else {
tmp = (z + a) - b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t));
double t_2 = (x + y) + t;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (a + (z * ((x / t_2) + (y / t_2)))) - ((y * b) / t_2);
} else if (t_1 <= 2e+265) {
tmp = t_1;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t)) t_2 = (x + y) + t tmp = 0 if t_1 <= -math.inf: tmp = (a + (z * ((x / t_2) + (y / t_2)))) - ((y * b) / t_2) elif t_1 <= 2e+265: tmp = t_1 else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + Float64(Float64(x + y) * z)) - Float64(y * b)) / Float64(y + Float64(x + t))) t_2 = Float64(Float64(x + y) + t) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(a + Float64(z * Float64(Float64(x / t_2) + Float64(y / t_2)))) - Float64(Float64(y * b) / t_2)); elseif (t_1 <= 2e+265) tmp = t_1; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t)); t_2 = (x + y) + t; tmp = 0.0; if (t_1 <= -Inf) tmp = (a + (z * ((x / t_2) + (y / t_2)))) - ((y * b) / t_2); elseif (t_1 <= 2e+265) tmp = t_1; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(a + N[(z * N[(N[(x / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+265], t$95$1, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(y + t\right) \cdot a + \left(x + y\right) \cdot z\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := \left(x + y\right) + t\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\left(a + z \cdot \left(\frac{x}{t_2} + \frac{y}{t_2}\right)\right) - \frac{y \cdot b}{t_2}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+265}:\\
\;\;\;\;t_1\\
\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 6.1%
Taylor expanded in z around 0 42.5%
Taylor expanded in t around inf 74.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)) < 2.00000000000000013e265Initial program 99.7%
if 2.00000000000000013e265 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 9.4%
Taylor expanded in y around inf 74.4%
Final simplification89.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* (+ y t) a) (* (+ x y) z)) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+265))) (- (+ 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) + ((x + y) * z)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+265)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+265)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+265): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + Float64(Float64(x + y) * z)) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+265)) tmp = Float64(Float64(z + 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) + ((x + y) * z)) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+265))) 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[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+265]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(y + t\right) \cdot a + \left(x + y\right) \cdot z\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+265}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;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 2.00000000000000013e265 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 8.1%
Taylor expanded in y around inf 73.1%
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.00000000000000013e265Initial program 99.7%
Final simplification88.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t))) (t_2 (- (+ z a) b)))
(if (<= y -7.8e-75)
t_2
(if (<= y -1.3e-302)
(/ z (/ t_1 (+ x y)))
(if (<= y 5.5e-155)
(/ a (/ t_1 (+ y t)))
(if (<= y 1.45e-11)
(/ (- (* (+ x y) z) (* y b)) (+ y (+ x t)))
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = (z + a) - b;
double tmp;
if (y <= -7.8e-75) {
tmp = t_2;
} else if (y <= -1.3e-302) {
tmp = z / (t_1 / (x + y));
} else if (y <= 5.5e-155) {
tmp = a / (t_1 / (y + t));
} else if (y <= 1.45e-11) {
tmp = (((x + y) * z) - (y * b)) / (y + (x + t));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y + t)
t_2 = (z + a) - b
if (y <= (-7.8d-75)) then
tmp = t_2
else if (y <= (-1.3d-302)) then
tmp = z / (t_1 / (x + y))
else if (y <= 5.5d-155) then
tmp = a / (t_1 / (y + t))
else if (y <= 1.45d-11) then
tmp = (((x + y) * z) - (y * b)) / (y + (x + t))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = (z + a) - b;
double tmp;
if (y <= -7.8e-75) {
tmp = t_2;
} else if (y <= -1.3e-302) {
tmp = z / (t_1 / (x + y));
} else if (y <= 5.5e-155) {
tmp = a / (t_1 / (y + t));
} else if (y <= 1.45e-11) {
tmp = (((x + y) * z) - (y * b)) / (y + (x + t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = (z + a) - b tmp = 0 if y <= -7.8e-75: tmp = t_2 elif y <= -1.3e-302: tmp = z / (t_1 / (x + y)) elif y <= 5.5e-155: tmp = a / (t_1 / (y + t)) elif y <= 1.45e-11: tmp = (((x + y) * z) - (y * b)) / (y + (x + t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -7.8e-75) tmp = t_2; elseif (y <= -1.3e-302) tmp = Float64(z / Float64(t_1 / Float64(x + y))); elseif (y <= 5.5e-155) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= 1.45e-11) tmp = Float64(Float64(Float64(Float64(x + y) * z) - Float64(y * b)) / Float64(y + Float64(x + t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = (z + a) - b; tmp = 0.0; if (y <= -7.8e-75) tmp = t_2; elseif (y <= -1.3e-302) tmp = z / (t_1 / (x + y)); elseif (y <= 5.5e-155) tmp = a / (t_1 / (y + t)); elseif (y <= 1.45e-11) tmp = (((x + y) * z) - (y * b)) / (y + (x + t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -7.8e-75], t$95$2, If[LessEqual[y, -1.3e-302], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-155], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-11], N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{-75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-302}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-11}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.8000000000000003e-75 or 1.45e-11 < y Initial program 47.5%
Taylor expanded in y around inf 72.0%
if -7.8000000000000003e-75 < y < -1.30000000000000006e-302Initial program 71.7%
Taylor expanded in z around inf 43.0%
associate-/l*66.1%
+-commutative66.1%
associate-+r+66.1%
+-commutative66.1%
Simplified66.1%
if -1.30000000000000006e-302 < y < 5.50000000000000018e-155Initial program 81.7%
Taylor expanded in a around inf 62.5%
associate-/l*73.0%
+-commutative73.0%
associate-+r+73.0%
Simplified73.0%
if 5.50000000000000018e-155 < y < 1.45e-11Initial program 88.2%
Taylor expanded in a around 0 77.5%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ y t))) (t_2 (/ z (/ t_1 (+ x y)))) (t_3 (- (+ z a) b)))
(if (<= y -1.45e-73)
t_3
(if (<= y -9.5e-305)
t_2
(if (<= y 6.2e-155)
(/ a (/ t_1 (+ y t)))
(if (<= y 6.5e-38) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y + t);
double t_2 = z / (t_1 / (x + y));
double t_3 = (z + a) - b;
double tmp;
if (y <= -1.45e-73) {
tmp = t_3;
} else if (y <= -9.5e-305) {
tmp = t_2;
} else if (y <= 6.2e-155) {
tmp = a / (t_1 / (y + t));
} else if (y <= 6.5e-38) {
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 = x + (y + t)
t_2 = z / (t_1 / (x + y))
t_3 = (z + a) - b
if (y <= (-1.45d-73)) then
tmp = t_3
else if (y <= (-9.5d-305)) then
tmp = t_2
else if (y <= 6.2d-155) then
tmp = a / (t_1 / (y + t))
else if (y <= 6.5d-38) 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 = x + (y + t);
double t_2 = z / (t_1 / (x + y));
double t_3 = (z + a) - b;
double tmp;
if (y <= -1.45e-73) {
tmp = t_3;
} else if (y <= -9.5e-305) {
tmp = t_2;
} else if (y <= 6.2e-155) {
tmp = a / (t_1 / (y + t));
} else if (y <= 6.5e-38) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y + t) t_2 = z / (t_1 / (x + y)) t_3 = (z + a) - b tmp = 0 if y <= -1.45e-73: tmp = t_3 elif y <= -9.5e-305: tmp = t_2 elif y <= 6.2e-155: tmp = a / (t_1 / (y + t)) elif y <= 6.5e-38: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y + t)) t_2 = Float64(z / Float64(t_1 / Float64(x + y))) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.45e-73) tmp = t_3; elseif (y <= -9.5e-305) tmp = t_2; elseif (y <= 6.2e-155) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= 6.5e-38) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y + t); t_2 = z / (t_1 / (x + y)); t_3 = (z + a) - b; tmp = 0.0; if (y <= -1.45e-73) tmp = t_3; elseif (y <= -9.5e-305) tmp = t_2; elseif (y <= 6.2e-155) tmp = a / (t_1 / (y + t)); elseif (y <= 6.5e-38) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.45e-73], t$95$3, If[LessEqual[y, -9.5e-305], t$95$2, If[LessEqual[y, 6.2e-155], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-38], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := \frac{z}{\frac{t_1}{x + y}}\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-73}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-305}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -1.45e-73 or 6.49999999999999949e-38 < y Initial program 48.6%
Taylor expanded in y around inf 71.3%
if -1.45e-73 < y < -9.49999999999999902e-305 or 6.2e-155 < y < 6.49999999999999949e-38Initial program 80.2%
Taylor expanded in z around inf 48.4%
associate-/l*63.5%
+-commutative63.5%
associate-+r+63.5%
+-commutative63.5%
Simplified63.5%
if -9.49999999999999902e-305 < y < 6.2e-155Initial program 81.7%
Taylor expanded in a around inf 62.5%
associate-/l*73.0%
+-commutative73.0%
associate-+r+73.0%
Simplified73.0%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (/ b (/ x y)))))
(if (<= x -1e+117)
t_1
(if (<= x -1.45e+65)
(* t (/ a (+ x t)))
(if (<= x -2.4e+31)
(- z b)
(if (<= x -2.6e-131)
(+ z a)
(if (<= x 4.2e+91) (- (+ z a) b) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - (b / (x / y));
double tmp;
if (x <= -1e+117) {
tmp = t_1;
} else if (x <= -1.45e+65) {
tmp = t * (a / (x + t));
} else if (x <= -2.4e+31) {
tmp = z - b;
} else if (x <= -2.6e-131) {
tmp = z + a;
} else if (x <= 4.2e+91) {
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 = z - (b / (x / y))
if (x <= (-1d+117)) then
tmp = t_1
else if (x <= (-1.45d+65)) then
tmp = t * (a / (x + t))
else if (x <= (-2.4d+31)) then
tmp = z - b
else if (x <= (-2.6d-131)) then
tmp = z + a
else if (x <= 4.2d+91) 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 = z - (b / (x / y));
double tmp;
if (x <= -1e+117) {
tmp = t_1;
} else if (x <= -1.45e+65) {
tmp = t * (a / (x + t));
} else if (x <= -2.4e+31) {
tmp = z - b;
} else if (x <= -2.6e-131) {
tmp = z + a;
} else if (x <= 4.2e+91) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z - (b / (x / y)) tmp = 0 if x <= -1e+117: tmp = t_1 elif x <= -1.45e+65: tmp = t * (a / (x + t)) elif x <= -2.4e+31: tmp = z - b elif x <= -2.6e-131: tmp = z + a elif x <= 4.2e+91: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(b / Float64(x / y))) tmp = 0.0 if (x <= -1e+117) tmp = t_1; elseif (x <= -1.45e+65) tmp = Float64(t * Float64(a / Float64(x + t))); elseif (x <= -2.4e+31) tmp = Float64(z - b); elseif (x <= -2.6e-131) tmp = Float64(z + a); elseif (x <= 4.2e+91) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z - (b / (x / y)); tmp = 0.0; if (x <= -1e+117) tmp = t_1; elseif (x <= -1.45e+65) tmp = t * (a / (x + t)); elseif (x <= -2.4e+31) tmp = z - b; elseif (x <= -2.6e-131) tmp = z + a; elseif (x <= 4.2e+91) 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[(z - N[(b / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+117], t$95$1, If[LessEqual[x, -1.45e+65], N[(t * N[(a / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.4e+31], N[(z - b), $MachinePrecision], If[LessEqual[x, -2.6e-131], N[(z + a), $MachinePrecision], If[LessEqual[x, 4.2e+91], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z - \frac{b}{\frac{x}{y}}\\
\mathbf{if}\;x \leq -1 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{+65}:\\
\;\;\;\;t \cdot \frac{a}{x + t}\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{+31}:\\
\;\;\;\;z - b\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-131}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.00000000000000005e117 or 4.20000000000000015e91 < x Initial program 51.9%
Taylor expanded in x around inf 49.1%
associate--l+52.0%
associate-/l*56.4%
associate-/l*60.8%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in b around inf 52.2%
mul-1-neg52.2%
associate-*l/62.0%
*-commutative62.0%
distribute-lft-neg-in62.0%
Simplified62.0%
Taylor expanded in z around 0 52.2%
mul-1-neg52.2%
*-commutative52.2%
associate-/l*62.2%
sub-neg62.2%
associate-/l*52.2%
*-commutative52.2%
associate-/l*61.0%
Simplified61.0%
if -1.00000000000000005e117 < x < -1.45e65Initial program 71.5%
Taylor expanded in a around inf 48.7%
associate-/l*58.0%
+-commutative58.0%
associate-+r+58.0%
Simplified58.0%
Taylor expanded in y around 0 48.5%
+-commutative48.5%
Simplified48.5%
associate-/r/48.1%
Applied egg-rr48.1%
if -1.45e65 < x < -2.39999999999999982e31Initial program 45.3%
Taylor expanded in y around inf 73.1%
Taylor expanded in a around 0 79.2%
if -2.39999999999999982e31 < x < -2.59999999999999996e-131Initial program 74.3%
Taylor expanded in y around inf 70.3%
Taylor expanded in b around 0 75.4%
if -2.59999999999999996e-131 < x < 4.20000000000000015e91Initial program 63.3%
Taylor expanded in y around inf 67.9%
Final simplification66.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (/ y (/ x b)))))
(if (<= x -1.05e+118)
t_1
(if (<= x -7.5e+66)
(* t (/ a (+ x t)))
(if (<= x -2e+31)
(- z b)
(if (<= x -8e-131) (+ z a) (if (<= x 3.5e+91) (- (+ z a) b) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - (y / (x / b));
double tmp;
if (x <= -1.05e+118) {
tmp = t_1;
} else if (x <= -7.5e+66) {
tmp = t * (a / (x + t));
} else if (x <= -2e+31) {
tmp = z - b;
} else if (x <= -8e-131) {
tmp = z + a;
} else if (x <= 3.5e+91) {
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 = z - (y / (x / b))
if (x <= (-1.05d+118)) then
tmp = t_1
else if (x <= (-7.5d+66)) then
tmp = t * (a / (x + t))
else if (x <= (-2d+31)) then
tmp = z - b
else if (x <= (-8d-131)) then
tmp = z + a
else if (x <= 3.5d+91) 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 = z - (y / (x / b));
double tmp;
if (x <= -1.05e+118) {
tmp = t_1;
} else if (x <= -7.5e+66) {
tmp = t * (a / (x + t));
} else if (x <= -2e+31) {
tmp = z - b;
} else if (x <= -8e-131) {
tmp = z + a;
} else if (x <= 3.5e+91) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z - (y / (x / b)) tmp = 0 if x <= -1.05e+118: tmp = t_1 elif x <= -7.5e+66: tmp = t * (a / (x + t)) elif x <= -2e+31: tmp = z - b elif x <= -8e-131: tmp = z + a elif x <= 3.5e+91: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(y / Float64(x / b))) tmp = 0.0 if (x <= -1.05e+118) tmp = t_1; elseif (x <= -7.5e+66) tmp = Float64(t * Float64(a / Float64(x + t))); elseif (x <= -2e+31) tmp = Float64(z - b); elseif (x <= -8e-131) tmp = Float64(z + a); elseif (x <= 3.5e+91) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z - (y / (x / b)); tmp = 0.0; if (x <= -1.05e+118) tmp = t_1; elseif (x <= -7.5e+66) tmp = t * (a / (x + t)); elseif (x <= -2e+31) tmp = z - b; elseif (x <= -8e-131) tmp = z + a; elseif (x <= 3.5e+91) 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[(z - N[(y / N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+118], t$95$1, If[LessEqual[x, -7.5e+66], N[(t * N[(a / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2e+31], N[(z - b), $MachinePrecision], If[LessEqual[x, -8e-131], N[(z + a), $MachinePrecision], If[LessEqual[x, 3.5e+91], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z - \frac{y}{\frac{x}{b}}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{a}{x + t}\\
\mathbf{elif}\;x \leq -2 \cdot 10^{+31}:\\
\;\;\;\;z - b\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-131}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+91}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.05e118 or 3.50000000000000001e91 < x Initial program 51.9%
Taylor expanded in x around inf 49.1%
associate--l+52.0%
associate-/l*56.4%
associate-/l*60.8%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in b around inf 52.2%
mul-1-neg52.2%
associate-*l/62.0%
*-commutative62.0%
distribute-lft-neg-in62.0%
Simplified62.0%
distribute-lft-neg-out62.0%
unsub-neg62.0%
clear-num62.1%
un-div-inv62.2%
Applied egg-rr62.2%
if -1.05e118 < x < -7.50000000000000024e66Initial program 71.5%
Taylor expanded in a around inf 48.7%
associate-/l*58.0%
+-commutative58.0%
associate-+r+58.0%
Simplified58.0%
Taylor expanded in y around 0 48.5%
+-commutative48.5%
Simplified48.5%
associate-/r/48.1%
Applied egg-rr48.1%
if -7.50000000000000024e66 < x < -1.9999999999999999e31Initial program 45.3%
Taylor expanded in y around inf 73.1%
Taylor expanded in a around 0 79.2%
if -1.9999999999999999e31 < x < -7.9999999999999999e-131Initial program 74.3%
Taylor expanded in y around inf 70.3%
Taylor expanded in b around 0 75.4%
if -7.9999999999999999e-131 < x < 3.50000000000000001e91Initial program 63.3%
Taylor expanded in y around inf 67.9%
Final simplification66.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (/ y (/ x b)))))
(if (<= x -7.5e+118)
t_1
(if (<= x -3.3e+66)
(/ a (+ 1.0 (/ x t)))
(if (<= x -2.4e+31)
(- z b)
(if (<= x -8e-131) (+ z a) (if (<= x 4.8e+91) (- (+ z a) b) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - (y / (x / b));
double tmp;
if (x <= -7.5e+118) {
tmp = t_1;
} else if (x <= -3.3e+66) {
tmp = a / (1.0 + (x / t));
} else if (x <= -2.4e+31) {
tmp = z - b;
} else if (x <= -8e-131) {
tmp = z + a;
} else if (x <= 4.8e+91) {
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 = z - (y / (x / b))
if (x <= (-7.5d+118)) then
tmp = t_1
else if (x <= (-3.3d+66)) then
tmp = a / (1.0d0 + (x / t))
else if (x <= (-2.4d+31)) then
tmp = z - b
else if (x <= (-8d-131)) then
tmp = z + a
else if (x <= 4.8d+91) 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 = z - (y / (x / b));
double tmp;
if (x <= -7.5e+118) {
tmp = t_1;
} else if (x <= -3.3e+66) {
tmp = a / (1.0 + (x / t));
} else if (x <= -2.4e+31) {
tmp = z - b;
} else if (x <= -8e-131) {
tmp = z + a;
} else if (x <= 4.8e+91) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z - (y / (x / b)) tmp = 0 if x <= -7.5e+118: tmp = t_1 elif x <= -3.3e+66: tmp = a / (1.0 + (x / t)) elif x <= -2.4e+31: tmp = z - b elif x <= -8e-131: tmp = z + a elif x <= 4.8e+91: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(y / Float64(x / b))) tmp = 0.0 if (x <= -7.5e+118) tmp = t_1; elseif (x <= -3.3e+66) tmp = Float64(a / Float64(1.0 + Float64(x / t))); elseif (x <= -2.4e+31) tmp = Float64(z - b); elseif (x <= -8e-131) tmp = Float64(z + a); elseif (x <= 4.8e+91) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z - (y / (x / b)); tmp = 0.0; if (x <= -7.5e+118) tmp = t_1; elseif (x <= -3.3e+66) tmp = a / (1.0 + (x / t)); elseif (x <= -2.4e+31) tmp = z - b; elseif (x <= -8e-131) tmp = z + a; elseif (x <= 4.8e+91) 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[(z - N[(y / N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e+118], t$95$1, If[LessEqual[x, -3.3e+66], N[(a / N[(1.0 + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.4e+31], N[(z - b), $MachinePrecision], If[LessEqual[x, -8e-131], N[(z + a), $MachinePrecision], If[LessEqual[x, 4.8e+91], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z - \frac{y}{\frac{x}{b}}\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{+66}:\\
\;\;\;\;\frac{a}{1 + \frac{x}{t}}\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{+31}:\\
\;\;\;\;z - b\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-131}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+91}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -7.50000000000000003e118 or 4.79999999999999966e91 < x Initial program 51.9%
Taylor expanded in x around inf 49.1%
associate--l+52.0%
associate-/l*56.4%
associate-/l*60.8%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in b around inf 52.2%
mul-1-neg52.2%
associate-*l/62.0%
*-commutative62.0%
distribute-lft-neg-in62.0%
Simplified62.0%
distribute-lft-neg-out62.0%
unsub-neg62.0%
clear-num62.1%
un-div-inv62.2%
Applied egg-rr62.2%
if -7.50000000000000003e118 < x < -3.3000000000000001e66Initial program 71.5%
Taylor expanded in a around inf 48.7%
associate-/l*58.0%
+-commutative58.0%
associate-+r+58.0%
Simplified58.0%
Taylor expanded in t around inf 48.5%
if -3.3000000000000001e66 < x < -2.39999999999999982e31Initial program 45.3%
Taylor expanded in y around inf 73.1%
Taylor expanded in a around 0 79.2%
if -2.39999999999999982e31 < x < -7.9999999999999999e-131Initial program 74.3%
Taylor expanded in y around inf 70.3%
Taylor expanded in b around 0 75.4%
if -7.9999999999999999e-131 < x < 4.79999999999999966e91Initial program 63.3%
Taylor expanded in y around inf 67.9%
Final simplification66.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -1.5e-75)
t_1
(if (<= y -8.5e-301)
(/ x (/ (+ x t) z))
(if (<= y 1.9e-154)
(/ a (+ 1.0 (/ x t)))
(if (<= y 1.75e-40) (- z (/ b (/ x y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.5e-75) {
tmp = t_1;
} else if (y <= -8.5e-301) {
tmp = x / ((x + t) / z);
} else if (y <= 1.9e-154) {
tmp = a / (1.0 + (x / t));
} else if (y <= 1.75e-40) {
tmp = z - (b / (x / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-1.5d-75)) then
tmp = t_1
else if (y <= (-8.5d-301)) then
tmp = x / ((x + t) / z)
else if (y <= 1.9d-154) then
tmp = a / (1.0d0 + (x / t))
else if (y <= 1.75d-40) then
tmp = z - (b / (x / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.5e-75) {
tmp = t_1;
} else if (y <= -8.5e-301) {
tmp = x / ((x + t) / z);
} else if (y <= 1.9e-154) {
tmp = a / (1.0 + (x / t));
} else if (y <= 1.75e-40) {
tmp = z - (b / (x / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -1.5e-75: tmp = t_1 elif y <= -8.5e-301: tmp = x / ((x + t) / z) elif y <= 1.9e-154: tmp = a / (1.0 + (x / t)) elif y <= 1.75e-40: tmp = z - (b / (x / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.5e-75) tmp = t_1; elseif (y <= -8.5e-301) tmp = Float64(x / Float64(Float64(x + t) / z)); elseif (y <= 1.9e-154) tmp = Float64(a / Float64(1.0 + Float64(x / t))); elseif (y <= 1.75e-40) tmp = Float64(z - Float64(b / Float64(x / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -1.5e-75) tmp = t_1; elseif (y <= -8.5e-301) tmp = x / ((x + t) / z); elseif (y <= 1.9e-154) tmp = a / (1.0 + (x / t)); elseif (y <= 1.75e-40) tmp = z - (b / (x / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.5e-75], t$95$1, If[LessEqual[y, -8.5e-301], N[(x / N[(N[(x + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-154], N[(a / N[(1.0 + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-40], N[(z - N[(b / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{-75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-301}:\\
\;\;\;\;\frac{x}{\frac{x + t}{z}}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-154}:\\
\;\;\;\;\frac{a}{1 + \frac{x}{t}}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-40}:\\
\;\;\;\;z - \frac{b}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.4999999999999999e-75 or 1.7500000000000001e-40 < y Initial program 48.9%
Taylor expanded in y around inf 70.9%
if -1.4999999999999999e-75 < y < -8.50000000000000046e-301Initial program 71.7%
Taylor expanded in x around inf 43.0%
*-commutative43.0%
Simplified43.0%
Taylor expanded in y around 0 43.0%
associate-/l*60.7%
Simplified60.7%
if -8.50000000000000046e-301 < y < 1.90000000000000005e-154Initial program 82.2%
Taylor expanded in a around inf 60.8%
associate-/l*71.1%
+-commutative71.1%
associate-+r+71.1%
Simplified71.1%
Taylor expanded in t around inf 68.5%
if 1.90000000000000005e-154 < y < 1.7500000000000001e-40Initial program 91.7%
Taylor expanded in x around inf 50.8%
associate--l+50.8%
associate-/l*50.8%
associate-/l*50.9%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in b around inf 60.0%
mul-1-neg60.0%
associate-*l/59.9%
*-commutative59.9%
distribute-lft-neg-in59.9%
Simplified59.9%
Taylor expanded in z around 0 60.0%
mul-1-neg60.0%
*-commutative60.0%
associate-/l*60.0%
sub-neg60.0%
associate-/l*60.0%
*-commutative60.0%
associate-/l*60.0%
Simplified60.0%
Final simplification68.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.4e-75)
t_1
(if (<= y -2.1e-300)
(/ z (/ (+ y (+ x t)) x))
(if (<= y 2.3e-154)
(/ a (+ 1.0 (/ x t)))
(if (<= y 2.1e-40) (- z (/ b (/ x y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.4e-75) {
tmp = t_1;
} else if (y <= -2.1e-300) {
tmp = z / ((y + (x + t)) / x);
} else if (y <= 2.3e-154) {
tmp = a / (1.0 + (x / t));
} else if (y <= 2.1e-40) {
tmp = z - (b / (x / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2.4d-75)) then
tmp = t_1
else if (y <= (-2.1d-300)) then
tmp = z / ((y + (x + t)) / x)
else if (y <= 2.3d-154) then
tmp = a / (1.0d0 + (x / t))
else if (y <= 2.1d-40) then
tmp = z - (b / (x / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.4e-75) {
tmp = t_1;
} else if (y <= -2.1e-300) {
tmp = z / ((y + (x + t)) / x);
} else if (y <= 2.3e-154) {
tmp = a / (1.0 + (x / t));
} else if (y <= 2.1e-40) {
tmp = z - (b / (x / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.4e-75: tmp = t_1 elif y <= -2.1e-300: tmp = z / ((y + (x + t)) / x) elif y <= 2.3e-154: tmp = a / (1.0 + (x / t)) elif y <= 2.1e-40: tmp = z - (b / (x / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.4e-75) tmp = t_1; elseif (y <= -2.1e-300) tmp = Float64(z / Float64(Float64(y + Float64(x + t)) / x)); elseif (y <= 2.3e-154) tmp = Float64(a / Float64(1.0 + Float64(x / t))); elseif (y <= 2.1e-40) tmp = Float64(z - Float64(b / Float64(x / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.4e-75) tmp = t_1; elseif (y <= -2.1e-300) tmp = z / ((y + (x + t)) / x); elseif (y <= 2.3e-154) tmp = a / (1.0 + (x / t)); elseif (y <= 2.1e-40) tmp = z - (b / (x / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.4e-75], t$95$1, If[LessEqual[y, -2.1e-300], N[(z / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-154], N[(a / N[(1.0 + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-40], N[(z - N[(b / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-300}:\\
\;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x}}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-154}:\\
\;\;\;\;\frac{a}{1 + \frac{x}{t}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-40}:\\
\;\;\;\;z - \frac{b}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.40000000000000019e-75 or 2.10000000000000018e-40 < y Initial program 48.9%
Taylor expanded in y around inf 70.9%
if -2.40000000000000019e-75 < y < -2.10000000000000004e-300Initial program 71.7%
Taylor expanded in x around inf 43.0%
*-commutative43.0%
Simplified43.0%
*-un-lft-identity43.0%
times-frac66.0%
+-commutative66.0%
Applied egg-rr66.0%
frac-times43.0%
*-un-lft-identity43.0%
associate-/l*66.0%
Applied egg-rr66.0%
if -2.10000000000000004e-300 < y < 2.3e-154Initial program 82.2%
Taylor expanded in a around inf 60.8%
associate-/l*71.1%
+-commutative71.1%
associate-+r+71.1%
Simplified71.1%
Taylor expanded in t around inf 68.5%
if 2.3e-154 < y < 2.10000000000000018e-40Initial program 91.7%
Taylor expanded in x around inf 50.8%
associate--l+50.8%
associate-/l*50.8%
associate-/l*50.9%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in b around inf 60.0%
mul-1-neg60.0%
associate-*l/59.9%
*-commutative59.9%
distribute-lft-neg-in59.9%
Simplified59.9%
Taylor expanded in z around 0 60.0%
mul-1-neg60.0%
*-commutative60.0%
associate-/l*60.0%
sub-neg60.0%
associate-/l*60.0%
*-commutative60.0%
associate-/l*60.0%
Simplified60.0%
Final simplification68.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.2e+144) (not (<= a 650000000000.0))) (* (+ y t) (/ a (+ y (+ x t)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.2e+144) || !(a <= 650000000000.0)) {
tmp = (y + t) * (a / (y + (x + t)));
} 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 ((a <= (-4.2d+144)) .or. (.not. (a <= 650000000000.0d0))) then
tmp = (y + t) * (a / (y + (x + t)))
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 ((a <= -4.2e+144) || !(a <= 650000000000.0)) {
tmp = (y + t) * (a / (y + (x + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.2e+144) or not (a <= 650000000000.0): tmp = (y + t) * (a / (y + (x + t))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.2e+144) || !(a <= 650000000000.0)) tmp = Float64(Float64(y + t) * Float64(a / Float64(y + Float64(x + t)))); 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 ((a <= -4.2e+144) || ~((a <= 650000000000.0))) tmp = (y + t) * (a / (y + (x + t))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.2e+144], N[Not[LessEqual[a, 650000000000.0]], $MachinePrecision]], N[(N[(y + t), $MachinePrecision] * N[(a / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+144} \lor \neg \left(a \leq 650000000000\right):\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if a < -4.19999999999999993e144 or 6.5e11 < a Initial program 56.1%
Taylor expanded in a around inf 43.9%
associate-/l*72.0%
+-commutative72.0%
associate-+r+72.0%
Simplified72.0%
Taylor expanded in a around 0 43.9%
+-commutative43.9%
associate-*l/69.1%
*-commutative69.1%
+-commutative69.1%
+-commutative69.1%
associate-+r+69.1%
+-commutative69.1%
Simplified69.1%
if -4.19999999999999993e144 < a < 6.5e11Initial program 64.1%
Taylor expanded in y around inf 60.8%
Final simplification64.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4e+143) (not (<= a 720000000000.0))) (/ a (/ (+ x (+ y t)) (+ y t))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4e+143) || !(a <= 720000000000.0)) {
tmp = a / ((x + (y + t)) / (y + t));
} 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 ((a <= (-4d+143)) .or. (.not. (a <= 720000000000.0d0))) then
tmp = a / ((x + (y + t)) / (y + t))
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 ((a <= -4e+143) || !(a <= 720000000000.0)) {
tmp = a / ((x + (y + t)) / (y + t));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4e+143) or not (a <= 720000000000.0): tmp = a / ((x + (y + t)) / (y + t)) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4e+143) || !(a <= 720000000000.0)) tmp = Float64(a / Float64(Float64(x + Float64(y + t)) / Float64(y + t))); 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 ((a <= -4e+143) || ~((a <= 720000000000.0))) tmp = a / ((x + (y + t)) / (y + t)); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4e+143], N[Not[LessEqual[a, 720000000000.0]], $MachinePrecision]], N[(a / N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+143} \lor \neg \left(a \leq 720000000000\right):\\
\;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if a < -4.0000000000000001e143 or 7.2e11 < a Initial program 56.1%
Taylor expanded in a around inf 43.9%
associate-/l*72.0%
+-commutative72.0%
associate-+r+72.0%
Simplified72.0%
if -4.0000000000000001e143 < a < 7.2e11Initial program 64.1%
Taylor expanded in y around inf 60.8%
Final simplification65.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.8e+129) z (if (<= z 2e-30) (- a b) (+ z a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e+129) {
tmp = z;
} else if (z <= 2e-30) {
tmp = a - b;
} else {
tmp = z + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.8d+129)) then
tmp = z
else if (z <= 2d-30) then
tmp = a - b
else
tmp = z + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e+129) {
tmp = z;
} else if (z <= 2e-30) {
tmp = a - b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.8e+129: tmp = z elif z <= 2e-30: tmp = a - b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.8e+129) tmp = z; elseif (z <= 2e-30) tmp = Float64(a - b); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.8e+129) tmp = z; elseif (z <= 2e-30) tmp = a - b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.8e+129], z, If[LessEqual[z, 2e-30], N[(a - b), $MachinePrecision], N[(z + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+129}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-30}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if z < -3.80000000000000005e129Initial program 30.4%
Taylor expanded in x around inf 68.9%
if -3.80000000000000005e129 < z < 2e-30Initial program 70.2%
Taylor expanded in y around inf 51.1%
Taylor expanded in z around 0 50.1%
if 2e-30 < z Initial program 58.9%
Taylor expanded in y around inf 64.0%
Taylor expanded in b around 0 63.2%
Final simplification56.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x 4.8e+91) (- (+ z a) b) z))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 4.8e+91) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 4.8d+91) then
tmp = (z + a) - b
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 4.8e+91) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 4.8e+91: tmp = (z + a) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 4.8e+91) tmp = Float64(Float64(z + a) - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 4.8e+91) tmp = (z + a) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 4.8e+91], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{+91}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < 4.79999999999999966e91Initial program 62.5%
Taylor expanded in y around inf 63.2%
if 4.79999999999999966e91 < x Initial program 54.4%
Taylor expanded in x around inf 45.5%
Final simplification60.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.25e+44) z (if (<= z 1.3e+65) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.25e+44) {
tmp = z;
} else if (z <= 1.3e+65) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.25d+44)) then
tmp = z
else if (z <= 1.3d+65) then
tmp = a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.25e+44) {
tmp = z;
} else if (z <= 1.3e+65) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.25e+44: tmp = z elif z <= 1.3e+65: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.25e+44) tmp = z; elseif (z <= 1.3e+65) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.25e+44) tmp = z; elseif (z <= 1.3e+65) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.25e+44], z, If[LessEqual[z, 1.3e+65], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+44}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+65}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.2499999999999999e44 or 1.30000000000000001e65 < z Initial program 44.1%
Taylor expanded in x around inf 59.2%
if -1.2499999999999999e44 < z < 1.30000000000000001e65Initial program 73.2%
Taylor expanded in t around inf 43.7%
Final simplification50.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.8e+269) (- b) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.8e+269) {
tmp = -b;
} else {
tmp = z + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-8.8d+269)) then
tmp = -b
else
tmp = z + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.8e+269) {
tmp = -b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.8e+269: tmp = -b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.8e+269) tmp = Float64(-b); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.8e+269) tmp = -b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.8e+269], (-b), N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+269}:\\
\;\;\;\;-b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if b < -8.7999999999999995e269Initial program 55.0%
Taylor expanded in y around inf 82.2%
Taylor expanded in b around inf 82.0%
neg-mul-182.0%
Simplified82.0%
if -8.7999999999999995e269 < b Initial program 61.2%
Taylor expanded in y around inf 56.4%
Taylor expanded in b around 0 52.7%
Final simplification53.4%
(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.0%
Taylor expanded in t around inf 32.6%
Final simplification32.6%
(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 2023279
(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)))