
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))) (t_2 (/ y t_1)))
(if (or (<= a -1.4e-19) (not (<= a 2.1e-49)))
(*
a
(+
(/ t t_1)
(- (+ (* (/ z a) (/ (+ y x) t_1)) t_2) (* y (/ b (* a t_1))))))
(*
z
(+
(/ x t_1)
(-
(+ t_2 (* a (/ 1.0 (/ (* z (+ x (+ t y))) (+ t y)))))
(* b (/ y (* z t_1)))))))))
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 tmp;
if ((a <= -1.4e-19) || !(a <= 2.1e-49)) {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (y * (b / (a * t_1)))));
} else {
tmp = z * ((x / t_1) + ((t_2 + (a * (1.0 / ((z * (x + (t + y))) / (t + y))))) - (b * (y / (z * t_1)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t + (y + x)
t_2 = y / t_1
if ((a <= (-1.4d-19)) .or. (.not. (a <= 2.1d-49))) then
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (y * (b / (a * t_1)))))
else
tmp = z * ((x / t_1) + ((t_2 + (a * (1.0d0 / ((z * (x + (t + y))) / (t + y))))) - (b * (y / (z * t_1)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double t_2 = y / t_1;
double tmp;
if ((a <= -1.4e-19) || !(a <= 2.1e-49)) {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (y * (b / (a * t_1)))));
} else {
tmp = z * ((x / t_1) + ((t_2 + (a * (1.0 / ((z * (x + (t + y))) / (t + y))))) - (b * (y / (z * t_1)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) t_2 = y / t_1 tmp = 0 if (a <= -1.4e-19) or not (a <= 2.1e-49): tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (y * (b / (a * t_1))))) else: tmp = z * ((x / t_1) + ((t_2 + (a * (1.0 / ((z * (x + (t + y))) / (t + y))))) - (b * (y / (z * t_1))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) t_2 = Float64(y / t_1) tmp = 0.0 if ((a <= -1.4e-19) || !(a <= 2.1e-49)) tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(Float64(z / a) * Float64(Float64(y + x) / t_1)) + t_2) - Float64(y * Float64(b / Float64(a * t_1)))))); else tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_2 + Float64(a * Float64(1.0 / Float64(Float64(z * Float64(x + Float64(t + y))) / Float64(t + y))))) - Float64(b * Float64(y / Float64(z * t_1)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (y + x); t_2 = y / t_1; tmp = 0.0; if ((a <= -1.4e-19) || ~((a <= 2.1e-49))) tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (y * (b / (a * t_1))))); else tmp = z * ((x / t_1) + ((t_2 + (a * (1.0 / ((z * (x + (t + y))) / (t + y))))) - (b * (y / (z * t_1))))); end tmp_2 = tmp; 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]}, If[Or[LessEqual[a, -1.4e-19], N[Not[LessEqual[a, 2.1e-49]], $MachinePrecision]], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(N[(z / a), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] - N[(y * N[(b / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$2 + N[(a * N[(1.0 / N[(N[(z * N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
t_2 := \frac{y}{t\_1}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-19} \lor \neg \left(a \leq 2.1 \cdot 10^{-49}\right):\\
\;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{z}{a} \cdot \frac{y + x}{t\_1} + t\_2\right) - y \cdot \frac{b}{a \cdot t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_2 + a \cdot \frac{1}{\frac{z \cdot \left(x + \left(t + y\right)\right)}{t + y}}\right) - b \cdot \frac{y}{z \cdot t\_1}\right)\right)\\
\end{array}
\end{array}
if a < -1.40000000000000001e-19 or 2.0999999999999999e-49 < a Initial program 54.0%
Taylor expanded in a around inf 72.7%
associate--l+72.7%
+-commutative72.7%
+-commutative72.7%
times-frac89.3%
+-commutative89.3%
+-commutative89.3%
associate-/l*94.3%
+-commutative94.3%
Simplified94.3%
associate-*r/89.3%
*-commutative89.3%
Applied egg-rr89.3%
associate-/l*94.5%
+-commutative94.5%
+-commutative94.5%
Simplified94.5%
if -1.40000000000000001e-19 < a < 2.0999999999999999e-49Initial program 67.9%
div-inv67.7%
associate-+l+67.7%
+-commutative67.7%
associate--l+67.7%
fma-define67.8%
+-commutative67.8%
*-commutative67.8%
Applied egg-rr67.8%
Taylor expanded in z around inf 86.5%
associate--l+86.5%
+-commutative86.5%
+-commutative86.5%
associate-/l*86.5%
+-commutative86.5%
+-commutative86.5%
associate-/l*91.3%
+-commutative91.3%
Simplified91.3%
clear-num91.3%
inv-pow91.3%
associate-+r+91.3%
+-commutative91.3%
associate-+l+91.3%
+-commutative91.3%
+-commutative91.3%
Applied egg-rr91.3%
unpow-191.3%
associate-+r+91.3%
+-commutative91.3%
+-commutative91.3%
Simplified91.3%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ y x)) (* a (+ t y))) (* y b)) (+ y (+ t x))))
(t_2 (+ t (+ y x))))
(if (<= t_1 (- INFINITY))
(*
a
(+
(/ t t_2)
(-
(+ (* (/ z a) (/ (+ y x) t_2)) (/ y t_2))
(* (/ b a) (/ y (+ t x))))))
(if (<= t_1 5e+246) t_1 (- (+ a z) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x));
double t_2 = t + (y + x);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = a * ((t / t_2) + ((((z / a) * ((y + x) / t_2)) + (y / t_2)) - ((b / a) * (y / (t + x)))));
} else if (t_1 <= 5e+246) {
tmp = t_1;
} else {
tmp = (a + z) - b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x));
double t_2 = t + (y + x);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = a * ((t / t_2) + ((((z / a) * ((y + x) / t_2)) + (y / t_2)) - ((b / a) * (y / (t + x)))));
} else if (t_1 <= 5e+246) {
tmp = t_1;
} else {
tmp = (a + z) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x)) t_2 = t + (y + x) tmp = 0 if t_1 <= -math.inf: tmp = a * ((t / t_2) + ((((z / a) * ((y + x) / t_2)) + (y / t_2)) - ((b / a) * (y / (t + x))))) elif t_1 <= 5e+246: tmp = t_1 else: tmp = (a + z) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(t + y))) - Float64(y * b)) / Float64(y + Float64(t + x))) t_2 = Float64(t + Float64(y + x)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(a * Float64(Float64(t / t_2) + Float64(Float64(Float64(Float64(z / a) * Float64(Float64(y + x) / t_2)) + Float64(y / t_2)) - Float64(Float64(b / a) * Float64(y / Float64(t + x)))))); elseif (t_1 <= 5e+246) tmp = t_1; else tmp = Float64(Float64(a + z) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x)); t_2 = t + (y + x); tmp = 0.0; if (t_1 <= -Inf) tmp = a * ((t / t_2) + ((((z / a) * ((y + x) / t_2)) + (y / t_2)) - ((b / a) * (y / (t + x))))); elseif (t_1 <= 5e+246) tmp = t_1; else tmp = (a + z) - b; 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[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(a * N[(N[(t / t$95$2), $MachinePrecision] + N[(N[(N[(N[(z / a), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(b / a), $MachinePrecision] * N[(y / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+246], t$95$1, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(t + y\right)\right) - y \cdot b}{y + \left(t + x\right)}\\
t_2 := t + \left(y + x\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;a \cdot \left(\frac{t}{t\_2} + \left(\left(\frac{z}{a} \cdot \frac{y + x}{t\_2} + \frac{y}{t\_2}\right) - \frac{b}{a} \cdot \frac{y}{t + x}\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - b\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 5.8%
Taylor expanded in a around inf 38.1%
associate--l+38.1%
+-commutative38.1%
+-commutative38.1%
times-frac70.4%
+-commutative70.4%
+-commutative70.4%
associate-/l*74.5%
+-commutative74.5%
Simplified74.5%
Taylor expanded in y around 0 68.6%
times-frac68.4%
+-commutative68.4%
Simplified68.4%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999976e246Initial program 99.6%
if 4.99999999999999976e246 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.8%
Taylor expanded in y around inf 71.0%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ y x)) (* a (+ t y))) (* y b)) (+ y (+ t x)))))
(if (<= t_1 (- INFINITY))
(* z (/ (+ x (+ y (* a (/ (+ t y) z)))) (+ x (+ t y))))
(if (<= t_1 5e+246) t_1 (- (+ a z) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else if (t_1 <= 5e+246) {
tmp = t_1;
} else {
tmp = (a + z) - b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else if (t_1 <= 5e+246) {
tmp = t_1;
} else {
tmp = (a + z) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x)) tmp = 0 if t_1 <= -math.inf: tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))) elif t_1 <= 5e+246: tmp = t_1 else: tmp = (a + z) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(t + y))) - Float64(y * b)) / Float64(y + Float64(t + x))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x + Float64(y + Float64(a * Float64(Float64(t + y) / z)))) / Float64(x + Float64(t + y)))); elseif (t_1 <= 5e+246) tmp = t_1; else tmp = Float64(Float64(a + z) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (y + x)) + (a * (t + y))) - (y * b)) / (y + (t + x)); tmp = 0.0; if (t_1 <= -Inf) tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))); elseif (t_1 <= 5e+246) tmp = t_1; else tmp = (a + z) - b; 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[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(x + N[(y + N[(a * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+246], t$95$1, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(t + y\right)\right) - y \cdot b}{y + \left(t + x\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - b\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 5.8%
Taylor expanded in b around inf 5.7%
associate--l+5.7%
associate-/l*5.7%
+-commutative5.7%
Simplified5.7%
Taylor expanded in z around -inf 5.7%
associate-*r*5.7%
mul-1-neg5.7%
distribute-lft-out5.7%
associate-/l*5.7%
associate-/l*5.7%
+-commutative5.7%
Simplified5.7%
Taylor expanded in b around 0 5.5%
associate-/l*48.5%
associate-/l*68.1%
associate-+r+68.1%
+-commutative68.1%
associate-+r+68.1%
+-commutative68.1%
Simplified68.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)) < 4.99999999999999976e246Initial program 99.6%
if 4.99999999999999976e246 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.8%
Taylor expanded in y around inf 71.0%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))) (t_2 (* z t_1)) (t_3 (/ y t_1)))
(if (or (<= a -3.7e-29) (not (<= a 2.9e-49)))
(*
a
(+
(/ t t_1)
(- (+ (* (/ z a) (/ (+ y x) t_1)) t_3) (* y (/ b (* a t_1))))))
(* z (+ (/ x t_1) (- (+ t_3 (* a (/ (+ t y) t_2))) (* b (/ y t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double t_2 = z * t_1;
double t_3 = y / t_1;
double tmp;
if ((a <= -3.7e-29) || !(a <= 2.9e-49)) {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))));
} else {
tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t + (y + x)
t_2 = z * t_1
t_3 = y / t_1
if ((a <= (-3.7d-29)) .or. (.not. (a <= 2.9d-49))) then
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))))
else
tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / 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 = t + (y + x);
double t_2 = z * t_1;
double t_3 = y / t_1;
double tmp;
if ((a <= -3.7e-29) || !(a <= 2.9e-49)) {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))));
} else {
tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) t_2 = z * t_1 t_3 = y / t_1 tmp = 0 if (a <= -3.7e-29) or not (a <= 2.9e-49): tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1))))) else: tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) t_2 = Float64(z * t_1) t_3 = Float64(y / t_1) tmp = 0.0 if ((a <= -3.7e-29) || !(a <= 2.9e-49)) tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(Float64(z / a) * Float64(Float64(y + x) / t_1)) + t_3) - Float64(y * Float64(b / Float64(a * t_1)))))); else tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_3 + Float64(a * Float64(Float64(t + y) / t_2))) - Float64(b * Float64(y / t_2))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (y + x); t_2 = z * t_1; t_3 = y / t_1; tmp = 0.0; if ((a <= -3.7e-29) || ~((a <= 2.9e-49))) tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1))))); else tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y / t$95$1), $MachinePrecision]}, If[Or[LessEqual[a, -3.7e-29], N[Not[LessEqual[a, 2.9e-49]], $MachinePrecision]], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(N[(z / a), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] - N[(y * N[(b / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$3 + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
t_2 := z \cdot t\_1\\
t_3 := \frac{y}{t\_1}\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{-29} \lor \neg \left(a \leq 2.9 \cdot 10^{-49}\right):\\
\;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{z}{a} \cdot \frac{y + x}{t\_1} + t\_3\right) - y \cdot \frac{b}{a \cdot t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_3 + a \cdot \frac{t + y}{t\_2}\right) - b \cdot \frac{y}{t\_2}\right)\right)\\
\end{array}
\end{array}
if a < -3.6999999999999997e-29 or 2.9e-49 < a Initial program 54.3%
Taylor expanded in a around inf 72.9%
associate--l+72.9%
+-commutative72.9%
+-commutative72.9%
times-frac89.3%
+-commutative89.3%
+-commutative89.3%
associate-/l*94.3%
+-commutative94.3%
Simplified94.3%
associate-*r/89.3%
*-commutative89.3%
Applied egg-rr89.3%
associate-/l*94.6%
+-commutative94.6%
+-commutative94.6%
Simplified94.6%
if -3.6999999999999997e-29 < a < 2.9e-49Initial program 67.6%
div-inv67.4%
associate-+l+67.4%
+-commutative67.4%
associate--l+67.4%
fma-define67.5%
+-commutative67.5%
*-commutative67.5%
Applied egg-rr67.5%
Taylor expanded in z around inf 86.4%
associate--l+86.4%
+-commutative86.4%
+-commutative86.4%
associate-/l*86.4%
+-commutative86.4%
+-commutative86.4%
associate-/l*91.2%
+-commutative91.2%
Simplified91.2%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))) (t_2 (/ y t_1)))
(if (or (<= z -5.8e+49) (not (<= z 3.1e+39)))
(*
z
(+
(/ x t_1)
(- (+ t_2 (/ (* a (/ (+ t y) z)) t_1)) (/ (* b (/ y z)) t_1))))
(*
a
(+
(/ t t_1)
(- (+ (* (/ z a) (/ (+ y x) t_1)) t_2) (* b (/ y (* a t_1)))))))))
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 tmp;
if ((z <= -5.8e+49) || !(z <= 3.1e+39)) {
tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1)));
} else {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (b * (y / (a * 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 = t + (y + x)
t_2 = y / t_1
if ((z <= (-5.8d+49)) .or. (.not. (z <= 3.1d+39))) then
tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1)))
else
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (b * (y / (a * 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 = t + (y + x);
double t_2 = y / t_1;
double tmp;
if ((z <= -5.8e+49) || !(z <= 3.1e+39)) {
tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1)));
} else {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (b * (y / (a * t_1)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) t_2 = y / t_1 tmp = 0 if (z <= -5.8e+49) or not (z <= 3.1e+39): tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1))) else: tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (b * (y / (a * t_1))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) t_2 = Float64(y / t_1) tmp = 0.0 if ((z <= -5.8e+49) || !(z <= 3.1e+39)) tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_2 + Float64(Float64(a * Float64(Float64(t + y) / z)) / t_1)) - Float64(Float64(b * Float64(y / z)) / t_1)))); else tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(Float64(z / a) * Float64(Float64(y + x) / t_1)) + t_2) - Float64(b * Float64(y / Float64(a * t_1)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (y + x); t_2 = y / t_1; tmp = 0.0; if ((z <= -5.8e+49) || ~((z <= 3.1e+39))) tmp = z * ((x / t_1) + ((t_2 + ((a * ((t + y) / z)) / t_1)) - ((b * (y / z)) / t_1))); else tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_2) - (b * (y / (a * t_1))))); end tmp_2 = tmp; 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]}, If[Or[LessEqual[z, -5.8e+49], N[Not[LessEqual[z, 3.1e+39]], $MachinePrecision]], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$2 + N[(N[(a * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(y / z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(N[(z / a), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] - N[(b * N[(y / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
t_2 := \frac{y}{t\_1}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+49} \lor \neg \left(z \leq 3.1 \cdot 10^{+39}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_2 + \frac{a \cdot \frac{t + y}{z}}{t\_1}\right) - \frac{b \cdot \frac{y}{z}}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{z}{a} \cdot \frac{y + x}{t\_1} + t\_2\right) - b \cdot \frac{y}{a \cdot t\_1}\right)\right)\\
\end{array}
\end{array}
if z < -5.8e49 or 3.1000000000000003e39 < z Initial program 44.3%
Taylor expanded in z around inf 69.4%
associate--l+69.4%
+-commutative69.4%
+-commutative69.4%
associate-/r*71.4%
associate-/l*83.1%
+-commutative83.1%
associate-/r*84.4%
associate-/l*90.3%
+-commutative90.3%
Simplified90.3%
if -5.8e49 < z < 3.1000000000000003e39Initial program 75.7%
Taylor expanded in a around inf 88.5%
associate--l+88.5%
+-commutative88.5%
+-commutative88.5%
times-frac90.1%
+-commutative90.1%
+-commutative90.1%
associate-/l*91.2%
+-commutative91.2%
Simplified91.2%
Final simplification90.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))))
(if (or (<= z -1.15e+183) (not (<= z 2.4e+40)))
(* z (/ (+ x (+ y (* a (/ (+ t y) z)))) (+ x (+ t y))))
(*
a
(+
(/ t t_1)
(- (+ (* (/ z a) (/ (+ y x) t_1)) (/ y t_1)) (* b (/ y (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double tmp;
if ((z <= -1.15e+183) || !(z <= 2.4e+40)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + (y / t_1)) - (b * (y / (a * 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 = t + (y + x)
if ((z <= (-1.15d+183)) .or. (.not. (z <= 2.4d+40))) then
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)))
else
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + (y / t_1)) - (b * (y / (a * 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 = t + (y + x);
double tmp;
if ((z <= -1.15e+183) || !(z <= 2.4e+40)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else {
tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + (y / t_1)) - (b * (y / (a * t_1)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) tmp = 0 if (z <= -1.15e+183) or not (z <= 2.4e+40): tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))) else: tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + (y / t_1)) - (b * (y / (a * t_1))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) tmp = 0.0 if ((z <= -1.15e+183) || !(z <= 2.4e+40)) tmp = Float64(z * Float64(Float64(x + Float64(y + Float64(a * Float64(Float64(t + y) / z)))) / Float64(x + Float64(t + y)))); else tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(Float64(z / a) * Float64(Float64(y + x) / t_1)) + Float64(y / t_1)) - Float64(b * Float64(y / Float64(a * t_1)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (y + x); tmp = 0.0; if ((z <= -1.15e+183) || ~((z <= 2.4e+40))) tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))); else tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + (y / t_1)) - (b * (y / (a * t_1))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.15e+183], N[Not[LessEqual[z, 2.4e+40]], $MachinePrecision]], N[(z * N[(N[(x + N[(y + N[(a * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(N[(z / a), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+183} \lor \neg \left(z \leq 2.4 \cdot 10^{+40}\right):\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{z}{a} \cdot \frac{y + x}{t\_1} + \frac{y}{t\_1}\right) - b \cdot \frac{y}{a \cdot t\_1}\right)\right)\\
\end{array}
\end{array}
if z < -1.1499999999999999e183 or 2.4e40 < z Initial program 38.9%
Taylor expanded in b around inf 24.5%
associate--l+24.5%
associate-/l*24.6%
+-commutative24.6%
Simplified24.6%
Taylor expanded in z around -inf 34.7%
associate-*r*34.7%
mul-1-neg34.7%
distribute-lft-out34.7%
associate-/l*32.9%
associate-/l*31.0%
+-commutative31.0%
Simplified31.0%
Taylor expanded in b around 0 36.1%
associate-/l*75.2%
associate-/l*89.1%
associate-+r+89.1%
+-commutative89.1%
associate-+r+89.1%
+-commutative89.1%
Simplified89.1%
if -1.1499999999999999e183 < z < 2.4e40Initial program 72.1%
Taylor expanded in a around inf 83.0%
associate--l+83.0%
+-commutative83.0%
+-commutative83.0%
times-frac88.0%
+-commutative88.0%
+-commutative88.0%
associate-/l*89.5%
+-commutative89.5%
Simplified89.5%
Final simplification89.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= t -5.2e+264)
a
(if (<= t -8e+250)
(* z (/ (+ y x) t))
(if (<= t -4.4e+219)
a
(if (<= t -3.65e-31)
t_1
(if (<= t -4.6e-243) z (if (<= t 2.7e+123) t_1 a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + z) - b;
double tmp;
if (t <= -5.2e+264) {
tmp = a;
} else if (t <= -8e+250) {
tmp = z * ((y + x) / t);
} else if (t <= -4.4e+219) {
tmp = a;
} else if (t <= -3.65e-31) {
tmp = t_1;
} else if (t <= -4.6e-243) {
tmp = z;
} else if (t <= 2.7e+123) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (a + z) - b
if (t <= (-5.2d+264)) then
tmp = a
else if (t <= (-8d+250)) then
tmp = z * ((y + x) / t)
else if (t <= (-4.4d+219)) then
tmp = a
else if (t <= (-3.65d-31)) then
tmp = t_1
else if (t <= (-4.6d-243)) then
tmp = z
else if (t <= 2.7d+123) then
tmp = t_1
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 t_1 = (a + z) - b;
double tmp;
if (t <= -5.2e+264) {
tmp = a;
} else if (t <= -8e+250) {
tmp = z * ((y + x) / t);
} else if (t <= -4.4e+219) {
tmp = a;
} else if (t <= -3.65e-31) {
tmp = t_1;
} else if (t <= -4.6e-243) {
tmp = z;
} else if (t <= 2.7e+123) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + z) - b tmp = 0 if t <= -5.2e+264: tmp = a elif t <= -8e+250: tmp = z * ((y + x) / t) elif t <= -4.4e+219: tmp = a elif t <= -3.65e-31: tmp = t_1 elif t <= -4.6e-243: tmp = z elif t <= 2.7e+123: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + z) - b) tmp = 0.0 if (t <= -5.2e+264) tmp = a; elseif (t <= -8e+250) tmp = Float64(z * Float64(Float64(y + x) / t)); elseif (t <= -4.4e+219) tmp = a; elseif (t <= -3.65e-31) tmp = t_1; elseif (t <= -4.6e-243) tmp = z; elseif (t <= 2.7e+123) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + z) - b; tmp = 0.0; if (t <= -5.2e+264) tmp = a; elseif (t <= -8e+250) tmp = z * ((y + x) / t); elseif (t <= -4.4e+219) tmp = a; elseif (t <= -3.65e-31) tmp = t_1; elseif (t <= -4.6e-243) tmp = z; elseif (t <= 2.7e+123) tmp = t_1; else tmp = a; 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[t, -5.2e+264], a, If[LessEqual[t, -8e+250], N[(z * N[(N[(y + x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e+219], a, If[LessEqual[t, -3.65e-31], t$95$1, If[LessEqual[t, -4.6e-243], z, If[LessEqual[t, 2.7e+123], t$95$1, a]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+264}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+250}:\\
\;\;\;\;z \cdot \frac{y + x}{t}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{+219}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -3.65 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-243}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -5.1999999999999999e264 or -7.9999999999999994e250 < t < -4.4000000000000003e219 or 2.70000000000000013e123 < t Initial program 38.6%
Taylor expanded in t around inf 66.7%
if -5.1999999999999999e264 < t < -7.9999999999999994e250Initial program 71.8%
Taylor expanded in z around inf 57.8%
associate-/l*81.5%
+-commutative81.5%
associate-+r+81.5%
Simplified81.5%
Taylor expanded in t around inf 57.8%
associate-/l*81.5%
Simplified81.5%
if -4.4000000000000003e219 < t < -3.6500000000000001e-31 or -4.6e-243 < t < 2.70000000000000013e123Initial program 63.4%
Taylor expanded in y around inf 60.6%
if -3.6500000000000001e-31 < t < -4.6e-243Initial program 74.7%
Taylor expanded in x around inf 65.7%
Final simplification63.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))) (t_2 (* z (/ (+ y x) t_1))))
(if (<= z -6.4e+39)
t_2
(if (<= z -1.2e-73)
(- (+ a z) b)
(if (<= z -9e-202)
(* a (/ (+ t y) t_1))
(if (<= z 4.1e+27) (/ (- (* a (+ t y)) (* y b)) t_1) t_2))))))
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) / t_1);
double tmp;
if (z <= -6.4e+39) {
tmp = t_2;
} else if (z <= -1.2e-73) {
tmp = (a + z) - b;
} else if (z <= -9e-202) {
tmp = a * ((t + y) / t_1);
} else if (z <= 4.1e+27) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (t + x)
t_2 = z * ((y + x) / t_1)
if (z <= (-6.4d+39)) then
tmp = t_2
else if (z <= (-1.2d-73)) then
tmp = (a + z) - b
else if (z <= (-9d-202)) then
tmp = a * ((t + y) / t_1)
else if (z <= 4.1d+27) then
tmp = ((a * (t + y)) - (y * b)) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -6.4e+39) {
tmp = t_2;
} else if (z <= -1.2e-73) {
tmp = (a + z) - b;
} else if (z <= -9e-202) {
tmp = a * ((t + y) / t_1);
} else if (z <= 4.1e+27) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = z * ((y + x) / t_1) tmp = 0 if z <= -6.4e+39: tmp = t_2 elif z <= -1.2e-73: tmp = (a + z) - b elif z <= -9e-202: tmp = a * ((t + y) / t_1) elif z <= 4.1e+27: tmp = ((a * (t + y)) - (y * b)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(z * Float64(Float64(y + x) / t_1)) tmp = 0.0 if (z <= -6.4e+39) tmp = t_2; elseif (z <= -1.2e-73) tmp = Float64(Float64(a + z) - b); elseif (z <= -9e-202) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= 4.1e+27) tmp = Float64(Float64(Float64(a * Float64(t + y)) - Float64(y * b)) / t_1); else tmp = t_2; 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_1); tmp = 0.0; if (z <= -6.4e+39) tmp = t_2; elseif (z <= -1.2e-73) tmp = (a + z) - b; elseif (z <= -9e-202) tmp = a * ((t + y) / t_1); elseif (z <= 4.1e+27) tmp = ((a * (t + y)) - (y * b)) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e+39], t$95$2, If[LessEqual[z, -1.2e-73], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, -9e-202], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+27], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := z \cdot \frac{y + x}{t\_1}\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-73}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+27}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.39999999999999986e39 or 4.1000000000000002e27 < z Initial program 45.8%
Taylor expanded in z around inf 33.0%
associate-/l*67.4%
+-commutative67.4%
associate-+r+67.4%
Simplified67.4%
if -6.39999999999999986e39 < z < -1.20000000000000003e-73Initial program 69.6%
Taylor expanded in y around inf 65.3%
if -1.20000000000000003e-73 < z < -9.00000000000000078e-202Initial program 73.7%
Taylor expanded in a around inf 54.8%
associate-/l*80.9%
associate-+r+80.9%
Simplified80.9%
if -9.00000000000000078e-202 < z < 4.1000000000000002e27Initial program 78.8%
Taylor expanded in z around 0 64.0%
*-commutative64.0%
Simplified64.0%
Final simplification67.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))))
(if (or (<= z -2.1e+31) (not (<= z 9.5e-55)))
(* z (/ (+ x (+ y (* a (/ (+ t y) z)))) (+ x (+ t y))))
(- (/ (* a (+ t y)) t_1) (* b (/ y t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double tmp;
if ((z <= -2.1e+31) || !(z <= 9.5e-55)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else {
tmp = ((a * (t + y)) / t_1) - (b * (y / 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 = t + (y + x)
if ((z <= (-2.1d+31)) .or. (.not. (z <= 9.5d-55))) then
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)))
else
tmp = ((a * (t + y)) / t_1) - (b * (y / 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 = t + (y + x);
double tmp;
if ((z <= -2.1e+31) || !(z <= 9.5e-55)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else {
tmp = ((a * (t + y)) / t_1) - (b * (y / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) tmp = 0 if (z <= -2.1e+31) or not (z <= 9.5e-55): tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))) else: tmp = ((a * (t + y)) / t_1) - (b * (y / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) tmp = 0.0 if ((z <= -2.1e+31) || !(z <= 9.5e-55)) tmp = Float64(z * Float64(Float64(x + Float64(y + Float64(a * Float64(Float64(t + y) / z)))) / Float64(x + Float64(t + y)))); else tmp = Float64(Float64(Float64(a * Float64(t + y)) / t_1) - Float64(b * Float64(y / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (y + x); tmp = 0.0; if ((z <= -2.1e+31) || ~((z <= 9.5e-55))) tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))); else tmp = ((a * (t + y)) / t_1) - (b * (y / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.1e+31], N[Not[LessEqual[z, 9.5e-55]], $MachinePrecision]], N[(z * N[(N[(x + N[(y + N[(a * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+31} \lor \neg \left(z \leq 9.5 \cdot 10^{-55}\right):\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right)}{t\_1} - b \cdot \frac{y}{t\_1}\\
\end{array}
\end{array}
if z < -2.09999999999999979e31 or 9.5000000000000006e-55 < z Initial program 48.6%
Taylor expanded in b around inf 34.7%
associate--l+34.7%
associate-/l*33.4%
+-commutative33.4%
Simplified33.4%
Taylor expanded in z around -inf 43.6%
associate-*r*43.6%
mul-1-neg43.6%
distribute-lft-out43.6%
associate-/l*42.4%
associate-/l*39.3%
+-commutative39.3%
Simplified39.3%
Taylor expanded in b around 0 44.5%
associate-/l*73.3%
associate-/l*85.1%
associate-+r+85.1%
+-commutative85.1%
associate-+r+85.1%
+-commutative85.1%
Simplified85.1%
if -2.09999999999999979e31 < z < 9.5000000000000006e-55Initial program 76.1%
div-inv75.9%
associate-+l+75.9%
+-commutative75.9%
associate--l+75.9%
fma-define75.9%
+-commutative75.9%
*-commutative75.9%
Applied egg-rr75.9%
Taylor expanded in z around inf 64.2%
associate--l+64.2%
+-commutative64.2%
+-commutative64.2%
associate-/l*73.6%
+-commutative73.6%
+-commutative73.6%
associate-/l*76.2%
+-commutative76.2%
Simplified76.2%
Taylor expanded in z around 0 65.3%
*-commutative65.3%
associate-/l*67.5%
Simplified67.5%
Final simplification77.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.6e+19) (not (<= z 6.1e-55))) (* z (/ (+ x (+ y (* a (/ (+ t y) z)))) (+ x (+ t y)))) (/ (- (* a (+ t y)) (* y b)) (+ y (+ t x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e+19) || !(z <= 6.1e-55)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else {
tmp = ((a * (t + y)) - (y * b)) / (y + (t + x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.6d+19)) .or. (.not. (z <= 6.1d-55))) then
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)))
else
tmp = ((a * (t + y)) - (y * b)) / (y + (t + x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e+19) || !(z <= 6.1e-55)) {
tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y)));
} else {
tmp = ((a * (t + y)) - (y * b)) / (y + (t + x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.6e+19) or not (z <= 6.1e-55): tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))) else: tmp = ((a * (t + y)) - (y * b)) / (y + (t + x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.6e+19) || !(z <= 6.1e-55)) tmp = Float64(z * Float64(Float64(x + Float64(y + Float64(a * Float64(Float64(t + y) / z)))) / Float64(x + Float64(t + y)))); else tmp = Float64(Float64(Float64(a * Float64(t + y)) - Float64(y * b)) / Float64(y + Float64(t + x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.6e+19) || ~((z <= 6.1e-55))) tmp = z * ((x + (y + (a * ((t + y) / z)))) / (x + (t + y))); else tmp = ((a * (t + y)) - (y * b)) / (y + (t + x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.6e+19], N[Not[LessEqual[z, 6.1e-55]], $MachinePrecision]], N[(z * N[(N[(x + N[(y + N[(a * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+19} \lor \neg \left(z \leq 6.1 \cdot 10^{-55}\right):\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{y + \left(t + x\right)}\\
\end{array}
\end{array}
if z < -5.6e19 or 6.1000000000000001e-55 < z Initial program 48.4%
Taylor expanded in b around inf 34.1%
associate--l+34.1%
associate-/l*32.8%
+-commutative32.8%
Simplified32.8%
Taylor expanded in z around -inf 42.8%
associate-*r*42.8%
mul-1-neg42.8%
distribute-lft-out42.8%
associate-/l*41.7%
associate-/l*38.6%
+-commutative38.6%
Simplified38.6%
Taylor expanded in b around 0 44.3%
associate-/l*72.5%
associate-/l*84.1%
associate-+r+84.1%
+-commutative84.1%
associate-+r+84.1%
+-commutative84.1%
Simplified84.1%
if -5.6e19 < z < 6.1000000000000001e-55Initial program 77.3%
Taylor expanded in z around 0 66.2%
*-commutative66.2%
Simplified66.2%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.1e-109) (not (<= y 2.6e-67))) (- (+ a z) b) (* a (+ (/ t (+ t x)) (* (/ x a) (/ z (+ t x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.1e-109) || !(y <= 2.6e-67)) {
tmp = (a + z) - b;
} else {
tmp = a * ((t / (t + x)) + ((x / a) * (z / (t + x))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.1d-109)) .or. (.not. (y <= 2.6d-67))) then
tmp = (a + z) - b
else
tmp = a * ((t / (t + x)) + ((x / a) * (z / (t + x))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.1e-109) || !(y <= 2.6e-67)) {
tmp = (a + z) - b;
} else {
tmp = a * ((t / (t + x)) + ((x / a) * (z / (t + x))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.1e-109) or not (y <= 2.6e-67): tmp = (a + z) - b else: tmp = a * ((t / (t + x)) + ((x / a) * (z / (t + x)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.1e-109) || !(y <= 2.6e-67)) tmp = Float64(Float64(a + z) - b); else tmp = Float64(a * Float64(Float64(t / Float64(t + x)) + Float64(Float64(x / a) * Float64(z / Float64(t + x))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.1e-109) || ~((y <= 2.6e-67))) tmp = (a + z) - b; else tmp = a * ((t / (t + x)) + ((x / a) * (z / (t + x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.1e-109], N[Not[LessEqual[y, 2.6e-67]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] * N[(z / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-109} \lor \neg \left(y \leq 2.6 \cdot 10^{-67}\right):\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{t}{t + x} + \frac{x}{a} \cdot \frac{z}{t + x}\right)\\
\end{array}
\end{array}
if y < -2.09999999999999996e-109 or 2.5999999999999999e-67 < y Initial program 52.8%
Taylor expanded in y around inf 63.3%
if -2.09999999999999996e-109 < y < 2.5999999999999999e-67Initial program 71.9%
Taylor expanded in a around inf 79.6%
associate--l+79.6%
+-commutative79.6%
+-commutative79.6%
times-frac84.7%
+-commutative84.7%
+-commutative84.7%
associate-/l*84.6%
+-commutative84.6%
Simplified84.6%
Taylor expanded in y around 0 68.6%
+-commutative68.6%
times-frac73.7%
+-commutative73.7%
Simplified73.7%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))) (t_2 (* z (/ (+ y x) t_1))))
(if (<= z -2.4e+38)
t_2
(if (<= z -1.3e-73)
(- (+ a z) b)
(if (<= z 3.6e+40) (* a (/ (+ t y) t_1)) t_2)))))
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) / t_1);
double tmp;
if (z <= -2.4e+38) {
tmp = t_2;
} else if (z <= -1.3e-73) {
tmp = (a + z) - b;
} else if (z <= 3.6e+40) {
tmp = a * ((t + y) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (t + x)
t_2 = z * ((y + x) / t_1)
if (z <= (-2.4d+38)) then
tmp = t_2
else if (z <= (-1.3d-73)) then
tmp = (a + z) - b
else if (z <= 3.6d+40) then
tmp = a * ((t + y) / t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -2.4e+38) {
tmp = t_2;
} else if (z <= -1.3e-73) {
tmp = (a + z) - b;
} else if (z <= 3.6e+40) {
tmp = a * ((t + y) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = z * ((y + x) / t_1) tmp = 0 if z <= -2.4e+38: tmp = t_2 elif z <= -1.3e-73: tmp = (a + z) - b elif z <= 3.6e+40: tmp = a * ((t + y) / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(z * Float64(Float64(y + x) / t_1)) tmp = 0.0 if (z <= -2.4e+38) tmp = t_2; elseif (z <= -1.3e-73) tmp = Float64(Float64(a + z) - b); elseif (z <= 3.6e+40) tmp = Float64(a * Float64(Float64(t + y) / t_1)); else tmp = t_2; 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_1); tmp = 0.0; if (z <= -2.4e+38) tmp = t_2; elseif (z <= -1.3e-73) tmp = (a + z) - b; elseif (z <= 3.6e+40) tmp = a * ((t + y) / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+38], t$95$2, If[LessEqual[z, -1.3e-73], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, 3.6e+40], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := z \cdot \frac{y + x}{t\_1}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-73}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+40}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.40000000000000017e38 or 3.59999999999999996e40 < z Initial program 45.6%
Taylor expanded in z around inf 32.4%
associate-/l*67.9%
+-commutative67.9%
associate-+r+67.9%
Simplified67.9%
if -2.40000000000000017e38 < z < -1.3e-73Initial program 69.6%
Taylor expanded in y around inf 65.3%
if -1.3e-73 < z < 3.59999999999999996e40Initial program 76.6%
Taylor expanded in a around inf 42.5%
associate-/l*61.8%
associate-+r+61.8%
Simplified61.8%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= t -1.32e+206)
a
(if (<= t -4.6e-31)
t_1
(if (<= t -1.5e-242) z (if (<= t 6.4e+122) t_1 a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + z) - b;
double tmp;
if (t <= -1.32e+206) {
tmp = a;
} else if (t <= -4.6e-31) {
tmp = t_1;
} else if (t <= -1.5e-242) {
tmp = z;
} else if (t <= 6.4e+122) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (a + z) - b
if (t <= (-1.32d+206)) then
tmp = a
else if (t <= (-4.6d-31)) then
tmp = t_1
else if (t <= (-1.5d-242)) then
tmp = z
else if (t <= 6.4d+122) then
tmp = t_1
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 t_1 = (a + z) - b;
double tmp;
if (t <= -1.32e+206) {
tmp = a;
} else if (t <= -4.6e-31) {
tmp = t_1;
} else if (t <= -1.5e-242) {
tmp = z;
} else if (t <= 6.4e+122) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + z) - b tmp = 0 if t <= -1.32e+206: tmp = a elif t <= -4.6e-31: tmp = t_1 elif t <= -1.5e-242: tmp = z elif t <= 6.4e+122: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + z) - b) tmp = 0.0 if (t <= -1.32e+206) tmp = a; elseif (t <= -4.6e-31) tmp = t_1; elseif (t <= -1.5e-242) tmp = z; elseif (t <= 6.4e+122) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + z) - b; tmp = 0.0; if (t <= -1.32e+206) tmp = a; elseif (t <= -4.6e-31) tmp = t_1; elseif (t <= -1.5e-242) tmp = z; elseif (t <= 6.4e+122) tmp = t_1; else tmp = a; 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[t, -1.32e+206], a, If[LessEqual[t, -4.6e-31], t$95$1, If[LessEqual[t, -1.5e-242], z, If[LessEqual[t, 6.4e+122], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;t \leq -1.32 \cdot 10^{+206}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-242}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.3200000000000001e206 or 6.40000000000000024e122 < t Initial program 42.1%
Taylor expanded in t around inf 60.2%
if -1.3200000000000001e206 < t < -4.5999999999999997e-31 or -1.5e-242 < t < 6.40000000000000024e122Initial program 63.4%
Taylor expanded in y around inf 60.6%
if -4.5999999999999997e-31 < t < -1.5e-242Initial program 74.7%
Taylor expanded in x around inf 65.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.2e+111) (not (<= a 2.7e+82))) (* a (/ (+ t y) (+ y (+ t x)))) (- (+ a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.2e+111) || !(a <= 2.7e+82)) {
tmp = a * ((t + y) / (y + (t + x)));
} 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 ((a <= (-2.2d+111)) .or. (.not. (a <= 2.7d+82))) then
tmp = a * ((t + y) / (y + (t + x)))
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 ((a <= -2.2e+111) || !(a <= 2.7e+82)) {
tmp = a * ((t + y) / (y + (t + x)));
} else {
tmp = (a + z) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.2e+111) or not (a <= 2.7e+82): tmp = a * ((t + y) / (y + (t + x))) else: tmp = (a + z) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.2e+111) || !(a <= 2.7e+82)) tmp = Float64(a * Float64(Float64(t + y) / Float64(y + Float64(t + x)))); 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 ((a <= -2.2e+111) || ~((a <= 2.7e+82))) tmp = a * ((t + y) / (y + (t + x))); else tmp = (a + z) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.2e+111], N[Not[LessEqual[a, 2.7e+82]], $MachinePrecision]], N[(a * N[(N[(t + y), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+111} \lor \neg \left(a \leq 2.7 \cdot 10^{+82}\right):\\
\;\;\;\;a \cdot \frac{t + y}{y + \left(t + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - b\\
\end{array}
\end{array}
if a < -2.19999999999999999e111 or 2.6999999999999999e82 < a Initial program 47.7%
Taylor expanded in a around inf 35.2%
associate-/l*75.0%
associate-+r+75.0%
Simplified75.0%
if -2.19999999999999999e111 < a < 2.6999999999999999e82Initial program 66.2%
Taylor expanded in y around inf 53.5%
Final simplification60.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.6e+201) (- (+ a z) b) (* b (/ y (- (- y) (+ t x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.6e+201) {
tmp = (a + z) - b;
} else {
tmp = b * (y / (-y - (t + x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.6d+201) then
tmp = (a + z) - b
else
tmp = b * (y / (-y - (t + x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.6e+201) {
tmp = (a + z) - b;
} else {
tmp = b * (y / (-y - (t + x)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.6e+201: tmp = (a + z) - b else: tmp = b * (y / (-y - (t + x))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.6e+201) tmp = Float64(Float64(a + z) - b); else tmp = Float64(b * Float64(y / Float64(Float64(-y) - Float64(t + x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.6e+201) tmp = (a + z) - b; else tmp = b * (y / (-y - (t + x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.6e+201], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(b * N[(y / N[((-y) - N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.6 \cdot 10^{+201}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{y}{\left(-y\right) - \left(t + x\right)}\\
\end{array}
\end{array}
if b < 1.6e201Initial program 62.0%
Taylor expanded in y around inf 56.0%
if 1.6e201 < b Initial program 43.7%
Taylor expanded in b around inf 29.5%
mul-1-neg29.5%
associate-/l*56.6%
distribute-rgt-neg-in56.6%
mul-1-neg56.6%
associate-*r/56.6%
neg-mul-156.6%
associate-+r+56.6%
Simplified56.6%
Final simplification56.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.05e+32) a (if (<= t 1.65e+118) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+32) {
tmp = a;
} else if (t <= 1.65e+118) {
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 (t <= (-1.05d+32)) then
tmp = a
else if (t <= 1.65d+118) 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 (t <= -1.05e+32) {
tmp = a;
} else if (t <= 1.65e+118) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+32: tmp = a elif t <= 1.65e+118: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+32) tmp = a; elseif (t <= 1.65e+118) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.05e+32) tmp = a; elseif (t <= 1.65e+118) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+32], a, If[LessEqual[t, 1.65e+118], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+32}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+118}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.05e32 or 1.65e118 < t Initial program 48.5%
Taylor expanded in t around inf 53.5%
if -1.05e32 < t < 1.65e118Initial program 68.1%
Taylor expanded in x around inf 52.6%
(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 59.9%
Taylor expanded in t around inf 31.3%
(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 2024091
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(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)))