
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ y (+ x t)))) (- (fma z (/ (+ y x) t_1) (* a (/ (+ y t) t_1))) (* y (/ b t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
return fma(z, ((y + x) / t_1), (a * ((y + t) / t_1))) - (y * (b / t_1));
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) return Float64(fma(z, Float64(Float64(y + x) / t_1), Float64(a * Float64(Float64(y + t) / t_1))) - Float64(y * Float64(b / t_1))) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, N[(N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathsf{fma}\left(z, \frac{y + x}{t\_1}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1}
\end{array}
\end{array}
Initial program 61.9%
Taylor expanded in b around 0 61.9%
mul-1-neg61.9%
+-commutative61.9%
unsub-neg61.9%
+-commutative61.9%
associate-/l*74.0%
fma-define74.0%
+-commutative74.0%
associate-+r+74.0%
associate-/l*86.6%
associate-+r+86.6%
Simplified97.1%
Final simplification97.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ y t)))
(t_2 (+ y (+ x t)))
(t_3 (/ (- (+ (* z (+ y x)) t_1) (* y b)) t_2))
(t_4 (* y (/ b t_2))))
(if (<= t_3 (- INFINITY))
(- (+ a (* y (/ z (+ y t)))) t_4)
(if (<= t_3 1e+299)
(/ (- (fma (+ y x) z t_1) (* y b)) (+ x (+ y t)))
(- (+ z (* a (/ y (+ y x)))) t_4)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y + t);
double t_2 = y + (x + t);
double t_3 = (((z * (y + x)) + t_1) - (y * b)) / t_2;
double t_4 = y * (b / t_2);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = (a + (y * (z / (y + t)))) - t_4;
} else if (t_3 <= 1e+299) {
tmp = (fma((y + x), z, t_1) - (y * b)) / (x + (y + t));
} else {
tmp = (z + (a * (y / (y + x)))) - t_4;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y + t)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + t_1) - Float64(y * b)) / t_2) t_4 = Float64(y * Float64(b / t_2)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - t_4); elseif (t_3 <= 1e+299) tmp = Float64(Float64(fma(Float64(y + x), z, t_1) - Float64(y * b)) / Float64(x + Float64(y + t))); else tmp = Float64(Float64(z + Float64(a * Float64(y / Float64(y + x)))) - t_4); 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[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(y * N[(b / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision], If[LessEqual[t$95$3, 1e+299], N[(N[(N[(N[(y + x), $MachinePrecision] * z + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(z \cdot \left(y + x\right) + t\_1\right) - y \cdot b}{t\_2}\\
t_4 := y \cdot \frac{b}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\left(a + y \cdot \frac{z}{y + t}\right) - t\_4\\
\mathbf{elif}\;t\_3 \leq 10^{+299}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_1\right) - y \cdot b}{x + \left(y + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - t\_4\\
\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 b around 0 6.3%
mul-1-neg6.3%
+-commutative6.3%
unsub-neg6.3%
+-commutative6.3%
associate-/l*45.0%
fma-define45.0%
+-commutative45.0%
associate-+r+45.0%
associate-/l*70.5%
associate-+r+70.5%
Simplified99.9%
Taylor expanded in x around 0 46.4%
associate-/l*83.3%
+-commutative83.3%
Simplified83.3%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.0000000000000001e299Initial program 99.8%
fma-define99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Simplified99.8%
if 1.0000000000000001e299 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.0%
Taylor expanded in b around 0 5.0%
mul-1-neg5.0%
+-commutative5.0%
unsub-neg5.0%
+-commutative5.0%
associate-/l*26.6%
fma-define26.6%
+-commutative26.6%
associate-+r+26.6%
associate-/l*63.2%
associate-+r+63.2%
Simplified99.9%
Taylor expanded in t around 0 50.2%
+-commutative50.2%
associate-/l*78.2%
+-commutative78.2%
Simplified78.2%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) t_1))
(t_3 (* y (/ b t_1))))
(if (<= t_2 (- INFINITY))
(- (+ a (* y (/ z (+ y t)))) t_3)
(if (<= t_2 1e+299) t_2 (- (+ z (* a (/ y (+ y x)))) 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 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = y * (b / t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (a + (y * (z / (y + t)))) - t_3;
} else if (t_2 <= 1e+299) {
tmp = t_2;
} else {
tmp = (z + (a * (y / (y + x)))) - 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 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = y * (b / t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (a + (y * (z / (y + t)))) - t_3;
} else if (t_2 <= 1e+299) {
tmp = t_2;
} else {
tmp = (z + (a * (y / (y + x)))) - t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1 t_3 = y * (b / t_1) tmp = 0 if t_2 <= -math.inf: tmp = (a + (y * (z / (y + t)))) - t_3 elif t_2 <= 1e+299: tmp = t_2 else: tmp = (z + (a * (y / (y + x)))) - 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(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) t_3 = Float64(y * Float64(b / t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - t_3); elseif (t_2 <= 1e+299) tmp = t_2; else tmp = Float64(Float64(z + Float64(a * Float64(y / Float64(y + x)))) - t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1; t_3 = y * (b / t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = (a + (y * (z / (y + t)))) - t_3; elseif (t_2 <= 1e+299) tmp = t_2; else tmp = (z + (a * (y / (y + x)))) - 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[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 1e+299], t$95$2, N[(N[(z + N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
t_3 := y \cdot \frac{b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(a + y \cdot \frac{z}{y + t}\right) - t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{+299}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - 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 b around 0 6.3%
mul-1-neg6.3%
+-commutative6.3%
unsub-neg6.3%
+-commutative6.3%
associate-/l*45.0%
fma-define45.0%
+-commutative45.0%
associate-+r+45.0%
associate-/l*70.5%
associate-+r+70.5%
Simplified99.9%
Taylor expanded in x around 0 46.4%
associate-/l*83.3%
+-commutative83.3%
Simplified83.3%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.0000000000000001e299Initial program 99.8%
if 1.0000000000000001e299 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.0%
Taylor expanded in b around 0 5.0%
mul-1-neg5.0%
+-commutative5.0%
unsub-neg5.0%
+-commutative5.0%
associate-/l*26.6%
fma-define26.6%
+-commutative26.6%
associate-+r+26.6%
associate-/l*63.2%
associate-+r+63.2%
Simplified99.9%
Taylor expanded in t around 0 50.2%
+-commutative50.2%
associate-/l*78.2%
+-commutative78.2%
Simplified78.2%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= x -8.2e+173)
(* z (/ (+ y x) t_1))
(if (or (<= x -1.1e+76) (and (not (<= x -6.5e+38)) (<= x 1.5e+65)))
(- (+ a (* y (/ z (+ y t)))) (* b (/ y (+ y t))))
(- z (* y (/ b t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (x <= -8.2e+173) {
tmp = z * ((y + x) / t_1);
} else if ((x <= -1.1e+76) || (!(x <= -6.5e+38) && (x <= 1.5e+65))) {
tmp = (a + (y * (z / (y + t)))) - (b * (y / (y + t)));
} else {
tmp = z - (y * (b / t_1));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (x <= (-8.2d+173)) then
tmp = z * ((y + x) / t_1)
else if ((x <= (-1.1d+76)) .or. (.not. (x <= (-6.5d+38))) .and. (x <= 1.5d+65)) then
tmp = (a + (y * (z / (y + t)))) - (b * (y / (y + t)))
else
tmp = z - (y * (b / t_1))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (x <= -8.2e+173) {
tmp = z * ((y + x) / t_1);
} else if ((x <= -1.1e+76) || (!(x <= -6.5e+38) && (x <= 1.5e+65))) {
tmp = (a + (y * (z / (y + t)))) - (b * (y / (y + t)));
} else {
tmp = z - (y * (b / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if x <= -8.2e+173: tmp = z * ((y + x) / t_1) elif (x <= -1.1e+76) or (not (x <= -6.5e+38) and (x <= 1.5e+65)): tmp = (a + (y * (z / (y + t)))) - (b * (y / (y + t))) else: tmp = z - (y * (b / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (x <= -8.2e+173) tmp = Float64(z * Float64(Float64(y + x) / t_1)); elseif ((x <= -1.1e+76) || (!(x <= -6.5e+38) && (x <= 1.5e+65))) tmp = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - Float64(b * Float64(y / Float64(y + t)))); else tmp = Float64(z - Float64(y * Float64(b / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (x <= -8.2e+173) tmp = z * ((y + x) / t_1); elseif ((x <= -1.1e+76) || (~((x <= -6.5e+38)) && (x <= 1.5e+65))) tmp = (a + (y * (z / (y + t)))) - (b * (y / (y + t))); else tmp = z - (y * (b / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e+173], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.1e+76], And[N[Not[LessEqual[x, -6.5e+38]], $MachinePrecision], LessEqual[x, 1.5e+65]]], N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+173}:\\
\;\;\;\;z \cdot \frac{y + x}{t\_1}\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{+76} \lor \neg \left(x \leq -6.5 \cdot 10^{+38}\right) \land x \leq 1.5 \cdot 10^{+65}:\\
\;\;\;\;\left(a + y \cdot \frac{z}{y + t}\right) - b \cdot \frac{y}{y + t}\\
\mathbf{else}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_1}\\
\end{array}
\end{array}
if x < -8.19999999999999951e173Initial program 50.6%
Taylor expanded in z around inf 29.6%
associate-/l*70.6%
+-commutative70.6%
associate-+r+70.6%
Simplified70.6%
if -8.19999999999999951e173 < x < -1.1e76 or -6.5e38 < x < 1.5000000000000001e65Initial program 67.8%
Taylor expanded in b around 0 67.8%
mul-1-neg67.8%
+-commutative67.8%
unsub-neg67.8%
+-commutative67.8%
associate-/l*74.7%
fma-define74.7%
+-commutative74.7%
associate-+r+74.7%
associate-/l*86.1%
associate-+r+86.1%
Simplified96.5%
Taylor expanded in x around 0 74.2%
associate-/l*86.1%
+-commutative86.1%
Simplified86.1%
Taylor expanded in x around 0 73.9%
associate-/l*87.8%
+-commutative87.8%
Simplified87.8%
if -1.1e76 < x < -6.5e38 or 1.5000000000000001e65 < x Initial program 51.3%
Taylor expanded in b around 0 51.3%
mul-1-neg51.3%
+-commutative51.3%
unsub-neg51.3%
+-commutative51.3%
associate-/l*69.2%
fma-define69.2%
+-commutative69.2%
associate-+r+69.2%
associate-/l*85.9%
associate-+r+85.9%
Simplified98.4%
Taylor expanded in x around inf 65.6%
Final simplification80.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ a (* y (/ z (+ y t)))) (* b (/ y (+ y t)))))
(t_2 (+ y (+ x t))))
(if (<= x -4e+173)
(* z (/ (+ y x) t_2))
(if (<= x -2.25e+74)
t_1
(if (<= x -6.5e+38)
(/ (- (+ (* z (+ y x)) (* y a)) (* y b)) (+ y x))
(if (<= x 1.35e+65) t_1 (- z (* y (/ b t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + (y * (z / (y + t)))) - (b * (y / (y + t)));
double t_2 = y + (x + t);
double tmp;
if (x <= -4e+173) {
tmp = z * ((y + x) / t_2);
} else if (x <= -2.25e+74) {
tmp = t_1;
} else if (x <= -6.5e+38) {
tmp = (((z * (y + x)) + (y * a)) - (y * b)) / (y + x);
} else if (x <= 1.35e+65) {
tmp = t_1;
} else {
tmp = z - (y * (b / 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 / (y + t)))) - (b * (y / (y + t)))
t_2 = y + (x + t)
if (x <= (-4d+173)) then
tmp = z * ((y + x) / t_2)
else if (x <= (-2.25d+74)) then
tmp = t_1
else if (x <= (-6.5d+38)) then
tmp = (((z * (y + x)) + (y * a)) - (y * b)) / (y + x)
else if (x <= 1.35d+65) then
tmp = t_1
else
tmp = z - (y * (b / 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 / (y + t)))) - (b * (y / (y + t)));
double t_2 = y + (x + t);
double tmp;
if (x <= -4e+173) {
tmp = z * ((y + x) / t_2);
} else if (x <= -2.25e+74) {
tmp = t_1;
} else if (x <= -6.5e+38) {
tmp = (((z * (y + x)) + (y * a)) - (y * b)) / (y + x);
} else if (x <= 1.35e+65) {
tmp = t_1;
} else {
tmp = z - (y * (b / t_2));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + (y * (z / (y + t)))) - (b * (y / (y + t))) t_2 = y + (x + t) tmp = 0 if x <= -4e+173: tmp = z * ((y + x) / t_2) elif x <= -2.25e+74: tmp = t_1 elif x <= -6.5e+38: tmp = (((z * (y + x)) + (y * a)) - (y * b)) / (y + x) elif x <= 1.35e+65: tmp = t_1 else: tmp = z - (y * (b / t_2)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - Float64(b * Float64(y / Float64(y + t)))) t_2 = Float64(y + Float64(x + t)) tmp = 0.0 if (x <= -4e+173) tmp = Float64(z * Float64(Float64(y + x) / t_2)); elseif (x <= -2.25e+74) tmp = t_1; elseif (x <= -6.5e+38) tmp = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(y * a)) - Float64(y * b)) / Float64(y + x)); elseif (x <= 1.35e+65) tmp = t_1; else tmp = Float64(z - Float64(y * Float64(b / t_2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + (y * (z / (y + t)))) - (b * (y / (y + t))); t_2 = y + (x + t); tmp = 0.0; if (x <= -4e+173) tmp = z * ((y + x) / t_2); elseif (x <= -2.25e+74) tmp = t_1; elseif (x <= -6.5e+38) tmp = (((z * (y + x)) + (y * a)) - (y * b)) / (y + x); elseif (x <= 1.35e+65) tmp = t_1; else tmp = z - (y * (b / t_2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+173], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.25e+74], t$95$1, If[LessEqual[x, -6.5e+38], N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+65], t$95$1, N[(z - N[(y * N[(b / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + y \cdot \frac{z}{y + t}\right) - b \cdot \frac{y}{y + t}\\
t_2 := y + \left(x + t\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+173}:\\
\;\;\;\;z \cdot \frac{y + x}{t\_2}\\
\mathbf{elif}\;x \leq -2.25 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{+38}:\\
\;\;\;\;\frac{\left(z \cdot \left(y + x\right) + y \cdot a\right) - y \cdot b}{y + x}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_2}\\
\end{array}
\end{array}
if x < -4.0000000000000001e173Initial program 50.6%
Taylor expanded in z around inf 29.6%
associate-/l*70.6%
+-commutative70.6%
associate-+r+70.6%
Simplified70.6%
if -4.0000000000000001e173 < x < -2.25e74 or -6.5e38 < x < 1.35000000000000009e65Initial program 67.8%
Taylor expanded in b around 0 67.8%
mul-1-neg67.8%
+-commutative67.8%
unsub-neg67.8%
+-commutative67.8%
associate-/l*74.7%
fma-define74.7%
+-commutative74.7%
associate-+r+74.7%
associate-/l*86.1%
associate-+r+86.1%
Simplified96.5%
Taylor expanded in x around 0 74.2%
associate-/l*86.1%
+-commutative86.1%
Simplified86.1%
Taylor expanded in x around 0 73.9%
associate-/l*87.8%
+-commutative87.8%
Simplified87.8%
if -2.25e74 < x < -6.5e38Initial program 92.6%
Taylor expanded in t around 0 86.7%
if 1.35000000000000009e65 < x Initial program 41.6%
Taylor expanded in b around 0 41.6%
mul-1-neg41.6%
+-commutative41.6%
unsub-neg41.6%
+-commutative41.6%
associate-/l*62.0%
fma-define62.0%
+-commutative62.0%
associate-+r+62.0%
associate-/l*82.6%
associate-+r+82.6%
Simplified98.1%
Taylor expanded in x around inf 64.5%
Final simplification81.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -3.1e-41)
t_1
(if (<= y 2.5e-115)
(/ (+ (* t a) (* z x)) (+ x t))
(if (or (<= y 8.2e-55) (not (<= y 1.9e-6)))
t_1
(/ (- (* t a) (* y b)) (+ y (+ x t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -3.1e-41) {
tmp = t_1;
} else if (y <= 2.5e-115) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if ((y <= 8.2e-55) || !(y <= 1.9e-6)) {
tmp = t_1;
} else {
tmp = ((t * a) - (y * b)) / (y + (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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-3.1d-41)) then
tmp = t_1
else if (y <= 2.5d-115) then
tmp = ((t * a) + (z * x)) / (x + t)
else if ((y <= 8.2d-55) .or. (.not. (y <= 1.9d-6))) then
tmp = t_1
else
tmp = ((t * a) - (y * b)) / (y + (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 t_1 = (z + a) - b;
double tmp;
if (y <= -3.1e-41) {
tmp = t_1;
} else if (y <= 2.5e-115) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if ((y <= 8.2e-55) || !(y <= 1.9e-6)) {
tmp = t_1;
} else {
tmp = ((t * a) - (y * b)) / (y + (x + t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -3.1e-41: tmp = t_1 elif y <= 2.5e-115: tmp = ((t * a) + (z * x)) / (x + t) elif (y <= 8.2e-55) or not (y <= 1.9e-6): tmp = t_1 else: tmp = ((t * a) - (y * b)) / (y + (x + t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -3.1e-41) tmp = t_1; elseif (y <= 2.5e-115) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); elseif ((y <= 8.2e-55) || !(y <= 1.9e-6)) tmp = t_1; else tmp = Float64(Float64(Float64(t * a) - Float64(y * b)) / Float64(y + Float64(x + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -3.1e-41) tmp = t_1; elseif (y <= 2.5e-115) tmp = ((t * a) + (z * x)) / (x + t); elseif ((y <= 8.2e-55) || ~((y <= 1.9e-6))) tmp = t_1; else tmp = ((t * a) - (y * b)) / (y + (x + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.1e-41], t$95$1, If[LessEqual[y, 2.5e-115], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8.2e-55], N[Not[LessEqual[y, 1.9e-6]], $MachinePrecision]], t$95$1, N[(N[(N[(t * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-115}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-55} \lor \neg \left(y \leq 1.9 \cdot 10^{-6}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a - y \cdot b}{y + \left(x + t\right)}\\
\end{array}
\end{array}
if y < -3.10000000000000001e-41 or 2.5000000000000001e-115 < y < 8.1999999999999996e-55 or 1.9e-6 < y Initial program 47.1%
Taylor expanded in y around inf 70.9%
if -3.10000000000000001e-41 < y < 2.5000000000000001e-115Initial program 85.6%
Taylor expanded in y around 0 71.0%
if 8.1999999999999996e-55 < y < 1.9e-6Initial program 99.7%
Taylor expanded in t around inf 81.0%
Final simplification71.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ y x) t_1))))
(if (<= z -2.8e+63)
t_2
(if (<= z -1.35e-34)
(- (+ z a) b)
(if (<= z -4.8e-77)
(- z (* y (/ b t_1)))
(if (<= z 9000.0) (* a (/ (+ y t) t_1)) 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 * ((y + x) / t_1);
double tmp;
if (z <= -2.8e+63) {
tmp = t_2;
} else if (z <= -1.35e-34) {
tmp = (z + a) - b;
} else if (z <= -4.8e-77) {
tmp = z - (y * (b / t_1));
} else if (z <= 9000.0) {
tmp = a * ((y + t) / 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 = y + (x + t)
t_2 = z * ((y + x) / t_1)
if (z <= (-2.8d+63)) then
tmp = t_2
else if (z <= (-1.35d-34)) then
tmp = (z + a) - b
else if (z <= (-4.8d-77)) then
tmp = z - (y * (b / t_1))
else if (z <= 9000.0d0) then
tmp = a * ((y + t) / 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 = y + (x + t);
double t_2 = z * ((y + x) / t_1);
double tmp;
if (z <= -2.8e+63) {
tmp = t_2;
} else if (z <= -1.35e-34) {
tmp = (z + a) - b;
} else if (z <= -4.8e-77) {
tmp = z - (y * (b / t_1));
} else if (z <= 9000.0) {
tmp = a * ((y + t) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((y + x) / t_1) tmp = 0 if z <= -2.8e+63: tmp = t_2 elif z <= -1.35e-34: tmp = (z + a) - b elif z <= -4.8e-77: tmp = z - (y * (b / t_1)) elif z <= 9000.0: tmp = a * ((y + t) / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(y + x) / t_1)) tmp = 0.0 if (z <= -2.8e+63) tmp = t_2; elseif (z <= -1.35e-34) tmp = Float64(Float64(z + a) - b); elseif (z <= -4.8e-77) tmp = Float64(z - Float64(y * Float64(b / t_1))); elseif (z <= 9000.0) tmp = Float64(a * Float64(Float64(y + t) / t_1)); 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 * ((y + x) / t_1); tmp = 0.0; if (z <= -2.8e+63) tmp = t_2; elseif (z <= -1.35e-34) tmp = (z + a) - b; elseif (z <= -4.8e-77) tmp = z - (y * (b / t_1)); elseif (z <= 9000.0) tmp = a * ((y + t) / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+63], t$95$2, If[LessEqual[z, -1.35e-34], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[z, -4.8e-77], N[(z - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9000.0], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{y + x}{t\_1}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-34}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-77}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_1}\\
\mathbf{elif}\;z \leq 9000:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.79999999999999987e63 or 9e3 < z Initial program 47.8%
Taylor expanded in z around inf 34.8%
associate-/l*73.1%
+-commutative73.1%
associate-+r+73.1%
Simplified73.1%
if -2.79999999999999987e63 < z < -1.35000000000000008e-34Initial program 47.7%
Taylor expanded in y around inf 67.7%
if -1.35000000000000008e-34 < z < -4.7999999999999998e-77Initial program 68.5%
Taylor expanded in b around 0 68.5%
mul-1-neg68.5%
+-commutative68.5%
unsub-neg68.5%
+-commutative68.5%
associate-/l*68.5%
fma-define68.5%
+-commutative68.5%
associate-+r+68.5%
associate-/l*79.1%
associate-+r+79.1%
Simplified99.8%
Taylor expanded in x around inf 78.1%
if -4.7999999999999998e-77 < z < 9e3Initial program 76.8%
Taylor expanded in a around inf 51.6%
associate-/l*64.3%
associate-+r+64.3%
Simplified64.3%
Final simplification68.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b (+ y (+ x t))))))
(if (or (<= t -5e-33) (not (<= t 14000000000000.0)))
(- (+ a (* y (/ z (+ y t)))) t_1)
(- (+ z (* a (/ y (+ y x)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (y + (x + t)));
double tmp;
if ((t <= -5e-33) || !(t <= 14000000000000.0)) {
tmp = (a + (y * (z / (y + t)))) - t_1;
} else {
tmp = (z + (a * (y / (y + x)))) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (b / (y + (x + t)))
if ((t <= (-5d-33)) .or. (.not. (t <= 14000000000000.0d0))) then
tmp = (a + (y * (z / (y + t)))) - t_1
else
tmp = (z + (a * (y / (y + x)))) - t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (y + (x + t)));
double tmp;
if ((t <= -5e-33) || !(t <= 14000000000000.0)) {
tmp = (a + (y * (z / (y + t)))) - t_1;
} else {
tmp = (z + (a * (y / (y + x)))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / (y + (x + t))) tmp = 0 if (t <= -5e-33) or not (t <= 14000000000000.0): tmp = (a + (y * (z / (y + t)))) - t_1 else: tmp = (z + (a * (y / (y + x)))) - t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / Float64(y + Float64(x + t)))) tmp = 0.0 if ((t <= -5e-33) || !(t <= 14000000000000.0)) tmp = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - t_1); else tmp = Float64(Float64(z + Float64(a * Float64(y / Float64(y + x)))) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / (y + (x + t))); tmp = 0.0; if ((t <= -5e-33) || ~((t <= 14000000000000.0))) tmp = (a + (y * (z / (y + t)))) - t_1; else tmp = (z + (a * (y / (y + x)))) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -5e-33], N[Not[LessEqual[t, 14000000000000.0]], $MachinePrecision]], N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(z + N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{y + \left(x + t\right)}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-33} \lor \neg \left(t \leq 14000000000000\right):\\
\;\;\;\;\left(a + y \cdot \frac{z}{y + t}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - t\_1\\
\end{array}
\end{array}
if t < -5.00000000000000028e-33 or 1.4e13 < t Initial program 55.1%
Taylor expanded in b around 0 55.1%
mul-1-neg55.1%
+-commutative55.1%
unsub-neg55.1%
+-commutative55.1%
associate-/l*69.1%
fma-define69.1%
+-commutative69.1%
associate-+r+69.1%
associate-/l*85.1%
associate-+r+85.1%
Simplified98.8%
Taylor expanded in x around 0 66.5%
associate-/l*83.1%
+-commutative83.1%
Simplified83.1%
if -5.00000000000000028e-33 < t < 1.4e13Initial program 70.3%
Taylor expanded in b around 0 70.3%
mul-1-neg70.3%
+-commutative70.3%
unsub-neg70.3%
+-commutative70.3%
associate-/l*80.1%
fma-define80.1%
+-commutative80.1%
associate-+r+80.1%
associate-/l*88.4%
associate-+r+88.4%
Simplified95.0%
Taylor expanded in t around 0 79.1%
+-commutative79.1%
associate-/l*91.4%
+-commutative91.4%
Simplified91.4%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= z -5.6e+176)
(* z (/ (+ y x) t_1))
(if (<= z 2.4e+137)
(- (+ a (* y (/ z (+ y t)))) (* y (/ b t_1)))
(* z (/ 1.0 (/ t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (z <= -5.6e+176) {
tmp = z * ((y + x) / t_1);
} else if (z <= 2.4e+137) {
tmp = (a + (y * (z / (y + t)))) - (y * (b / t_1));
} else {
tmp = z * (1.0 / (t_1 / (y + x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (z <= (-5.6d+176)) then
tmp = z * ((y + x) / t_1)
else if (z <= 2.4d+137) then
tmp = (a + (y * (z / (y + t)))) - (y * (b / t_1))
else
tmp = z * (1.0d0 / (t_1 / (y + x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (z <= -5.6e+176) {
tmp = z * ((y + x) / t_1);
} else if (z <= 2.4e+137) {
tmp = (a + (y * (z / (y + t)))) - (y * (b / t_1));
} else {
tmp = z * (1.0 / (t_1 / (y + x)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if z <= -5.6e+176: tmp = z * ((y + x) / t_1) elif z <= 2.4e+137: tmp = (a + (y * (z / (y + t)))) - (y * (b / t_1)) else: tmp = z * (1.0 / (t_1 / (y + x))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (z <= -5.6e+176) tmp = Float64(z * Float64(Float64(y + x) / t_1)); elseif (z <= 2.4e+137) tmp = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - Float64(y * Float64(b / t_1))); else tmp = Float64(z * Float64(1.0 / Float64(t_1 / Float64(y + x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (z <= -5.6e+176) tmp = z * ((y + x) / t_1); elseif (z <= 2.4e+137) tmp = (a + (y * (z / (y + t)))) - (y * (b / t_1)); else tmp = z * (1.0 / (t_1 / (y + x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+176], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+137], N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 / N[(t$95$1 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+176}:\\
\;\;\;\;z \cdot \frac{y + x}{t\_1}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+137}:\\
\;\;\;\;\left(a + y \cdot \frac{z}{y + t}\right) - y \cdot \frac{b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{1}{\frac{t\_1}{y + x}}\\
\end{array}
\end{array}
if z < -5.6000000000000005e176Initial program 25.7%
Taylor expanded in z around inf 26.4%
associate-/l*93.5%
+-commutative93.5%
associate-+r+93.5%
Simplified93.5%
if -5.6000000000000005e176 < z < 2.39999999999999983e137Initial program 71.8%
Taylor expanded in b around 0 71.8%
mul-1-neg71.8%
+-commutative71.8%
unsub-neg71.8%
+-commutative71.8%
associate-/l*75.3%
fma-define75.3%
+-commutative75.3%
associate-+r+75.3%
associate-/l*87.8%
associate-+r+87.8%
Simplified96.7%
Taylor expanded in x around 0 74.7%
associate-/l*77.1%
+-commutative77.1%
Simplified77.1%
if 2.39999999999999983e137 < z Initial program 34.4%
Taylor expanded in z around inf 32.2%
associate-/l*83.2%
+-commutative83.2%
associate-+r+83.2%
Simplified83.2%
clear-num83.3%
inv-pow83.3%
+-commutative83.3%
+-commutative83.3%
+-commutative83.3%
Applied egg-rr83.3%
unpow-183.3%
Simplified83.3%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e-41) (not (<= y 4.5e-221))) (- (+ z a) b) (* a (/ (+ y t) (+ y (+ x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e-41) || !(y <= 4.5e-221)) {
tmp = (z + a) - b;
} else {
tmp = a * ((y + t) / (y + (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 ((y <= (-3.2d-41)) .or. (.not. (y <= 4.5d-221))) then
tmp = (z + a) - b
else
tmp = a * ((y + t) / (y + (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 ((y <= -3.2e-41) || !(y <= 4.5e-221)) {
tmp = (z + a) - b;
} else {
tmp = a * ((y + t) / (y + (x + t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.2e-41) or not (y <= 4.5e-221): tmp = (z + a) - b else: tmp = a * ((y + t) / (y + (x + t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.2e-41) || !(y <= 4.5e-221)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(Float64(y + t) / Float64(y + Float64(x + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.2e-41) || ~((y <= 4.5e-221))) tmp = (z + a) - b; else tmp = a * ((y + t) / (y + (x + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.2e-41], N[Not[LessEqual[y, 4.5e-221]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-41} \lor \neg \left(y \leq 4.5 \cdot 10^{-221}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\
\end{array}
\end{array}
if y < -3.20000000000000012e-41 or 4.50000000000000026e-221 < y Initial program 53.9%
Taylor expanded in y around inf 66.7%
if -3.20000000000000012e-41 < y < 4.50000000000000026e-221Initial program 85.4%
Taylor expanded in a around inf 46.3%
associate-/l*53.5%
associate-+r+53.5%
Simplified53.5%
Final simplification63.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= z -4.1e+44) (not (<= z 6600.0)))
(* z (/ (+ y x) t_1))
(* a (/ (+ y t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((z <= -4.1e+44) || !(z <= 6600.0)) {
tmp = z * ((y + x) / t_1);
} else {
tmp = a * ((y + t) / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((z <= (-4.1d+44)) .or. (.not. (z <= 6600.0d0))) then
tmp = z * ((y + x) / t_1)
else
tmp = a * ((y + t) / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((z <= -4.1e+44) || !(z <= 6600.0)) {
tmp = z * ((y + x) / t_1);
} else {
tmp = a * ((y + t) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (z <= -4.1e+44) or not (z <= 6600.0): tmp = z * ((y + x) / t_1) else: tmp = a * ((y + t) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((z <= -4.1e+44) || !(z <= 6600.0)) tmp = Float64(z * Float64(Float64(y + x) / t_1)); else tmp = Float64(a * Float64(Float64(y + t) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((z <= -4.1e+44) || ~((z <= 6600.0))) tmp = z * ((y + x) / t_1); else tmp = a * ((y + t) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -4.1e+44], N[Not[LessEqual[z, 6600.0]], $MachinePrecision]], N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+44} \lor \neg \left(z \leq 6600\right):\\
\;\;\;\;z \cdot \frac{y + x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\
\end{array}
\end{array}
if z < -4.09999999999999965e44 or 6600 < z Initial program 48.3%
Taylor expanded in z around inf 35.3%
associate-/l*73.4%
+-commutative73.4%
associate-+r+73.4%
Simplified73.4%
if -4.09999999999999965e44 < z < 6600Initial program 72.5%
Taylor expanded in a around inf 45.9%
associate-/l*60.9%
associate-+r+60.9%
Simplified60.9%
Final simplification66.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e-42) (not (<= y 2.5e-119))) (- (+ z a) b) (/ (+ (* t a) (* z x)) (+ x t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e-42) || !(y <= 2.5e-119)) {
tmp = (z + a) - b;
} else {
tmp = ((t * a) + (z * x)) / (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 ((y <= (-8d-42)) .or. (.not. (y <= 2.5d-119))) then
tmp = (z + a) - b
else
tmp = ((t * a) + (z * x)) / (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 ((y <= -8e-42) || !(y <= 2.5e-119)) {
tmp = (z + a) - b;
} else {
tmp = ((t * a) + (z * x)) / (x + t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e-42) or not (y <= 2.5e-119): tmp = (z + a) - b else: tmp = ((t * a) + (z * x)) / (x + t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e-42) || !(y <= 2.5e-119)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8e-42) || ~((y <= 2.5e-119))) tmp = (z + a) - b; else tmp = ((t * a) + (z * x)) / (x + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e-42], N[Not[LessEqual[y, 2.5e-119]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-42} \lor \neg \left(y \leq 2.5 \cdot 10^{-119}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\end{array}
\end{array}
if y < -8.0000000000000003e-42 or 2.49999999999999996e-119 < y Initial program 50.1%
Taylor expanded in y around inf 68.4%
if -8.0000000000000003e-42 < y < 2.49999999999999996e-119Initial program 85.6%
Taylor expanded in y around 0 71.0%
Final simplification69.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.1e-42) (not (<= y 4.2e-221))) (- (+ z a) b) a))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.1e-42) || !(y <= 4.2e-221)) {
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 ((y <= (-1.1d-42)) .or. (.not. (y <= 4.2d-221))) 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 ((y <= -1.1e-42) || !(y <= 4.2e-221)) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.1e-42) or not (y <= 4.2e-221): tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.1e-42) || !(y <= 4.2e-221)) 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 ((y <= -1.1e-42) || ~((y <= 4.2e-221))) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.1e-42], N[Not[LessEqual[y, 4.2e-221]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-42} \lor \neg \left(y \leq 4.2 \cdot 10^{-221}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if y < -1.10000000000000003e-42 or 4.2e-221 < y Initial program 53.9%
Taylor expanded in y around inf 66.7%
if -1.10000000000000003e-42 < y < 4.2e-221Initial program 85.4%
Taylor expanded in t around inf 50.6%
Final simplification62.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.65e+56) z (if (<= z 6500.0) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.65e+56) {
tmp = z;
} else if (z <= 6500.0) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.65d+56)) then
tmp = z
else if (z <= 6500.0d0) then
tmp = a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.65e+56) {
tmp = z;
} else if (z <= 6500.0) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.65e+56: tmp = z elif z <= 6500.0: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.65e+56) tmp = z; elseif (z <= 6500.0) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.65e+56) tmp = z; elseif (z <= 6500.0) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.65e+56], z, If[LessEqual[z, 6500.0], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+56}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 6500:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.65000000000000001e56 or 6500 < z Initial program 48.3%
Taylor expanded in x around inf 56.6%
if -1.65000000000000001e56 < z < 6500Initial program 72.5%
Taylor expanded in t around inf 51.2%
Final simplification53.5%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 61.9%
Taylor expanded in t around inf 36.9%
Final simplification36.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 2024080
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))