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

Percentage Accurate: 59.7% → 92.2%
Time: 14.6s
Alternatives: 16
Speedup: 1.1×

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 16 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: 59.7% 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: 92.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(y + x\right)\\ \mathbf{if}\;y \leq -1.9 \cdot 10^{+196} \lor \neg \left(y \leq 4 \cdot 10^{+190}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot \left(\frac{x}{t_1} + \frac{y}{t_1}\right) + a \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y + t}{y + \left(x + t\right)}\right)\right)\right) - \frac{y \cdot b}{t_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ y x))))
   (if (or (<= y -1.9e+196) (not (<= y 4e+190)))
     (- (+ a z) b)
     (-
      (+
       (* z (+ (/ x t_1) (/ y t_1)))
       (* a (expm1 (log1p (/ (+ y t) (+ y (+ x t)))))))
      (/ (* y b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (y + x);
	double tmp;
	if ((y <= -1.9e+196) || !(y <= 4e+190)) {
		tmp = (a + z) - b;
	} else {
		tmp = ((z * ((x / t_1) + (y / t_1))) + (a * expm1(log1p(((y + t) / (y + (x + t))))))) - ((y * b) / t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (y + x);
	double tmp;
	if ((y <= -1.9e+196) || !(y <= 4e+190)) {
		tmp = (a + z) - b;
	} else {
		tmp = ((z * ((x / t_1) + (y / t_1))) + (a * Math.expm1(Math.log1p(((y + t) / (y + (x + t))))))) - ((y * b) / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t + (y + x)
	tmp = 0
	if (y <= -1.9e+196) or not (y <= 4e+190):
		tmp = (a + z) - b
	else:
		tmp = ((z * ((x / t_1) + (y / t_1))) + (a * math.expm1(math.log1p(((y + t) / (y + (x + t))))))) - ((y * b) / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(y + x))
	tmp = 0.0
	if ((y <= -1.9e+196) || !(y <= 4e+190))
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = Float64(Float64(Float64(z * Float64(Float64(x / t_1) + Float64(y / t_1))) + Float64(a * expm1(log1p(Float64(Float64(y + t) / Float64(y + Float64(x + t))))))) - Float64(Float64(y * b) / t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -1.9e+196], N[Not[LessEqual[y, 4e+190]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(Exp[N[Log[1 + N[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+196} \lor \neg \left(y \leq 4 \cdot 10^{+190}\right):\\
\;\;\;\;\left(a + z\right) - b\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot \left(\frac{x}{t_1} + \frac{y}{t_1}\right) + a \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y + t}{y + \left(x + t\right)}\right)\right)\right) - \frac{y \cdot b}{t_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9000000000000001e196 or 4.0000000000000003e190 < y

    1. Initial program 13.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. Taylor expanded in y around inf 95.7%

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

    if -1.9000000000000001e196 < y < 4.0000000000000003e190

    1. Initial program 67.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. Taylor expanded in z around 0 78.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)}} \]
    3. Step-by-step derivation
      1. div-inv78.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + a \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(y + t\right) \cdot \frac{1}{\left(y + x\right) + t}\right)\right)}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      2. un-div-inv94.6%

        \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + a \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\frac{y + t}{\left(y + x\right) + t}}\right)\right)\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      3. associate-+l+94.6%

        \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + a \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y + t}{\color{blue}{y + \left(x + t\right)}}\right)\right)\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
    8. Applied egg-rr94.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+196} \lor \neg \left(y \leq 4 \cdot 10^{+190}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot \left(\frac{x}{t + \left(y + x\right)} + \frac{y}{t + \left(y + x\right)}\right) + a \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y + t}{y + \left(x + t\right)}\right)\right)\right) - \frac{y \cdot b}{t + \left(y + x\right)}\\ \end{array} \]

