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

Percentage Accurate: 60.9% → 98.7%
Time: 10.4s
Alternatives: 16
Speedup: 1.5×

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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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}

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 16 alternatives:

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

Initial Program: 60.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 98.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ \mathsf{fma}\left(\frac{x + y}{t\_1}, z, \frac{t + y}{t\_1} \cdot a - \frac{y}{t\_1} \cdot b\right) \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y))))
   (fma (/ (+ x y) t_1) z (- (* (/ (+ t y) t_1) a) (* (/ y t_1) b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	return fma(((x + y) / t_1), z, ((((t + y) / t_1) * a) - ((y / t_1) * b)));
}
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	return fma(Float64(Float64(x + y) / t_1), z, Float64(Float64(Float64(Float64(t + y) / t_1) * a) - Float64(Float64(y / t_1) * b)))
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision] * z + N[(N[(N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision] * a), $MachinePrecision] - N[(N[(y / t$95$1), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
\mathsf{fma}\left(\frac{x + y}{t\_1}, z, \frac{t + y}{t\_1} \cdot a - \frac{y}{t\_1} \cdot b\right)
\end{array}
\end{array}
Derivation
  1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

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

Alternative 2: 96.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+257}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, \frac{t + y}{t + \left(x + y\right)} \cdot a - \frac{y}{t + \left(x + y\right)} \cdot b\right) \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - \frac{y}{t + \left(x + y\right)} \cdot b\right) \]
    7. Applied rewrites84.4%

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

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

    1. Initial program 60.9%

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

Alternative 3: 91.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+257}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - b\right) \]
    6. Applied rewrites63.4%

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - b\right) \]

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

    1. Initial program 60.9%

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

