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

Percentage Accurate: 59.7% → 91.3%
Time: 13.8s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 59.7% accurate, 1.0× speedup?

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

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

Alternative 1: 91.3% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.40000000000000001e-19 or 2.0999999999999999e-49 < a

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000001e-19 < a < 2.0999999999999999e-49

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 5.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

    1. Initial program 6.8%

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

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

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

Alternative 3: 83.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 5.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

    1. Initial program 6.8%

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

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

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

Alternative 4: 91.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(y + x\right)\\ t_2 := z \cdot t\_1\\ t_3 := \frac{y}{t\_1}\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{-29} \lor \neg \left(a \leq 2.9 \cdot 10^{-49}\right):\\ \;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{z}{a} \cdot \frac{y + x}{t\_1} + t\_3\right) - y \cdot \frac{b}{a \cdot t\_1}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_3 + a \cdot \frac{t + y}{t\_2}\right) - b \cdot \frac{y}{t\_2}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ y x))) (t_2 (* z t_1)) (t_3 (/ y t_1)))
   (if (or (<= a -3.7e-29) (not (<= a 2.9e-49)))
     (*
      a
      (+
       (/ t t_1)
       (- (+ (* (/ z a) (/ (+ y x) t_1)) t_3) (* y (/ b (* a t_1))))))
     (* z (+ (/ x t_1) (- (+ t_3 (* a (/ (+ t y) t_2))) (* b (/ y t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (y + x);
	double t_2 = z * t_1;
	double t_3 = y / t_1;
	double tmp;
	if ((a <= -3.7e-29) || !(a <= 2.9e-49)) {
		tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))));
	} else {
		tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / 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) :: t_3
    real(8) :: tmp
    t_1 = t + (y + x)
    t_2 = z * t_1
    t_3 = y / t_1
    if ((a <= (-3.7d-29)) .or. (.not. (a <= 2.9d-49))) then
        tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))))
    else
        tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / 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 = t + (y + x);
	double t_2 = z * t_1;
	double t_3 = y / t_1;
	double tmp;
	if ((a <= -3.7e-29) || !(a <= 2.9e-49)) {
		tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))));
	} else {
		tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2))));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t + (y + x)
	t_2 = z * t_1
	t_3 = y / t_1
	tmp = 0
	if (a <= -3.7e-29) or not (a <= 2.9e-49):
		tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))))
	else:
		tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2))))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(y + x))
	t_2 = Float64(z * t_1)
	t_3 = Float64(y / t_1)
	tmp = 0.0
	if ((a <= -3.7e-29) || !(a <= 2.9e-49))
		tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(Float64(z / a) * Float64(Float64(y + x) / t_1)) + t_3) - Float64(y * Float64(b / Float64(a * t_1))))));
	else
		tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_3 + Float64(a * Float64(Float64(t + y) / t_2))) - Float64(b * Float64(y / t_2)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t + (y + x);
	t_2 = z * t_1;
	t_3 = y / t_1;
	tmp = 0.0;
	if ((a <= -3.7e-29) || ~((a <= 2.9e-49)))
		tmp = a * ((t / t_1) + ((((z / a) * ((y + x) / t_1)) + t_3) - (y * (b / (a * t_1)))));
	else
		tmp = z * ((x / t_1) + ((t_3 + (a * ((t + y) / t_2))) - (b * (y / t_2))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y / t$95$1), $MachinePrecision]}, If[Or[LessEqual[a, -3.7e-29], N[Not[LessEqual[a, 2.9e-49]], $MachinePrecision]], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(N[(z / a), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] - N[(y * N[(b / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$3 + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.6999999999999997e-29 or 2.9e-49 < a

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999997e-29 < a < 2.9e-49

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.2% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8e49 or 3.1000000000000003e39 < z

    1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e49 < z < 3.1000000000000003e39

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+183} \lor \neg \left(z \leq 2.4 \cdot 10^{+40}\right):\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1499999999999999e183 or 2.4e40 < z

    1. Initial program 38.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1499999999999999e183 < z < 2.4e40

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 54.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -8 \cdot 10^{+250}:\\
\;\;\;\;z \cdot \frac{y + x}{t}\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{+219}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq -3.65 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-243}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.1999999999999999e264 or -7.9999999999999994e250 < t < -4.4000000000000003e219 or 2.70000000000000013e123 < t

    1. Initial program 38.6%

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

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

    if -5.1999999999999999e264 < t < -7.9999999999999994e250

    1. Initial program 71.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x + y}{t}} \]
    8. Simplified81.5%

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

    if -4.4000000000000003e219 < t < -3.6500000000000001e-31 or -4.6e-243 < t < 2.70000000000000013e123

    1. Initial program 63.4%

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

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

    if -3.6500000000000001e-31 < t < -4.6e-243

    1. Initial program 74.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+264}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+250}:\\ \;\;\;\;z \cdot \frac{y + x}{t}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+219}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -3.65 \cdot 10^{-31}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-243}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+123}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.8% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.39999999999999986e39 or 4.1000000000000002e27 < z

    1. Initial program 45.8%

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

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

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

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

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

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

    if -6.39999999999999986e39 < z < -1.20000000000000003e-73

    1. Initial program 69.6%

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

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

    if -1.20000000000000003e-73 < z < -9.00000000000000078e-202

    1. Initial program 73.7%

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

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

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

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

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

    if -9.00000000000000078e-202 < z < 4.1000000000000002e27

    1. Initial program 78.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+39}:\\ \;\;\;\;z \cdot \frac{y + x}{y + \left(t + x\right)}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-73}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-202}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(t + x\right)}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+27}:\\ \;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + x}{y + \left(t + x\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 71.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+31} \lor \neg \left(z \leq 9.5 \cdot 10^{-55}\right):\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.09999999999999979e31 or 9.5000000000000006e-55 < z

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999979e31 < z < 9.5000000000000006e-55

    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. Add Preprocessing
    3. Step-by-step derivation
      1. div-inv75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 68.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+19} \lor \neg \left(z \leq 6.1 \cdot 10^{-55}\right):\\
