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

Percentage Accurate: 60.1% → 88.0%
Time: 22.3s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 60.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b):
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 88.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + y}{y}\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{y + \left(x + t\right)}\\ t_3 := \frac{{\left(x + y\right)}^{2}}{y}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+278}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t_2 \leq 10^{+263}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(z - \frac{b}{t_1}\right) + \mathsf{fma}\left(t, \frac{a}{x + y} - \left(\left(\frac{z}{x + y} + \frac{a}{t_3}\right) - \frac{b}{t_3}\right), \frac{a}{t_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x y) y))
        (t_2 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) (+ y (+ x t))))
        (t_3 (/ (pow (+ x y) 2.0) y)))
   (if (<= t_2 -5e+278)
     (- (+ z a) b)
     (if (<= t_2 1e+263)
       t_2
       (+
        (- z (/ b t_1))
        (fma
         t
         (- (/ a (+ x y)) (- (+ (/ z (+ x y)) (/ a t_3)) (/ b t_3)))
         (/ a t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + y) / y;
	double t_2 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
	double t_3 = pow((x + y), 2.0) / y;
	double tmp;
	if (t_2 <= -5e+278) {
		tmp = (z + a) - b;
	} else if (t_2 <= 1e+263) {
		tmp = t_2;
	} else {
		tmp = (z - (b / t_1)) + fma(t, ((a / (x + y)) - (((z / (x + y)) + (a / t_3)) - (b / t_3))), (a / t_1));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + y) / y)
	t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / Float64(y + Float64(x + t)))
	t_3 = Float64((Float64(x + y) ^ 2.0) / y)
	tmp = 0.0
	if (t_2 <= -5e+278)
		tmp = Float64(Float64(z + a) - b);
	elseif (t_2 <= 1e+263)
		tmp = t_2;
	else
		tmp = Float64(Float64(z - Float64(b / t_1)) + fma(t, Float64(Float64(a / Float64(x + y)) - Float64(Float64(Float64(z / Float64(x + y)) + Float64(a / t_3)) - Float64(b / t_3))), Float64(a / t_1)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[(x + y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+278], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$2, 1e+263], t$95$2, N[(N[(z - N[(b / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a / N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z / N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(b / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq 10^{+263}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\left(z - \frac{b}{t_1}\right) + \mathsf{fma}\left(t, \frac{a}{x + y} - \left(\left(\frac{z}{x + y} + \frac{a}{t_3}\right) - \frac{b}{t_3}\right), \frac{a}{t_1}\right)\\


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

    1. Initial program 8.5%

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

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

    if -5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000002e263

    1. Initial program 99.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

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

    1. Initial program 8.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. Step-by-step derivation
      1. associate--l+8.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(z - \frac{b}{\frac{y + x}{y}}\right) + \mathsf{fma}\left(t, \frac{a}{y + x} - \left(\left(\frac{z}{y + x} + \frac{a}{\frac{{\left(y + x\right)}^{2}}{y}}\right) - \frac{b}{\frac{{\left(y + x\right)}^{2}}{y}}\right), \frac{a}{\frac{y + x}{y}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.5%

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

Alternative 2: 87.4% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.00000000000000029e278 or 5.0000000000000002e269 < (/.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.4%

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

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

    if -5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000002e269

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

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

Alternative 3: 63.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.6 \cdot 10^{-138}:\\
\;\;\;\;t_2\\

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

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

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

\mathbf{elif}\;y \leq 9 \cdot 10^{-16} \lor \neg \left(y \leq 6600000000000\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.29999999999999977e-8

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999977e-8 < y < -1.60000000000000005e-138 or 9.0000000000000003e-16 < y < 6.6e12

    1. Initial program 86.1%

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

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

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

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

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

    if -1.60000000000000005e-138 < y < 2.30000000000000013e-198

    1. Initial program 80.4%

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

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

    if 2.30000000000000013e-198 < y < 1.2000000000000001e-153

    1. Initial program 53.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. Step-by-step derivation
      1. associate--l+53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]

    if 1.2000000000000001e-153 < y < 3.7999999999999999e-126

    1. Initial program 99.4%

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

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

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

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

    if 3.7999999999999999e-126 < y < 9.0000000000000003e-16 or 6.6e12 < y

    1. Initial program 46.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-8}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-138}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-153}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-126}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-16} \lor \neg \left(y \leq 6600000000000\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.6% accurate, 0.4× speedup?

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

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

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

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

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

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

\mathbf{elif}\;y \leq 5.1 \cdot 10^{+78}:\\
\;\;\;\;z + a \cdot \left(t_2 + \frac{t}{t_1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -6.49999999999999997e-8 or 5.10000000000000031e78 < y

    1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999997e-8 < y < -1.10000000000000008e-142

    1. Initial program 85.1%

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

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

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

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

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

    if -1.10000000000000008e-142 < y < 4.60000000000000027e-198

    1. Initial program 80.4%

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

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

    if 4.60000000000000027e-198 < y < 2.1499999999999999e-152

    1. Initial program 53.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. Step-by-step derivation
      1. associate--l+53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]

    if 2.1499999999999999e-152 < y < 6.8999999999999997e-128

    1. Initial program 99.4%

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

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

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

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

    if 6.8999999999999997e-128 < y < 5.10000000000000031e78

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-8}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-142}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-152}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 6.9 \cdot 10^{-128}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{+78}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{y + \left(x + t\right)} + \frac{t}{y + \left(x + t\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.0% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-128}:\\
\;\;\;\;\frac{t_2 - y \cdot b}{t_1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y < -3.6e-9

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e-9 < y < -4.70000000000000046e-140

    1. Initial program 85.1%

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

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

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

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

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

    if -4.70000000000000046e-140 < y < 1.5499999999999999e-198

    1. Initial program 80.4%

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

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

    if 1.5499999999999999e-198 < y < 9.50000000000000057e-154

    1. Initial program 53.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. Step-by-step derivation
      1. associate--l+53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]

    if 9.50000000000000057e-154 < y < 5.5000000000000004e-128

    1. Initial program 99.4%

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

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

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

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

    if 5.5000000000000004e-128 < y < 2.6e-92

    1. Initial program 78.6%

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

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

    if 2.6e-92 < y

    1. Initial program 47.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{-9}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-140}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-128}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-92}:\\ \;\;\;\;\frac{\left(\left(y + t\right) \cdot a + y \cdot z\right) - y \cdot b}{y + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{-138}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{t_1}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 3.45 \cdot 10^{-127}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{t_1}\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{-120}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-92}:\\ \;\;\;\;a - \frac{y \cdot \left(b - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t))))
   (if (<= y -1.85e-138)
     (* (+ a (- z b)) (/ y t_1))
     (if (<= y 3.4e-198)
       (/ (+ (* t a) (* x z)) (+ x t))
       (if (<= y 1.8e-154)
         (- a (/ (* y b) t))
         (if (<= y 3.45e-127)
           (/ (- (* (+ y t) a) (* y b)) t_1)
           (if (<= y 2.85e-120)
             z
             (if (<= y 2.4e-92) (- a (/ (* y (- b z)) t)) (- (+ z a) b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double tmp;
	if (y <= -1.85e-138) {
		tmp = (a + (z - b)) * (y / t_1);
	} else if (y <= 3.4e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 1.8e-154) {
		tmp = a - ((y * b) / t);
	} else if (y <= 3.45e-127) {
		tmp = (((y + t) * a) - (y * b)) / t_1;
	} else if (y <= 2.85e-120) {
		tmp = z;
	} else if (y <= 2.4e-92) {
		tmp = a - ((y * (b - z)) / t);
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (x + t)
    if (y <= (-1.85d-138)) then
        tmp = (a + (z - b)) * (y / t_1)
    else if (y <= 3.4d-198) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 1.8d-154) then
        tmp = a - ((y * b) / t)
    else if (y <= 3.45d-127) then
        tmp = (((y + t) * a) - (y * b)) / t_1
    else if (y <= 2.85d-120) then
        tmp = z
    else if (y <= 2.4d-92) then
        tmp = a - ((y * (b - z)) / t)
    else
        tmp = (z + a) - b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double tmp;
	if (y <= -1.85e-138) {
		tmp = (a + (z - b)) * (y / t_1);
	} else if (y <= 3.4e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 1.8e-154) {
		tmp = a - ((y * b) / t);
	} else if (y <= 3.45e-127) {
		tmp = (((y + t) * a) - (y * b)) / t_1;
	} else if (y <= 2.85e-120) {
		tmp = z;
	} else if (y <= 2.4e-92) {
		tmp = a - ((y * (b - z)) / t);
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	tmp = 0
	if y <= -1.85e-138:
		tmp = (a + (z - b)) * (y / t_1)
	elif y <= 3.4e-198:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 1.8e-154:
		tmp = a - ((y * b) / t)
	elif y <= 3.45e-127:
		tmp = (((y + t) * a) - (y * b)) / t_1
	elif y <= 2.85e-120:
		tmp = z
	elif y <= 2.4e-92:
		tmp = a - ((y * (b - z)) / t)
	else:
		tmp = (z + a) - b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	tmp = 0.0
	if (y <= -1.85e-138)
		tmp = Float64(Float64(a + Float64(z - b)) * Float64(y / t_1));
	elseif (y <= 3.4e-198)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 1.8e-154)
		tmp = Float64(a - Float64(Float64(y * b) / t));
	elseif (y <= 3.45e-127)
		tmp = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / t_1);
	elseif (y <= 2.85e-120)
		tmp = z;
	elseif (y <= 2.4e-92)
		tmp = Float64(a - Float64(Float64(y * Float64(b - z)) / t));
	else
		tmp = Float64(Float64(z + a) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	tmp = 0.0;
	if (y <= -1.85e-138)
		tmp = (a + (z - b)) * (y / t_1);
	elseif (y <= 3.4e-198)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 1.8e-154)
		tmp = a - ((y * b) / t);
	elseif (y <= 3.45e-127)
		tmp = (((y + t) * a) - (y * b)) / t_1;
	elseif (y <= 2.85e-120)
		tmp = z;
	elseif (y <= 2.4e-92)
		tmp = a - ((y * (b - z)) / t);
	else
		tmp = (z + a) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e-138], N[(N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision] * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-154], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.45e-127], N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 2.85e-120], z, If[LessEqual[y, 2.4e-92], N[(a - N[(N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;y \leq 2.85 \cdot 10^{-120}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y < -1.84999999999999995e-138

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.84999999999999995e-138 < y < 3.3999999999999998e-198

    1. Initial program 80.4%

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

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

    if 3.3999999999999998e-198 < y < 1.8000000000000001e-154

    1. Initial program 53.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. Step-by-step derivation
      1. associate--l+53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]

    if 1.8000000000000001e-154 < y < 3.45000000000000008e-127

    1. Initial program 99.4%

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

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

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

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

    if 3.45000000000000008e-127 < y < 2.85000000000000015e-120

    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 x around inf 75.6%

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

    if 2.85000000000000015e-120 < y < 2.4000000000000001e-92

    1. Initial program 83.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. Step-by-step derivation
      1. associate--l+83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{\frac{y \cdot z - y \cdot b}{t}} \]
      8. distribute-lft-out--83.4%

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

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

    if 2.4000000000000001e-92 < y

    1. Initial program 47.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{-138}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 3.45 \cdot 10^{-127}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{-120}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-92}:\\ \;\;\;\;a - \frac{y \cdot \left(b - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 58.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-253}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{-210}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.0999999999999996e-59 or 2.30000000000000016e-92 < y

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

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

    if -6.0999999999999996e-59 < y < -5.49999999999999974e-253 or -5.8000000000000002e-269 < y < 1.5000000000000001e-210

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

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

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

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

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

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

    if -5.49999999999999974e-253 < y < -5.8000000000000002e-269

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

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

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

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

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

    if 1.5000000000000001e-210 < y < 2.30000000000000016e-92

    1. Initial program 80.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. Step-by-step derivation
      1. associate--l+80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{\frac{y \cdot z - y \cdot b}{t}} \]
      8. distribute-lft-out--61.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.1 \cdot 10^{-59}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-253}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-269}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-210}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-92}:\\ \;\;\;\;a - \frac{y \cdot \left(b - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 12500000000000:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot t_2\right)}{t_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.89999999999999996e85

    1. Initial program 36.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999996e85 < y < 1.25e13

    1. Initial program 80.2%

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

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

    if 1.25e13 < y

    1. Initial program 37.1%

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

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

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

Alternative 9: 55.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{+78}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.5 \cdot 10^{+27}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+229}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6000000000000001e162 or -1.9e78 < t < -2.4999999999999999e27

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{\frac{y \cdot z - y \cdot b}{t}} \]
      8. distribute-lft-out--71.2%

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

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

    if -1.6000000000000001e162 < t < -1.9e78 or -2.4999999999999999e27 < t < 1.9499999999999999e229

    1. Initial program 67.1%

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

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

    if 1.9499999999999999e229 < t

    1. Initial program 35.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. Step-by-step derivation
      1. associate--l+35.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x + y}}} \]
      2. +-commutative51.7%

        \[\leadsto \frac{z}{\frac{t}{\color{blue}{y + x}}} \]
    10. Simplified51.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+162}:\\ \;\;\;\;a - \frac{y \cdot \left(b - z\right)}{t}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+78}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{+27}:\\ \;\;\;\;a - \frac{y \cdot \left(b - z\right)}{t}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+229}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{t}{x + y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 62.8% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.5000000000000005e-57 or 2.0500000000000001e-92 < y

    1. Initial program 51.2%

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

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

    if -9.5000000000000005e-57 < y < 4.60000000000000027e-198

    1. Initial program 81.9%

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

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

    if 4.60000000000000027e-198 < y < 2.0500000000000001e-92

    1. Initial program 76.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. Step-by-step derivation
      1. associate--l+76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{\frac{y \cdot z - y \cdot b}{t}} \]
      8. distribute-lft-out--61.2%

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

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

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