Alternative 4: 73.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \frac{y}{t\_1}\\ \mathbf{if}\;z \leq -1.46 \cdot 10^{+103}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x + y}{t\_1}, z, a - b\right)\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+180}:\\ \;\;\;\;\left(a + z\right) - b \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t\_1} + t\_2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y))) (t_2 (/ y t_1)))
   (if (<= z -1.46e+103)
     (fma (/ (+ x y) t_1) z (- a b))
     (if (<= z 4.3e+180) (- (+ a z) (* b t_2)) (* z (+ (/ x t_1) 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 / t_1;
	double tmp;
	if (z <= -1.46e+103) {
		tmp = fma(((x + y) / t_1), z, (a - b));
	} else if (z <= 4.3e+180) {
		tmp = (a + z) - (b * t_2);
	} else {
		tmp = z * ((x / t_1) + t_2);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	t_2 = Float64(y / t_1)
	tmp = 0.0
	if (z <= -1.46e+103)
		tmp = fma(Float64(Float64(x + y) / t_1), z, Float64(a - b));
	elseif (z <= 4.3e+180)
		tmp = Float64(Float64(a + z) - Float64(b * t_2));
	else
		tmp = Float64(z * Float64(Float64(x / t_1) + t_2));
	end
	return 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 / t$95$1), $MachinePrecision]}, If[LessEqual[z, -1.46e+103], N[(N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision] * z + N[(a - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+180], N[(N[(a + z), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \frac{y}{t\_1}\\
\mathbf{if}\;z \leq -1.46 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x + y}{t\_1}, z, a - b\right)\\

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

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


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

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - b\right) \]
    6. Applied rewrites63.4%

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - b\right) \]

    if -1.45999999999999998e103 < z < 4.2999999999999999e180

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

    if 4.2999999999999999e180 < z

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

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

Alternative 5: 73.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \mathsf{fma}\left(\frac{x + y}{t\_1}, z, a - b\right)\\ \mathbf{if}\;z \leq -1.46 \cdot 10^{+103}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+52}:\\ \;\;\;\;\left(a + z\right) - b \cdot \frac{y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y))) (t_2 (fma (/ (+ x y) t_1) z (- a b))))
   (if (<= z -1.46e+103)
     t_2
     (if (<= z 4.1e+52) (- (+ a z) (* b (/ y t_1))) 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 = fma(((x + y) / t_1), z, (a - b));
	double tmp;
	if (z <= -1.46e+103) {
		tmp = t_2;
	} else if (z <= 4.1e+52) {
		tmp = (a + z) - (b * (y / t_1));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	t_2 = fma(Float64(Float64(x + y) / t_1), z, Float64(a - b))
	tmp = 0.0
	if (z <= -1.46e+103)
		tmp = t_2;
	elseif (z <= 4.1e+52)
		tmp = Float64(Float64(a + z) - Float64(b * Float64(y / t_1)));
	else
		tmp = t_2;
	end
	return 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[(N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision] * z + N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.46e+103], t$95$2, If[LessEqual[z, 4.1e+52], N[(N[(a + z), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45999999999999998e103 or 4.1e52 < z

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - b\right) \]
    6. Applied rewrites63.4%

      \[\leadsto \mathsf{fma}\left(\frac{x + y}{t + \left(x + y\right)}, z, a - b\right) \]

    if -1.45999999999999998e103 < z < 4.1e52

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

Alternative 6: 71.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-84}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\

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

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


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

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

      \[\leadsto \left(a + z\right) - b \cdot \frac{y}{t + y} \]
    8. Applied rewrites64.6%

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1e-84 or 1.99999999999999992e-80 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000002e107

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

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

    if -1e-84 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999992e-80

    1. Initial program 60.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. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    3. Applied rewrites41.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 69.9% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ \mathbf{if}\;a \leq -1.1 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \frac{t + y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b \cdot \frac{y}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y))))
   (if (<= a -1.1e+63) (* a (/ (+ t y) t_1)) (- (+ a z) (* b (/ y t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double tmp;
	if (a <= -1.1e+63) {
		tmp = a * ((t + y) / t_1);
	} else {
		tmp = (a + z) - (b * (y / t_1));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (x + y)
    if (a <= (-1.1d+63)) then
        tmp = a * ((t + y) / t_1)
    else
        tmp = (a + z) - (b * (y / t_1))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double tmp;
	if (a <= -1.1e+63) {
		tmp = a * ((t + y) / t_1);
	} else {
		tmp = (a + z) - (b * (y / t_1));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t + (x + y)
	tmp = 0
	if a <= -1.1e+63:
		tmp = a * ((t + y) / t_1)
	else:
		tmp = (a + z) - (b * (y / t_1))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	tmp = 0.0
	if (a <= -1.1e+63)
		tmp = Float64(a * Float64(Float64(t + y) / t_1));
	else
		tmp = Float64(Float64(a + z) - Float64(b * Float64(y / t_1)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t + (x + y);
	tmp = 0.0;
	if (a <= -1.1e+63)
		tmp = a * ((t + y) / t_1);
	else
		tmp = (a + z) - (b * (y / t_1));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+63], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.0999999999999999e63

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

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

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

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

    if -1.0999999999999999e63 < a

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

Alternative 8: 69.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ t_3 := \left(a + z\right) - b \cdot \frac{y}{t + y}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-84}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-77}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+107}:\\ \;\;\;\;\frac{y \cdot \left(z - b\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \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_1))
        (t_3 (- (+ a z) (* b (/ y (+ t y))))))
   (if (<= t_2 -1e-84)
     t_3
     (if (<= t_2 1e-77)
       (/ (fma a t (* x z)) (+ t x))
       (if (<= t_2 5e+107) (/ (* y (- z b)) t_1) t_3)))))
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)) / t_1;
	double t_3 = (a + z) - (b * (y / (t + y)));
	double tmp;
	if (t_2 <= -1e-84) {
		tmp = t_3;
	} else if (t_2 <= 1e-77) {
		tmp = fma(a, t, (x * z)) / (t + x);
	} else if (t_2 <= 5e+107) {
		tmp = (y * (z - b)) / t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
	t_3 = Float64(Float64(a + z) - Float64(b * Float64(y / Float64(t + y))))
	tmp = 0.0
	if (t_2 <= -1e-84)
		tmp = t_3;
	elseif (t_2 <= 1e-77)
		tmp = Float64(fma(a, t, Float64(x * z)) / Float64(t + x));
	elseif (t_2 <= 5e+107)
		tmp = Float64(Float64(y * Float64(z - b)) / t_1);
	else
		tmp = t_3;
	end
	return 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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + z), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-84], t$95$3, If[LessEqual[t$95$2, 1e-77], N[(N[(a * t + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+107], N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 10^{-77}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+107}:\\
\;\;\;\;\frac{y \cdot \left(z - b\right)}{t\_1}\\

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


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

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

      \[\leadsto \left(a + z\right) - b \cdot \frac{y}{t + y} \]
    8. Applied rewrites64.6%

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

    if -1e-84 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999993e-78

    1. Initial program 60.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. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    3. Applied rewrites41.0%

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

    if 9.9999999999999993e-78 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000002e107

    1. Initial program 60.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. Taylor expanded in y around inf

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

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

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

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

Alternative 9: 66.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b \cdot \frac{y}{t + y}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-84}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-63}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
        (t_2 (- (+ a z) (* b (/ y (+ t y))))))
   (if (<= t_1 -1e-84)
     t_2
     (if (<= t_1 1e-63) (/ (fma a t (* x z)) (+ t x)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double t_2 = (a + z) - (b * (y / (t + y)));
	double tmp;
	if (t_1 <= -1e-84) {
		tmp = t_2;
	} else if (t_1 <= 1e-63) {
		tmp = fma(a, t, (x * z)) / (t + x);
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
	t_2 = Float64(Float64(a + z) - Float64(b * Float64(y / Float64(t + y))))
	tmp = 0.0
	if (t_1 <= -1e-84)
		tmp = t_2;
	elseif (t_1 <= 1e-63)
		tmp = Float64(fma(a, t, Float64(x * z)) / Float64(t + x));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-84], t$95$2, If[LessEqual[t$95$1, 1e-63], N[(N[(a * t + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 10^{-63}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\

\mathbf{else}:\\
\;\;\;\;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)) < -1e-84 or 1.00000000000000007e-63 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

      \[\leadsto \left(a + z\right) - b \cdot \frac{y}{t + y} \]
    8. Applied rewrites64.6%

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

    if -1e-84 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000007e-63

    1. Initial program 60.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. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    3. Applied rewrites41.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 64.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \frac{t + y}{t + \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b \cdot \frac{y}{t + y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -1.1e+63)
   (* a (/ (+ t y) (+ t (+ x y))))
   (- (+ a z) (* b (/ y (+ t y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.1e+63) {
		tmp = a * ((t + y) / (t + (x + y)));
	} else {
		tmp = (a + z) - (b * (y / (t + y)));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-1.1d+63)) then
        tmp = a * ((t + y) / (t + (x + y)))
    else
        tmp = (a + z) - (b * (y / (t + y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.1e+63) {
		tmp = a * ((t + y) / (t + (x + y)));
	} else {
		tmp = (a + z) - (b * (y / (t + y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -1.1e+63:
		tmp = a * ((t + y) / (t + (x + y)))
	else:
		tmp = (a + z) - (b * (y / (t + y)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -1.1e+63)
		tmp = Float64(a * Float64(Float64(t + y) / Float64(t + Float64(x + y))));
	else
		tmp = Float64(Float64(a + z) - Float64(b * Float64(y / Float64(t + y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -1.1e+63)
		tmp = a * ((t + y) / (t + (x + y)));
	else
		tmp = (a + z) - (b * (y / (t + y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.1e+63], N[(a * N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - N[(b * N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.0999999999999999e63

    1. Initial program 60.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. Taylor expanded in a around 0

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

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

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

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

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

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

    if -1.0999999999999999e63 < a

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

      \[\leadsto \left(a + z\right) - b \cdot \frac{y}{t + y} \]
    8. Applied rewrites64.6%

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

Alternative 11: 64.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+96}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-63}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
        (t_2 (- (+ a z) b)))
   (if (<= t_1 -4e+96)
     t_2
     (if (<= t_1 1e-63) (/ (fma a t (* x z)) (+ t x)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double t_2 = (a + z) - b;
	double tmp;
	if (t_1 <= -4e+96) {
		tmp = t_2;
	} else if (t_1 <= 1e-63) {
		tmp = fma(a, t, (x * z)) / (t + x);
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
	t_2 = Float64(Float64(a + z) - b)
	tmp = 0.0
	if (t_1 <= -4e+96)
		tmp = t_2;
	elseif (t_1 <= 1e-63)
		tmp = Float64(fma(a, t, Float64(x * z)) / Float64(t + x));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+96], t$95$2, If[LessEqual[t$95$1, 1e-63], N[(N[(a * t + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 10^{-63}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}\\

\mathbf{else}:\\
\;\;\;\;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.0000000000000002e96 or 1.00000000000000007e-63 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 60.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Applied rewrites55.8%

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

    if -4.0000000000000002e96 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000007e-63

    1. Initial program 60.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. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    3. Applied rewrites41.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 59.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+84}:\\ \;\;\;\;\left(a + z\right) - b \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+198}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -1.5e+84)
   (- (+ a z) (* b (/ y t)))
   (if (<= t 7.2e+198) (- (+ a z) b) a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.5e+84) {
		tmp = (a + z) - (b * (y / t));
	} else if (t <= 7.2e+198) {
		tmp = (a + z) - b;
	} else {
		tmp = a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-1.5d+84)) then
        tmp = (a + z) - (b * (y / t))
    else if (t <= 7.2d+198) then
        tmp = (a + z) - b
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.5e+84) {
		tmp = (a + z) - (b * (y / t));
	} else if (t <= 7.2e+198) {
		tmp = (a + z) - b;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -1.5e+84:
		tmp = (a + z) - (b * (y / t))
	elif t <= 7.2e+198:
		tmp = (a + z) - b
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -1.5e+84)
		tmp = Float64(Float64(a + z) - Float64(b * Float64(y / t)));
	elseif (t <= 7.2e+198)
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -1.5e+84)
		tmp = (a + z) - (b * (y / t));
	elseif (t <= 7.2e+198)
		tmp = (a + z) - b;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.5e+84], N[(N[(a + z), $MachinePrecision] - N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+198], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], a]]
\begin{array}{l}

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

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

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


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

    1. Initial program 60.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. Taylor expanded in z around 0

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

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

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

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

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

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

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

    if -1.49999999999999998e84 < t < 7.2000000000000004e198

    1. Initial program 60.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Applied rewrites55.8%

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

    if 7.2000000000000004e198 < t

    1. Initial program 60.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. Taylor expanded in t around inf

      \[\leadsto \color{blue}{a} \]
    3. Applied rewrites32.5%

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

Alternative 13: 58.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-92}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-63}:\\ \;\;\;\;\frac{a \cdot t}{t + x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
        (t_2 (- (+ a z) b)))
   (if (<= t_1 -5e-92) t_2 (if (<= t_1 1e-63) (/ (* a t) (+ t x)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double t_2 = (a + z) - b;
	double tmp;
	if (t_1 <= -5e-92) {
		tmp = t_2;
	} else if (t_1 <= 1e-63) {
		tmp = (a * t) / (t + x);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
    t_2 = (a + z) - b
    if (t_1 <= (-5d-92)) then
        tmp = t_2
    else if (t_1 <= 1d-63) then
        tmp = (a * t) / (t + x)
    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 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double t_2 = (a + z) - b;
	double tmp;
	if (t_1 <= -5e-92) {
		tmp = t_2;
	} else if (t_1 <= 1e-63) {
		tmp = (a * t) / (t + x);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
	t_2 = (a + z) - b
	tmp = 0
	if t_1 <= -5e-92:
		tmp = t_2
	elif t_1 <= 1e-63:
		tmp = (a * t) / (t + x)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
	t_2 = Float64(Float64(a + z) - b)
	tmp = 0.0
	if (t_1 <= -5e-92)
		tmp = t_2;
	elseif (t_1 <= 1e-63)
		tmp = Float64(Float64(a * t) / Float64(t + x));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	t_2 = (a + z) - b;
	tmp = 0.0;
	if (t_1 <= -5e-92)
		tmp = t_2;
	elseif (t_1 <= 1e-63)
		tmp = (a * t) / (t + x);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-92], t$95$2, If[LessEqual[t$95$1, 1e-63], N[(N[(a * t), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 10^{-63}:\\
\;\;\;\;\frac{a \cdot t}{t + x}\\

\mathbf{else}:\\
\;\;\;\;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)) < -5.00000000000000011e-92 or 1.00000000000000007e-63 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 60.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Applied rewrites55.8%

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

    if -5.00000000000000011e-92 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000007e-63

    1. Initial program 60.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. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    3. Applied rewrites41.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{t + x}} \]
    4. Taylor expanded in x around 0

      \[\leadsto \frac{a \cdot t}{\color{blue}{t} + x} \]
    5. Applied rewrites21.7%

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

Alternative 14: 57.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+221}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+198}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -3e+221) a (if (<= t 7.2e+198) (- (+ a z) b) a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -3e+221) {
		tmp = a;
	} else if (t <= 7.2e+198) {
		tmp = (a + z) - b;
	} else {
		tmp = a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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 <= (-3d+221)) then
        tmp = a
    else if (t <= 7.2d+198) then
        tmp = (a + z) - b
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -3e+221) {
		tmp = a;
	} else if (t <= 7.2e+198) {
		tmp = (a + z) - b;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -3e+221:
		tmp = a
	elif t <= 7.2e+198:
		tmp = (a + z) - b
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -3e+221)
		tmp = a;
	elseif (t <= 7.2e+198)
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -3e+221)
		tmp = a;
	elseif (t <= 7.2e+198)
		tmp = (a + z) - b;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3e+221], a, If[LessEqual[t, 7.2e+198], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], a]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.0000000000000001e221 or 7.2000000000000004e198 < t

    1. Initial program 60.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. Taylor expanded in t around inf

      \[\leadsto \color{blue}{a} \]
    3. Applied rewrites32.5%

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

    if -3.0000000000000001e221 < t < 7.2000000000000004e198

    1. Initial program 60.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Applied rewrites55.8%

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

Alternative 15: 44.2% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.16 \cdot 10^{-16}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+105}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -2.16e-16) a (if (<= a 3.6e+105) z a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.16e-16) {
		tmp = a;
	} else if (a <= 3.6e+105) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-2.16d-16)) then
        tmp = a
    else if (a <= 3.6d+105) 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 <= -2.16e-16) {
		tmp = a;
	} else if (a <= 3.6e+105) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -2.16e-16:
		tmp = a
	elif a <= 3.6e+105:
		tmp = z
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -2.16e-16)
		tmp = a;
	elseif (a <= 3.6e+105)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -2.16e-16)
		tmp = a;
	elseif (a <= 3.6e+105)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.16e-16], a, If[LessEqual[a, 3.6e+105], z, a]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.16 \cdot 10^{-16}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+105}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1600000000000001e-16 or 3.5999999999999999e105 < a

    1. Initial program 60.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. Taylor expanded in t around inf

      \[\leadsto \color{blue}{a} \]
    3. Applied rewrites32.5%

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

    if -2.1600000000000001e-16 < a < 3.5999999999999999e105

    1. Initial program 60.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. Taylor expanded in x around inf

      \[\leadsto \color{blue}{z} \]
    3. Applied rewrites32.9%

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

Alternative 16: 32.5% accurate, 29.5× 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;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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 60.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. Taylor expanded in t around inf

    \[\leadsto \color{blue}{a} \]
  3. Applied rewrites32.5%

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

Reproduce

?
herbie shell --seed 2025161 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64
  (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))