AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1

Percentage Accurate: 60.5% → 86.3%
Time: 15.3s
Alternatives: 14
Speedup: 0.7×

Specification

?
\[\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
 (/ (- (+ (* (+ 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 60.5% accurate, 1.0× speedup?

\[\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
 (/ (- (+ (* (+ 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}

Alternative 1: 86.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+283}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+289}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
   (if (<= t_1 -1e+283) (+ z a) (if (<= t_1 5e+289) t_1 (- (+ z a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if (t_1 <= -1e+283) {
		tmp = z + a;
	} else if (t_1 <= 5e+289) {
		tmp = t_1;
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t))
    if (t_1 <= (-1d+283)) then
        tmp = z + a
    else if (t_1 <= 5d+289) then
        tmp = t_1
    else
        tmp = (z + a) - b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if (t_1 <= -1e+283) {
		tmp = z + a;
	} else if (t_1 <= 5e+289) {
		tmp = t_1;
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t))
	tmp = 0
	if t_1 <= -1e+283:
		tmp = z + a
	elif t_1 <= 5e+289:
		tmp = t_1
	else:
		tmp = (z + a) - b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if (t_1 <= -1e+283)
		tmp = Float64(z + a);
	elseif (t_1 <= 5e+289)
		tmp = t_1;
	else
		tmp = Float64(Float64(z + a) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
	tmp = 0.0;
	if (t_1 <= -1e+283)
		tmp = z + a;
	elseif (t_1 <= 5e+289)
		tmp = t_1;
	else
		tmp = (z + a) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $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, -1e+283], N[(z + a), $MachinePrecision], If[LessEqual[t$95$1, 5e+289], t$95$1, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+283}:\\
\;\;\;\;z + a\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.99999999999999955e282

    1. Initial program 8.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 73.6%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Taylor expanded in b around 0 75.4%

      \[\leadsto \color{blue}{a + z} \]

    if -9.99999999999999955e282 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000031e289

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing

    if 5.00000000000000031e289 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 8.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 73.8%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -1 \cdot 10^{+283}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 5 \cdot 10^{+289}:\\ \;\;\;\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 66.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \left(z + a\right) - b\\ t_4 := \left(x + y\right) \cdot z\\ t_5 := \frac{\left(t\_4 + t\_1\right) - y \cdot b}{t\_2}\\ t_6 := \frac{t\_4 - y \cdot b}{t\_2}\\ \mathbf{if}\;t\_5 \leq -5 \cdot 10^{+199}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+89}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{-28}:\\ \;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+146}:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (+ y t)))
        (t_2 (+ y (+ x t)))
        (t_3 (- (+ z a) b))
        (t_4 (* (+ x y) z))
        (t_5 (/ (- (+ t_4 t_1) (* y b)) t_2))
        (t_6 (/ (- t_4 (* y b)) t_2)))
   (if (<= t_5 -5e+199)
     t_3
     (if (<= t_5 -2e+89)
       t_6
       (if (<= t_5 -2e-28)
         (/ (- t_1 (* y b)) t_2)
         (if (<= t_5 2e+146) t_6 t_3))))))
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 + a) - b;
	double t_4 = (x + y) * z;
	double t_5 = ((t_4 + t_1) - (y * b)) / t_2;
	double t_6 = (t_4 - (y * b)) / t_2;
	double tmp;
	if (t_5 <= -5e+199) {
		tmp = t_3;
	} else if (t_5 <= -2e+89) {
		tmp = t_6;
	} else if (t_5 <= -2e-28) {
		tmp = (t_1 - (y * b)) / t_2;
	} else if (t_5 <= 2e+146) {
		tmp = t_6;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: tmp
    t_1 = a * (y + t)
    t_2 = y + (x + t)
    t_3 = (z + a) - b
    t_4 = (x + y) * z
    t_5 = ((t_4 + t_1) - (y * b)) / t_2
    t_6 = (t_4 - (y * b)) / t_2
    if (t_5 <= (-5d+199)) then
        tmp = t_3
    else if (t_5 <= (-2d+89)) then
        tmp = t_6
    else if (t_5 <= (-2d-28)) then
        tmp = (t_1 - (y * b)) / t_2
    else if (t_5 <= 2d+146) then
        tmp = t_6
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (y + t);
	double t_2 = y + (x + t);
	double t_3 = (z + a) - b;
	double t_4 = (x + y) * z;
	double t_5 = ((t_4 + t_1) - (y * b)) / t_2;
	double t_6 = (t_4 - (y * b)) / t_2;
	double tmp;
	if (t_5 <= -5e+199) {
		tmp = t_3;
	} else if (t_5 <= -2e+89) {
		tmp = t_6;
	} else if (t_5 <= -2e-28) {
		tmp = (t_1 - (y * b)) / t_2;
	} else if (t_5 <= 2e+146) {
		tmp = t_6;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (y + t)
	t_2 = y + (x + t)
	t_3 = (z + a) - b
	t_4 = (x + y) * z
	t_5 = ((t_4 + t_1) - (y * b)) / t_2
	t_6 = (t_4 - (y * b)) / t_2
	tmp = 0
	if t_5 <= -5e+199:
		tmp = t_3
	elif t_5 <= -2e+89:
		tmp = t_6
	elif t_5 <= -2e-28:
		tmp = (t_1 - (y * b)) / t_2
	elif t_5 <= 2e+146:
		tmp = t_6
	else:
		tmp = t_3
	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(z + a) - b)
	t_4 = Float64(Float64(x + y) * z)
	t_5 = Float64(Float64(Float64(t_4 + t_1) - Float64(y * b)) / t_2)
	t_6 = Float64(Float64(t_4 - Float64(y * b)) / t_2)
	tmp = 0.0
	if (t_5 <= -5e+199)
		tmp = t_3;
	elseif (t_5 <= -2e+89)
		tmp = t_6;
	elseif (t_5 <= -2e-28)
		tmp = Float64(Float64(t_1 - Float64(y * b)) / t_2);
	elseif (t_5 <= 2e+146)
		tmp = t_6;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (y + t);
	t_2 = y + (x + t);
	t_3 = (z + a) - b;
	t_4 = (x + y) * z;
	t_5 = ((t_4 + t_1) - (y * b)) / t_2;
	t_6 = (t_4 - (y * b)) / t_2;
	tmp = 0.0;
	if (t_5 <= -5e+199)
		tmp = t_3;
	elseif (t_5 <= -2e+89)
		tmp = t_6;
	elseif (t_5 <= -2e-28)
		tmp = (t_1 - (y * b)) / t_2;
	elseif (t_5 <= 2e+146)
		tmp = t_6;
	else
		tmp = t_3;
	end
	tmp_2 = 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[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$4 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$5, -5e+199], t$95$3, If[LessEqual[t$95$5, -2e+89], t$95$6, If[LessEqual[t$95$5, -2e-28], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$5, 2e+146], t$95$6, t$95$3]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \left(z + a\right) - b\\
t_4 := \left(x + y\right) \cdot z\\
t_5 := \frac{\left(t\_4 + t\_1\right) - y \cdot b}{t\_2}\\
t_6 := \frac{t\_4 - y \cdot b}{t\_2}\\
\mathbf{if}\;t\_5 \leq -5 \cdot 10^{+199}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+89}:\\
\;\;\;\;t\_6\\

\mathbf{elif}\;t\_5 \leq -2 \cdot 10^{-28}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+146}:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.9999999999999998e199 or 1.99999999999999987e146 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 24.6%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 73.0%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]

    if -4.9999999999999998e199 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999999e89 or -1.99999999999999994e-28 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999987e146

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 74.7%

      \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) - b \cdot y}}{\left(x + t\right) + y} \]
    4. Step-by-step derivation
      1. +-commutative74.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)} - b \cdot y}{\left(x + t\right) + y} \]
      2. *-commutative74.7%

        \[\leadsto \frac{z \cdot \left(y + x\right) - \color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
    5. Simplified74.7%

      \[\leadsto \frac{\color{blue}{z \cdot \left(y + x\right) - y \cdot b}}{\left(x + t\right) + y} \]

    if -1.99999999999999999e89 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999994e-28

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 74.1%

      \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right) - b \cdot y}}{\left(x + t\right) + y} \]
    4. Step-by-step derivation
      1. +-commutative74.1%

        \[\leadsto \frac{a \cdot \color{blue}{\left(y + t\right)} - b \cdot y}{\left(x + t\right) + y} \]
      2. *-commutative74.1%

        \[\leadsto \frac{a \cdot \left(y + t\right) - \color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
    5. Simplified74.1%

      \[\leadsto \frac{\color{blue}{a \cdot \left(y + t\right) - y \cdot b}}{\left(x + t\right) + y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -5 \cdot 10^{+199}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -2 \cdot 10^{+89}:\\ \;\;\;\;\frac{\left(x + y\right) \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -2 \cdot 10^{-28}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+146}:\\ \;\;\;\;\frac{\left(x + y\right) \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(z + a\right) - b\\ t_3 := \left(x + y\right) \cdot z\\ t_4 := t\_3 + a \cdot \left(y + t\right)\\ t_5 := \frac{t\_4 - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_5 \leq -5 \cdot 10^{+254}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+57}:\\ \;\;\;\;\frac{t\_4}{\left(x + y\right) + t}\\ \mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+146}:\\ \;\;\;\;\frac{t\_3 - y \cdot b}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (- (+ z a) b))
        (t_3 (* (+ x y) z))
        (t_4 (+ t_3 (* a (+ y t))))
        (t_5 (/ (- t_4 (* y b)) t_1)))
   (if (<= t_5 -5e+254)
     t_2
     (if (<= t_5 2e+57)
       (/ t_4 (+ (+ x y) t))
       (if (<= t_5 2e+146) (/ (- t_3 (* y b)) 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 + a) - b;
	double t_3 = (x + y) * z;
	double t_4 = t_3 + (a * (y + t));
	double t_5 = (t_4 - (y * b)) / t_1;
	double tmp;
	if (t_5 <= -5e+254) {
		tmp = t_2;
	} else if (t_5 <= 2e+57) {
		tmp = t_4 / ((x + y) + t);
	} else if (t_5 <= 2e+146) {
		tmp = (t_3 - (y * b)) / 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) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = (z + a) - b
    t_3 = (x + y) * z
    t_4 = t_3 + (a * (y + t))
    t_5 = (t_4 - (y * b)) / t_1
    if (t_5 <= (-5d+254)) then
        tmp = t_2
    else if (t_5 <= 2d+57) then
        tmp = t_4 / ((x + y) + t)
    else if (t_5 <= 2d+146) then
        tmp = (t_3 - (y * b)) / 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 + a) - b;
	double t_3 = (x + y) * z;
	double t_4 = t_3 + (a * (y + t));
	double t_5 = (t_4 - (y * b)) / t_1;
	double tmp;
	if (t_5 <= -5e+254) {
		tmp = t_2;
	} else if (t_5 <= 2e+57) {
		tmp = t_4 / ((x + y) + t);
	} else if (t_5 <= 2e+146) {
		tmp = (t_3 - (y * b)) / t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = (z + a) - b
	t_3 = (x + y) * z
	t_4 = t_3 + (a * (y + t))
	t_5 = (t_4 - (y * b)) / t_1
	tmp = 0
	if t_5 <= -5e+254:
		tmp = t_2
	elif t_5 <= 2e+57:
		tmp = t_4 / ((x + y) + t)
	elif t_5 <= 2e+146:
		tmp = (t_3 - (y * b)) / 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(Float64(z + a) - b)
	t_3 = Float64(Float64(x + y) * z)
	t_4 = Float64(t_3 + Float64(a * Float64(y + t)))
	t_5 = Float64(Float64(t_4 - Float64(y * b)) / t_1)
	tmp = 0.0
	if (t_5 <= -5e+254)
		tmp = t_2;
	elseif (t_5 <= 2e+57)
		tmp = Float64(t_4 / Float64(Float64(x + y) + t));
	elseif (t_5 <= 2e+146)
		tmp = Float64(Float64(t_3 - Float64(y * b)) / 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 + a) - b;
	t_3 = (x + y) * z;
	t_4 = t_3 + (a * (y + t));
	t_5 = (t_4 - (y * b)) / t_1;
	tmp = 0.0;
	if (t_5 <= -5e+254)
		tmp = t_2;
	elseif (t_5 <= 2e+57)
		tmp = t_4 / ((x + y) + t);
	elseif (t_5 <= 2e+146)
		tmp = (t_3 - (y * b)) / 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[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$5, -5e+254], t$95$2, If[LessEqual[t$95$5, 2e+57], N[(t$95$4 / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 2e+146], N[(N[(t$95$3 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(z + a\right) - b\\
t_3 := \left(x + y\right) \cdot z\\
t_4 := t\_3 + a \cdot \left(y + t\right)\\
t_5 := \frac{t\_4 - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_5 \leq -5 \cdot 10^{+254}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+57}:\\
\;\;\;\;\frac{t\_4}{\left(x + y\right) + t}\\

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+146}:\\
\;\;\;\;\frac{t\_3 - y \cdot b}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.99999999999999994e254 or 1.99999999999999987e146 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 19.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 73.5%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]

    if -4.99999999999999994e254 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e57

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 81.7%

      \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]

    if 2.0000000000000001e57 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999987e146

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 85.6%

      \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) - b \cdot y}}{\left(x + t\right) + y} \]
    4. Step-by-step derivation
      1. +-commutative85.6%

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)} - b \cdot y}{\left(x + t\right) + y} \]
      2. *-commutative85.6%

        \[\leadsto \frac{z \cdot \left(y + x\right) - \color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
    5. Simplified85.6%

      \[\leadsto \frac{\color{blue}{z \cdot \left(y + x\right) - y \cdot b}}{\left(x + t\right) + y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -5 \cdot 10^{+254}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+57}:\\ \;\;\;\;\frac{\left(x + y\right) \cdot z + a \cdot \left(y + t\right)}{\left(x + y\right) + t}\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+146}:\\ \;\;\;\;\frac{\left(x + y\right) \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.4% accurate, 0.2× speedup?

\[\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(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{t\_2}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+126}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+57}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+289}:\\ \;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (+ y t)))
        (t_2 (+ y (+ x t)))
        (t_3 (/ (- (+ (* (+ x y) z) t_1) (* y b)) t_2))
        (t_4 (- (+ z a) b)))
   (if (<= t_3 -1e+126)
     t_4
     (if (<= t_3 2e+57)
       (/ (+ (* t a) (* x z)) (+ x t))
       (if (<= t_3 5e+289) (/ (- t_1 (* y b)) t_2) 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 = ((((x + y) * z) + t_1) - (y * b)) / t_2;
	double t_4 = (z + a) - b;
	double tmp;
	if (t_3 <= -1e+126) {
		tmp = t_4;
	} else if (t_3 <= 2e+57) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (t_3 <= 5e+289) {
		tmp = (t_1 - (y * b)) / 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 = a * (y + t)
    t_2 = y + (x + t)
    t_3 = ((((x + y) * z) + t_1) - (y * b)) / t_2
    t_4 = (z + a) - b
    if (t_3 <= (-1d+126)) then
        tmp = t_4
    else if (t_3 <= 2d+57) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (t_3 <= 5d+289) then
        tmp = (t_1 - (y * b)) / 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 = a * (y + t);
	double t_2 = y + (x + t);
	double t_3 = ((((x + y) * z) + t_1) - (y * b)) / t_2;
	double t_4 = (z + a) - b;
	double tmp;
	if (t_3 <= -1e+126) {
		tmp = t_4;
	} else if (t_3 <= 2e+57) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (t_3 <= 5e+289) {
		tmp = (t_1 - (y * b)) / t_2;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (y + t)
	t_2 = y + (x + t)
	t_3 = ((((x + y) * z) + t_1) - (y * b)) / t_2
	t_4 = (z + a) - b
	tmp = 0
	if t_3 <= -1e+126:
		tmp = t_4
	elif t_3 <= 2e+57:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif t_3 <= 5e+289:
		tmp = (t_1 - (y * b)) / t_2
	else:
		tmp = 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(Float64(x + y) * z) + t_1) - Float64(y * b)) / t_2)
	t_4 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (t_3 <= -1e+126)
		tmp = t_4;
	elseif (t_3 <= 2e+57)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (t_3 <= 5e+289)
		tmp = Float64(Float64(t_1 - Float64(y * b)) / t_2);
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (y + t);
	t_2 = y + (x + t);
	t_3 = ((((x + y) * z) + t_1) - (y * b)) / t_2;
	t_4 = (z + a) - b;
	tmp = 0.0;
	if (t_3 <= -1e+126)
		tmp = t_4;
	elseif (t_3 <= 2e+57)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (t_3 <= 5e+289)
		tmp = (t_1 - (y * b)) / t_2;
	else
		tmp = t_4;
	end
	tmp_2 = 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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+126], t$95$4, If[LessEqual[t$95$3, 2e+57], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+289], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$4]]]]]]]