Alternative 2: 89.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := t + \left(y + x\right)\\ t_3 := \left(z \cdot \left(\frac{x}{t_2} + \frac{y}{t_2}\right) + \left(y + t\right) \cdot \frac{a}{t_2}\right) - \frac{y \cdot b}{t_2}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) (+ y (+ x t))))
        (t_2 (+ t (+ y x)))
        (t_3
         (-
          (+ (* z (+ (/ x t_2) (/ y t_2))) (* (+ y t) (/ a t_2)))
          (/ (* y b) t_2))))
   (if (<= t_1 (- INFINITY))
     t_3
     (if (<= t_1 2e+83) t_1 (if (<= t_1 INFINITY) t_3 (- (+ a z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double t_2 = t + (y + x);
	double t_3 = ((z * ((x / t_2) + (y / t_2))) + ((y + t) * (a / t_2))) - ((y * b) / t_2);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_1 <= 2e+83) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double t_2 = t + (y + x);
	double t_3 = ((z * ((x / t_2) + (y / t_2))) + ((y + t) * (a / t_2))) - ((y * b) / t_2);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else if (t_1 <= 2e+83) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t))
	t_2 = t + (y + x)
	t_3 = ((z * ((x / t_2) + (y / t_2))) + ((y + t) * (a / t_2))) - ((y * b) / t_2)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_3
	elif t_1 <= 2e+83:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = t_3
	else:
		tmp = (a + z) - b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	t_2 = Float64(t + Float64(y + x))
	t_3 = Float64(Float64(Float64(z * Float64(Float64(x / t_2) + Float64(y / t_2))) + Float64(Float64(y + t) * Float64(a / t_2))) - Float64(Float64(y * b) / t_2))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_1 <= 2e+83)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(a + z) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	t_2 = t + (y + x);
	t_3 = ((z * ((x / t_2) + (y / t_2))) + ((y + t) * (a / t_2))) - ((y * b) / t_2);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_3;
	elseif (t_1 <= 2e+83)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = t_3;
	else
		tmp = (a + z) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(N[(x / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$3, If[LessEqual[t$95$1, 2e+83], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 25.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. Taylor expanded in z around 0 48.9%

      \[\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)}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u41.5%

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

        \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)}\right)} - 1\right)}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      3. associate-/l*58.4%

        \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{a}{\frac{t + \left(x + y\right)}{t + y}}}\right)} - 1\right)\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      4. +-commutative58.4%

        \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \left(e^{\mathsf{log1p}\left(\frac{a}{\frac{t + \color{blue}{\left(y + x\right)}}{t + y}}\right)} - 1\right)\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
    4. Applied egg-rr58.4%

      \[\leadsto \left(z \cdot \left(\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a}{\frac{t + \left(y + x\right)}{t + y}}\right)} - 1\right)}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
    5. Step-by-step derivation
      1. expm1-def58.4%

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

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

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

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

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

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

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

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

    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.00000000000000006e83

    1. Initial program 99.8%

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

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

    1. Initial program 0.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. Taylor expanded in y around inf 82.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -\infty:\\ \;\;\;\;\left(z \cdot \left(\frac{x}{t + \left(y + x\right)} + \frac{y}{t + \left(y + x\right)}\right) + \left(y + t\right) \cdot \frac{a}{t + \left(y + x\right)}\right) - \frac{y \cdot b}{t + \left(y + x\right)}\\ \mathbf{elif}\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+83}:\\ \;\;\;\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq \infty:\\ \;\;\;\;\left(z \cdot \left(\frac{x}{t + \left(y + x\right)} + \frac{y}{t + \left(y + x\right)}\right) + \left(y + t\right) \cdot \frac{a}{t + \left(y + x\right)}\right) - \frac{y \cdot b}{t + \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 3: 87.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+282}\right):\\
