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

Percentage Accurate: 60.1% → 90.1%
Time: 19.6s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 60.1% accurate, 1.0× speedup?

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

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

Alternative 1: 90.1% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 8.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

    1. Initial program 8.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 6.4%

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

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

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

    1. Initial program 99.6%

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

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

Alternative 3: 89.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+269}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 8.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

    1. Initial program 4.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 79.0%

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

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

Alternative 4: 65.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+155}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -0.00062:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-144}:\\ \;\;\;\;\frac{x \cdot z + y \cdot \left(z - b\right)}{t_1}\\ \mathbf{elif}\;y \leq 3.05 \cdot 10^{-304}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{-128}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{t_1}\\ \mathbf{elif}\;y \leq 11000000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (+ a (/ z (/ (+ t (+ x y)) (+ x y)))))
        (t_3 (- (+ z a) b)))
   (if (<= y -3.8e+155)
     t_3
     (if (<= y -0.00062)
       t_2
       (if (<= y -1.8e-144)
         (/ (+ (* x z) (* y (- z b))) t_1)
         (if (<= y 3.05e-304)
           t_2
           (if (<= y 1.25e-198)
             (/ (+ (* t a) (* x z)) (+ x t))
             (if (<= y 5.7e-154)
               (- a (/ (* y b) t))
               (if (<= y 1.72e-128)
                 (/ (- (* x z) (* y b)) t_1)
                 (if (<= y 11000000000.0) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = a + (z / ((t + (x + y)) / (x + y)));
	double t_3 = (z + a) - b;
	double tmp;
	if (y <= -3.8e+155) {
		tmp = t_3;
	} else if (y <= -0.00062) {
		tmp = t_2;
	} else if (y <= -1.8e-144) {
		tmp = ((x * z) + (y * (z - b))) / t_1;
	} else if (y <= 3.05e-304) {
		tmp = t_2;
	} else if (y <= 1.25e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 5.7e-154) {
		tmp = a - ((y * b) / t);
	} else if (y <= 1.72e-128) {
		tmp = ((x * z) - (y * b)) / t_1;
	} else if (y <= 11000000000.0) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = a + (z / ((t + (x + y)) / (x + y)))
    t_3 = (z + a) - b
    if (y <= (-3.8d+155)) then
        tmp = t_3
    else if (y <= (-0.00062d0)) then
        tmp = t_2
    else if (y <= (-1.8d-144)) then
        tmp = ((x * z) + (y * (z - b))) / t_1
    else if (y <= 3.05d-304) then
        tmp = t_2
    else if (y <= 1.25d-198) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 5.7d-154) then
        tmp = a - ((y * b) / t)
    else if (y <= 1.72d-128) then
        tmp = ((x * z) - (y * b)) / t_1
    else if (y <= 11000000000.0d0) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = a + (z / ((t + (x + y)) / (x + y)));
	double t_3 = (z + a) - b;
	double tmp;
	if (y <= -3.8e+155) {
		tmp = t_3;
	} else if (y <= -0.00062) {
		tmp = t_2;
	} else if (y <= -1.8e-144) {
		tmp = ((x * z) + (y * (z - b))) / t_1;
	} else if (y <= 3.05e-304) {
		tmp = t_2;
	} else if (y <= 1.25e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 5.7e-154) {
		tmp = a - ((y * b) / t);
	} else if (y <= 1.72e-128) {
		tmp = ((x * z) - (y * b)) / t_1;
	} else if (y <= 11000000000.0) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = a + (z / ((t + (x + y)) / (x + y)))
	t_3 = (z + a) - b
	tmp = 0
	if y <= -3.8e+155:
		tmp = t_3
	elif y <= -0.00062:
		tmp = t_2
	elif y <= -1.8e-144:
		tmp = ((x * z) + (y * (z - b))) / t_1
	elif y <= 3.05e-304:
		tmp = t_2
	elif y <= 1.25e-198:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 5.7e-154:
		tmp = a - ((y * b) / t)
	elif y <= 1.72e-128:
		tmp = ((x * z) - (y * b)) / t_1
	elif y <= 11000000000.0:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y))))
	t_3 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -3.8e+155)
		tmp = t_3;
	elseif (y <= -0.00062)
		tmp = t_2;
	elseif (y <= -1.8e-144)
		tmp = Float64(Float64(Float64(x * z) + Float64(y * Float64(z - b))) / t_1);
	elseif (y <= 3.05e-304)
		tmp = t_2;
	elseif (y <= 1.25e-198)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 5.7e-154)
		tmp = Float64(a - Float64(Float64(y * b) / t));
	elseif (y <= 1.72e-128)
		tmp = Float64(Float64(Float64(x * z) - Float64(y * b)) / t_1);
	elseif (y <= 11000000000.0)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = a + (z / ((t + (x + y)) / (x + y)));
	t_3 = (z + a) - b;
	tmp = 0.0;
	if (y <= -3.8e+155)
		tmp = t_3;
	elseif (y <= -0.00062)
		tmp = t_2;
	elseif (y <= -1.8e-144)
		tmp = ((x * z) + (y * (z - b))) / t_1;
	elseif (y <= 3.05e-304)
		tmp = t_2;
	elseif (y <= 1.25e-198)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 5.7e-154)
		tmp = a - ((y * b) / t);
	elseif (y <= 1.72e-128)
		tmp = ((x * z) - (y * b)) / t_1;
	elseif (y <= 11000000000.0)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.8e+155], t$95$3, If[LessEqual[y, -0.00062], t$95$2, If[LessEqual[y, -1.8e-144], N[(N[(N[(x * z), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 3.05e-304], t$95$2, If[LessEqual[y, 1.25e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.7e-154], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e-128], N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 11000000000.0], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -0.00062:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 3.05 \cdot 10^{-304}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;y \leq 1.72 \cdot 10^{-128}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq 11000000000:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.8000000000000001e155 or 1.1e10 < y

    1. Initial program 37.8%

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

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

    if -3.8000000000000001e155 < y < -6.2e-4 or -1.8e-144 < y < 3.0500000000000002e-304 or 1.71999999999999992e-128 < y < 1.1e10

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.2e-4 < y < -1.8e-144

    1. Initial program 86.1%

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

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

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

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

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

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

    if 3.0500000000000002e-304 < y < 1.25e-198

    1. Initial program 87.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 0 83.8%

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

    if 1.25e-198 < y < 5.6999999999999998e-154

    1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

    if 5.6999999999999998e-154 < y < 1.71999999999999992e-128

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+155}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -0.00062:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-144}:\\ \;\;\;\;\frac{x \cdot z + y \cdot \left(z - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 3.05 \cdot 10^{-304}:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{-128}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 11000000000:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{+155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{-153}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-128}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 48000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (/ z (/ (+ t (+ x y)) (+ x y))))) (t_2 (- (+ z a) b)))
   (if (<= y -3.5e+155)
     t_2
     (if (<= y 5.5e-305)
       t_1
       (if (<= y 4.6e-198)
         (/ (+ (* t a) (* x z)) (+ x t))
         (if (<= y 4.1e-153)
           (- a (/ (* y b) t))
           (if (<= y 1.95e-128)
             (/ (- (* x z) (* y b)) (+ y (+ x t)))
             (if (<= y 48000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z / ((t + (x + y)) / (x + y)));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -3.5e+155) {
		tmp = t_2;
	} else if (y <= 5.5e-305) {
		tmp = t_1;
	} else if (y <= 4.6e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 4.1e-153) {
		tmp = a - ((y * b) / t);
	} else if (y <= 1.95e-128) {
		tmp = ((x * z) - (y * b)) / (y + (x + t));
	} else if (y <= 48000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a + (z / ((t + (x + y)) / (x + y)))
    t_2 = (z + a) - b
    if (y <= (-3.5d+155)) then
        tmp = t_2
    else if (y <= 5.5d-305) then
        tmp = t_1
    else if (y <= 4.6d-198) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 4.1d-153) then
        tmp = a - ((y * b) / t)
    else if (y <= 1.95d-128) then
        tmp = ((x * z) - (y * b)) / (y + (x + t))
    else if (y <= 48000000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z / ((t + (x + y)) / (x + y)));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -3.5e+155) {
		tmp = t_2;
	} else if (y <= 5.5e-305) {
		tmp = t_1;
	} else if (y <= 4.6e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 4.1e-153) {
		tmp = a - ((y * b) / t);
	} else if (y <= 1.95e-128) {
		tmp = ((x * z) - (y * b)) / (y + (x + t));
	} else if (y <= 48000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (z / ((t + (x + y)) / (x + y)))
	t_2 = (z + a) - b
	tmp = 0
	if y <= -3.5e+155:
		tmp = t_2
	elif y <= 5.5e-305:
		tmp = t_1
	elif y <= 4.6e-198:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 4.1e-153:
		tmp = a - ((y * b) / t)
	elif y <= 1.95e-128:
		tmp = ((x * z) - (y * b)) / (y + (x + t))
	elif y <= 48000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y))))
	t_2 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -3.5e+155)
		tmp = t_2;
	elseif (y <= 5.5e-305)
		tmp = t_1;
	elseif (y <= 4.6e-198)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 4.1e-153)
		tmp = Float64(a - Float64(Float64(y * b) / t));
	elseif (y <= 1.95e-128)
		tmp = Float64(Float64(Float64(x * z) - Float64(y * b)) / Float64(y + Float64(x + t)));
	elseif (y <= 48000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (z / ((t + (x + y)) / (x + y)));
	t_2 = (z + a) - b;
	tmp = 0.0;
	if (y <= -3.5e+155)
		tmp = t_2;
	elseif (y <= 5.5e-305)
		tmp = t_1;
	elseif (y <= 4.6e-198)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 4.1e-153)
		tmp = a - ((y * b) / t);
	elseif (y <= 1.95e-128)
		tmp = ((x * z) - (y * b)) / (y + (x + t));
	elseif (y <= 48000000000.0)
		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[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.5e+155], t$95$2, If[LessEqual[y, 5.5e-305], t$95$1, If[LessEqual[y, 4.6e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e-153], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-128], N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 48000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;y \leq 48000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.49999999999999985e155 or 4.8e10 < y

    1. Initial program 37.8%

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

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

    if -3.49999999999999985e155 < y < 5.5e-305 or 1.94999999999999998e-128 < y < 4.8e10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e-305 < y < 4.60000000000000027e-198

    1. Initial program 87.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 0 83.8%

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

    if 4.60000000000000027e-198 < y < 4.1e-153

    1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

    if 4.1e-153 < y < 1.94999999999999998e-128

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+155}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-305}:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{-153}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-128}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 48000000000:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -6.6 \cdot 10^{+155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-304}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-127}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 52000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (/ z (/ (+ t (+ x y)) (+ x y))))) (t_2 (- (+ z a) b)))
   (if (<= y -6.6e+155)
     t_2
     (if (<= y 2e-304)
       t_1
       (if (<= y 2.7e-198)
         (/ (+ (* t a) (* x z)) (+ x t))
         (if (<= y 5.7e-154)
           (- a (/ (* y b) t))
           (if (<= y 5.8e-127)
             (/ (- (* (+ y t) a) (* y b)) (+ y (+ x t)))
             (if (<= y 52000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z / ((t + (x + y)) / (x + y)));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -6.6e+155) {
		tmp = t_2;
	} else if (y <= 2e-304) {
		tmp = t_1;
	} else if (y <= 2.7e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 5.7e-154) {
		tmp = a - ((y * b) / t);
	} else if (y <= 5.8e-127) {
		tmp = (((y + t) * a) - (y * b)) / (y + (x + t));
	} else if (y <= 52000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a + (z / ((t + (x + y)) / (x + y)))
    t_2 = (z + a) - b
    if (y <= (-6.6d+155)) then
        tmp = t_2
    else if (y <= 2d-304) then
        tmp = t_1
    else if (y <= 2.7d-198) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 5.7d-154) then
        tmp = a - ((y * b) / t)
    else if (y <= 5.8d-127) then
        tmp = (((y + t) * a) - (y * b)) / (y + (x + t))
    else if (y <= 52000000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z / ((t + (x + y)) / (x + y)));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -6.6e+155) {
		tmp = t_2;
	} else if (y <= 2e-304) {
		tmp = t_1;
	} else if (y <= 2.7e-198) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 5.7e-154) {
		tmp = a - ((y * b) / t);
	} else if (y <= 5.8e-127) {
		tmp = (((y + t) * a) - (y * b)) / (y + (x + t));
	} else if (y <= 52000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (z / ((t + (x + y)) / (x + y)))
	t_2 = (z + a) - b
	tmp = 0
	if y <= -6.6e+155:
		tmp = t_2
	elif y <= 2e-304:
		tmp = t_1
	elif y <= 2.7e-198:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 5.7e-154:
		tmp = a - ((y * b) / t)
	elif y <= 5.8e-127:
		tmp = (((y + t) * a) - (y * b)) / (y + (x + t))
	elif y <= 52000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y))))
	t_2 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -6.6e+155)
		tmp = t_2;
	elseif (y <= 2e-304)
		tmp = t_1;
	elseif (y <= 2.7e-198)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 5.7e-154)
		tmp = Float64(a - Float64(Float64(y * b) / t));
	elseif (y <= 5.8e-127)
		tmp = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / Float64(y + Float64(x + t)));
	elseif (y <= 52000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (z / ((t + (x + y)) / (x + y)));
	t_2 = (z + a) - b;
	tmp = 0.0;
	if (y <= -6.6e+155)
		tmp = t_2;
	elseif (y <= 2e-304)
		tmp = t_1;
	elseif (y <= 2.7e-198)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 5.7e-154)
		tmp = a - ((y * b) / t);
	elseif (y <= 5.8e-127)
		tmp = (((y + t) * a) - (y * b)) / (y + (x + t));
	elseif (y <= 52000000000.0)
		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[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -6.6e+155], t$95$2, If[LessEqual[y, 2e-304], t$95$1, If[LessEqual[y, 2.7e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.7e-154], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-127], N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 52000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2 \cdot 10^{-304}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;y \leq 52000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.5999999999999997e155 or 5.2e10 < y

    1. Initial program 37.8%

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

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

    if -6.5999999999999997e155 < y < 1.99999999999999994e-304 or 5.8000000000000001e-127 < y < 5.2e10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999994e-304 < y < 2.7000000000000002e-198

    1. Initial program 87.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 0 83.8%

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

    if 2.7000000000000002e-198 < y < 5.6999999999999998e-154

    1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

    if 5.6999999999999998e-154 < y < 5.8000000000000001e-127

    1. Initial program 99.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+155}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-304}:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-154}:\\ \;\;\;\;a - \frac{y \cdot b}{t}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-127}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 52000000000:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 80.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 0.00013:\\
