
(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 (+ x (+ t y)))) (- (fma a (/ (+ t y) t_1) (* z (/ (+ y x) t_1))) (* b (/ y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
return fma(a, ((t + y) / t_1), (z * ((y + x) / t_1))) - (b * (y / t_1));
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) return Float64(fma(a, Float64(Float64(t + y) / t_1), Float64(z * Float64(Float64(y + x) / t_1))) - Float64(b * Float64(y / t_1))) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
\mathsf{fma}\left(a, \frac{t + y}{t\_1}, z \cdot \frac{y + x}{t\_1}\right) - b \cdot \frac{y}{t\_1}
\end{array}
\end{array}
Initial program 61.7%
Taylor expanded in b around 0 61.7%
mul-1-neg61.7%
+-commutative61.7%
*-commutative61.7%
+-commutative61.7%
associate-+r+61.7%
associate-*r/64.2%
unsub-neg64.2%
Simplified98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* a (+ t y)) (* z (+ y x))) (* y b)) (+ y (+ t x)))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+273)))
(- (+ a z) (* y (/ b (+ x (+ t y)))))
t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((a * (t + y)) + (z * (y + x))) - (y * b)) / (y + (t + x));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+273)) {
tmp = (a + z) - (y * (b / (x + (t + y))));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((a * (t + y)) + (z * (y + x))) - (y * b)) / (y + (t + x));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+273)) {
tmp = (a + z) - (y * (b / (x + (t + y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((a * (t + y)) + (z * (y + x))) - (y * b)) / (y + (t + x)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+273): tmp = (a + z) - (y * (b / (x + (t + y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(y + x))) - Float64(y * b)) / Float64(y + Float64(t + x))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+273)) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + Float64(t + y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((a * (t + y)) + (z * (y + x))) - (y * b)) / (y + (t + x)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+273))) tmp = (a + z) - (y * (b / (x + (t + 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[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+273]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(y + x\right)\right) - y \cdot b}{y + \left(t + x\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+273}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + 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)) < -inf.0 or 4.99999999999999961e273 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.2%
div-sub6.2%
fma-define6.3%
+-commutative6.3%
*-commutative6.3%
associate-+l+6.3%
+-commutative6.3%
associate-+l+6.3%
+-commutative6.3%
associate-/l*18.4%
Applied egg-rr18.4%
Taylor expanded in y around -inf 81.7%
mul-1-neg81.7%
neg-mul-181.7%
mul-1-neg81.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)) < 4.99999999999999961e273Initial program 99.7%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ y (+ y x)))
(t_2 (+ z (- (* a t_1) (* b t_1))))
(t_3 (- (+ a (/ (* y z) (+ t y))) (* b (/ y (+ t y)))))
(t_4 (+ y (+ t x))))
(if (<= t -4.4e+193)
t_3
(if (<= t -235000000000.0)
(- (+ a z) (* y (/ b (+ x (+ t y)))))
(if (<= t 3800.0)
t_2
(if (<= t 5.1e+61)
(/ (+ (* a (+ t y)) (* z (+ y x))) t_4)
(if (<= t 1.95e+147)
t_2
(if (<= t 5.2e+230)
t_3
(if (<= t 2.2e+255)
(* z (* (+ y x) (/ 1.0 t_4)))
(+ a (* b (/ -1.0 (/ t_4 y)))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / (y + x);
double t_2 = z + ((a * t_1) - (b * t_1));
double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
double t_4 = y + (t + x);
double tmp;
if (t <= -4.4e+193) {
tmp = t_3;
} else if (t <= -235000000000.0) {
tmp = (a + z) - (y * (b / (x + (t + y))));
} else if (t <= 3800.0) {
tmp = t_2;
} else if (t <= 5.1e+61) {
tmp = ((a * (t + y)) + (z * (y + x))) / t_4;
} else if (t <= 1.95e+147) {
tmp = t_2;
} else if (t <= 5.2e+230) {
tmp = t_3;
} else if (t <= 2.2e+255) {
tmp = z * ((y + x) * (1.0 / t_4));
} else {
tmp = a + (b * (-1.0 / (t_4 / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y / (y + x)
t_2 = z + ((a * t_1) - (b * t_1))
t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
t_4 = y + (t + x)
if (t <= (-4.4d+193)) then
tmp = t_3
else if (t <= (-235000000000.0d0)) then
tmp = (a + z) - (y * (b / (x + (t + y))))
else if (t <= 3800.0d0) then
tmp = t_2
else if (t <= 5.1d+61) then
tmp = ((a * (t + y)) + (z * (y + x))) / t_4
else if (t <= 1.95d+147) then
tmp = t_2
else if (t <= 5.2d+230) then
tmp = t_3
else if (t <= 2.2d+255) then
tmp = z * ((y + x) * (1.0d0 / t_4))
else
tmp = a + (b * ((-1.0d0) / (t_4 / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / (y + x);
double t_2 = z + ((a * t_1) - (b * t_1));
double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
double t_4 = y + (t + x);
double tmp;
if (t <= -4.4e+193) {
tmp = t_3;
} else if (t <= -235000000000.0) {
tmp = (a + z) - (y * (b / (x + (t + y))));
} else if (t <= 3800.0) {
tmp = t_2;
} else if (t <= 5.1e+61) {
tmp = ((a * (t + y)) + (z * (y + x))) / t_4;
} else if (t <= 1.95e+147) {
tmp = t_2;
} else if (t <= 5.2e+230) {
tmp = t_3;
} else if (t <= 2.2e+255) {
tmp = z * ((y + x) * (1.0 / t_4));
} else {
tmp = a + (b * (-1.0 / (t_4 / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y / (y + x) t_2 = z + ((a * t_1) - (b * t_1)) t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y))) t_4 = y + (t + x) tmp = 0 if t <= -4.4e+193: tmp = t_3 elif t <= -235000000000.0: tmp = (a + z) - (y * (b / (x + (t + y)))) elif t <= 3800.0: tmp = t_2 elif t <= 5.1e+61: tmp = ((a * (t + y)) + (z * (y + x))) / t_4 elif t <= 1.95e+147: tmp = t_2 elif t <= 5.2e+230: tmp = t_3 elif t <= 2.2e+255: tmp = z * ((y + x) * (1.0 / t_4)) else: tmp = a + (b * (-1.0 / (t_4 / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y / Float64(y + x)) t_2 = Float64(z + Float64(Float64(a * t_1) - Float64(b * t_1))) t_3 = Float64(Float64(a + Float64(Float64(y * z) / Float64(t + y))) - Float64(b * Float64(y / Float64(t + y)))) t_4 = Float64(y + Float64(t + x)) tmp = 0.0 if (t <= -4.4e+193) tmp = t_3; elseif (t <= -235000000000.0) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + Float64(t + y))))); elseif (t <= 3800.0) tmp = t_2; elseif (t <= 5.1e+61) tmp = Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(y + x))) / t_4); elseif (t <= 1.95e+147) tmp = t_2; elseif (t <= 5.2e+230) tmp = t_3; elseif (t <= 2.2e+255) tmp = Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_4))); else tmp = Float64(a + Float64(b * Float64(-1.0 / Float64(t_4 / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y / (y + x); t_2 = z + ((a * t_1) - (b * t_1)); t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y))); t_4 = y + (t + x); tmp = 0.0; if (t <= -4.4e+193) tmp = t_3; elseif (t <= -235000000000.0) tmp = (a + z) - (y * (b / (x + (t + y)))); elseif (t <= 3800.0) tmp = t_2; elseif (t <= 5.1e+61) tmp = ((a * (t + y)) + (z * (y + x))) / t_4; elseif (t <= 1.95e+147) tmp = t_2; elseif (t <= 5.2e+230) tmp = t_3; elseif (t <= 2.2e+255) tmp = z * ((y + x) * (1.0 / t_4)); else tmp = a + (b * (-1.0 / (t_4 / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(N[(a * t$95$1), $MachinePrecision] - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + N[(N[(y * z), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+193], t$95$3, If[LessEqual[t, -235000000000.0], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3800.0], t$95$2, If[LessEqual[t, 5.1e+61], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[t, 1.95e+147], t$95$2, If[LessEqual[t, 5.2e+230], t$95$3, If[LessEqual[t, 2.2e+255], N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(b * N[(-1.0 / N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{y + x}\\
t_2 := z + \left(a \cdot t\_1 - b \cdot t\_1\right)\\
t_3 := \left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\
t_4 := y + \left(t + x\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+193}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -235000000000:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \leq 3800:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+61}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) + z \cdot \left(y + x\right)}{t\_4}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_4}\right)\\
\mathbf{else}:\\
\;\;\;\;a + b \cdot \frac{-1}{\frac{t\_4}{y}}\\
\end{array}
\end{array}
if t < -4.39999999999999972e193 or 1.95000000000000008e147 < t < 5.1999999999999997e230Initial program 52.9%
div-sub52.8%
fma-define52.8%
+-commutative52.8%
*-commutative52.8%
associate-+l+52.8%
+-commutative52.8%
associate-+l+52.8%
+-commutative52.8%
associate-/l*56.8%
Applied egg-rr56.8%
Taylor expanded in x around 0 71.7%
+-commutative71.7%
+-commutative71.7%
associate-/l*79.6%
+-commutative79.6%
Simplified79.6%
if -4.39999999999999972e193 < t < -2.35e11Initial program 46.9%
div-sub46.9%
fma-define46.9%
+-commutative46.9%
*-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-/l*58.5%
Applied egg-rr58.5%
Taylor expanded in y around -inf 84.2%
mul-1-neg84.2%
neg-mul-184.2%
mul-1-neg84.2%
Simplified84.2%
if -2.35e11 < t < 3800 or 5.1000000000000001e61 < t < 1.95000000000000008e147Initial program 69.5%
div-sub69.5%
fma-define69.5%
+-commutative69.5%
*-commutative69.5%
associate-+l+69.5%
+-commutative69.5%
associate-+l+69.5%
+-commutative69.5%
associate-/l*69.2%
Applied egg-rr69.2%
Taylor expanded in t around 0 70.1%
associate--l+70.1%
associate-/l*75.8%
+-commutative75.8%
associate-/l*84.1%
+-commutative84.1%
Simplified84.1%
if 3800 < t < 5.1000000000000001e61Initial program 87.4%
Taylor expanded in b around 0 85.6%
if 5.1999999999999997e230 < t < 2.20000000000000002e255Initial program 3.1%
Taylor expanded in z around inf 4.2%
associate-/l*82.6%
+-commutative82.6%
+-commutative82.6%
associate-+r+82.6%
+-commutative82.6%
Simplified82.6%
div-inv82.8%
associate-+r+82.8%
+-commutative82.8%
Applied egg-rr82.8%
if 2.20000000000000002e255 < t Initial program 44.0%
Taylor expanded in b around 0 44.0%
mul-1-neg44.0%
+-commutative44.0%
*-commutative44.0%
+-commutative44.0%
associate-+r+44.0%
associate-*r/44.0%
unsub-neg44.0%
Simplified99.9%
clear-num100.0%
associate-+r+100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 83.5%
Final simplification83.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ y (+ y x)))
(t_2 (- (+ a (/ (* y z) (+ t y))) (* b (/ y (+ t y)))))
(t_3 (* y (/ b (+ x (+ t y)))))
(t_4 (+ y (+ t x))))
(if (<= t -2.4e+198)
t_2
(if (<= t -88000000000.0)
(- (+ a z) t_3)
(if (<= t 1.6)
(+ z (- (* a t_1) (* b t_1)))
(if (<= t 1.5e+165)
(- (/ (+ (* a t) (* x z)) (+ t x)) t_3)
(if (<= t 5.2e+230)
t_2
(if (<= t 2.2e+255)
(* z (* (+ y x) (/ 1.0 t_4)))
(+ a (* b (/ -1.0 (/ t_4 y))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / (y + x);
double t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
double t_3 = y * (b / (x + (t + y)));
double t_4 = y + (t + x);
double tmp;
if (t <= -2.4e+198) {
tmp = t_2;
} else if (t <= -88000000000.0) {
tmp = (a + z) - t_3;
} else if (t <= 1.6) {
tmp = z + ((a * t_1) - (b * t_1));
} else if (t <= 1.5e+165) {
tmp = (((a * t) + (x * z)) / (t + x)) - t_3;
} else if (t <= 5.2e+230) {
tmp = t_2;
} else if (t <= 2.2e+255) {
tmp = z * ((y + x) * (1.0 / t_4));
} else {
tmp = a + (b * (-1.0 / (t_4 / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y / (y + x)
t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
t_3 = y * (b / (x + (t + y)))
t_4 = y + (t + x)
if (t <= (-2.4d+198)) then
tmp = t_2
else if (t <= (-88000000000.0d0)) then
tmp = (a + z) - t_3
else if (t <= 1.6d0) then
tmp = z + ((a * t_1) - (b * t_1))
else if (t <= 1.5d+165) then
tmp = (((a * t) + (x * z)) / (t + x)) - t_3
else if (t <= 5.2d+230) then
tmp = t_2
else if (t <= 2.2d+255) then
tmp = z * ((y + x) * (1.0d0 / t_4))
else
tmp = a + (b * ((-1.0d0) / (t_4 / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / (y + x);
double t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
double t_3 = y * (b / (x + (t + y)));
double t_4 = y + (t + x);
double tmp;
if (t <= -2.4e+198) {
tmp = t_2;
} else if (t <= -88000000000.0) {
tmp = (a + z) - t_3;
} else if (t <= 1.6) {
tmp = z + ((a * t_1) - (b * t_1));
} else if (t <= 1.5e+165) {
tmp = (((a * t) + (x * z)) / (t + x)) - t_3;
} else if (t <= 5.2e+230) {
tmp = t_2;
} else if (t <= 2.2e+255) {
tmp = z * ((y + x) * (1.0 / t_4));
} else {
tmp = a + (b * (-1.0 / (t_4 / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y / (y + x) t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y))) t_3 = y * (b / (x + (t + y))) t_4 = y + (t + x) tmp = 0 if t <= -2.4e+198: tmp = t_2 elif t <= -88000000000.0: tmp = (a + z) - t_3 elif t <= 1.6: tmp = z + ((a * t_1) - (b * t_1)) elif t <= 1.5e+165: tmp = (((a * t) + (x * z)) / (t + x)) - t_3 elif t <= 5.2e+230: tmp = t_2 elif t <= 2.2e+255: tmp = z * ((y + x) * (1.0 / t_4)) else: tmp = a + (b * (-1.0 / (t_4 / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y / Float64(y + x)) t_2 = Float64(Float64(a + Float64(Float64(y * z) / Float64(t + y))) - Float64(b * Float64(y / Float64(t + y)))) t_3 = Float64(y * Float64(b / Float64(x + Float64(t + y)))) t_4 = Float64(y + Float64(t + x)) tmp = 0.0 if (t <= -2.4e+198) tmp = t_2; elseif (t <= -88000000000.0) tmp = Float64(Float64(a + z) - t_3); elseif (t <= 1.6) tmp = Float64(z + Float64(Float64(a * t_1) - Float64(b * t_1))); elseif (t <= 1.5e+165) tmp = Float64(Float64(Float64(Float64(a * t) + Float64(x * z)) / Float64(t + x)) - t_3); elseif (t <= 5.2e+230) tmp = t_2; elseif (t <= 2.2e+255) tmp = Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_4))); else tmp = Float64(a + Float64(b * Float64(-1.0 / Float64(t_4 / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y / (y + x); t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y))); t_3 = y * (b / (x + (t + y))); t_4 = y + (t + x); tmp = 0.0; if (t <= -2.4e+198) tmp = t_2; elseif (t <= -88000000000.0) tmp = (a + z) - t_3; elseif (t <= 1.6) tmp = z + ((a * t_1) - (b * t_1)); elseif (t <= 1.5e+165) tmp = (((a * t) + (x * z)) / (t + x)) - t_3; elseif (t <= 5.2e+230) tmp = t_2; elseif (t <= 2.2e+255) tmp = z * ((y + x) * (1.0 / t_4)); else tmp = a + (b * (-1.0 / (t_4 / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(N[(y * z), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+198], t$95$2, If[LessEqual[t, -88000000000.0], N[(N[(a + z), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, 1.6], N[(z + N[(N[(a * t$95$1), $MachinePrecision] - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+165], N[(N[(N[(N[(a * t), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, 5.2e+230], t$95$2, If[LessEqual[t, 2.2e+255], N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(b * N[(-1.0 / N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{y + x}\\
t_2 := \left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\
t_3 := y \cdot \frac{b}{x + \left(t + y\right)}\\
t_4 := y + \left(t + x\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+198}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -88000000000:\\
\;\;\;\;\left(a + z\right) - t\_3\\
\mathbf{elif}\;t \leq 1.6:\\
\;\;\;\;z + \left(a \cdot t\_1 - b \cdot t\_1\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+165}:\\
\;\;\;\;\frac{a \cdot t + x \cdot z}{t + x} - t\_3\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_4}\right)\\
\mathbf{else}:\\
\;\;\;\;a + b \cdot \frac{-1}{\frac{t\_4}{y}}\\
\end{array}
\end{array}
if t < -2.4000000000000001e198 or 1.49999999999999995e165 < t < 5.1999999999999997e230Initial program 51.5%
div-sub51.5%
fma-define51.5%
+-commutative51.5%
*-commutative51.5%
associate-+l+51.5%
+-commutative51.5%
associate-+l+51.5%
+-commutative51.5%
associate-/l*56.2%
Applied egg-rr56.2%
Taylor expanded in x around 0 76.1%
+-commutative76.1%
+-commutative76.1%
associate-/l*85.3%
+-commutative85.3%
Simplified85.3%
if -2.4000000000000001e198 < t < -8.8e10Initial program 46.9%
div-sub46.9%
fma-define46.9%
+-commutative46.9%
*-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-/l*58.5%
Applied egg-rr58.5%
Taylor expanded in y around -inf 84.2%
mul-1-neg84.2%
neg-mul-184.2%
mul-1-neg84.2%
Simplified84.2%
if -8.8e10 < t < 1.6000000000000001Initial program 72.4%
div-sub72.4%
fma-define72.4%
+-commutative72.4%
*-commutative72.4%
associate-+l+72.4%
+-commutative72.4%
associate-+l+72.4%
+-commutative72.4%
associate-/l*71.3%
Applied egg-rr71.3%
Taylor expanded in t around 0 74.1%
associate--l+74.1%
associate-/l*79.7%
+-commutative79.7%
associate-/l*86.0%
+-commutative86.0%
Simplified86.0%
if 1.6000000000000001 < t < 1.49999999999999995e165Initial program 65.2%
div-sub65.2%
fma-define65.3%
+-commutative65.3%
*-commutative65.3%
associate-+l+65.3%
+-commutative65.3%
associate-+l+65.3%
+-commutative65.3%
associate-/l*70.3%
Applied egg-rr70.3%
Taylor expanded in y around 0 74.0%
if 5.1999999999999997e230 < t < 2.20000000000000002e255Initial program 3.1%
Taylor expanded in z around inf 4.2%
associate-/l*82.6%
+-commutative82.6%
+-commutative82.6%
associate-+r+82.6%
+-commutative82.6%
Simplified82.6%
div-inv82.8%
associate-+r+82.8%
+-commutative82.8%
Applied egg-rr82.8%
if 2.20000000000000002e255 < t Initial program 44.0%
Taylor expanded in b around 0 44.0%
mul-1-neg44.0%
+-commutative44.0%
*-commutative44.0%
+-commutative44.0%
associate-+r+44.0%
associate-*r/44.0%
unsub-neg44.0%
Simplified99.9%
clear-num100.0%
associate-+r+100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 83.5%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (/ y (+ y x)))
(t_3 (- (+ a (/ (* y z) (+ t y))) (* b (/ y (+ t y))))))
(if (<= t -2.25e+201)
t_3
(if (<= t -255000000.0)
(- (+ a z) (* y (/ b (+ x (+ t y)))))
(if (<= t 1.9e+146)
(+ z (- (* a t_2) (* b t_2)))
(if (<= t 5.2e+230)
t_3
(if (<= t 4e+255)
(* z (* (+ y x) (/ 1.0 t_1)))
(+ a (* b (/ -1.0 (/ t_1 y)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = y / (y + x);
double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
double tmp;
if (t <= -2.25e+201) {
tmp = t_3;
} else if (t <= -255000000.0) {
tmp = (a + z) - (y * (b / (x + (t + y))));
} else if (t <= 1.9e+146) {
tmp = z + ((a * t_2) - (b * t_2));
} else if (t <= 5.2e+230) {
tmp = t_3;
} else if (t <= 4e+255) {
tmp = z * ((y + x) * (1.0 / t_1));
} else {
tmp = a + (b * (-1.0 / (t_1 / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (t + x)
t_2 = y / (y + x)
t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
if (t <= (-2.25d+201)) then
tmp = t_3
else if (t <= (-255000000.0d0)) then
tmp = (a + z) - (y * (b / (x + (t + y))))
else if (t <= 1.9d+146) then
tmp = z + ((a * t_2) - (b * t_2))
else if (t <= 5.2d+230) then
tmp = t_3
else if (t <= 4d+255) then
tmp = z * ((y + x) * (1.0d0 / t_1))
else
tmp = a + (b * ((-1.0d0) / (t_1 / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = y / (y + x);
double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
double tmp;
if (t <= -2.25e+201) {
tmp = t_3;
} else if (t <= -255000000.0) {
tmp = (a + z) - (y * (b / (x + (t + y))));
} else if (t <= 1.9e+146) {
tmp = z + ((a * t_2) - (b * t_2));
} else if (t <= 5.2e+230) {
tmp = t_3;
} else if (t <= 4e+255) {
tmp = z * ((y + x) * (1.0 / t_1));
} else {
tmp = a + (b * (-1.0 / (t_1 / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = y / (y + x) t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y))) tmp = 0 if t <= -2.25e+201: tmp = t_3 elif t <= -255000000.0: tmp = (a + z) - (y * (b / (x + (t + y)))) elif t <= 1.9e+146: tmp = z + ((a * t_2) - (b * t_2)) elif t <= 5.2e+230: tmp = t_3 elif t <= 4e+255: tmp = z * ((y + x) * (1.0 / t_1)) else: tmp = a + (b * (-1.0 / (t_1 / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(y / Float64(y + x)) t_3 = Float64(Float64(a + Float64(Float64(y * z) / Float64(t + y))) - Float64(b * Float64(y / Float64(t + y)))) tmp = 0.0 if (t <= -2.25e+201) tmp = t_3; elseif (t <= -255000000.0) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + Float64(t + y))))); elseif (t <= 1.9e+146) tmp = Float64(z + Float64(Float64(a * t_2) - Float64(b * t_2))); elseif (t <= 5.2e+230) tmp = t_3; elseif (t <= 4e+255) tmp = Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_1))); else tmp = Float64(a + Float64(b * Float64(-1.0 / Float64(t_1 / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = y / (y + x); t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y))); tmp = 0.0; if (t <= -2.25e+201) tmp = t_3; elseif (t <= -255000000.0) tmp = (a + z) - (y * (b / (x + (t + y)))); elseif (t <= 1.9e+146) tmp = z + ((a * t_2) - (b * t_2)); elseif (t <= 5.2e+230) tmp = t_3; elseif (t <= 4e+255) tmp = z * ((y + x) * (1.0 / t_1)); else tmp = a + (b * (-1.0 / (t_1 / y))); 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[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + N[(N[(y * z), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+201], t$95$3, If[LessEqual[t, -255000000.0], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+146], N[(z + N[(N[(a * t$95$2), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+230], t$95$3, If[LessEqual[t, 4e+255], N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(b * N[(-1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{y}{y + x}\\
t_3 := \left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+201}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -255000000:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+146}:\\
\;\;\;\;z + \left(a \cdot t\_2 - b \cdot t\_2\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;a + b \cdot \frac{-1}{\frac{t\_1}{y}}\\
\end{array}
\end{array}
if t < -2.25000000000000005e201 or 1.8999999999999999e146 < t < 5.1999999999999997e230Initial program 52.9%
div-sub52.8%
fma-define52.8%
+-commutative52.8%
*-commutative52.8%
associate-+l+52.8%
+-commutative52.8%
associate-+l+52.8%
+-commutative52.8%
associate-/l*56.8%
Applied egg-rr56.8%
Taylor expanded in x around 0 71.7%
+-commutative71.7%
+-commutative71.7%
associate-/l*79.6%
+-commutative79.6%
Simplified79.6%
if -2.25000000000000005e201 < t < -2.55e8Initial program 46.9%
div-sub46.9%
fma-define46.9%
+-commutative46.9%
*-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-/l*58.5%
Applied egg-rr58.5%
Taylor expanded in y around -inf 84.2%
mul-1-neg84.2%
neg-mul-184.2%
mul-1-neg84.2%
Simplified84.2%
if -2.55e8 < t < 1.8999999999999999e146Initial program 71.2%
div-sub71.2%
fma-define71.2%
+-commutative71.2%
*-commutative71.2%
associate-+l+71.2%
+-commutative71.2%
associate-+l+71.2%
+-commutative71.2%
associate-/l*71.5%
Applied egg-rr71.5%
Taylor expanded in t around 0 67.6%
associate--l+67.6%
associate-/l*73.3%
+-commutative73.3%
associate-/l*81.4%
+-commutative81.4%
Simplified81.4%
if 5.1999999999999997e230 < t < 3.99999999999999995e255Initial program 3.1%
Taylor expanded in z around inf 4.2%
associate-/l*82.6%
+-commutative82.6%
+-commutative82.6%
associate-+r+82.6%
+-commutative82.6%
Simplified82.6%
div-inv82.8%
associate-+r+82.8%
+-commutative82.8%
Applied egg-rr82.8%
if 3.99999999999999995e255 < t Initial program 44.0%
Taylor expanded in b around 0 44.0%
mul-1-neg44.0%
+-commutative44.0%
*-commutative44.0%
+-commutative44.0%
associate-+r+44.0%
associate-*r/44.0%
unsub-neg44.0%
Simplified99.9%
clear-num100.0%
associate-+r+100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 83.5%
Final simplification81.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y))) (t_2 (* z (/ (+ y x) t_1))))
(if (<= z -1.05e-31)
t_2
(if (<= z -9.2e-170)
(+ a z)
(if (<= z -5.2e-197)
(* b (/ y (- (- (- x) y) t)))
(if (<= z 3.8e-12)
(* a (/ (+ t y) t_1))
(if (<= z 3.6e+251) (- (+ a z) b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -1.05e-31) {
tmp = t_2;
} else if (z <= -9.2e-170) {
tmp = a + z;
} else if (z <= -5.2e-197) {
tmp = b * (y / ((-x - y) - t));
} else if (z <= 3.8e-12) {
tmp = a * ((t + y) / t_1);
} else if (z <= 3.6e+251) {
tmp = (a + z) - b;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t + y)
t_2 = z * ((y + x) / t_1)
if (z <= (-1.05d-31)) then
tmp = t_2
else if (z <= (-9.2d-170)) then
tmp = a + z
else if (z <= (-5.2d-197)) then
tmp = b * (y / ((-x - y) - t))
else if (z <= 3.8d-12) then
tmp = a * ((t + y) / t_1)
else if (z <= 3.6d+251) then
tmp = (a + z) - b
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -1.05e-31) {
tmp = t_2;
} else if (z <= -9.2e-170) {
tmp = a + z;
} else if (z <= -5.2e-197) {
tmp = b * (y / ((-x - y) - t));
} else if (z <= 3.8e-12) {
tmp = a * ((t + y) / t_1);
} else if (z <= 3.6e+251) {
tmp = (a + z) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) t_2 = z * ((y + x) / t_1) tmp = 0 if z <= -1.05e-31: tmp = t_2 elif z <= -9.2e-170: tmp = a + z elif z <= -5.2e-197: tmp = b * (y / ((-x - y) - t)) elif z <= 3.8e-12: tmp = a * ((t + y) / t_1) elif z <= 3.6e+251: tmp = (a + z) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) t_2 = Float64(z * Float64(Float64(y + x) / t_1)) tmp = 0.0 if (z <= -1.05e-31) tmp = t_2; elseif (z <= -9.2e-170) tmp = Float64(a + z); elseif (z <= -5.2e-197) tmp = Float64(b * Float64(y / Float64(Float64(Float64(-x) - y) - t))); elseif (z <= 3.8e-12) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= 3.6e+251) tmp = Float64(Float64(a + z) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); t_2 = z * ((y + x) / t_1); tmp = 0.0; if (z <= -1.05e-31) tmp = t_2; elseif (z <= -9.2e-170) tmp = a + z; elseif (z <= -5.2e-197) tmp = b * (y / ((-x - y) - t)); elseif (z <= 3.8e-12) tmp = a * ((t + y) / t_1); elseif (z <= 3.6e+251) tmp = (a + z) - b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-31], t$95$2, If[LessEqual[z, -9.2e-170], N[(a + z), $MachinePrecision], If[LessEqual[z, -5.2e-197], N[(b * N[(y / N[(N[((-x) - y), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-12], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+251], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := z \cdot \frac{y + x}{t\_1}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-170}:\\
\;\;\;\;a + z\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-197}:\\
\;\;\;\;b \cdot \frac{y}{\left(\left(-x\right) - y\right) - t}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+251}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.04999999999999996e-31 or 3.59999999999999997e251 < z Initial program 50.6%
Taylor expanded in z around inf 40.7%
associate-/l*81.4%
+-commutative81.4%
+-commutative81.4%
associate-+r+81.4%
+-commutative81.4%
Simplified81.4%
if -1.04999999999999996e-31 < z < -9.19999999999999948e-170Initial program 70.7%
Taylor expanded in b around 0 60.7%
fma-define60.7%
+-commutative60.7%
Simplified60.7%
Taylor expanded in y around inf 62.8%
if -9.19999999999999948e-170 < z < -5.2000000000000003e-197Initial program 35.7%
div-sub35.7%
fma-define35.7%
+-commutative35.7%
*-commutative35.7%
associate-+l+35.7%
+-commutative35.7%
associate-+l+35.7%
+-commutative35.7%
associate-/l*77.6%
Applied egg-rr77.6%
Taylor expanded in b around inf 77.6%
associate--l+77.6%
times-frac99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 89.3%
associate-*r/89.3%
mul-1-neg89.3%
+-commutative89.3%
Simplified89.3%
if -5.2000000000000003e-197 < z < 3.79999999999999996e-12Initial program 79.8%
Taylor expanded in a around inf 44.6%
associate-/l*58.7%
+-commutative58.7%
associate-+r+58.7%
+-commutative58.7%
Simplified58.7%
if 3.79999999999999996e-12 < z < 3.59999999999999997e251Initial program 52.6%
Taylor expanded in y around inf 70.0%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y))) (t_2 (/ y (+ y x))))
(if (<= t -2.7e+208)
(- a (* b (/ y t_1)))
(if (or (<= t -3.25e+14) (not (<= t 8.5e+29)))
(- (+ a z) (* y (/ b t_1)))
(+ z (- (* a t_2) (* b t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = y / (y + x);
double tmp;
if (t <= -2.7e+208) {
tmp = a - (b * (y / t_1));
} else if ((t <= -3.25e+14) || !(t <= 8.5e+29)) {
tmp = (a + z) - (y * (b / t_1));
} else {
tmp = z + ((a * t_2) - (b * t_2));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t + y)
t_2 = y / (y + x)
if (t <= (-2.7d+208)) then
tmp = a - (b * (y / t_1))
else if ((t <= (-3.25d+14)) .or. (.not. (t <= 8.5d+29))) then
tmp = (a + z) - (y * (b / t_1))
else
tmp = z + ((a * t_2) - (b * t_2))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = y / (y + x);
double tmp;
if (t <= -2.7e+208) {
tmp = a - (b * (y / t_1));
} else if ((t <= -3.25e+14) || !(t <= 8.5e+29)) {
tmp = (a + z) - (y * (b / t_1));
} else {
tmp = z + ((a * t_2) - (b * t_2));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) t_2 = y / (y + x) tmp = 0 if t <= -2.7e+208: tmp = a - (b * (y / t_1)) elif (t <= -3.25e+14) or not (t <= 8.5e+29): tmp = (a + z) - (y * (b / t_1)) else: tmp = z + ((a * t_2) - (b * t_2)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) t_2 = Float64(y / Float64(y + x)) tmp = 0.0 if (t <= -2.7e+208) tmp = Float64(a - Float64(b * Float64(y / t_1))); elseif ((t <= -3.25e+14) || !(t <= 8.5e+29)) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / t_1))); else tmp = Float64(z + Float64(Float64(a * t_2) - Float64(b * t_2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); t_2 = y / (y + x); tmp = 0.0; if (t <= -2.7e+208) tmp = a - (b * (y / t_1)); elseif ((t <= -3.25e+14) || ~((t <= 8.5e+29))) tmp = (a + z) - (y * (b / t_1)); else tmp = z + ((a * t_2) - (b * t_2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+208], N[(a - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.25e+14], N[Not[LessEqual[t, 8.5e+29]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + N[(N[(a * t$95$2), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := \frac{y}{y + x}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+208}:\\
\;\;\;\;a - b \cdot \frac{y}{t\_1}\\
\mathbf{elif}\;t \leq -3.25 \cdot 10^{+14} \lor \neg \left(t \leq 8.5 \cdot 10^{+29}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;z + \left(a \cdot t\_2 - b \cdot t\_2\right)\\
\end{array}
\end{array}
if t < -2.7e208Initial program 48.7%
Taylor expanded in b around 0 48.8%
mul-1-neg48.8%
+-commutative48.8%
*-commutative48.8%
+-commutative48.8%
associate-+r+48.8%
associate-*r/53.1%
unsub-neg53.1%
Simplified100.0%
Taylor expanded in t around inf 81.7%
if -2.7e208 < t < -3.25e14 or 8.5000000000000006e29 < t Initial program 49.2%
div-sub49.2%
fma-define49.3%
+-commutative49.3%
*-commutative49.3%
associate-+l+49.3%
+-commutative49.3%
associate-+l+49.3%
+-commutative49.3%
associate-/l*56.0%
Applied egg-rr56.0%
Taylor expanded in y around -inf 70.1%
mul-1-neg70.1%
neg-mul-170.1%
mul-1-neg70.1%
Simplified70.1%
if -3.25e14 < t < 8.5000000000000006e29Initial program 73.7%
div-sub73.6%
fma-define73.6%
+-commutative73.6%
*-commutative73.6%
associate-+l+73.6%
+-commutative73.6%
associate-+l+73.6%
+-commutative73.6%
associate-/l*72.6%
Applied egg-rr72.6%
Taylor expanded in t around 0 73.1%
associate--l+73.1%
associate-/l*78.5%
+-commutative78.5%
associate-/l*84.5%
+-commutative84.5%
Simplified84.5%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)) (t_2 (* z (/ x (+ t x)))))
(if (<= x -1.22e+173)
t_2
(if (<= x -1.15e-211)
t_1
(if (<= x -8.4e-302)
(* a (/ y (+ y x)))
(if (<= x 4.1e+111) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + z) - b;
double t_2 = z * (x / (t + x));
double tmp;
if (x <= -1.22e+173) {
tmp = t_2;
} else if (x <= -1.15e-211) {
tmp = t_1;
} else if (x <= -8.4e-302) {
tmp = a * (y / (y + x));
} else if (x <= 4.1e+111) {
tmp = 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 = (a + z) - b
t_2 = z * (x / (t + x))
if (x <= (-1.22d+173)) then
tmp = t_2
else if (x <= (-1.15d-211)) then
tmp = t_1
else if (x <= (-8.4d-302)) then
tmp = a * (y / (y + x))
else if (x <= 4.1d+111) then
tmp = 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 = (a + z) - b;
double t_2 = z * (x / (t + x));
double tmp;
if (x <= -1.22e+173) {
tmp = t_2;
} else if (x <= -1.15e-211) {
tmp = t_1;
} else if (x <= -8.4e-302) {
tmp = a * (y / (y + x));
} else if (x <= 4.1e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + z) - b t_2 = z * (x / (t + x)) tmp = 0 if x <= -1.22e+173: tmp = t_2 elif x <= -1.15e-211: tmp = t_1 elif x <= -8.4e-302: tmp = a * (y / (y + x)) elif x <= 4.1e+111: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + z) - b) t_2 = Float64(z * Float64(x / Float64(t + x))) tmp = 0.0 if (x <= -1.22e+173) tmp = t_2; elseif (x <= -1.15e-211) tmp = t_1; elseif (x <= -8.4e-302) tmp = Float64(a * Float64(y / Float64(y + x))); elseif (x <= 4.1e+111) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + z) - b; t_2 = z * (x / (t + x)); tmp = 0.0; if (x <= -1.22e+173) tmp = t_2; elseif (x <= -1.15e-211) tmp = t_1; elseif (x <= -8.4e-302) tmp = a * (y / (y + x)); elseif (x <= 4.1e+111) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e+173], t$95$2, If[LessEqual[x, -1.15e-211], t$95$1, If[LessEqual[x, -8.4e-302], N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e+111], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
t_2 := z \cdot \frac{x}{t + x}\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+173}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8.4 \cdot 10^{-302}:\\
\;\;\;\;a \cdot \frac{y}{y + x}\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.22e173 or 4.09999999999999986e111 < x Initial program 56.2%
Taylor expanded in z around inf 41.0%
associate-/l*69.3%
+-commutative69.3%
+-commutative69.3%
associate-+r+69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in y around 0 69.2%
if -1.22e173 < x < -1.14999999999999994e-211 or -8.40000000000000052e-302 < x < 4.09999999999999986e111Initial program 62.7%
Taylor expanded in y around inf 61.5%
if -1.14999999999999994e-211 < x < -8.40000000000000052e-302Initial program 68.3%
Taylor expanded in a around inf 53.4%
Taylor expanded in t around 0 47.4%
associate-/l*69.0%
+-commutative69.0%
Simplified69.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y))) (t_2 (* z (/ (+ y x) t_1))))
(if (<= z -9e-67)
t_2
(if (<= z 4.5e+148)
(- a (* b (/ y t_1)))
(if (<= z 8.5e+252) (+ a z) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -9e-67) {
tmp = t_2;
} else if (z <= 4.5e+148) {
tmp = a - (b * (y / t_1));
} else if (z <= 8.5e+252) {
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 = x + (t + y)
t_2 = z * ((y + x) / t_1)
if (z <= (-9d-67)) then
tmp = t_2
else if (z <= 4.5d+148) then
tmp = a - (b * (y / t_1))
else if (z <= 8.5d+252) 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 = x + (t + y);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -9e-67) {
tmp = t_2;
} else if (z <= 4.5e+148) {
tmp = a - (b * (y / t_1));
} else if (z <= 8.5e+252) {
tmp = a + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) t_2 = z * ((y + x) / t_1) tmp = 0 if z <= -9e-67: tmp = t_2 elif z <= 4.5e+148: tmp = a - (b * (y / t_1)) elif z <= 8.5e+252: tmp = a + z else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) t_2 = Float64(z * Float64(Float64(y + x) / t_1)) tmp = 0.0 if (z <= -9e-67) tmp = t_2; elseif (z <= 4.5e+148) tmp = Float64(a - Float64(b * Float64(y / t_1))); elseif (z <= 8.5e+252) tmp = Float64(a + z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); t_2 = z * ((y + x) / t_1); tmp = 0.0; if (z <= -9e-67) tmp = t_2; elseif (z <= 4.5e+148) tmp = a - (b * (y / t_1)); elseif (z <= 8.5e+252) tmp = a + z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-67], t$95$2, If[LessEqual[z, 4.5e+148], N[(a - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+252], N[(a + z), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := z \cdot \frac{y + x}{t\_1}\\
\mathbf{if}\;z \leq -9 \cdot 10^{-67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+148}:\\
\;\;\;\;a - b \cdot \frac{y}{t\_1}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+252}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.00000000000000031e-67 or 8.50000000000000044e252 < z Initial program 52.9%
Taylor expanded in z around inf 42.5%
associate-/l*80.5%
+-commutative80.5%
+-commutative80.5%
associate-+r+80.5%
+-commutative80.5%
Simplified80.5%
if -9.00000000000000031e-67 < z < 4.49999999999999994e148Initial program 68.7%
Taylor expanded in b around 0 68.7%
mul-1-neg68.7%
+-commutative68.7%
*-commutative68.7%
+-commutative68.7%
associate-+r+68.7%
associate-*r/71.0%
unsub-neg71.0%
Simplified98.2%
Taylor expanded in t around inf 66.9%
if 4.49999999999999994e148 < z < 8.50000000000000044e252Initial program 50.6%
Taylor expanded in b around 0 50.8%
fma-define50.8%
+-commutative50.8%
Simplified50.8%
Taylor expanded in y around inf 82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= t -1.6e+209)
(* a (/ t (+ t x)))
(if (<= t -3.6e-100)
t_1
(if (<= t -4.7e-195) z (if (<= t 1.12e+201) 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.6e+209) {
tmp = a * (t / (t + x));
} else if (t <= -3.6e-100) {
tmp = t_1;
} else if (t <= -4.7e-195) {
tmp = z;
} else if (t <= 1.12e+201) {
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.6d+209)) then
tmp = a * (t / (t + x))
else if (t <= (-3.6d-100)) then
tmp = t_1
else if (t <= (-4.7d-195)) then
tmp = z
else if (t <= 1.12d+201) 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.6e+209) {
tmp = a * (t / (t + x));
} else if (t <= -3.6e-100) {
tmp = t_1;
} else if (t <= -4.7e-195) {
tmp = z;
} else if (t <= 1.12e+201) {
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.6e+209: tmp = a * (t / (t + x)) elif t <= -3.6e-100: tmp = t_1 elif t <= -4.7e-195: tmp = z elif t <= 1.12e+201: 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.6e+209) tmp = Float64(a * Float64(t / Float64(t + x))); elseif (t <= -3.6e-100) tmp = t_1; elseif (t <= -4.7e-195) tmp = z; elseif (t <= 1.12e+201) 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.6e+209) tmp = a * (t / (t + x)); elseif (t <= -3.6e-100) tmp = t_1; elseif (t <= -4.7e-195) tmp = z; elseif (t <= 1.12e+201) 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.6e+209], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.6e-100], t$95$1, If[LessEqual[t, -4.7e-195], z, If[LessEqual[t, 1.12e+201], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+209}:\\
\;\;\;\;a \cdot \frac{t}{t + x}\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-195}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.6e209Initial program 48.7%
Taylor expanded in a around inf 39.2%
Taylor expanded in y around 0 39.2%
associate-/l*72.9%
Simplified72.9%
if -1.6e209 < t < -3.5999999999999999e-100 or -4.7000000000000001e-195 < t < 1.11999999999999994e201Initial program 64.5%
Taylor expanded in y around inf 61.7%
if -3.5999999999999999e-100 < t < -4.7000000000000001e-195Initial program 83.0%
Taylor expanded in x around inf 81.4%
if 1.11999999999999994e201 < t Initial program 40.3%
Taylor expanded in t around inf 55.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= t -4e+213)
a
(if (<= t -4.1e-100)
t_1
(if (<= t -1.55e-193) z (if (<= t 2.9e+201) 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 <= -4e+213) {
tmp = a;
} else if (t <= -4.1e-100) {
tmp = t_1;
} else if (t <= -1.55e-193) {
tmp = z;
} else if (t <= 2.9e+201) {
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 <= (-4d+213)) then
tmp = a
else if (t <= (-4.1d-100)) then
tmp = t_1
else if (t <= (-1.55d-193)) then
tmp = z
else if (t <= 2.9d+201) 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 <= -4e+213) {
tmp = a;
} else if (t <= -4.1e-100) {
tmp = t_1;
} else if (t <= -1.55e-193) {
tmp = z;
} else if (t <= 2.9e+201) {
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 <= -4e+213: tmp = a elif t <= -4.1e-100: tmp = t_1 elif t <= -1.55e-193: tmp = z elif t <= 2.9e+201: 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 <= -4e+213) tmp = a; elseif (t <= -4.1e-100) tmp = t_1; elseif (t <= -1.55e-193) tmp = z; elseif (t <= 2.9e+201) 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 <= -4e+213) tmp = a; elseif (t <= -4.1e-100) tmp = t_1; elseif (t <= -1.55e-193) tmp = z; elseif (t <= 2.9e+201) 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, -4e+213], a, If[LessEqual[t, -4.1e-100], t$95$1, If[LessEqual[t, -1.55e-193], z, If[LessEqual[t, 2.9e+201], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;t \leq -4 \cdot 10^{+213}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-193}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -3.99999999999999994e213 or 2.9000000000000002e201 < t Initial program 44.0%
Taylor expanded in t around inf 61.3%
if -3.99999999999999994e213 < t < -4.0999999999999999e-100 or -1.5500000000000001e-193 < t < 2.9000000000000002e201Initial program 64.5%
Taylor expanded in y around inf 61.7%
if -4.0999999999999999e-100 < t < -1.5500000000000001e-193Initial program 83.0%
Taylor expanded in x around inf 81.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y))))
(if (or (<= b -7.5e-100) (not (<= b -1.4e-243)))
(- (+ a z) (* y (/ b t_1)))
(* z (/ (+ y x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double tmp;
if ((b <= -7.5e-100) || !(b <= -1.4e-243)) {
tmp = (a + z) - (y * (b / t_1));
} else {
tmp = z * ((y + x) / 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 = x + (t + y)
if ((b <= (-7.5d-100)) .or. (.not. (b <= (-1.4d-243)))) then
tmp = (a + z) - (y * (b / t_1))
else
tmp = z * ((y + x) / 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 = x + (t + y);
double tmp;
if ((b <= -7.5e-100) || !(b <= -1.4e-243)) {
tmp = (a + z) - (y * (b / t_1));
} else {
tmp = z * ((y + x) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) tmp = 0 if (b <= -7.5e-100) or not (b <= -1.4e-243): tmp = (a + z) - (y * (b / t_1)) else: tmp = z * ((y + x) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) tmp = 0.0 if ((b <= -7.5e-100) || !(b <= -1.4e-243)) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / t_1))); else tmp = Float64(z * Float64(Float64(y + x) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); tmp = 0.0; if ((b <= -7.5e-100) || ~((b <= -1.4e-243))) tmp = (a + z) - (y * (b / t_1)); else tmp = z * ((y + x) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -7.5e-100], N[Not[LessEqual[b, -1.4e-243]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{-100} \lor \neg \left(b \leq -1.4 \cdot 10^{-243}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + x}{t\_1}\\
\end{array}
\end{array}
if b < -7.50000000000000015e-100 or -1.39999999999999997e-243 < b Initial program 61.3%
div-sub61.3%
fma-define61.4%
+-commutative61.4%
*-commutative61.4%
associate-+l+61.4%
+-commutative61.4%
associate-+l+61.4%
+-commutative61.4%
associate-/l*64.2%
Applied egg-rr64.2%
Taylor expanded in y around -inf 68.5%
mul-1-neg68.5%
neg-mul-168.5%
mul-1-neg68.5%
Simplified68.5%
if -7.50000000000000015e-100 < b < -1.39999999999999997e-243Initial program 64.5%
Taylor expanded in z around inf 61.4%
associate-/l*92.9%
+-commutative92.9%
+-commutative92.9%
associate-+r+92.9%
+-commutative92.9%
Simplified92.9%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a z) b)))
(if (<= y -2.25e-10)
t_1
(if (<= y -1.35e-170)
(* a (/ (+ t y) (+ x (+ t y))))
(if (<= y 1.06e-19) (+ 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 <= -2.25e-10) {
tmp = t_1;
} else if (y <= -1.35e-170) {
tmp = a * ((t + y) / (x + (t + y)));
} else if (y <= 1.06e-19) {
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 <= (-2.25d-10)) then
tmp = t_1
else if (y <= (-1.35d-170)) then
tmp = a * ((t + y) / (x + (t + y)))
else if (y <= 1.06d-19) 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 <= -2.25e-10) {
tmp = t_1;
} else if (y <= -1.35e-170) {
tmp = a * ((t + y) / (x + (t + y)));
} else if (y <= 1.06e-19) {
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 <= -2.25e-10: tmp = t_1 elif y <= -1.35e-170: tmp = a * ((t + y) / (x + (t + y))) elif y <= 1.06e-19: 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 <= -2.25e-10) tmp = t_1; elseif (y <= -1.35e-170) tmp = Float64(a * Float64(Float64(t + y) / Float64(x + Float64(t + y)))); elseif (y <= 1.06e-19) 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 <= -2.25e-10) tmp = t_1; elseif (y <= -1.35e-170) tmp = a * ((t + y) / (x + (t + y))); elseif (y <= 1.06e-19) 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, -2.25e-10], t$95$1, If[LessEqual[y, -1.35e-170], N[(a * N[(N[(t + y), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e-19], N[(a + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
\mathbf{if}\;y \leq -2.25 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-170}:\\
\;\;\;\;a \cdot \frac{t + y}{x + \left(t + y\right)}\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{-19}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.25e-10 or 1.06e-19 < y Initial program 39.6%
Taylor expanded in y around inf 70.0%
if -2.25e-10 < y < -1.3499999999999999e-170Initial program 86.9%
Taylor expanded in a around inf 44.1%
associate-/l*52.7%
+-commutative52.7%
associate-+r+52.7%
+-commutative52.7%
Simplified52.7%
if -1.3499999999999999e-170 < y < 1.06e-19Initial program 77.1%
Taylor expanded in b around 0 68.4%
fma-define68.4%
+-commutative68.4%
Simplified68.4%
Taylor expanded in y around inf 58.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.8e+132) (not (<= t 1.12e+173))) a z))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.8e+132) || !(t <= 1.12e+173)) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.8d+132)) .or. (.not. (t <= 1.12d+173))) then
tmp = a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.8e+132) || !(t <= 1.12e+173)) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.8e+132) or not (t <= 1.12e+173): tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.8e+132) || !(t <= 1.12e+173)) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.8e+132) || ~((t <= 1.12e+173))) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.8e+132], N[Not[LessEqual[t, 1.12e+173]], $MachinePrecision]], a, z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+132} \lor \neg \left(t \leq 1.12 \cdot 10^{+173}\right):\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if t < -1.80000000000000008e132 or 1.12e173 < t Initial program 44.6%
Taylor expanded in t around inf 61.8%
if -1.80000000000000008e132 < t < 1.12e173Initial program 68.4%
Taylor expanded in x around inf 45.3%
Final simplification49.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.6e+203) (+ a z) (- a b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.6e+203) {
tmp = a + z;
} else {
tmp = a - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.6d+203) then
tmp = a + z
else
tmp = a - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.6e+203) {
tmp = a + z;
} else {
tmp = a - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.6e+203: tmp = a + z else: tmp = a - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.6e+203) tmp = Float64(a + z); else tmp = Float64(a - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.6e+203) tmp = a + z; else tmp = a - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.6e+203], N[(a + z), $MachinePrecision], N[(a - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.6 \cdot 10^{+203}:\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;a - b\\
\end{array}
\end{array}
if b < 1.5999999999999998e203Initial program 63.2%
Taylor expanded in b around 0 51.8%
fma-define51.9%
+-commutative51.9%
Simplified51.9%
Taylor expanded in y around inf 55.8%
if 1.5999999999999998e203 < b Initial program 42.9%
Taylor expanded in a around inf 42.9%
Taylor expanded in z around 0 40.3%
*-commutative40.3%
+-commutative40.3%
Simplified40.3%
Taylor expanded in y around inf 49.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.75e-31) z (+ a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e-31) {
tmp = z;
} 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 (z <= (-1.75d-31)) then
tmp = z
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 (z <= -1.75e-31) {
tmp = z;
} else {
tmp = a + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.75e-31: tmp = z else: tmp = a + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e-31) tmp = z; else tmp = Float64(a + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.75e-31) tmp = z; else tmp = a + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e-31], z, N[(a + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-31}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + z\\
\end{array}
\end{array}
if z < -1.74999999999999993e-31Initial program 52.9%
Taylor expanded in x around inf 58.4%
if -1.74999999999999993e-31 < z Initial program 64.9%
Taylor expanded in b around 0 49.0%
fma-define49.1%
+-commutative49.1%
Simplified49.1%
Taylor expanded in y around inf 54.4%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 61.7%
Taylor expanded in t around inf 30.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
herbie shell --seed 2024096
(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)))