
(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 14 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 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+207))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+207)) {
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 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+207)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+207): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+207)) 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 * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+207))) 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $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+207]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+207}\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.9999999999999999e207 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 10.0%
Taylor expanded in y around inf 72.6%
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.9999999999999999e207Initial program 99.8%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b (+ y t))))
(t_2 (+ y (+ x t)))
(t_3 (* a (/ (+ y t) t_2)))
(t_4 (* z (/ (+ x y) t_2))))
(if (<= z -7.5e+80)
t_4
(if (<= z -3.3e+19)
(+ z a)
(if (<= z -2.8e-32)
(- z t_1)
(if (<= z -1.6e-107)
(- (+ z a) b)
(if (<= z -1.9e-194)
t_3
(if (<= z -4.5e-242)
(* b (/ y (- (- y) (+ x t))))
(if (<= z 2.85e-257)
t_3
(if (<= z 1.32e+95) (- a t_1) t_4))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (y + t));
double t_2 = y + (x + t);
double t_3 = a * ((y + t) / t_2);
double t_4 = z * ((x + y) / t_2);
double tmp;
if (z <= -7.5e+80) {
tmp = t_4;
} else if (z <= -3.3e+19) {
tmp = z + a;
} else if (z <= -2.8e-32) {
tmp = z - t_1;
} else if (z <= -1.6e-107) {
tmp = (z + a) - b;
} else if (z <= -1.9e-194) {
tmp = t_3;
} else if (z <= -4.5e-242) {
tmp = b * (y / (-y - (x + t)));
} else if (z <= 2.85e-257) {
tmp = t_3;
} else if (z <= 1.32e+95) {
tmp = a - t_1;
} 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 * (b / (y + t))
t_2 = y + (x + t)
t_3 = a * ((y + t) / t_2)
t_4 = z * ((x + y) / t_2)
if (z <= (-7.5d+80)) then
tmp = t_4
else if (z <= (-3.3d+19)) then
tmp = z + a
else if (z <= (-2.8d-32)) then
tmp = z - t_1
else if (z <= (-1.6d-107)) then
tmp = (z + a) - b
else if (z <= (-1.9d-194)) then
tmp = t_3
else if (z <= (-4.5d-242)) then
tmp = b * (y / (-y - (x + t)))
else if (z <= 2.85d-257) then
tmp = t_3
else if (z <= 1.32d+95) then
tmp = a - t_1
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 * (b / (y + t));
double t_2 = y + (x + t);
double t_3 = a * ((y + t) / t_2);
double t_4 = z * ((x + y) / t_2);
double tmp;
if (z <= -7.5e+80) {
tmp = t_4;
} else if (z <= -3.3e+19) {
tmp = z + a;
} else if (z <= -2.8e-32) {
tmp = z - t_1;
} else if (z <= -1.6e-107) {
tmp = (z + a) - b;
} else if (z <= -1.9e-194) {
tmp = t_3;
} else if (z <= -4.5e-242) {
tmp = b * (y / (-y - (x + t)));
} else if (z <= 2.85e-257) {
tmp = t_3;
} else if (z <= 1.32e+95) {
tmp = a - t_1;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / (y + t)) t_2 = y + (x + t) t_3 = a * ((y + t) / t_2) t_4 = z * ((x + y) / t_2) tmp = 0 if z <= -7.5e+80: tmp = t_4 elif z <= -3.3e+19: tmp = z + a elif z <= -2.8e-32: tmp = z - t_1 elif z <= -1.6e-107: tmp = (z + a) - b elif z <= -1.9e-194: tmp = t_3 elif z <= -4.5e-242: tmp = b * (y / (-y - (x + t))) elif z <= 2.85e-257: tmp = t_3 elif z <= 1.32e+95: tmp = a - t_1 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / Float64(y + t))) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(a * Float64(Float64(y + t) / t_2)) t_4 = Float64(z * Float64(Float64(x + y) / t_2)) tmp = 0.0 if (z <= -7.5e+80) tmp = t_4; elseif (z <= -3.3e+19) tmp = Float64(z + a); elseif (z <= -2.8e-32) tmp = Float64(z - t_1); elseif (z <= -1.6e-107) tmp = Float64(Float64(z + a) - b); elseif (z <= -1.9e-194) tmp = t_3; elseif (z <= -4.5e-242) tmp = Float64(b * Float64(y / Float64(Float64(-y) - Float64(x + t)))); elseif (z <= 2.85e-257) tmp = t_3; elseif (z <= 1.32e+95) tmp = Float64(a - t_1); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / (y + t)); t_2 = y + (x + t); t_3 = a * ((y + t) / t_2); t_4 = z * ((x + y) / t_2); tmp = 0.0; if (z <= -7.5e+80) tmp = t_4; elseif (z <= -3.3e+19) tmp = z + a; elseif (z <= -2.8e-32) tmp = z - t_1; elseif (z <= -1.6e-107) tmp = (z + a) - b; elseif (z <= -1.9e-194) tmp = t_3; elseif (z <= -4.5e-242) tmp = b * (y / (-y - (x + t))); elseif (z <= 2.85e-257) tmp = t_3; elseif (z <= 1.32e+95) tmp = a - t_1; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+80], t$95$4, If[LessEqual[z, -3.3e+19], N[(z + a), $MachinePrecision], If[LessEqual[z, -2.8e-32], N[(z - t$95$1), $MachinePrecision], If[LessEqual[z, -1.6e-107], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, -1.9e-194], t$95$3, If[LessEqual[z, -4.5e-242], N[(b * N[(y / N[((-y) - N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.85e-257], t$95$3, If[LessEqual[z, 1.32e+95], N[(a - t$95$1), $MachinePrecision], t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{y + t}\\
t_2 := y + \left(x + t\right)\\
t_3 := a \cdot \frac{y + t}{t\_2}\\
t_4 := z \cdot \frac{x + y}{t\_2}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+80}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{+19}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-32}:\\
\;\;\;\;z - t\_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-107}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-194}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-242}:\\
\;\;\;\;b \cdot \frac{y}{\left(-y\right) - \left(x + t\right)}\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{-257}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{+95}:\\
\;\;\;\;a - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -7.49999999999999994e80 or 1.32e95 < z Initial program 38.6%
Taylor expanded in z around inf 28.5%
associate-/l*77.4%
+-commutative77.4%
+-commutative77.4%
+-commutative77.4%
associate-+l+77.4%
+-commutative77.4%
Simplified77.4%
if -7.49999999999999994e80 < z < -3.3e19Initial program 51.9%
Taylor expanded in y around inf 69.5%
Taylor expanded in b around 0 88.1%
+-commutative88.1%
Simplified88.1%
if -3.3e19 < z < -2.7999999999999999e-32Initial program 68.1%
div-sub68.0%
fma-define68.0%
+-commutative68.0%
*-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-/l*89.2%
Applied egg-rr89.2%
Taylor expanded in x around inf 76.2%
Taylor expanded in x around 0 44.5%
*-commutative20.5%
+-commutative20.5%
associate-/l*39.9%
+-commutative39.9%
Simplified63.9%
if -2.7999999999999999e-32 < z < -1.60000000000000006e-107Initial program 43.4%
Taylor expanded in y around inf 93.8%
if -1.60000000000000006e-107 < z < -1.9000000000000001e-194 or -4.4999999999999999e-242 < z < 2.8499999999999999e-257Initial program 73.7%
Taylor expanded in a around inf 52.1%
associate-/l*73.3%
+-commutative73.3%
+-commutative73.3%
associate-+l+73.3%
+-commutative73.3%
Simplified73.3%
if -1.9000000000000001e-194 < z < -4.4999999999999999e-242Initial program 90.7%
Taylor expanded in b around inf 68.0%
mul-1-neg68.0%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
+-commutative68.1%
+-commutative68.1%
associate-+l+68.1%
+-commutative68.1%
Simplified68.1%
if 2.8499999999999999e-257 < z < 1.32e95Initial program 70.2%
div-sub70.2%
fma-define70.2%
+-commutative70.2%
*-commutative70.2%
associate-+l+70.2%
+-commutative70.2%
associate-+l+70.2%
+-commutative70.2%
associate-/l*75.2%
Applied egg-rr75.2%
Taylor expanded in t around inf 76.2%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
+-commutative66.3%
associate-/l*72.9%
+-commutative72.9%
Simplified72.9%
Final simplification75.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b (+ x (+ y t)))))
(t_2 (+ y (+ x t)))
(t_3 (* z (/ (+ x y) t_2))))
(if (<= z -7e+80)
t_3
(if (<= z -1.8e+20)
(+ z a)
(if (<= z -2.45e-32)
(- z t_1)
(if (<= z -1.9e-111)
(- (+ z a) b)
(if (<= z -3.3e-285)
(/ (- (* (+ y t) a) (* y b)) t_2)
(if (<= z 1.3e+95) (- a t_1) t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (x + (y + t)));
double t_2 = y + (x + t);
double t_3 = z * ((x + y) / t_2);
double tmp;
if (z <= -7e+80) {
tmp = t_3;
} else if (z <= -1.8e+20) {
tmp = z + a;
} else if (z <= -2.45e-32) {
tmp = z - t_1;
} else if (z <= -1.9e-111) {
tmp = (z + a) - b;
} else if (z <= -3.3e-285) {
tmp = (((y + t) * a) - (y * b)) / t_2;
} else if (z <= 1.3e+95) {
tmp = a - 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 = y * (b / (x + (y + t)))
t_2 = y + (x + t)
t_3 = z * ((x + y) / t_2)
if (z <= (-7d+80)) then
tmp = t_3
else if (z <= (-1.8d+20)) then
tmp = z + a
else if (z <= (-2.45d-32)) then
tmp = z - t_1
else if (z <= (-1.9d-111)) then
tmp = (z + a) - b
else if (z <= (-3.3d-285)) then
tmp = (((y + t) * a) - (y * b)) / t_2
else if (z <= 1.3d+95) then
tmp = a - 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 = y * (b / (x + (y + t)));
double t_2 = y + (x + t);
double t_3 = z * ((x + y) / t_2);
double tmp;
if (z <= -7e+80) {
tmp = t_3;
} else if (z <= -1.8e+20) {
tmp = z + a;
} else if (z <= -2.45e-32) {
tmp = z - t_1;
} else if (z <= -1.9e-111) {
tmp = (z + a) - b;
} else if (z <= -3.3e-285) {
tmp = (((y + t) * a) - (y * b)) / t_2;
} else if (z <= 1.3e+95) {
tmp = a - t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / (x + (y + t))) t_2 = y + (x + t) t_3 = z * ((x + y) / t_2) tmp = 0 if z <= -7e+80: tmp = t_3 elif z <= -1.8e+20: tmp = z + a elif z <= -2.45e-32: tmp = z - t_1 elif z <= -1.9e-111: tmp = (z + a) - b elif z <= -3.3e-285: tmp = (((y + t) * a) - (y * b)) / t_2 elif z <= 1.3e+95: tmp = a - t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / Float64(x + Float64(y + t)))) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z * Float64(Float64(x + y) / t_2)) tmp = 0.0 if (z <= -7e+80) tmp = t_3; elseif (z <= -1.8e+20) tmp = Float64(z + a); elseif (z <= -2.45e-32) tmp = Float64(z - t_1); elseif (z <= -1.9e-111) tmp = Float64(Float64(z + a) - b); elseif (z <= -3.3e-285) tmp = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / t_2); elseif (z <= 1.3e+95) tmp = Float64(a - t_1); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / (x + (y + t))); t_2 = y + (x + t); t_3 = z * ((x + y) / t_2); tmp = 0.0; if (z <= -7e+80) tmp = t_3; elseif (z <= -1.8e+20) tmp = z + a; elseif (z <= -2.45e-32) tmp = z - t_1; elseif (z <= -1.9e-111) tmp = (z + a) - b; elseif (z <= -3.3e-285) tmp = (((y + t) * a) - (y * b)) / t_2; elseif (z <= 1.3e+95) tmp = a - t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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, -7e+80], t$95$3, If[LessEqual[z, -1.8e+20], N[(z + a), $MachinePrecision], If[LessEqual[z, -2.45e-32], N[(z - t$95$1), $MachinePrecision], If[LessEqual[z, -1.9e-111], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, -3.3e-285], N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1.3e+95], N[(a - t$95$1), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{x + \left(y + t\right)}\\
t_2 := y + \left(x + t\right)\\
t_3 := z \cdot \frac{x + y}{t\_2}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+80}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{+20}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-32}:\\
\;\;\;\;z - t\_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-111}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-285}:\\
\;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{t\_2}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+95}:\\
\;\;\;\;a - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -6.99999999999999987e80 or 1.29999999999999995e95 < z Initial program 38.6%
Taylor expanded in z around inf 28.5%
associate-/l*77.4%
+-commutative77.4%
+-commutative77.4%
+-commutative77.4%
associate-+l+77.4%
+-commutative77.4%
Simplified77.4%
if -6.99999999999999987e80 < z < -1.8e20Initial program 51.9%
Taylor expanded in y around inf 69.5%
Taylor expanded in b around 0 88.1%
+-commutative88.1%
Simplified88.1%
if -1.8e20 < z < -2.4499999999999999e-32Initial program 68.1%
div-sub68.0%
fma-define68.0%
+-commutative68.0%
*-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-/l*89.2%
Applied egg-rr89.2%
Taylor expanded in x around inf 76.2%
if -2.4499999999999999e-32 < z < -1.90000000000000011e-111Initial program 41.0%
Taylor expanded in y around inf 94.2%
if -1.90000000000000011e-111 < z < -3.29999999999999985e-285Initial program 82.3%
Taylor expanded in z around 0 81.0%
*-commutative81.0%
Simplified81.0%
if -3.29999999999999985e-285 < z < 1.29999999999999995e95Initial program 70.6%
div-sub70.6%
fma-define70.6%
+-commutative70.6%
*-commutative70.6%
associate-+l+70.6%
+-commutative70.6%
associate-+l+70.6%
+-commutative70.6%
associate-/l*74.7%
Applied egg-rr74.7%
Taylor expanded in t around inf 75.6%
Final simplification78.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (/ (+ x y) (+ y (+ x t))))))
(if (<= z -5e+78)
t_1
(if (<= z -3.9e+19)
(+ z a)
(if (<= z -2.8e-32)
(- z (* y (/ b (+ y t))))
(if (<= z 1.32e+95) (- a (* y (/ b (+ x (+ y t))))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((x + y) / (y + (x + t)));
double tmp;
if (z <= -5e+78) {
tmp = t_1;
} else if (z <= -3.9e+19) {
tmp = z + a;
} else if (z <= -2.8e-32) {
tmp = z - (y * (b / (y + t)));
} else if (z <= 1.32e+95) {
tmp = a - (y * (b / (x + (y + 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 * ((x + y) / (y + (x + t)))
if (z <= (-5d+78)) then
tmp = t_1
else if (z <= (-3.9d+19)) then
tmp = z + a
else if (z <= (-2.8d-32)) then
tmp = z - (y * (b / (y + t)))
else if (z <= 1.32d+95) then
tmp = a - (y * (b / (x + (y + 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 * ((x + y) / (y + (x + t)));
double tmp;
if (z <= -5e+78) {
tmp = t_1;
} else if (z <= -3.9e+19) {
tmp = z + a;
} else if (z <= -2.8e-32) {
tmp = z - (y * (b / (y + t)));
} else if (z <= 1.32e+95) {
tmp = a - (y * (b / (x + (y + t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * ((x + y) / (y + (x + t))) tmp = 0 if z <= -5e+78: tmp = t_1 elif z <= -3.9e+19: tmp = z + a elif z <= -2.8e-32: tmp = z - (y * (b / (y + t))) elif z <= 1.32e+95: tmp = a - (y * (b / (x + (y + t)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))) tmp = 0.0 if (z <= -5e+78) tmp = t_1; elseif (z <= -3.9e+19) tmp = Float64(z + a); elseif (z <= -2.8e-32) tmp = Float64(z - Float64(y * Float64(b / Float64(y + t)))); elseif (z <= 1.32e+95) tmp = Float64(a - Float64(y * Float64(b / Float64(x + Float64(y + t))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * ((x + y) / (y + (x + t))); tmp = 0.0; if (z <= -5e+78) tmp = t_1; elseif (z <= -3.9e+19) tmp = z + a; elseif (z <= -2.8e-32) tmp = z - (y * (b / (y + t))); elseif (z <= 1.32e+95) tmp = a - (y * (b / (x + (y + t)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+78], t$95$1, If[LessEqual[z, -3.9e+19], N[(z + a), $MachinePrecision], If[LessEqual[z, -2.8e-32], N[(z - N[(y * N[(b / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.32e+95], N[(a - N[(y * N[(b / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{+19}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-32}:\\
\;\;\;\;z - y \cdot \frac{b}{y + t}\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{+95}:\\
\;\;\;\;a - y \cdot \frac{b}{x + \left(y + t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.99999999999999984e78 or 1.32e95 < z Initial program 38.6%
Taylor expanded in z around inf 28.5%
associate-/l*77.4%
+-commutative77.4%
+-commutative77.4%
+-commutative77.4%
associate-+l+77.4%
+-commutative77.4%
Simplified77.4%
if -4.99999999999999984e78 < z < -3.9e19Initial program 51.9%
Taylor expanded in y around inf 69.5%
Taylor expanded in b around 0 88.1%
+-commutative88.1%
Simplified88.1%
if -3.9e19 < z < -2.7999999999999999e-32Initial program 68.1%
div-sub68.0%
fma-define68.0%
+-commutative68.0%
*-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-/l*89.2%
Applied egg-rr89.2%
Taylor expanded in x around inf 76.2%
Taylor expanded in x around 0 44.5%
*-commutative20.5%
+-commutative20.5%
associate-/l*39.9%
+-commutative39.9%
Simplified63.9%
if -2.7999999999999999e-32 < z < 1.32e95Initial program 70.0%
div-sub70.0%
fma-define70.0%
+-commutative70.0%
*-commutative70.0%
associate-+l+69.9%
+-commutative69.9%
associate-+l+69.9%
+-commutative69.9%
associate-/l*71.4%
Applied egg-rr71.4%
Taylor expanded in t around inf 73.9%
Final simplification75.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (/ (+ x y) (+ y (+ x t))))) (t_2 (* y (/ b (+ x (+ y t))))))
(if (<= z -1.5e+80)
t_1
(if (<= z -1.02e+20)
(+ z a)
(if (<= z -2.15e-32) (- z t_2) (if (<= z 1.32e+95) (- a t_2) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((x + y) / (y + (x + t)));
double t_2 = y * (b / (x + (y + t)));
double tmp;
if (z <= -1.5e+80) {
tmp = t_1;
} else if (z <= -1.02e+20) {
tmp = z + a;
} else if (z <= -2.15e-32) {
tmp = z - t_2;
} else if (z <= 1.32e+95) {
tmp = a - t_2;
} 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 * ((x + y) / (y + (x + t)))
t_2 = y * (b / (x + (y + t)))
if (z <= (-1.5d+80)) then
tmp = t_1
else if (z <= (-1.02d+20)) then
tmp = z + a
else if (z <= (-2.15d-32)) then
tmp = z - t_2
else if (z <= 1.32d+95) then
tmp = a - t_2
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 * ((x + y) / (y + (x + t)));
double t_2 = y * (b / (x + (y + t)));
double tmp;
if (z <= -1.5e+80) {
tmp = t_1;
} else if (z <= -1.02e+20) {
tmp = z + a;
} else if (z <= -2.15e-32) {
tmp = z - t_2;
} else if (z <= 1.32e+95) {
tmp = a - t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * ((x + y) / (y + (x + t))) t_2 = y * (b / (x + (y + t))) tmp = 0 if z <= -1.5e+80: tmp = t_1 elif z <= -1.02e+20: tmp = z + a elif z <= -2.15e-32: tmp = z - t_2 elif z <= 1.32e+95: tmp = a - t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))) t_2 = Float64(y * Float64(b / Float64(x + Float64(y + t)))) tmp = 0.0 if (z <= -1.5e+80) tmp = t_1; elseif (z <= -1.02e+20) tmp = Float64(z + a); elseif (z <= -2.15e-32) tmp = Float64(z - t_2); elseif (z <= 1.32e+95) tmp = Float64(a - t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * ((x + y) / (y + (x + t))); t_2 = y * (b / (x + (y + t))); tmp = 0.0; if (z <= -1.5e+80) tmp = t_1; elseif (z <= -1.02e+20) tmp = z + a; elseif (z <= -2.15e-32) tmp = z - t_2; elseif (z <= 1.32e+95) tmp = a - t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+80], t$95$1, If[LessEqual[z, -1.02e+20], N[(z + a), $MachinePrecision], If[LessEqual[z, -2.15e-32], N[(z - t$95$2), $MachinePrecision], If[LessEqual[z, 1.32e+95], N[(a - t$95$2), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\
t_2 := y \cdot \frac{b}{x + \left(y + t\right)}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+20}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-32}:\\
\;\;\;\;z - t\_2\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{+95}:\\
\;\;\;\;a - t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.49999999999999993e80 or 1.32e95 < z Initial program 38.6%
Taylor expanded in z around inf 28.5%
associate-/l*77.4%
+-commutative77.4%
+-commutative77.4%
+-commutative77.4%
associate-+l+77.4%
+-commutative77.4%
Simplified77.4%
if -1.49999999999999993e80 < z < -1.02e20Initial program 51.9%
Taylor expanded in y around inf 69.5%
Taylor expanded in b around 0 88.1%
+-commutative88.1%
Simplified88.1%
if -1.02e20 < z < -2.14999999999999995e-32Initial program 68.1%
div-sub68.0%
fma-define68.0%
+-commutative68.0%
*-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+l+68.0%
+-commutative68.0%
associate-/l*89.2%
Applied egg-rr89.2%
Taylor expanded in x around inf 76.2%
if -2.14999999999999995e-32 < z < 1.32e95Initial program 70.0%
div-sub70.0%
fma-define70.0%
+-commutative70.0%
*-commutative70.0%
associate-+l+69.9%
+-commutative69.9%
associate-+l+69.9%
+-commutative69.9%
associate-/l*71.4%
Applied egg-rr71.4%
Taylor expanded in t around inf 73.9%
Final simplification75.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (- a (* y (/ b (+ y t))))))
(if (<= t -2.8e+139)
t_2
(if (<= t -2.2e-48)
t_1
(if (<= t -1.62e-180) (+ z a) (if (<= t 9e+115) 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 * (b / (y + t)));
double tmp;
if (t <= -2.8e+139) {
tmp = t_2;
} else if (t <= -2.2e-48) {
tmp = t_1;
} else if (t <= -1.62e-180) {
tmp = z + a;
} else if (t <= 9e+115) {
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 * (b / (y + t)))
if (t <= (-2.8d+139)) then
tmp = t_2
else if (t <= (-2.2d-48)) then
tmp = t_1
else if (t <= (-1.62d-180)) then
tmp = z + a
else if (t <= 9d+115) 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 * (b / (y + t)));
double tmp;
if (t <= -2.8e+139) {
tmp = t_2;
} else if (t <= -2.2e-48) {
tmp = t_1;
} else if (t <= -1.62e-180) {
tmp = z + a;
} else if (t <= 9e+115) {
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 * (b / (y + t))) tmp = 0 if t <= -2.8e+139: tmp = t_2 elif t <= -2.2e-48: tmp = t_1 elif t <= -1.62e-180: tmp = z + a elif t <= 9e+115: 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(b / Float64(y + t)))) tmp = 0.0 if (t <= -2.8e+139) tmp = t_2; elseif (t <= -2.2e-48) tmp = t_1; elseif (t <= -1.62e-180) tmp = Float64(z + a); elseif (t <= 9e+115) 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 * (b / (y + t))); tmp = 0.0; if (t <= -2.8e+139) tmp = t_2; elseif (t <= -2.2e-48) tmp = t_1; elseif (t <= -1.62e-180) tmp = z + a; elseif (t <= 9e+115) 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[(b / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+139], t$95$2, If[LessEqual[t, -2.2e-48], t$95$1, If[LessEqual[t, -1.62e-180], N[(z + a), $MachinePrecision], If[LessEqual[t, 9e+115], 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{b}{y + t}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+139}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.62 \cdot 10^{-180}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.7999999999999998e139 or 8.99999999999999927e115 < t Initial program 46.4%
div-sub46.3%
fma-define46.4%
+-commutative46.4%
*-commutative46.4%
associate-+l+46.4%
+-commutative46.4%
associate-+l+46.4%
+-commutative46.4%
associate-/l*49.6%
Applied egg-rr49.6%
Taylor expanded in t around inf 68.5%
Taylor expanded in x around 0 62.9%
*-commutative62.9%
+-commutative62.9%
associate-/l*68.3%
+-commutative68.3%
Simplified68.3%
if -2.7999999999999998e139 < t < -2.20000000000000013e-48 or -1.61999999999999996e-180 < t < 8.99999999999999927e115Initial program 60.0%
Taylor expanded in y around inf 66.3%
if -2.20000000000000013e-48 < t < -1.61999999999999996e-180Initial program 72.4%
Taylor expanded in y around inf 50.2%
Taylor expanded in b around 0 66.5%
+-commutative66.5%
Simplified66.5%
Final simplification66.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (- a (* b (/ y t)))))
(if (<= t -1.65e+139)
t_2
(if (<= t -1.2e-48)
t_1
(if (<= t -4.9e-179) (+ z a) (if (<= t 6.8e+116) 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 - (b * (y / t));
double tmp;
if (t <= -1.65e+139) {
tmp = t_2;
} else if (t <= -1.2e-48) {
tmp = t_1;
} else if (t <= -4.9e-179) {
tmp = z + a;
} else if (t <= 6.8e+116) {
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 - (b * (y / t))
if (t <= (-1.65d+139)) then
tmp = t_2
else if (t <= (-1.2d-48)) then
tmp = t_1
else if (t <= (-4.9d-179)) then
tmp = z + a
else if (t <= 6.8d+116) 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 - (b * (y / t));
double tmp;
if (t <= -1.65e+139) {
tmp = t_2;
} else if (t <= -1.2e-48) {
tmp = t_1;
} else if (t <= -4.9e-179) {
tmp = z + a;
} else if (t <= 6.8e+116) {
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 - (b * (y / t)) tmp = 0 if t <= -1.65e+139: tmp = t_2 elif t <= -1.2e-48: tmp = t_1 elif t <= -4.9e-179: tmp = z + a elif t <= 6.8e+116: 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(b * Float64(y / t))) tmp = 0.0 if (t <= -1.65e+139) tmp = t_2; elseif (t <= -1.2e-48) tmp = t_1; elseif (t <= -4.9e-179) tmp = Float64(z + a); elseif (t <= 6.8e+116) 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 - (b * (y / t)); tmp = 0.0; if (t <= -1.65e+139) tmp = t_2; elseif (t <= -1.2e-48) tmp = t_1; elseif (t <= -4.9e-179) tmp = z + a; elseif (t <= 6.8e+116) 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[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+139], t$95$2, If[LessEqual[t, -1.2e-48], t$95$1, If[LessEqual[t, -4.9e-179], N[(z + a), $MachinePrecision], If[LessEqual[t, 6.8e+116], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a - b \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+139}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.9 \cdot 10^{-179}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.6500000000000001e139 or 6.80000000000000046e116 < t Initial program 46.4%
div-sub46.3%
fma-define46.4%
+-commutative46.4%
*-commutative46.4%
associate-+l+46.4%
+-commutative46.4%
associate-+l+46.4%
+-commutative46.4%
associate-/l*49.6%
Applied egg-rr49.6%
Taylor expanded in t around inf 68.5%
Taylor expanded in t around inf 60.0%
associate-/l*65.3%
Simplified65.3%
if -1.6500000000000001e139 < t < -1.2e-48 or -4.8999999999999999e-179 < t < 6.80000000000000046e116Initial program 60.0%
Taylor expanded in y around inf 66.3%
if -1.2e-48 < t < -4.8999999999999999e-179Initial program 72.4%
Taylor expanded in y around inf 50.2%
Taylor expanded in b around 0 66.5%
+-commutative66.5%
Simplified66.5%
Final simplification66.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (* y (/ b (+ x y))))))
(if (<= x -3.6e+188)
t_1
(if (<= x -1.45e-28)
(- (+ z a) b)
(if (<= x 1.6e+49) (+ a (/ (* y (- z b)) (+ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - (y * (b / (x + y)));
double tmp;
if (x <= -3.6e+188) {
tmp = t_1;
} else if (x <= -1.45e-28) {
tmp = (z + a) - b;
} else if (x <= 1.6e+49) {
tmp = a + ((y * (z - b)) / (y + 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 - (y * (b / (x + y)))
if (x <= (-3.6d+188)) then
tmp = t_1
else if (x <= (-1.45d-28)) then
tmp = (z + a) - b
else if (x <= 1.6d+49) then
tmp = a + ((y * (z - b)) / (y + 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 - (y * (b / (x + y)));
double tmp;
if (x <= -3.6e+188) {
tmp = t_1;
} else if (x <= -1.45e-28) {
tmp = (z + a) - b;
} else if (x <= 1.6e+49) {
tmp = a + ((y * (z - b)) / (y + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z - (y * (b / (x + y))) tmp = 0 if x <= -3.6e+188: tmp = t_1 elif x <= -1.45e-28: tmp = (z + a) - b elif x <= 1.6e+49: tmp = a + ((y * (z - b)) / (y + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(y * Float64(b / Float64(x + y)))) tmp = 0.0 if (x <= -3.6e+188) tmp = t_1; elseif (x <= -1.45e-28) tmp = Float64(Float64(z + a) - b); elseif (x <= 1.6e+49) tmp = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(y + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z - (y * (b / (x + y))); tmp = 0.0; if (x <= -3.6e+188) tmp = t_1; elseif (x <= -1.45e-28) tmp = (z + a) - b; elseif (x <= 1.6e+49) tmp = a + ((y * (z - b)) / (y + t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z - N[(y * N[(b / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+188], t$95$1, If[LessEqual[x, -1.45e-28], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[x, 1.6e+49], N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z - y \cdot \frac{b}{x + y}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-28}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+49}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.60000000000000021e188 or 1.60000000000000007e49 < x Initial program 46.8%
div-sub46.8%
fma-define46.9%
+-commutative46.9%
*-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-/l*49.8%
Applied egg-rr49.8%
Taylor expanded in x around inf 70.1%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
Simplified68.9%
if -3.60000000000000021e188 < x < -1.45000000000000006e-28Initial program 49.5%
Taylor expanded in y around inf 67.0%
if -1.45000000000000006e-28 < x < 1.60000000000000007e49Initial program 66.7%
Taylor expanded in x around 0 57.9%
Taylor expanded in a around 0 71.5%
associate--l+71.5%
+-commutative71.5%
*-commutative71.5%
+-commutative71.5%
div-sub71.5%
distribute-lft-out--71.5%
+-commutative71.5%
Simplified71.5%
Final simplification70.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (* y (/ b (+ x y))))))
(if (<= x -3.4e+181)
t_1
(if (<= x -3.55e-71)
(- (+ z a) b)
(if (<= x 1.6e+50) (- a (* y (/ b (+ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - (y * (b / (x + y)));
double tmp;
if (x <= -3.4e+181) {
tmp = t_1;
} else if (x <= -3.55e-71) {
tmp = (z + a) - b;
} else if (x <= 1.6e+50) {
tmp = a - (y * (b / (y + 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 - (y * (b / (x + y)))
if (x <= (-3.4d+181)) then
tmp = t_1
else if (x <= (-3.55d-71)) then
tmp = (z + a) - b
else if (x <= 1.6d+50) then
tmp = a - (y * (b / (y + 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 - (y * (b / (x + y)));
double tmp;
if (x <= -3.4e+181) {
tmp = t_1;
} else if (x <= -3.55e-71) {
tmp = (z + a) - b;
} else if (x <= 1.6e+50) {
tmp = a - (y * (b / (y + t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z - (y * (b / (x + y))) tmp = 0 if x <= -3.4e+181: tmp = t_1 elif x <= -3.55e-71: tmp = (z + a) - b elif x <= 1.6e+50: tmp = a - (y * (b / (y + t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(y * Float64(b / Float64(x + y)))) tmp = 0.0 if (x <= -3.4e+181) tmp = t_1; elseif (x <= -3.55e-71) tmp = Float64(Float64(z + a) - b); elseif (x <= 1.6e+50) tmp = Float64(a - Float64(y * Float64(b / Float64(y + t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z - (y * (b / (x + y))); tmp = 0.0; if (x <= -3.4e+181) tmp = t_1; elseif (x <= -3.55e-71) tmp = (z + a) - b; elseif (x <= 1.6e+50) tmp = a - (y * (b / (y + t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z - N[(y * N[(b / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+181], t$95$1, If[LessEqual[x, -3.55e-71], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[x, 1.6e+50], N[(a - N[(y * N[(b / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z - y \cdot \frac{b}{x + y}\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.55 \cdot 10^{-71}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+50}:\\
\;\;\;\;a - y \cdot \frac{b}{y + t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.40000000000000031e181 or 1.59999999999999991e50 < x Initial program 46.8%
div-sub46.8%
fma-define46.9%
+-commutative46.9%
*-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-+l+46.9%
+-commutative46.9%
associate-/l*49.8%
Applied egg-rr49.8%
Taylor expanded in x around inf 70.1%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
Simplified68.9%
if -3.40000000000000031e181 < x < -3.55000000000000004e-71Initial program 55.5%
Taylor expanded in y around inf 70.2%
if -3.55000000000000004e-71 < x < 1.59999999999999991e50Initial program 65.4%
div-sub65.4%
fma-define65.4%
+-commutative65.4%
*-commutative65.4%
associate-+l+65.4%
+-commutative65.4%
associate-+l+65.4%
+-commutative65.4%
associate-/l*64.7%
Applied egg-rr64.7%
Taylor expanded in t around inf 68.0%
Taylor expanded in x around 0 60.6%
*-commutative60.6%
+-commutative60.6%
associate-/l*66.4%
+-commutative66.4%
Simplified66.4%
Final simplification67.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e-5) (not (<= z 9.5e+38))) (+ z a) (- a b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-5) || !(z <= 9.5e+38)) {
tmp = z + a;
} else {
tmp = a - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.5d-5)) .or. (.not. (z <= 9.5d+38))) then
tmp = z + a
else
tmp = a - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-5) || !(z <= 9.5e+38)) {
tmp = z + a;
} else {
tmp = a - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e-5) or not (z <= 9.5e+38): tmp = z + a else: tmp = a - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e-5) || !(z <= 9.5e+38)) tmp = Float64(z + a); else tmp = Float64(a - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.5e-5) || ~((z <= 9.5e+38))) tmp = z + a; else tmp = a - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e-5], N[Not[LessEqual[z, 9.5e+38]], $MachinePrecision]], N[(z + a), $MachinePrecision], N[(a - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-5} \lor \neg \left(z \leq 9.5 \cdot 10^{+38}\right):\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;a - b\\
\end{array}
\end{array}
if z < -9.5000000000000005e-5 or 9.4999999999999995e38 < z Initial program 43.2%
Taylor expanded in y around inf 56.2%
Taylor expanded in b around 0 60.9%
+-commutative60.9%
Simplified60.9%
if -9.5000000000000005e-5 < z < 9.4999999999999995e38Initial program 70.5%
Taylor expanded in y around inf 60.3%
Taylor expanded in z around 0 59.1%
Final simplification59.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.8e-34) z (if (<= z 1.6e+95) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e-34) {
tmp = z;
} else if (z <= 1.6e+95) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.8d-34)) then
tmp = z
else if (z <= 1.6d+95) then
tmp = a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e-34) {
tmp = z;
} else if (z <= 1.6e+95) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.8e-34: tmp = z elif z <= 1.6e+95: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.8e-34) tmp = z; elseif (z <= 1.6e+95) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.8e-34) tmp = z; elseif (z <= 1.6e+95) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.8e-34], z, If[LessEqual[z, 1.6e+95], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-34}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+95}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -3.8000000000000001e-34 or 1.6e95 < z Initial program 42.2%
Taylor expanded in x around inf 57.7%
if -3.8000000000000001e-34 < z < 1.6e95Initial program 70.0%
Taylor expanded in t around inf 48.9%
Final simplification52.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t 2.25e+197) (- (+ z a) b) a))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 2.25e+197) {
tmp = (z + a) - b;
} 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 <= 2.25d+197) then
tmp = (z + a) - b
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 <= 2.25e+197) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 2.25e+197: tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 2.25e+197) tmp = Float64(Float64(z + a) - b); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 2.25e+197) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 2.25e+197], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.25 \cdot 10^{+197}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < 2.2500000000000001e197Initial program 59.1%
Taylor expanded in y around inf 60.3%
if 2.2500000000000001e197 < t Initial program 44.5%
Taylor expanded in t around inf 74.5%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 8e+256) (+ z a) (- b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 8e+256) {
tmp = z + a;
} else {
tmp = -b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 8d+256) then
tmp = z + a
else
tmp = -b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 8e+256) {
tmp = z + a;
} else {
tmp = -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 8e+256: tmp = z + a else: tmp = -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 8e+256) tmp = Float64(z + a); else tmp = Float64(-b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 8e+256) tmp = z + a; else tmp = -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 8e+256], N[(z + a), $MachinePrecision], (-b)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8 \cdot 10^{+256}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;-b\\
\end{array}
\end{array}
if b < 8.0000000000000002e256Initial program 59.5%
Taylor expanded in y around inf 58.1%
Taylor expanded in b around 0 55.4%
+-commutative55.4%
Simplified55.4%
if 8.0000000000000002e256 < b Initial program 20.9%
Taylor expanded in b around inf 22.9%
mul-1-neg22.9%
associate-/l*67.4%
distribute-rgt-neg-in67.4%
+-commutative67.4%
+-commutative67.4%
associate-+l+67.4%
+-commutative67.4%
Simplified67.4%
Taylor expanded in y around inf 55.5%
neg-mul-155.5%
Simplified55.5%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 57.7%
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 2024039
(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)))