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

Percentage Accurate: 59.6% → 90.9%
Time: 13.9s
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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 90.9% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.35e-17 or 4.9000000000000002e-20 < z

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

      \[\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+72.7%

        \[\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. +-commutative72.7%

        \[\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. +-commutative72.7%

        \[\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. times-frac86.9%

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

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

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

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

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

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

    if -2.35e-17 < z < 4.9000000000000002e-20

    1. Initial program 81.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 b around 0 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.3% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.0000000000000004e301 or 1.99999999999999992e217 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 14.7%

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

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

    if -5.0000000000000004e301 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999992e217

    1. Initial program 99.4%

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

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

Alternative 3: 61.4% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -1.85 \cdot 10^{-149}:\\
\;\;\;\;-b\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.84999999999999998e56 or 9.99999999999999925e125 < z

    1. Initial program 35.7%

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

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

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

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

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

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

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

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

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

    if -1.84999999999999998e56 < z < -1.99999999999999997e-45

    1. Initial program 88.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 0 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999997e-45 < z < -1.1e-145

    1. Initial program 49.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 33.8%

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

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

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

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

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

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

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

    if -1.1e-145 < z < -1.84999999999999995e-149

    1. Initial program 51.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 51.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot b} \]
    7. Step-by-step derivation
      1. neg-mul-1100.0%

        \[\leadsto \color{blue}{-b} \]
    8. Simplified100.0%

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

    if -1.84999999999999995e-149 < z < 1.95000000000000008e-101

    1. Initial program 86.0%

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

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

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

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

    if 1.95000000000000008e-101 < z < 9.99999999999999925e125

    1. Initial program 75.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 84.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+84.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. +-commutative84.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. +-commutative84.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. associate-/l*87.3%

        \[\leadsto a \cdot \left(\frac{t}{t + \left(y + x\right)} + \left(\left(\frac{y}{t + \left(y + x\right)} + \color{blue}{z \cdot \frac{x + y}{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) \]
      5. +-commutative87.3%

        \[\leadsto a \cdot \left(\frac{t}{t + \left(y + x\right)} + \left(\left(\frac{y}{t + \left(y + x\right)} + z \cdot \frac{\color{blue}{y + x}}{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) \]
      6. +-commutative87.3%

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

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

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

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

      \[\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. +-commutative77.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+56}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-45}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t + y}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-145}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-149}:\\ \;\;\;\;-b\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-101}:\\ \;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 10^{+126}:\\ \;\;\;\;a \cdot \left(x \cdot \frac{\frac{z}{a}}{x + t} + \frac{t}{x + t}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 68.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := a \cdot \frac{t + y}{t\_1} + \frac{z \cdot x}{x + t}\\ t_3 := a + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\ t_4 := z \cdot \frac{x + y}{t\_1}\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{+154}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-39}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-143}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-50}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+126}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (+ (* a (/ (+ t y) t_1)) (/ (* z x) (+ x t))))
        (t_3 (+ a (/ (+ (* z x) (* y (- z b))) t_1)))
        (t_4 (* z (/ (+ x y) t_1))))
   (if (<= z -5.3e+154)
     t_4
     (if (<= z -2.1e-39)
       t_3
       (if (<= z -4.7e-143)
         t_2
         (if (<= z 1.15e-50) t_3 (if (<= z 1.05e+126) t_2 t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t));
	double t_3 = a + (((z * x) + (y * (z - b))) / t_1);
	double t_4 = z * ((x + y) / t_1);
	double tmp;
	if (z <= -5.3e+154) {
		tmp = t_4;
	} else if (z <= -2.1e-39) {
		tmp = t_3;
	} else if (z <= -4.7e-143) {
		tmp = t_2;
	} else if (z <= 1.15e-50) {
		tmp = t_3;
	} else if (z <= 1.05e+126) {
		tmp = 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 = y + (x + t)
    t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t))
    t_3 = a + (((z * x) + (y * (z - b))) / t_1)
    t_4 = z * ((x + y) / t_1)
    if (z <= (-5.3d+154)) then
        tmp = t_4
    else if (z <= (-2.1d-39)) then
        tmp = t_3
    else if (z <= (-4.7d-143)) then
        tmp = t_2
    else if (z <= 1.15d-50) then
        tmp = t_3
    else if (z <= 1.05d+126) then
        tmp = 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 = y + (x + t);
	double t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t));
	double t_3 = a + (((z * x) + (y * (z - b))) / t_1);
	double t_4 = z * ((x + y) / t_1);
	double tmp;
	if (z <= -5.3e+154) {
		tmp = t_4;
	} else if (z <= -2.1e-39) {
		tmp = t_3;
	} else if (z <= -4.7e-143) {
		tmp = t_2;
	} else if (z <= 1.15e-50) {
		tmp = t_3;
	} else if (z <= 1.05e+126) {
		tmp = t_2;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t))
	t_3 = a + (((z * x) + (y * (z - b))) / t_1)
	t_4 = z * ((x + y) / t_1)
	tmp = 0
	if z <= -5.3e+154:
		tmp = t_4
	elif z <= -2.1e-39:
		tmp = t_3
	elif z <= -4.7e-143:
		tmp = t_2
	elif z <= 1.15e-50:
		tmp = t_3
	elif z <= 1.05e+126:
		tmp = t_2
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(Float64(a * Float64(Float64(t + y) / t_1)) + Float64(Float64(z * x) / Float64(x + t)))
	t_3 = Float64(a + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1))
	t_4 = Float64(z * Float64(Float64(x + y) / t_1))
	tmp = 0.0
	if (z <= -5.3e+154)
		tmp = t_4;
	elseif (z <= -2.1e-39)
		tmp = t_3;
	elseif (z <= -4.7e-143)
		tmp = t_2;
	elseif (z <= 1.15e-50)
		tmp = t_3;
	elseif (z <= 1.05e+126)
		tmp = t_2;
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t));
	t_3 = a + (((z * x) + (y * (z - b))) / t_1);
	t_4 = z * ((x + y) / t_1);
	tmp = 0.0;
	if (z <= -5.3e+154)
		tmp = t_4;
	elseif (z <= -2.1e-39)
		tmp = t_3;
	elseif (z <= -4.7e-143)
		tmp = t_2;
	elseif (z <= 1.15e-50)
		tmp = t_3;
	elseif (z <= 1.05e+126)
		tmp = t_2;
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(z * x), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+154], t$95$4, If[LessEqual[z, -2.1e-39], t$95$3, If[LessEqual[z, -4.7e-143], t$95$2, If[LessEqual[z, 1.15e-50], t$95$3, If[LessEqual[z, 1.05e+126], t$95$2, t$95$4]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-39}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-143}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.30000000000000024e154 or 1.05e126 < z

    1. Initial program 30.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 25.1%

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

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

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

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

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

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

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

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

    if -5.30000000000000024e154 < z < -2.09999999999999993e-39 or -4.70000000000000045e-143 < z < 1.1500000000000001e-50

    1. Initial program 79.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 0 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999993e-39 < z < -4.70000000000000045e-143 or 1.1500000000000001e-50 < z < 1.05e126

    1. Initial program 66.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 0 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+154}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-39}:\\ \;\;\;\;a + \frac{z \cdot x + y \cdot \left(z - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-143}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)} + \frac{z \cdot x}{x + t}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-50}:\\ \;\;\;\;a + \frac{z \cdot x + y \cdot \left(z - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+126}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)} + \frac{z \cdot x}{x + t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.1% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -1.85 \cdot 10^{-149}:\\
\;\;\;\;-b\\

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

\mathbf{elif}\;z \leq 5.9 \cdot 10^{+22}:\\
\;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.55000000000000002e56 or 5.9000000000000002e22 < z

    1. Initial program 39.9%

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

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

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

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

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

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

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

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

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

    if -1.55000000000000002e56 < z < -1.9999999999999999e-40

    1. Initial program 88.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 0 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-40 < z < -1.1e-145

    1. Initial program 49.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 33.8%

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

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

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

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

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

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

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

    if -1.1e-145 < z < -1.84999999999999995e-149

    1. Initial program 51.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 51.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot b} \]
    7. Step-by-step derivation
      1. neg-mul-1100.0%

        \[\leadsto \color{blue}{-b} \]
    8. Simplified100.0%

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

    if -1.84999999999999995e-149 < z < 4.3999999999999999e-103

    1. Initial program 86.0%

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

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

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

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

    if 4.3999999999999999e-103 < z < 5.9000000000000002e22

    1. Initial program 80.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 0 83.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+56}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-40}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t + y}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-145}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-149}:\\ \;\;\;\;-b\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-103}:\\ \;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{+22}:\\ \;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -2.5 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.50000000000000002e154 or 1.2e125 < z

    1. Initial program 30.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 25.1%

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

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

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

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

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

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

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

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

    if -2.50000000000000002e154 < z < -2.49999999999999996e-46 or -7.5000000000000003e-143 < z < 1.2e125

    1. Initial program 78.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 b around 0 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999996e-46 < z < -7.5000000000000003e-143

    1. Initial program 49.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 33.8%

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

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

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

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

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

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

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

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

