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

Percentage Accurate: 60.0% → 84.4%
Time: 14.9s
Alternatives: 14
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 60.0% 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: 84.4% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, t\_1\right) - y \cdot b}{t\_2}\\

\mathbf{else}:\\
\;\;\;\;a + t\_5\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

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

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

    1. Initial program 5.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;a + z \cdot \left(\frac{x}{t\_1} + \frac{y}{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)) < -inf.0

    1. Initial program 6.3%

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

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

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

    1. Initial program 99.7%

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

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

    1. Initial program 5.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\ t_3 := z \cdot \left(\frac{x}{t\_1} + \frac{y}{t\_1}\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_3 - b \cdot \frac{y}{x + \left(y + t\right)}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+245}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;a + t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1))
        (t_3 (* z (+ (/ x t_1) (/ y t_1)))))
   (if (<= t_2 (- INFINITY))
     (- t_3 (* b (/ y (+ x (+ y t)))))
     (if (<= t_2 2e+245) t_2 (+ a t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
	double t_3 = z * ((x / t_1) + (y / t_1));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3 - (b * (y / (x + (y + t))));
	} else if (t_2 <= 2e+245) {
		tmp = t_2;
	} else {
		tmp = a + t_3;
	}
	return tmp;
}
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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
	double t_3 = z * ((x / t_1) + (y / t_1));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3 - (b * (y / (x + (y + t))));
	} else if (t_2 <= 2e+245) {
		tmp = t_2;
	} else {
		tmp = a + t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1
	t_3 = z * ((x / t_1) + (y / t_1))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_3 - (b * (y / (x + (y + t))))
	elif t_2 <= 2e+245:
		tmp = t_2
	else:
		tmp = a + t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1)
	t_3 = Float64(z * Float64(Float64(x / t_1) + Float64(y / t_1)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(t_3 - Float64(b * Float64(y / Float64(x + Float64(y + t)))));
	elseif (t_2 <= 2e+245)
		tmp = t_2;
	else
		tmp = Float64(a + t_3);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
	t_3 = z * ((x / t_1) + (y / t_1));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_3 - (b * (y / (x + (y + t))));
	elseif (t_2 <= 2e+245)
		tmp = t_2;
	else
		tmp = a + 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[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$3 - N[(b * N[(y / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+245], t$95$2, N[(a + t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

    1. Initial program 5.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 68.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -1.66 \cdot 10^{-65}:\\
\;\;\;\;\frac{y \cdot t\_1}{y + \left(x + t\right)}\\

\mathbf{elif}\;y \leq -1.52 \cdot 10^{-174}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.3e16 or 6.9999999999999998e84 < y

    1. Initial program 40.7%

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

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

    if -1.3e16 < y < -1.6599999999999999e-65

    1. Initial program 93.7%

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

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

    if -1.6599999999999999e-65 < y < -1.52e-174 or 1.90000000000000011e-111 < y < 6.9999999999999998e84

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

    if -1.52e-174 < y < -4.19999999999999978e-231

    1. Initial program 90.6%

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

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

    if -4.19999999999999978e-231 < y < 1.90000000000000011e-111

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+16}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.66 \cdot 10^{-65}:\\ \;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{-174}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-231}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-111}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.7% accurate, 0.6× 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 -3.8 \cdot 10^{+16}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-27}:\\ \;\;\;\;\frac{y \cdot t\_2}{t\_1}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-178}:\\ \;\;\;\;a + z \cdot \left(\frac{x}{t\_1} + \frac{y}{t\_1}\right)\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-111}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{+82}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \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 -3.8e+16)
     t_2
     (if (<= y -5.2e-27)
       (/ (* y t_2) t_1)
       (if (<= y -1.8e-178)
         (+ a (* z (+ (/ x t_1) (/ y t_1))))
         (if (<= y 1.25e-111)
           (+ z (/ a (/ (+ x t) t)))
           (if (<= y 1.16e+82) (+ a (/ (* y (- z b)) (+ y t))) 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 <= -3.8e+16) {
		tmp = t_2;
	} else if (y <= -5.2e-27) {
		tmp = (y * t_2) / t_1;
	} else if (y <= -1.8e-178) {
		tmp = a + (z * ((x / t_1) + (y / t_1)));
	} else if (y <= 1.25e-111) {
		tmp = z + (a / ((x + t) / t));
	} else if (y <= 1.16e+82) {
		tmp = a + ((y * (z - b)) / (y + t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = (z + a) - b
    if (y <= (-3.8d+16)) then
        tmp = t_2
    else if (y <= (-5.2d-27)) then
        tmp = (y * t_2) / t_1
    else if (y <= (-1.8d-178)) then
        tmp = a + (z * ((x / t_1) + (y / t_1)))
    else if (y <= 1.25d-111) then
        tmp = z + (a / ((x + t) / t))
    else if (y <= 1.16d+82) then
        tmp = a + ((y * (z - b)) / (y + t))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -3.8e+16) {
		tmp = t_2;
	} else if (y <= -5.2e-27) {
		tmp = (y * t_2) / t_1;
	} else if (y <= -1.8e-178) {
		tmp = a + (z * ((x / t_1) + (y / t_1)));
	} else if (y <= 1.25e-111) {
		tmp = z + (a / ((x + t) / t));
	} else if (y <= 1.16e+82) {
		tmp = a + ((y * (z - b)) / (y + t));
	} 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 <= -3.8e+16:
		tmp = t_2
	elif y <= -5.2e-27:
		tmp = (y * t_2) / t_1
	elif y <= -1.8e-178:
		tmp = a + (z * ((x / t_1) + (y / t_1)))
	elif y <= 1.25e-111:
		tmp = z + (a / ((x + t) / t))
	elif y <= 1.16e+82:
		tmp = a + ((y * (z - b)) / (y + t))
	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 <= -3.8e+16)
		tmp = t_2;
	elseif (y <= -5.2e-27)
		tmp = Float64(Float64(y * t_2) / t_1);
	elseif (y <= -1.8e-178)
		tmp = Float64(a + Float64(z * Float64(Float64(x / t_1) + Float64(y / t_1))));
	elseif (y <= 1.25e-111)
		tmp = Float64(z + Float64(a / Float64(Float64(x + t) / t)));
	elseif (y <= 1.16e+82)
		tmp = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(y + t)));
	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 <= -3.8e+16)
		tmp = t_2;
	elseif (y <= -5.2e-27)
		tmp = (y * t_2) / t_1;
	elseif (y <= -1.8e-178)
		tmp = a + (z * ((x / t_1) + (y / t_1)));
	elseif (y <= 1.25e-111)
		tmp = z + (a / ((x + t) / t));
	elseif (y <= 1.16e+82)
		tmp = a + ((y * (z - b)) / (y + t));
	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, -3.8e+16], t$95$2, If[LessEqual[y, -5.2e-27], N[(N[(y * t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, -1.8e-178], N[(a + N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-111], N[(z + N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.16e+82], N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $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 -3.8 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{y \cdot t\_2}{t\_1}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.8e16 or 1.16e82 < y

    1. Initial program 40.7%

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

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

    if -3.8e16 < y < -5.20000000000000034e-27

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

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

    if -5.20000000000000034e-27 < y < -1.79999999999999997e-178

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999997e-178 < y < 1.2500000000000001e-111

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2500000000000001e-111 < y < 1.16e82

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+16}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-27}:\\ \;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-178}:\\ \;\;\;\;a + z \cdot \left(\frac{x}{y + \left(x + t\right)} + \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-111}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{+82}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 64.2% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.5 \cdot 10^{-112}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{-176}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -0.0085000000000000006 or 5.2e-75 < y

    1. Initial program 50.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 72.0%

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

    if -0.0085000000000000006 < y < -2.65000000000000019e-65

    1. Initial program 91.6%

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

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

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

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

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

    if -2.65000000000000019e-65 < y < -2.50000000000000022e-112 or -1.5e-176 < y < 5.2e-75

    1. Initial program 75.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 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000022e-112 < y < -1.5e-176

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
      2. +-commutative56.6%

        \[\leadsto \frac{a}{\frac{\color{blue}{x + t}}{t}} \]
    8. Simplified56.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0085:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{-65}:\\ \;\;\;\;\frac{b \cdot \left(-y\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-112}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-176}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-75}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 64.5% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-112}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -0.0085000000000000006 or 1.8e-73 < y

    1. Initial program 50.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 72.0%

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

    if -0.0085000000000000006 < y < -2.65000000000000019e-65

    1. Initial program 91.6%

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

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

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

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

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

    if -2.65000000000000019e-65 < y < -2.80000000000000023e-112 or -2.40000000000000017e-173 < y < 1.8e-73

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000023e-112 < y < -2.40000000000000017e-173

    1. Initial program 79.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0085:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{-65}:\\ \;\;\;\;\frac{b \cdot \left(-y\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-112}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-173}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-73}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.5 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 9.4 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.2e52 or 9.40000000000000019e80 < y

    1. Initial program 38.6%

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

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

    if -2.2e52 < y < -1.5e-176 or 3.3000000000000001e-112 < y < 9.40000000000000019e80

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

    if -1.5e-176 < y < 3.3000000000000001e-112

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+52}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-176}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-112}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 9.4 \cdot 10^{+80}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-24} \lor \neg \left(y \leq 1.8 \cdot 10^{-73}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.99999999999999939e-24 or 1.8e-73 < y

    1. Initial program 52.5%

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

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

    if -7.99999999999999939e-24 < y < 1.8e-73

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 48.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+132}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 1200000000000:\\
\;\;\;\;z - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.0200000000000001e132 or 1.2e12 < a

    1. Initial program 47.3%

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

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

    if -1.0200000000000001e132 < a < 1.2e12

    1. Initial program 72.1%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z - b \cdot y}{t + y}} \]
    5. Taylor expanded in y around inf 46.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{+132}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 1200000000000:\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 57.0% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+79}:\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\

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


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

    1. Initial program 58.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 a around inf 36.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
      2. +-commutative57.7%

        \[\leadsto \frac{a}{\frac{\color{blue}{x + t}}{t}} \]
    8. Simplified57.7%

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

    if -2.10000000000000008e79 < t

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

      \[\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.1 \cdot 10^{+79}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 44.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+14}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.19999999999999958e127 or 2.5e14 < a

    1. Initial program 47.3%

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

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

    if -7.19999999999999958e127 < a < 2.5e14

    1. Initial program 72.1%

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

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

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

Alternative 13: 57.3% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 43.7%

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

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

    if -2.99999999999999986e184 < t

    1. Initial program 65.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 59.4%

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

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

Alternative 14: 32.6% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 63.0%

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

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

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 82.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\

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


\end{array}
\end{array}

Reproduce

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