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

Percentage Accurate: 60.6% → 88.0%
Time: 17.4s
Alternatives: 15
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 15 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.6% 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: 88.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(a \cdot \left(y + t\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+280}\right):\\ \;\;\;\;\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)) (* z (+ x y))) (* y b)) (+ y (+ x t)))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+280))) (- (+ 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)) + (z * (x + y))) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+280)) {
		tmp = (z + a) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+280)) {
		tmp = (z + a) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / (y + (x + t))
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 2e+280):
		tmp = (z + a) - b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(a * Float64(y + t)) + Float64(z * Float64(x + y))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+280))
		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)) + (z * (x + y))) - (y * b)) / (y + (x + t));
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 2e+280)))
		tmp = (z + a) - b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+280]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\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)) < -inf.0 or 2.0000000000000001e280 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.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 76.1%

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e280

    1. Initial program 99.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. Recombined 2 regimes into one program.
  4. Final simplification89.3%

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

Alternative 2: 64.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := y + \left(x + t\right)\\ \mathbf{if}\;y \leq -5 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-140}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-187}:\\ \;\;\;\;\frac{z}{\frac{t_2}{x + y}}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+17}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))))
   (if (<= y -5e+68)
     t_1
     (if (<= y -2e-140)
       (+ a (/ y (/ (+ y t) z)))
       (if (<= y -1.1e-187)
         (/ z (/ t_2 (+ x y)))
         (if (<= y 8.5e-97)
           (/ (+ (* t a) (* x z)) (+ x t))
           (if (<= y 4.9e+17)
             (/ (- (* a (+ y t)) (* y b)) t_2)
             (if (<= y 4.2e+34) (+ z a) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = y + (x + t);
	double tmp;
	if (y <= -5e+68) {
		tmp = t_1;
	} else if (y <= -2e-140) {
		tmp = a + (y / ((y + t) / z));
	} else if (y <= -1.1e-187) {
		tmp = z / (t_2 / (x + y));
	} else if (y <= 8.5e-97) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 4.9e+17) {
		tmp = ((a * (y + t)) - (y * b)) / t_2;
	} else if (y <= 4.2e+34) {
		tmp = z + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + a) - b
    t_2 = y + (x + t)
    if (y <= (-5d+68)) then
        tmp = t_1
    else if (y <= (-2d-140)) then
        tmp = a + (y / ((y + t) / z))
    else if (y <= (-1.1d-187)) then
        tmp = z / (t_2 / (x + y))
    else if (y <= 8.5d-97) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 4.9d+17) then
        tmp = ((a * (y + t)) - (y * b)) / t_2
    else if (y <= 4.2d+34) then
        tmp = z + a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = y + (x + t);
	double tmp;
	if (y <= -5e+68) {
		tmp = t_1;
	} else if (y <= -2e-140) {
		tmp = a + (y / ((y + t) / z));
	} else if (y <= -1.1e-187) {
		tmp = z / (t_2 / (x + y));
	} else if (y <= 8.5e-97) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 4.9e+17) {
		tmp = ((a * (y + t)) - (y * b)) / t_2;
	} else if (y <= 4.2e+34) {
		tmp = z + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	t_2 = y + (x + t)
	tmp = 0
	if y <= -5e+68:
		tmp = t_1
	elif y <= -2e-140:
		tmp = a + (y / ((y + t) / z))
	elif y <= -1.1e-187:
		tmp = z / (t_2 / (x + y))
	elif y <= 8.5e-97:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 4.9e+17:
		tmp = ((a * (y + t)) - (y * b)) / t_2
	elif y <= 4.2e+34:
		tmp = z + a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + a) - b)
	t_2 = Float64(y + Float64(x + t))
	tmp = 0.0
	if (y <= -5e+68)
		tmp = t_1;
	elseif (y <= -2e-140)
		tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z)));
	elseif (y <= -1.1e-187)
		tmp = Float64(z / Float64(t_2 / Float64(x + y)));
	elseif (y <= 8.5e-97)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 4.9e+17)
		tmp = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / t_2);
	elseif (y <= 4.2e+34)
		tmp = Float64(z + a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + a) - b;
	t_2 = y + (x + t);
	tmp = 0.0;
	if (y <= -5e+68)
		tmp = t_1;
	elseif (y <= -2e-140)
		tmp = a + (y / ((y + t) / z));
	elseif (y <= -1.1e-187)
		tmp = z / (t_2 / (x + y));
	elseif (y <= 8.5e-97)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 4.9e+17)
		tmp = ((a * (y + t)) - (y * b)) / t_2;
	elseif (y <= 4.2e+34)
		tmp = z + a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+68], t$95$1, If[LessEqual[y, -2e-140], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e-187], N[(z / N[(t$95$2 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-97], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e+17], N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 4.2e+34], N[(z + a), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2 \cdot 10^{-140}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-187}:\\
\;\;\;\;\frac{z}{\frac{t_2}{x + y}}\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

\mathbf{elif}\;y \leq 4.9 \cdot 10^{+17}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -5.0000000000000004e68 or 4.20000000000000035e34 < y

    1. Initial program 38.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 81.2%

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

    if -5.0000000000000004e68 < y < -2e-140

    1. Initial program 71.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 81.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*59.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative59.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified59.2%

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

    if -2e-140 < y < -1.10000000000000004e-187

    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 z around inf 33.2%

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

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

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

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

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

    if -1.10000000000000004e-187 < y < 8.5000000000000002e-97

    1. Initial program 82.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 0 73.3%

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

    if 8.5000000000000002e-97 < y < 4.9e17

    1. Initial program 82.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 70.3%

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

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

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

    if 4.9e17 < y < 4.20000000000000035e34

    1. Initial program 100.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 0 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+68}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-140}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-187}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+17}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 64.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -2.3 \cdot 10^{-136}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

