
(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 (+ t (+ y x)))) (fma (/ (+ y x) t_1) z (- (* a (* (/ 1.0 t_1) (+ y t))) (* b (/ y t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
return fma(((y + x) / t_1), z, ((a * ((1.0 / t_1) * (y + t))) - (b * (y / t_1))));
}
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) return fma(Float64(Float64(y + x) / t_1), z, Float64(Float64(a * Float64(Float64(1.0 / t_1) * Float64(y + t))) - Float64(b * Float64(y / t_1)))) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] * z + N[(N[(a * N[(N[(1.0 / t$95$1), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathsf{fma}\left(\frac{y + x}{t\_1}, z, a \cdot \left(\frac{1}{t\_1} \cdot \left(y + t\right)\right) - b \cdot \frac{y}{t\_1}\right)
\end{array}
\end{array}
Initial program 58.9%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified75.1%
+-commutativeN/A
div-subN/A
associate-+l-N/A
associate-*r/N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
Applied egg-rr98.3%
Final simplification98.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
(if (<= t_1 (- INFINITY))
(- (+ z a) b)
(if (<= t_1 4e+293) t_1 (fma (- z b) (* y (/ 1.0 (+ y t))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (z + a) - b;
} else if (t_1 <= 4e+293) {
tmp = t_1;
} else {
tmp = fma((z - b), (y * (1.0 / (y + t))), a);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(z + a) - b); elseif (t_1 <= 4e+293) tmp = t_1; else tmp = fma(Float64(z - b), Float64(y * Float64(1.0 / Float64(y + t))), a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$1, 4e+293], t$95$1, N[(N[(z - b), $MachinePrecision] * N[(y * N[(1.0 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+293}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - b, y \cdot \frac{1}{y + t}, a\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.8%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6478.8%
Simplified78.8%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 3.9999999999999997e293Initial program 99.3%
if 3.9999999999999997e293 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-lft-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f648.8%
Simplified8.8%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f648.8%
Applied egg-rr8.8%
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
inv-powN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f6478.8%
Applied egg-rr78.8%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) (+ y (+ x t))))
(t_2 (- (+ z a) b)))
(if (<= t_1 (- INFINITY)) t_2 (if (<= t_1 5e+279) t_1 t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = (z + a) - b;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 5e+279) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
double t_2 = (z + a) - b;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= 5e+279) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t)) t_2 = (z + a) - b tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= 5e+279: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 5e+279) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t)); t_2 = (z + a) - b; tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= 5e+279) 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[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 5e+279], t$95$1, t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+279}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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 5.0000000000000002e279 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 7.9%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6476.9%
Simplified76.9%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000002e279Initial program 99.3%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (+ (* x (- (/ z t) (/ a t))) (/ (- (* y z) (* y b)) t))))
(t_2 (+ t (+ y x))))
(if (<= t -6.2e+64)
t_1
(if (<= t 4.6e-70)
(+ z (- (/ (* y a) (+ y x)) (* b (/ y (+ y x)))))
(if (<= t 4.5e+157) (+ z (* a (+ (/ y t_2) (/ t t_2)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + ((x * ((z / t) - (a / t))) + (((y * z) - (y * b)) / t));
double t_2 = t + (y + x);
double tmp;
if (t <= -6.2e+64) {
tmp = t_1;
} else if (t <= 4.6e-70) {
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))));
} else if (t <= 4.5e+157) {
tmp = z + (a * ((y / t_2) + (t / 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 = a + ((x * ((z / t) - (a / t))) + (((y * z) - (y * b)) / t))
t_2 = t + (y + x)
if (t <= (-6.2d+64)) then
tmp = t_1
else if (t <= 4.6d-70) then
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))))
else if (t <= 4.5d+157) then
tmp = z + (a * ((y / t_2) + (t / 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 = a + ((x * ((z / t) - (a / t))) + (((y * z) - (y * b)) / t));
double t_2 = t + (y + x);
double tmp;
if (t <= -6.2e+64) {
tmp = t_1;
} else if (t <= 4.6e-70) {
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))));
} else if (t <= 4.5e+157) {
tmp = z + (a * ((y / t_2) + (t / t_2)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + ((x * ((z / t) - (a / t))) + (((y * z) - (y * b)) / t)) t_2 = t + (y + x) tmp = 0 if t <= -6.2e+64: tmp = t_1 elif t <= 4.6e-70: tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x)))) elif t <= 4.5e+157: tmp = z + (a * ((y / t_2) + (t / t_2))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(Float64(x * Float64(Float64(z / t) - Float64(a / t))) + Float64(Float64(Float64(y * z) - Float64(y * b)) / t))) t_2 = Float64(t + Float64(y + x)) tmp = 0.0 if (t <= -6.2e+64) tmp = t_1; elseif (t <= 4.6e-70) tmp = Float64(z + Float64(Float64(Float64(y * a) / Float64(y + x)) - Float64(b * Float64(y / Float64(y + x))))); elseif (t <= 4.5e+157) tmp = Float64(z + Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + ((x * ((z / t) - (a / t))) + (((y * z) - (y * b)) / t)); t_2 = t + (y + x); tmp = 0.0; if (t <= -6.2e+64) tmp = t_1; elseif (t <= 4.6e-70) tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x)))); elseif (t <= 4.5e+157) tmp = z + (a * ((y / t_2) + (t / t_2))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(N[(x * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+64], t$95$1, If[LessEqual[t, 4.6e-70], N[(z + N[(N[(N[(y * a), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+157], N[(z + N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(x \cdot \left(\frac{z}{t} - \frac{a}{t}\right) + \frac{y \cdot z - y \cdot b}{t}\right)\\
t_2 := t + \left(y + x\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-70}:\\
\;\;\;\;z + \left(\frac{y \cdot a}{y + x} - b \cdot \frac{y}{y + x}\right)\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+157}:\\
\;\;\;\;z + a \cdot \left(\frac{y}{t\_2} + \frac{t}{t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.1999999999999998e64 or 4.49999999999999985e157 < t Initial program 50.5%
Taylor expanded in t around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified65.7%
Taylor expanded in x around 0
associate--l+N/A
+-lowering-+.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.5%
Simplified79.5%
if -6.1999999999999998e64 < t < 4.60000000000000001e-70Initial program 63.5%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified66.5%
Taylor expanded in t around 0
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6480.0%
Simplified80.0%
if 4.60000000000000001e-70 < t < 4.49999999999999985e157Initial program 62.5%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified82.3%
Taylor expanded in x around inf
Simplified74.6%
Final simplification78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))))
(if (<= t -4.7e+60)
(+ (* a (/ t (+ x t))) (/ (* x z) (+ x t)))
(if (<= t 1.8e-67)
(+ z (- (/ (* y a) (+ y x)) (* b (/ y (+ y x)))))
(if (<= t 2.2e+160)
(+ z (* a (+ (/ y t_1) (/ t t_1))))
(- a (/ (* y b) t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double tmp;
if (t <= -4.7e+60) {
tmp = (a * (t / (x + t))) + ((x * z) / (x + t));
} else if (t <= 1.8e-67) {
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))));
} else if (t <= 2.2e+160) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = a - ((y * b) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t + (y + x)
if (t <= (-4.7d+60)) then
tmp = (a * (t / (x + t))) + ((x * z) / (x + t))
else if (t <= 1.8d-67) then
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))))
else if (t <= 2.2d+160) then
tmp = z + (a * ((y / t_1) + (t / t_1)))
else
tmp = a - ((y * b) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
double tmp;
if (t <= -4.7e+60) {
tmp = (a * (t / (x + t))) + ((x * z) / (x + t));
} else if (t <= 1.8e-67) {
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))));
} else if (t <= 2.2e+160) {
tmp = z + (a * ((y / t_1) + (t / t_1)));
} else {
tmp = a - ((y * b) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) tmp = 0 if t <= -4.7e+60: tmp = (a * (t / (x + t))) + ((x * z) / (x + t)) elif t <= 1.8e-67: tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x)))) elif t <= 2.2e+160: tmp = z + (a * ((y / t_1) + (t / t_1))) else: tmp = a - ((y * b) / t) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) tmp = 0.0 if (t <= -4.7e+60) tmp = Float64(Float64(a * Float64(t / Float64(x + t))) + Float64(Float64(x * z) / Float64(x + t))); elseif (t <= 1.8e-67) tmp = Float64(z + Float64(Float64(Float64(y * a) / Float64(y + x)) - Float64(b * Float64(y / Float64(y + x))))); elseif (t <= 2.2e+160) tmp = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1)))); else tmp = Float64(a - Float64(Float64(y * b) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (y + x); tmp = 0.0; if (t <= -4.7e+60) tmp = (a * (t / (x + t))) + ((x * z) / (x + t)); elseif (t <= 1.8e-67) tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x)))); elseif (t <= 2.2e+160) tmp = z + (a * ((y / t_1) + (t / t_1))); else tmp = a - ((y * b) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.7e+60], N[(N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-67], N[(z + N[(N[(N[(y * a), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+160], N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;t \leq -4.7 \cdot 10^{+60}:\\
\;\;\;\;a \cdot \frac{t}{x + t} + \frac{x \cdot z}{x + t}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-67}:\\
\;\;\;\;z + \left(\frac{y \cdot a}{y + x} - b \cdot \frac{y}{y + x}\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+160}:\\
\;\;\;\;z + a \cdot \left(\frac{y}{t\_1} + \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\end{array}
\end{array}
if t < -4.6999999999999998e60Initial program 51.7%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified83.7%
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
div-invN/A
div-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr83.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6471.3%
Simplified71.3%
if -4.6999999999999998e60 < t < 1.8e-67Initial program 63.5%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified66.5%
Taylor expanded in t around 0
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6480.0%
Simplified80.0%
if 1.8e-67 < t < 2.19999999999999992e160Initial program 62.5%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified82.3%
Taylor expanded in x around inf
Simplified74.6%
if 2.19999999999999992e160 < t Initial program 49.1%
Taylor expanded in t around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified69.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6472.7%
Simplified72.7%
Final simplification76.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* a (/ t (+ x t))) (/ (* x z) (+ x t)))))
(if (<= t -4.2e+57)
t_1
(if (<= t 120.0) (+ z (- (/ (* y a) (+ y x)) (* b (/ y (+ y x))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * (t / (x + t))) + ((x * z) / (x + t));
double tmp;
if (t <= -4.2e+57) {
tmp = t_1;
} else if (t <= 120.0) {
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a * (t / (x + t))) + ((x * z) / (x + t))
if (t <= (-4.2d+57)) then
tmp = t_1
else if (t <= 120.0d0) then
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * (t / (x + t))) + ((x * z) / (x + t));
double tmp;
if (t <= -4.2e+57) {
tmp = t_1;
} else if (t <= 120.0) {
tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * (t / (x + t))) + ((x * z) / (x + t)) tmp = 0 if t <= -4.2e+57: tmp = t_1 elif t <= 120.0: tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * Float64(t / Float64(x + t))) + Float64(Float64(x * z) / Float64(x + t))) tmp = 0.0 if (t <= -4.2e+57) tmp = t_1; elseif (t <= 120.0) tmp = Float64(z + Float64(Float64(Float64(y * a) / Float64(y + x)) - Float64(b * Float64(y / Float64(y + x))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * (t / (x + t))) + ((x * z) / (x + t)); tmp = 0.0; if (t <= -4.2e+57) tmp = t_1; elseif (t <= 120.0) tmp = z + (((y * a) / (y + x)) - (b * (y / (y + x)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+57], t$95$1, If[LessEqual[t, 120.0], N[(z + N[(N[(N[(y * a), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{t}{x + t} + \frac{x \cdot z}{x + t}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 120:\\
\;\;\;\;z + \left(\frac{y \cdot a}{y + x} - b \cdot \frac{y}{y + x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.19999999999999982e57 or 120 < t Initial program 53.5%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified83.5%
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
div-invN/A
div-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr83.4%
Taylor expanded in y around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6468.7%
Simplified68.7%
if -4.19999999999999982e57 < t < 120Initial program 63.9%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified67.4%
Taylor expanded in t around 0
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6478.3%
Simplified78.3%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.85e-168)
t_1
(if (<= y 9.4e-77)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 6.5e-9) (* (/ (+ y x) (+ t (+ y x))) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.85e-168) {
tmp = t_1;
} else if (y <= 9.4e-77) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 6.5e-9) {
tmp = ((y + x) / (t + (y + x))) * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2.85d-168)) then
tmp = t_1
else if (y <= 9.4d-77) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 6.5d-9) then
tmp = ((y + x) / (t + (y + x))) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.85e-168) {
tmp = t_1;
} else if (y <= 9.4e-77) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 6.5e-9) {
tmp = ((y + x) / (t + (y + x))) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.85e-168: tmp = t_1 elif y <= 9.4e-77: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 6.5e-9: tmp = ((y + x) / (t + (y + x))) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.85e-168) tmp = t_1; elseif (y <= 9.4e-77) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 6.5e-9) tmp = Float64(Float64(Float64(y + x) / Float64(t + Float64(y + x))) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.85e-168) tmp = t_1; elseif (y <= 9.4e-77) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 6.5e-9) tmp = ((y + x) / (t + (y + x))) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.85e-168], t$95$1, If[LessEqual[y, 9.4e-77], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-9], N[(N[(N[(y + x), $MachinePrecision] / N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.85 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{-77}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{y + x}{t + \left(y + x\right)} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.85000000000000004e-168 or 6.5000000000000003e-9 < y Initial program 46.9%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6467.0%
Simplified67.0%
if -2.85000000000000004e-168 < y < 9.3999999999999998e-77Initial program 79.8%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6466.2%
Simplified66.2%
if 9.3999999999999998e-77 < y < 6.5000000000000003e-9Initial program 60.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6448.6%
Simplified48.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f6467.2%
Applied egg-rr67.2%
Final simplification66.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -5.9e+78)
t_1
(if (<= y 3.5e-15) (+ (* a (/ t (+ x t))) (/ (* x z) (+ x t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -5.9e+78) {
tmp = t_1;
} else if (y <= 3.5e-15) {
tmp = (a * (t / (x + t))) + ((x * z) / (x + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-5.9d+78)) then
tmp = t_1
else if (y <= 3.5d-15) then
tmp = (a * (t / (x + t))) + ((x * z) / (x + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -5.9e+78) {
tmp = t_1;
} else if (y <= 3.5e-15) {
tmp = (a * (t / (x + t))) + ((x * z) / (x + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -5.9e+78: tmp = t_1 elif y <= 3.5e-15: tmp = (a * (t / (x + t))) + ((x * z) / (x + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -5.9e+78) tmp = t_1; elseif (y <= 3.5e-15) tmp = Float64(Float64(a * Float64(t / Float64(x + t))) + Float64(Float64(x * z) / Float64(x + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -5.9e+78) tmp = t_1; elseif (y <= 3.5e-15) tmp = (a * (t / (x + t))) + ((x * z) / (x + t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5.9e+78], t$95$1, If[LessEqual[y, 3.5e-15], N[(N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -5.9 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-15}:\\
\;\;\;\;a \cdot \frac{t}{x + t} + \frac{x \cdot z}{x + t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.9e78 or 3.5000000000000001e-15 < y Initial program 36.4%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6473.4%
Simplified73.4%
if -5.9e78 < y < 3.5000000000000001e-15Initial program 74.4%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified87.8%
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
div-invN/A
div-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr87.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6467.0%
Simplified67.0%
Final simplification69.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.85e+61) (+ a (/ (* z (+ y x)) t)) (if (<= t 1.92e+121) (- (+ z a) b) (* a (/ t (+ x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.85e+61) {
tmp = a + ((z * (y + x)) / t);
} else if (t <= 1.92e+121) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + 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 (t <= (-1.85d+61)) then
tmp = a + ((z * (y + x)) / t)
else if (t <= 1.92d+121) then
tmp = (z + a) - b
else
tmp = a * (t / (x + 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 (t <= -1.85e+61) {
tmp = a + ((z * (y + x)) / t);
} else if (t <= 1.92e+121) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.85e+61: tmp = a + ((z * (y + x)) / t) elif t <= 1.92e+121: tmp = (z + a) - b else: tmp = a * (t / (x + t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.85e+61) tmp = Float64(a + Float64(Float64(z * Float64(y + x)) / t)); elseif (t <= 1.92e+121) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(t / Float64(x + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.85e+61) tmp = a + ((z * (y + x)) / t); elseif (t <= 1.92e+121) tmp = (z + a) - b; else tmp = a * (t / (x + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.85e+61], N[(a + N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.92e+121], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+61}:\\
\;\;\;\;a + \frac{z \cdot \left(y + x\right)}{t}\\
\mathbf{elif}\;t \leq 1.92 \cdot 10^{+121}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\
\end{array}
\end{array}
if t < -1.85000000000000001e61Initial program 51.7%
Taylor expanded in t around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified62.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6468.5%
Simplified68.5%
if -1.85000000000000001e61 < t < 1.92000000000000001e121Initial program 63.9%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6462.7%
Simplified62.7%
if 1.92000000000000001e121 < t Initial program 49.7%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified86.2%
+-commutativeN/A
div-subN/A
associate-+l-N/A
associate-*r/N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
Applied egg-rr97.6%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6468.4%
Simplified68.4%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6466.5%
Simplified66.5%
Final simplification64.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.1e+161) (- a (/ (* y b) t)) (if (<= t 9.6e+118) (- (+ z a) b) (* a (/ t (+ x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.1e+161) {
tmp = a - ((y * b) / t);
} else if (t <= 9.6e+118) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + 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 (t <= (-2.1d+161)) then
tmp = a - ((y * b) / t)
else if (t <= 9.6d+118) then
tmp = (z + a) - b
else
tmp = a * (t / (x + 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 (t <= -2.1e+161) {
tmp = a - ((y * b) / t);
} else if (t <= 9.6e+118) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.1e+161: tmp = a - ((y * b) / t) elif t <= 9.6e+118: tmp = (z + a) - b else: tmp = a * (t / (x + t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.1e+161) tmp = Float64(a - Float64(Float64(y * b) / t)); elseif (t <= 9.6e+118) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(t / Float64(x + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.1e+161) tmp = a - ((y * b) / t); elseif (t <= 9.6e+118) tmp = (z + a) - b; else tmp = a * (t / (x + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.1e+161], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+118], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+161}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+118}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\
\end{array}
\end{array}
if t < -2.1e161Initial program 47.0%
Taylor expanded in t around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified62.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8%
Simplified71.8%
if -2.1e161 < t < 9.6e118Initial program 63.9%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6462.0%
Simplified62.0%
if 9.6e118 < t Initial program 49.7%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified86.2%
+-commutativeN/A
div-subN/A
associate-+l-N/A
associate-*r/N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
Applied egg-rr97.6%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6468.4%
Simplified68.4%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6466.5%
Simplified66.5%
Final simplification64.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (/ t (+ x t))))) (if (<= t -1.4e+163) t_1 (if (<= t 1.16e+120) (- (+ z a) b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t / (x + t));
double tmp;
if (t <= -1.4e+163) {
tmp = t_1;
} else if (t <= 1.16e+120) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t / (x + t))
if (t <= (-1.4d+163)) then
tmp = t_1
else if (t <= 1.16d+120) then
tmp = (z + a) - b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t / (x + t));
double tmp;
if (t <= -1.4e+163) {
tmp = t_1;
} else if (t <= 1.16e+120) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t / (x + t)) tmp = 0 if t <= -1.4e+163: tmp = t_1 elif t <= 1.16e+120: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t / Float64(x + t))) tmp = 0.0 if (t <= -1.4e+163) tmp = t_1; elseif (t <= 1.16e+120) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t / (x + t)); tmp = 0.0; if (t <= -1.4e+163) tmp = t_1; elseif (t <= 1.16e+120) 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[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e+163], t$95$1, If[LessEqual[t, 1.16e+120], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{t}{x + t}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+120}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.40000000000000007e163 or 1.16000000000000003e120 < t Initial program 48.6%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified86.2%
+-commutativeN/A
div-subN/A
associate-+l-N/A
associate-*r/N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
Applied egg-rr96.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f6468.6%
Simplified68.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6467.5%
Simplified67.5%
if -1.40000000000000007e163 < t < 1.16000000000000003e120Initial program 63.9%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6462.0%
Simplified62.0%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6e+157) a (if (<= t 1.2e+120) (- (+ z a) b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6e+157) {
tmp = a;
} else if (t <= 1.2e+120) {
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 <= (-6d+157)) then
tmp = a
else if (t <= 1.2d+120) 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 <= -6e+157) {
tmp = a;
} else if (t <= 1.2e+120) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6e+157: tmp = a elif t <= 1.2e+120: tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6e+157) tmp = a; elseif (t <= 1.2e+120) 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 <= -6e+157) tmp = a; elseif (t <= 1.2e+120) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6e+157], a, If[LessEqual[t, 1.2e+120], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+157}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+120}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -6.00000000000000021e157 or 1.2e120 < t Initial program 48.6%
Taylor expanded in t around inf
Simplified59.9%
if -6.00000000000000021e157 < t < 1.2e120Initial program 63.9%
Taylor expanded in y around inf
--lowering--.f64N/A
+-lowering-+.f6462.0%
Simplified62.0%
Final simplification61.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.2e+98) z (if (<= x 4.2e+47) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.2e+98) {
tmp = z;
} else if (x <= 4.2e+47) {
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 (x <= (-2.2d+98)) then
tmp = z
else if (x <= 4.2d+47) 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 (x <= -2.2e+98) {
tmp = z;
} else if (x <= 4.2e+47) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.2e+98: tmp = z elif x <= 4.2e+47: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.2e+98) tmp = z; elseif (x <= 4.2e+47) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.2e+98) tmp = z; elseif (x <= 4.2e+47) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.2e+98], z, If[LessEqual[x, 4.2e+47], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+98}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+47}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -2.20000000000000009e98 or 4.2e47 < x Initial program 48.9%
Taylor expanded in x around inf
Simplified46.4%
if -2.20000000000000009e98 < x < 4.2e47Initial program 65.0%
Taylor expanded in t around inf
Simplified50.2%
(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 58.9%
Taylor expanded in t around inf
Simplified35.9%
(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 2024145
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ 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)))