\;\;\;\;\left(a + z\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.00000000000000007e282 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 5.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. Taylor expanded in y around inf 74.5%

      \[\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.00000000000000007e282

    1. Initial program 99.8%

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

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

Alternative 4: 87.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(y + x\right)\\ t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(z + a \cdot \left(\left(y + t\right) \cdot \frac{1}{t_1}\right)\right) - \frac{y \cdot b}{t_1}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+282}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ y x)))
        (t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
   (if (<= t_2 (- INFINITY))
     (- (+ z (* a (* (+ y t) (/ 1.0 t_1)))) (/ (* y b) t_1))
     (if (<= t_2 2e+282) t_2 (- (+ a z) b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (y + x);
	double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = (z + (a * ((y + t) * (1.0 / t_1)))) - ((y * b) / t_1);
	} else if (t_2 <= 2e+282) {
		tmp = t_2;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (y + x);
	double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = (z + (a * ((y + t) * (1.0 / t_1)))) - ((y * b) / t_1);
	} else if (t_2 <= 2e+282) {
		tmp = t_2;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t + (y + x)
	t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = (z + (a * ((y + t) * (1.0 / t_1)))) - ((y * b) / t_1)
	elif t_2 <= 2e+282:
		tmp = t_2
	else:
		tmp = (a + z) - b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(y + x))
	t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(Float64(z + Float64(a * Float64(Float64(y + t) * Float64(1.0 / t_1)))) - Float64(Float64(y * b) / t_1));
	elseif (t_2 <= 2e+282)
		tmp = t_2;
	else
		tmp = Float64(Float64(a + z) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t + (y + x);
	t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = (z + (a * ((y + t) * (1.0 / t_1)))) - ((y * b) / t_1);
	elseif (t_2 <= 2e+282)
		tmp = t_2;
	else
		tmp = (a + z) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(z + N[(a * N[(N[(y + t), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+282], t$95$2, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+282}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 6.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. Taylor expanded in z around 0 35.3%

      \[\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)}} \]
    3. Step-by-step derivation
      1. div-inv35.3%

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

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

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

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

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

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

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

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

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

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

    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.00000000000000007e282

    1. Initial program 99.8%

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

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

    1. Initial program 4.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. Taylor expanded in y around inf 69.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -\infty:\\ \;\;\;\;\left(z + a \cdot \left(\left(y + t\right) \cdot \frac{1}{t + \left(y + x\right)}\right)\right) - \frac{y \cdot b}{t + \left(y + x\right)}\\ \mathbf{elif}\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+282}:\\ \;\;\;\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 5: 92.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+185} \lor \neg \left(y \leq 3.45 \cdot 10^{+190}\right):\\
\;\;\;\;\left(a + z\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.7999999999999998e185 or 3.45e190 < y

    1. Initial program 15.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. Taylor expanded in y around inf 95.9%

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

    if -3.7999999999999998e185 < y < 3.45e190

    1. Initial program 68.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. Taylor expanded in z around 0 78.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)}} \]
    3. Step-by-step derivation
      1. div-inv78.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+185} \lor \neg \left(y \leq 3.45 \cdot 10^{+190}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot \left(\frac{x}{t + \left(y + x\right)} + \frac{y}{t + \left(y + x\right)}\right) + a \cdot \left(\left(y + t\right) \cdot \frac{1}{t + \left(y + x\right)}\right)\right) - \frac{y \cdot b}{t + \left(y + x\right)}\\ \end{array} \]

Alternative 6: 56.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -2.6 \cdot 10^{-43}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\

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

\mathbf{elif}\;b \leq 2.7 \cdot 10^{+20}:\\
\;\;\;\;\frac{a \cdot t + z \cdot x}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.99999999999999978e122 or 2.7e20 < b

    1. Initial program 48.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. Taylor expanded in y around inf 36.4%

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(\left(a + z\right) - b\right)}{\left(x + t\right) + y}\right)} - 1} \]
      3. associate-/l*25.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{\left(x + t\right) + y}{\left(a + z\right) - b}}}\right)} - 1 \]
      4. +-commutative25.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{\color{blue}{\left(t + x\right)} + y}{\left(a + z\right) - b}}\right)} - 1 \]
      5. associate-+r+25.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{\color{blue}{t + \left(x + y\right)}}{\left(a + z\right) - b}}\right)} - 1 \]
      6. +-commutative25.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{t + \color{blue}{\left(y + x\right)}}{\left(a + z\right) - b}}\right)} - 1 \]
      7. associate--l+25.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{t + \left(y + x\right)}{\color{blue}{a + \left(z - b\right)}}}\right)} - 1 \]
    4. Applied egg-rr25.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{t + \left(y + x\right)}{a + \left(z - b\right)}}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def34.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{t + \left(y + x\right)}{a + \left(z - b\right)}}\right)\right)} \]
      2. expm1-log1p62.2%

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

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

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

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

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

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

    if -9.99999999999999978e122 < b < -2.6e-43

    1. Initial program 53.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. Taylor expanded in a around inf 32.1%

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

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

        \[\leadsto \frac{a}{\frac{t + \color{blue}{\left(y + x\right)}}{t + y}} \]
    4. Simplified65.7%

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

    if -2.6e-43 < b < 2.14999999999999999e-175

    1. Initial program 58.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. Taylor expanded in y around inf 69.9%

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

    if 2.14999999999999999e-175 < b < 2.7e20

    1. Initial program 75.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. Taylor expanded in y around 0 73.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+123}:\\ \;\;\;\;\frac{y}{t + \left(y + x\right)} \cdot \left(a + \left(z - b\right)\right)\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-43}:\\ \;\;\;\;\frac{a}{\frac{t + \left(y + x\right)}{y + t}}\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-175}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+20}:\\ \;\;\;\;\frac{a \cdot t + z \cdot x}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t + \left(y + x\right)} \cdot \left(a + \left(z - b\right)\right)\\ \end{array} \]