\mathbf{elif}\;y \leq -5.1 \cdot 10^{-187}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{-95}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

\mathbf{elif}\;y \leq 5 \cdot 10^{+17}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+34}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.29999999999999994e70 or 3.99999999999999978e34 < y

    1. Initial program 38.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 81.2%

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

    if -2.29999999999999994e70 < y < -2.29999999999999998e-136

    1. Initial program 70.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 z around 0 80.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*60.6%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative60.6%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified60.6%

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

    if -2.29999999999999998e-136 < y < -5.09999999999999971e-187

    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 a around 0 61.9%

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

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

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

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

    if -5.09999999999999971e-187 < y < 2.7999999999999999e-95

    1. Initial program 83.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 0 73.7%

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

    if 2.7999999999999999e-95 < y < 5e17

    1. Initial program 82.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 70.3%

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

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

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

    if 5e17 < y < 3.99999999999999978e34

    1. Initial program 100.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 0 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+70}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-136}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-187}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-95}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+17}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := a \cdot \left(y + t\right)\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+105}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{\left(t_2 + y \cdot z\right) - y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-187}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-99}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+17}:\\ \;\;\;\;\frac{t_2 - y \cdot b}{t_1}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t))) (t_2 (* a (+ y t))) (t_3 (- (+ z a) b)))
   (if (<= y -5.5e+105)
     t_3
     (if (<= y -3.8e-125)
       (/ (- (+ t_2 (* y z)) (* y b)) (+ y t))
       (if (<= y -2.15e-187)
         (/ (- (* z (+ x y)) (* y b)) t_1)
         (if (<= y 4e-99)
           (/ (+ (* t a) (* x z)) (+ x t))
           (if (<= y 1.4e+17)
             (/ (- t_2 (* y b)) t_1)
             (if (<= y 4.5e+34) (+ z a) t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = a * (y + t);
	double t_3 = (z + a) - b;
	double tmp;
	if (y <= -5.5e+105) {
		tmp = t_3;
	} else if (y <= -3.8e-125) {
		tmp = ((t_2 + (y * z)) - (y * b)) / (y + t);
	} else if (y <= -2.15e-187) {
		tmp = ((z * (x + y)) - (y * b)) / t_1;
	} else if (y <= 4e-99) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 1.4e+17) {
		tmp = (t_2 - (y * b)) / t_1;
	} else if (y <= 4.5e+34) {
		tmp = z + a;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = a * (y + t)
    t_3 = (z + a) - b
    if (y <= (-5.5d+105)) then
        tmp = t_3
    else if (y <= (-3.8d-125)) then
        tmp = ((t_2 + (y * z)) - (y * b)) / (y + t)
    else if (y <= (-2.15d-187)) then
        tmp = ((z * (x + y)) - (y * b)) / t_1
    else if (y <= 4d-99) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 1.4d+17) then
        tmp = (t_2 - (y * b)) / t_1
    else if (y <= 4.5d+34) then
        tmp = z + a
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = a * (y + t);
	double t_3 = (z + a) - b;
	double tmp;
	if (y <= -5.5e+105) {
		tmp = t_3;
	} else if (y <= -3.8e-125) {
		tmp = ((t_2 + (y * z)) - (y * b)) / (y + t);
	} else if (y <= -2.15e-187) {
		tmp = ((z * (x + y)) - (y * b)) / t_1;
	} else if (y <= 4e-99) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 1.4e+17) {
		tmp = (t_2 - (y * b)) / t_1;
	} else if (y <= 4.5e+34) {
		tmp = z + a;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = a * (y + t)
	t_3 = (z + a) - b
	tmp = 0
	if y <= -5.5e+105:
		tmp = t_3
	elif y <= -3.8e-125:
		tmp = ((t_2 + (y * z)) - (y * b)) / (y + t)
	elif y <= -2.15e-187:
		tmp = ((z * (x + y)) - (y * b)) / t_1
	elif y <= 4e-99:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 1.4e+17:
		tmp = (t_2 - (y * b)) / t_1
	elif y <= 4.5e+34:
		tmp = z + a
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(a * Float64(y + t))
	t_3 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -5.5e+105)
		tmp = t_3;
	elseif (y <= -3.8e-125)
		tmp = Float64(Float64(Float64(t_2 + Float64(y * z)) - Float64(y * b)) / Float64(y + t));
	elseif (y <= -2.15e-187)
		tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1);
	elseif (y <= 4e-99)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 1.4e+17)
		tmp = Float64(Float64(t_2 - Float64(y * b)) / t_1);
	elseif (y <= 4.5e+34)
		tmp = Float64(z + a);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = a * (y + t);
	t_3 = (z + a) - b;
	tmp = 0.0;
	if (y <= -5.5e+105)
		tmp = t_3;
	elseif (y <= -3.8e-125)
		tmp = ((t_2 + (y * z)) - (y * b)) / (y + t);
	elseif (y <= -2.15e-187)
		tmp = ((z * (x + y)) - (y * b)) / t_1;
	elseif (y <= 4e-99)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 1.4e+17)
		tmp = (t_2 - (y * b)) / t_1;
	elseif (y <= 4.5e+34)
		tmp = z + a;
	else
		tmp = 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[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5.5e+105], t$95$3, If[LessEqual[y, -3.8e-125], N[(N[(N[(t$95$2 + N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e-187], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4e-99], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+17], N[(N[(t$95$2 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 4.5e+34], N[(z + a), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a \cdot \left(y + t\right)\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+105}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{\left(t_2 + y \cdot z\right) - y \cdot b}{y + t}\\

\mathbf{elif}\;y \leq -2.15 \cdot 10^{-187}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{-99}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{t_2 - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+34}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -5.49999999999999979e105 or 4.5e34 < y

    1. Initial program 36.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 82.0%

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

    if -5.49999999999999979e105 < y < -3.8000000000000001e-125

    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 x around 0 62.4%

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

    if -3.8000000000000001e-125 < y < -2.15e-187

    1. Initial program 68.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 a around 0 60.2%

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

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

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

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

    if -2.15e-187 < y < 4.0000000000000001e-99

    1. Initial program 83.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 0 73.7%

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

    if 4.0000000000000001e-99 < y < 1.4e17

    1. Initial program 82.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 70.3%

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

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

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

    if 1.4e17 < y < 4.5e34

    1. Initial program 100.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 0 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+105}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{\left(a \cdot \left(y + t\right) + y \cdot z\right) - y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-187}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-99}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+17}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 63.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -6.5 \cdot 10^{-141}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

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

\mathbf{elif}\;y \leq 2500000000:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.6999999999999998e68 or 2.5e9 < y

    1. Initial program 39.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 y around inf 80.4%

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

    if -7.6999999999999998e68 < y < -6.4999999999999995e-141

    1. Initial program 71.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 81.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*59.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative59.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified59.2%

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

    if -6.4999999999999995e-141 < y < -1.35e-189

    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 z around inf 33.2%

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

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

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

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

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

    if -1.35e-189 < y < 2.5e9

    1. Initial program 83.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 0 69.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.7 \cdot 10^{+68}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-141}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-189}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{elif}\;y \leq 2500000000:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := a + z \cdot \frac{x + y}{t}\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.04 \cdot 10^{-286}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-295}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+190}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z a) b)) (t_2 (+ a (* z (/ (+ x y) t)))))
   (if (<= t -2.25e+108)
     t_2
     (if (<= t -1.04e-286)
       t_1
       (if (<= t 9.5e-295) z (if (<= t 5.5e+190) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = a + (z * ((x + y) / t));
	double tmp;
	if (t <= -2.25e+108) {
		tmp = t_2;
	} else if (t <= -1.04e-286) {
		tmp = t_1;
	} else if (t <= 9.5e-295) {
		tmp = z;
	} else if (t <= 5.5e+190) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + a) - b
    t_2 = a + (z * ((x + y) / t))
    if (t <= (-2.25d+108)) then
        tmp = t_2
    else if (t <= (-1.04d-286)) then
        tmp = t_1
    else if (t <= 9.5d-295) then
        tmp = z
    else if (t <= 5.5d+190) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = a + (z * ((x + y) / t));
	double tmp;
	if (t <= -2.25e+108) {
		tmp = t_2;
	} else if (t <= -1.04e-286) {
		tmp = t_1;
	} else if (t <= 9.5e-295) {
		tmp = z;
	} else if (t <= 5.5e+190) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	t_2 = a + (z * ((x + y) / t))
	tmp = 0
	if t <= -2.25e+108:
		tmp = t_2
	elif t <= -1.04e-286:
		tmp = t_1
	elif t <= 9.5e-295:
		tmp = z
	elif t <= 5.5e+190:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + a) - b)
	t_2 = Float64(a + Float64(z * Float64(Float64(x + y) / t)))
	tmp = 0.0
	if (t <= -2.25e+108)
		tmp = t_2;
	elseif (t <= -1.04e-286)
		tmp = t_1;
	elseif (t <= 9.5e-295)
		tmp = z;
	elseif (t <= 5.5e+190)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + a) - b;
	t_2 = a + (z * ((x + y) / t));
	tmp = 0.0;
	if (t <= -2.25e+108)
		tmp = t_2;
	elseif (t <= -1.04e-286)
		tmp = t_1;
	elseif (t <= 9.5e-295)
		tmp = z;
	elseif (t <= 5.5e+190)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z * N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+108], t$95$2, If[LessEqual[t, -1.04e-286], t$95$1, If[LessEqual[t, 9.5e-295], z, If[LessEqual[t, 5.5e+190], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.04 \cdot 10^{-286}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-295}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 5.5 \cdot 10^{+190}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.25e108 or 5.5e190 < t

    1. Initial program 56.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 z around 0 63.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \color{blue}{\frac{x + y}{t}} + a \]
    8. Step-by-step derivation
      1. +-commutative68.1%

        \[\leadsto z \cdot \frac{\color{blue}{y + x}}{t} + a \]
    9. Simplified68.1%

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

    if -2.25e108 < t < -1.04e-286 or 9.5e-295 < t < 5.5e190

    1. Initial program 60.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 66.2%

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

    if -1.04e-286 < t < 9.5e-295

    1. Initial program 68.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 x around inf 69.5%

      \[\leadsto \color{blue}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+108}:\\ \;\;\;\;a + z \cdot \frac{x + y}{t}\\ \mathbf{elif}\;t \leq -1.04 \cdot 10^{-286}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-295}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+190}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + z \cdot \frac{x + y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 68.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+189} \lor \neg \left(b \leq 2.8 \cdot 10^{+209}\right):\\
