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

Percentage Accurate: 60.7% → 98.7%
Time: 12.4s
Alternatives: 17
Speedup: 0.9×

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 17 alternatives:

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

Initial Program: 60.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: 98.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t + y\right)\\ \mathsf{fma}\left(a, \frac{t + y}{t\_1}, z \cdot \frac{y + x}{t\_1}\right) - b \cdot \frac{y}{t\_1} \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ t y))))
   (- (fma a (/ (+ t y) t_1) (* z (/ (+ y x) t_1))) (* b (/ y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t + y);
	return fma(a, ((t + y) / t_1), (z * ((y + x) / t_1))) - (b * (y / t_1));
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(t + y))
	return Float64(fma(a, Float64(Float64(t + y) / t_1), Float64(z * Float64(Float64(y + x) / t_1))) - Float64(b * Float64(y / t_1)))
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
\mathsf{fma}\left(a, \frac{t + y}{t\_1}, z \cdot \frac{y + x}{t\_1}\right) - b \cdot \frac{y}{t\_1}
\end{array}
\end{array}
Derivation
  1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{y}{x + \left(t + y\right)}} \]
  6. Add Preprocessing

Alternative 2: 92.0% accurate, 0.3× speedup?

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

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

\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 4.99999999999999961e273 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub6.2%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative6.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative6.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+6.3%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+6.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative6.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*18.4%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr18.4%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\left(-a\right) + \left(-z\right)\right)\right)} - y \cdot \frac{b}{x + \left(y + t\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)) < 4.99999999999999961e273

    1. Initial program 99.7%

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

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