\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(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{t\_2}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+126}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+57}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\

\mathbf{else}:\\
\;\;\;\;t\_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.99999999999999925e125 or 5.00000000000000031e289 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 24.6%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 71.6%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]

    if -9.99999999999999925e125 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e57

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 64.7%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]

    if 2.0000000000000001e57 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000031e289

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 73.4%

      \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right) - b \cdot y}}{\left(x + t\right) + y} \]
    4. Step-by-step derivation
      1. +-commutative73.4%

        \[\leadsto \frac{a \cdot \color{blue}{\left(y + t\right)} - b \cdot y}{\left(x + t\right) + y} \]
      2. *-commutative73.4%

        \[\leadsto \frac{a \cdot \left(y + t\right) - \color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
    5. Simplified73.4%

      \[\leadsto \frac{\color{blue}{a \cdot \left(y + t\right) - y \cdot b}}{\left(x + t\right) + y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -1 \cdot 10^{+126}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+57}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 5 \cdot 10^{+289}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 65.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+126} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+52}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
   (if (or (<= t_1 -1e+126) (not (<= t_1 2e+52)))
     (- (+ z a) b)
     (/ (+ (* t a) (* x z)) (+ x t)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_1 <= -1e+126) || !(t_1 <= 2e+52)) {
		tmp = (z + a) - b;
	} else {
		tmp = ((t * a) + (x * z)) / (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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t))
    if ((t_1 <= (-1d+126)) .or. (.not. (t_1 <= 2d+52))) then
        tmp = (z + a) - b
    else
        tmp = ((t * a) + (x * z)) / (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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_1 <= -1e+126) || !(t_1 <= 2e+52)) {
		tmp = (z + a) - b;
	} else {
		tmp = ((t * a) + (x * z)) / (x + t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t))
	tmp = 0
	if (t_1 <= -1e+126) or not (t_1 <= 2e+52):
		tmp = (z + a) - b
	else:
		tmp = ((t * a) + (x * z)) / (x + t)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if ((t_1 <= -1e+126) || !(t_1 <= 2e+52))
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
	tmp = 0.0;
	if ((t_1 <= -1e+126) || ~((t_1 <= 2e+52)))
		tmp = (z + a) - b;
	else
		tmp = ((t * a) + (x * z)) / (x + t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+126], N[Not[LessEqual[t$95$1, 2e+52]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+126} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+52}\right):\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.99999999999999925e125 or 2e52 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 41.0%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.8%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]

    if -9.99999999999999925e125 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2e52

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 64.0%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -1 \cdot 10^{+126} \lor \neg \left(\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+52}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 69.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -8.6 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-47}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-43}:\\ \;\;\;\;z \cdot \left(\frac{x}{x + t} + \frac{a}{z} \cdot \frac{t}{x + t}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z a) b)))
   (if (<= y -8.6e+33)
     t_1
     (if (<= y -2.6e-47)
       (/ (- (* a (+ y t)) (* y b)) (+ y (+ x t)))
       (if (<= y 6.4e-43)
         (* z (+ (/ x (+ x t)) (* (/ a z) (/ t (+ 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 <= -8.6e+33) {
		tmp = t_1;
	} else if (y <= -2.6e-47) {
		tmp = ((a * (y + t)) - (y * b)) / (y + (x + t));
	} else if (y <= 6.4e-43) {
		tmp = z * ((x / (x + t)) + ((a / z) * (t / (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 <= (-8.6d+33)) then
        tmp = t_1
    else if (y <= (-2.6d-47)) then
        tmp = ((a * (y + t)) - (y * b)) / (y + (x + t))
    else if (y <= 6.4d-43) then
        tmp = z * ((x / (x + t)) + ((a / z) * (t / (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 <= -8.6e+33) {
		tmp = t_1;
	} else if (y <= -2.6e-47) {
		tmp = ((a * (y + t)) - (y * b)) / (y + (x + t));
	} else if (y <= 6.4e-43) {
		tmp = z * ((x / (x + t)) + ((a / z) * (t / (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 <= -8.6e+33:
		tmp = t_1
	elif y <= -2.6e-47:
		tmp = ((a * (y + t)) - (y * b)) / (y + (x + t))
	elif y <= 6.4e-43:
		tmp = z * ((x / (x + t)) + ((a / z) * (t / (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 <= -8.6e+33)
		tmp = t_1;
	elseif (y <= -2.6e-47)
		tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / Float64(y + Float64(x + t)));
	elseif (y <= 6.4e-43)
		tmp = Float64(z * Float64(Float64(x / Float64(x + t)) + Float64(Float64(a / z) * Float64(t / 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 <= -8.6e+33)
		tmp = t_1;
	elseif (y <= -2.6e-47)
		tmp = ((a * (y + t)) - (y * b)) / (y + (x + t));
	elseif (y <= 6.4e-43)
		tmp = z * ((x / (x + t)) + ((a / z) * (t / (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, -8.6e+33], t$95$1, If[LessEqual[y, -2.6e-47], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e-43], N[(z * N[(N[(x / N[(x + t), $MachinePrecision]), $MachinePrecision] + N[(N[(a / z), $MachinePrecision] * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -8.6 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{-43}:\\
\;\;\;\;z \cdot \left(\frac{x}{x + t} + \frac{a}{z} \cdot \frac{t}{x + t}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.60000000000000057e33 or 6.3999999999999997e-43 < y

    1. Initial program 45.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 75.0%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]

    if -8.60000000000000057e33 < y < -2.6e-47

    1. Initial program 94.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 77.1%

      \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right) - b \cdot y}}{\left(x + t\right) + y} \]
    4. Step-by-step derivation
      1. +-commutative77.1%

        \[\leadsto \frac{a \cdot \color{blue}{\left(y + t\right)} - b \cdot y}{\left(x + t\right) + y} \]
      2. *-commutative77.1%

        \[\leadsto \frac{a \cdot \left(y + t\right) - \color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
    5. Simplified77.1%

      \[\leadsto \frac{\color{blue}{a \cdot \left(y + t\right) - y \cdot b}}{\left(x + t\right) + y} \]

    if -2.6e-47 < y < 6.3999999999999997e-43

    1. Initial program 75.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 49.6%

      \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)} + \left(\frac{a \cdot \left(t + y\right)}{b \cdot \left(t + \left(x + y\right)\right)} + \frac{z \cdot \left(x + y\right)}{b \cdot \left(t + \left(x + y\right)\right)}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative49.6%

        \[\leadsto b \cdot \color{blue}{\left(\left(\frac{a \cdot \left(t + y\right)}{b \cdot \left(t + \left(x + y\right)\right)} + \frac{z \cdot \left(x + y\right)}{b \cdot \left(t + \left(x + y\right)\right)}\right) + -1 \cdot \frac{y}{t + \left(x + y\right)}\right)} \]
      2. mul-1-neg49.6%

        \[\leadsto b \cdot \left(\left(\frac{a \cdot \left(t + y\right)}{b \cdot \left(t + \left(x + y\right)\right)} + \frac{z \cdot \left(x + y\right)}{b \cdot \left(t + \left(x + y\right)\right)}\right) + \color{blue}{\left(-\frac{y}{t + \left(x + y\right)}\right)}\right) \]
      3. unsub-neg49.6%

        \[\leadsto b \cdot \color{blue}{\left(\left(\frac{a \cdot \left(t + y\right)}{b \cdot \left(t + \left(x + y\right)\right)} + \frac{z \cdot \left(x + y\right)}{b \cdot \left(t + \left(x + y\right)\right)}\right) - \frac{y}{t + \left(x + y\right)}\right)} \]
    5. Simplified58.4%

      \[\leadsto \color{blue}{b \cdot \left(\mathsf{fma}\left(z, \frac{y + x}{b \cdot \left(x + \left(y + t\right)\right)}, \frac{y + t}{x + \left(y + t\right)} \cdot \frac{a}{b}\right) - \frac{y}{x + \left(y + t\right)}\right)} \]
    6. Taylor expanded in z around inf 57.0%

      \[\leadsto \color{blue}{z \cdot \left(b \cdot \left(\frac{x}{b \cdot \left(t + \left(x + y\right)\right)} + \frac{y}{b \cdot \left(t + \left(x + y\right)\right)}\right) + \frac{b \cdot \left(\frac{a \cdot \left(t + y\right)}{b \cdot \left(t + \left(x + y\right)\right)} - \frac{y}{t + \left(x + y\right)}\right)}{z}\right)} \]
    7. Taylor expanded in y around 0 61.9%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{t + x} + \frac{a \cdot t}{z \cdot \left(t + x\right)}\right)} \]
    8. Step-by-step derivation
      1. +-commutative61.9%

        \[\leadsto z \cdot \left(\frac{x}{\color{blue}{x + t}} + \frac{a \cdot t}{z \cdot \left(t + x\right)}\right) \]
      2. times-frac72.8%

        \[\leadsto z \cdot \left(\frac{x}{x + t} + \color{blue}{\frac{a}{z} \cdot \frac{t}{t + x}}\right) \]
      3. +-commutative72.8%

        \[\leadsto z \cdot \left(\frac{x}{x + t} + \frac{a}{z} \cdot \frac{t}{\color{blue}{x + t}}\right) \]
    9. Simplified72.8%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{x + t} + \frac{a}{z} \cdot \frac{t}{x + t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.6 \cdot 10^{+33}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-47}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-43}:\\ \;\;\;\;z \cdot \left(\frac{x}{x + t} + \frac{a}{z} \cdot \frac{t}{x + t}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := a \cdot \frac{y + t}{t\_1}\\ \mathbf{if}\;a \leq -4.7 \cdot 10^{-7}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-82}:\\ \;\;\;\;z \cdot \frac{x + y}{t\_1}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+78}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ y t))) (t_2 (* a (/ (+ y t) t_1))))
   (if (<= a -4.7e-7)
     t_2
     (if (<= a 6e-82)
       (* z (/ (+ x y) t_1))
       (if (<= a 6.2e+78) (- (+ z a) b) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y + t);
	double t_2 = a * ((y + t) / t_1);
	double tmp;
	if (a <= -4.7e-7) {
		tmp = t_2;
	} else if (a <= 6e-82) {
		tmp = z * ((x + y) / t_1);
	} else if (a <= 6.2e+78) {
		tmp = (z + a) - b;
	} 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 = x + (y + t)
    t_2 = a * ((y + t) / t_1)
    if (a <= (-4.7d-7)) then
        tmp = t_2
    else if (a <= 6d-82) then
        tmp = z * ((x + y) / t_1)
    else if (a <= 6.2d+78) then
        tmp = (z + a) - b
    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 = x + (y + t);
	double t_2 = a * ((y + t) / t_1);
	double tmp;
	if (a <= -4.7e-7) {
		tmp = t_2;
	} else if (a <= 6e-82) {
		tmp = z * ((x + y) / t_1);
	} else if (a <= 6.2e+78) {
		tmp = (z + a) - b;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y + t)
	t_2 = a * ((y + t) / t_1)
	tmp = 0
	if a <= -4.7e-7:
		tmp = t_2
	elif a <= 6e-82:
		tmp = z * ((x + y) / t_1)
	elif a <= 6.2e+78:
		tmp = (z + a) - b
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y + t))
	t_2 = Float64(a * Float64(Float64(y + t) / t_1))
	tmp = 0.0
	if (a <= -4.7e-7)
		tmp = t_2;
	elseif (a <= 6e-82)
		tmp = Float64(z * Float64(Float64(x + y) / t_1));
	elseif (a <= 6.2e+78)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y + t);
	t_2 = a * ((y + t) / t_1);
	tmp = 0.0;
	if (a <= -4.7e-7)
		tmp = t_2;
	elseif (a <= 6e-82)
		tmp = z * ((x + y) / t_1);
	elseif (a <= 6.2e+78)
		tmp = (z + a) - b;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.7e-7], t$95$2, If[LessEqual[a, 6e-82], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e+78], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y + t\right)\\
t_2 := a \cdot \frac{y + t}{t\_1}\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-82}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_1}\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+78}:\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.7e-7 or 6.2e78 < a

    1. Initial program 53.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 38.6%

      \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*70.1%

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} \]
      2. +-commutative70.1%

        \[\leadsto a \cdot \frac{\color{blue}{y + t}}{t + \left(x + y\right)} \]
      3. +-commutative70.1%

        \[\leadsto a \cdot \frac{y + t}{\color{blue}{\left(x + y\right) + t}} \]
      4. associate-+r+70.1%

        \[\leadsto a \cdot \frac{y + t}{\color{blue}{x + \left(y + t\right)}} \]
    5. Simplified70.1%

      \[\leadsto \color{blue}{a \cdot \frac{y + t}{x + \left(y + t\right)}} \]

    if -4.7e-7 < a < 5.9999999999999998e-82

    1. Initial program 77.0%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 45.2%

      \[\leadsto \color{blue}{\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*63.2%

        \[\leadsto \color{blue}{z \cdot \frac{x + y}{t + \left(x + y\right)}} \]
      2. +-commutative63.2%

        \[\leadsto z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      3. +-commutative63.2%

        \[\leadsto z \cdot \frac{y + x}{\color{blue}{\left(x + y\right) + t}} \]
      4. associate-+r+63.2%

        \[\leadsto z \cdot \frac{y + x}{\color{blue}{x + \left(y + t\right)}} \]
    5. Simplified63.2%

      \[\leadsto \color{blue}{z \cdot \frac{y + x}{x + \left(y + t\right)}} \]

    if 5.9999999999999998e-82 < a < 6.2e78

    1. Initial program 55.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.5%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{-7}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-82}:\\ \;\;\;\;z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+78}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-117}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+78}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (/ (+ y t) (+ x (+ y t))))))
   (if (<= a -1.35e+104)
     t_1
     (if (<= a -9.6e-117) (+ z a) (if (<= a 3.3e+78) (- (+ z a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * ((y + t) / (x + (y + t)));
	double tmp;
	if (a <= -1.35e+104) {
		tmp = t_1;
	} else if (a <= -9.6e-117) {
		tmp = z + a;
	} else if (a <= 3.3e+78) {
		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 * ((y + t) / (x + (y + t)))
    if (a <= (-1.35d+104)) then
        tmp = t_1
    else if (a <= (-9.6d-117)) then
        tmp = z + a
    else if (a <= 3.3d+78) 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 * ((y + t) / (x + (y + t)));
	double tmp;
	if (a <= -1.35e+104) {
		tmp = t_1;
	} else if (a <= -9.6e-117) {
		tmp = z + a;
	} else if (a <= 3.3e+78) {
		tmp = (z + a) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * ((y + t) / (x + (y + t)))
	tmp = 0
	if a <= -1.35e+104:
		tmp = t_1
	elif a <= -9.6e-117:
		tmp = z + a
	elif a <= 3.3e+78:
		tmp = (z + a) - b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(Float64(y + t) / Float64(x + Float64(y + t))))
	tmp = 0.0
	if (a <= -1.35e+104)
		tmp = t_1;
	elseif (a <= -9.6e-117)
		tmp = Float64(z + a);
	elseif (a <= 3.3e+78)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * ((y + t) / (x + (y + t)));
	tmp = 0.0;
	if (a <= -1.35e+104)
		tmp = t_1;
	elseif (a <= -9.6e-117)
		tmp = z + a;
	elseif (a <= 3.3e+78)
		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[(N[(y + t), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+104], t$95$1, If[LessEqual[a, -9.6e-117], N[(z + a), $MachinePrecision], If[LessEqual[a, 3.3e+78], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \frac{y + t}{x + \left(y + t\right)}\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-117}:\\
\;\;\;\;z + a\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+78}:\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.34999999999999992e104 or 3.3e78 < a

    1. Initial program 47.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 36.2%

      \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*75.1%

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} \]
      2. +-commutative75.1%

        \[\leadsto a \cdot \frac{\color{blue}{y + t}}{t + \left(x + y\right)} \]
      3. +-commutative75.1%

        \[\leadsto a \cdot \frac{y + t}{\color{blue}{\left(x + y\right) + t}} \]
      4. associate-+r+75.1%

        \[\leadsto a \cdot \frac{y + t}{\color{blue}{x + \left(y + t\right)}} \]
    5. Simplified75.1%

      \[\leadsto \color{blue}{a \cdot \frac{y + t}{x + \left(y + t\right)}} \]

    if -1.34999999999999992e104 < a < -9.60000000000000057e-117

    1. Initial program 71.8%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 52.9%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Taylor expanded in b around 0 69.1%

      \[\leadsto \color{blue}{a + z} \]

    if -9.60000000000000057e-117 < a < 3.3e78

    1. Initial program 71.4%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.9%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+104}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-117}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+78}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 50.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+82}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-282}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{+163}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -9.2e+82)
   z
   (if (<= x -2e-282) (- a b) (if (<= x 3.4e+163) (+ z a) z))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -9.2e+82) {
		tmp = z;
	} else if (x <= -2e-282) {
		tmp = a - b;
	} else if (x <= 3.4e+163) {
		tmp = z + 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 <= (-9.2d+82)) then
        tmp = z
    else if (x <= (-2d-282)) then
        tmp = a - b
    else if (x <= 3.4d+163) then
        tmp = z + 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 <= -9.2e+82) {
		tmp = z;
	} else if (x <= -2e-282) {
		tmp = a - b;
	} else if (x <= 3.4e+163) {
		tmp = z + a;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -9.2e+82:
		tmp = z
	elif x <= -2e-282:
		tmp = a - b
	elif x <= 3.4e+163:
		tmp = z + a
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -9.2e+82)
		tmp = z;
	elseif (x <= -2e-282)
		tmp = Float64(a - b);
	elseif (x <= 3.4e+163)
		tmp = Float64(z + a);
	else
		tmp = z;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -9.2e+82)
		tmp = z;
	elseif (x <= -2e-282)
		tmp = a - b;
	elseif (x <= 3.4e+163)
		tmp = z + a;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.2e+82], z, If[LessEqual[x, -2e-282], N[(a - b), $MachinePrecision], If[LessEqual[x, 3.4e+163], N[(z + a), $MachinePrecision], z]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+82}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-282}:\\
\;\;\;\;a - b\\

\mathbf{elif}\;x \leq 3.4 \cdot 10^{+163}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.19999999999999953e82 or 3.4000000000000001e163 < x

    1. Initial program 55.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 66.2%

      \[\leadsto \color{blue}{z} \]

    if -9.19999999999999953e82 < x < -2e-282

    1. Initial program 70.3%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 38.5%

      \[\leadsto \frac{\color{blue}{y \cdot \left(\left(a + z\right) - b\right)}}{\left(x + t\right) + y} \]
    4. Taylor expanded in z around 0 31.3%

      \[\leadsto \color{blue}{\frac{y \cdot \left(a - b\right)}{t + \left(x + y\right)}} \]
    5. Step-by-step derivation
      1. associate-/l*39.9%

        \[\leadsto \color{blue}{y \cdot \frac{a - b}{t + \left(x + y\right)}} \]
      2. +-commutative39.9%

        \[\leadsto y \cdot \frac{a - b}{t + \color{blue}{\left(y + x\right)}} \]
    6. Simplified39.9%

      \[\leadsto \color{blue}{y \cdot \frac{a - b}{t + \left(y + x\right)}} \]
    7. Taylor expanded in y around inf 55.7%

      \[\leadsto \color{blue}{a - b} \]

    if -2e-282 < x < 3.4000000000000001e163

    1. Initial program 63.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 63.5%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Taylor expanded in b around 0 61.3%

      \[\leadsto \color{blue}{a + z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+82}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-282}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{+163}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 58.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+136}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+112}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -8.8e+136) z (if (<= x 2.4e+112) (- (+ z a) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -8.8e+136) {
		tmp = z;
	} else if (x <= 2.4e+112) {
		tmp = (z + a) - b;
	} else {
		tmp = z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (x <= (-8.8d+136)) then
        tmp = z
    else if (x <= 2.4d+112) then
        tmp = (z + a) - b
    else
        tmp = z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -8.8e+136) {
		tmp = z;
	} else if (x <= 2.4e+112) {
		tmp = (z + a) - b;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -8.8e+136:
		tmp = z
	elif x <= 2.4e+112:
		tmp = (z + a) - b
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -8.8e+136)
		tmp = z;
	elseif (x <= 2.4e+112)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = z;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -8.8e+136)
		tmp = z;
	elseif (x <= 2.4e+112)
		tmp = (z + a) - b;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.8e+136], z, If[LessEqual[x, 2.4e+112], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+136}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 2.4 \cdot 10^{+112}:\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.7999999999999998e136 or 2.4e112 < x

    1. Initial program 53.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 66.7%

      \[\leadsto \color{blue}{z} \]

    if -8.7999999999999998e136 < x < 2.4e112

    1. Initial program 67.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 64.0%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+136}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+112}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 51.6% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-116} \lor \neg \left(a \leq 2.3 \cdot 10^{+35}\right):\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -1.12e-116) (not (<= a 2.3e+35))) (+ z a) (- z b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.12e-116) || !(a <= 2.3e+35)) {
		tmp = z + a;
	} else {
		tmp = z - b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-1.12d-116)) .or. (.not. (a <= 2.3d+35))) then
        tmp = z + a
    else
        tmp = z - b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.12e-116) || !(a <= 2.3e+35)) {
		tmp = z + a;
	} else {
		tmp = z - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -1.12e-116) or not (a <= 2.3e+35):
		tmp = z + a
	else:
		tmp = z - b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -1.12e-116) || !(a <= 2.3e+35))
		tmp = Float64(z + a);
	else
		tmp = Float64(z - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -1.12e-116) || ~((a <= 2.3e+35)))
		tmp = z + a;
	else
		tmp = z - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.12e-116], N[Not[LessEqual[a, 2.3e+35]], $MachinePrecision]], N[(z + a), $MachinePrecision], N[(z - b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{-116} \lor \neg \left(a \leq 2.3 \cdot 10^{+35}\right):\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;z - b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.12e-116 or 2.2999999999999998e35 < a

    1. Initial program 56.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 53.6%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Taylor expanded in b around 0 61.3%

      \[\leadsto \color{blue}{a + z} \]

    if -1.12e-116 < a < 2.2999999999999998e35

    1. Initial program 73.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.2%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Taylor expanded in a around 0 57.3%

      \[\leadsto \color{blue}{z - b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-116} \lor \neg \left(a \leq 2.3 \cdot 10^{+35}\right):\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+203}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+155}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -2.2e+203) z (if (<= x 3.2e+155) (+ z a) z)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -2.2e+203) {
		tmp = z;
	} else if (x <= 3.2e+155) {
		tmp = z + 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+203)) then
        tmp = z
    else if (x <= 3.2d+155) then
        tmp = z + 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+203) {
		tmp = z;
	} else if (x <= 3.2e+155) {
		tmp = z + a;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -2.2e+203:
		tmp = z
	elif x <= 3.2e+155:
		tmp = z + a
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -2.2e+203)
		tmp = z;
	elseif (x <= 3.2e+155)
		tmp = Float64(z + 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+203)
		tmp = z;
	elseif (x <= 3.2e+155)
		tmp = z + a;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.2e+203], z, If[LessEqual[x, 3.2e+155], N[(z + a), $MachinePrecision], z]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+203}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 3.2 \cdot 10^{+155}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.20000000000000004e203 or 3.20000000000000012e155 < x

    1. Initial program 52.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 68.1%

      \[\leadsto \color{blue}{z} \]

    if -2.20000000000000004e203 < x < 3.20000000000000012e155

    1. Initial program 66.0%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 62.1%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Taylor expanded in b around 0 57.1%

      \[\leadsto \color{blue}{a + z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+203}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+155}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 43.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.02 \cdot 10^{+83}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+44}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -1.02e+83) z (if (<= x 7e+44) a z)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.02e+83) {
		tmp = z;
	} else if (x <= 7e+44) {
		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 <= (-1.02d+83)) then
        tmp = z
    else if (x <= 7d+44) 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 <= -1.02e+83) {
		tmp = z;
	} else if (x <= 7e+44) {
		tmp = a;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -1.02e+83:
		tmp = z
	elif x <= 7e+44:
		tmp = a
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -1.02e+83)
		tmp = z;
	elseif (x <= 7e+44)
		tmp = a;
	else
		tmp = z;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -1.02e+83)
		tmp = z;
	elseif (x <= 7e+44)
		tmp = a;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.02e+83], z, If[LessEqual[x, 7e+44], a, z]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+83}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 7 \cdot 10^{+44}:\\
\;\;\;\;a\\

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.0200000000000001e83 or 6.9999999999999998e44 < x

    1. Initial program 53.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 61.0%

      \[\leadsto \color{blue}{z} \]

    if -1.0200000000000001e83 < x < 6.9999999999999998e44

    1. Initial program 70.0%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 48.1%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 32.0% accurate, 21.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(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}
Derivation
  1. Initial program 63.0%

    \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf 32.7%

    \[\leadsto \color{blue}{a} \]
  4. Add Preprocessing

Developer Target 1: 81.9% accurate, 0.3× speedup?

\[\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} \]
(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}

Reproduce

?
herbie shell --seed 2024191 
(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)))