
(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 20 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 (+ t (+ y x))) (t_2 (/ y t_1)) (t_3 (+ y (+ t x)))) (+ (* a (+ (/ y t_3) (/ t t_3))) (fma z (+ (/ x t_1) t_2) (* t_2 (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double t_2 = y / t_1;
double t_3 = y + (t + x);
return (a * ((y / t_3) + (t / t_3))) + fma(z, ((x / t_1) + t_2), (t_2 * -b));
}
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) t_2 = Float64(y / t_1) t_3 = Float64(y + Float64(t + x)) return Float64(Float64(a * Float64(Float64(y / t_3) + Float64(t / t_3))) + fma(z, Float64(Float64(x / t_1) + t_2), Float64(t_2 * Float64(-b)))) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(a * N[(N[(y / t$95$3), $MachinePrecision] + N[(t / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] + N[(t$95$2 * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
t_2 := \frac{y}{t_1}\\
t_3 := y + \left(t + x\right)\\
a \cdot \left(\frac{y}{t_3} + \frac{t}{t_3}\right) + \mathsf{fma}\left(z, \frac{x}{t_1} + t_2, t_2 \cdot \left(-b\right)\right)
\end{array}
\end{array}
Initial program 58.1%
Taylor expanded in a around 0 71.9%
associate--l+71.9%
+-commutative71.9%
associate-+r+71.9%
associate-+r+71.9%
div-sub71.9%
+-commutative71.9%
*-commutative71.9%
associate-+r+71.9%
Simplified71.9%
clear-num71.8%
+-commutative71.8%
inv-pow71.8%
associate-+l+71.8%
+-commutative71.8%
Applied egg-rr71.8%
unpow-171.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in z around 0 85.9%
+-commutative85.9%
fma-def85.9%
+-commutative85.9%
+-commutative85.9%
mul-1-neg85.9%
*-commutative85.9%
+-commutative85.9%
associate-+r+85.9%
associate-*l/98.6%
*-commutative98.6%
distribute-lft-neg-in98.6%
associate-+r+98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.6%
Final simplification98.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (* z (+ y x)))
(t_3 (/ (- (+ t_2 (* a (+ y t))) (* y b)) t_1)))
(if (or (<= t_3 (- INFINITY)) (not (<= t_3 1e+228)))
(+ a (- z (/ b (/ (+ y x) y))))
(+ (* a (+ (/ y t_1) (/ t t_1))) (/ (- t_2 (* y b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = z * (y + x);
double t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 1e+228)) {
tmp = a + (z - (b / ((y + x) / y)));
} else {
tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (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 + (t + x);
double t_2 = z * (y + x);
double t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 1e+228)) {
tmp = a + (z - (b / ((y + x) / y)));
} else {
tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = z * (y + x) t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1 tmp = 0 if (t_3 <= -math.inf) or not (t_3 <= 1e+228): tmp = a + (z - (b / ((y + x) / y))) else: tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(z * Float64(y + x)) t_3 = Float64(Float64(Float64(t_2 + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_3 <= Float64(-Inf)) || !(t_3 <= 1e+228)) tmp = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y)))); else tmp = Float64(Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1))) + Float64(Float64(t_2 - Float64(y * b)) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = z * (y + x); t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1; tmp = 0.0; if ((t_3 <= -Inf) || ~((t_3 <= 1e+228))) tmp = a + (z - (b / ((y + x) / y))); else tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 1e+228]], $MachinePrecision]], N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := z \cdot \left(y + x\right)\\
t_3 := \frac{\left(t_2 + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+228}\right):\\
\;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right) + \frac{t_2 - 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.9999999999999992e227 < (/.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 a around 0 38.6%
associate--l+38.6%
+-commutative38.6%
associate-+r+38.6%
associate-+r+38.6%
div-sub38.6%
+-commutative38.6%
*-commutative38.6%
associate-+r+38.6%
Simplified38.6%
Taylor expanded in y around inf 34.3%
Taylor expanded in t around 0 55.5%
associate--l+55.5%
associate-/l*81.7%
+-commutative81.7%
Simplified81.7%
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.9999999999999992e227Initial program 98.3%
Taylor expanded in a around 0 98.6%
associate--l+98.6%
+-commutative98.6%
associate-+r+98.6%
associate-+r+98.6%
div-sub98.6%
+-commutative98.6%
*-commutative98.6%
associate-+r+98.6%
Simplified98.6%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) (+ y (+ t x)))))
(if (or (<= t_1 -1e+266) (not (<= t_1 1e+228)))
(+ a (- z (/ b (/ (+ y x) y))))
t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (t + x));
double tmp;
if ((t_1 <= -1e+266) || !(t_1 <= 1e+228)) {
tmp = a + (z - (b / ((y + 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 * (y + x)) + (a * (y + t))) - (y * b)) / (y + (t + x))
if ((t_1 <= (-1d+266)) .or. (.not. (t_1 <= 1d+228))) then
tmp = a + (z - (b / ((y + 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 * (y + x)) + (a * (y + t))) - (y * b)) / (y + (t + x));
double tmp;
if ((t_1 <= -1e+266) || !(t_1 <= 1e+228)) {
tmp = a + (z - (b / ((y + x) / y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (t + x)) tmp = 0 if (t_1 <= -1e+266) or not (t_1 <= 1e+228): tmp = a + (z - (b / ((y + x) / y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(t + x))) tmp = 0.0 if ((t_1 <= -1e+266) || !(t_1 <= 1e+228)) tmp = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (t + x)); tmp = 0.0; if ((t_1 <= -1e+266) || ~((t_1 <= 1e+228))) tmp = a + (z - (b / ((y + x) / y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+266], N[Not[LessEqual[t$95$1, 1e+228]], $MachinePrecision]], N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(t + x\right)}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+266} \lor \neg \left(t_1 \leq 10^{+228}\right):\\
\;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
\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)) < -1e266 or 9.9999999999999992e227 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 11.2%
Taylor expanded in a around 0 40.7%
associate--l+40.7%
+-commutative40.7%
associate-+r+40.7%
associate-+r+40.7%
div-sub40.7%
+-commutative40.7%
*-commutative40.7%
associate-+r+40.7%
Simplified40.7%
Taylor expanded in y around inf 36.6%
Taylor expanded in t around 0 57.0%
associate--l+57.0%
associate-/l*82.4%
+-commutative82.4%
Simplified82.4%
if -1e266 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999992e227Initial program 98.2%
Final simplification90.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (- z (/ b (/ (+ y x) y)))))
(t_2 (+ y (+ t x)))
(t_3 (+ a (/ (- (* z (+ y x)) (* y b)) t_2)))
(t_4 (+ (* a (+ (/ y t_2) (/ t t_2))) z)))
(if (<= y -5.6e+86)
t_1
(if (<= y -7.5e+17)
t_4
(if (<= y -7.6e-139)
t_3
(if (<= y -3.7e-257) t_4 (if (<= y 5.6e+39) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z - (b / ((y + x) / y)));
double t_2 = y + (t + x);
double t_3 = a + (((z * (y + x)) - (y * b)) / t_2);
double t_4 = (a * ((y / t_2) + (t / t_2))) + z;
double tmp;
if (y <= -5.6e+86) {
tmp = t_1;
} else if (y <= -7.5e+17) {
tmp = t_4;
} else if (y <= -7.6e-139) {
tmp = t_3;
} else if (y <= -3.7e-257) {
tmp = t_4;
} else if (y <= 5.6e+39) {
tmp = t_3;
} 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = a + (z - (b / ((y + x) / y)))
t_2 = y + (t + x)
t_3 = a + (((z * (y + x)) - (y * b)) / t_2)
t_4 = (a * ((y / t_2) + (t / t_2))) + z
if (y <= (-5.6d+86)) then
tmp = t_1
else if (y <= (-7.5d+17)) then
tmp = t_4
else if (y <= (-7.6d-139)) then
tmp = t_3
else if (y <= (-3.7d-257)) then
tmp = t_4
else if (y <= 5.6d+39) then
tmp = t_3
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 = a + (z - (b / ((y + x) / y)));
double t_2 = y + (t + x);
double t_3 = a + (((z * (y + x)) - (y * b)) / t_2);
double t_4 = (a * ((y / t_2) + (t / t_2))) + z;
double tmp;
if (y <= -5.6e+86) {
tmp = t_1;
} else if (y <= -7.5e+17) {
tmp = t_4;
} else if (y <= -7.6e-139) {
tmp = t_3;
} else if (y <= -3.7e-257) {
tmp = t_4;
} else if (y <= 5.6e+39) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z - (b / ((y + x) / y))) t_2 = y + (t + x) t_3 = a + (((z * (y + x)) - (y * b)) / t_2) t_4 = (a * ((y / t_2) + (t / t_2))) + z tmp = 0 if y <= -5.6e+86: tmp = t_1 elif y <= -7.5e+17: tmp = t_4 elif y <= -7.6e-139: tmp = t_3 elif y <= -3.7e-257: tmp = t_4 elif y <= 5.6e+39: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y)))) t_2 = Float64(y + Float64(t + x)) t_3 = Float64(a + Float64(Float64(Float64(z * Float64(y + x)) - Float64(y * b)) / t_2)) t_4 = Float64(Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))) + z) tmp = 0.0 if (y <= -5.6e+86) tmp = t_1; elseif (y <= -7.5e+17) tmp = t_4; elseif (y <= -7.6e-139) tmp = t_3; elseif (y <= -3.7e-257) tmp = t_4; elseif (y <= 5.6e+39) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z - (b / ((y + x) / y))); t_2 = y + (t + x); t_3 = a + (((z * (y + x)) - (y * b)) / t_2); t_4 = (a * ((y / t_2) + (t / t_2))) + z; tmp = 0.0; if (y <= -5.6e+86) tmp = t_1; elseif (y <= -7.5e+17) tmp = t_4; elseif (y <= -7.6e-139) tmp = t_3; elseif (y <= -3.7e-257) tmp = t_4; elseif (y <= 5.6e+39) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[y, -5.6e+86], t$95$1, If[LessEqual[y, -7.5e+17], t$95$4, If[LessEqual[y, -7.6e-139], t$95$3, If[LessEqual[y, -3.7e-257], t$95$4, If[LessEqual[y, 5.6e+39], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
t_2 := y + \left(t + x\right)\\
t_3 := a + \frac{z \cdot \left(y + x\right) - y \cdot b}{t_2}\\
t_4 := a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) + z\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+17}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-139}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-257}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+39}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.60000000000000008e86 or 5.60000000000000003e39 < y Initial program 32.2%
Taylor expanded in a around 0 49.2%
associate--l+49.2%
+-commutative49.2%
associate-+r+49.2%
associate-+r+49.2%
div-sub49.2%
+-commutative49.2%
*-commutative49.2%
associate-+r+49.2%
Simplified49.2%
Taylor expanded in y around inf 46.9%
Taylor expanded in t around 0 60.1%
associate--l+60.1%
associate-/l*88.0%
+-commutative88.0%
Simplified88.0%
if -5.60000000000000008e86 < y < -7.5e17 or -7.60000000000000015e-139 < y < -3.69999999999999984e-257Initial program 56.8%
Taylor expanded in a around 0 77.4%
associate--l+77.4%
+-commutative77.4%
associate-+r+77.4%
associate-+r+77.4%
div-sub77.4%
+-commutative77.4%
*-commutative77.4%
associate-+r+77.4%
Simplified77.4%
Taylor expanded in x around inf 82.9%
if -7.5e17 < y < -7.60000000000000015e-139 or -3.69999999999999984e-257 < y < 5.60000000000000003e39Initial program 83.1%
Taylor expanded in a around 0 91.4%
associate--l+91.4%
+-commutative91.4%
associate-+r+91.4%
associate-+r+91.4%
div-sub91.4%
+-commutative91.4%
*-commutative91.4%
associate-+r+91.4%
Simplified91.4%
Taylor expanded in y around inf 79.0%
Final simplification83.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (- z (/ b (/ (+ y x) y)))))
(t_2 (+ y (+ t x)))
(t_3 (+ a (/ (- (* z (+ y x)) (* y b)) t_2))))
(if (<= y -3.5e+17)
t_1
(if (<= y -2.25e-147)
t_3
(if (<= y -3.5e-264)
(/ z (/ t_2 (+ y x)))
(if (<= y 2.4e+40) t_3 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z - (b / ((y + x) / y)));
double t_2 = y + (t + x);
double t_3 = a + (((z * (y + x)) - (y * b)) / t_2);
double tmp;
if (y <= -3.5e+17) {
tmp = t_1;
} else if (y <= -2.25e-147) {
tmp = t_3;
} else if (y <= -3.5e-264) {
tmp = z / (t_2 / (y + x));
} else if (y <= 2.4e+40) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = a + (z - (b / ((y + x) / y)))
t_2 = y + (t + x)
t_3 = a + (((z * (y + x)) - (y * b)) / t_2)
if (y <= (-3.5d+17)) then
tmp = t_1
else if (y <= (-2.25d-147)) then
tmp = t_3
else if (y <= (-3.5d-264)) then
tmp = z / (t_2 / (y + x))
else if (y <= 2.4d+40) then
tmp = t_3
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 = a + (z - (b / ((y + x) / y)));
double t_2 = y + (t + x);
double t_3 = a + (((z * (y + x)) - (y * b)) / t_2);
double tmp;
if (y <= -3.5e+17) {
tmp = t_1;
} else if (y <= -2.25e-147) {
tmp = t_3;
} else if (y <= -3.5e-264) {
tmp = z / (t_2 / (y + x));
} else if (y <= 2.4e+40) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z - (b / ((y + x) / y))) t_2 = y + (t + x) t_3 = a + (((z * (y + x)) - (y * b)) / t_2) tmp = 0 if y <= -3.5e+17: tmp = t_1 elif y <= -2.25e-147: tmp = t_3 elif y <= -3.5e-264: tmp = z / (t_2 / (y + x)) elif y <= 2.4e+40: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y)))) t_2 = Float64(y + Float64(t + x)) t_3 = Float64(a + Float64(Float64(Float64(z * Float64(y + x)) - Float64(y * b)) / t_2)) tmp = 0.0 if (y <= -3.5e+17) tmp = t_1; elseif (y <= -2.25e-147) tmp = t_3; elseif (y <= -3.5e-264) tmp = Float64(z / Float64(t_2 / Float64(y + x))); elseif (y <= 2.4e+40) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z - (b / ((y + x) / y))); t_2 = y + (t + x); t_3 = a + (((z * (y + x)) - (y * b)) / t_2); tmp = 0.0; if (y <= -3.5e+17) tmp = t_1; elseif (y <= -2.25e-147) tmp = t_3; elseif (y <= -3.5e-264) tmp = z / (t_2 / (y + x)); elseif (y <= 2.4e+40) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e+17], t$95$1, If[LessEqual[y, -2.25e-147], t$95$3, If[LessEqual[y, -3.5e-264], N[(z / N[(t$95$2 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+40], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
t_2 := y + \left(t + x\right)\\
t_3 := a + \frac{z \cdot \left(y + x\right) - y \cdot b}{t_2}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{-147}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-264}:\\
\;\;\;\;\frac{z}{\frac{t_2}{y + x}}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.5e17 or 2.4e40 < y Initial program 33.1%
Taylor expanded in a around 0 51.9%
associate--l+51.9%
+-commutative51.9%
associate-+r+51.9%
associate-+r+51.9%
div-sub51.9%
+-commutative51.9%
*-commutative51.9%
associate-+r+51.9%
Simplified51.9%
Taylor expanded in y around inf 46.5%
Taylor expanded in t around 0 59.3%
associate--l+59.3%
associate-/l*85.1%
+-commutative85.1%
Simplified85.1%
if -3.5e17 < y < -2.24999999999999986e-147 or -3.5e-264 < y < 2.4e40Initial program 83.5%
Taylor expanded in a around 0 92.1%
associate--l+92.1%
+-commutative92.1%
associate-+r+92.1%
associate-+r+92.1%
div-sub92.1%
+-commutative92.1%
*-commutative92.1%
associate-+r+92.1%
Simplified92.1%
Taylor expanded in y around inf 79.5%
if -2.24999999999999986e-147 < y < -3.5e-264Initial program 62.3%
Taylor expanded in z around inf 35.0%
associate-/l*59.3%
associate-+r+59.3%
+-commutative59.3%
Simplified59.3%
Final simplification79.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ y x) (/ z (+ x (+ y t))))))
(if (<= z -1.3e+82)
t_1
(if (<= z -3.6e-15)
(- a (/ y (/ (+ y x) b)))
(if (<= z -1.4e-34)
z
(if (<= z 6.8e-50)
(- a (/ b (/ (+ y t) y)))
(if (<= z 1.8e+217) (+ a (/ x (/ (+ t x) z))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + x) * (z / (x + (y + t)));
double tmp;
if (z <= -1.3e+82) {
tmp = t_1;
} else if (z <= -3.6e-15) {
tmp = a - (y / ((y + x) / b));
} else if (z <= -1.4e-34) {
tmp = z;
} else if (z <= 6.8e-50) {
tmp = a - (b / ((y + t) / y));
} else if (z <= 1.8e+217) {
tmp = a + (x / ((t + x) / z));
} 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 + x) * (z / (x + (y + t)))
if (z <= (-1.3d+82)) then
tmp = t_1
else if (z <= (-3.6d-15)) then
tmp = a - (y / ((y + x) / b))
else if (z <= (-1.4d-34)) then
tmp = z
else if (z <= 6.8d-50) then
tmp = a - (b / ((y + t) / y))
else if (z <= 1.8d+217) then
tmp = a + (x / ((t + x) / z))
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 + x) * (z / (x + (y + t)));
double tmp;
if (z <= -1.3e+82) {
tmp = t_1;
} else if (z <= -3.6e-15) {
tmp = a - (y / ((y + x) / b));
} else if (z <= -1.4e-34) {
tmp = z;
} else if (z <= 6.8e-50) {
tmp = a - (b / ((y + t) / y));
} else if (z <= 1.8e+217) {
tmp = a + (x / ((t + x) / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y + x) * (z / (x + (y + t))) tmp = 0 if z <= -1.3e+82: tmp = t_1 elif z <= -3.6e-15: tmp = a - (y / ((y + x) / b)) elif z <= -1.4e-34: tmp = z elif z <= 6.8e-50: tmp = a - (b / ((y + t) / y)) elif z <= 1.8e+217: tmp = a + (x / ((t + x) / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + x) * Float64(z / Float64(x + Float64(y + t)))) tmp = 0.0 if (z <= -1.3e+82) tmp = t_1; elseif (z <= -3.6e-15) tmp = Float64(a - Float64(y / Float64(Float64(y + x) / b))); elseif (z <= -1.4e-34) tmp = z; elseif (z <= 6.8e-50) tmp = Float64(a - Float64(b / Float64(Float64(y + t) / y))); elseif (z <= 1.8e+217) tmp = Float64(a + Float64(x / Float64(Float64(t + x) / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y + x) * (z / (x + (y + t))); tmp = 0.0; if (z <= -1.3e+82) tmp = t_1; elseif (z <= -3.6e-15) tmp = a - (y / ((y + x) / b)); elseif (z <= -1.4e-34) tmp = z; elseif (z <= 6.8e-50) tmp = a - (b / ((y + t) / y)); elseif (z <= 1.8e+217) tmp = a + (x / ((t + x) / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] * N[(z / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+82], t$95$1, If[LessEqual[z, -3.6e-15], N[(a - N[(y / N[(N[(y + x), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.4e-34], z, If[LessEqual[z, 6.8e-50], N[(a - N[(b / N[(N[(y + t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+217], N[(a + N[(x / N[(N[(t + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) \cdot \frac{z}{x + \left(y + t\right)}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-15}:\\
\;\;\;\;a - \frac{y}{\frac{y + x}{b}}\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-34}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-50}:\\
\;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+217}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.2999999999999999e82 or 1.8000000000000001e217 < z Initial program 46.6%
Taylor expanded in z around inf 38.5%
associate-/l*80.6%
associate-+r+80.6%
+-commutative80.6%
Simplified80.6%
associate-/r/80.6%
+-commutative80.6%
associate-+l+80.6%
+-commutative80.6%
Applied egg-rr80.6%
if -1.2999999999999999e82 < z < -3.6000000000000001e-15Initial program 53.1%
Taylor expanded in a around 0 59.1%
associate--l+59.1%
+-commutative59.1%
associate-+r+59.1%
associate-+r+59.1%
div-sub59.1%
+-commutative59.1%
*-commutative59.1%
associate-+r+59.1%
Simplified59.1%
Taylor expanded in y around inf 55.7%
Taylor expanded in z around 0 31.9%
mul-1-neg31.9%
*-commutative31.9%
+-commutative31.9%
associate-+r+31.9%
associate-/l*66.5%
distribute-neg-frac66.5%
Simplified66.5%
Taylor expanded in t around 0 66.5%
+-commutative66.5%
Simplified66.5%
if -3.6000000000000001e-15 < z < -1.39999999999999998e-34Initial program 100.0%
Taylor expanded in x around inf 100.0%
if -1.39999999999999998e-34 < z < 6.80000000000000029e-50Initial program 66.9%
Taylor expanded in a around 0 83.2%
associate--l+83.2%
+-commutative83.2%
associate-+r+83.2%
associate-+r+83.2%
div-sub83.2%
+-commutative83.2%
*-commutative83.2%
associate-+r+83.2%
Simplified83.2%
Taylor expanded in y around inf 64.3%
Taylor expanded in z around 0 57.2%
mul-1-neg57.2%
*-commutative57.2%
+-commutative57.2%
associate-+r+57.2%
associate-/l*69.2%
distribute-neg-frac69.2%
Simplified69.2%
Taylor expanded in x around 0 52.7%
mul-1-neg52.7%
unsub-neg52.7%
associate-/l*66.2%
Simplified66.2%
if 6.80000000000000029e-50 < z < 1.8000000000000001e217Initial program 50.5%
Taylor expanded in a around 0 71.6%
associate--l+71.6%
+-commutative71.6%
associate-+r+71.6%
associate-+r+71.6%
div-sub71.6%
+-commutative71.6%
*-commutative71.6%
associate-+r+71.6%
Simplified71.6%
Taylor expanded in y around inf 61.3%
Taylor expanded in y around 0 67.1%
+-commutative67.1%
associate-/l*75.2%
Simplified75.2%
Final simplification72.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ z (/ (+ t x) x))) (t_2 (- (+ a z) b)))
(if (<= y -5.5e+40)
t_2
(if (<= y -5.6e-105)
(- a (/ y (/ t b)))
(if (<= y -4e-189)
t_1
(if (<= y -4.5e-218)
(/ a (/ (+ t x) t))
(if (<= y 1.65e-187) t_1 (if (<= y 9e+131) (+ a z) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z / ((t + x) / x);
double t_2 = (a + z) - b;
double tmp;
if (y <= -5.5e+40) {
tmp = t_2;
} else if (y <= -5.6e-105) {
tmp = a - (y / (t / b));
} else if (y <= -4e-189) {
tmp = t_1;
} else if (y <= -4.5e-218) {
tmp = a / ((t + x) / t);
} else if (y <= 1.65e-187) {
tmp = t_1;
} else if (y <= 9e+131) {
tmp = a + z;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z / ((t + x) / x)
t_2 = (a + z) - b
if (y <= (-5.5d+40)) then
tmp = t_2
else if (y <= (-5.6d-105)) then
tmp = a - (y / (t / b))
else if (y <= (-4d-189)) then
tmp = t_1
else if (y <= (-4.5d-218)) then
tmp = a / ((t + x) / t)
else if (y <= 1.65d-187) then
tmp = t_1
else if (y <= 9d+131) then
tmp = a + z
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z / ((t + x) / x);
double t_2 = (a + z) - b;
double tmp;
if (y <= -5.5e+40) {
tmp = t_2;
} else if (y <= -5.6e-105) {
tmp = a - (y / (t / b));
} else if (y <= -4e-189) {
tmp = t_1;
} else if (y <= -4.5e-218) {
tmp = a / ((t + x) / t);
} else if (y <= 1.65e-187) {
tmp = t_1;
} else if (y <= 9e+131) {
tmp = a + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z / ((t + x) / x) t_2 = (a + z) - b tmp = 0 if y <= -5.5e+40: tmp = t_2 elif y <= -5.6e-105: tmp = a - (y / (t / b)) elif y <= -4e-189: tmp = t_1 elif y <= -4.5e-218: tmp = a / ((t + x) / t) elif y <= 1.65e-187: tmp = t_1 elif y <= 9e+131: tmp = a + z else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z / Float64(Float64(t + x) / x)) t_2 = Float64(Float64(a + z) - b) tmp = 0.0 if (y <= -5.5e+40) tmp = t_2; elseif (y <= -5.6e-105) tmp = Float64(a - Float64(y / Float64(t / b))); elseif (y <= -4e-189) tmp = t_1; elseif (y <= -4.5e-218) tmp = Float64(a / Float64(Float64(t + x) / t)); elseif (y <= 1.65e-187) tmp = t_1; elseif (y <= 9e+131) tmp = Float64(a + z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z / ((t + x) / x); t_2 = (a + z) - b; tmp = 0.0; if (y <= -5.5e+40) tmp = t_2; elseif (y <= -5.6e-105) tmp = a - (y / (t / b)); elseif (y <= -4e-189) tmp = t_1; elseif (y <= -4.5e-218) tmp = a / ((t + x) / t); elseif (y <= 1.65e-187) tmp = t_1; elseif (y <= 9e+131) tmp = a + z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z / N[(N[(t + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5.5e+40], t$95$2, If[LessEqual[y, -5.6e-105], N[(a - N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e-189], t$95$1, If[LessEqual[y, -4.5e-218], N[(a / N[(N[(t + x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e-187], t$95$1, If[LessEqual[y, 9e+131], N[(a + z), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{t + x}{x}}\\
t_2 := \left(a + z\right) - b\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-105}:\\
\;\;\;\;a - \frac{y}{\frac{t}{b}}\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-189}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-218}:\\
\;\;\;\;\frac{a}{\frac{t + x}{t}}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-187}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.49999999999999974e40 or 9.00000000000000039e131 < y Initial program 30.4%
Taylor expanded in y around inf 84.1%
if -5.49999999999999974e40 < y < -5.6e-105Initial program 79.8%
Taylor expanded in a around 0 95.7%
associate--l+95.7%
+-commutative95.7%
associate-+r+95.7%
associate-+r+95.7%
div-sub95.7%
+-commutative95.7%
*-commutative95.7%
associate-+r+95.7%
Simplified95.7%
Taylor expanded in y around inf 67.6%
Taylor expanded in z around 0 51.8%
mul-1-neg51.8%
*-commutative51.8%
+-commutative51.8%
associate-+r+51.8%
associate-/l*53.1%
distribute-neg-frac53.1%
Simplified53.1%
Taylor expanded in t around inf 49.0%
if -5.6e-105 < y < -4.00000000000000027e-189 or -4.49999999999999977e-218 < y < 1.65e-187Initial program 76.5%
Taylor expanded in z around inf 52.3%
associate-/l*70.1%
associate-+r+70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in y around 0 65.3%
if -4.00000000000000027e-189 < y < -4.49999999999999977e-218Initial program 40.6%
Taylor expanded in a around inf 39.8%
associate-/l*75.2%
associate-+r+75.2%
Simplified75.2%
Taylor expanded in y around 0 39.8%
associate-/l*75.2%
Simplified75.2%
if 1.65e-187 < y < 9.00000000000000039e131Initial program 72.4%
associate-+l+72.4%
+-commutative72.4%
div-inv72.3%
associate--l+72.3%
fma-def72.3%
+-commutative72.3%
*-commutative72.3%
fma-neg72.3%
distribute-rgt-neg-out72.3%
add-sqr-sqrt39.9%
sqrt-unprod48.6%
sqr-neg48.6%
sqrt-unprod25.3%
add-sqr-sqrt57.2%
Applied egg-rr57.2%
Taylor expanded in y around inf 45.6%
Taylor expanded in b around 0 61.2%
+-commutative61.2%
Simplified61.2%
Final simplification69.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= y -4.7e+45)
t_1
(if (<= y -2.3e-21)
(* (+ y t) (/ a (+ y (+ t x))))
(if (<= y -3.7e-22)
z
(if (<= y 2.2e-37)
(+ a (/ x (/ (+ t x) z)))
(if (<= y 2.6e+21)
(- a (/ b (/ (+ y t) y)))
(if (<= y 9e+131) (+ a z) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + z) - b;
double tmp;
if (y <= -4.7e+45) {
tmp = t_1;
} else if (y <= -2.3e-21) {
tmp = (y + t) * (a / (y + (t + x)));
} else if (y <= -3.7e-22) {
tmp = z;
} else if (y <= 2.2e-37) {
tmp = a + (x / ((t + x) / z));
} else if (y <= 2.6e+21) {
tmp = a - (b / ((y + t) / y));
} else if (y <= 9e+131) {
tmp = a + z;
} 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 = (a + z) - b
if (y <= (-4.7d+45)) then
tmp = t_1
else if (y <= (-2.3d-21)) then
tmp = (y + t) * (a / (y + (t + x)))
else if (y <= (-3.7d-22)) then
tmp = z
else if (y <= 2.2d-37) then
tmp = a + (x / ((t + x) / z))
else if (y <= 2.6d+21) then
tmp = a - (b / ((y + t) / y))
else if (y <= 9d+131) then
tmp = a + z
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 = (a + z) - b;
double tmp;
if (y <= -4.7e+45) {
tmp = t_1;
} else if (y <= -2.3e-21) {
tmp = (y + t) * (a / (y + (t + x)));
} else if (y <= -3.7e-22) {
tmp = z;
} else if (y <= 2.2e-37) {
tmp = a + (x / ((t + x) / z));
} else if (y <= 2.6e+21) {
tmp = a - (b / ((y + t) / y));
} else if (y <= 9e+131) {
tmp = a + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + z) - b tmp = 0 if y <= -4.7e+45: tmp = t_1 elif y <= -2.3e-21: tmp = (y + t) * (a / (y + (t + x))) elif y <= -3.7e-22: tmp = z elif y <= 2.2e-37: tmp = a + (x / ((t + x) / z)) elif y <= 2.6e+21: tmp = a - (b / ((y + t) / y)) elif y <= 9e+131: tmp = a + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + z) - b) tmp = 0.0 if (y <= -4.7e+45) tmp = t_1; elseif (y <= -2.3e-21) tmp = Float64(Float64(y + t) * Float64(a / Float64(y + Float64(t + x)))); elseif (y <= -3.7e-22) tmp = z; elseif (y <= 2.2e-37) tmp = Float64(a + Float64(x / Float64(Float64(t + x) / z))); elseif (y <= 2.6e+21) tmp = Float64(a - Float64(b / Float64(Float64(y + t) / y))); elseif (y <= 9e+131) tmp = Float64(a + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + z) - b; tmp = 0.0; if (y <= -4.7e+45) tmp = t_1; elseif (y <= -2.3e-21) tmp = (y + t) * (a / (y + (t + x))); elseif (y <= -3.7e-22) tmp = z; elseif (y <= 2.2e-37) tmp = a + (x / ((t + x) / z)); elseif (y <= 2.6e+21) tmp = a - (b / ((y + t) / y)); elseif (y <= 9e+131) tmp = a + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -4.7e+45], t$95$1, If[LessEqual[y, -2.3e-21], N[(N[(y + t), $MachinePrecision] * N[(a / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e-22], z, If[LessEqual[y, 2.2e-37], N[(a + N[(x / N[(N[(t + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+21], N[(a - N[(b / N[(N[(y + t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+131], N[(a + z), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-21}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(t + x\right)}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-22}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-37}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.70000000000000002e45 or 9.00000000000000039e131 < y Initial program 30.6%
Taylor expanded in y around inf 84.9%
if -4.70000000000000002e45 < y < -2.29999999999999999e-21Initial program 61.5%
Taylor expanded in a around inf 23.8%
associate-/l*61.5%
associate-+r+61.5%
Simplified61.5%
associate-/r/61.4%
+-commutative61.4%
+-commutative61.4%
+-commutative61.4%
Applied egg-rr61.4%
if -2.29999999999999999e-21 < y < -3.7e-22Initial program 100.0%
Taylor expanded in x around inf 100.0%
if -3.7e-22 < y < 2.20000000000000002e-37Initial program 78.3%
Taylor expanded in a around 0 85.8%
associate--l+85.8%
+-commutative85.8%
associate-+r+85.8%
associate-+r+85.8%
div-sub85.8%
+-commutative85.8%
*-commutative85.8%
associate-+r+85.8%
Simplified85.8%
Taylor expanded in y around inf 66.6%
Taylor expanded in y around 0 56.0%
+-commutative56.0%
associate-/l*66.5%
Simplified66.5%
if 2.20000000000000002e-37 < y < 2.6e21Initial program 88.0%
Taylor expanded in a around 0 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
div-sub99.8%
+-commutative99.8%
*-commutative99.8%
associate-+r+99.8%
Simplified99.8%
Taylor expanded in y around inf 86.7%
Taylor expanded in z around 0 67.3%
mul-1-neg67.3%
*-commutative67.3%
+-commutative67.3%
associate-+r+67.3%
associate-/l*67.3%
distribute-neg-frac67.3%
Simplified67.3%
Taylor expanded in x around 0 67.2%
mul-1-neg67.2%
unsub-neg67.2%
associate-/l*67.2%
Simplified67.2%
if 2.6e21 < y < 9.00000000000000039e131Initial program 49.6%
associate-+l+49.6%
+-commutative49.6%
div-inv49.4%
associate--l+49.4%
fma-def49.4%
+-commutative49.4%
*-commutative49.4%
fma-neg49.4%
distribute-rgt-neg-out49.4%
add-sqr-sqrt34.6%
sqrt-unprod45.5%
sqr-neg45.5%
sqrt-unprod11.0%
add-sqr-sqrt38.4%
Applied egg-rr38.4%
Taylor expanded in y around inf 58.0%
Taylor expanded in b around 0 70.1%
+-commutative70.1%
Simplified70.1%
Final simplification73.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (- z (/ b (/ (+ y x) y))))) (t_2 (+ y (+ t x))))
(if (<= y -580.0)
t_1
(if (<= y -1.3e-103)
(/ (- (* a (+ y t)) (* y b)) t_2)
(if (<= y -5e-263)
(/ z (/ t_2 (+ y x)))
(if (<= y 1.08e-47) (+ a (/ x (/ (+ t x) z))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z - (b / ((y + x) / y)));
double t_2 = y + (t + x);
double tmp;
if (y <= -580.0) {
tmp = t_1;
} else if (y <= -1.3e-103) {
tmp = ((a * (y + t)) - (y * b)) / t_2;
} else if (y <= -5e-263) {
tmp = z / (t_2 / (y + x));
} else if (y <= 1.08e-47) {
tmp = a + (x / ((t + x) / z));
} 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 = a + (z - (b / ((y + x) / y)))
t_2 = y + (t + x)
if (y <= (-580.0d0)) then
tmp = t_1
else if (y <= (-1.3d-103)) then
tmp = ((a * (y + t)) - (y * b)) / t_2
else if (y <= (-5d-263)) then
tmp = z / (t_2 / (y + x))
else if (y <= 1.08d-47) then
tmp = a + (x / ((t + x) / z))
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 = a + (z - (b / ((y + x) / y)));
double t_2 = y + (t + x);
double tmp;
if (y <= -580.0) {
tmp = t_1;
} else if (y <= -1.3e-103) {
tmp = ((a * (y + t)) - (y * b)) / t_2;
} else if (y <= -5e-263) {
tmp = z / (t_2 / (y + x));
} else if (y <= 1.08e-47) {
tmp = a + (x / ((t + x) / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z - (b / ((y + x) / y))) t_2 = y + (t + x) tmp = 0 if y <= -580.0: tmp = t_1 elif y <= -1.3e-103: tmp = ((a * (y + t)) - (y * b)) / t_2 elif y <= -5e-263: tmp = z / (t_2 / (y + x)) elif y <= 1.08e-47: tmp = a + (x / ((t + x) / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y)))) t_2 = Float64(y + Float64(t + x)) tmp = 0.0 if (y <= -580.0) tmp = t_1; elseif (y <= -1.3e-103) tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / t_2); elseif (y <= -5e-263) tmp = Float64(z / Float64(t_2 / Float64(y + x))); elseif (y <= 1.08e-47) tmp = Float64(a + Float64(x / Float64(Float64(t + x) / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z - (b / ((y + x) / y))); t_2 = y + (t + x); tmp = 0.0; if (y <= -580.0) tmp = t_1; elseif (y <= -1.3e-103) tmp = ((a * (y + t)) - (y * b)) / t_2; elseif (y <= -5e-263) tmp = z / (t_2 / (y + x)); elseif (y <= 1.08e-47) tmp = a + (x / ((t + x) / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -580.0], t$95$1, If[LessEqual[y, -1.3e-103], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, -5e-263], N[(z / N[(t$95$2 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e-47], N[(a + N[(x / N[(N[(t + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
t_2 := y + \left(t + x\right)\\
\mathbf{if}\;y \leq -580:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-103}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-263}:\\
\;\;\;\;\frac{z}{\frac{t_2}{y + x}}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{-47}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -580 or 1.08000000000000005e-47 < y Initial program 41.4%
Taylor expanded in a around 0 60.0%
associate--l+60.0%
+-commutative60.0%
associate-+r+60.0%
associate-+r+60.0%
div-sub60.0%
+-commutative60.0%
*-commutative60.0%
associate-+r+60.0%
Simplified60.0%
Taylor expanded in y around inf 54.2%
Taylor expanded in t around 0 61.3%
associate--l+61.3%
associate-/l*82.3%
+-commutative82.3%
Simplified82.3%
if -580 < y < -1.29999999999999998e-103Initial program 94.1%
Taylor expanded in z around 0 70.2%
*-commutative70.2%
Simplified70.2%
if -1.29999999999999998e-103 < y < -5.00000000000000006e-263Initial program 65.9%
Taylor expanded in z around inf 38.0%
associate-/l*60.9%
associate-+r+60.9%
+-commutative60.9%
Simplified60.9%
if -5.00000000000000006e-263 < y < 1.08000000000000005e-47Initial program 82.7%
Taylor expanded in a around 0 89.0%
associate--l+89.0%
+-commutative89.0%
associate-+r+89.0%
associate-+r+89.0%
div-sub89.0%
+-commutative89.0%
*-commutative89.0%
associate-+r+89.0%
Simplified89.0%
Taylor expanded in y around inf 76.1%
Taylor expanded in y around 0 68.3%
+-commutative68.3%
associate-/l*74.3%
Simplified74.3%
Final simplification76.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= y -8e-36)
t_1
(if (<= y 1.3e-37)
(+ a (/ x (/ (+ t x) z)))
(if (<= y 4.3e+18)
(- a (/ b (/ (+ y t) y)))
(if (<= y 9e+131) (+ a z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + z) - b;
double tmp;
if (y <= -8e-36) {
tmp = t_1;
} else if (y <= 1.3e-37) {
tmp = a + (x / ((t + x) / z));
} else if (y <= 4.3e+18) {
tmp = a - (b / ((y + t) / y));
} else if (y <= 9e+131) {
tmp = a + z;
} 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 = (a + z) - b
if (y <= (-8d-36)) then
tmp = t_1
else if (y <= 1.3d-37) then
tmp = a + (x / ((t + x) / z))
else if (y <= 4.3d+18) then
tmp = a - (b / ((y + t) / y))
else if (y <= 9d+131) then
tmp = a + z
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 = (a + z) - b;
double tmp;
if (y <= -8e-36) {
tmp = t_1;
} else if (y <= 1.3e-37) {
tmp = a + (x / ((t + x) / z));
} else if (y <= 4.3e+18) {
tmp = a - (b / ((y + t) / y));
} else if (y <= 9e+131) {
tmp = a + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + z) - b tmp = 0 if y <= -8e-36: tmp = t_1 elif y <= 1.3e-37: tmp = a + (x / ((t + x) / z)) elif y <= 4.3e+18: tmp = a - (b / ((y + t) / y)) elif y <= 9e+131: tmp = a + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + z) - b) tmp = 0.0 if (y <= -8e-36) tmp = t_1; elseif (y <= 1.3e-37) tmp = Float64(a + Float64(x / Float64(Float64(t + x) / z))); elseif (y <= 4.3e+18) tmp = Float64(a - Float64(b / Float64(Float64(y + t) / y))); elseif (y <= 9e+131) tmp = Float64(a + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + z) - b; tmp = 0.0; if (y <= -8e-36) tmp = t_1; elseif (y <= 1.3e-37) tmp = a + (x / ((t + x) / z)); elseif (y <= 4.3e+18) tmp = a - (b / ((y + t) / y)); elseif (y <= 9e+131) tmp = a + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -8e-36], t$95$1, If[LessEqual[y, 1.3e-37], N[(a + N[(x / N[(N[(t + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+18], N[(a - N[(b / N[(N[(y + t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+131], N[(a + z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;y \leq -8 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-37}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\
\;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.9999999999999995e-36 or 9.00000000000000039e131 < y Initial program 35.7%
Taylor expanded in y around inf 77.3%
if -7.9999999999999995e-36 < y < 1.2999999999999999e-37Initial program 78.3%
Taylor expanded in a around 0 85.8%
associate--l+85.8%
+-commutative85.8%
associate-+r+85.8%
associate-+r+85.8%
div-sub85.8%
+-commutative85.8%
*-commutative85.8%
associate-+r+85.8%
Simplified85.8%
Taylor expanded in y around inf 66.6%
Taylor expanded in y around 0 56.0%
+-commutative56.0%
associate-/l*66.5%
Simplified66.5%
if 1.2999999999999999e-37 < y < 4.3e18Initial program 88.0%
Taylor expanded in a around 0 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
div-sub99.8%
+-commutative99.8%
*-commutative99.8%
associate-+r+99.8%
Simplified99.8%
Taylor expanded in y around inf 86.7%
Taylor expanded in z around 0 67.3%
mul-1-neg67.3%
*-commutative67.3%
+-commutative67.3%
associate-+r+67.3%
associate-/l*67.3%
distribute-neg-frac67.3%
Simplified67.3%
Taylor expanded in x around 0 67.2%
mul-1-neg67.2%
unsub-neg67.2%
associate-/l*67.2%
Simplified67.2%
if 4.3e18 < y < 9.00000000000000039e131Initial program 49.6%
associate-+l+49.6%
+-commutative49.6%
div-inv49.4%
associate--l+49.4%
fma-def49.4%
+-commutative49.4%
*-commutative49.4%
fma-neg49.4%
distribute-rgt-neg-out49.4%
add-sqr-sqrt34.6%
sqrt-unprod45.5%
sqr-neg45.5%
sqrt-unprod11.0%
add-sqr-sqrt38.4%
Applied egg-rr38.4%
Taylor expanded in y around inf 58.0%
Taylor expanded in b around 0 70.1%
+-commutative70.1%
Simplified70.1%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.5e-34) (not (<= y 1.9e-38))) (+ a (- z (/ b (/ (+ y x) y)))) (+ a (/ x (/ (+ t x) z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5e-34) || !(y <= 1.9e-38)) {
tmp = a + (z - (b / ((y + x) / y)));
} else {
tmp = a + (x / ((t + x) / 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 ((y <= (-5.5d-34)) .or. (.not. (y <= 1.9d-38))) then
tmp = a + (z - (b / ((y + x) / y)))
else
tmp = a + (x / ((t + x) / 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 ((y <= -5.5e-34) || !(y <= 1.9e-38)) {
tmp = a + (z - (b / ((y + x) / y)));
} else {
tmp = a + (x / ((t + x) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.5e-34) or not (y <= 1.9e-38): tmp = a + (z - (b / ((y + x) / y))) else: tmp = a + (x / ((t + x) / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.5e-34) || !(y <= 1.9e-38)) tmp = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y)))); else tmp = Float64(a + Float64(x / Float64(Float64(t + x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.5e-34) || ~((y <= 1.9e-38))) tmp = a + (z - (b / ((y + x) / y))); else tmp = a + (x / ((t + x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.5e-34], N[Not[LessEqual[y, 1.9e-38]], $MachinePrecision]], N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(x / N[(N[(t + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-34} \lor \neg \left(y \leq 1.9 \cdot 10^{-38}\right):\\
\;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\
\end{array}
\end{array}
if y < -5.50000000000000014e-34 or 1.9e-38 < y Initial program 43.9%
Taylor expanded in a around 0 62.1%
associate--l+62.1%
+-commutative62.1%
associate-+r+62.1%
associate-+r+62.1%
div-sub62.1%
+-commutative62.1%
*-commutative62.1%
associate-+r+62.1%
Simplified62.1%
Taylor expanded in y around inf 54.7%
Taylor expanded in t around 0 60.2%
associate--l+60.2%
associate-/l*80.1%
+-commutative80.1%
Simplified80.1%
if -5.50000000000000014e-34 < y < 1.9e-38Initial program 78.1%
Taylor expanded in a around 0 85.6%
associate--l+85.6%
+-commutative85.6%
associate-+r+85.6%
associate-+r+85.6%
div-sub85.6%
+-commutative85.6%
*-commutative85.6%
associate-+r+85.6%
Simplified85.6%
Taylor expanded in y around inf 66.3%
Taylor expanded in y around 0 56.5%
+-commutative56.5%
associate-/l*67.1%
Simplified67.1%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= y -1.7e-47)
t_1
(if (<= y 3.3e-186)
(/ z (/ (+ t x) x))
(if (<= y 1.16e+132) (+ a z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + z) - b;
double tmp;
if (y <= -1.7e-47) {
tmp = t_1;
} else if (y <= 3.3e-186) {
tmp = z / ((t + x) / x);
} else if (y <= 1.16e+132) {
tmp = a + z;
} 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 = (a + z) - b
if (y <= (-1.7d-47)) then
tmp = t_1
else if (y <= 3.3d-186) then
tmp = z / ((t + x) / x)
else if (y <= 1.16d+132) then
tmp = a + z
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 = (a + z) - b;
double tmp;
if (y <= -1.7e-47) {
tmp = t_1;
} else if (y <= 3.3e-186) {
tmp = z / ((t + x) / x);
} else if (y <= 1.16e+132) {
tmp = a + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + z) - b tmp = 0 if y <= -1.7e-47: tmp = t_1 elif y <= 3.3e-186: tmp = z / ((t + x) / x) elif y <= 1.16e+132: tmp = a + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + z) - b) tmp = 0.0 if (y <= -1.7e-47) tmp = t_1; elseif (y <= 3.3e-186) tmp = Float64(z / Float64(Float64(t + x) / x)); elseif (y <= 1.16e+132) tmp = Float64(a + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + z) - b; tmp = 0.0; if (y <= -1.7e-47) tmp = t_1; elseif (y <= 3.3e-186) tmp = z / ((t + x) / x); elseif (y <= 1.16e+132) tmp = a + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.7e-47], t$95$1, If[LessEqual[y, 3.3e-186], N[(z / N[(N[(t + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.16e+132], N[(a + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{z}{\frac{t + x}{x}}\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{+132}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.7000000000000001e-47 or 1.16000000000000004e132 < y Initial program 35.7%
Taylor expanded in y around inf 77.3%
if -1.7000000000000001e-47 < y < 3.29999999999999999e-186Initial program 75.5%
Taylor expanded in z around inf 46.5%
associate-/l*62.8%
associate-+r+62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in y around 0 57.7%
if 3.29999999999999999e-186 < y < 1.16000000000000004e132Initial program 72.4%
associate-+l+72.4%
+-commutative72.4%
div-inv72.3%
associate--l+72.3%
fma-def72.3%
+-commutative72.3%
*-commutative72.3%
fma-neg72.3%
distribute-rgt-neg-out72.3%
add-sqr-sqrt39.9%
sqrt-unprod48.6%
sqr-neg48.6%
sqrt-unprod25.3%
add-sqr-sqrt57.2%
Applied egg-rr57.2%
Taylor expanded in y around inf 45.6%
Taylor expanded in b around 0 61.2%
+-commutative61.2%
Simplified61.2%
Final simplification66.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.06e-22) (not (<= y 9e+131))) (- (+ a z) b) (+ a (/ x (/ (+ t x) z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.06e-22) || !(y <= 9e+131)) {
tmp = (a + z) - b;
} else {
tmp = a + (x / ((t + x) / 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 ((y <= (-2.06d-22)) .or. (.not. (y <= 9d+131))) then
tmp = (a + z) - b
else
tmp = a + (x / ((t + x) / 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 ((y <= -2.06e-22) || !(y <= 9e+131)) {
tmp = (a + z) - b;
} else {
tmp = a + (x / ((t + x) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.06e-22) or not (y <= 9e+131): tmp = (a + z) - b else: tmp = a + (x / ((t + x) / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.06e-22) || !(y <= 9e+131)) tmp = Float64(Float64(a + z) - b); else tmp = Float64(a + Float64(x / Float64(Float64(t + x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.06e-22) || ~((y <= 9e+131))) tmp = (a + z) - b; else tmp = a + (x / ((t + x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.06e-22], N[Not[LessEqual[y, 9e+131]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(a + N[(x / N[(N[(t + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.06 \cdot 10^{-22} \lor \neg \left(y \leq 9 \cdot 10^{+131}\right):\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\
\end{array}
\end{array}
if y < -2.0599999999999999e-22 or 9.00000000000000039e131 < y Initial program 35.7%
Taylor expanded in y around inf 77.3%
if -2.0599999999999999e-22 < y < 9.00000000000000039e131Initial program 73.9%
Taylor expanded in a around 0 83.5%
associate--l+83.5%
+-commutative83.5%
associate-+r+83.5%
associate-+r+83.5%
div-sub83.5%
+-commutative83.5%
*-commutative83.5%
associate-+r+83.5%
Simplified83.5%
Taylor expanded in y around inf 68.5%
Taylor expanded in y around 0 53.7%
+-commutative53.7%
associate-/l*64.4%
Simplified64.4%
Final simplification69.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.6e+122) (not (<= t 3.5e+165))) (- a (/ (* y b) t)) (- (+ a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.6e+122) || !(t <= 3.5e+165)) {
tmp = a - ((y * b) / t);
} else {
tmp = (a + z) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.6d+122)) .or. (.not. (t <= 3.5d+165))) then
tmp = a - ((y * b) / t)
else
tmp = (a + z) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.6e+122) || !(t <= 3.5e+165)) {
tmp = a - ((y * b) / t);
} else {
tmp = (a + z) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.6e+122) or not (t <= 3.5e+165): tmp = a - ((y * b) / t) else: tmp = (a + z) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.6e+122) || !(t <= 3.5e+165)) tmp = Float64(a - Float64(Float64(y * b) / t)); else tmp = Float64(Float64(a + z) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.6e+122) || ~((t <= 3.5e+165))) tmp = a - ((y * b) / t); else tmp = (a + z) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.6e+122], N[Not[LessEqual[t, 3.5e+165]], $MachinePrecision]], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+122} \lor \neg \left(t \leq 3.5 \cdot 10^{+165}\right):\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - b\\
\end{array}
\end{array}
if t < -2.60000000000000007e122 or 3.49999999999999996e165 < t Initial program 53.7%
Taylor expanded in a around 0 78.8%
associate--l+78.8%
+-commutative78.8%
associate-+r+78.8%
associate-+r+78.8%
div-sub78.8%
+-commutative78.8%
*-commutative78.8%
associate-+r+78.8%
Simplified78.8%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 55.9%
mul-1-neg55.9%
*-commutative55.9%
+-commutative55.9%
associate-+r+55.9%
associate-/l*65.1%
distribute-neg-frac65.1%
Simplified65.1%
Taylor expanded in t around inf 55.8%
mul-1-neg55.8%
unsub-neg55.8%
*-commutative55.8%
Simplified55.8%
if -2.60000000000000007e122 < t < 3.49999999999999996e165Initial program 59.8%
Taylor expanded in y around inf 61.8%
Final simplification60.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.35e+122) (not (<= t 1.42e+146))) (/ a (/ (+ t x) t)) (- (+ a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.35e+122) || !(t <= 1.42e+146)) {
tmp = a / ((t + x) / t);
} else {
tmp = (a + z) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.35d+122)) .or. (.not. (t <= 1.42d+146))) then
tmp = a / ((t + x) / t)
else
tmp = (a + z) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.35e+122) || !(t <= 1.42e+146)) {
tmp = a / ((t + x) / t);
} else {
tmp = (a + z) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.35e+122) or not (t <= 1.42e+146): tmp = a / ((t + x) / t) else: tmp = (a + z) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.35e+122) || !(t <= 1.42e+146)) tmp = Float64(a / Float64(Float64(t + x) / t)); else tmp = Float64(Float64(a + z) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.35e+122) || ~((t <= 1.42e+146))) tmp = a / ((t + x) / t); else tmp = (a + z) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.35e+122], N[Not[LessEqual[t, 1.42e+146]], $MachinePrecision]], N[(a / N[(N[(t + x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+122} \lor \neg \left(t \leq 1.42 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{a}{\frac{t + x}{t}}\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - b\\
\end{array}
\end{array}
if t < -1.3499999999999999e122 or 1.4200000000000001e146 < t Initial program 53.0%
Taylor expanded in a around inf 30.0%
associate-/l*60.2%
associate-+r+60.2%
Simplified60.2%
Taylor expanded in y around 0 30.0%
associate-/l*60.2%
Simplified60.2%
if -1.3499999999999999e122 < t < 1.4200000000000001e146Initial program 60.2%
Taylor expanded in y around inf 61.7%
Final simplification61.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.2e+181) z (if (<= x 1e+114) (- (+ a z) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.2e+181) {
tmp = z;
} else if (x <= 1e+114) {
tmp = (a + z) - 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.2d+181)) then
tmp = z
else if (x <= 1d+114) then
tmp = (a + z) - 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.2e+181) {
tmp = z;
} else if (x <= 1e+114) {
tmp = (a + z) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.2e+181: tmp = z elif x <= 1e+114: tmp = (a + z) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.2e+181) tmp = z; elseif (x <= 1e+114) tmp = Float64(Float64(a + z) - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.2e+181) tmp = z; elseif (x <= 1e+114) tmp = (a + z) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.2e+181], z, If[LessEqual[x, 1e+114], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+181}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 10^{+114}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -4.19999999999999995e181 or 1e114 < x Initial program 52.5%
Taylor expanded in x around inf 49.0%
if -4.19999999999999995e181 < x < 1e114Initial program 60.0%
Taylor expanded in y around inf 62.5%
Final simplification59.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.45e+72) a (if (<= a 2.7e+75) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.45e+72) {
tmp = a;
} else if (a <= 2.7e+75) {
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 <= (-1.45d+72)) then
tmp = a
else if (a <= 2.7d+75) 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 <= -1.45e+72) {
tmp = a;
} else if (a <= 2.7e+75) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.45e+72: tmp = a elif a <= 2.7e+75: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.45e+72) tmp = a; elseif (a <= 2.7e+75) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.45e+72) tmp = a; elseif (a <= 2.7e+75) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.45e+72], a, If[LessEqual[a, 2.7e+75], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+72}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+75}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.45000000000000009e72 or 2.69999999999999998e75 < a Initial program 41.5%
Taylor expanded in t around inf 65.9%
if -1.45000000000000009e72 < a < 2.69999999999999998e75Initial program 69.1%
Taylor expanded in x around inf 43.9%
Final simplification52.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.05e+221) (- a b) (+ a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+221) {
tmp = a - b;
} else {
tmp = a + 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 (b <= (-1.05d+221)) then
tmp = a - b
else
tmp = a + 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 (b <= -1.05e+221) {
tmp = a - b;
} else {
tmp = a + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05e+221: tmp = a - b else: tmp = a + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05e+221) tmp = Float64(a - b); else tmp = Float64(a + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.05e+221) tmp = a - b; else tmp = a + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+221], N[(a - b), $MachinePrecision], N[(a + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+221}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;a + z\\
\end{array}
\end{array}
if b < -1.05000000000000001e221Initial program 24.5%
Taylor expanded in a around 0 32.4%
associate--l+32.4%
+-commutative32.4%
associate-+r+32.4%
associate-+r+32.4%
div-sub32.4%
+-commutative32.4%
*-commutative32.4%
associate-+r+32.4%
Simplified32.4%
Taylor expanded in y around inf 25.7%
Taylor expanded in z around 0 20.0%
mul-1-neg20.0%
*-commutative20.0%
+-commutative20.0%
associate-+r+20.0%
associate-/l*74.3%
distribute-neg-frac74.3%
Simplified74.3%
Taylor expanded in y around inf 60.2%
neg-mul-160.2%
unsub-neg60.2%
Simplified60.2%
if -1.05000000000000001e221 < b Initial program 60.2%
associate-+l+60.2%
+-commutative60.2%
div-inv60.0%
associate--l+60.0%
fma-def60.1%
+-commutative60.1%
*-commutative60.1%
fma-neg60.2%
distribute-rgt-neg-out60.2%
add-sqr-sqrt32.5%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-unprod22.2%
add-sqr-sqrt49.4%
Applied egg-rr49.4%
Taylor expanded in y around inf 48.1%
Taylor expanded in b around 0 56.2%
+-commutative56.2%
Simplified56.2%
Final simplification56.4%
(FPCore (x y z t a b) :precision binary64 (+ a z))
double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
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 + z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
def code(x, y, z, t, a, b): return a + z
function code(x, y, z, t, a, b) return Float64(a + z) end
function tmp = code(x, y, z, t, a, b) tmp = a + z; end
code[x_, y_, z_, t_, a_, b_] := N[(a + z), $MachinePrecision]
\begin{array}{l}
\\
a + z
\end{array}
Initial program 58.1%
associate-+l+58.1%
+-commutative58.1%
div-inv58.0%
associate--l+58.0%
fma-def58.1%
+-commutative58.1%
*-commutative58.1%
fma-neg58.2%
distribute-rgt-neg-out58.2%
add-sqr-sqrt32.2%
sqrt-unprod44.0%
sqr-neg44.0%
sqrt-unprod20.9%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
Taylor expanded in y around inf 45.4%
Taylor expanded in b around 0 53.8%
+-commutative53.8%
Simplified53.8%
Final simplification53.8%
(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 58.1%
Taylor expanded in t around inf 35.5%
Final simplification35.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t_2}{t_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
herbie shell --seed 2024011
(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)))