Alternative 3: 75.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{y + x}\\ t_2 := z + \left(a \cdot t\_1 - b \cdot t\_1\right)\\ t_3 := \left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ t_4 := y + \left(t + x\right)\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{+193}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -235000000000:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq 3800:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{+61}:\\ \;\;\;\;\frac{a \cdot \left(t + y\right) + z \cdot \left(y + x\right)}{t\_4}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+147}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\ \;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_4}\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \frac{-1}{\frac{t\_4}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ y (+ y x)))
        (t_2 (+ z (- (* a t_1) (* b t_1))))
        (t_3 (- (+ a (/ (* y z) (+ t y))) (* b (/ y (+ t y)))))
        (t_4 (+ y (+ t x))))
   (if (<= t -4.4e+193)
     t_3
     (if (<= t -235000000000.0)
       (- (+ a z) (* y (/ b (+ x (+ t y)))))
       (if (<= t 3800.0)
         t_2
         (if (<= t 5.1e+61)
           (/ (+ (* a (+ t y)) (* z (+ y x))) t_4)
           (if (<= t 1.95e+147)
             t_2
             (if (<= t 5.2e+230)
               t_3
               (if (<= t 2.2e+255)
                 (* z (* (+ y x) (/ 1.0 t_4)))
                 (+ a (* b (/ -1.0 (/ t_4 y)))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y / (y + x);
	double t_2 = z + ((a * t_1) - (b * t_1));
	double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	double t_4 = y + (t + x);
	double tmp;
	if (t <= -4.4e+193) {
		tmp = t_3;
	} else if (t <= -235000000000.0) {
		tmp = (a + z) - (y * (b / (x + (t + y))));
	} else if (t <= 3800.0) {
		tmp = t_2;
	} else if (t <= 5.1e+61) {
		tmp = ((a * (t + y)) + (z * (y + x))) / t_4;
	} else if (t <= 1.95e+147) {
		tmp = t_2;
	} else if (t <= 5.2e+230) {
		tmp = t_3;
	} else if (t <= 2.2e+255) {
		tmp = z * ((y + x) * (1.0 / t_4));
	} else {
		tmp = a + (b * (-1.0 / (t_4 / y)));
	}
	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 = y / (y + x)
    t_2 = z + ((a * t_1) - (b * t_1))
    t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
    t_4 = y + (t + x)
    if (t <= (-4.4d+193)) then
        tmp = t_3
    else if (t <= (-235000000000.0d0)) then
        tmp = (a + z) - (y * (b / (x + (t + y))))
    else if (t <= 3800.0d0) then
        tmp = t_2
    else if (t <= 5.1d+61) then
        tmp = ((a * (t + y)) + (z * (y + x))) / t_4
    else if (t <= 1.95d+147) then
        tmp = t_2
    else if (t <= 5.2d+230) then
        tmp = t_3
    else if (t <= 2.2d+255) then
        tmp = z * ((y + x) * (1.0d0 / t_4))
    else
        tmp = a + (b * ((-1.0d0) / (t_4 / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y / (y + x);
	double t_2 = z + ((a * t_1) - (b * t_1));
	double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	double t_4 = y + (t + x);
	double tmp;
	if (t <= -4.4e+193) {
		tmp = t_3;
	} else if (t <= -235000000000.0) {
		tmp = (a + z) - (y * (b / (x + (t + y))));
	} else if (t <= 3800.0) {
		tmp = t_2;
	} else if (t <= 5.1e+61) {
		tmp = ((a * (t + y)) + (z * (y + x))) / t_4;
	} else if (t <= 1.95e+147) {
		tmp = t_2;
	} else if (t <= 5.2e+230) {
		tmp = t_3;
	} else if (t <= 2.2e+255) {
		tmp = z * ((y + x) * (1.0 / t_4));
	} else {
		tmp = a + (b * (-1.0 / (t_4 / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y / (y + x)
	t_2 = z + ((a * t_1) - (b * t_1))
	t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
	t_4 = y + (t + x)
	tmp = 0
	if t <= -4.4e+193:
		tmp = t_3
	elif t <= -235000000000.0:
		tmp = (a + z) - (y * (b / (x + (t + y))))
	elif t <= 3800.0:
		tmp = t_2
	elif t <= 5.1e+61:
		tmp = ((a * (t + y)) + (z * (y + x))) / t_4
	elif t <= 1.95e+147:
		tmp = t_2
	elif t <= 5.2e+230:
		tmp = t_3
	elif t <= 2.2e+255:
		tmp = z * ((y + x) * (1.0 / t_4))
	else:
		tmp = a + (b * (-1.0 / (t_4 / y)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y / Float64(y + x))
	t_2 = Float64(z + Float64(Float64(a * t_1) - Float64(b * t_1)))
	t_3 = Float64(Float64(a + Float64(Float64(y * z) / Float64(t + y))) - Float64(b * Float64(y / Float64(t + y))))
	t_4 = Float64(y + Float64(t + x))
	tmp = 0.0
	if (t <= -4.4e+193)
		tmp = t_3;
	elseif (t <= -235000000000.0)
		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + Float64(t + y)))));
	elseif (t <= 3800.0)
		tmp = t_2;
	elseif (t <= 5.1e+61)
		tmp = Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(y + x))) / t_4);
	elseif (t <= 1.95e+147)
		tmp = t_2;
	elseif (t <= 5.2e+230)
		tmp = t_3;
	elseif (t <= 2.2e+255)
		tmp = Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_4)));
	else
		tmp = Float64(a + Float64(b * Float64(-1.0 / Float64(t_4 / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y / (y + x);
	t_2 = z + ((a * t_1) - (b * t_1));
	t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	t_4 = y + (t + x);
	tmp = 0.0;
	if (t <= -4.4e+193)
		tmp = t_3;
	elseif (t <= -235000000000.0)
		tmp = (a + z) - (y * (b / (x + (t + y))));
	elseif (t <= 3800.0)
		tmp = t_2;
	elseif (t <= 5.1e+61)
		tmp = ((a * (t + y)) + (z * (y + x))) / t_4;
	elseif (t <= 1.95e+147)
		tmp = t_2;
	elseif (t <= 5.2e+230)
		tmp = t_3;
	elseif (t <= 2.2e+255)
		tmp = z * ((y + x) * (1.0 / t_4));
	else
		tmp = a + (b * (-1.0 / (t_4 / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(N[(a * t$95$1), $MachinePrecision] - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + N[(N[(y * z), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+193], t$95$3, If[LessEqual[t, -235000000000.0], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3800.0], t$95$2, If[LessEqual[t, 5.1e+61], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[t, 1.95e+147], t$95$2, If[LessEqual[t, 5.2e+230], t$95$3, If[LessEqual[t, 2.2e+255], N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(b * N[(-1.0 / N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -235000000000:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\

\mathbf{elif}\;t \leq 3800:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 5.1 \cdot 10^{+61}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) + z \cdot \left(y + x\right)}{t\_4}\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_4}\right)\\

\mathbf{else}:\\
\;\;\;\;a + b \cdot \frac{-1}{\frac{t\_4}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -4.39999999999999972e193 or 1.95000000000000008e147 < t < 5.1999999999999997e230

    1. Initial program 52.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub52.8%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative52.8%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative52.8%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+52.8%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+52.8%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*56.8%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr56.8%

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

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

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

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

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

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

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

    if -4.39999999999999972e193 < t < -2.35e11

    1. Initial program 46.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub46.9%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative46.9%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+46.9%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+46.9%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative46.9%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*58.5%

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

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

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

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

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

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

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

    if -2.35e11 < t < 3800 or 5.1000000000000001e61 < t < 1.95000000000000008e147

    1. Initial program 69.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub69.5%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+69.5%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+69.5%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*69.2%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr69.2%

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

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

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

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

        \[\leadsto z + \left(a \cdot \frac{y}{\color{blue}{y + x}} - \frac{b \cdot y}{x + y}\right) \]
      4. associate-/l*84.1%

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

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

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

    if 3800 < t < 5.1000000000000001e61

    1. Initial program 87.4%

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

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

    if 5.1999999999999997e230 < t < 2.20000000000000002e255

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000002e255 < t

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{y}{x + \left(t + y\right)}} \]
    6. Step-by-step derivation
      1. clear-num100.0%

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

        \[\leadsto \mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{1}{\frac{\color{blue}{\left(x + t\right) + y}}{y}} \]
      3. +-commutative100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+193}:\\ \;\;\;\;\left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{elif}\;t \leq -235000000000:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq 3800:\\ \;\;\;\;z + \left(a \cdot \frac{y}{y + x} - b \cdot \frac{y}{y + x}\right)\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{+61}:\\ \;\;\;\;\frac{a \cdot \left(t + y\right) + z \cdot \left(y + x\right)}{y + \left(t + x\right)}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+147}:\\ \;\;\;\;z + \left(a \cdot \frac{y}{y + x} - b \cdot \frac{y}{y + x}\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\ \;\;\;\;\left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\ \;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{y + \left(t + x\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \frac{-1}{\frac{y + \left(t + x\right)}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{y + x}\\ t_2 := \left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ t_3 := y \cdot \frac{b}{x + \left(t + y\right)}\\ t_4 := y + \left(t + x\right)\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{+198}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -88000000000:\\ \;\;\;\;\left(a + z\right) - t\_3\\ \mathbf{elif}\;t \leq 1.6:\\ \;\;\;\;z + \left(a \cdot t\_1 - b \cdot t\_1\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+165}:\\ \;\;\;\;\frac{a \cdot t + x \cdot z}{t + x} - t\_3\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\ \;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_4}\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \frac{-1}{\frac{t\_4}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ y (+ y x)))
        (t_2 (- (+ a (/ (* y z) (+ t y))) (* b (/ y (+ t y)))))
        (t_3 (* y (/ b (+ x (+ t y)))))
        (t_4 (+ y (+ t x))))
   (if (<= t -2.4e+198)
     t_2
     (if (<= t -88000000000.0)
       (- (+ a z) t_3)
       (if (<= t 1.6)
         (+ z (- (* a t_1) (* b t_1)))
         (if (<= t 1.5e+165)
           (- (/ (+ (* a t) (* x z)) (+ t x)) t_3)
           (if (<= t 5.2e+230)
             t_2
             (if (<= t 2.2e+255)
               (* z (* (+ y x) (/ 1.0 t_4)))
               (+ a (* b (/ -1.0 (/ t_4 y))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y / (y + x);
	double t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	double t_3 = y * (b / (x + (t + y)));
	double t_4 = y + (t + x);
	double tmp;
	if (t <= -2.4e+198) {
		tmp = t_2;
	} else if (t <= -88000000000.0) {
		tmp = (a + z) - t_3;
	} else if (t <= 1.6) {
		tmp = z + ((a * t_1) - (b * t_1));
	} else if (t <= 1.5e+165) {
		tmp = (((a * t) + (x * z)) / (t + x)) - t_3;
	} else if (t <= 5.2e+230) {
		tmp = t_2;
	} else if (t <= 2.2e+255) {
		tmp = z * ((y + x) * (1.0 / t_4));
	} else {
		tmp = a + (b * (-1.0 / (t_4 / y)));
	}
	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 = y / (y + x)
    t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
    t_3 = y * (b / (x + (t + y)))
    t_4 = y + (t + x)
    if (t <= (-2.4d+198)) then
        tmp = t_2
    else if (t <= (-88000000000.0d0)) then
        tmp = (a + z) - t_3
    else if (t <= 1.6d0) then
        tmp = z + ((a * t_1) - (b * t_1))
    else if (t <= 1.5d+165) then
        tmp = (((a * t) + (x * z)) / (t + x)) - t_3
    else if (t <= 5.2d+230) then
        tmp = t_2
    else if (t <= 2.2d+255) then
        tmp = z * ((y + x) * (1.0d0 / t_4))
    else
        tmp = a + (b * ((-1.0d0) / (t_4 / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y / (y + x);
	double t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	double t_3 = y * (b / (x + (t + y)));
	double t_4 = y + (t + x);
	double tmp;
	if (t <= -2.4e+198) {
		tmp = t_2;
	} else if (t <= -88000000000.0) {
		tmp = (a + z) - t_3;
	} else if (t <= 1.6) {
		tmp = z + ((a * t_1) - (b * t_1));
	} else if (t <= 1.5e+165) {
		tmp = (((a * t) + (x * z)) / (t + x)) - t_3;
	} else if (t <= 5.2e+230) {
		tmp = t_2;
	} else if (t <= 2.2e+255) {
		tmp = z * ((y + x) * (1.0 / t_4));
	} else {
		tmp = a + (b * (-1.0 / (t_4 / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y / (y + x)
	t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
	t_3 = y * (b / (x + (t + y)))
	t_4 = y + (t + x)
	tmp = 0
	if t <= -2.4e+198:
		tmp = t_2
	elif t <= -88000000000.0:
		tmp = (a + z) - t_3
	elif t <= 1.6:
		tmp = z + ((a * t_1) - (b * t_1))
	elif t <= 1.5e+165:
		tmp = (((a * t) + (x * z)) / (t + x)) - t_3
	elif t <= 5.2e+230:
		tmp = t_2
	elif t <= 2.2e+255:
		tmp = z * ((y + x) * (1.0 / t_4))
	else:
		tmp = a + (b * (-1.0 / (t_4 / y)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y / Float64(y + x))
	t_2 = Float64(Float64(a + Float64(Float64(y * z) / Float64(t + y))) - Float64(b * Float64(y / Float64(t + y))))
	t_3 = Float64(y * Float64(b / Float64(x + Float64(t + y))))
	t_4 = Float64(y + Float64(t + x))
	tmp = 0.0
	if (t <= -2.4e+198)
		tmp = t_2;
	elseif (t <= -88000000000.0)
		tmp = Float64(Float64(a + z) - t_3);
	elseif (t <= 1.6)
		tmp = Float64(z + Float64(Float64(a * t_1) - Float64(b * t_1)));
	elseif (t <= 1.5e+165)
		tmp = Float64(Float64(Float64(Float64(a * t) + Float64(x * z)) / Float64(t + x)) - t_3);
	elseif (t <= 5.2e+230)
		tmp = t_2;
	elseif (t <= 2.2e+255)
		tmp = Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_4)));
	else
		tmp = Float64(a + Float64(b * Float64(-1.0 / Float64(t_4 / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y / (y + x);
	t_2 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	t_3 = y * (b / (x + (t + y)));
	t_4 = y + (t + x);
	tmp = 0.0;
	if (t <= -2.4e+198)
		tmp = t_2;
	elseif (t <= -88000000000.0)
		tmp = (a + z) - t_3;
	elseif (t <= 1.6)
		tmp = z + ((a * t_1) - (b * t_1));
	elseif (t <= 1.5e+165)
		tmp = (((a * t) + (x * z)) / (t + x)) - t_3;
	elseif (t <= 5.2e+230)
		tmp = t_2;
	elseif (t <= 2.2e+255)
		tmp = z * ((y + x) * (1.0 / t_4));
	else
		tmp = a + (b * (-1.0 / (t_4 / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(N[(y * z), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+198], t$95$2, If[LessEqual[t, -88000000000.0], N[(N[(a + z), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, 1.6], N[(z + N[(N[(a * t$95$1), $MachinePrecision] - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+165], N[(N[(N[(N[(a * t), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, 5.2e+230], t$95$2, If[LessEqual[t, 2.2e+255], N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(b * N[(-1.0 / N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -88000000000:\\
\;\;\;\;\left(a + z\right) - t\_3\\

\mathbf{elif}\;t \leq 1.6:\\
\;\;\;\;z + \left(a \cdot t\_1 - b \cdot t\_1\right)\\

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_4}\right)\\

\mathbf{else}:\\
\;\;\;\;a + b \cdot \frac{-1}{\frac{t\_4}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.4000000000000001e198 or 1.49999999999999995e165 < t < 5.1999999999999997e230

    1. Initial program 51.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub51.5%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+51.5%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+51.5%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*56.2%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr56.2%

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

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

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

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

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

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

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

    if -2.4000000000000001e198 < t < -8.8e10

    1. Initial program 46.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub46.9%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative46.9%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+46.9%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+46.9%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative46.9%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*58.5%

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

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

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

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

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

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

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

    if -8.8e10 < t < 1.6000000000000001

    1. Initial program 72.4%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub72.4%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+72.4%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+72.4%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*71.3%

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

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

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

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

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

        \[\leadsto z + \left(a \cdot \frac{y}{\color{blue}{y + x}} - \frac{b \cdot y}{x + y}\right) \]
      4. associate-/l*86.0%

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

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

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

    if 1.6000000000000001 < t < 1.49999999999999995e165

    1. Initial program 65.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub65.2%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative65.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative65.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+65.3%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+65.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative65.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*70.3%

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

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

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

    if 5.1999999999999997e230 < t < 2.20000000000000002e255

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000002e255 < t

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{y}{x + \left(t + y\right)}} \]
    6. Step-by-step derivation
      1. clear-num100.0%

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

        \[\leadsto \mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{1}{\frac{\color{blue}{\left(x + t\right) + y}}{y}} \]
      3. +-commutative100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+198}:\\ \;\;\;\;\left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{elif}\;t \leq -88000000000:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq 1.6:\\ \;\;\;\;z + \left(a \cdot \frac{y}{y + x} - b \cdot \frac{y}{y + x}\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+165}:\\ \;\;\;\;\frac{a \cdot t + x \cdot z}{t + x} - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\ \;\;\;\;\left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+255}:\\ \;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{y + \left(t + x\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \frac{-1}{\frac{y + \left(t + x\right)}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(t + x\right)\\ t_2 := \frac{y}{y + x}\\ t_3 := \left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+201}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -255000000:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+146}:\\ \;\;\;\;z + \left(a \cdot t\_2 - b \cdot t\_2\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+255}:\\ \;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \frac{-1}{\frac{t\_1}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ t x)))
        (t_2 (/ y (+ y x)))
        (t_3 (- (+ a (/ (* y z) (+ t y))) (* b (/ y (+ t y))))))
   (if (<= t -2.25e+201)
     t_3
     (if (<= t -255000000.0)
       (- (+ a z) (* y (/ b (+ x (+ t y)))))
       (if (<= t 1.9e+146)
         (+ z (- (* a t_2) (* b t_2)))
         (if (<= t 5.2e+230)
           t_3
           (if (<= t 4e+255)
             (* z (* (+ y x) (/ 1.0 t_1)))
             (+ a (* b (/ -1.0 (/ t_1 y)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (t + x);
	double t_2 = y / (y + x);
	double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	double tmp;
	if (t <= -2.25e+201) {
		tmp = t_3;
	} else if (t <= -255000000.0) {
		tmp = (a + z) - (y * (b / (x + (t + y))));
	} else if (t <= 1.9e+146) {
		tmp = z + ((a * t_2) - (b * t_2));
	} else if (t <= 5.2e+230) {
		tmp = t_3;
	} else if (t <= 4e+255) {
		tmp = z * ((y + x) * (1.0 / t_1));
	} else {
		tmp = a + (b * (-1.0 / (t_1 / y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y + (t + x)
    t_2 = y / (y + x)
    t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
    if (t <= (-2.25d+201)) then
        tmp = t_3
    else if (t <= (-255000000.0d0)) then
        tmp = (a + z) - (y * (b / (x + (t + y))))
    else if (t <= 1.9d+146) then
        tmp = z + ((a * t_2) - (b * t_2))
    else if (t <= 5.2d+230) then
        tmp = t_3
    else if (t <= 4d+255) then
        tmp = z * ((y + x) * (1.0d0 / t_1))
    else
        tmp = a + (b * ((-1.0d0) / (t_1 / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (t + x);
	double t_2 = y / (y + x);
	double t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	double tmp;
	if (t <= -2.25e+201) {
		tmp = t_3;
	} else if (t <= -255000000.0) {
		tmp = (a + z) - (y * (b / (x + (t + y))));
	} else if (t <= 1.9e+146) {
		tmp = z + ((a * t_2) - (b * t_2));
	} else if (t <= 5.2e+230) {
		tmp = t_3;
	} else if (t <= 4e+255) {
		tmp = z * ((y + x) * (1.0 / t_1));
	} else {
		tmp = a + (b * (-1.0 / (t_1 / y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (t + x)
	t_2 = y / (y + x)
	t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)))
	tmp = 0
	if t <= -2.25e+201:
		tmp = t_3
	elif t <= -255000000.0:
		tmp = (a + z) - (y * (b / (x + (t + y))))
	elif t <= 1.9e+146:
		tmp = z + ((a * t_2) - (b * t_2))
	elif t <= 5.2e+230:
		tmp = t_3
	elif t <= 4e+255:
		tmp = z * ((y + x) * (1.0 / t_1))
	else:
		tmp = a + (b * (-1.0 / (t_1 / y)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(t + x))
	t_2 = Float64(y / Float64(y + x))
	t_3 = Float64(Float64(a + Float64(Float64(y * z) / Float64(t + y))) - Float64(b * Float64(y / Float64(t + y))))
	tmp = 0.0
	if (t <= -2.25e+201)
		tmp = t_3;
	elseif (t <= -255000000.0)
		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + Float64(t + y)))));
	elseif (t <= 1.9e+146)
		tmp = Float64(z + Float64(Float64(a * t_2) - Float64(b * t_2)));
	elseif (t <= 5.2e+230)
		tmp = t_3;
	elseif (t <= 4e+255)
		tmp = Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_1)));
	else
		tmp = Float64(a + Float64(b * Float64(-1.0 / Float64(t_1 / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (t + x);
	t_2 = y / (y + x);
	t_3 = (a + ((y * z) / (t + y))) - (b * (y / (t + y)));
	tmp = 0.0;
	if (t <= -2.25e+201)
		tmp = t_3;
	elseif (t <= -255000000.0)
		tmp = (a + z) - (y * (b / (x + (t + y))));
	elseif (t <= 1.9e+146)
		tmp = z + ((a * t_2) - (b * t_2));
	elseif (t <= 5.2e+230)
		tmp = t_3;
	elseif (t <= 4e+255)
		tmp = z * ((y + x) * (1.0 / t_1));
	else
		tmp = a + (b * (-1.0 / (t_1 / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + N[(N[(y * z), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+201], t$95$3, If[LessEqual[t, -255000000.0], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+146], N[(z + N[(N[(a * t$95$2), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+230], t$95$3, If[LessEqual[t, 4e+255], N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(b * N[(-1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -255000000:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+146}:\\
\;\;\;\;z + \left(a \cdot t\_2 - b \cdot t\_2\right)\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 4 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_1}\right)\\

\mathbf{else}:\\
\;\;\;\;a + b \cdot \frac{-1}{\frac{t\_1}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.25000000000000005e201 or 1.8999999999999999e146 < t < 5.1999999999999997e230

    1. Initial program 52.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub52.8%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative52.8%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative52.8%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+52.8%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+52.8%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*56.8%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr56.8%

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

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

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

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

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

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

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

    if -2.25000000000000005e201 < t < -2.55e8

    1. Initial program 46.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub46.9%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative46.9%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+46.9%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+46.9%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative46.9%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*58.5%

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

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

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

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

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

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

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

    if -2.55e8 < t < 1.8999999999999999e146

    1. Initial program 71.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub71.2%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+71.2%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+71.2%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative71.2%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*71.5%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr71.5%

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

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

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

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

        \[\leadsto z + \left(a \cdot \frac{y}{\color{blue}{y + x}} - \frac{b \cdot y}{x + y}\right) \]
      4. associate-/l*81.4%

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

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

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

    if 5.1999999999999997e230 < t < 3.99999999999999995e255

    1. Initial program 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999995e255 < t

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{y}{x + \left(t + y\right)}} \]
    6. Step-by-step derivation
      1. clear-num100.0%

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

        \[\leadsto \mathsf{fma}\left(a, \frac{t + y}{x + \left(t + y\right)}, z \cdot \frac{y + x}{x + \left(t + y\right)}\right) - b \cdot \frac{1}{\frac{\color{blue}{\left(x + t\right) + y}}{y}} \]
      3. +-commutative100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+201}:\\ \;\;\;\;\left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{elif}\;t \leq -255000000:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+146}:\\ \;\;\;\;z + \left(a \cdot \frac{y}{y + x} - b \cdot \frac{y}{y + x}\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+230}:\\ \;\;\;\;\left(a + \frac{y \cdot z}{t + y}\right) - b \cdot \frac{y}{t + y}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+255}:\\ \;\;\;\;z \cdot \left(\left(y + x\right) \cdot \frac{1}{y + \left(t + x\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \frac{-1}{\frac{y + \left(t + x\right)}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-170}:\\
\;\;\;\;a + z\\

\mathbf{elif}\;z \leq -5.2 \cdot 10^{-197}:\\
\;\;\;\;b \cdot \frac{y}{\left(\left(-x\right) - y\right) - t}\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.04999999999999996e-31 or 3.59999999999999997e251 < z

    1. Initial program 50.6%

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

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

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

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

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

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

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

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

    if -1.04999999999999996e-31 < z < -9.19999999999999948e-170

    1. Initial program 70.7%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t + y, z \cdot \left(x + y\right)\right)}}{\left(x + t\right) + y} \]
      2. +-commutative60.7%

        \[\leadsto \frac{\mathsf{fma}\left(a, t + y, z \cdot \color{blue}{\left(y + x\right)}\right)}{\left(x + t\right) + y} \]
    5. Simplified60.7%

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

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

    if -9.19999999999999948e-170 < z < -5.2000000000000003e-197

    1. Initial program 35.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub35.7%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative35.7%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+35.7%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+35.7%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative35.7%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000003e-197 < z < 3.79999999999999996e-12

    1. Initial program 79.8%

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

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

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

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

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

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

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

    if 3.79999999999999996e-12 < z < 3.59999999999999997e251

    1. Initial program 52.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-31}:\\ \;\;\;\;z \cdot \frac{y + x}{x + \left(t + y\right)}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-170}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-197}:\\ \;\;\;\;b \cdot \frac{y}{\left(\left(-x\right) - y\right) - t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-12}:\\ \;\;\;\;a \cdot \frac{t + y}{x + \left(t + y\right)}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+251}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + x}{x + \left(t + y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -3.25 \cdot 10^{+14} \lor \neg \left(t \leq 8.5 \cdot 10^{+29}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7e208

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e208 < t < -3.25e14 or 8.5000000000000006e29 < t

    1. Initial program 49.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub49.2%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      3. +-commutative49.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative49.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+49.3%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+49.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{\color{blue}{x + \left(t + y\right)}} \]
      8. +-commutative49.3%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*56.0%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr56.0%

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

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

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

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

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

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

    if -3.25e14 < t < 8.5000000000000006e29

    1. Initial program 73.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub73.6%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+73.6%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+73.6%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*72.6%

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

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

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

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

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

        \[\leadsto z + \left(a \cdot \frac{y}{\color{blue}{y + x}} - \frac{b \cdot y}{x + y}\right) \]
      4. associate-/l*84.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+208}:\\ \;\;\;\;a - b \cdot \frac{y}{x + \left(t + y\right)}\\ \mathbf{elif}\;t \leq -3.25 \cdot 10^{+14} \lor \neg \left(t \leq 8.5 \cdot 10^{+29}\right):\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + \left(t + y\right)}\\ \mathbf{else}:\\ \;\;\;\;z + \left(a \cdot \frac{y}{y + x} - b \cdot \frac{y}{y + x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -1.15 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -8.4 \cdot 10^{-302}:\\
\;\;\;\;a \cdot \frac{y}{y + x}\\

\mathbf{elif}\;x \leq 4.1 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.22e173 or 4.09999999999999986e111 < x

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

    if -1.22e173 < x < -1.14999999999999994e-211 or -8.40000000000000052e-302 < x < 4.09999999999999986e111

    1. Initial program 62.7%

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

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

    if -1.14999999999999994e-211 < x < -8.40000000000000052e-302

    1. Initial program 68.3%

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{x + y}} \]
      2. +-commutative69.0%

        \[\leadsto a \cdot \frac{y}{\color{blue}{y + x}} \]
    6. Simplified69.0%

      \[\leadsto \color{blue}{a \cdot \frac{y}{y + x}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 62.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+148}:\\
\;\;\;\;a - b \cdot \frac{y}{t\_1}\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+252}:\\
\;\;\;\;a + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.00000000000000031e-67 or 8.50000000000000044e252 < z

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

    if -9.00000000000000031e-67 < z < 4.49999999999999994e148

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

    if 4.49999999999999994e148 < z < 8.50000000000000044e252

    1. Initial program 50.6%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t + y, z \cdot \left(x + y\right)\right)}}{\left(x + t\right) + y} \]
      2. +-commutative50.8%

        \[\leadsto \frac{\mathsf{fma}\left(a, t + y, z \cdot \color{blue}{\left(y + x\right)}\right)}{\left(x + t\right) + y} \]
    5. Simplified50.8%

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

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

Alternative 10: 57.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -3.6 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.7 \cdot 10^{-195}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6e209

    1. Initial program 48.7%

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t}{t + x}} \]
    6. Simplified72.9%

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

    if -1.6e209 < t < -3.5999999999999999e-100 or -4.7000000000000001e-195 < t < 1.11999999999999994e201

    1. Initial program 64.5%

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

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

    if -3.5999999999999999e-100 < t < -4.7000000000000001e-195

    1. Initial program 83.0%

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

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

    if 1.11999999999999994e201 < t

    1. Initial program 40.3%

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

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

Alternative 11: 57.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;t \leq -4 \cdot 10^{+213}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-100}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-193}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+201}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ a z) b)))
   (if (<= t -4e+213)
     a
     (if (<= t -4.1e-100)
       t_1
       (if (<= t -1.55e-193) z (if (<= t 2.9e+201) t_1 a))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a + z) - b;
	double tmp;
	if (t <= -4e+213) {
		tmp = a;
	} else if (t <= -4.1e-100) {
		tmp = t_1;
	} else if (t <= -1.55e-193) {
		tmp = z;
	} else if (t <= 2.9e+201) {
		tmp = t_1;
	} else {
		tmp = a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (a + z) - b
    if (t <= (-4d+213)) then
        tmp = a
    else if (t <= (-4.1d-100)) then
        tmp = t_1
    else if (t <= (-1.55d-193)) then
        tmp = z
    else if (t <= 2.9d+201) then
        tmp = t_1
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a + z) - b;
	double tmp;
	if (t <= -4e+213) {
		tmp = a;
	} else if (t <= -4.1e-100) {
		tmp = t_1;
	} else if (t <= -1.55e-193) {
		tmp = z;
	} else if (t <= 2.9e+201) {
		tmp = t_1;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a + z) - b
	tmp = 0
	if t <= -4e+213:
		tmp = a
	elif t <= -4.1e-100:
		tmp = t_1
	elif t <= -1.55e-193:
		tmp = z
	elif t <= 2.9e+201:
		tmp = t_1
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a + z) - b)
	tmp = 0.0
	if (t <= -4e+213)
		tmp = a;
	elseif (t <= -4.1e-100)
		tmp = t_1;
	elseif (t <= -1.55e-193)
		tmp = z;
	elseif (t <= 2.9e+201)
		tmp = t_1;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a + z) - b;
	tmp = 0.0;
	if (t <= -4e+213)
		tmp = a;
	elseif (t <= -4.1e-100)
		tmp = t_1;
	elseif (t <= -1.55e-193)
		tmp = z;
	elseif (t <= 2.9e+201)
		tmp = t_1;
	else
		tmp = a;
	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[t, -4e+213], a, If[LessEqual[t, -4.1e-100], t$95$1, If[LessEqual[t, -1.55e-193], z, If[LessEqual[t, 2.9e+201], t$95$1, a]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{-193}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.99999999999999994e213 or 2.9000000000000002e201 < t

    1. Initial program 44.0%

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

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

    if -3.99999999999999994e213 < t < -4.0999999999999999e-100 or -1.5500000000000001e-193 < t < 2.9000000000000002e201

    1. Initial program 64.5%

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

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

    if -4.0999999999999999e-100 < t < -1.5500000000000001e-193

    1. Initial program 83.0%

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

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

Alternative 12: 66.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.50000000000000015e-100 or -1.39999999999999997e-243 < b

    1. Initial program 61.3%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub61.3%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{\left(y + t\right)} \cdot a\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      4. *-commutative61.4%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \color{blue}{a \cdot \left(y + t\right)}\right)}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      5. associate-+l+61.4%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \color{blue}{\left(y + t\right)}} - \frac{y \cdot b}{\left(x + t\right) + y} \]
      7. associate-+l+61.4%

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \frac{y \cdot b}{x + \color{blue}{\left(y + t\right)}} \]
      9. associate-/l*64.2%

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right)}{x + \left(y + t\right)} - \color{blue}{y \cdot \frac{b}{x + \left(y + t\right)}} \]
    4. Applied egg-rr64.2%

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

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

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

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

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

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

    if -7.50000000000000015e-100 < b < -1.39999999999999997e-243

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

Alternative 13: 59.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -2.25 \cdot 10^{-10}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-170}:\\ \;\;\;\;a \cdot \frac{t + y}{x + \left(t + y\right)}\\ \mathbf{elif}\;y \leq 1.06 \cdot 10^{-19}:\\ \;\;\;\;a + z\\ \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 -2.25e-10)
     t_1
     (if (<= y -1.35e-170)
       (* a (/ (+ t y) (+ x (+ t y))))
       (if (<= y 1.06e-19) (+ a z) 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 <= -2.25e-10) {
		tmp = t_1;
	} else if (y <= -1.35e-170) {
		tmp = a * ((t + y) / (x + (t + y)));
	} else if (y <= 1.06e-19) {
		tmp = a + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (a + z) - b
    if (y <= (-2.25d-10)) then
        tmp = t_1
    else if (y <= (-1.35d-170)) then
        tmp = a * ((t + y) / (x + (t + y)))
    else if (y <= 1.06d-19) then
        tmp = a + z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a + z) - b;
	double tmp;
	if (y <= -2.25e-10) {
		tmp = t_1;
	} else if (y <= -1.35e-170) {
		tmp = a * ((t + y) / (x + (t + y)));
	} else if (y <= 1.06e-19) {
		tmp = a + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a + z) - b
	tmp = 0
	if y <= -2.25e-10:
		tmp = t_1
	elif y <= -1.35e-170:
		tmp = a * ((t + y) / (x + (t + y)))
	elif y <= 1.06e-19:
		tmp = a + z
	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 <= -2.25e-10)
		tmp = t_1;
	elseif (y <= -1.35e-170)
		tmp = Float64(a * Float64(Float64(t + y) / Float64(x + Float64(t + y))));
	elseif (y <= 1.06e-19)
		tmp = Float64(a + z);
	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 <= -2.25e-10)
		tmp = t_1;
	elseif (y <= -1.35e-170)
		tmp = a * ((t + y) / (x + (t + y)));
	elseif (y <= 1.06e-19)
		tmp = a + z;
	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, -2.25e-10], t$95$1, If[LessEqual[y, -1.35e-170], N[(a * N[(N[(t + y), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e-19], N[(a + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 1.06 \cdot 10^{-19}:\\
\;\;\;\;a + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.25e-10 or 1.06e-19 < y

    1. Initial program 39.6%

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

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

    if -2.25e-10 < y < -1.3499999999999999e-170

    1. Initial program 86.9%

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

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

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

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

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

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

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

    if -1.3499999999999999e-170 < y < 1.06e-19

    1. Initial program 77.1%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t + y, z \cdot \left(x + y\right)\right)}}{\left(x + t\right) + y} \]
      2. +-commutative68.4%

        \[\leadsto \frac{\mathsf{fma}\left(a, t + y, z \cdot \color{blue}{\left(y + x\right)}\right)}{\left(x + t\right) + y} \]
    5. Simplified68.4%

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

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

Alternative 14: 42.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+132} \lor \neg \left(t \leq 1.12 \cdot 10^{+173}\right):\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.80000000000000008e132 or 1.12e173 < t

    1. Initial program 44.6%

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

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

    if -1.80000000000000008e132 < t < 1.12e173

    1. Initial program 68.4%

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

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

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

Alternative 15: 52.3% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.6 \cdot 10^{+203}:\\
\;\;\;\;a + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.5999999999999998e203

    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. Add Preprocessing
    3. Taylor expanded in b around 0 51.8%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t + y, z \cdot \left(x + y\right)\right)}}{\left(x + t\right) + y} \]
      2. +-commutative51.9%

        \[\leadsto \frac{\mathsf{fma}\left(a, t + y, z \cdot \color{blue}{\left(y + x\right)}\right)}{\left(x + t\right) + y} \]
    5. Simplified51.9%

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

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

    if 1.5999999999999998e203 < b

    1. Initial program 42.9%

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

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

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

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

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

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

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

Alternative 16: 48.8% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-31}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.74999999999999993e-31

    1. Initial program 52.9%

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

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

    if -1.74999999999999993e-31 < z

    1. Initial program 64.9%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t + y, z \cdot \color{blue}{\left(y + x\right)}\right)}{\left(x + t\right) + y} \]
    5. Simplified49.1%

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

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

Alternative 17: 32.7% 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 61.7%

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

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

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

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

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