
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* (+ y t) a) (* (+ x y) z)) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+273))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+273)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+273)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+273): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + Float64(Float64(x + y) * z)) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+273)) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((((y + t) * a) + ((x + y) * z)) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+273))) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+273]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(y + t\right) \cdot a + \left(x + y\right) \cdot z\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+273}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 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%
Taylor expanded in y around inf 76.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.99999999999999961e273Initial program 99.7%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ y t) a))
(t_2 (/ y (+ y t)))
(t_3 (+ y (+ x t)))
(t_4 (* z (/ (+ x y) t_3))))
(if (<= z -4.2e+103)
t_4
(if (<= z -3.1e-148)
(/ (+ t_1 (* (+ x y) z)) t_3)
(if (<= z -2.2e-238)
(* b (- (/ a b) (/ y t_3)))
(if (<= z 3.6e-107)
(/ (- t_1 (* y b)) t_3)
(if (<= z 9.5e-44)
(* b (+ (* a (/ t (* b (+ x t)))) (* x (/ (/ z b) (+ x t)))))
(if (<= z 1.1e+259)
(* z (+ (/ a z) (- t_2 (* t_2 (/ b z)))))
t_4))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + t) * a;
double t_2 = y / (y + t);
double t_3 = y + (x + t);
double t_4 = z * ((x + y) / t_3);
double tmp;
if (z <= -4.2e+103) {
tmp = t_4;
} else if (z <= -3.1e-148) {
tmp = (t_1 + ((x + y) * z)) / t_3;
} else if (z <= -2.2e-238) {
tmp = b * ((a / b) - (y / t_3));
} else if (z <= 3.6e-107) {
tmp = (t_1 - (y * b)) / t_3;
} else if (z <= 9.5e-44) {
tmp = b * ((a * (t / (b * (x + t)))) + (x * ((z / b) / (x + t))));
} else if (z <= 1.1e+259) {
tmp = z * ((a / z) + (t_2 - (t_2 * (b / z))));
} 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 = (y + t) * a
t_2 = y / (y + t)
t_3 = y + (x + t)
t_4 = z * ((x + y) / t_3)
if (z <= (-4.2d+103)) then
tmp = t_4
else if (z <= (-3.1d-148)) then
tmp = (t_1 + ((x + y) * z)) / t_3
else if (z <= (-2.2d-238)) then
tmp = b * ((a / b) - (y / t_3))
else if (z <= 3.6d-107) then
tmp = (t_1 - (y * b)) / t_3
else if (z <= 9.5d-44) then
tmp = b * ((a * (t / (b * (x + t)))) + (x * ((z / b) / (x + t))))
else if (z <= 1.1d+259) then
tmp = z * ((a / z) + (t_2 - (t_2 * (b / z))))
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 = (y + t) * a;
double t_2 = y / (y + t);
double t_3 = y + (x + t);
double t_4 = z * ((x + y) / t_3);
double tmp;
if (z <= -4.2e+103) {
tmp = t_4;
} else if (z <= -3.1e-148) {
tmp = (t_1 + ((x + y) * z)) / t_3;
} else if (z <= -2.2e-238) {
tmp = b * ((a / b) - (y / t_3));
} else if (z <= 3.6e-107) {
tmp = (t_1 - (y * b)) / t_3;
} else if (z <= 9.5e-44) {
tmp = b * ((a * (t / (b * (x + t)))) + (x * ((z / b) / (x + t))));
} else if (z <= 1.1e+259) {
tmp = z * ((a / z) + (t_2 - (t_2 * (b / z))));
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y + t) * a t_2 = y / (y + t) t_3 = y + (x + t) t_4 = z * ((x + y) / t_3) tmp = 0 if z <= -4.2e+103: tmp = t_4 elif z <= -3.1e-148: tmp = (t_1 + ((x + y) * z)) / t_3 elif z <= -2.2e-238: tmp = b * ((a / b) - (y / t_3)) elif z <= 3.6e-107: tmp = (t_1 - (y * b)) / t_3 elif z <= 9.5e-44: tmp = b * ((a * (t / (b * (x + t)))) + (x * ((z / b) / (x + t)))) elif z <= 1.1e+259: tmp = z * ((a / z) + (t_2 - (t_2 * (b / z)))) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + t) * a) t_2 = Float64(y / Float64(y + t)) t_3 = Float64(y + Float64(x + t)) t_4 = Float64(z * Float64(Float64(x + y) / t_3)) tmp = 0.0 if (z <= -4.2e+103) tmp = t_4; elseif (z <= -3.1e-148) tmp = Float64(Float64(t_1 + Float64(Float64(x + y) * z)) / t_3); elseif (z <= -2.2e-238) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / t_3))); elseif (z <= 3.6e-107) tmp = Float64(Float64(t_1 - Float64(y * b)) / t_3); elseif (z <= 9.5e-44) tmp = Float64(b * Float64(Float64(a * Float64(t / Float64(b * Float64(x + t)))) + Float64(x * Float64(Float64(z / b) / Float64(x + t))))); elseif (z <= 1.1e+259) tmp = Float64(z * Float64(Float64(a / z) + Float64(t_2 - Float64(t_2 * Float64(b / z))))); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y + t) * a; t_2 = y / (y + t); t_3 = y + (x + t); t_4 = z * ((x + y) / t_3); tmp = 0.0; if (z <= -4.2e+103) tmp = t_4; elseif (z <= -3.1e-148) tmp = (t_1 + ((x + y) * z)) / t_3; elseif (z <= -2.2e-238) tmp = b * ((a / b) - (y / t_3)); elseif (z <= 3.6e-107) tmp = (t_1 - (y * b)) / t_3; elseif (z <= 9.5e-44) tmp = b * ((a * (t / (b * (x + t)))) + (x * ((z / b) / (x + t)))); elseif (z <= 1.1e+259) tmp = z * ((a / z) + (t_2 - (t_2 * (b / z)))); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+103], t$95$4, If[LessEqual[z, -3.1e-148], N[(N[(t$95$1 + N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[z, -2.2e-238], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-107], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[z, 9.5e-44], N[(b * N[(N[(a * N[(t / N[(b * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(z / b), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+259], N[(z * N[(N[(a / z), $MachinePrecision] + N[(t$95$2 - N[(t$95$2 * N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot a\\
t_2 := \frac{y}{y + t}\\
t_3 := y + \left(x + t\right)\\
t_4 := z \cdot \frac{x + y}{t\_3}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+103}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-148}:\\
\;\;\;\;\frac{t\_1 + \left(x + y\right) \cdot z}{t\_3}\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-238}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t\_3}\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_3}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-44}:\\
\;\;\;\;b \cdot \left(a \cdot \frac{t}{b \cdot \left(x + t\right)} + x \cdot \frac{\frac{z}{b}}{x + t}\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+259}:\\
\;\;\;\;z \cdot \left(\frac{a}{z} + \left(t\_2 - t\_2 \cdot \frac{b}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -4.2000000000000003e103 or 1.09999999999999996e259 < z Initial program 33.0%
Taylor expanded in z around inf 30.2%
associate-/l*93.0%
+-commutative93.0%
+-commutative93.0%
associate-+r+93.0%
+-commutative93.0%
associate-+l+93.0%
Simplified93.0%
if -4.2000000000000003e103 < z < -3.1000000000000001e-148Initial program 76.7%
Taylor expanded in b around 0 70.2%
if -3.1000000000000001e-148 < z < -2.19999999999999991e-238Initial program 56.4%
Taylor expanded in b around -inf 77.8%
mul-1-neg77.8%
*-commutative77.8%
distribute-rgt-neg-in77.8%
Simplified91.4%
Taylor expanded in t around inf 74.4%
if -2.19999999999999991e-238 < z < 3.59999999999999976e-107Initial program 83.2%
Taylor expanded in z around 0 77.6%
*-commutative77.6%
Simplified77.6%
if 3.59999999999999976e-107 < z < 9.49999999999999924e-44Initial program 71.1%
Taylor expanded in b around -inf 75.5%
mul-1-neg75.5%
*-commutative75.5%
distribute-rgt-neg-in75.5%
Simplified94.4%
Taylor expanded in y around 0 61.1%
associate-/l*79.8%
associate-/l*80.0%
associate-/r*80.2%
Simplified80.2%
if 9.49999999999999924e-44 < z < 1.09999999999999996e259Initial program 52.6%
Taylor expanded in x around 0 44.1%
Taylor expanded in z around inf 66.9%
associate--l+66.9%
times-frac78.5%
Simplified78.5%
Final simplification78.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ y t) a)) (t_2 (+ y (+ x t))) (t_3 (- (+ z a) b)))
(if (<= y -9e+14)
t_3
(if (<= y -3.1e-148)
(/ (- t_1 (* y b)) t_2)
(if (<= y 33000000000000.0)
(/ (+ t_1 (* (+ x y) z)) t_2)
(if (<= y 5.2e+86) (* y (/ (- z b) (+ (+ x y) t))) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + t) * a;
double t_2 = y + (x + t);
double t_3 = (z + a) - b;
double tmp;
if (y <= -9e+14) {
tmp = t_3;
} else if (y <= -3.1e-148) {
tmp = (t_1 - (y * b)) / t_2;
} else if (y <= 33000000000000.0) {
tmp = (t_1 + ((x + y) * z)) / t_2;
} else if (y <= 5.2e+86) {
tmp = y * ((z - b) / ((x + y) + t));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y + t) * a
t_2 = y + (x + t)
t_3 = (z + a) - b
if (y <= (-9d+14)) then
tmp = t_3
else if (y <= (-3.1d-148)) then
tmp = (t_1 - (y * b)) / t_2
else if (y <= 33000000000000.0d0) then
tmp = (t_1 + ((x + y) * z)) / t_2
else if (y <= 5.2d+86) then
tmp = y * ((z - b) / ((x + y) + t))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + t) * a;
double t_2 = y + (x + t);
double t_3 = (z + a) - b;
double tmp;
if (y <= -9e+14) {
tmp = t_3;
} else if (y <= -3.1e-148) {
tmp = (t_1 - (y * b)) / t_2;
} else if (y <= 33000000000000.0) {
tmp = (t_1 + ((x + y) * z)) / t_2;
} else if (y <= 5.2e+86) {
tmp = y * ((z - b) / ((x + y) + t));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y + t) * a t_2 = y + (x + t) t_3 = (z + a) - b tmp = 0 if y <= -9e+14: tmp = t_3 elif y <= -3.1e-148: tmp = (t_1 - (y * b)) / t_2 elif y <= 33000000000000.0: tmp = (t_1 + ((x + y) * z)) / t_2 elif y <= 5.2e+86: tmp = y * ((z - b) / ((x + y) + t)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + t) * a) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -9e+14) tmp = t_3; elseif (y <= -3.1e-148) tmp = Float64(Float64(t_1 - Float64(y * b)) / t_2); elseif (y <= 33000000000000.0) tmp = Float64(Float64(t_1 + Float64(Float64(x + y) * z)) / t_2); elseif (y <= 5.2e+86) tmp = Float64(y * Float64(Float64(z - b) / Float64(Float64(x + y) + t))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y + t) * a; t_2 = y + (x + t); t_3 = (z + a) - b; tmp = 0.0; if (y <= -9e+14) tmp = t_3; elseif (y <= -3.1e-148) tmp = (t_1 - (y * b)) / t_2; elseif (y <= 33000000000000.0) tmp = (t_1 + ((x + y) * z)) / t_2; elseif (y <= 5.2e+86) tmp = y * ((z - b) / ((x + y) + t)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -9e+14], t$95$3, If[LessEqual[y, -3.1e-148], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 33000000000000.0], N[(N[(t$95$1 + N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 5.2e+86], N[(y * N[(N[(z - b), $MachinePrecision] / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot a\\
t_2 := y + \left(x + t\right)\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -9 \cdot 10^{+14}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-148}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\
\mathbf{elif}\;y \leq 33000000000000:\\
\;\;\;\;\frac{t\_1 + \left(x + y\right) \cdot z}{t\_2}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+86}:\\
\;\;\;\;y \cdot \frac{z - b}{\left(x + y\right) + t}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -9e14 or 5.1999999999999995e86 < y Initial program 29.9%
Taylor expanded in y around inf 75.0%
if -9e14 < y < -3.1000000000000001e-148Initial program 86.3%
Taylor expanded in z around 0 69.4%
*-commutative69.4%
Simplified69.4%
if -3.1000000000000001e-148 < y < 3.3e13Initial program 79.1%
Taylor expanded in b around 0 71.1%
if 3.3e13 < y < 5.1999999999999995e86Initial program 84.1%
Taylor expanded in a around inf 68.1%
sub-neg68.1%
associate-+r+68.1%
associate-+l+68.1%
sub-neg68.1%
div-sub68.1%
cancel-sign-sub-inv68.1%
distribute-rgt-in68.1%
*-commutative68.1%
associate-+l+68.1%
*-commutative68.1%
distribute-rgt-neg-out68.1%
distribute-lft-neg-in68.1%
cancel-sign-sub-inv68.1%
distribute-lft-out--68.1%
Simplified68.1%
Taylor expanded in y around inf 59.6%
associate-*r*67.2%
associate--l+67.2%
div-sub67.3%
Simplified67.3%
Taylor expanded in a around 0 75.8%
associate-/l*83.5%
+-commutative83.5%
Simplified83.5%
Final simplification72.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -1.86e+208)
(- a (* y (/ b t)))
(if (<= t -4.1e-100)
t_1
(if (<= t -7.3e-199)
z
(if (<= t 4.8e+203) t_1 (* y (+ (/ a y) (/ (- z b) t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -1.86e+208) {
tmp = a - (y * (b / t));
} else if (t <= -4.1e-100) {
tmp = t_1;
} else if (t <= -7.3e-199) {
tmp = z;
} else if (t <= 4.8e+203) {
tmp = t_1;
} else {
tmp = y * ((a / y) + ((z - b) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (t <= (-1.86d+208)) then
tmp = a - (y * (b / t))
else if (t <= (-4.1d-100)) then
tmp = t_1
else if (t <= (-7.3d-199)) then
tmp = z
else if (t <= 4.8d+203) then
tmp = t_1
else
tmp = y * ((a / y) + ((z - b) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -1.86e+208) {
tmp = a - (y * (b / t));
} else if (t <= -4.1e-100) {
tmp = t_1;
} else if (t <= -7.3e-199) {
tmp = z;
} else if (t <= 4.8e+203) {
tmp = t_1;
} else {
tmp = y * ((a / y) + ((z - b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -1.86e+208: tmp = a - (y * (b / t)) elif t <= -4.1e-100: tmp = t_1 elif t <= -7.3e-199: tmp = z elif t <= 4.8e+203: tmp = t_1 else: tmp = y * ((a / y) + ((z - b) / t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -1.86e+208) tmp = Float64(a - Float64(y * Float64(b / t))); elseif (t <= -4.1e-100) tmp = t_1; elseif (t <= -7.3e-199) tmp = z; elseif (t <= 4.8e+203) tmp = t_1; else tmp = Float64(y * Float64(Float64(a / y) + Float64(Float64(z - b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -1.86e+208) tmp = a - (y * (b / t)); elseif (t <= -4.1e-100) tmp = t_1; elseif (t <= -7.3e-199) tmp = z; elseif (t <= 4.8e+203) tmp = t_1; else tmp = y * ((a / y) + ((z - b) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -1.86e+208], N[(a - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e-100], t$95$1, If[LessEqual[t, -7.3e-199], z, If[LessEqual[t, 4.8e+203], t$95$1, N[(y * N[(N[(a / y), $MachinePrecision] + N[(N[(z - b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -1.86 \cdot 10^{+208}:\\
\;\;\;\;a - y \cdot \frac{b}{t}\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.3 \cdot 10^{-199}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{a}{y} + \frac{z - b}{t}\right)\\
\end{array}
\end{array}
if t < -1.85999999999999993e208Initial program 48.7%
Taylor expanded in x around 0 47.6%
Taylor expanded in y around 0 86.1%
Taylor expanded in z around 0 81.7%
neg-mul-181.7%
distribute-neg-frac281.7%
Simplified81.7%
if -1.85999999999999993e208 < t < -4.0999999999999999e-100 or -7.3e-199 < t < 4.8000000000000002e203Initial program 64.5%
Taylor expanded in y around inf 61.7%
if -4.0999999999999999e-100 < t < -7.3e-199Initial program 83.0%
Taylor expanded in x around inf 81.4%
if 4.8000000000000002e203 < t Initial program 40.3%
Taylor expanded in x around 0 40.0%
Taylor expanded in y around 0 81.9%
Taylor expanded in y around inf 75.5%
associate--l+75.5%
div-sub75.5%
Simplified75.5%
Final simplification66.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))) (t_3 (* z (/ (+ x y) t_2))))
(if (<= z -3.8e-5)
t_3
(if (<= z -1.65e-199)
t_1
(if (<= z 1.45e-12)
(* a (/ (+ y t) t_2))
(if (<= z 1.15e+252) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z * ((x + y) / t_2);
double tmp;
if (z <= -3.8e-5) {
tmp = t_3;
} else if (z <= -1.65e-199) {
tmp = t_1;
} else if (z <= 1.45e-12) {
tmp = a * ((y + t) / t_2);
} else if (z <= 1.15e+252) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
t_3 = z * ((x + y) / t_2)
if (z <= (-3.8d-5)) then
tmp = t_3
else if (z <= (-1.65d-199)) then
tmp = t_1
else if (z <= 1.45d-12) then
tmp = a * ((y + t) / t_2)
else if (z <= 1.15d+252) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z * ((x + y) / t_2);
double tmp;
if (z <= -3.8e-5) {
tmp = t_3;
} else if (z <= -1.65e-199) {
tmp = t_1;
} else if (z <= 1.45e-12) {
tmp = a * ((y + t) / t_2);
} else if (z <= 1.15e+252) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = z * ((x + y) / t_2) tmp = 0 if z <= -3.8e-5: tmp = t_3 elif z <= -1.65e-199: tmp = t_1 elif z <= 1.45e-12: tmp = a * ((y + t) / t_2) elif z <= 1.15e+252: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z * Float64(Float64(x + y) / t_2)) tmp = 0.0 if (z <= -3.8e-5) tmp = t_3; elseif (z <= -1.65e-199) tmp = t_1; elseif (z <= 1.45e-12) tmp = Float64(a * Float64(Float64(y + t) / t_2)); elseif (z <= 1.15e+252) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = z * ((x + y) / t_2); tmp = 0.0; if (z <= -3.8e-5) tmp = t_3; elseif (z <= -1.65e-199) tmp = t_1; elseif (z <= 1.45e-12) tmp = a * ((y + t) / t_2); elseif (z <= 1.15e+252) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e-5], t$95$3, If[LessEqual[z, -1.65e-199], t$95$1, If[LessEqual[z, 1.45e-12], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+252], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := z \cdot \frac{x + y}{t\_2}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-5}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_2}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+252}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -3.8000000000000002e-5 or 1.15e252 < z Initial program 49.9%
Taylor expanded in z around inf 39.4%
associate-/l*82.8%
+-commutative82.8%
+-commutative82.8%
associate-+r+82.8%
+-commutative82.8%
associate-+l+82.8%
Simplified82.8%
if -3.8000000000000002e-5 < z < -1.6500000000000001e-199 or 1.4500000000000001e-12 < z < 1.15e252Initial program 58.1%
Taylor expanded in y around inf 64.9%
if -1.6500000000000001e-199 < z < 1.4500000000000001e-12Initial program 79.8%
Taylor expanded in a around inf 44.6%
associate-/l*58.7%
+-commutative58.7%
associate-+r+58.7%
+-commutative58.7%
associate-+l+58.7%
Simplified58.7%
Final simplification68.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -7.8e-72)
t_2
(if (<= z -1.8e-162)
(* a (/ (+ y t) t_1))
(if (<= z 2.6e-44)
(* b (- (/ a b) (/ y (+ y t))))
(if (<= z 3.4e+251) (- (+ z a) b) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -7.8e-72) {
tmp = t_2;
} else if (z <= -1.8e-162) {
tmp = a * ((y + t) / t_1);
} else if (z <= 2.6e-44) {
tmp = b * ((a / b) - (y / (y + t)));
} else if (z <= 3.4e+251) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-7.8d-72)) then
tmp = t_2
else if (z <= (-1.8d-162)) then
tmp = a * ((y + t) / t_1)
else if (z <= 2.6d-44) then
tmp = b * ((a / b) - (y / (y + t)))
else if (z <= 3.4d+251) then
tmp = (z + a) - b
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -7.8e-72) {
tmp = t_2;
} else if (z <= -1.8e-162) {
tmp = a * ((y + t) / t_1);
} else if (z <= 2.6e-44) {
tmp = b * ((a / b) - (y / (y + t)));
} else if (z <= 3.4e+251) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -7.8e-72: tmp = t_2 elif z <= -1.8e-162: tmp = a * ((y + t) / t_1) elif z <= 2.6e-44: tmp = b * ((a / b) - (y / (y + t))) elif z <= 3.4e+251: tmp = (z + a) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -7.8e-72) tmp = t_2; elseif (z <= -1.8e-162) tmp = Float64(a * Float64(Float64(y + t) / t_1)); elseif (z <= 2.6e-44) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / Float64(y + t)))); elseif (z <= 3.4e+251) tmp = Float64(Float64(z + a) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -7.8e-72) tmp = t_2; elseif (z <= -1.8e-162) tmp = a * ((y + t) / t_1); elseif (z <= 2.6e-44) tmp = b * ((a / b) - (y / (y + t))); elseif (z <= 3.4e+251) tmp = (z + a) - b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e-72], t$95$2, If[LessEqual[z, -1.8e-162], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-44], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+251], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{-72}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-162}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-44}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + t}\right)\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+251}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.8e-72 or 3.40000000000000011e251 < 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%
associate-+l+80.5%
Simplified80.5%
if -7.8e-72 < z < -1.7999999999999999e-162Initial program 65.2%
Taylor expanded in a around inf 29.9%
associate-/l*54.9%
+-commutative54.9%
associate-+r+54.9%
+-commutative54.9%
associate-+l+54.9%
Simplified54.9%
if -1.7999999999999999e-162 < z < 2.5999999999999998e-44Initial program 76.9%
Taylor expanded in x around 0 46.9%
Taylor expanded in z around 0 44.6%
Taylor expanded in b around inf 62.2%
if 2.5999999999999998e-44 < z < 3.40000000000000011e251Initial program 52.6%
Taylor expanded in y around inf 70.4%
Final simplification69.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -8e-68)
t_2
(if (<= z -8.2e-163)
(* a (/ (+ y t) t_1))
(if (<= z 2.05e-43)
(* b (- (/ a b) (/ y t_1)))
(if (<= z 3.4e+251) (- (+ z a) b) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -8e-68) {
tmp = t_2;
} else if (z <= -8.2e-163) {
tmp = a * ((y + t) / t_1);
} else if (z <= 2.05e-43) {
tmp = b * ((a / b) - (y / t_1));
} else if (z <= 3.4e+251) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-8d-68)) then
tmp = t_2
else if (z <= (-8.2d-163)) then
tmp = a * ((y + t) / t_1)
else if (z <= 2.05d-43) then
tmp = b * ((a / b) - (y / t_1))
else if (z <= 3.4d+251) then
tmp = (z + a) - b
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -8e-68) {
tmp = t_2;
} else if (z <= -8.2e-163) {
tmp = a * ((y + t) / t_1);
} else if (z <= 2.05e-43) {
tmp = b * ((a / b) - (y / t_1));
} else if (z <= 3.4e+251) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -8e-68: tmp = t_2 elif z <= -8.2e-163: tmp = a * ((y + t) / t_1) elif z <= 2.05e-43: tmp = b * ((a / b) - (y / t_1)) elif z <= 3.4e+251: tmp = (z + a) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -8e-68) tmp = t_2; elseif (z <= -8.2e-163) tmp = Float64(a * Float64(Float64(y + t) / t_1)); elseif (z <= 2.05e-43) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / t_1))); elseif (z <= 3.4e+251) tmp = Float64(Float64(z + a) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -8e-68) tmp = t_2; elseif (z <= -8.2e-163) tmp = a * ((y + t) / t_1); elseif (z <= 2.05e-43) tmp = b * ((a / b) - (y / t_1)); elseif (z <= 3.4e+251) tmp = (z + a) - b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-68], t$95$2, If[LessEqual[z, -8.2e-163], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-43], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+251], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -8 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-163}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-43}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t\_1}\right)\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+251}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -8.00000000000000053e-68 or 3.40000000000000011e251 < 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%
associate-+l+80.5%
Simplified80.5%
if -8.00000000000000053e-68 < z < -8.19999999999999965e-163Initial program 65.2%
Taylor expanded in a around inf 29.9%
associate-/l*54.9%
+-commutative54.9%
associate-+r+54.9%
+-commutative54.9%
associate-+l+54.9%
Simplified54.9%
if -8.19999999999999965e-163 < z < 2.0499999999999999e-43Initial program 76.9%
Taylor expanded in b around -inf 78.6%
mul-1-neg78.6%
*-commutative78.6%
distribute-rgt-neg-in78.6%
Simplified94.3%
Taylor expanded in t around inf 69.4%
if 2.0499999999999999e-43 < z < 3.40000000000000011e251Initial program 52.6%
Taylor expanded in y around inf 70.4%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (/ y t_1)) (t_3 (* z (/ (+ x y) t_1))))
(if (<= z -1.3e+71)
t_3
(if (<= z -2.3e-147)
(* b (- (/ z b) t_2))
(if (<= z 1.85e-44)
(* b (- (/ a b) t_2))
(if (<= z 2.2e+254) (- (+ z a) b) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = y / t_1;
double t_3 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.3e+71) {
tmp = t_3;
} else if (z <= -2.3e-147) {
tmp = b * ((z / b) - t_2);
} else if (z <= 1.85e-44) {
tmp = b * ((a / b) - t_2);
} else if (z <= 2.2e+254) {
tmp = (z + a) - b;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (x + t)
t_2 = y / t_1
t_3 = z * ((x + y) / t_1)
if (z <= (-1.3d+71)) then
tmp = t_3
else if (z <= (-2.3d-147)) then
tmp = b * ((z / b) - t_2)
else if (z <= 1.85d-44) then
tmp = b * ((a / b) - t_2)
else if (z <= 2.2d+254) then
tmp = (z + a) - b
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = y / t_1;
double t_3 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.3e+71) {
tmp = t_3;
} else if (z <= -2.3e-147) {
tmp = b * ((z / b) - t_2);
} else if (z <= 1.85e-44) {
tmp = b * ((a / b) - t_2);
} else if (z <= 2.2e+254) {
tmp = (z + a) - b;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = y / t_1 t_3 = z * ((x + y) / t_1) tmp = 0 if z <= -1.3e+71: tmp = t_3 elif z <= -2.3e-147: tmp = b * ((z / b) - t_2) elif z <= 1.85e-44: tmp = b * ((a / b) - t_2) elif z <= 2.2e+254: tmp = (z + a) - b else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(y / t_1) t_3 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -1.3e+71) tmp = t_3; elseif (z <= -2.3e-147) tmp = Float64(b * Float64(Float64(z / b) - t_2)); elseif (z <= 1.85e-44) tmp = Float64(b * Float64(Float64(a / b) - t_2)); elseif (z <= 2.2e+254) tmp = Float64(Float64(z + a) - b); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = y / t_1; t_3 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -1.3e+71) tmp = t_3; elseif (z <= -2.3e-147) tmp = b * ((z / b) - t_2); elseif (z <= 1.85e-44) tmp = b * ((a / b) - t_2); elseif (z <= 2.2e+254) tmp = (z + a) - b; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+71], t$95$3, If[LessEqual[z, -2.3e-147], N[(b * N[(N[(z / b), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-44], N[(b * N[(N[(a / b), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+254], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{y}{t\_1}\\
t_3 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+71}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-147}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - t\_2\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-44}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - t\_2\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+254}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.29999999999999996e71 or 2.2000000000000001e254 < z Initial program 43.0%
Taylor expanded in z around inf 37.5%
associate-/l*90.9%
+-commutative90.9%
+-commutative90.9%
associate-+r+90.9%
+-commutative90.9%
associate-+l+90.9%
Simplified90.9%
if -1.29999999999999996e71 < z < -2.2999999999999999e-147Initial program 72.7%
Taylor expanded in b around -inf 76.1%
mul-1-neg76.1%
*-commutative76.1%
distribute-rgt-neg-in76.1%
Simplified89.0%
Taylor expanded in x around inf 57.8%
if -2.2999999999999999e-147 < z < 1.85e-44Initial program 74.6%
Taylor expanded in b around -inf 77.4%
mul-1-neg77.4%
*-commutative77.4%
distribute-rgt-neg-in77.4%
Simplified92.4%
Taylor expanded in t around inf 68.7%
if 1.85e-44 < z < 2.2000000000000001e254Initial program 52.6%
Taylor expanded in y around inf 70.4%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -3.5e+71)
t_2
(if (<= z -1.56e-211)
(* b (- (/ z b) (/ y t_1)))
(if (<= z 2.1e-98)
(/ (- (* (+ y t) a) (* y b)) t_1)
(if (<= z 3.5e+251) (- (+ z a) b) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -3.5e+71) {
tmp = t_2;
} else if (z <= -1.56e-211) {
tmp = b * ((z / b) - (y / t_1));
} else if (z <= 2.1e-98) {
tmp = (((y + t) * a) - (y * b)) / t_1;
} else if (z <= 3.5e+251) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-3.5d+71)) then
tmp = t_2
else if (z <= (-1.56d-211)) then
tmp = b * ((z / b) - (y / t_1))
else if (z <= 2.1d-98) then
tmp = (((y + t) * a) - (y * b)) / t_1
else if (z <= 3.5d+251) then
tmp = (z + a) - b
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -3.5e+71) {
tmp = t_2;
} else if (z <= -1.56e-211) {
tmp = b * ((z / b) - (y / t_1));
} else if (z <= 2.1e-98) {
tmp = (((y + t) * a) - (y * b)) / t_1;
} else if (z <= 3.5e+251) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -3.5e+71: tmp = t_2 elif z <= -1.56e-211: tmp = b * ((z / b) - (y / t_1)) elif z <= 2.1e-98: tmp = (((y + t) * a) - (y * b)) / t_1 elif z <= 3.5e+251: tmp = (z + a) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -3.5e+71) tmp = t_2; elseif (z <= -1.56e-211) tmp = Float64(b * Float64(Float64(z / b) - Float64(y / t_1))); elseif (z <= 2.1e-98) tmp = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / t_1); elseif (z <= 3.5e+251) tmp = Float64(Float64(z + a) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -3.5e+71) tmp = t_2; elseif (z <= -1.56e-211) tmp = b * ((z / b) - (y / t_1)); elseif (z <= 2.1e-98) tmp = (((y + t) * a) - (y * b)) / t_1; elseif (z <= 3.5e+251) tmp = (z + a) - b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+71], t$95$2, If[LessEqual[z, -1.56e-211], N[(b * N[(N[(z / b), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-98], N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 3.5e+251], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.56 \cdot 10^{-211}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{t\_1}\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-98}:\\
\;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{t\_1}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+251}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.4999999999999999e71 or 3.50000000000000004e251 < z Initial program 43.0%
Taylor expanded in z around inf 37.5%
associate-/l*90.9%
+-commutative90.9%
+-commutative90.9%
associate-+r+90.9%
+-commutative90.9%
associate-+l+90.9%
Simplified90.9%
if -3.4999999999999999e71 < z < -1.56e-211Initial program 67.5%
Taylor expanded in b around -inf 76.7%
mul-1-neg76.7%
*-commutative76.7%
distribute-rgt-neg-in76.7%
Simplified89.1%
Taylor expanded in x around inf 59.1%
if -1.56e-211 < z < 2.09999999999999992e-98Initial program 81.8%
Taylor expanded in z around 0 74.3%
*-commutative74.3%
Simplified74.3%
if 2.09999999999999992e-98 < z < 3.50000000000000004e251Initial program 54.7%
Taylor expanded in y around inf 67.8%
Final simplification72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* z (/ x (+ x t)))))
(if (<= x -2.7e+177)
t_2
(if (<= x -1.46e-211)
t_1
(if (<= x -2.6e-302) a (if (<= x 1.75e+118) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = z * (x / (x + t));
double tmp;
if (x <= -2.7e+177) {
tmp = t_2;
} else if (x <= -1.46e-211) {
tmp = t_1;
} else if (x <= -2.6e-302) {
tmp = a;
} else if (x <= 1.75e+118) {
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 = (z + a) - b
t_2 = z * (x / (x + t))
if (x <= (-2.7d+177)) then
tmp = t_2
else if (x <= (-1.46d-211)) then
tmp = t_1
else if (x <= (-2.6d-302)) then
tmp = a
else if (x <= 1.75d+118) 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 = (z + a) - b;
double t_2 = z * (x / (x + t));
double tmp;
if (x <= -2.7e+177) {
tmp = t_2;
} else if (x <= -1.46e-211) {
tmp = t_1;
} else if (x <= -2.6e-302) {
tmp = a;
} else if (x <= 1.75e+118) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z * (x / (x + t)) tmp = 0 if x <= -2.7e+177: tmp = t_2 elif x <= -1.46e-211: tmp = t_1 elif x <= -2.6e-302: tmp = a elif x <= 1.75e+118: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(z * Float64(x / Float64(x + t))) tmp = 0.0 if (x <= -2.7e+177) tmp = t_2; elseif (x <= -1.46e-211) tmp = t_1; elseif (x <= -2.6e-302) tmp = a; elseif (x <= 1.75e+118) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = z * (x / (x + t)); tmp = 0.0; if (x <= -2.7e+177) tmp = t_2; elseif (x <= -1.46e-211) tmp = t_1; elseif (x <= -2.6e-302) tmp = a; elseif (x <= 1.75e+118) 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[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e+177], t$95$2, If[LessEqual[x, -1.46e-211], t$95$1, If[LessEqual[x, -2.6e-302], a, If[LessEqual[x, 1.75e+118], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z \cdot \frac{x}{x + t}\\
\mathbf{if}\;x \leq -2.7 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.46 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-302}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -2.69999999999999991e177 or 1.75000000000000008e118 < 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%
associate-+l+69.3%
Simplified69.3%
Taylor expanded in y around 0 69.2%
if -2.69999999999999991e177 < x < -1.4600000000000001e-211 or -2.60000000000000011e-302 < x < 1.75000000000000008e118Initial program 62.7%
Taylor expanded in y around inf 61.5%
if -1.4600000000000001e-211 < x < -2.60000000000000011e-302Initial program 68.3%
Taylor expanded in t around inf 68.9%
Final simplification64.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ a (* y (/ z t)))))
(if (<= t -8.5e+196)
t_2
(if (<= t -3.8e-100)
t_1
(if (<= t -1.56e-196) z (if (<= t 1.9e+200) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a + (y * (z / t));
double tmp;
if (t <= -8.5e+196) {
tmp = t_2;
} else if (t <= -3.8e-100) {
tmp = t_1;
} else if (t <= -1.56e-196) {
tmp = z;
} else if (t <= 1.9e+200) {
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 = (z + a) - b
t_2 = a + (y * (z / t))
if (t <= (-8.5d+196)) then
tmp = t_2
else if (t <= (-3.8d-100)) then
tmp = t_1
else if (t <= (-1.56d-196)) then
tmp = z
else if (t <= 1.9d+200) 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 = (z + a) - b;
double t_2 = a + (y * (z / t));
double tmp;
if (t <= -8.5e+196) {
tmp = t_2;
} else if (t <= -3.8e-100) {
tmp = t_1;
} else if (t <= -1.56e-196) {
tmp = z;
} else if (t <= 1.9e+200) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a + (y * (z / t)) tmp = 0 if t <= -8.5e+196: tmp = t_2 elif t <= -3.8e-100: tmp = t_1 elif t <= -1.56e-196: tmp = z elif t <= 1.9e+200: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -8.5e+196) tmp = t_2; elseif (t <= -3.8e-100) tmp = t_1; elseif (t <= -1.56e-196) tmp = z; elseif (t <= 1.9e+200) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a + (y * (z / t)); tmp = 0.0; if (t <= -8.5e+196) tmp = t_2; elseif (t <= -3.8e-100) tmp = t_1; elseif (t <= -1.56e-196) tmp = z; elseif (t <= 1.9e+200) 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[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+196], t$95$2, If[LessEqual[t, -3.8e-100], t$95$1, If[LessEqual[t, -1.56e-196], z, If[LessEqual[t, 1.9e+200], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+196}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.56 \cdot 10^{-196}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.50000000000000041e196 or 1.89999999999999991e200 < t Initial program 44.3%
Taylor expanded in x around 0 43.6%
Taylor expanded in y around 0 84.3%
Taylor expanded in z around inf 65.0%
associate-/l*73.6%
Simplified73.6%
if -8.50000000000000041e196 < t < -3.79999999999999997e-100 or -1.56e-196 < t < 1.89999999999999991e200Initial program 64.7%
Taylor expanded in y around inf 61.8%
if -3.79999999999999997e-100 < t < -1.56e-196Initial program 83.0%
Taylor expanded in x around inf 81.4%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -3.25e+211)
(- a (* y (/ b t)))
(if (<= t -1.4e-98)
t_1
(if (<= t -1.45e-194)
z
(if (<= t 3.2e+200) t_1 (+ a (* y (/ z t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -3.25e+211) {
tmp = a - (y * (b / t));
} else if (t <= -1.4e-98) {
tmp = t_1;
} else if (t <= -1.45e-194) {
tmp = z;
} else if (t <= 3.2e+200) {
tmp = t_1;
} else {
tmp = a + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (t <= (-3.25d+211)) then
tmp = a - (y * (b / t))
else if (t <= (-1.4d-98)) then
tmp = t_1
else if (t <= (-1.45d-194)) then
tmp = z
else if (t <= 3.2d+200) then
tmp = t_1
else
tmp = a + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -3.25e+211) {
tmp = a - (y * (b / t));
} else if (t <= -1.4e-98) {
tmp = t_1;
} else if (t <= -1.45e-194) {
tmp = z;
} else if (t <= 3.2e+200) {
tmp = t_1;
} else {
tmp = a + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -3.25e+211: tmp = a - (y * (b / t)) elif t <= -1.4e-98: tmp = t_1 elif t <= -1.45e-194: tmp = z elif t <= 3.2e+200: tmp = t_1 else: tmp = a + (y * (z / t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -3.25e+211) tmp = Float64(a - Float64(y * Float64(b / t))); elseif (t <= -1.4e-98) tmp = t_1; elseif (t <= -1.45e-194) tmp = z; elseif (t <= 3.2e+200) tmp = t_1; else tmp = Float64(a + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -3.25e+211) tmp = a - (y * (b / t)); elseif (t <= -1.4e-98) tmp = t_1; elseif (t <= -1.45e-194) tmp = z; elseif (t <= 3.2e+200) tmp = t_1; else tmp = a + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -3.25e+211], N[(a - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.4e-98], t$95$1, If[LessEqual[t, -1.45e-194], z, If[LessEqual[t, 3.2e+200], t$95$1, N[(a + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -3.25 \cdot 10^{+211}:\\
\;\;\;\;a - y \cdot \frac{b}{t}\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-194}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -3.2499999999999998e211Initial program 48.7%
Taylor expanded in x around 0 47.6%
Taylor expanded in y around 0 86.1%
Taylor expanded in z around 0 81.7%
neg-mul-181.7%
distribute-neg-frac281.7%
Simplified81.7%
if -3.2499999999999998e211 < t < -1.3999999999999999e-98 or -1.44999999999999985e-194 < t < 3.20000000000000031e200Initial program 64.5%
Taylor expanded in y around inf 61.7%
if -1.3999999999999999e-98 < t < -1.44999999999999985e-194Initial program 83.0%
Taylor expanded in x around inf 81.4%
if 3.20000000000000031e200 < t Initial program 40.3%
Taylor expanded in x around 0 40.0%
Taylor expanded in y around 0 81.9%
Taylor expanded in z around inf 57.0%
associate-/l*72.5%
Simplified72.5%
Final simplification66.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -1.8e+213)
a
(if (<= t -6.8e-100)
t_1
(if (<= t -3.4e-196) z (if (<= t 5.7e+200) t_1 a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -1.8e+213) {
tmp = a;
} else if (t <= -6.8e-100) {
tmp = t_1;
} else if (t <= -3.4e-196) {
tmp = z;
} else if (t <= 5.7e+200) {
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 = (z + a) - b
if (t <= (-1.8d+213)) then
tmp = a
else if (t <= (-6.8d-100)) then
tmp = t_1
else if (t <= (-3.4d-196)) then
tmp = z
else if (t <= 5.7d+200) 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 = (z + a) - b;
double tmp;
if (t <= -1.8e+213) {
tmp = a;
} else if (t <= -6.8e-100) {
tmp = t_1;
} else if (t <= -3.4e-196) {
tmp = z;
} else if (t <= 5.7e+200) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -1.8e+213: tmp = a elif t <= -6.8e-100: tmp = t_1 elif t <= -3.4e-196: tmp = z elif t <= 5.7e+200: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -1.8e+213) tmp = a; elseif (t <= -6.8e-100) tmp = t_1; elseif (t <= -3.4e-196) tmp = z; elseif (t <= 5.7e+200) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -1.8e+213) tmp = a; elseif (t <= -6.8e-100) tmp = t_1; elseif (t <= -3.4e-196) tmp = z; elseif (t <= 5.7e+200) tmp = t_1; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -1.8e+213], a, If[LessEqual[t, -6.8e-100], t$95$1, If[LessEqual[t, -3.4e-196], z, If[LessEqual[t, 5.7e+200], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+213}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-196}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.8000000000000001e213 or 5.70000000000000007e200 < t Initial program 44.0%
Taylor expanded in t around inf 61.3%
if -1.8000000000000001e213 < t < -6.79999999999999953e-100 or -3.4e-196 < t < 5.70000000000000007e200Initial program 64.5%
Taylor expanded in y around inf 61.7%
if -6.79999999999999953e-100 < t < -3.4e-196Initial program 83.0%
Taylor expanded in x around inf 81.4%
Final simplification62.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7.5e+131) a (if (<= t 1.2e+170) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.5e+131) {
tmp = a;
} else if (t <= 1.2e+170) {
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 <= (-7.5d+131)) then
tmp = a
else if (t <= 1.2d+170) 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 <= -7.5e+131) {
tmp = a;
} else if (t <= 1.2e+170) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.5e+131: tmp = a elif t <= 1.2e+170: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.5e+131) tmp = a; elseif (t <= 1.2e+170) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.5e+131) tmp = a; elseif (t <= 1.2e+170) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e+131], a, If[LessEqual[t, 1.2e+170], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+131}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+170}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -7.4999999999999995e131 or 1.2e170 < t Initial program 44.6%
Taylor expanded in t around inf 61.8%
if -7.4999999999999995e131 < t < 1.2e170Initial program 68.4%
Taylor expanded in x around inf 45.3%
Final simplification49.9%
(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%
Final simplification30.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)))