Alternative 7: 56.7% accurate, 1.1× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-300}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-169}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.05e-32 or 6.5000000000000002e-169 < y

    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. Taylor expanded in y around inf 71.8%

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

    if -1.05e-32 < y < -1.14000000000000001e-215

    1. Initial program 77.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. Taylor expanded in z around inf 47.4%

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

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

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

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

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

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

    if -1.14000000000000001e-215 < y < -4.4e-304

    1. Initial program 52.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. Taylor expanded in a around inf 31.3%

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

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

        \[\leadsto \frac{a}{\frac{t + \color{blue}{\left(y + x\right)}}{t + y}} \]
    4. Simplified67.7%

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

    if -4.4e-304 < y < 1.90000000000000006e-300

    1. Initial program 61.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. Taylor expanded in x around inf 80.8%

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

    if 1.90000000000000006e-300 < y < 6.5000000000000002e-169

    1. Initial program 81.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. Taylor expanded in x around 0 50.7%

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

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

        \[\leadsto \frac{a \cdot \left(t + y\right) + \left(y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      3. distribute-lft-out--50.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{-32}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-215}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-304}:\\ \;\;\;\;\frac{a}{\frac{t + \left(y + x\right)}{y + t}}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-300}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-169}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 8: 57.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -1.08 \cdot 10^{-215}:\\
\;\;\;\;\frac{z}{\frac{t_1}{y + x}}\\

\mathbf{elif}\;y \leq -9.6 \cdot 10^{-299}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-301}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-169}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.60000000000000009e-31 or 3.19999999999999995e-169 < y

    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. Taylor expanded in y around inf 71.8%

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

    if -1.60000000000000009e-31 < y < -1.08e-215

    1. Initial program 77.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. Taylor expanded in z around inf 47.4%

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

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

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

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

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

    if -1.08e-215 < y < -9.60000000000000077e-299

    1. Initial program 52.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. Taylor expanded in a around inf 31.3%

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

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

        \[\leadsto \frac{a}{\frac{t + \color{blue}{\left(y + x\right)}}{t + y}} \]
    4. Simplified67.7%

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

    if -9.60000000000000077e-299 < y < 4.5000000000000002e-301

    1. Initial program 61.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. Taylor expanded in x around inf 80.8%

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

    if 4.5000000000000002e-301 < y < 3.19999999999999995e-169

    1. Initial program 81.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. Taylor expanded in x around 0 50.7%

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

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

        \[\leadsto \frac{a \cdot \left(t + y\right) + \left(y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      3. distribute-lft-out--50.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{-31}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-215}:\\ \;\;\;\;\frac{z}{\frac{t + \left(y + x\right)}{y + x}}\\ \mathbf{elif}\;y \leq -9.6 \cdot 10^{-299}:\\ \;\;\;\;\frac{a}{\frac{t + \left(y + x\right)}{y + t}}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-301}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-169}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 9: 60.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -1.14 \cdot 10^{-215}:\\
