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

Percentage Accurate: 60.5% → 92.9%
Time: 17.3s
Alternatives: 20
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 60.5% 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: 92.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := x + \left(t + y\right)\\
\mathbf{if}\;z \leq -1.76 \cdot 10^{-71} \lor \neg \left(z \leq 6.4 \cdot 10^{-41}\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}{y + \left(x + t\right)} + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{t\_2} - \frac{y}{t\_2}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.76000000000000002e-71 or 6.40000000000000024e-41 < z

    1. Initial program 53.0%

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

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

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

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

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

        \[\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. +-commutative87.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 + \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*88.4%

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

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

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

      \[\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 -1.76000000000000002e-71 < z < 6.40000000000000024e-41

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

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

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

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

        \[\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.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. +-commutative89.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+89.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. +-commutative89.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+89.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-neg89.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-sub89.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. Simplified89.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 b around inf 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.76 \cdot 10^{-71} \lor \neg \left(z \leq 6.4 \cdot 10^{-41}\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)} + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{x + \left(t + y\right)} - \frac{y}{x + \left(t + y\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 91.2% accurate, 0.2× speedup?

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

\mathbf{else}:\\
\;\;\;\;t\_4 + \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 (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 4.00000000000000018e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

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

        \[\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*38.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. +-commutative38.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+38.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. +-commutative38.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+38.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-neg38.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-sub38.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. Simplified38.2%

      \[\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 b around inf 49.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 99.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-neg99.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. +-commutative99.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+99.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*99.7%

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

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

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

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

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

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

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

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

    \[\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 -\infty \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 4 \cdot 10^{+245}\right):\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)} + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{x + \left(t + y\right)} - \frac{y}{x + \left(t + y\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 3: 87.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;t\_4 + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_2}\\

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


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

    1. Initial program 6.3%

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

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

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

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

        \[\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*41.6%

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

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

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

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

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

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

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

      \[\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 b around inf 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 99.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-neg99.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. +-commutative99.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+99.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*99.7%

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

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

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

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

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

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

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

      \[\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 4.0000000000000002e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 7.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 7.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-neg7.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. +-commutative7.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+7.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*36.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. +-commutative36.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+36.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. +-commutative36.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+36.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-neg36.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-sub36.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. Simplified36.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 x around inf 74.3%

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

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

Alternative 4: 87.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;z + a \cdot \frac{t + y}{t\_1}\\


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

    1. Initial program 10.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 78.4%

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

    if -5.0000000000000001e291 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.0000000000000002e235

    1. Initial program 99.7%

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

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

    1. Initial program 7.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 7.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-neg7.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. +-commutative7.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+7.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*36.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. +-commutative36.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+36.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. +-commutative36.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+36.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-neg36.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-sub36.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. Simplified36.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 x around inf 74.3%

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

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

Alternative 5: 87.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;z + a \cdot \frac{t + y}{t\_2}\\


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

    1. Initial program 6.3%

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

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

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

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

        \[\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*41.6%

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

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

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

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

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

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

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

      \[\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 b around inf 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

    1. Initial program 7.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 7.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-neg7.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. +-commutative7.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+7.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*36.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. +-commutative36.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+36.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. +-commutative36.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+36.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-neg36.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-sub36.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. Simplified36.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 x around inf 74.3%

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

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

Alternative 6: 56.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq -3.6 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -5 \cdot 10^{-283}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 2.9 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 3.25 \cdot 10^{-192}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 9 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.80000000000000015e74 or 8.9999999999999998e27 < x

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

    if -7.80000000000000015e74 < x < -3.59999999999999978e-146 or -5.0000000000000001e-283 < x < 2.89999999999999996e-262 or 3.24999999999999983e-192 < x < 8.9999999999999998e27

    1. Initial program 63.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 74.7%

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

    if -3.59999999999999978e-146 < x < -5.0000000000000001e-283 or 2.89999999999999996e-262 < x < 3.24999999999999983e-192

    1. Initial program 69.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 x around 0 65.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+74}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{-146}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-283}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-262}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 3.25 \cdot 10^{-192}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+27}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.6% accurate, 0.5× 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 := a \cdot \frac{t + y}{t\_1} + x \cdot \frac{z}{x + t}\\ \mathbf{if}\;x \leq -145000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-273}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-35}:\\ \;\;\;\;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 (+ (* a (/ (+ t y) t_1)) (* x (/ z (+ x t))))))
   (if (<= x -145000000.0)
     t_3
     (if (<= x -1.25e-285)
       t_2
       (if (<= x 7e-273) (- (+ z a) b) (if (<= x 4.6e-35) 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 = (a * ((t + y) / t_1)) + (x * (z / (x + t)));
	double tmp;
	if (x <= -145000000.0) {
		tmp = t_3;
	} else if (x <= -1.25e-285) {
		tmp = t_2;
	} else if (x <= 7e-273) {
		tmp = (z + a) - b;
	} else if (x <= 4.6e-35) {
		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 = (a * ((t + y) / t_1)) + (x * (z / (x + t)))
    if (x <= (-145000000.0d0)) then
        tmp = t_3
    else if (x <= (-1.25d-285)) then
        tmp = t_2
    else if (x <= 7d-273) then
        tmp = (z + a) - b
    else if (x <= 4.6d-35) 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 = (a * ((t + y) / t_1)) + (x * (z / (x + t)));
	double tmp;
	if (x <= -145000000.0) {
		tmp = t_3;
	} else if (x <= -1.25e-285) {
		tmp = t_2;
	} else if (x <= 7e-273) {
		tmp = (z + a) - b;
	} else if (x <= 4.6e-35) {
		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 = (a * ((t + y) / t_1)) + (x * (z / (x + t)))
	tmp = 0
	if x <= -145000000.0:
		tmp = t_3
	elif x <= -1.25e-285:
		tmp = t_2
	elif x <= 7e-273:
		tmp = (z + a) - b
	elif x <= 4.6e-35:
		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(Float64(a * Float64(Float64(t + y) / t_1)) + Float64(x * Float64(z / Float64(x + t))))
	tmp = 0.0
	if (x <= -145000000.0)
		tmp = t_3;
	elseif (x <= -1.25e-285)
		tmp = t_2;
	elseif (x <= 7e-273)
		tmp = Float64(Float64(z + a) - b);
	elseif (x <= 4.6e-35)
		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 = (a * ((t + y) / t_1)) + (x * (z / (x + t)));
	tmp = 0.0;
	if (x <= -145000000.0)
		tmp = t_3;
	elseif (x <= -1.25e-285)
		tmp = t_2;
	elseif (x <= 7e-273)
		tmp = (z + a) - b;
	elseif (x <= 4.6e-35)
		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[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x * N[(z / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -145000000.0], t$95$3, If[LessEqual[x, -1.25e-285], t$95$2, If[LessEqual[x, 7e-273], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[x, 4.6e-35], 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 := a \cdot \frac{t + y}{t\_1} + x \cdot \frac{z}{x + t}\\
\mathbf{if}\;x \leq -145000000:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq 4.6 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.45e8 or 4.5999999999999998e-35 < x

    1. Initial program 51.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 52.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-neg52.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. +-commutative52.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+52.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*64.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. +-commutative64.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+64.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. +-commutative64.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+64.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-neg64.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-sub64.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. Simplified64.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)}} \]
    6. Taylor expanded in y around 0 61.8%

      \[\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. associate-/l*78.4%

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

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

    if -1.45e8 < x < -1.25000000000000005e-285 or 6.99999999999999984e-273 < x < 4.5999999999999998e-35

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

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

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

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

        \[\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*84.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. +-commutative84.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+84.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. +-commutative84.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+84.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-neg84.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-sub84.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. 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 t around inf 82.4%

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

    if -1.25000000000000005e-285 < x < 6.99999999999999984e-273

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

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

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

Alternative 8: 64.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq -4.5 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{-191}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.10000000000000002e-130 or 2.50000000000000008e-54 < x

    1. Initial program 55.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 55.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-neg55.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. +-commutative55.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+55.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*68.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. +-commutative68.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+68.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. +-commutative68.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+68.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-neg68.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-sub68.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. Simplified68.2%

      \[\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 x around inf 72.4%

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

    if -2.10000000000000002e-130 < x < -4.4999999999999997e-283 or 4.39999999999999977e-262 < x < 1.6000000000000002e-191

    1. Initial program 67.9%

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

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

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

    if -4.4999999999999997e-283 < x < 4.39999999999999977e-262 or 1.6000000000000002e-191 < x < 2.50000000000000008e-54

    1. Initial program 64.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 84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-130}:\\ \;\;\;\;z + a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{-283}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-262}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-191}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-54}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.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 + a \cdot \frac{t + y}{t\_1}\\ \mathbf{if}\;x \leq -1.2 \cdot 10^{+81}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-273}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-33}:\\ \;\;\;\;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 (* a (/ (+ t y) t_1)))))
   (if (<= x -1.2e+81)
     t_3
     (if (<= x -1.25e-285)
       t_2
       (if (<= x 7e-273) (- (+ z a) b) (if (<= x 2.75e-33) 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 + (a * ((t + y) / t_1));
	double tmp;
	if (x <= -1.2e+81) {
		tmp = t_3;
	} else if (x <= -1.25e-285) {
		tmp = t_2;
	} else if (x <= 7e-273) {
		tmp = (z + a) - b;
	} else if (x <= 2.75e-33) {
		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 + (a * ((t + y) / t_1))
    if (x <= (-1.2d+81)) then
        tmp = t_3
    else if (x <= (-1.25d-285)) then
        tmp = t_2
    else if (x <= 7d-273) then
        tmp = (z + a) - b
    else if (x <= 2.75d-33) 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 + (a * ((t + y) / t_1));
	double tmp;
	if (x <= -1.2e+81) {
		tmp = t_3;
	} else if (x <= -1.25e-285) {
		tmp = t_2;
	} else if (x <= 7e-273) {
		tmp = (z + a) - b;
	} else if (x <= 2.75e-33) {
		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 + (a * ((t + y) / t_1))
	tmp = 0
	if x <= -1.2e+81:
		tmp = t_3
	elif x <= -1.25e-285:
		tmp = t_2
	elif x <= 7e-273:
		tmp = (z + a) - b
	elif x <= 2.75e-33:
		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(a * Float64(Float64(t + y) / t_1)))
	tmp = 0.0
	if (x <= -1.2e+81)
		tmp = t_3;
	elseif (x <= -1.25e-285)
		tmp = t_2;
	elseif (x <= 7e-273)
		tmp = Float64(Float64(z + a) - b);
	elseif (x <= 2.75e-33)
		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 + (a * ((t + y) / t_1));
	tmp = 0.0;
	if (x <= -1.2e+81)
		tmp = t_3;
	elseif (x <= -1.25e-285)
		tmp = t_2;
	elseif (x <= 7e-273)
		tmp = (z + a) - b;
	elseif (x <= 2.75e-33)
		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[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+81], t$95$3, If[LessEqual[x, -1.25e-285], t$95$2, If[LessEqual[x, 7e-273], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[x, 2.75e-33], 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 + a \cdot \frac{t + y}{t\_1}\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+81}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq 2.75 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.19999999999999995e81 or 2.75e-33 < x

    1. Initial program 50.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 50.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-neg50.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. +-commutative50.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+50.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*61.6%

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

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

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

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

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

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

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

      \[\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 x around inf 76.3%

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

    if -1.19999999999999995e81 < x < -1.25000000000000005e-285 or 6.99999999999999984e-273 < x < 2.75e-33

    1. Initial program 68.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 68.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-neg68.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. +-commutative68.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+68.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*84.6%

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

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

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

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

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

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

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

      \[\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 82.4%

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

    if -1.25000000000000005e-285 < x < 6.99999999999999984e-273

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{+81}:\\ \;\;\;\;z + a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\ \;\;\;\;a + \frac{z \cdot x + y \cdot \left(z - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-273}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-33}:\\ \;\;\;\;a + \frac{z \cdot x + y \cdot \left(z - b\right)}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;z + a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;a \leq -23000000 \lor \neg \left(a \leq -4.4 \cdot 10^{-17} \lor \neg \left(a \leq -9 \cdot 10^{-116}\right) \land a \leq 1.12 \cdot 10^{-54}\right):\\ \;\;\;\;z + a \cdot \frac{t + y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t))))
   (if (or (<= a -23000000.0)
           (not
            (or (<= a -4.4e-17) (and (not (<= a -9e-116)) (<= a 1.12e-54)))))
     (+ z (* a (/ (+ t y) t_1)))
     (/ (- (* z (+ x y)) (* y b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double tmp;
	if ((a <= -23000000.0) || !((a <= -4.4e-17) || (!(a <= -9e-116) && (a <= 1.12e-54)))) {
		tmp = z + (a * ((t + y) / t_1));
	} else {
		tmp = ((z * (x + y)) - (y * 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 ((a <= (-23000000.0d0)) .or. (.not. (a <= (-4.4d-17)) .or. (.not. (a <= (-9d-116))) .and. (a <= 1.12d-54))) then
        tmp = z + (a * ((t + y) / t_1))
    else
        tmp = ((z * (x + y)) - (y * 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 ((a <= -23000000.0) || !((a <= -4.4e-17) || (!(a <= -9e-116) && (a <= 1.12e-54)))) {
		tmp = z + (a * ((t + y) / t_1));
	} else {
		tmp = ((z * (x + y)) - (y * b)) / t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	tmp = 0
	if (a <= -23000000.0) or not ((a <= -4.4e-17) or (not (a <= -9e-116) and (a <= 1.12e-54))):
		tmp = z + (a * ((t + y) / t_1))
	else:
		tmp = ((z * (x + y)) - (y * b)) / t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	tmp = 0.0
	if ((a <= -23000000.0) || !((a <= -4.4e-17) || (!(a <= -9e-116) && (a <= 1.12e-54))))
		tmp = Float64(z + Float64(a * Float64(Float64(t + y) / t_1)));
	else
		tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * 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 ((a <= -23000000.0) || ~(((a <= -4.4e-17) || (~((a <= -9e-116)) && (a <= 1.12e-54)))))
		tmp = z + (a * ((t + y) / t_1));
	else
		tmp = ((z * (x + y)) - (y * 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[a, -23000000.0], N[Not[Or[LessEqual[a, -4.4e-17], And[N[Not[LessEqual[a, -9e-116]], $MachinePrecision], LessEqual[a, 1.12e-54]]]], $MachinePrecision]], N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;a \leq -23000000 \lor \neg \left(a \leq -4.4 \cdot 10^{-17} \lor \neg \left(a \leq -9 \cdot 10^{-116}\right) \land a \leq 1.12 \cdot 10^{-54}\right):\\
\;\;\;\;z + a \cdot \frac{t + y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3e7 or -4.4e-17 < a < -9.00000000000000023e-116 or 1.11999999999999994e-54 < a

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

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

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

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

        \[\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*70.5%

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

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

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

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

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

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

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

      \[\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 x around inf 80.7%

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

    if -2.3e7 < a < -4.4e-17 or -9.00000000000000023e-116 < a < 1.11999999999999994e-54

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -23000000 \lor \neg \left(a \leq -4.4 \cdot 10^{-17} \lor \neg \left(a \leq -9 \cdot 10^{-116}\right) \land a \leq 1.12 \cdot 10^{-54}\right):\\ \;\;\;\;z + a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 56.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 2.85 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.0000000000000003e71 or 3.79999999999999997e80 < a

    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 a around inf 34.1%

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

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

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

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

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

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

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

    if -8.0000000000000003e71 < a < 2.84999999999999985e-210 or 3.09999999999999989e-86 < a < 3.79999999999999997e80

    1. Initial program 70.4%

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

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

    if 2.84999999999999985e-210 < a < 3.09999999999999989e-86

    1. Initial program 76.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 x around inf 50.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+71}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;a \leq 2.85 \cdot 10^{-210}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-86}:\\ \;\;\;\;z \cdot \frac{x}{x + \left(t + y\right)}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+80}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq -4 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.8 \cdot 10^{-234}:\\
\;\;\;\;a - b \cdot \frac{y}{t}\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.6499999999999999e77 or 1.0199999999999999e27 < x

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

    if -1.6499999999999999e77 < x < -3.9999999999999998e-151 or -3.79999999999999984e-234 < x < 1.0199999999999999e27

    1. Initial program 65.2%

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

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

    if -3.9999999999999998e-151 < x < -3.79999999999999984e-234

    1. Initial program 66.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t}} \]
    8. Step-by-step derivation
      1. mul-1-neg77.9%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. associate-/l*78.5%

        \[\leadsto a - \color{blue}{b \cdot \frac{y}{t}} \]
    9. Simplified78.5%

      \[\leadsto \color{blue}{a - b \cdot \frac{y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{+77}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-151}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-234}:\\ \;\;\;\;a - b \cdot \frac{y}{t}\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+27}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+154}:\\
\;\;\;\;z \cdot \frac{x + y}{t}\\

\mathbf{elif}\;t \leq 9.8 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.0000000000000003e129 or 9.8e163 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.1%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. associate-/l*56.4%

        \[\leadsto a - \color{blue}{b \cdot \frac{y}{t}} \]
    9. Simplified56.4%

      \[\leadsto \color{blue}{a - b \cdot \frac{y}{t}} \]

    if -5.0000000000000003e129 < t < 1.50000000000000003e133 or 1.6e154 < t < 9.8e163

    1. Initial program 61.8%

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

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

    if 1.50000000000000003e133 < t < 1.6e154

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x + y}{t}} \]
      2. +-commutative63.3%

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

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

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

Alternative 14: 61.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.7000000000000001e130 or 2.9999999999999998e162 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.1%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. associate-/l*56.4%

        \[\leadsto a - \color{blue}{b \cdot \frac{y}{t}} \]
    9. Simplified56.4%

      \[\leadsto \color{blue}{a - b \cdot \frac{y}{t}} \]

    if -3.7000000000000001e130 < t < 1.50000000000000003e133 or 1.6e154 < t < 2.9999999999999998e162

    1. Initial program 61.8%

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

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

    if 1.50000000000000003e133 < t < 1.6e154

    1. Initial program 99.6%

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

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

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

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

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

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

Alternative 15: 59.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7e130 or 8.79999999999999945e163 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \frac{\color{blue}{-b \cdot y}}{t} \]
      3. distribute-rgt-neg-in58.1%

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

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

    if -1.7e130 < t < 1.50000000000000003e133 or 1.6e154 < t < 8.79999999999999945e163

    1. Initial program 61.8%

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

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

    if 1.50000000000000003e133 < t < 1.6e154

    1. Initial program 99.6%

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

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

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

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

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

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

Alternative 16: 56.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq -5.2 \cdot 10^{-151} \lor \neg \left(x \leq -1.5 \cdot 10^{-233}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.5000000000000002e154

    1. Initial program 42.7%

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

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

    if -8.5000000000000002e154 < x < -5.2000000000000001e-151 or -1.49999999999999999e-233 < x

    1. Initial program 60.6%

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

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

    if -5.2000000000000001e-151 < x < -1.49999999999999999e-233

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+154}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-151} \lor \neg \left(x \leq -1.5 \cdot 10^{-233}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 45.1% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+86}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.3999999999999998e32 or 8.99999999999999986e86 < a

    1. Initial program 41.1%

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

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

    if -6.3999999999999998e32 < a < 8.99999999999999986e86

    1. Initial program 71.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.4 \cdot 10^{+32}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+86}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 45.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{+17}:\\
\;\;\;\;a - b\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{+84}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.22e17

    1. Initial program 42.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 x around 0 28.1%

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

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

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

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

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

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

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

    if -1.22e17 < a < 7.80000000000000032e84

    1. Initial program 71.4%

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

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

    if 7.80000000000000032e84 < a

    1. Initial program 44.7%

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.6%

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

Alternative 19: 58.0% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 61.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 60.1%

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

    if 3.80000000000000024e162 < t

    1. Initial program 46.1%

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

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

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

Alternative 20: 33.0% accurate, 21.0× speedup?

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

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

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

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

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 82.9% 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 2024050 
(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)))