\;\;\;\;z \cdot \frac{x + \left(y + a \cdot \frac{t + y}{z}\right)}{x + \left(t + y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6e19 or 6.1000000000000001e-55 < z

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6e19 < z < 6.1000000000000001e-55

    1. Initial program 77.3%

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

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

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

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

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

Alternative 11: 66.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-109} \lor \neg \left(y \leq 2.6 \cdot 10^{-67}\right):\\
\;\;\;\;\left(a + z\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.09999999999999996e-109 or 2.5999999999999999e-67 < y

    1. Initial program 52.8%

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

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

    if -2.09999999999999996e-109 < y < 2.5999999999999999e-67

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 59.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+40}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.40000000000000017e38 or 3.59999999999999996e40 < z

    1. Initial program 45.6%

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

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

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

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

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

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

    if -2.40000000000000017e38 < z < -1.3e-73

    1. Initial program 69.6%

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

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

    if -1.3e-73 < z < 3.59999999999999996e40

    1. Initial program 76.6%

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

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

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

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

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

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

Alternative 13: 55.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-242}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.3200000000000001e206 or 6.40000000000000024e122 < t

    1. Initial program 42.1%

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

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

    if -1.3200000000000001e206 < t < -4.5999999999999997e-31 or -1.5e-242 < t < 6.40000000000000024e122

    1. Initial program 63.4%

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

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

    if -4.5999999999999997e-31 < t < -1.5e-242

    1. Initial program 74.7%

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

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

Alternative 14: 59.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+111} \lor \neg \left(a \leq 2.7 \cdot 10^{+82}\right):\\
\;\;\;\;a \cdot \frac{t + y}{y + \left(t + x\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.19999999999999999e111 or 2.6999999999999999e82 < a

    1. Initial program 47.7%

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

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

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

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

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

    if -2.19999999999999999e111 < a < 2.6999999999999999e82

    1. Initial program 66.2%

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

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

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

Alternative 15: 57.3% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.6 \cdot 10^{+201}:\\
\;\;\;\;\left(a + z\right) - b\\

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


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

    1. Initial program 62.0%

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

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

    if 1.6e201 < b

    1. Initial program 43.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 43.5% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+118}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e32 or 1.65e118 < t

    1. Initial program 48.5%

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

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

    if -1.05e32 < t < 1.65e118

    1. Initial program 68.1%

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

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

Alternative 17: 33.0% 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 59.9%

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

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

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

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

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