\;\;\;\;z \cdot \frac{x + y}{t_2} - \frac{b}{\frac{t_2}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.9999999999999999e139 or 1.29999999999999989e-4 < 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 a around 0 75.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.9999999999999999e139 < a < -1.60000000000000005e-52

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.60000000000000005e-52 < a < 1.29999999999999989e-4

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 81.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot \left(\left(z + a\right) - b\right)\right)}{t_1}\\

\mathbf{elif}\;a \leq 24000:\\
\;\;\;\;z \cdot \frac{x + y}{t_2} - \frac{b}{\frac{t_2}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4999999999999998e88 or 24000 < a

    1. Initial program 45.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 0 75.0%

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999998e88 < a < -4.80000000000000015e-53

    1. Initial program 78.9%

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

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

    if -4.80000000000000015e-53 < a < 24000

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 68.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.05 \cdot 10^{+156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-180}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 52000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (/ z (/ (+ t (+ x y)) (+ x y))))) (t_2 (- (+ z a) b)))
   (if (<= y -2.05e+156)
     t_2
     (if (<= y 8e-305)
       t_1
       (if (<= y 2.7e-180)
         (/ (+ (* t a) (* x z)) (+ x t))
         (if (<= y 52000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z / ((t + (x + y)) / (x + y)));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -2.05e+156) {
		tmp = t_2;
	} else if (y <= 8e-305) {
		tmp = t_1;
	} else if (y <= 2.7e-180) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 52000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a + (z / ((t + (x + y)) / (x + y)))
    t_2 = (z + a) - b
    if (y <= (-2.05d+156)) then
        tmp = t_2
    else if (y <= 8d-305) then
        tmp = t_1
    else if (y <= 2.7d-180) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 52000000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z / ((t + (x + y)) / (x + y)));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -2.05e+156) {
		tmp = t_2;
	} else if (y <= 8e-305) {
		tmp = t_1;
	} else if (y <= 2.7e-180) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 52000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (z / ((t + (x + y)) / (x + y)))
	t_2 = (z + a) - b
	tmp = 0
	if y <= -2.05e+156:
		tmp = t_2
	elif y <= 8e-305:
		tmp = t_1
	elif y <= 2.7e-180:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 52000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y))))
	t_2 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -2.05e+156)
		tmp = t_2;
	elseif (y <= 8e-305)
		tmp = t_1;
	elseif (y <= 2.7e-180)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 52000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (z / ((t + (x + y)) / (x + y)));
	t_2 = (z + a) - b;
	tmp = 0.0;
	if (y <= -2.05e+156)
		tmp = t_2;
	elseif (y <= 8e-305)
		tmp = t_1;
	elseif (y <= 2.7e-180)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 52000000000.0)
		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[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.05e+156], t$95$2, If[LessEqual[y, 8e-305], t$95$1, If[LessEqual[y, 2.7e-180], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 52000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 8 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 52000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.0500000000000001e156 or 5.2e10 < y

    1. Initial program 37.8%

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

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

    if -2.0500000000000001e156 < y < 7.99999999999999997e-305 or 2.70000000000000014e-180 < y < 5.2e10

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999997e-305 < y < 2.70000000000000014e-180

    1. Initial program 87.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+156}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-305}:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-180}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 52000000000:\\ \;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.2% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.3 \cdot 10^{-141} \lor \neg \left(y \leq 1.6 \cdot 10^{-132}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.5e64 or -5.3999999999999996e-110 < y < -2.29999999999999995e-141 or 1.6000000000000001e-132 < y

    1. Initial program 50.0%

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

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

    if -2.5e64 < y < -5.3999999999999996e-110

    1. Initial program 80.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z - b \cdot y}{t + y}} \]
    7. Step-by-step derivation
      1. *-commutative51.2%

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

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

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

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

    if -2.29999999999999995e-141 < y < 1.6000000000000001e-132

    1. Initial program 79.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+64}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-110}:\\ \;\;\;\;\frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-141} \lor \neg \left(y \leq 1.6 \cdot 10^{-132}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.4% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 3 \cdot 10^{-122}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9.2000000000000001e-57 or 3.00000000000000004e-122 < y

    1. Initial program 52.8%

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

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

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

    1. Initial program 81.9%

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

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

    if 4.60000000000000027e-198 < y < 1.60000000000000004e-145

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000004e-145 < y < 3.00000000000000004e-122

    1. Initial program 80.3%

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

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

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

Alternative 12: 43.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-56}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-48} \lor \neg \left(a \leq 2.15 \cdot 10^{-14}\right) \land a \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -3.4e-56)
   a
   (if (or (<= a 3.2e-48) (and (not (<= a 2.15e-14)) (<= a 6.1e+119)))
     z
     (- a b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -3.4e-56) {
		tmp = a;
	} else if ((a <= 3.2e-48) || (!(a <= 2.15e-14) && (a <= 6.1e+119))) {
		tmp = z;
	} else {
		tmp = a - b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-3.4d-56)) then
        tmp = a
    else if ((a <= 3.2d-48) .or. (.not. (a <= 2.15d-14)) .and. (a <= 6.1d+119)) then
        tmp = z
    else
        tmp = a - b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -3.4e-56) {
		tmp = a;
	} else if ((a <= 3.2e-48) || (!(a <= 2.15e-14) && (a <= 6.1e+119))) {
		tmp = z;
	} else {
		tmp = a - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -3.4e-56:
		tmp = a
	elif (a <= 3.2e-48) or (not (a <= 2.15e-14) and (a <= 6.1e+119)):
		tmp = z
	else:
		tmp = a - b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -3.4e-56)
		tmp = a;
	elseif ((a <= 3.2e-48) || (!(a <= 2.15e-14) && (a <= 6.1e+119)))
		tmp = z;
	else
		tmp = Float64(a - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -3.4e-56)
		tmp = a;
	elseif ((a <= 3.2e-48) || (~((a <= 2.15e-14)) && (a <= 6.1e+119)))
		tmp = z;
	else
		tmp = a - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.4e-56], a, If[Or[LessEqual[a, 3.2e-48], And[N[Not[LessEqual[a, 2.15e-14]], $MachinePrecision], LessEqual[a, 6.1e+119]]], z, N[(a - b), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-48} \lor \neg \left(a \leq 2.15 \cdot 10^{-14}\right) \land a \leq 6.1 \cdot 10^{+119}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.39999999999999982e-56

    1. Initial program 52.0%

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

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

    if -3.39999999999999982e-56 < a < 3.1999999999999998e-48 or 2.14999999999999999e-14 < a < 6.1e119

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

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

    if 3.1999999999999998e-48 < a < 2.14999999999999999e-14 or 6.1e119 < a

    1. Initial program 47.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-56}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-48} \lor \neg \left(a \leq 2.15 \cdot 10^{-14}\right) \land a \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 59.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+162} \lor \neg \left(t \leq 3.5 \cdot 10^{+141}\right):\\ \;\;\;\;\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 (or (<= t -2.2e+162) (not (<= t 3.5e+141)))
   (/ 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.2e+162) || !(t <= 3.5e+141)) {
		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.2d+162)) .or. (.not. (t <= 3.5d+141))) 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.2e+162) || !(t <= 3.5e+141)) {
		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.2e+162) or not (t <= 3.5e+141):
		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.2e+162) || !(t <= 3.5e+141))
		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.2e+162) || ~((t <= 3.5e+141)))
		tmp = a / ((x + t) / t);
	else
		tmp = (z + a) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.2e+162], N[Not[LessEqual[t, 3.5e+141]], $MachinePrecision]], 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.2 \cdot 10^{+162} \lor \neg \left(t \leq 3.5 \cdot 10^{+141}\right):\\
\;\;\;\;\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.2000000000000002e162 or 3.5e141 < t

    1. Initial program 47.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 31.9%

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000002e162 < t < 3.5e141

    1. Initial program 68.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 62.6%

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

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

Alternative 14: 47.2% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+121}:\\
\;\;\;\;z - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.29999999999999995e-52

    1. Initial program 52.6%

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

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

    if -3.29999999999999995e-52 < a < 2.8999999999999999e121

    1. Initial program 74.3%

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

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

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

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

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

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

    if 2.8999999999999999e121 < a

    1. Initial program 45.8%

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

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

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

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

      \[\leadsto \color{blue}{a - b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.3%

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

Alternative 15: 43.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 49.9%

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

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

    if -7.80000000000000013e-57 < a < 2.90000000000000016e118

    1. Initial program 74.8%

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

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

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

Alternative 16: 57.1% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 46.4%

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

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

    if -3.2000000000000001e162 < t

    1. Initial program 66.2%

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

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

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

Alternative 17: 32.8% accurate, 21.0× speedup?

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

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

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

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

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 82.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024026 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

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

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