Alternative 11: 62.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.84999999999999995e-138

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.84999999999999995e-138 < y < 3.3999999999999998e-198

    1. Initial program 80.4%

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

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

    if 3.3999999999999998e-198 < y < 1.7000000000000001e-92

    1. Initial program 76.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. Step-by-step derivation
      1. associate--l+76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{\frac{y \cdot z - y \cdot b}{t}} \]
      8. distribute-lft-out--61.2%

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

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

    if 1.7000000000000001e-92 < y

    1. Initial program 47.2%

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

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

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

Alternative 12: 56.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.62 \cdot 10^{+162}:\\
\;\;\;\;a\\

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

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


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

    1. Initial program 46.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 t around inf 66.9%

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

    if -1.62000000000000005e162 < t < 1.7e229

    1. Initial program 68.0%

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

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

    if 1.7e229 < t

    1. Initial program 35.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. Step-by-step derivation
      1. associate--l+35.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x + y}}} \]
      2. +-commutative51.7%

        \[\leadsto \frac{z}{\frac{t}{\color{blue}{y + x}}} \]
    10. Simplified51.7%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y + x}}} \]
    11. Step-by-step derivation
      1. associate-/r/51.1%

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

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

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

Alternative 13: 56.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+162}:\\
\;\;\;\;a\\

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

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


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

    1. Initial program 46.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 t around inf 66.9%

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

    if -3.2000000000000001e162 < t < 1.06e229

    1. Initial program 68.0%

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

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

    if 1.06e229 < t

    1. Initial program 35.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. Step-by-step derivation
      1. associate--l+35.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x + y}}} \]
      2. +-commutative51.7%

        \[\leadsto \frac{z}{\frac{t}{\color{blue}{y + x}}} \]
    10. Simplified51.7%

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

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

Alternative 14: 43.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-61}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+118}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.20000000000000028e-61 or 2.90000000000000016e118 < a

    1. Initial program 49.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 t around inf 57.8%

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

    if -7.20000000000000028e-61 < a < 2.90000000000000016e118

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-61}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+118}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 57.1% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+162}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7000000000000002e162

    1. Initial program 46.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 t around inf 66.9%

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

    if -2.7000000000000002e162 < t

    1. Initial program 66.2%

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

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

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

Alternative 16: 32.8% accurate, 21.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
	return a;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return a;
}
def code(x, y, z, t, a, b):
	return a
function code(x, y, z, t, a, b)
	return a
end
function tmp = code(x, y, z, t, a, b)
	tmp = a;
end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}

\\
a
\end{array}
Derivation
  1. Initial program 63.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 t around inf 31.4%

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

    \[\leadsto a \]
  5. Add Preprocessing

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

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

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