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

Percentage Accurate: 60.3% → 97.8%
Time: 13.1s
Alternatives: 13
Speedup: 1.0×

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 13 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.3% 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: 97.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 19.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. Step-by-step derivation
      1. *-commutative19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 2: 97.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 19.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. Step-by-step derivation
      1. *-commutative19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

Alternative 3: 94.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 14.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. Step-by-step derivation
      1. *-commutative14.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

Alternative 4: 87.9% accurate, 0.3× speedup?

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

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

    1. Initial program 5.3%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative73.7%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified73.7%

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

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

    1. Initial program 99.8%

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

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

Alternative 5: 63.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -1.28 \cdot 10^{-135}:\\
\;\;\;\;\frac{y \cdot t_3}{t_2}\\

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-55}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 4.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{x + y}{\frac{t_2}{z}}\\

\mathbf{elif}\;y \leq 2.65 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.4e7 or 2.65000000000000005e35 < y

    1. Initial program 37.0%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative74.2%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified74.2%

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

    if -4.4e7 < y < -1.27999999999999997e-135

    1. Initial program 79.5%

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

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

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

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

    if -1.27999999999999997e-135 < y < 1.04999999999999992e-99

    1. Initial program 73.6%

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

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

    if 1.04999999999999992e-99 < y < 6.19999999999999993e-55 or 4.30000000000000033e-6 < y < 2.65000000000000005e35

    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. Step-by-step derivation
      1. *-commutative81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.19999999999999993e-55 < y < 4.30000000000000033e-6

    1. Initial program 53.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -44000000:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.28 \cdot 10^{-135}:\\ \;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-99}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-55}:\\ \;\;\;\;\frac{y \cdot \left(a - b\right) + z \cdot \left(x + y\right)}{x + y}\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-6}:\\ \;\;\;\;\frac{x + y}{\frac{y + \left(x + t\right)}{z}}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+35}:\\ \;\;\;\;\frac{y \cdot \left(a - b\right) + z \cdot \left(x + y\right)}{x + y}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 6: 65.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+37} \lor \neg \left(y \leq 1.5 \cdot 10^{+74}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3199999999999999e37 or 1.5e74 < y

    1. Initial program 32.9%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative78.0%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified78.0%

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

    if -1.3199999999999999e37 < y < 1.5e74

    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. Step-by-step derivation
      1. *-commutative74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 63.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -3.3 \cdot 10^{-130}:\\
\;\;\;\;\frac{y \cdot t_2}{t_1}\\

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

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

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

\mathbf{elif}\;y \leq 1700000:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.4e7 or 1.7e6 < y

    1. Initial program 38.8%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative72.7%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified72.7%

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

    if -2.4e7 < y < -3.2999999999999998e-130

    1. Initial program 79.5%

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

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

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

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

    if -3.2999999999999998e-130 < y < 4.9e-119

    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. Taylor expanded in y around 0 66.6%

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

    if 4.9e-119 < y < 3.39999999999999987e-54

    1. Initial program 71.1%

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

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

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

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

    if 3.39999999999999987e-54 < y < 2.45e-46

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\frac{z \cdot x + a \cdot t}{t + x}} \]
    3. Taylor expanded in t around -inf 100.0%

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

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

        \[\leadsto \color{blue}{a - \frac{-1 \cdot \left(z \cdot x\right) - -1 \cdot \left(a \cdot x\right)}{t}} \]
      3. distribute-lft-out--100.0%

        \[\leadsto a - \frac{\color{blue}{-1 \cdot \left(z \cdot x - a \cdot x\right)}}{t} \]
      4. distribute-rgt-out--100.0%

        \[\leadsto a - \frac{-1 \cdot \color{blue}{\left(x \cdot \left(z - a\right)\right)}}{t} \]
      5. associate-*r*100.0%

        \[\leadsto a - \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \left(z - a\right)}}{t} \]
      6. neg-mul-1100.0%

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

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

    if 2.45e-46 < y < 1.7e6

    1. Initial program 53.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -24000000:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-130}:\\ \;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{-119}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-46}:\\ \;\;\;\;a + \frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;y \leq 1700000:\\ \;\;\;\;\frac{x + y}{\frac{y + \left(x + t\right)}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 8: 64.0% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.65e37 or 1.7999999999999999e-104 < y

    1. Initial program 40.6%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative72.0%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified72.0%

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

    if -1.65e37 < y < -1.0200000000000001e-204

    1. Initial program 76.1%

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

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

    if -1.0200000000000001e-204 < y < 1.7999999999999999e-104

    1. Initial program 75.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+37}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-204}:\\ \;\;\;\;\frac{\left(y \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-104}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 9: 58.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -32000000 \lor \neg \left(t \leq 2 \cdot 10^{+150}\right):\\
\;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2e7 or 1.99999999999999996e150 < t

    1. Initial program 48.1%

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

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

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

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

    if -3.2e7 < t < 1.99999999999999996e150

    1. Initial program 60.2%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative67.9%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified67.9%

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

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

Alternative 10: 57.5% accurate, 1.6× speedup?

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

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

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

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


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

    1. Initial program 56.5%

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

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

    if -9.20000000000000049e45 < t < 6.59999999999999993e173

    1. Initial program 59.1%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative66.8%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified66.8%

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

    if 6.59999999999999993e173 < t

    1. Initial program 38.8%

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

      \[\leadsto \color{blue}{\frac{z \cdot x + a \cdot t}{t + x}} \]
    3. Taylor expanded in t around -inf 56.1%

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

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

        \[\leadsto \color{blue}{a - \frac{-1 \cdot \left(z \cdot x\right) - -1 \cdot \left(a \cdot x\right)}{t}} \]
      3. distribute-lft-out--56.1%

        \[\leadsto a - \frac{\color{blue}{-1 \cdot \left(z \cdot x - a \cdot x\right)}}{t} \]
      4. distribute-rgt-out--56.2%

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

        \[\leadsto a - \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \left(z - a\right)}}{t} \]
      6. neg-mul-156.2%

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

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

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

Alternative 11: 42.8% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+234}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -1.9 \cdot 10^{+156}:\\
\;\;\;\;a\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{+86}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{-16}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.85000000000000002e234 or -1.90000000000000012e156 < z < -1.6e86 or 7.79999999999999954e-16 < z

    1. Initial program 44.5%

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

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

    if -2.85000000000000002e234 < z < -1.90000000000000012e156 or -1.6e86 < z < 7.79999999999999954e-16

    1. Initial program 62.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+234}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+156}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+86}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-16}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 12: 57.9% accurate, 2.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.20000000000000049e45 or 5.5999999999999999e172 < t

    1. Initial program 49.1%

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

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

    if -9.20000000000000049e45 < t < 5.5999999999999999e172

    1. Initial program 58.9%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. +-commutative67.1%

        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
    4. Simplified67.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+45}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+172}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 13: 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 55.5%

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

    \[\leadsto \color{blue}{a} \]
  3. Final simplification36.1%

    \[\leadsto a \]

Developer target: 82.5% 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 2023213 
(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)))