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

Percentage Accurate: 60.9% → 98.7%
Time: 15.3s
Alternatives: 15
Speedup: 1.6×

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 15 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.9% 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: 98.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t + y\right)\\ t_2 := \frac{y}{t_1}\\ \frac{a}{\frac{\left(t + x\right) + y}{t + y}} + \left(z \cdot \left(\frac{x}{t_1} + t_2\right) - t_2 \cdot b\right) \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ t y))) (t_2 (/ y t_1)))
   (+ (/ a (/ (+ (+ t x) y) (+ t y))) (- (* z (+ (/ x t_1) t_2)) (* t_2 b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t + y);
	double t_2 = y / t_1;
	return (a / (((t + x) + y) / (t + y))) + ((z * ((x / t_1) + t_2)) - (t_2 * b));
}
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
    t_1 = x + (t + y)
    t_2 = y / t_1
    code = (a / (((t + x) + y) / (t + y))) + ((z * ((x / t_1) + t_2)) - (t_2 * b))
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 = y / t_1;
	return (a / (((t + x) + y) / (t + y))) + ((z * ((x / t_1) + t_2)) - (t_2 * b));
}
def code(x, y, z, t, a, b):
	t_1 = x + (t + y)
	t_2 = y / t_1
	return (a / (((t + x) + y) / (t + y))) + ((z * ((x / t_1) + t_2)) - (t_2 * b))
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(t + y))
	t_2 = Float64(y / t_1)
	return Float64(Float64(a / Float64(Float64(Float64(t + x) + y) / Float64(t + y))) + Float64(Float64(z * Float64(Float64(x / t_1) + t_2)) - Float64(t_2 * b)))
end
function tmp = code(x, y, z, t, a, b)
	t_1 = x + (t + y);
	t_2 = y / t_1;
	tmp = (a / (((t + x) + y) / (t + y))) + ((z * ((x / t_1) + t_2)) - (t_2 * b));
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 / t$95$1), $MachinePrecision]}, N[(N[(a / N[(N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(x / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := \frac{y}{t_1}\\
\frac{a}{\frac{\left(t + x\right) + y}{t + y}} + \left(z \cdot \left(\frac{x}{t_1} + t_2\right) - t_2 \cdot b\right)
\end{array}
\end{array}
Derivation
  1. Initial program 63.0%

    \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 63.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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
  4. Step-by-step derivation
    1. associate--l+63.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)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
    2. associate-/l*73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{a}{\frac{\left(t + x\right) + y}{t + y}} + \color{blue}{\mathsf{fma}\left(z, \frac{x}{y + \left(t + x\right)} + \frac{y}{y + \left(t + x\right)}, \frac{-y}{\frac{y + \left(t + x\right)}{b}}\right)} \]
  9. Step-by-step derivation
    1. fma-udef97.0%

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

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

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

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

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

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

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

Alternative 2: 95.4% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_4 + \frac{t_1 - y \cdot b}{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 3.99999999999999992e186 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 15.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a}{\frac{\left(t + x\right) + y}{t + y}} + \color{blue}{\mathsf{fma}\left(z, \frac{x}{y + \left(t + x\right)} + \frac{y}{y + \left(t + x\right)}, \frac{-y}{\frac{y + \left(t + x\right)}{b}}\right)} \]
    9. Step-by-step derivation
      1. fma-udef98.2%

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

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

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

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

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

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

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

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

    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 99.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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. 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)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      2. associate-/l*99.8%

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

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

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

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

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

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

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

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

Alternative 3: 95.6% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t + x\right) + y\\
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 -\infty \lor \neg \left(t_2 \leq 4 \cdot 10^{+186}\right):\\
\;\;\;\;\frac{a}{\frac{t_1}{t + y}} + \left(z - \frac{y}{x + \left(t + y\right)} \cdot b\right)\\

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


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

    1. Initial program 15.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a}{\frac{\left(t + x\right) + y}{t + y}} + \color{blue}{\mathsf{fma}\left(z, \frac{x}{y + \left(t + x\right)} + \frac{y}{y + \left(t + x\right)}, \frac{-y}{\frac{y + \left(t + x\right)}{b}}\right)} \]
    9. Step-by-step derivation
      1. fma-udef98.2%

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

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

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

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

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

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

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

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

    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 y around 0 99.6%

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

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