\;\;\;\;\frac{-b}{\frac{t_1}{y}}\\

\mathbf{else}:\\
\;\;\;\;a + z \cdot \left(\frac{x}{t_1} + \frac{y}{t_1}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.1000000000000002e189 or 2.80000000000000013e209 < b

    1. Initial program 41.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 b around inf 34.4%

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

        \[\leadsto \color{blue}{-\frac{b \cdot y}{t + \left(x + y\right)}} \]
      2. associate-/l*75.5%

        \[\leadsto -\color{blue}{\frac{b}{\frac{t + \left(x + y\right)}{y}}} \]
      3. distribute-neg-frac75.5%

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

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

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

    if -4.1000000000000002e189 < b < 2.80000000000000013e209

    1. Initial program 63.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 z around 0 76.5%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-141}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-221}:\\ \;\;\;\;\left(x + y\right) \cdot \frac{z}{x + \left(y + t\right)}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \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 -6.2e+66)
     t_1
     (if (<= y -5.1e-141)
       (+ a (/ y (/ (+ y t) z)))
       (if (<= y 7.2e-221)
         (* (+ x y) (/ z (+ x (+ y t))))
         (if (<= y 7e+34) (+ z a) 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 <= -6.2e+66) {
		tmp = t_1;
	} else if (y <= -5.1e-141) {
		tmp = a + (y / ((y + t) / z));
	} else if (y <= 7.2e-221) {
		tmp = (x + y) * (z / (x + (y + t)));
	} else if (y <= 7e+34) {
		tmp = z + a;
	} 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 <= (-6.2d+66)) then
        tmp = t_1
    else if (y <= (-5.1d-141)) then
        tmp = a + (y / ((y + t) / z))
    else if (y <= 7.2d-221) then
        tmp = (x + y) * (z / (x + (y + t)))
    else if (y <= 7d+34) then
        tmp = z + a
    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 <= -6.2e+66) {
		tmp = t_1;
	} else if (y <= -5.1e-141) {
		tmp = a + (y / ((y + t) / z));
	} else if (y <= 7.2e-221) {
		tmp = (x + y) * (z / (x + (y + t)));
	} else if (y <= 7e+34) {
		tmp = z + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	tmp = 0
	if y <= -6.2e+66:
		tmp = t_1
	elif y <= -5.1e-141:
		tmp = a + (y / ((y + t) / z))
	elif y <= 7.2e-221:
		tmp = (x + y) * (z / (x + (y + t)))
	elif y <= 7e+34:
		tmp = z + a
	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 <= -6.2e+66)
		tmp = t_1;
	elseif (y <= -5.1e-141)
		tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z)));
	elseif (y <= 7.2e-221)
		tmp = Float64(Float64(x + y) * Float64(z / Float64(x + Float64(y + t))));
	elseif (y <= 7e+34)
		tmp = Float64(z + a);
	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 <= -6.2e+66)
		tmp = t_1;
	elseif (y <= -5.1e-141)
		tmp = a + (y / ((y + t) / z));
	elseif (y <= 7.2e-221)
		tmp = (x + y) * (z / (x + (y + t)));
	elseif (y <= 7e+34)
		tmp = z + a;
	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, -6.2e+66], t$95$1, If[LessEqual[y, -5.1e-141], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-221], N[(N[(x + y), $MachinePrecision] * N[(z / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+34], N[(z + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.1 \cdot 10^{-141}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+34}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.20000000000000037e66 or 6.99999999999999996e34 < y

    1. Initial program 38.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 81.2%

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

    if -6.20000000000000037e66 < y < -5.09999999999999977e-141

    1. Initial program 71.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 81.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*59.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative59.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified59.2%

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

    if -5.09999999999999977e-141 < y < 7.20000000000000022e-221

    1. Initial program 77.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 z around inf 35.2%

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

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

      \[\leadsto \frac{\color{blue}{z \cdot \left(y + x\right)}}{\left(x + t\right) + y} \]
    6. Taylor expanded in z around 0 35.2%

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

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

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

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

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

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

        \[\leadsto \frac{z}{\color{blue}{\left(y + t\right)} + x} \cdot \left(y + x\right) \]
    8. Simplified50.0%

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

    if 7.20000000000000022e-221 < y < 6.99999999999999996e34

    1. Initial program 87.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 z around 0 95.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+66}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-141}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-221}:\\ \;\;\;\;\left(x + y\right) \cdot \frac{z}{x + \left(y + t\right)}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-260}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{+219}:\\ \;\;\;\;\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 (+ z (* t (- (/ a x) (/ z x))))))
   (if (<= x -1.9e+116)
     t_1
     (if (<= x 2.1e-260)
       (+ a (/ y (/ (+ y t) z)))
       (if (<= x 9.8e+219) (- (+ z a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (t * ((a / x) - (z / x)));
	double tmp;
	if (x <= -1.9e+116) {
		tmp = t_1;
	} else if (x <= 2.1e-260) {
		tmp = a + (y / ((y + t) / z));
	} else if (x <= 9.8e+219) {
		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 = z + (t * ((a / x) - (z / x)))
    if (x <= (-1.9d+116)) then
        tmp = t_1
    else if (x <= 2.1d-260) then
        tmp = a + (y / ((y + t) / z))
    else if (x <= 9.8d+219) 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 = z + (t * ((a / x) - (z / x)));
	double tmp;
	if (x <= -1.9e+116) {
		tmp = t_1;
	} else if (x <= 2.1e-260) {
		tmp = a + (y / ((y + t) / z));
	} else if (x <= 9.8e+219) {
		tmp = (z + a) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (t * ((a / x) - (z / x)))
	tmp = 0
	if x <= -1.9e+116:
		tmp = t_1
	elif x <= 2.1e-260:
		tmp = a + (y / ((y + t) / z))
	elif x <= 9.8e+219:
		tmp = (z + a) - b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(t * Float64(Float64(a / x) - Float64(z / x))))
	tmp = 0.0
	if (x <= -1.9e+116)
		tmp = t_1;
	elseif (x <= 2.1e-260)
		tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z)));
	elseif (x <= 9.8e+219)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (t * ((a / x) - (z / x)));
	tmp = 0.0;
	if (x <= -1.9e+116)
		tmp = t_1;
	elseif (x <= 2.1e-260)
		tmp = a + (y / ((y + t) / z));
	elseif (x <= 9.8e+219)
		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[(z + N[(t * N[(N[(a / x), $MachinePrecision] - N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+116], t$95$1, If[LessEqual[x, 2.1e-260], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+219], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-260}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.8999999999999999e116 or 9.80000000000000007e219 < x

    1. Initial program 52.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 0 48.0%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in t around 0 69.7%

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

    if -1.8999999999999999e116 < x < 2.10000000000000005e-260

    1. Initial program 67.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 z around 0 72.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*65.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative65.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified65.2%

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

    if 2.10000000000000005e-260 < x < 9.80000000000000007e219

    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 y around inf 64.0%

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

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

Alternative 10: 59.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+105}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-262}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+220}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -1.85e+105)
   (/ z (/ (+ y (+ x t)) (+ x y)))
   (if (<= x 4.2e-262)
     (+ a (/ y (/ (+ y t) z)))
     (if (<= x 1.8e+220) (- (+ z a) b) (+ z (* t (- (/ a x) (/ z x))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.85e+105) {
		tmp = z / ((y + (x + t)) / (x + y));
	} else if (x <= 4.2e-262) {
		tmp = a + (y / ((y + t) / z));
	} else if (x <= 1.8e+220) {
		tmp = (z + a) - b;
	} else {
		tmp = z + (t * ((a / x) - (z / 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) :: tmp
    if (x <= (-1.85d+105)) then
        tmp = z / ((y + (x + t)) / (x + y))
    else if (x <= 4.2d-262) then
        tmp = a + (y / ((y + t) / z))
    else if (x <= 1.8d+220) then
        tmp = (z + a) - b
    else
        tmp = z + (t * ((a / x) - (z / x)))
    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.85e+105) {
		tmp = z / ((y + (x + t)) / (x + y));
	} else if (x <= 4.2e-262) {
		tmp = a + (y / ((y + t) / z));
	} else if (x <= 1.8e+220) {
		tmp = (z + a) - b;
	} else {
		tmp = z + (t * ((a / x) - (z / x)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -1.85e+105:
		tmp = z / ((y + (x + t)) / (x + y))
	elif x <= 4.2e-262:
		tmp = a + (y / ((y + t) / z))
	elif x <= 1.8e+220:
		tmp = (z + a) - b
	else:
		tmp = z + (t * ((a / x) - (z / x)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -1.85e+105)
		tmp = Float64(z / Float64(Float64(y + Float64(x + t)) / Float64(x + y)));
	elseif (x <= 4.2e-262)
		tmp = Float64(a + Float64(y / Float64(Float64(y + t) / z)));
	elseif (x <= 1.8e+220)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = Float64(z + Float64(t * Float64(Float64(a / x) - Float64(z / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -1.85e+105)
		tmp = z / ((y + (x + t)) / (x + y));
	elseif (x <= 4.2e-262)
		tmp = a + (y / ((y + t) / z));
	elseif (x <= 1.8e+220)
		tmp = (z + a) - b;
	else
		tmp = z + (t * ((a / x) - (z / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.85e+105], N[(z / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-262], N[(a + N[(y / N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+220], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + N[(t * N[(N[(a / x), $MachinePrecision] - N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+105}:\\
\;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-262}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.84999999999999992e105

    1. Initial program 55.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 z around inf 43.4%

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

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

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

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

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

    if -1.84999999999999992e105 < x < 4.1999999999999999e-262

    1. Initial program 67.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 z around 0 72.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*65.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative65.8%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified65.8%

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

    if 4.1999999999999999e-262 < x < 1.80000000000000009e220

    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 y around inf 64.0%

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

    if 1.80000000000000009e220 < x

    1. Initial program 49.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 0 42.1%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in t around 0 71.3%

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

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

Alternative 11: 57.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-141}:\\
\;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-219}:\\
\;\;\;\;\frac{x}{\frac{x + t}{z}}\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+34}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.49999999999999988e67 or 1.99999999999999989e34 < y

    1. Initial program 38.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 81.2%

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

    if -2.49999999999999988e67 < y < -5.4999999999999998e-141

    1. Initial program 71.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 81.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t + y}} + a \]
    8. Step-by-step derivation
      1. associate-/l*59.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{t + y}{z}}} + a \]
      2. +-commutative59.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{y + t}}{z}} + a \]
    9. Simplified59.2%

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

    if -5.4999999999999998e-141 < y < 6.1999999999999994e-219

    1. Initial program 77.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 0 64.4%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in a around 0 34.1%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t + x}} \]
    5. Step-by-step derivation
      1. associate-/l*48.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} \]
    6. Simplified48.9%

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

    if 6.1999999999999994e-219 < y < 1.99999999999999989e34

    1. Initial program 87.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 z around 0 95.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+67}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-141}:\\ \;\;\;\;a + \frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-219}:\\ \;\;\;\;\frac{x}{\frac{x + t}{z}}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.4% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.16e141 or 1e216 < x

    1. Initial program 50.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 x around inf 65.0%

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

    if -1.16e141 < x < 1e216

    1. Initial program 61.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 61.5%

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

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

Alternative 13: 51.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.9 \cdot 10^{+200} \lor \neg \left(b \leq 5.2 \cdot 10^{+235}\right):\\
\;\;\;\;-b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.89999999999999982e200 or 5.1999999999999996e235 < b

    1. Initial program 47.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 b around inf 36.7%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot b} \]
    7. Step-by-step derivation
      1. neg-mul-146.0%

        \[\leadsto \color{blue}{-b} \]
    8. Simplified46.0%

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

    if -4.89999999999999982e200 < b < 5.1999999999999996e235

    1. Initial program 61.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 z around 0 73.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 45.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-25}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+26}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.49999999999999989e-25 or 1.20000000000000002e26 < t

    1. Initial program 57.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 46.4%

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

    if -7.49999999999999989e-25 < t < 1.20000000000000002e26

    1. Initial program 62.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 46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-25}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+26}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 33.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 59.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 t around inf 34.3%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification34.3%

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 82.2% 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 2024019 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :herbie-target
  (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))

  (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))