
(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 (* a (+ y t)))
(t_2 (+ x (+ y t)))
(t_3 (+ y (+ x t)))
(t_4 (/ (- (+ (* (+ x y) z) t_1) (* y b)) t_3))
(t_5 (* z (+ (/ x t_3) (/ y t_3)))))
(if (<= t_4 (- INFINITY))
(- t_5 (* b (/ y t_2)))
(if (<= t_4 2e+245) (/ (- (fma (+ x y) z t_1) (* y b)) t_2) (+ a t_5)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = x + (y + t);
double t_3 = y + (x + t);
double t_4 = ((((x + y) * z) + t_1) - (y * b)) / t_3;
double t_5 = z * ((x / t_3) + (y / t_3));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5 - (b * (y / t_2));
} else if (t_4 <= 2e+245) {
tmp = (fma((x + y), z, t_1) - (y * b)) / t_2;
} else {
tmp = a + t_5;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(x + Float64(y + t)) t_3 = Float64(y + Float64(x + t)) t_4 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + t_1) - Float64(y * b)) / t_3) t_5 = Float64(z * Float64(Float64(x / t_3) + Float64(y / t_3))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(t_5 - Float64(b * Float64(y / t_2))); elseif (t_4 <= 2e+245) tmp = Float64(Float64(fma(Float64(x + y), z, t_1) - Float64(y * b)) / t_2); else tmp = Float64(a + t_5); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(N[(x / t$95$3), $MachinePrecision] + N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(t$95$5 - N[(b * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+245], N[(N[(N[(N[(x + y), $MachinePrecision] * z + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(a + t$95$5), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := x + \left(y + t\right)\\
t_3 := y + \left(x + t\right)\\
t_4 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{t\_3}\\
t_5 := z \cdot \left(\frac{x}{t\_3} + \frac{y}{t\_3}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5 - b \cdot \frac{y}{t\_2}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, t\_1\right) - y \cdot b}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;a + t\_5\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.3%
Taylor expanded in z around 0 50.8%
associate--l+50.8%
associate-+r+50.8%
associate-+r+50.8%
div-sub50.8%
*-commutative50.8%
associate-+r+50.8%
Simplified50.8%
Taylor expanded in a around 0 52.5%
associate-*r/52.5%
mul-1-neg52.5%
distribute-lft-neg-out52.5%
+-commutative52.5%
associate-*r/75.7%
associate-+r+75.7%
+-commutative75.7%
Simplified75.7%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000009e245Initial program 99.7%
fma-def99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
Simplified99.7%
if 2.00000000000000009e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.5%
Taylor expanded in z around 0 26.6%
associate--l+26.6%
associate-+r+26.6%
associate-+r+26.6%
div-sub26.6%
*-commutative26.6%
associate-+r+26.6%
Simplified26.6%
Taylor expanded in t around inf 67.6%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1)))
(if (<= t_2 (- INFINITY))
(- (+ z a) b)
(if (<= t_2 2e+245) t_2 (+ 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 t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (z + a) - b;
} else if (t_2 <= 2e+245) {
tmp = t_2;
} else {
tmp = a + (z * ((x / t_1) + (y / t_1)));
}
return tmp;
}
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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (z + a) - b;
} else if (t_2 <= 2e+245) {
tmp = t_2;
} 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) t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = (z + a) - b elif t_2 <= 2e+245: tmp = t_2 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)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(z + a) - b); elseif (t_2 <= 2e+245) tmp = t_2; 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); t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = (z + a) - b; elseif (t_2 <= 2e+245) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$2, 2e+245], t$95$2, 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)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a + z \cdot \left(\frac{x}{t\_1} + \frac{y}{t\_1}\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.3%
Taylor expanded in y around inf 71.5%
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.00000000000000009e245Initial program 99.7%
if 2.00000000000000009e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.5%
Taylor expanded in z around 0 26.6%
associate--l+26.6%
associate-+r+26.6%
associate-+r+26.6%
div-sub26.6%
*-commutative26.6%
associate-+r+26.6%
Simplified26.6%
Taylor expanded in t around inf 67.6%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1))
(t_3 (* z (+ (/ x t_1) (/ y t_1)))))
(if (<= t_2 (- INFINITY))
(- t_3 (* b (/ y (+ x (+ y t)))))
(if (<= t_2 2e+245) t_2 (+ 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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = z * ((x / t_1) + (y / t_1));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3 - (b * (y / (x + (y + t))));
} else if (t_2 <= 2e+245) {
tmp = t_2;
} else {
tmp = a + t_3;
}
return tmp;
}
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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = z * ((x / t_1) + (y / t_1));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3 - (b * (y / (x + (y + t))));
} else if (t_2 <= 2e+245) {
tmp = t_2;
} else {
tmp = a + t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1 t_3 = z * ((x / t_1) + (y / t_1)) tmp = 0 if t_2 <= -math.inf: tmp = t_3 - (b * (y / (x + (y + t)))) elif t_2 <= 2e+245: tmp = t_2 else: tmp = a + t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) t_3 = Float64(z * Float64(Float64(x / t_1) + Float64(y / t_1))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(t_3 - Float64(b * Float64(y / Float64(x + Float64(y + t))))); elseif (t_2 <= 2e+245) tmp = t_2; else tmp = Float64(a + t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1; t_3 = z * ((x / t_1) + (y / t_1)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3 - (b * (y / (x + (y + t)))); elseif (t_2 <= 2e+245) tmp = t_2; else tmp = a + 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[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$3 - N[(b * N[(y / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+245], t$95$2, N[(a + t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
t_3 := z \cdot \left(\frac{x}{t\_1} + \frac{y}{t\_1}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3 - b \cdot \frac{y}{x + \left(y + t\right)}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a + t\_3\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.3%
Taylor expanded in z around 0 50.8%
associate--l+50.8%
associate-+r+50.8%
associate-+r+50.8%
div-sub50.8%
*-commutative50.8%
associate-+r+50.8%
Simplified50.8%
Taylor expanded in a around 0 52.5%
associate-*r/52.5%
mul-1-neg52.5%
distribute-lft-neg-out52.5%
+-commutative52.5%
associate-*r/75.7%
associate-+r+75.7%
+-commutative75.7%
Simplified75.7%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000009e245Initial program 99.7%
if 2.00000000000000009e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.5%
Taylor expanded in z around 0 26.6%
associate--l+26.6%
associate-+r+26.6%
associate-+r+26.6%
div-sub26.6%
*-commutative26.6%
associate-+r+26.6%
Simplified26.6%
Taylor expanded in t around inf 67.6%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ a (/ (* y (- z b)) (+ y t)))))
(if (<= y -1.3e+16)
t_1
(if (<= y -1.66e-65)
(/ (* y t_1) (+ y (+ x t)))
(if (<= y -1.52e-174)
t_2
(if (<= y -4.2e-231)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 1.9e-111)
(+ z (/ a (/ (+ x t) t)))
(if (<= y 7e+84) t_2 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 = a + ((y * (z - b)) / (y + t));
double tmp;
if (y <= -1.3e+16) {
tmp = t_1;
} else if (y <= -1.66e-65) {
tmp = (y * t_1) / (y + (x + t));
} else if (y <= -1.52e-174) {
tmp = t_2;
} else if (y <= -4.2e-231) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 1.9e-111) {
tmp = z + (a / ((x + t) / t));
} else if (y <= 7e+84) {
tmp = 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 + a) - b
t_2 = a + ((y * (z - b)) / (y + t))
if (y <= (-1.3d+16)) then
tmp = t_1
else if (y <= (-1.66d-65)) then
tmp = (y * t_1) / (y + (x + t))
else if (y <= (-1.52d-174)) then
tmp = t_2
else if (y <= (-4.2d-231)) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 1.9d-111) then
tmp = z + (a / ((x + t) / t))
else if (y <= 7d+84) then
tmp = 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 + a) - b;
double t_2 = a + ((y * (z - b)) / (y + t));
double tmp;
if (y <= -1.3e+16) {
tmp = t_1;
} else if (y <= -1.66e-65) {
tmp = (y * t_1) / (y + (x + t));
} else if (y <= -1.52e-174) {
tmp = t_2;
} else if (y <= -4.2e-231) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 1.9e-111) {
tmp = z + (a / ((x + t) / t));
} else if (y <= 7e+84) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a + ((y * (z - b)) / (y + t)) tmp = 0 if y <= -1.3e+16: tmp = t_1 elif y <= -1.66e-65: tmp = (y * t_1) / (y + (x + t)) elif y <= -1.52e-174: tmp = t_2 elif y <= -4.2e-231: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 1.9e-111: tmp = z + (a / ((x + t) / t)) elif y <= 7e+84: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(y + t))) tmp = 0.0 if (y <= -1.3e+16) tmp = t_1; elseif (y <= -1.66e-65) tmp = Float64(Float64(y * t_1) / Float64(y + Float64(x + t))); elseif (y <= -1.52e-174) tmp = t_2; elseif (y <= -4.2e-231) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 1.9e-111) tmp = Float64(z + Float64(a / Float64(Float64(x + t) / t))); elseif (y <= 7e+84) tmp = t_2; 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 = a + ((y * (z - b)) / (y + t)); tmp = 0.0; if (y <= -1.3e+16) tmp = t_1; elseif (y <= -1.66e-65) tmp = (y * t_1) / (y + (x + t)); elseif (y <= -1.52e-174) tmp = t_2; elseif (y <= -4.2e-231) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 1.9e-111) tmp = z + (a / ((x + t) / t)); elseif (y <= 7e+84) tmp = t_2; 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[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+16], t$95$1, If[LessEqual[y, -1.66e-65], N[(N[(y * t$95$1), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.52e-174], t$95$2, If[LessEqual[y, -4.2e-231], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-111], N[(z + N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+84], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a + \frac{y \cdot \left(z - b\right)}{y + t}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.66 \cdot 10^{-65}:\\
\;\;\;\;\frac{y \cdot t\_1}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq -1.52 \cdot 10^{-174}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-111}:\\
\;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.3e16 or 6.9999999999999998e84 < y Initial program 40.7%
Taylor expanded in y around inf 76.6%
if -1.3e16 < y < -1.6599999999999999e-65Initial program 93.7%
Taylor expanded in y around inf 77.9%
if -1.6599999999999999e-65 < y < -1.52e-174 or 1.90000000000000011e-111 < y < 6.9999999999999998e84Initial program 78.1%
Taylor expanded in x around 0 61.9%
Taylor expanded in a around 0 72.1%
associate--l+72.1%
*-commutative72.1%
div-sub72.1%
distribute-lft-out--72.1%
+-commutative72.1%
Simplified72.1%
if -1.52e-174 < y < -4.19999999999999978e-231Initial program 90.6%
Taylor expanded in y around 0 80.2%
if -4.19999999999999978e-231 < y < 1.90000000000000011e-111Initial program 71.5%
Taylor expanded in z around 0 87.4%
associate--l+87.4%
associate-+r+87.4%
associate-+r+87.4%
div-sub87.4%
*-commutative87.4%
associate-+r+87.4%
Simplified87.4%
Taylor expanded in y around 0 83.0%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in x around inf 77.1%
Final simplification75.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (- (+ z a) b)))
(if (<= y -3.8e+16)
t_2
(if (<= y -5.2e-27)
(/ (* y t_2) t_1)
(if (<= y -1.8e-178)
(+ a (* z (+ (/ x t_1) (/ y t_1))))
(if (<= y 1.25e-111)
(+ z (/ a (/ (+ x t) t)))
(if (<= y 1.16e+82) (+ a (/ (* y (- z b)) (+ y t))) 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 <= -3.8e+16) {
tmp = t_2;
} else if (y <= -5.2e-27) {
tmp = (y * t_2) / t_1;
} else if (y <= -1.8e-178) {
tmp = a + (z * ((x / t_1) + (y / t_1)));
} else if (y <= 1.25e-111) {
tmp = z + (a / ((x + t) / t));
} else if (y <= 1.16e+82) {
tmp = a + ((y * (z - b)) / (y + t));
} 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 <= (-3.8d+16)) then
tmp = t_2
else if (y <= (-5.2d-27)) then
tmp = (y * t_2) / t_1
else if (y <= (-1.8d-178)) then
tmp = a + (z * ((x / t_1) + (y / t_1)))
else if (y <= 1.25d-111) then
tmp = z + (a / ((x + t) / t))
else if (y <= 1.16d+82) then
tmp = a + ((y * (z - b)) / (y + t))
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 <= -3.8e+16) {
tmp = t_2;
} else if (y <= -5.2e-27) {
tmp = (y * t_2) / t_1;
} else if (y <= -1.8e-178) {
tmp = a + (z * ((x / t_1) + (y / t_1)));
} else if (y <= 1.25e-111) {
tmp = z + (a / ((x + t) / t));
} else if (y <= 1.16e+82) {
tmp = a + ((y * (z - b)) / (y + t));
} 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 <= -3.8e+16: tmp = t_2 elif y <= -5.2e-27: tmp = (y * t_2) / t_1 elif y <= -1.8e-178: tmp = a + (z * ((x / t_1) + (y / t_1))) elif y <= 1.25e-111: tmp = z + (a / ((x + t) / t)) elif y <= 1.16e+82: tmp = a + ((y * (z - b)) / (y + t)) 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 <= -3.8e+16) tmp = t_2; elseif (y <= -5.2e-27) tmp = Float64(Float64(y * t_2) / t_1); elseif (y <= -1.8e-178) tmp = Float64(a + Float64(z * Float64(Float64(x / t_1) + Float64(y / t_1)))); elseif (y <= 1.25e-111) tmp = Float64(z + Float64(a / Float64(Float64(x + t) / t))); elseif (y <= 1.16e+82) tmp = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(y + t))); 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 <= -3.8e+16) tmp = t_2; elseif (y <= -5.2e-27) tmp = (y * t_2) / t_1; elseif (y <= -1.8e-178) tmp = a + (z * ((x / t_1) + (y / t_1))); elseif (y <= 1.25e-111) tmp = z + (a / ((x + t) / t)); elseif (y <= 1.16e+82) tmp = a + ((y * (z - b)) / (y + t)); 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, -3.8e+16], t$95$2, If[LessEqual[y, -5.2e-27], N[(N[(y * t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, -1.8e-178], N[(a + N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-111], N[(z + N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.16e+82], N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $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 -3.8 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{y \cdot t\_2}{t\_1}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-178}:\\
\;\;\;\;a + z \cdot \left(\frac{x}{t\_1} + \frac{y}{t\_1}\right)\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-111}:\\
\;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{+82}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.8e16 or 1.16e82 < y Initial program 40.7%
Taylor expanded in y around inf 76.6%
if -3.8e16 < y < -5.20000000000000034e-27Initial program 99.9%
Taylor expanded in y around inf 90.9%
if -5.20000000000000034e-27 < y < -1.79999999999999997e-178Initial program 75.9%
Taylor expanded in z around 0 87.7%
associate--l+87.7%
associate-+r+87.7%
associate-+r+87.7%
div-sub87.7%
*-commutative87.7%
associate-+r+87.7%
Simplified87.7%
Taylor expanded in t around inf 70.3%
if -1.79999999999999997e-178 < y < 1.2500000000000001e-111Initial program 74.1%
Taylor expanded in z around 0 87.8%
associate--l+87.8%
associate-+r+87.8%
associate-+r+87.8%
div-sub87.8%
*-commutative87.8%
associate-+r+87.8%
Simplified87.8%
Taylor expanded in y around 0 82.7%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in x around inf 77.1%
if 1.2500000000000001e-111 < y < 1.16e82Initial program 80.7%
Taylor expanded in x around 0 63.3%
Taylor expanded in a around 0 72.7%
associate--l+72.7%
*-commutative72.7%
div-sub72.7%
distribute-lft-out--72.7%
+-commutative72.7%
Simplified72.7%
Final simplification76.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (/ a (/ (+ x t) t))) (t_3 (+ z t_2)))
(if (<= y -0.0085)
t_1
(if (<= y -2.65e-65)
(/ (* b (- y)) (+ y (+ x t)))
(if (<= y -2.5e-112)
t_3
(if (<= y -1.5e-176) t_2 (if (<= y 5.2e-75) t_3 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 = a / ((x + t) / t);
double t_3 = z + t_2;
double tmp;
if (y <= -0.0085) {
tmp = t_1;
} else if (y <= -2.65e-65) {
tmp = (b * -y) / (y + (x + t));
} else if (y <= -2.5e-112) {
tmp = t_3;
} else if (y <= -1.5e-176) {
tmp = t_2;
} else if (y <= 5.2e-75) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = a / ((x + t) / t)
t_3 = z + t_2
if (y <= (-0.0085d0)) then
tmp = t_1
else if (y <= (-2.65d-65)) then
tmp = (b * -y) / (y + (x + t))
else if (y <= (-2.5d-112)) then
tmp = t_3
else if (y <= (-1.5d-176)) then
tmp = t_2
else if (y <= 5.2d-75) then
tmp = t_3
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 = a / ((x + t) / t);
double t_3 = z + t_2;
double tmp;
if (y <= -0.0085) {
tmp = t_1;
} else if (y <= -2.65e-65) {
tmp = (b * -y) / (y + (x + t));
} else if (y <= -2.5e-112) {
tmp = t_3;
} else if (y <= -1.5e-176) {
tmp = t_2;
} else if (y <= 5.2e-75) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a / ((x + t) / t) t_3 = z + t_2 tmp = 0 if y <= -0.0085: tmp = t_1 elif y <= -2.65e-65: tmp = (b * -y) / (y + (x + t)) elif y <= -2.5e-112: tmp = t_3 elif y <= -1.5e-176: tmp = t_2 elif y <= 5.2e-75: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a / Float64(Float64(x + t) / t)) t_3 = Float64(z + t_2) tmp = 0.0 if (y <= -0.0085) tmp = t_1; elseif (y <= -2.65e-65) tmp = Float64(Float64(b * Float64(-y)) / Float64(y + Float64(x + t))); elseif (y <= -2.5e-112) tmp = t_3; elseif (y <= -1.5e-176) tmp = t_2; elseif (y <= 5.2e-75) tmp = t_3; 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 = a / ((x + t) / t); t_3 = z + t_2; tmp = 0.0; if (y <= -0.0085) tmp = t_1; elseif (y <= -2.65e-65) tmp = (b * -y) / (y + (x + t)); elseif (y <= -2.5e-112) tmp = t_3; elseif (y <= -1.5e-176) tmp = t_2; elseif (y <= 5.2e-75) tmp = t_3; 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[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + t$95$2), $MachinePrecision]}, If[LessEqual[y, -0.0085], t$95$1, If[LessEqual[y, -2.65e-65], N[(N[(b * (-y)), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-112], t$95$3, If[LessEqual[y, -1.5e-176], t$95$2, If[LessEqual[y, 5.2e-75], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := \frac{a}{\frac{x + t}{t}}\\
t_3 := z + t\_2\\
\mathbf{if}\;y \leq -0.0085:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.65 \cdot 10^{-65}:\\
\;\;\;\;\frac{b \cdot \left(-y\right)}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-112}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-176}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -0.0085000000000000006 or 5.2e-75 < y Initial program 50.5%
Taylor expanded in y around inf 72.0%
if -0.0085000000000000006 < y < -2.65000000000000019e-65Initial program 91.6%
Taylor expanded in b around inf 58.1%
associate-*r*58.1%
mul-1-neg58.1%
Simplified58.1%
if -2.65000000000000019e-65 < y < -2.50000000000000022e-112 or -1.5e-176 < y < 5.2e-75Initial program 75.4%
Taylor expanded in z around 0 89.9%
associate--l+89.9%
associate-+r+89.9%
associate-+r+89.9%
div-sub89.9%
*-commutative89.9%
associate-+r+89.9%
Simplified89.9%
Taylor expanded in y around 0 84.6%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in x around inf 73.3%
if -2.50000000000000022e-112 < y < -1.5e-176Initial program 80.5%
Taylor expanded in a around inf 41.8%
associate-/l*56.3%
associate-+r+56.3%
Simplified56.3%
Taylor expanded in y around 0 42.0%
associate-/l*56.6%
+-commutative56.6%
Simplified56.6%
Final simplification70.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (/ a (/ (+ x t) t)))))
(if (<= y -0.0085)
t_1
(if (<= y -2.65e-65)
(/ (* b (- y)) (+ y (+ x t)))
(if (<= y -2.8e-112)
t_2
(if (<= y -2.4e-173)
(+ a (* y (- (/ z t) (/ b t))))
(if (<= y 1.8e-73) t_2 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 = z + (a / ((x + t) / t));
double tmp;
if (y <= -0.0085) {
tmp = t_1;
} else if (y <= -2.65e-65) {
tmp = (b * -y) / (y + (x + t));
} else if (y <= -2.8e-112) {
tmp = t_2;
} else if (y <= -2.4e-173) {
tmp = a + (y * ((z / t) - (b / t)));
} else if (y <= 1.8e-73) {
tmp = 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 + a) - b
t_2 = z + (a / ((x + t) / t))
if (y <= (-0.0085d0)) then
tmp = t_1
else if (y <= (-2.65d-65)) then
tmp = (b * -y) / (y + (x + t))
else if (y <= (-2.8d-112)) then
tmp = t_2
else if (y <= (-2.4d-173)) then
tmp = a + (y * ((z / t) - (b / t)))
else if (y <= 1.8d-73) then
tmp = 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 + a) - b;
double t_2 = z + (a / ((x + t) / t));
double tmp;
if (y <= -0.0085) {
tmp = t_1;
} else if (y <= -2.65e-65) {
tmp = (b * -y) / (y + (x + t));
} else if (y <= -2.8e-112) {
tmp = t_2;
} else if (y <= -2.4e-173) {
tmp = a + (y * ((z / t) - (b / t)));
} else if (y <= 1.8e-73) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z + (a / ((x + t) / t)) tmp = 0 if y <= -0.0085: tmp = t_1 elif y <= -2.65e-65: tmp = (b * -y) / (y + (x + t)) elif y <= -2.8e-112: tmp = t_2 elif y <= -2.4e-173: tmp = a + (y * ((z / t) - (b / t))) elif y <= 1.8e-73: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(z + Float64(a / Float64(Float64(x + t) / t))) tmp = 0.0 if (y <= -0.0085) tmp = t_1; elseif (y <= -2.65e-65) tmp = Float64(Float64(b * Float64(-y)) / Float64(y + Float64(x + t))); elseif (y <= -2.8e-112) tmp = t_2; elseif (y <= -2.4e-173) tmp = Float64(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))); elseif (y <= 1.8e-73) tmp = t_2; 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 = z + (a / ((x + t) / t)); tmp = 0.0; if (y <= -0.0085) tmp = t_1; elseif (y <= -2.65e-65) tmp = (b * -y) / (y + (x + t)); elseif (y <= -2.8e-112) tmp = t_2; elseif (y <= -2.4e-173) tmp = a + (y * ((z / t) - (b / t))); elseif (y <= 1.8e-73) tmp = t_2; 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[(z + N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.0085], t$95$1, If[LessEqual[y, -2.65e-65], N[(N[(b * (-y)), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-112], t$95$2, If[LessEqual[y, -2.4e-173], N[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-73], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + \frac{a}{\frac{x + t}{t}}\\
\mathbf{if}\;y \leq -0.0085:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.65 \cdot 10^{-65}:\\
\;\;\;\;\frac{b \cdot \left(-y\right)}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-112}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-173}:\\
\;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -0.0085000000000000006 or 1.8e-73 < y Initial program 50.5%
Taylor expanded in y around inf 72.0%
if -0.0085000000000000006 < y < -2.65000000000000019e-65Initial program 91.6%
Taylor expanded in b around inf 58.1%
associate-*r*58.1%
mul-1-neg58.1%
Simplified58.1%
if -2.65000000000000019e-65 < y < -2.80000000000000023e-112 or -2.40000000000000017e-173 < y < 1.8e-73Initial program 75.7%
Taylor expanded in z around 0 90.0%
associate--l+90.0%
associate-+r+90.0%
associate-+r+90.0%
div-sub90.0%
*-commutative90.0%
associate-+r+90.0%
Simplified90.0%
Taylor expanded in y around 0 84.7%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in x around inf 72.4%
if -2.80000000000000023e-112 < y < -2.40000000000000017e-173Initial program 79.4%
Taylor expanded in x around 0 64.3%
Taylor expanded in y around 0 63.9%
Final simplification70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (/ (* y (- z b)) (+ y t)))) (t_2 (- (+ z a) b)))
(if (<= y -2.2e+52)
t_2
(if (<= y -1.5e-176)
t_1
(if (<= y 3.3e-112)
(+ z (/ a (/ (+ x t) t)))
(if (<= y 9.4e+80) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + ((y * (z - b)) / (y + t));
double t_2 = (z + a) - b;
double tmp;
if (y <= -2.2e+52) {
tmp = t_2;
} else if (y <= -1.5e-176) {
tmp = t_1;
} else if (y <= 3.3e-112) {
tmp = z + (a / ((x + t) / t));
} else if (y <= 9.4e+80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + ((y * (z - b)) / (y + t))
t_2 = (z + a) - b
if (y <= (-2.2d+52)) then
tmp = t_2
else if (y <= (-1.5d-176)) then
tmp = t_1
else if (y <= 3.3d-112) then
tmp = z + (a / ((x + t) / t))
else if (y <= 9.4d+80) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + ((y * (z - b)) / (y + t));
double t_2 = (z + a) - b;
double tmp;
if (y <= -2.2e+52) {
tmp = t_2;
} else if (y <= -1.5e-176) {
tmp = t_1;
} else if (y <= 3.3e-112) {
tmp = z + (a / ((x + t) / t));
} else if (y <= 9.4e+80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + ((y * (z - b)) / (y + t)) t_2 = (z + a) - b tmp = 0 if y <= -2.2e+52: tmp = t_2 elif y <= -1.5e-176: tmp = t_1 elif y <= 3.3e-112: tmp = z + (a / ((x + t) / t)) elif y <= 9.4e+80: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(y + t))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.2e+52) tmp = t_2; elseif (y <= -1.5e-176) tmp = t_1; elseif (y <= 3.3e-112) tmp = Float64(z + Float64(a / Float64(Float64(x + t) / t))); elseif (y <= 9.4e+80) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + ((y * (z - b)) / (y + t)); t_2 = (z + a) - b; tmp = 0.0; if (y <= -2.2e+52) tmp = t_2; elseif (y <= -1.5e-176) tmp = t_1; elseif (y <= 3.3e-112) tmp = z + (a / ((x + t) / t)); elseif (y <= 9.4e+80) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.2e+52], t$95$2, If[LessEqual[y, -1.5e-176], t$95$1, If[LessEqual[y, 3.3e-112], N[(z + N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.4e+80], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \frac{y \cdot \left(z - b\right)}{y + t}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-112}:\\
\;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.2e52 or 9.40000000000000019e80 < y Initial program 38.6%
Taylor expanded in y around inf 77.0%
if -2.2e52 < y < -1.5e-176 or 3.3000000000000001e-112 < y < 9.40000000000000019e80Initial program 81.4%
Taylor expanded in x around 0 57.8%
Taylor expanded in a around 0 66.6%
associate--l+66.6%
*-commutative66.6%
div-sub66.6%
distribute-lft-out--66.6%
+-commutative66.6%
Simplified66.6%
if -1.5e-176 < y < 3.3000000000000001e-112Initial program 74.1%
Taylor expanded in z around 0 87.8%
associate--l+87.8%
associate-+r+87.8%
associate-+r+87.8%
div-sub87.8%
*-commutative87.8%
associate-+r+87.8%
Simplified87.8%
Taylor expanded in y around 0 82.7%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in x around inf 77.1%
Final simplification73.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e-24) (not (<= y 1.8e-73))) (- (+ z a) b) (+ z (/ a (/ (+ x t) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e-24) || !(y <= 1.8e-73)) {
tmp = (z + a) - b;
} else {
tmp = z + (a / ((x + t) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-8d-24)) .or. (.not. (y <= 1.8d-73))) then
tmp = (z + a) - b
else
tmp = z + (a / ((x + t) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e-24) || !(y <= 1.8e-73)) {
tmp = (z + a) - b;
} else {
tmp = z + (a / ((x + t) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e-24) or not (y <= 1.8e-73): tmp = (z + a) - b else: tmp = z + (a / ((x + t) / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e-24) || !(y <= 1.8e-73)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z + Float64(a / Float64(Float64(x + t) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8e-24) || ~((y <= 1.8e-73))) tmp = (z + a) - b; else tmp = z + (a / ((x + t) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e-24], N[Not[LessEqual[y, 1.8e-73]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-24} \lor \neg \left(y \leq 1.8 \cdot 10^{-73}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\
\end{array}
\end{array}
if y < -7.99999999999999939e-24 or 1.8e-73 < y Initial program 52.5%
Taylor expanded in y around inf 70.6%
if -7.99999999999999939e-24 < y < 1.8e-73Initial program 76.7%
Taylor expanded in z around 0 88.7%
associate--l+88.7%
associate-+r+88.7%
associate-+r+88.7%
div-sub88.7%
*-commutative88.7%
associate-+r+88.7%
Simplified88.7%
Taylor expanded in y around 0 78.6%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in x around inf 66.9%
Final simplification69.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.02e+132) a (if (<= a 1200000000000.0) (- z b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.02e+132) {
tmp = a;
} else if (a <= 1200000000000.0) {
tmp = z - 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 (a <= (-1.02d+132)) then
tmp = a
else if (a <= 1200000000000.0d0) then
tmp = z - 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 (a <= -1.02e+132) {
tmp = a;
} else if (a <= 1200000000000.0) {
tmp = z - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.02e+132: tmp = a elif a <= 1200000000000.0: tmp = z - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.02e+132) tmp = a; elseif (a <= 1200000000000.0) tmp = Float64(z - b); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.02e+132) tmp = a; elseif (a <= 1200000000000.0) tmp = z - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.02e+132], a, If[LessEqual[a, 1200000000000.0], N[(z - b), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+132}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 1200000000000:\\
\;\;\;\;z - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.0200000000000001e132 or 1.2e12 < a Initial program 47.3%
Taylor expanded in t around inf 55.4%
if -1.0200000000000001e132 < a < 1.2e12Initial program 72.1%
Taylor expanded in x around 0 46.0%
Taylor expanded in a around 0 33.0%
Taylor expanded in y around inf 46.6%
Final simplification49.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.1e+79) (/ a (/ (+ x t) t)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.1e+79) {
tmp = a / ((x + t) / t);
} else {
tmp = (z + 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 (t <= (-2.1d+79)) then
tmp = a / ((x + t) / t)
else
tmp = (z + 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 (t <= -2.1e+79) {
tmp = a / ((x + t) / t);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.1e+79: tmp = a / ((x + t) / t) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.1e+79) tmp = Float64(a / Float64(Float64(x + t) / t)); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.1e+79) tmp = a / ((x + t) / t); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.1e+79], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+79}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -2.10000000000000008e79Initial program 58.2%
Taylor expanded in a around inf 36.6%
associate-/l*59.8%
associate-+r+59.8%
Simplified59.8%
Taylor expanded in y around 0 36.5%
associate-/l*57.7%
+-commutative57.7%
Simplified57.7%
if -2.10000000000000008e79 < t Initial program 64.1%
Taylor expanded in y around inf 60.0%
Final simplification59.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.2e+127) a (if (<= a 2.5e+14) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.2e+127) {
tmp = a;
} else if (a <= 2.5e+14) {
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 (a <= (-7.2d+127)) then
tmp = a
else if (a <= 2.5d+14) 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 (a <= -7.2e+127) {
tmp = a;
} else if (a <= 2.5e+14) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.2e+127: tmp = a elif a <= 2.5e+14: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.2e+127) tmp = a; elseif (a <= 2.5e+14) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.2e+127) tmp = a; elseif (a <= 2.5e+14) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.2e+127], a, If[LessEqual[a, 2.5e+14], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+127}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+14}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -7.19999999999999958e127 or 2.5e14 < a Initial program 47.3%
Taylor expanded in t around inf 55.4%
if -7.19999999999999958e127 < a < 2.5e14Initial program 72.1%
Taylor expanded in x around inf 41.1%
Final simplification46.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3e+184) a (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3e+184) {
tmp = a;
} else {
tmp = (z + 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 (t <= (-3d+184)) then
tmp = a
else
tmp = (z + 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 (t <= -3e+184) {
tmp = a;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3e+184: tmp = a else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3e+184) tmp = a; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3e+184) tmp = a; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3e+184], a, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+184}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -2.99999999999999986e184Initial program 43.7%
Taylor expanded in t around inf 56.4%
if -2.99999999999999986e184 < t Initial program 65.5%
Taylor expanded in y around inf 59.4%
Final simplification59.1%
(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 63.0%
Taylor expanded in t around inf 31.5%
Final simplification31.5%
(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 2024027
(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)))