\;\;\;\;\frac{z}{\frac{t_1}{y + x}}\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-291}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.90000000000000007e-26 or 1.5e-164 < y

    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. Taylor expanded in y around inf 71.8%

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

    if -1.90000000000000007e-26 < y < -1.14000000000000001e-215

    1. Initial program 77.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. Taylor expanded in z around inf 47.4%

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

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

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

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

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

    if -1.14000000000000001e-215 < y < -1.8999999999999999e-291

    1. Initial program 52.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. Taylor expanded in a around inf 31.3%

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

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

        \[\leadsto \frac{a}{\frac{t + \color{blue}{\left(y + x\right)}}{t + y}} \]
    4. Simplified67.7%

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

    if -1.8999999999999999e-291 < y < 1.5e-164

    1. Initial program 79.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. Taylor expanded in y around 0 55.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-26}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-215}:\\ \;\;\;\;\frac{z}{\frac{t + \left(y + x\right)}{y + x}}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-291}:\\ \;\;\;\;\frac{a}{\frac{t + \left(y + x\right)}{y + t}}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-164}:\\ \;\;\;\;\frac{a \cdot t + z \cdot x}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 10: 56.8% accurate, 1.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.39999999999999992e-28 or 6.40000000000000013e-168 < y

    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. Taylor expanded in y around inf 71.8%

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

    if -4.39999999999999992e-28 < y < 3.70000000000000008e-293

    1. Initial program 68.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. Taylor expanded in z around inf 38.7%

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

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

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

        \[\leadsto \frac{z}{\frac{t + \left(y + x\right)}{\color{blue}{y + x}}} \]
    4. Simplified55.6%

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

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

    if 3.70000000000000008e-293 < y < 6.40000000000000013e-168

    1. Initial program 81.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. Taylor expanded in x around 0 50.7%

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

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

        \[\leadsto \frac{a \cdot \left(t + y\right) + \left(y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      3. distribute-lft-out--50.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{-28}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-293}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-168}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 11: 55.9% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq -1.14 \cdot 10^{-215}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.04999999999999999e-84 or 5.4999999999999999e-168 < y

    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. Taylor expanded in y around inf 69.3%

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

    if -1.04999999999999999e-84 < y < -1.14000000000000001e-215

    1. Initial program 71.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. Taylor expanded in x around inf 52.1%

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

    if -1.14000000000000001e-215 < y < 5.4999999999999999e-168

    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. Taylor expanded in x around 0 39.2%

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

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

        \[\leadsto \frac{a \cdot \left(t + y\right) + \left(y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      3. distribute-lft-out--39.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{-84}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-215}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-168}:\\ \;\;\;\;a + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 12: 56.5% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.6000000000000003e-30 or 4.6000000000000003e-167 < y

    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. Taylor expanded in y around inf 71.8%

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

    if -3.6000000000000003e-30 < y < 3.70000000000000014e-299

    1. Initial program 68.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. Taylor expanded in z around inf 38.7%

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

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

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

        \[\leadsto \frac{z}{\frac{t + \left(y + x\right)}{\color{blue}{y + x}}} \]
    4. Simplified55.6%

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

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

    if 3.70000000000000014e-299 < y < 4.6000000000000003e-167

    1. Initial program 81.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. Taylor expanded in x around 0 50.7%

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

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

        \[\leadsto \frac{a \cdot \left(t + y\right) + \left(y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      3. distribute-lft-out--50.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{-30}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-299}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-167}:\\ \;\;\;\;a + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 13: 56.6% accurate, 1.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{-170}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.10000000000000011e-32 or 2.29999999999999987e-170 < y

    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. Taylor expanded in y around inf 71.8%

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

    if -3.10000000000000011e-32 < y < 9.50000000000000046e-296

    1. Initial program 68.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. Taylor expanded in z around inf 38.7%

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

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

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

        \[\leadsto \frac{z}{\frac{t + \left(y + x\right)}{\color{blue}{y + x}}} \]
    4. Simplified55.6%

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

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

    if 9.50000000000000046e-296 < y < 2.29999999999999987e-170

    1. Initial program 81.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. Taylor expanded in x around 0 50.7%

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

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

        \[\leadsto \frac{a \cdot \left(t + y\right) + \left(y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      3. distribute-lft-out--50.7%

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

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

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

      \[\leadsto a + \color{blue}{-1 \cdot \frac{b \cdot y}{t}} \]
    7. Step-by-step derivation
      1. associate-*r/53.8%

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

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

        \[\leadsto a + \frac{\color{blue}{\left(-1 \cdot y\right) \cdot b}}{t} \]
      4. mul-1-neg53.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{-32}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-296}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-170}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 14: 55.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq -1.08 \cdot 10^{-215}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 4.3 \cdot 10^{-165}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.50000000000000026e-84 or 4.30000000000000007e-165 < y

    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. Taylor expanded in y around inf 69.3%

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

    if -7.50000000000000026e-84 < y < -1.08e-215

    1. Initial program 71.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. Taylor expanded in x around inf 52.1%

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

    if -1.08e-215 < y < 4.30000000000000007e-165

    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. Taylor expanded in t around inf 42.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-84}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-215}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-165}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]

Alternative 15: 44.6% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 6.5 \cdot 10^{+154}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.80000000000000007e24 or 6.5000000000000005e154 < x

    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. Taylor expanded in x around inf 48.6%

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

    if -8.80000000000000007e24 < x < 6.5000000000000005e154

    1. Initial program 63.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. Taylor expanded in t around inf 49.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+24}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+154}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 16: 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 57.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. Taylor expanded in t around inf 37.8%

    \[\leadsto \color{blue}{a} \]
  3. Final simplification37.8%

    \[\leadsto a \]

Developer target: 81.8% 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 2023302 
(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)))