Alternative 4: 87.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+272}:\\
\;\;\;\;\frac{a \cdot t + \left(x \cdot z + y \cdot t_3\right)}{t_1}\\

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


\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.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 75.7%

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

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

    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 y around 0 99.6%

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

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

    1. Initial program 9.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 9.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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate--l+9.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)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      2. associate-/l*36.2%

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

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

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

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

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

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

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

      \[\leadsto \frac{a}{\frac{\left(t + x\right) + y}{t + y}} + \color{blue}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.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}{\left(t + x\right) + y} \leq -\infty:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;\frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{\left(t + x\right) + y} \leq 2 \cdot 10^{+272}:\\ \;\;\;\;\frac{a \cdot t + \left(x \cdot z + y \cdot \left(\left(a + z\right) - b\right)\right)}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{\left(t + x\right) + y}{t + y}} + z\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 10^{-212}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{-86}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{-48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 3.05 \cdot 10^{+26}:\\
\;\;\;\;t_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.20000000000000018 or 3.0500000000000001e26 < y

    1. Initial program 48.1%

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{\left(x + t\right) + y}{\left(a + z\right) - b}}}\right)} - 1 \]
      4. +-commutative37.4%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{y + \left(x + t\right)}{\color{blue}{a + \left(z - b\right)}}}\right)} - 1 \]
    5. Applied egg-rr37.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{y + \left(x + t\right)}{a + \left(z - b\right)}}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def47.5%

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

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

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

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

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

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

    if -6.20000000000000018 < y < 9.99999999999999954e-213 or 2.8999999999999999e-86 < y < 2.4e-48

    1. Initial program 76.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 76.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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate--l+76.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)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      2. associate-/l*85.9%

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

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

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

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

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

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

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

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

    if 9.99999999999999954e-213 < y < 2.8999999999999999e-86 or 2.4e-48 < y < 3.0500000000000001e26

    1. Initial program 76.8%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 76.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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate--l+76.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)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      2. associate-/l*90.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2:\\ \;\;\;\;\frac{y}{\left(t + x\right) + y} \cdot \left(a + \left(z - b\right)\right)\\ \mathbf{elif}\;y \leq 10^{-212}:\\ \;\;\;\;\frac{a}{\frac{\left(t + x\right) + y}{t + y}} + z\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-86}:\\ \;\;\;\;a - \frac{y \cdot b - z \cdot \left(x + y\right)}{\left(t + x\right) + y}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-48}:\\ \;\;\;\;\frac{a}{\frac{\left(t + x\right) + y}{t + y}} + z\\ \mathbf{elif}\;y \leq 3.05 \cdot 10^{+26}:\\ \;\;\;\;a - \frac{y \cdot b - z \cdot \left(x + y\right)}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\left(t + x\right) + y} \cdot \left(a + \left(z - b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.3% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-97}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.2000000000000001e-11 or 7.40000000000000023e-76 < y

    1. Initial program 53.7%

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{\left(x + t\right) + y}{\left(a + z\right) - b}}}\right)} - 1 \]
      4. +-commutative36.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{y + \left(x + t\right)}{\color{blue}{a + \left(z - b\right)}}}\right)} - 1 \]
    5. Applied egg-rr36.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{y + \left(x + t\right)}{a + \left(z - b\right)}}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def45.9%

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

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

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

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

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

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

    if -8.2000000000000001e-11 < y < -1.66e-75

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.66e-75 < y < -3.69999999999999976e-97

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

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

    if -3.69999999999999976e-97 < y < 7.40000000000000023e-76

    1. Initial program 77.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 62.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{y}{\left(t + x\right) + y} \cdot \left(a + \left(z - b\right)\right)\\ \mathbf{elif}\;y \leq -1.66 \cdot 10^{-75}:\\ \;\;\;\;a + \frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-97}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-76}:\\ \;\;\;\;\frac{a \cdot t + x \cdot z}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\left(t + x\right) + y} \cdot \left(a + \left(z - b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 63.1% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-97}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.99999999999999953e-9

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

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

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

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

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

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

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

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

    if -8.99999999999999953e-9 < y < -1.3499999999999999e-75

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e-75 < y < -3.69999999999999976e-97

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

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

    if -3.69999999999999976e-97 < y < 3.2e-131

    1. Initial program 81.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 0 66.9%

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

    if 3.2e-131 < y

    1. Initial program 57.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 65.9%

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

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

Alternative 8: 72.9% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -0.0029 or 1.2e17 < y

    1. Initial program 48.5%

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{\left(x + t\right) + y}{\left(a + z\right) - b}}}\right)} - 1 \]
      4. +-commutative37.8%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\frac{y + \left(x + t\right)}{\color{blue}{a + \left(z - b\right)}}}\right)} - 1 \]
    5. Applied egg-rr37.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\frac{y + \left(x + t\right)}{a + \left(z - b\right)}}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def47.8%

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

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

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

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

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

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

    if -0.0029 < y < 1.2e17

    1. Initial program 76.1%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 76.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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate--l+76.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)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      2. associate-/l*87.4%

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

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

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

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

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

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

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

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

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

