
(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 (/ (- (+ (* a (+ y t)) (* z (+ x y))) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+280))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+280)) {
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 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+280)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+280): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(a * Float64(y + t)) + Float64(z * Float64(x + y))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+280)) 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 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+280))) 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[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+280]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(a \cdot \left(y + t\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+280}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 2.0000000000000001e280 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.3%
Taylor expanded in y around inf 76.1%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e280Initial program 99.1%
Final simplification89.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))))
(if (<= y -5e+68)
t_1
(if (<= y -2e-140)
(+ a (/ y (/ (+ y t) z)))
(if (<= y -1.1e-187)
(/ z (/ t_2 (+ x y)))
(if (<= y 8.5e-97)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 4.9e+17)
(/ (- (* a (+ y t)) (* y b)) t_2)
(if (<= y 4.2e+34) (+ z a) t_1))))))))
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 tmp;
if (y <= -5e+68) {
tmp = t_1;
} else if (y <= -2e-140) {
tmp = a + (y / ((y + t) / z));
} else if (y <= -1.1e-187) {
tmp = z / (t_2 / (x + y));
} else if (y <= 8.5e-97) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 4.9e+17) {
tmp = ((a * (y + t)) - (y * b)) / t_2;
} else if (y <= 4.2e+34) {
tmp = z + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
if (y <= (-5d+68)) then
tmp = t_1
else if (y <= (-2d-140)) then
tmp = a + (y / ((y + t) / z))
else if (y <= (-1.1d-187)) then
tmp = z / (t_2 / (x + y))
else if (y <= 8.5d-97) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 4.9d+17) then
tmp = ((a * (y + t)) - (y * b)) / t_2
else if (y <= 4.2d+34) then
tmp = z + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double tmp;
if (y <= -5e+68) {
tmp = t_1;
} else if (y <= -2e-140) {
tmp = a + (y / ((y + t) / z));
} else if (y <= -1.1e-187) {
tmp = z / (t_2 / (x + y));
} else if (y <= 8.5e-97) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 4.9e+17) {
tmp = ((a * (y + t)) - (y * b)) / t_2;
} else if (y <= 4.2e+34) {
tmp = z + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) tmp = 0 if y <= -5e+68: tmp = t_1 elif y <= -2e-140: tmp = a + (y / ((y + t) / z)) elif y <= -1.1e-187: tmp = z / (t_2 / (x + y)) elif y <= 8.5e-97: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 4.9e+17: tmp = ((a * (y + t)) - (y * b)) / t_2 elif y <= 4.2e+34: tmp = z + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) tmp = 0.0 if (y <= -5e+68) tmp = t_1; elseif (y <= -2e-140) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (y <= -1.1e-187) tmp = Float64(z / Float64(t_2 / Float64(x + y))); elseif (y <= 8.5e-97) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 4.9e+17) tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / t_2); elseif (y <= 4.2e+34) tmp = Float64(z + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); tmp = 0.0; if (y <= -5e+68) tmp = t_1; elseif (y <= -2e-140) tmp = a + (y / ((y + t) / z)); elseif (y <= -1.1e-187) tmp = z / (t_2 / (x + y)); elseif (y <= 8.5e-97) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 4.9e+17) tmp = ((a * (y + t)) - (y * b)) / t_2; elseif (y <= 4.2e+34) tmp = z + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+68], t$95$1, If[LessEqual[y, -2e-140], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e-187], N[(z / N[(t$95$2 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-97], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e+17], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 4.2e+34], N[(z + a), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
\mathbf{if}\;y \leq -5 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-140}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-187}:\\
\;\;\;\;\frac{z}{\frac{t_2}{x + y}}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+17}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.0000000000000004e68 or 4.20000000000000035e34 < y Initial program 38.3%
Taylor expanded in y around inf 81.2%
if -5.0000000000000004e68 < y < -2e-140Initial program 71.7%
Taylor expanded in z around 0 81.1%
associate--l+81.1%
associate-+r+81.1%
associate-+r+81.1%
div-sub81.1%
*-commutative81.1%
associate-+r+81.1%
Simplified81.1%
Taylor expanded in t around inf 71.6%
Taylor expanded in x around 0 62.7%
associate-/l*59.2%
+-commutative59.2%
Simplified59.2%
if -2e-140 < y < -1.10000000000000004e-187Initial program 71.8%
Taylor expanded in z around inf 33.2%
associate-/l*61.3%
associate-+r+61.3%
+-commutative61.3%
Simplified61.3%
if -1.10000000000000004e-187 < y < 8.5000000000000002e-97Initial program 82.8%
Taylor expanded in y around 0 73.3%
if 8.5000000000000002e-97 < y < 4.9e17Initial program 82.1%
Taylor expanded in z around 0 70.3%
*-commutative70.3%
Simplified70.3%
if 4.9e17 < y < 4.20000000000000035e34Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate--l+100.0%
associate-+r+100.0%
associate-+r+100.0%
div-sub100.0%
*-commutative100.0%
associate-+r+100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around inf 100.0%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (- (+ z a) b)))
(if (<= y -2.3e+70)
t_2
(if (<= y -2.3e-136)
(+ a (/ y (/ (+ y t) z)))
(if (<= y -5.1e-187)
(/ (- (* z (+ x y)) (* y b)) t_1)
(if (<= y 2.8e-95)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 5e+17)
(/ (- (* a (+ y t)) (* y b)) t_1)
(if (<= y 4e+34) (+ z a) 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 + a) - b;
double tmp;
if (y <= -2.3e+70) {
tmp = t_2;
} else if (y <= -2.3e-136) {
tmp = a + (y / ((y + t) / z));
} else if (y <= -5.1e-187) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (y <= 2.8e-95) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 5e+17) {
tmp = ((a * (y + t)) - (y * b)) / t_1;
} else if (y <= 4e+34) {
tmp = z + a;
} 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 + a) - b
if (y <= (-2.3d+70)) then
tmp = t_2
else if (y <= (-2.3d-136)) then
tmp = a + (y / ((y + t) / z))
else if (y <= (-5.1d-187)) then
tmp = ((z * (x + y)) - (y * b)) / t_1
else if (y <= 2.8d-95) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 5d+17) then
tmp = ((a * (y + t)) - (y * b)) / t_1
else if (y <= 4d+34) then
tmp = z + a
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 + a) - b;
double tmp;
if (y <= -2.3e+70) {
tmp = t_2;
} else if (y <= -2.3e-136) {
tmp = a + (y / ((y + t) / z));
} else if (y <= -5.1e-187) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (y <= 2.8e-95) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 5e+17) {
tmp = ((a * (y + t)) - (y * b)) / t_1;
} else if (y <= 4e+34) {
tmp = z + a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (z + a) - b tmp = 0 if y <= -2.3e+70: tmp = t_2 elif y <= -2.3e-136: tmp = a + (y / ((y + t) / z)) elif y <= -5.1e-187: tmp = ((z * (x + y)) - (y * b)) / t_1 elif y <= 2.8e-95: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 5e+17: tmp = ((a * (y + t)) - (y * b)) / t_1 elif y <= 4e+34: tmp = z + a else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.3e+70) tmp = t_2; elseif (y <= -2.3e-136) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (y <= -5.1e-187) tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); elseif (y <= 2.8e-95) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 5e+17) tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / t_1); elseif (y <= 4e+34) tmp = Float64(z + a); 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 + a) - b; tmp = 0.0; if (y <= -2.3e+70) tmp = t_2; elseif (y <= -2.3e-136) tmp = a + (y / ((y + t) / z)); elseif (y <= -5.1e-187) tmp = ((z * (x + y)) - (y * b)) / t_1; elseif (y <= 2.8e-95) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 5e+17) tmp = ((a * (y + t)) - (y * b)) / t_1; elseif (y <= 4e+34) tmp = z + a; 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[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.3e+70], t$95$2, If[LessEqual[y, -2.3e-136], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.1e-187], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 2.8e-95], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+17], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4e+34], N[(z + a), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-136}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{-187}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-95}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+17}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_1}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+34}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.29999999999999994e70 or 3.99999999999999978e34 < y Initial program 38.3%
Taylor expanded in y around inf 81.2%
if -2.29999999999999994e70 < y < -2.29999999999999998e-136Initial program 70.9%
Taylor expanded in z around 0 80.6%
associate--l+80.6%
associate-+r+80.6%
associate-+r+80.6%
div-sub80.6%
*-commutative80.6%
associate-+r+80.6%
Simplified80.6%
Taylor expanded in t around inf 73.4%
Taylor expanded in x around 0 64.2%
associate-/l*60.6%
+-commutative60.6%
Simplified60.6%
if -2.29999999999999998e-136 < y < -5.09999999999999971e-187Initial program 71.8%
Taylor expanded in a around 0 61.9%
+-commutative61.9%
*-commutative61.9%
Simplified61.9%
if -5.09999999999999971e-187 < y < 2.7999999999999999e-95Initial program 83.0%
Taylor expanded in y around 0 73.7%
if 2.7999999999999999e-95 < y < 5e17Initial program 82.1%
Taylor expanded in z around 0 70.3%
*-commutative70.3%
Simplified70.3%
if 5e17 < y < 3.99999999999999978e34Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate--l+100.0%
associate-+r+100.0%
associate-+r+100.0%
div-sub100.0%
*-commutative100.0%
associate-+r+100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around inf 100.0%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* a (+ y t))) (t_3 (- (+ z a) b)))
(if (<= y -5.5e+105)
t_3
(if (<= y -3.8e-125)
(/ (- (+ t_2 (* y z)) (* y b)) (+ y t))
(if (<= y -2.15e-187)
(/ (- (* z (+ x y)) (* y b)) t_1)
(if (<= y 4e-99)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 1.4e+17)
(/ (- t_2 (* y b)) t_1)
(if (<= y 4.5e+34) (+ z a) 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 = a * (y + t);
double t_3 = (z + a) - b;
double tmp;
if (y <= -5.5e+105) {
tmp = t_3;
} else if (y <= -3.8e-125) {
tmp = ((t_2 + (y * z)) - (y * b)) / (y + t);
} else if (y <= -2.15e-187) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (y <= 4e-99) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 1.4e+17) {
tmp = (t_2 - (y * b)) / t_1;
} else if (y <= 4.5e+34) {
tmp = z + a;
} 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 = a * (y + t)
t_3 = (z + a) - b
if (y <= (-5.5d+105)) then
tmp = t_3
else if (y <= (-3.8d-125)) then
tmp = ((t_2 + (y * z)) - (y * b)) / (y + t)
else if (y <= (-2.15d-187)) then
tmp = ((z * (x + y)) - (y * b)) / t_1
else if (y <= 4d-99) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 1.4d+17) then
tmp = (t_2 - (y * b)) / t_1
else if (y <= 4.5d+34) then
tmp = z + a
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 = a * (y + t);
double t_3 = (z + a) - b;
double tmp;
if (y <= -5.5e+105) {
tmp = t_3;
} else if (y <= -3.8e-125) {
tmp = ((t_2 + (y * z)) - (y * b)) / (y + t);
} else if (y <= -2.15e-187) {
tmp = ((z * (x + y)) - (y * b)) / t_1;
} else if (y <= 4e-99) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 1.4e+17) {
tmp = (t_2 - (y * b)) / t_1;
} else if (y <= 4.5e+34) {
tmp = z + a;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a * (y + t) t_3 = (z + a) - b tmp = 0 if y <= -5.5e+105: tmp = t_3 elif y <= -3.8e-125: tmp = ((t_2 + (y * z)) - (y * b)) / (y + t) elif y <= -2.15e-187: tmp = ((z * (x + y)) - (y * b)) / t_1 elif y <= 4e-99: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 1.4e+17: tmp = (t_2 - (y * b)) / t_1 elif y <= 4.5e+34: tmp = z + a else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a * Float64(y + t)) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -5.5e+105) tmp = t_3; elseif (y <= -3.8e-125) tmp = Float64(Float64(Float64(t_2 + Float64(y * z)) - Float64(y * b)) / Float64(y + t)); elseif (y <= -2.15e-187) tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); elseif (y <= 4e-99) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 1.4e+17) tmp = Float64(Float64(t_2 - Float64(y * b)) / t_1); elseif (y <= 4.5e+34) tmp = Float64(z + a); 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 = a * (y + t); t_3 = (z + a) - b; tmp = 0.0; if (y <= -5.5e+105) tmp = t_3; elseif (y <= -3.8e-125) tmp = ((t_2 + (y * z)) - (y * b)) / (y + t); elseif (y <= -2.15e-187) tmp = ((z * (x + y)) - (y * b)) / t_1; elseif (y <= 4e-99) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 1.4e+17) tmp = (t_2 - (y * b)) / t_1; elseif (y <= 4.5e+34) tmp = z + a; 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[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5.5e+105], t$95$3, If[LessEqual[y, -3.8e-125], N[(N[(N[(t$95$2 + N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e-187], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4e-99], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+17], N[(N[(t$95$2 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4.5e+34], N[(z + a), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a \cdot \left(y + t\right)\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+105}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{\left(t_2 + y \cdot z\right) - y \cdot b}{y + t}\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-187}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-99}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{t_2 - y \cdot b}{t_1}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+34}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -5.49999999999999979e105 or 4.5e34 < y Initial program 36.4%
Taylor expanded in y around inf 82.0%
if -5.49999999999999979e105 < y < -3.8000000000000001e-125Initial program 73.1%
Taylor expanded in x around 0 62.4%
if -3.8000000000000001e-125 < y < -2.15e-187Initial program 68.4%
Taylor expanded in a around 0 60.2%
+-commutative60.2%
*-commutative60.2%
Simplified60.2%
if -2.15e-187 < y < 4.0000000000000001e-99Initial program 83.0%
Taylor expanded in y around 0 73.7%
if 4.0000000000000001e-99 < y < 1.4e17Initial program 82.1%
Taylor expanded in z around 0 70.3%
*-commutative70.3%
Simplified70.3%
if 1.4e17 < y < 4.5e34Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate--l+100.0%
associate-+r+100.0%
associate-+r+100.0%
div-sub100.0%
*-commutative100.0%
associate-+r+100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around inf 100.0%
Final simplification75.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -7.7e+68)
t_1
(if (<= y -6.5e-141)
(+ a (/ y (/ (+ y t) z)))
(if (<= y -1.35e-189)
(/ z (/ (+ y (+ x t)) (+ x y)))
(if (<= y 2500000000.0) (/ (+ (* t a) (* x z)) (+ x t)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -7.7e+68) {
tmp = t_1;
} else if (y <= -6.5e-141) {
tmp = a + (y / ((y + t) / z));
} else if (y <= -1.35e-189) {
tmp = z / ((y + (x + t)) / (x + y));
} else if (y <= 2500000000.0) {
tmp = ((t * a) + (x * z)) / (x + t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-7.7d+68)) then
tmp = t_1
else if (y <= (-6.5d-141)) then
tmp = a + (y / ((y + t) / z))
else if (y <= (-1.35d-189)) then
tmp = z / ((y + (x + t)) / (x + y))
else if (y <= 2500000000.0d0) then
tmp = ((t * a) + (x * z)) / (x + t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -7.7e+68) {
tmp = t_1;
} else if (y <= -6.5e-141) {
tmp = a + (y / ((y + t) / z));
} else if (y <= -1.35e-189) {
tmp = z / ((y + (x + t)) / (x + y));
} else if (y <= 2500000000.0) {
tmp = ((t * a) + (x * z)) / (x + t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -7.7e+68: tmp = t_1 elif y <= -6.5e-141: tmp = a + (y / ((y + t) / z)) elif y <= -1.35e-189: tmp = z / ((y + (x + t)) / (x + y)) elif y <= 2500000000.0: tmp = ((t * a) + (x * z)) / (x + t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -7.7e+68) tmp = t_1; elseif (y <= -6.5e-141) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (y <= -1.35e-189) tmp = Float64(z / Float64(Float64(y + Float64(x + t)) / Float64(x + y))); elseif (y <= 2500000000.0) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -7.7e+68) tmp = t_1; elseif (y <= -6.5e-141) tmp = a + (y / ((y + t) / z)); elseif (y <= -1.35e-189) tmp = z / ((y + (x + t)) / (x + y)); elseif (y <= 2500000000.0) tmp = ((t * a) + (x * z)) / (x + t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -7.7e+68], t$95$1, If[LessEqual[y, -6.5e-141], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-189], N[(z / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2500000000.0], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -7.7 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-141}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-189}:\\
\;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\
\mathbf{elif}\;y \leq 2500000000:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.6999999999999998e68 or 2.5e9 < y Initial program 39.9%
Taylor expanded in y around inf 80.4%
if -7.6999999999999998e68 < y < -6.4999999999999995e-141Initial program 71.7%
Taylor expanded in z around 0 81.1%
associate--l+81.1%
associate-+r+81.1%
associate-+r+81.1%
div-sub81.1%
*-commutative81.1%
associate-+r+81.1%
Simplified81.1%
Taylor expanded in t around inf 71.6%
Taylor expanded in x around 0 62.7%
associate-/l*59.2%
+-commutative59.2%
Simplified59.2%
if -6.4999999999999995e-141 < y < -1.35e-189Initial program 71.8%
Taylor expanded in z around inf 33.2%
associate-/l*61.3%
associate-+r+61.3%
+-commutative61.3%
Simplified61.3%
if -1.35e-189 < y < 2.5e9Initial program 83.4%
Taylor expanded in y around 0 69.2%
Final simplification72.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ a (* z (/ (+ x y) t)))))
(if (<= t -2.25e+108)
t_2
(if (<= t -1.04e-286)
t_1
(if (<= t 9.5e-295) z (if (<= t 5.5e+190) 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 + (z * ((x + y) / t));
double tmp;
if (t <= -2.25e+108) {
tmp = t_2;
} else if (t <= -1.04e-286) {
tmp = t_1;
} else if (t <= 9.5e-295) {
tmp = z;
} else if (t <= 5.5e+190) {
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 + (z * ((x + y) / t))
if (t <= (-2.25d+108)) then
tmp = t_2
else if (t <= (-1.04d-286)) then
tmp = t_1
else if (t <= 9.5d-295) then
tmp = z
else if (t <= 5.5d+190) 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 + (z * ((x + y) / t));
double tmp;
if (t <= -2.25e+108) {
tmp = t_2;
} else if (t <= -1.04e-286) {
tmp = t_1;
} else if (t <= 9.5e-295) {
tmp = z;
} else if (t <= 5.5e+190) {
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 + (z * ((x + y) / t)) tmp = 0 if t <= -2.25e+108: tmp = t_2 elif t <= -1.04e-286: tmp = t_1 elif t <= 9.5e-295: tmp = z elif t <= 5.5e+190: 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(z * Float64(Float64(x + y) / t))) tmp = 0.0 if (t <= -2.25e+108) tmp = t_2; elseif (t <= -1.04e-286) tmp = t_1; elseif (t <= 9.5e-295) tmp = z; elseif (t <= 5.5e+190) 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 + (z * ((x + y) / t)); tmp = 0.0; if (t <= -2.25e+108) tmp = t_2; elseif (t <= -1.04e-286) tmp = t_1; elseif (t <= 9.5e-295) tmp = z; elseif (t <= 5.5e+190) 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[(z * N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+108], t$95$2, If[LessEqual[t, -1.04e-286], t$95$1, If[LessEqual[t, 9.5e-295], z, If[LessEqual[t, 5.5e+190], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a + z \cdot \frac{x + y}{t}\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+108}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.04 \cdot 10^{-286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-295}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+190}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.25e108 or 5.5e190 < t Initial program 56.4%
Taylor expanded in z around 0 63.7%
associate--l+63.7%
associate-+r+63.7%
associate-+r+63.7%
div-sub63.7%
*-commutative63.7%
associate-+r+63.7%
Simplified63.7%
Taylor expanded in t around inf 74.2%
Taylor expanded in t around inf 68.1%
+-commutative68.1%
Simplified68.1%
if -2.25e108 < t < -1.04e-286 or 9.5e-295 < t < 5.5e190Initial program 60.3%
Taylor expanded in y around inf 66.2%
if -1.04e-286 < t < 9.5e-295Initial program 68.6%
Taylor expanded in x around inf 69.5%
Final simplification66.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= b -4.1e+189) (not (<= b 2.8e+209)))
(/ (- b) (/ t_1 y))
(+ a (* z (+ (/ x t_1) (/ y t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((b <= -4.1e+189) || !(b <= 2.8e+209)) {
tmp = -b / (t_1 / y);
} else {
tmp = a + (z * ((x / t_1) + (y / t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((b <= (-4.1d+189)) .or. (.not. (b <= 2.8d+209))) then
tmp = -b / (t_1 / y)
else
tmp = a + (z * ((x / t_1) + (y / t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((b <= -4.1e+189) || !(b <= 2.8e+209)) {
tmp = -b / (t_1 / y);
} else {
tmp = a + (z * ((x / t_1) + (y / t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (b <= -4.1e+189) or not (b <= 2.8e+209): tmp = -b / (t_1 / y) else: tmp = a + (z * ((x / t_1) + (y / t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((b <= -4.1e+189) || !(b <= 2.8e+209)) tmp = Float64(Float64(-b) / Float64(t_1 / y)); else tmp = Float64(a + Float64(z * Float64(Float64(x / t_1) + Float64(y / t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((b <= -4.1e+189) || ~((b <= 2.8e+209))) tmp = -b / (t_1 / y); else tmp = a + (z * ((x / t_1) + (y / t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -4.1e+189], N[Not[LessEqual[b, 2.8e+209]], $MachinePrecision]], N[((-b) / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], N[(a + N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+189} \lor \neg \left(b \leq 2.8 \cdot 10^{+209}\right):\\
\;\;\;\;\frac{-b}{\frac{t_1}{y}}\\
\mathbf{else}:\\
\;\;\;\;a + z \cdot \left(\frac{x}{t_1} + \frac{y}{t_1}\right)\\
\end{array}
\end{array}
if b < -4.1000000000000002e189 or 2.80000000000000013e209 < b Initial program 41.9%
Taylor expanded in b around inf 34.4%
mul-1-neg34.4%
associate-/l*75.5%
distribute-neg-frac75.5%
associate-+r+75.5%
Simplified75.5%
if -4.1000000000000002e189 < b < 2.80000000000000013e209Initial program 63.4%
Taylor expanded in z around 0 76.5%
associate--l+76.5%
associate-+r+76.5%
associate-+r+76.5%
div-sub76.5%
*-commutative76.5%
associate-+r+76.5%
Simplified76.5%
Taylor expanded in t around inf 73.4%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -6.2e+66)
t_1
(if (<= y -5.1e-141)
(+ a (/ y (/ (+ y t) z)))
(if (<= y 7.2e-221)
(* (+ x y) (/ z (+ x (+ y t))))
(if (<= y 7e+34) (+ z a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -6.2e+66) {
tmp = t_1;
} else if (y <= -5.1e-141) {
tmp = a + (y / ((y + t) / z));
} else if (y <= 7.2e-221) {
tmp = (x + y) * (z / (x + (y + t)));
} else if (y <= 7e+34) {
tmp = z + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-6.2d+66)) then
tmp = t_1
else if (y <= (-5.1d-141)) then
tmp = a + (y / ((y + t) / z))
else if (y <= 7.2d-221) then
tmp = (x + y) * (z / (x + (y + t)))
else if (y <= 7d+34) then
tmp = z + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -6.2e+66) {
tmp = t_1;
} else if (y <= -5.1e-141) {
tmp = a + (y / ((y + t) / z));
} else if (y <= 7.2e-221) {
tmp = (x + y) * (z / (x + (y + t)));
} else if (y <= 7e+34) {
tmp = z + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -6.2e+66: tmp = t_1 elif y <= -5.1e-141: tmp = a + (y / ((y + t) / z)) elif y <= 7.2e-221: tmp = (x + y) * (z / (x + (y + t))) elif y <= 7e+34: tmp = z + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -6.2e+66) tmp = t_1; elseif (y <= -5.1e-141) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (y <= 7.2e-221) tmp = Float64(Float64(x + y) * Float64(z / Float64(x + Float64(y + t)))); elseif (y <= 7e+34) tmp = Float64(z + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -6.2e+66) tmp = t_1; elseif (y <= -5.1e-141) tmp = a + (y / ((y + t) / z)); elseif (y <= 7.2e-221) tmp = (x + y) * (z / (x + (y + t))); elseif (y <= 7e+34) tmp = z + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -6.2e+66], t$95$1, If[LessEqual[y, -5.1e-141], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-221], N[(N[(x + y), $MachinePrecision] * N[(z / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+34], N[(z + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{-141}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-221}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{z}{x + \left(y + t\right)}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+34}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -6.20000000000000037e66 or 6.99999999999999996e34 < y Initial program 38.3%
Taylor expanded in y around inf 81.2%
if -6.20000000000000037e66 < y < -5.09999999999999977e-141Initial program 71.7%
Taylor expanded in z around 0 81.1%
associate--l+81.1%
associate-+r+81.1%
associate-+r+81.1%
div-sub81.1%
*-commutative81.1%
associate-+r+81.1%
Simplified81.1%
Taylor expanded in t around inf 71.6%
Taylor expanded in x around 0 62.7%
associate-/l*59.2%
+-commutative59.2%
Simplified59.2%
if -5.09999999999999977e-141 < y < 7.20000000000000022e-221Initial program 77.5%
Taylor expanded in z around inf 35.2%
+-commutative35.2%
Simplified35.2%
Taylor expanded in z around 0 35.2%
associate-/l*48.2%
+-commutative48.2%
+-commutative48.2%
associate-/r/50.0%
associate-+r+50.0%
+-commutative50.0%
Simplified50.0%
if 7.20000000000000022e-221 < y < 6.99999999999999996e34Initial program 87.2%
Taylor expanded in z around 0 95.6%
associate--l+95.6%
associate-+r+95.6%
associate-+r+95.6%
div-sub95.6%
*-commutative95.6%
associate-+r+95.6%
Simplified95.6%
Taylor expanded in t around inf 60.6%
Taylor expanded in x around inf 51.6%
Final simplification66.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (* t (- (/ a x) (/ z x))))))
(if (<= x -1.9e+116)
t_1
(if (<= x 2.1e-260)
(+ a (/ y (/ (+ y t) z)))
(if (<= x 9.8e+219) (- (+ z a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (t * ((a / x) - (z / x)));
double tmp;
if (x <= -1.9e+116) {
tmp = t_1;
} else if (x <= 2.1e-260) {
tmp = a + (y / ((y + t) / z));
} else if (x <= 9.8e+219) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z + (t * ((a / x) - (z / x)))
if (x <= (-1.9d+116)) then
tmp = t_1
else if (x <= 2.1d-260) then
tmp = a + (y / ((y + t) / z))
else if (x <= 9.8d+219) then
tmp = (z + a) - b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (t * ((a / x) - (z / x)));
double tmp;
if (x <= -1.9e+116) {
tmp = t_1;
} else if (x <= 2.1e-260) {
tmp = a + (y / ((y + t) / z));
} else if (x <= 9.8e+219) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (t * ((a / x) - (z / x))) tmp = 0 if x <= -1.9e+116: tmp = t_1 elif x <= 2.1e-260: tmp = a + (y / ((y + t) / z)) elif x <= 9.8e+219: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(t * Float64(Float64(a / x) - Float64(z / x)))) tmp = 0.0 if (x <= -1.9e+116) tmp = t_1; elseif (x <= 2.1e-260) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (x <= 9.8e+219) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (t * ((a / x) - (z / x))); tmp = 0.0; if (x <= -1.9e+116) tmp = t_1; elseif (x <= 2.1e-260) tmp = a + (y / ((y + t) / z)); elseif (x <= 9.8e+219) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(t * N[(N[(a / x), $MachinePrecision] - N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+116], t$95$1, If[LessEqual[x, 2.1e-260], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+219], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-260}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+219}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.8999999999999999e116 or 9.80000000000000007e219 < x Initial program 52.8%
Taylor expanded in y around 0 48.0%
Taylor expanded in t around 0 69.7%
if -1.8999999999999999e116 < x < 2.10000000000000005e-260Initial program 67.9%
Taylor expanded in z around 0 72.2%
associate--l+72.2%
associate-+r+72.2%
associate-+r+72.2%
div-sub72.2%
*-commutative72.2%
associate-+r+72.2%
Simplified72.2%
Taylor expanded in t around inf 72.4%
Taylor expanded in x around 0 57.4%
associate-/l*65.2%
+-commutative65.2%
Simplified65.2%
if 2.10000000000000005e-260 < x < 9.80000000000000007e219Initial program 53.1%
Taylor expanded in y around inf 64.0%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -1.85e+105)
(/ z (/ (+ y (+ x t)) (+ x y)))
(if (<= x 4.2e-262)
(+ a (/ y (/ (+ y t) z)))
(if (<= x 1.8e+220) (- (+ z a) b) (+ z (* t (- (/ a x) (/ z x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.85e+105) {
tmp = z / ((y + (x + t)) / (x + y));
} else if (x <= 4.2e-262) {
tmp = a + (y / ((y + t) / z));
} else if (x <= 1.8e+220) {
tmp = (z + a) - b;
} else {
tmp = z + (t * ((a / x) - (z / x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.85d+105)) then
tmp = z / ((y + (x + t)) / (x + y))
else if (x <= 4.2d-262) then
tmp = a + (y / ((y + t) / z))
else if (x <= 1.8d+220) then
tmp = (z + a) - b
else
tmp = z + (t * ((a / x) - (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.85e+105) {
tmp = z / ((y + (x + t)) / (x + y));
} else if (x <= 4.2e-262) {
tmp = a + (y / ((y + t) / z));
} else if (x <= 1.8e+220) {
tmp = (z + a) - b;
} else {
tmp = z + (t * ((a / x) - (z / x)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.85e+105: tmp = z / ((y + (x + t)) / (x + y)) elif x <= 4.2e-262: tmp = a + (y / ((y + t) / z)) elif x <= 1.8e+220: tmp = (z + a) - b else: tmp = z + (t * ((a / x) - (z / x))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.85e+105) tmp = Float64(z / Float64(Float64(y + Float64(x + t)) / Float64(x + y))); elseif (x <= 4.2e-262) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (x <= 1.8e+220) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z + Float64(t * Float64(Float64(a / x) - Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.85e+105) tmp = z / ((y + (x + t)) / (x + y)); elseif (x <= 4.2e-262) tmp = a + (y / ((y + t) / z)); elseif (x <= 1.8e+220) tmp = (z + a) - b; else tmp = z + (t * ((a / x) - (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.85e+105], N[(z / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-262], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+220], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + N[(t * N[(N[(a / x), $MachinePrecision] - N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+105}:\\
\;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-262}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+220}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < -1.84999999999999992e105Initial program 55.6%
Taylor expanded in z around inf 43.4%
associate-/l*71.8%
associate-+r+71.8%
+-commutative71.8%
Simplified71.8%
if -1.84999999999999992e105 < x < 4.1999999999999999e-262Initial program 67.6%
Taylor expanded in z around 0 72.0%
associate--l+72.0%
associate-+r+72.0%
associate-+r+72.0%
div-sub71.9%
*-commutative71.9%
associate-+r+71.9%
Simplified71.9%
Taylor expanded in t around inf 72.2%
Taylor expanded in x around 0 57.9%
associate-/l*65.8%
+-commutative65.8%
Simplified65.8%
if 4.1999999999999999e-262 < x < 1.80000000000000009e220Initial program 53.1%
Taylor expanded in y around inf 64.0%
if 1.80000000000000009e220 < x Initial program 49.4%
Taylor expanded in y around 0 42.1%
Taylor expanded in t around 0 71.3%
Final simplification66.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.5e+67)
t_1
(if (<= y -5.5e-141)
(+ a (/ y (/ (+ y t) z)))
(if (<= y 6.2e-219)
(/ x (/ (+ x t) z))
(if (<= y 2e+34) (+ z a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.5e+67) {
tmp = t_1;
} else if (y <= -5.5e-141) {
tmp = a + (y / ((y + t) / z));
} else if (y <= 6.2e-219) {
tmp = x / ((x + t) / z);
} else if (y <= 2e+34) {
tmp = z + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2.5d+67)) then
tmp = t_1
else if (y <= (-5.5d-141)) then
tmp = a + (y / ((y + t) / z))
else if (y <= 6.2d-219) then
tmp = x / ((x + t) / z)
else if (y <= 2d+34) then
tmp = z + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.5e+67) {
tmp = t_1;
} else if (y <= -5.5e-141) {
tmp = a + (y / ((y + t) / z));
} else if (y <= 6.2e-219) {
tmp = x / ((x + t) / z);
} else if (y <= 2e+34) {
tmp = z + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.5e+67: tmp = t_1 elif y <= -5.5e-141: tmp = a + (y / ((y + t) / z)) elif y <= 6.2e-219: tmp = x / ((x + t) / z) elif y <= 2e+34: tmp = z + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.5e+67) tmp = t_1; elseif (y <= -5.5e-141) tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z))); elseif (y <= 6.2e-219) tmp = Float64(x / Float64(Float64(x + t) / z)); elseif (y <= 2e+34) tmp = Float64(z + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.5e+67) tmp = t_1; elseif (y <= -5.5e-141) tmp = a + (y / ((y + t) / z)); elseif (y <= 6.2e-219) tmp = x / ((x + t) / z); elseif (y <= 2e+34) tmp = z + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.5e+67], t$95$1, If[LessEqual[y, -5.5e-141], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-219], N[(x / N[(N[(x + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+34], N[(z + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-141}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-219}:\\
\;\;\;\;\frac{x}{\frac{x + t}{z}}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+34}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.49999999999999988e67 or 1.99999999999999989e34 < y Initial program 38.3%
Taylor expanded in y around inf 81.2%
if -2.49999999999999988e67 < y < -5.4999999999999998e-141Initial program 71.7%
Taylor expanded in z around 0 81.1%
associate--l+81.1%
associate-+r+81.1%
associate-+r+81.1%
div-sub81.1%
*-commutative81.1%
associate-+r+81.1%
Simplified81.1%
Taylor expanded in t around inf 71.6%
Taylor expanded in x around 0 62.7%
associate-/l*59.2%
+-commutative59.2%
Simplified59.2%
if -5.4999999999999998e-141 < y < 6.1999999999999994e-219Initial program 77.5%
Taylor expanded in y around 0 64.4%
Taylor expanded in a around 0 34.1%
associate-/l*48.9%
Simplified48.9%
if 6.1999999999999994e-219 < y < 1.99999999999999989e34Initial program 87.2%
Taylor expanded in z around 0 95.6%
associate--l+95.6%
associate-+r+95.6%
associate-+r+95.6%
div-sub95.6%
*-commutative95.6%
associate-+r+95.6%
Simplified95.6%
Taylor expanded in t around inf 60.6%
Taylor expanded in x around inf 51.6%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.16e+141) z (if (<= x 1e+216) (- (+ z a) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.16e+141) {
tmp = z;
} else if (x <= 1e+216) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.16d+141)) then
tmp = z
else if (x <= 1d+216) then
tmp = (z + a) - b
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.16e+141) {
tmp = z;
} else if (x <= 1e+216) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.16e+141: tmp = z elif x <= 1e+216: tmp = (z + a) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.16e+141) tmp = z; elseif (x <= 1e+216) tmp = Float64(Float64(z + a) - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.16e+141) tmp = z; elseif (x <= 1e+216) tmp = (z + a) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.16e+141], z, If[LessEqual[x, 1e+216], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.16 \cdot 10^{+141}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 10^{+216}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -1.16e141 or 1e216 < x Initial program 50.4%
Taylor expanded in x around inf 65.0%
if -1.16e141 < x < 1e216Initial program 61.3%
Taylor expanded in y around inf 61.5%
Final simplification62.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.9e+200) (not (<= b 5.2e+235))) (- b) (+ z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.9e+200) || !(b <= 5.2e+235)) {
tmp = -b;
} else {
tmp = z + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-4.9d+200)) .or. (.not. (b <= 5.2d+235))) then
tmp = -b
else
tmp = z + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.9e+200) || !(b <= 5.2e+235)) {
tmp = -b;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.9e+200) or not (b <= 5.2e+235): tmp = -b else: tmp = z + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.9e+200) || !(b <= 5.2e+235)) tmp = Float64(-b); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.9e+200) || ~((b <= 5.2e+235))) tmp = -b; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.9e+200], N[Not[LessEqual[b, 5.2e+235]], $MachinePrecision]], (-b), N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.9 \cdot 10^{+200} \lor \neg \left(b \leq 5.2 \cdot 10^{+235}\right):\\
\;\;\;\;-b\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if b < -4.89999999999999982e200 or 5.1999999999999996e235 < b Initial program 47.3%
Taylor expanded in b around inf 36.7%
associate-*r*36.7%
mul-1-neg36.7%
Simplified36.7%
Taylor expanded in y around inf 46.0%
neg-mul-146.0%
Simplified46.0%
if -4.89999999999999982e200 < b < 5.1999999999999996e235Initial program 61.4%
Taylor expanded in z around 0 73.8%
associate--l+73.8%
associate-+r+73.8%
associate-+r+73.8%
div-sub73.8%
*-commutative73.8%
associate-+r+73.8%
Simplified73.8%
Taylor expanded in t around inf 71.3%
Taylor expanded in x around inf 57.0%
Final simplification55.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7.5e-25) a (if (<= t 1.2e+26) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.5e-25) {
tmp = a;
} else if (t <= 1.2e+26) {
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-25)) then
tmp = a
else if (t <= 1.2d+26) 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-25) {
tmp = a;
} else if (t <= 1.2e+26) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.5e-25: tmp = a elif t <= 1.2e+26: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.5e-25) tmp = a; elseif (t <= 1.2e+26) 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-25) tmp = a; elseif (t <= 1.2e+26) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e-25], a, If[LessEqual[t, 1.2e+26], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-25}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+26}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -7.49999999999999989e-25 or 1.20000000000000002e26 < t Initial program 57.0%
Taylor expanded in t around inf 46.4%
if -7.49999999999999989e-25 < t < 1.20000000000000002e26Initial program 62.1%
Taylor expanded in x around inf 46.7%
Final simplification46.6%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 59.6%
Taylor expanded in t around inf 34.3%
Final simplification34.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t_2}{t_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))