Alternative 7: 62.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-143}:\\
\;\;\;\;\frac{t\_1 + z \cdot \left(x + y\right)}{t\_2}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.60000000000000003e96 or 9.99999999999999925e125 < z

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

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

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

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

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

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

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

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

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

    if -1.60000000000000003e96 < z < -3.50000000000000005e-143

    1. Initial program 72.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 0 66.1%

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

    if -3.50000000000000005e-143 < z < 1.2e-101

    1. Initial program 85.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 z around 0 76.1%

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

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

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

    if 1.2e-101 < z < 9.99999999999999925e125

    1. Initial program 75.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 84.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+84.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. +-commutative84.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. +-commutative84.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. associate-/l*87.3%

        \[\leadsto a \cdot \left(\frac{t}{t + \left(y + x\right)} + \left(\left(\frac{y}{t + \left(y + x\right)} + \color{blue}{z \cdot \frac{x + y}{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) \]
      5. +-commutative87.3%

        \[\leadsto a \cdot \left(\frac{t}{t + \left(y + x\right)} + \left(\left(\frac{y}{t + \left(y + x\right)} + z \cdot \frac{\color{blue}{y + x}}{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) \]
      6. +-commutative87.3%

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

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

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

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

      \[\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. +-commutative77.3%

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

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

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

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

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

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

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

Alternative 8: 80.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+160} \lor \neg \left(z \leq 2.4 \cdot 10^{+126}\right):\\
\;\;\;\;z \cdot \frac{x + y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e160 or 2.40000000000000012e126 < z

    1. Initial program 28.7%

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

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

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

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

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

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

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

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

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

    if -1.12e160 < z < 2.40000000000000012e126

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 79.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.4999999999999998e144

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999998e144 < z < 1.99999999999999991e127

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e127 < z

    1. Initial program 26.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 27.3%

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

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

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

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

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

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

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

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

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

Alternative 10: 58.2% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.8000000000000001e46 or 1.05e17 < z

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

    if -8.8000000000000001e46 < z < -1.55e-144

    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 37.1%

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

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

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

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

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

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

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

    if -1.55e-144 < z < 6.79999999999999988e-90

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

    if 6.79999999999999988e-90 < z < 1.05e17

    1. Initial program 81.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+46}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-144}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-90}:\\ \;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t + y}\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+17}:\\ \;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.6500000000000001e43 or 1.36e13 < z

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

    if -1.6500000000000001e43 < z < -2.69999999999999975e-144

    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 37.1%

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

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

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

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

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

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

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

    if -2.69999999999999975e-144 < z < 1.36e13

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 57.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -1.75 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.49999999999999974e125 or 1.59999999999999985e216 < x

    1. Initial program 46.3%

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

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

    if -8.49999999999999974e125 < x < -1.7500000000000001e-189 or 1.52e-235 < x < 1.59999999999999985e216

    1. Initial program 68.0%

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

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

    if -1.7500000000000001e-189 < x < 1.52e-235

    1. Initial program 69.7%

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

      \[\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.5%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 45.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-49}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{-204} \lor \neg \left(x \leq 2.7 \cdot 10^{-189}\right) \land x \leq 5.5 \cdot 10^{+167}:\\
\;\;\;\;a - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999985e-49 or 1.4999999999999999e-204 < x < 2.6999999999999999e-189 or 5.5000000000000005e167 < x

    1. Initial program 56.3%

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

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

    if -4.79999999999999985e-49 < x < 1.4999999999999999e-204 or 2.6999999999999999e-189 < x < 5.5000000000000005e167

    1. Initial program 68.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{-49}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-204} \lor \neg \left(x \leq 2.7 \cdot 10^{-189}\right) \land x \leq 5.5 \cdot 10^{+167}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7400000000000 \lor \neg \left(x \leq 2.65 \cdot 10^{+157}\right):\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.4e12 or 2.6499999999999999e157 < x

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

    if -7.4e12 < x < 2.6499999999999999e157

    1. Initial program 71.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 b around 0 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 58.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{+125}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5499999999999999e125 or 1.45e216 < x

    1. Initial program 46.3%

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

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

    if -2.5499999999999999e125 < x < 1.45e216

    1. Initial program 68.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.55 \cdot 10^{+125}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+216}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 43.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-36}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{+167}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.54999999999999987e-36 or 5.5000000000000005e167 < x

    1. Initial program 53.0%

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

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

    if -2.54999999999999987e-36 < x < 5.5000000000000005e167

    1. Initial program 69.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 43.8%

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

Alternative 17: 32.3% accurate, 21.0× speedup?

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

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

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

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

Developer target: 81.8% 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 2024085 
(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)))