Alternative 9: 61.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+128}:\\
\;\;\;\;a + \frac{x}{\frac{t}{z - a}}\\

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

\mathbf{else}:\\
\;\;\;\;a + \frac{y}{\frac{t}{z - b}}\\


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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\left(-\color{blue}{\frac{x}{\frac{t}{z - a}}}\right)\right) \]
      7. distribute-neg-frac72.7%

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

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

    if -5e128 < t < 1.2999999999999999e144

    1. Initial program 65.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 64.3%

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

    if 1.2999999999999999e144 < t

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+133} \lor \neg \left(t \leq 6.2 \cdot 10^{+143}\right):\\
\;\;\;\;a - \frac{b}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1999999999999999e133 or 6.1999999999999998e143 < t

    1. Initial program 55.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 t around -inf 62.2%

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

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

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

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

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

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

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

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

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

    if -1.1999999999999999e133 < t < 6.1999999999999998e143

    1. Initial program 65.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 64.3%

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

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

Alternative 11: 60.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+135}:\\
\;\;\;\;a + \frac{x}{\frac{t}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;a - \frac{b}{\frac{t}{y}}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\left(-\color{blue}{\frac{x}{\frac{t}{z}}}\right)\right) \]
      3. distribute-neg-frac71.5%

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

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

    if -1.1e135 < t < 1.30000000000000001e145

    1. Initial program 65.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 64.3%

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

    if 1.30000000000000001e145 < t

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a - \frac{b}{\frac{t}{y}}} \]
    9. Simplified64.1%

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

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

Alternative 12: 60.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+130}:\\
\;\;\;\;a + \frac{x}{\frac{t}{z - a}}\\

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

\mathbf{else}:\\
\;\;\;\;a - \frac{b}{\frac{t}{y}}\\


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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\left(-\color{blue}{\frac{x}{\frac{t}{z - a}}}\right)\right) \]
      7. distribute-neg-frac72.7%

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

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

    if -1.9500000000000001e130 < t < 2.90000000000000007e141

    1. Initial program 65.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 64.3%

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

    if 2.90000000000000007e141 < t

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a - \frac{b}{\frac{t}{y}}} \]
    9. Simplified64.1%

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

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

Alternative 13: 58.4% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+130}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+177}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -2.7e+130) a (if (<= t 1.6e+177) (- (+ a z) b) a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.7e+130) {
		tmp = a;
	} else if (t <= 1.6e+177) {
		tmp = (a + z) - 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 <= (-2.7d+130)) then
        tmp = a
    else if (t <= 1.6d+177) then
        tmp = (a + z) - 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 <= -2.7e+130) {
		tmp = a;
	} else if (t <= 1.6e+177) {
		tmp = (a + z) - b;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -2.7e+130:
		tmp = a
	elif t <= 1.6e+177:
		tmp = (a + z) - b
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -2.7e+130)
		tmp = a;
	elseif (t <= 1.6e+177)
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -2.7e+130)
		tmp = a;
	elseif (t <= 1.6e+177)
		tmp = (a + z) - b;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.7e+130], a, If[LessEqual[t, 1.6e+177], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], a]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6999999999999998e130 or 1.6e177 < t

    1. Initial program 57.4%

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

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

    if -2.6999999999999998e130 < t < 1.6e177

    1. Initial program 64.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 y around inf 63.2%

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

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

Alternative 14: 44.8% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+140}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6e19 or 4.5000000000000002e140 < t

    1. Initial program 57.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 52.2%

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

    if -6e19 < t < 4.5000000000000002e140

    1. Initial program 65.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+19}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+140}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 32.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 63.0%

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

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

    \[\leadsto a \]
  5. Add Preprocessing

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

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

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