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

Percentage Accurate: 61.2% → 88.6%
Time: 11.5s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 61.2% 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: 88.6% accurate, 0.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.9999999999999997e236 or 1.00000000000000002e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 13.1%

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000002e306

    1. Initial program 99.7%

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

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

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

Alternative 2: 88.3% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot t\_3\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 1.00000000000000002e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 71.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)) < 1.00000000000000002e306

    1. Initial program 99.7%

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

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

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

Alternative 3: 58.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-292}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-14}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.2999999999999999e25 or 1.15e15 < t

    1. Initial program 55.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 55.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{a + \frac{x \cdot z}{t}}{t + x}} \]
      2. associate-/l*63.7%

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

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

    if -1.2999999999999999e25 < t < -5.5e-290 or 2.4000000000000001e-292 < t < 1.2999999999999999e-93 or 8.9999999999999995e-14 < t < 1.15e15

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

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

    if -5.5e-290 < t < 2.4000000000000001e-292

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z - \frac{b \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. +-commutative92.1%

        \[\leadsto z - \frac{b \cdot y}{\color{blue}{y + x}} \]
    11. Simplified92.1%

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

    if 1.2999999999999999e-93 < t < 8.9999999999999995e-14

    1. Initial program 86.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 72.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-290}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-292}:\\ \;\;\;\;z - \frac{y \cdot b}{x + y}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-93}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-14}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+15}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 65.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -3.25 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq -3.25 \cdot 10^{-146}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+31}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.4999999999999998e133 or 1.3e31 < y

    1. Initial program 38.8%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 34.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. clear-num34.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999998e133 < y < -3.24999999999999983e-31 or -1.50000000000000009e-60 < y < -3.2499999999999999e-146

    1. Initial program 71.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 a around inf 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.24999999999999983e-31 < y < -1.50000000000000009e-60

    1. Initial program 87.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 75.1%

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

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

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

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

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

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

    if -3.2499999999999999e-146 < y < 1.3e31

    1. Initial program 76.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+133}:\\ \;\;\;\;\frac{1}{\frac{\frac{x + \left(y + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{elif}\;y \leq -3.25 \cdot 10^{-31}:\\ \;\;\;\;a \cdot \left(\left(\frac{z}{a} + \frac{y}{x + y}\right) - b \cdot \frac{\frac{y}{a}}{x + y}\right)\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{t \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -3.25 \cdot 10^{-146}:\\ \;\;\;\;a \cdot \left(\left(\frac{z}{a} + \frac{y}{x + y}\right) - b \cdot \frac{\frac{y}{a}}{x + y}\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+31}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{x + \left(y + t\right)}{y}}{a + \left(z - b\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -1.12 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-275}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\

\mathbf{elif}\;t \leq 1050000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.9999999999999998e23 or 1.05e12 < t

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{a + \frac{x \cdot z}{t}}{t + x}} \]
      2. associate-/l*63.6%

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

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

    if -9.9999999999999998e23 < t < -1.11999999999999998e-268 or 3.89999999999999973e-275 < t < 1.05e12

    1. Initial program 68.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 44.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. clear-num44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999998e-268 < t < 3.89999999999999973e-275

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z - \frac{b \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. +-commutative89.3%

        \[\leadsto z - \frac{b \cdot y}{\color{blue}{y + x}} \]
    11. Simplified89.3%

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

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

Alternative 6: 60.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -6 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-291}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1000000000000001e26 or 2.25e14 < t

    1. Initial program 55.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 55.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{a + \frac{x \cdot z}{t}}{t + x}} \]
      2. associate-/l*63.7%

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

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

    if -2.1000000000000001e26 < t < -5.99999999999999984e-287 or 2.15000000000000018e-291 < t < 2.25e14

    1. Initial program 68.2%

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

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

    if -5.99999999999999984e-287 < t < 2.15000000000000018e-291

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z - \frac{b \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. +-commutative92.1%

        \[\leadsto z - \frac{b \cdot y}{\color{blue}{y + x}} \]
    11. Simplified92.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-287}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-291}:\\ \;\;\;\;z - \frac{y \cdot b}{x + y}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+14}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 58.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -0.035:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.1999999999999999e162 or 2.50000000000000014e83 < a

    1. Initial program 46.9%

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

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

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

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

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

    if -6.1999999999999999e162 < a < -0.035000000000000003 or 1.8000000000000001e-255 < a < 2.50000000000000014e83

    1. Initial program 64.3%

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

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

    if -0.035000000000000003 < a < 1.8000000000000001e-255

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z - \frac{b \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. +-commutative56.8%

        \[\leadsto z - \frac{b \cdot y}{\color{blue}{y + x}} \]
    11. Simplified56.8%

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

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

Alternative 8: 57.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.0000000000000008e230 or 4.8000000000000001e106 < t

    1. Initial program 52.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 63.3%

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

    if -8.0000000000000008e230 < t < -8.49999999999999931e-289 or 1.8000000000000001e-292 < t < 4.8000000000000001e106

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

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

    if -8.49999999999999931e-289 < t < 1.8000000000000001e-292

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z - \frac{b \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. +-commutative92.1%

        \[\leadsto z - \frac{b \cdot y}{\color{blue}{y + x}} \]
    11. Simplified92.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+230}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-289}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-292}:\\ \;\;\;\;z - \frac{y \cdot b}{x + y}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+106}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 63.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-72} \lor \neg \left(y \leq 3.2 \cdot 10^{-24}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35e-72 or 3.20000000000000012e-24 < y

    1. Initial program 51.3%

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

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

    if -1.35e-72 < y < 3.20000000000000012e-24

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

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

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

Alternative 10: 57.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+155} \lor \neg \left(b \leq 6.5 \cdot 10^{+143}\right):\\
\;\;\;\;b \cdot \frac{y}{\left(-y\right) - \left(x + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.99999999999999947e155 or 6.4999999999999997e143 < b

    1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999947e155 < b < 6.4999999999999997e143

    1. Initial program 63.4%

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

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

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

Alternative 11: 57.7% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.6e230 or 9.99999999999999982e108 < t

    1. Initial program 52.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 63.3%

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

    if -7.6e230 < t < 9.99999999999999982e108

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

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

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

Alternative 12: 42.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+40}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.6000000000000003e148 or 5.2000000000000001e40 < a

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

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

    if -8.6000000000000003e148 < a < 5.2000000000000001e40

    1. Initial program 70.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{+148}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+40}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 32.6% 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 62.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 t around inf 30.3%

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

    \[\leadsto a \]
  5. Add Preprocessing

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

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

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