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

Percentage Accurate: 60.7% → 90.0%
Time: 8.2s
Alternatives: 12
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 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.7% 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: 90.0% accurate, 0.2× 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 := \frac{y}{y + x}\\ t_3 := \mathsf{fma}\left(t\_2, a, z\right)\\ t_4 := t\_2 \cdot b\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - t\_4\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(t\_2, b, a\right)}{y + x} - \frac{t\_3}{y + x}, t, t\_3\right) - t\_4\\ \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 (/ y (+ y x)))
        (t_3 (fma t_2 a z))
        (t_4 (* t_2 b)))
   (if (<= t_1 (- INFINITY))
     (- (fma a (/ y (+ x y)) z) t_4)
     (if (<= t_1 5e+302)
       t_1
       (- (fma (- (/ (fma t_2 b a) (+ y x)) (/ t_3 (+ y x))) t t_3) t_4)))))
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 = y / (y + x);
	double t_3 = fma(t_2, a, z);
	double t_4 = t_2 * b;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma(a, (y / (x + y)), z) - t_4;
	} else if (t_1 <= 5e+302) {
		tmp = t_1;
	} else {
		tmp = fma(((fma(t_2, b, a) / (y + x)) - (t_3 / (y + x))), t, t_3) - t_4;
	}
	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(y / Float64(y + x))
	t_3 = fma(t_2, a, z)
	t_4 = Float64(t_2 * b)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(fma(a, Float64(y / Float64(x + y)), z) - t_4);
	elseif (t_1 <= 5e+302)
		tmp = t_1;
	else
		tmp = Float64(fma(Float64(Float64(fma(t_2, b, a) / Float64(y + x)) - Float64(t_3 / Float64(y + x))), t, t_3) - t_4);
	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[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * a + z), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * b), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(a * N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - t$95$4), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], t$95$1, N[(N[(N[(N[(N[(t$95$2 * b + a), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t + t$95$3), $MachinePrecision] - t$95$4), $MachinePrecision]]]]]]]
\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 := \frac{y}{y + x}\\
t_3 := \mathsf{fma}\left(t\_2, a, z\right)\\
t_4 := t\_2 \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - t\_4\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(t\_2, b, a\right)}{y + x} - \frac{t\_3}{y + x}, t, t\_3\right) - t\_4\\


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

    1. Initial program 5.9%

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

      \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

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

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

      1. Initial program 99.7%

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

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

      1. Initial program 3.9%

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

        \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
      4. Step-by-step derivation
        1. lower--.f64N/A

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

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

    Alternative 2: 65.5% accurate, 0.2× speedup?

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

      1. Initial program 24.1%

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

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      4. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        2. lower-+.f6480.6

          \[\leadsto \color{blue}{\left(a + z\right)} - b \]
      5. Applied rewrites80.6%

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

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

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\frac{\left(a \cdot \left(t + y\right) + y \cdot z\right) - b \cdot y}{t + y}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

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

          \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right) + \left(y \cdot z - b \cdot y\right)}}{t + y} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left(t + y\right) \cdot a} + \left(y \cdot z - b \cdot y\right)}{t + y} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(t + y, a, y \cdot z - b \cdot y\right)}}{t + y} \]
        5. lower-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{t + y}, a, y \cdot z - b \cdot y\right)}{t + y} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
        7. distribute-lft-out--N/A

          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
        9. lower--.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot \color{blue}{\left(z - b\right)}\right)}{t + y} \]
        10. lower-+.f6474.5

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

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

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

      1. Initial program 99.7%

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

        \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) - b \cdot y}}{\left(x + t\right) + y} \]
      4. Step-by-step derivation
        1. distribute-rgt-inN/A

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

          \[\leadsto \frac{\color{blue}{x \cdot z + \left(y \cdot z - b \cdot y\right)}}{\left(x + t\right) + y} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{z \cdot x} + \left(y \cdot z - b \cdot y\right)}{\left(x + t\right) + y} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, x, y \cdot z - b \cdot y\right)}}{\left(x + t\right) + y} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, x, y \cdot z - \color{blue}{y \cdot b}\right)}{\left(x + t\right) + y} \]
        6. distribute-lft-out--N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, x, \color{blue}{y \cdot \left(z - b\right)}\right)}{\left(x + t\right) + y} \]
        7. lower-*.f64N/A

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

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

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

    Alternative 3: 89.6% 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}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+273}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - \frac{y}{y + x} \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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))))
       (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+273)))
         (- (fma a (/ y (+ x y)) z) (* (/ y (+ y x)) b))
         t_1)))
    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 tmp;
    	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+273)) {
    		tmp = fma(a, (y / (x + y)), z) - ((y / (y + x)) * b);
    	} else {
    		tmp = t_1;
    	}
    	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))
    	tmp = 0.0
    	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+273))
    		tmp = Float64(fma(a, Float64(y / Float64(x + y)), z) - Float64(Float64(y / Float64(y + x)) * b));
    	else
    		tmp = t_1;
    	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]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+273]], $MachinePrecision]], N[(N[(a * N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]
    
    \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}\\
    \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+273}\right):\\
    \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - \frac{y}{y + x} \cdot b\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 1.99999999999999989e273 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 7.5%

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

        \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
      4. Step-by-step derivation
        1. lower--.f64N/A

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

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

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

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

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

        1. Initial program 99.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq -\infty \lor \neg \left(\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq 2 \cdot 10^{+273}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - \frac{y}{y + x} \cdot b\\ \mathbf{else}:\\ \;\;\;\;\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} \]
      10. Add Preprocessing

      Alternative 4: 65.5% 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}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+116}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, y \cdot \left(z - b\right)\right)}{t + y}\\ \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))))
         (if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+116)))
           (- (+ a z) b)
           (/ (fma (+ t y) a (* y (- z b))) (+ t y)))))
      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 tmp;
      	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+116)) {
      		tmp = (a + z) - b;
      	} else {
      		tmp = fma((t + y), a, (y * (z - b))) / (t + y);
      	}
      	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))
      	tmp = 0.0
      	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+116))
      		tmp = Float64(Float64(a + z) - b);
      	else
      		tmp = Float64(fma(Float64(t + y), a, Float64(y * Float64(z - b))) / Float64(t + y));
      	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]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+116]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * a + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]]]
      
      \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}\\
      \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+116}\right):\\
      \;\;\;\;\left(a + z\right) - b\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, y \cdot \left(z - b\right)\right)}{t + y}\\
      
      
      \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.00000000000000002e116 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

        1. Initial program 22.8%

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

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        4. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
          2. lower-+.f6481.1

            \[\leadsto \color{blue}{\left(a + z\right)} - b \]
        5. Applied rewrites81.1%

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

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

        1. Initial program 99.8%

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

          \[\leadsto \color{blue}{\frac{\left(a \cdot \left(t + y\right) + y \cdot z\right) - b \cdot y}{t + y}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

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

            \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right) + \left(y \cdot z - b \cdot y\right)}}{t + y} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\left(t + y\right) \cdot a} + \left(y \cdot z - b \cdot y\right)}{t + y} \]
          4. lower-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(t + y, a, y \cdot z - b \cdot y\right)}}{t + y} \]
          5. lower-+.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{t + y}, a, y \cdot z - b \cdot y\right)}{t + y} \]
          6. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
          7. distribute-lft-out--N/A

            \[\leadsto \frac{\mathsf{fma}\left(t + y, a, \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(t + y, a, \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
          9. lower--.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot \color{blue}{\left(z - b\right)}\right)}{t + y} \]
          10. lower-+.f6470.4

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

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

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

      Alternative 5: 65.8% 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}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+94} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+109}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \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))))
         (if (or (<= t_1 -1e+94) (not (<= t_1 5e+109)))
           (- (+ a z) b)
           (/ (fma a t (* z x)) (+ t x)))))
      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 tmp;
      	if ((t_1 <= -1e+94) || !(t_1 <= 5e+109)) {
      		tmp = (a + z) - b;
      	} else {
      		tmp = fma(a, t, (z * x)) / (t + x);
      	}
      	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))
      	tmp = 0.0
      	if ((t_1 <= -1e+94) || !(t_1 <= 5e+109))
      		tmp = Float64(Float64(a + z) - b);
      	else
      		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
      	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]}, If[Or[LessEqual[t$95$1, -1e+94], N[Not[LessEqual[t$95$1, 5e+109]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]]]
      
      \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}\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+94} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+109}\right):\\
      \;\;\;\;\left(a + z\right) - b\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
      
      
      \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)) < -1e94 or 5.0000000000000001e109 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

        1. Initial program 39.4%

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

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        4. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
          2. lower-+.f6478.1

            \[\leadsto \color{blue}{\left(a + z\right)} - b \]
        5. Applied rewrites78.1%

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

        if -1e94 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000001e109

        1. Initial program 99.8%

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

          \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
          2. lower-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t, x \cdot z\right)}}{t + x} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
          4. lower-*.f64N/A

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

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

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

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

      Alternative 6: 73.4% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+151} \lor \neg \left(t \leq 2.2 \cdot 10^{+88}\right):\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - \frac{y}{y + x} \cdot b\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (or (<= t -5e+151) (not (<= t 2.2e+88)))
         (* a (/ t (+ t x)))
         (- (fma a (/ y (+ x y)) z) (* (/ y (+ y x)) b))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if ((t <= -5e+151) || !(t <= 2.2e+88)) {
      		tmp = a * (t / (t + x));
      	} else {
      		tmp = fma(a, (y / (x + y)), z) - ((y / (y + x)) * b);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if ((t <= -5e+151) || !(t <= 2.2e+88))
      		tmp = Float64(a * Float64(t / Float64(t + x)));
      	else
      		tmp = Float64(fma(a, Float64(y / Float64(x + y)), z) - Float64(Float64(y / Float64(y + x)) * b));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5e+151], N[Not[LessEqual[t, 2.2e+88]], $MachinePrecision]], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] - N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -5 \cdot 10^{+151} \lor \neg \left(t \leq 2.2 \cdot 10^{+88}\right):\\
      \;\;\;\;a \cdot \frac{t}{t + x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - \frac{y}{y + x} \cdot b\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -5.0000000000000002e151 or 2.20000000000000009e88 < t

        1. Initial program 55.3%

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

          \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
        4. Step-by-step derivation
          1. lower--.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{t \cdot a} + x \cdot z}{t + x} \]
          3. lower-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(t, a, x \cdot z\right)}}{t + x} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(t, a, \color{blue}{z \cdot x}\right)}{t + x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(t, a, \color{blue}{z \cdot x}\right)}{t + x} \]
          6. lower-+.f6441.9

            \[\leadsto \frac{\mathsf{fma}\left(t, a, z \cdot x\right)}{\color{blue}{t + x}} \]
        8. Applied rewrites41.9%

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

          \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
        10. Step-by-step derivation
          1. Applied rewrites68.3%

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

          if -5.0000000000000002e151 < t < 2.20000000000000009e88

          1. Initial program 67.1%

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

            \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
          4. Step-by-step derivation
            1. lower--.f64N/A

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

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

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

              \[\leadsto \mathsf{fma}\left(a, \frac{y}{x + y}, z\right) - \color{blue}{\frac{y}{y + x}} \cdot b \]
          8. Recombined 2 regimes into one program.
          9. Final simplification80.1%

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

          Alternative 7: 59.3% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.75 \cdot 10^{+107} \lor \neg \left(t \leq 9.6 \cdot 10^{+82}\right):\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= t -2.75e+107) (not (<= t 9.6e+82)))
             (* a (/ t (+ t x)))
             (- (+ a z) b)))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((t <= -2.75e+107) || !(t <= 9.6e+82)) {
          		tmp = a * (t / (t + x));
          	} else {
          		tmp = (a + z) - b;
          	}
          	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 <= (-2.75d+107)) .or. (.not. (t <= 9.6d+82))) then
                  tmp = a * (t / (t + x))
              else
                  tmp = (a + z) - b
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((t <= -2.75e+107) || !(t <= 9.6e+82)) {
          		tmp = a * (t / (t + x));
          	} else {
          		tmp = (a + z) - b;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if (t <= -2.75e+107) or not (t <= 9.6e+82):
          		tmp = a * (t / (t + x))
          	else:
          		tmp = (a + z) - b
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((t <= -2.75e+107) || !(t <= 9.6e+82))
          		tmp = Float64(a * Float64(t / Float64(t + x)));
          	else
          		tmp = Float64(Float64(a + z) - b);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if ((t <= -2.75e+107) || ~((t <= 9.6e+82)))
          		tmp = a * (t / (t + x));
          	else
          		tmp = (a + z) - b;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.75e+107], N[Not[LessEqual[t, 9.6e+82]], $MachinePrecision]], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -2.75 \cdot 10^{+107} \lor \neg \left(t \leq 9.6 \cdot 10^{+82}\right):\\
          \;\;\;\;a \cdot \frac{t}{t + x}\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(a + z\right) - b\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -2.7500000000000002e107 or 9.59999999999999992e82 < t

            1. Initial program 58.7%

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

              \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
            4. Step-by-step derivation
              1. lower--.f64N/A

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

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

              \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
            7. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{t \cdot a} + x \cdot z}{t + x} \]
              3. lower-fma.f64N/A

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(t, a, x \cdot z\right)}}{t + x} \]
              4. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(t, a, \color{blue}{z \cdot x}\right)}{t + x} \]
              5. lower-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(t, a, \color{blue}{z \cdot x}\right)}{t + x} \]
              6. lower-+.f6442.9

                \[\leadsto \frac{\mathsf{fma}\left(t, a, z \cdot x\right)}{\color{blue}{t + x}} \]
            8. Applied rewrites42.9%

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

              \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
            10. Step-by-step derivation
              1. Applied rewrites65.8%

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

              if -2.7500000000000002e107 < t < 9.59999999999999992e82

              1. Initial program 65.9%

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

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
              4. Step-by-step derivation
                1. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                2. lower-+.f6469.4

                  \[\leadsto \color{blue}{\left(a + z\right)} - b \]
              5. Applied rewrites69.4%

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

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

            Alternative 8: 59.1% accurate, 2.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-58} \lor \neg \left(y \leq 1.2 \cdot 10^{-170}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= y -4.2e-58) (not (<= y 1.2e-170))) (- (+ a z) b) (+ a z)))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((y <= -4.2e-58) || !(y <= 1.2e-170)) {
            		tmp = (a + z) - b;
            	} else {
            		tmp = a + z;
            	}
            	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 ((y <= (-4.2d-58)) .or. (.not. (y <= 1.2d-170))) then
                    tmp = (a + z) - b
                else
                    tmp = a + z
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((y <= -4.2e-58) || !(y <= 1.2e-170)) {
            		tmp = (a + z) - b;
            	} else {
            		tmp = a + z;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if (y <= -4.2e-58) or not (y <= 1.2e-170):
            		tmp = (a + z) - b
            	else:
            		tmp = a + z
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((y <= -4.2e-58) || !(y <= 1.2e-170))
            		tmp = Float64(Float64(a + z) - b);
            	else
            		tmp = Float64(a + z);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	tmp = 0.0;
            	if ((y <= -4.2e-58) || ~((y <= 1.2e-170)))
            		tmp = (a + z) - b;
            	else
            		tmp = a + z;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.2e-58], N[Not[LessEqual[y, 1.2e-170]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(a + z), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -4.2 \cdot 10^{-58} \lor \neg \left(y \leq 1.2 \cdot 10^{-170}\right):\\
            \;\;\;\;\left(a + z\right) - b\\
            
            \mathbf{else}:\\
            \;\;\;\;a + z\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -4.19999999999999975e-58 or 1.2e-170 < y

              1. Initial program 55.0%

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

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
              4. Step-by-step derivation
                1. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                2. lower-+.f6470.8

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

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

              if -4.19999999999999975e-58 < y < 1.2e-170

              1. Initial program 83.2%

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

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
              4. Step-by-step derivation
                1. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                2. lower-+.f6434.6

                  \[\leadsto \color{blue}{\left(a + z\right)} - b \]
              5. Applied rewrites34.6%

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
              6. Taylor expanded in z around 0

                \[\leadsto a - \color{blue}{b} \]
              7. Step-by-step derivation
                1. Applied rewrites24.4%

                  \[\leadsto a - \color{blue}{b} \]
                2. Taylor expanded in b around 0

                  \[\leadsto a + \color{blue}{z} \]
                3. Step-by-step derivation
                  1. Applied rewrites53.7%

                    \[\leadsto a + \color{blue}{z} \]
                4. Recombined 2 regimes into one program.
                5. Final simplification65.5%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-58} \lor \neg \left(y \leq 1.2 \cdot 10^{-170}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
                6. Add Preprocessing

                Alternative 9: 52.0% accurate, 2.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{+125} \lor \neg \left(b \leq 2.8 \cdot 10^{+127}\right):\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (if (or (<= b -2.7e+125) (not (<= b 2.8e+127))) (- z b) (+ a z)))
                double code(double x, double y, double z, double t, double a, double b) {
                	double tmp;
                	if ((b <= -2.7e+125) || !(b <= 2.8e+127)) {
                		tmp = z - b;
                	} else {
                		tmp = a + z;
                	}
                	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 ((b <= (-2.7d+125)) .or. (.not. (b <= 2.8d+127))) then
                        tmp = z - b
                    else
                        tmp = a + z
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b) {
                	double tmp;
                	if ((b <= -2.7e+125) || !(b <= 2.8e+127)) {
                		tmp = z - b;
                	} else {
                		tmp = a + z;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b):
                	tmp = 0
                	if (b <= -2.7e+125) or not (b <= 2.8e+127):
                		tmp = z - b
                	else:
                		tmp = a + z
                	return tmp
                
                function code(x, y, z, t, a, b)
                	tmp = 0.0
                	if ((b <= -2.7e+125) || !(b <= 2.8e+127))
                		tmp = Float64(z - b);
                	else
                		tmp = Float64(a + z);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b)
                	tmp = 0.0;
                	if ((b <= -2.7e+125) || ~((b <= 2.8e+127)))
                		tmp = z - b;
                	else
                		tmp = a + z;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.7e+125], N[Not[LessEqual[b, 2.8e+127]], $MachinePrecision]], N[(z - b), $MachinePrecision], N[(a + z), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq -2.7 \cdot 10^{+125} \lor \neg \left(b \leq 2.8 \cdot 10^{+127}\right):\\
                \;\;\;\;z - b\\
                
                \mathbf{else}:\\
                \;\;\;\;a + z\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < -2.6999999999999999e125 or 2.8000000000000002e127 < b

                  1. Initial program 62.7%

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

                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                  4. Step-by-step derivation
                    1. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                    2. lower-+.f6445.0

                      \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                  5. Applied rewrites45.0%

                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                  6. Taylor expanded in a around 0

                    \[\leadsto z - \color{blue}{b} \]
                  7. Step-by-step derivation
                    1. Applied rewrites41.0%

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

                    if -2.6999999999999999e125 < b < 2.8000000000000002e127

                    1. Initial program 64.2%

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

                      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                    4. Step-by-step derivation
                      1. lower--.f64N/A

                        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                      2. lower-+.f6466.9

                        \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                    5. Applied rewrites66.9%

                      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                    6. Taylor expanded in z around 0

                      \[\leadsto a - \color{blue}{b} \]
                    7. Step-by-step derivation
                      1. Applied rewrites47.3%

                        \[\leadsto a - \color{blue}{b} \]
                      2. Taylor expanded in b around 0

                        \[\leadsto a + \color{blue}{z} \]
                      3. Step-by-step derivation
                        1. Applied rewrites70.3%

                          \[\leadsto a + \color{blue}{z} \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification60.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{+125} \lor \neg \left(b \leq 2.8 \cdot 10^{+127}\right):\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 10: 50.3% accurate, 4.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+68}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b) :precision binary64 (if (<= y -2.5e+68) (- a b) (+ a z)))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (y <= -2.5e+68) {
                      		tmp = a - b;
                      	} else {
                      		tmp = a + z;
                      	}
                      	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 (y <= (-2.5d+68)) then
                              tmp = a - b
                          else
                              tmp = a + z
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (y <= -2.5e+68) {
                      		tmp = a - b;
                      	} else {
                      		tmp = a + z;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if y <= -2.5e+68:
                      		tmp = a - b
                      	else:
                      		tmp = a + z
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (y <= -2.5e+68)
                      		tmp = Float64(a - b);
                      	else
                      		tmp = Float64(a + z);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b)
                      	tmp = 0.0;
                      	if (y <= -2.5e+68)
                      		tmp = a - b;
                      	else
                      		tmp = a + z;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.5e+68], N[(a - b), $MachinePrecision], N[(a + z), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;y \leq -2.5 \cdot 10^{+68}:\\
                      \;\;\;\;a - b\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;a + z\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if y < -2.5000000000000002e68

                        1. Initial program 35.8%

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

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                        4. Step-by-step derivation
                          1. lower--.f64N/A

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          2. lower-+.f6485.3

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

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                        6. Taylor expanded in z around 0

                          \[\leadsto a - \color{blue}{b} \]
                        7. Step-by-step derivation
                          1. Applied rewrites75.0%

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

                          if -2.5000000000000002e68 < y

                          1. Initial program 71.3%

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

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          4. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                            2. lower-+.f6452.6

                              \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                          5. Applied rewrites52.6%

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          6. Taylor expanded in z around 0

                            \[\leadsto a - \color{blue}{b} \]
                          7. Step-by-step derivation
                            1. Applied rewrites35.8%

                              \[\leadsto a - \color{blue}{b} \]
                            2. Taylor expanded in b around 0

                              \[\leadsto a + \color{blue}{z} \]
                            3. Step-by-step derivation
                              1. Applied rewrites53.9%

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

                            Alternative 11: 51.8% accurate, 4.5× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{+256}:\\ \;\;\;\;-b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b) :precision binary64 (if (<= b -1.1e+256) (- b) (+ a z)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (b <= -1.1e+256) {
                            		tmp = -b;
                            	} else {
                            		tmp = a + z;
                            	}
                            	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 (b <= (-1.1d+256)) then
                                    tmp = -b
                                else
                                    tmp = a + z
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (b <= -1.1e+256) {
                            		tmp = -b;
                            	} else {
                            		tmp = a + z;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if b <= -1.1e+256:
                            		tmp = -b
                            	else:
                            		tmp = a + z
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if (b <= -1.1e+256)
                            		tmp = Float64(-b);
                            	else
                            		tmp = Float64(a + z);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if (b <= -1.1e+256)
                            		tmp = -b;
                            	else
                            		tmp = a + z;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.1e+256], (-b), N[(a + z), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;b \leq -1.1 \cdot 10^{+256}:\\
                            \;\;\;\;-b\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;a + z\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if b < -1.1e256

                              1. Initial program 37.6%

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

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              4. Step-by-step derivation
                                1. lower--.f64N/A

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                2. lower-+.f6466.8

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

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              6. Taylor expanded in b around inf

                                \[\leadsto -1 \cdot \color{blue}{b} \]
                              7. Step-by-step derivation
                                1. Applied rewrites66.8%

                                  \[\leadsto -b \]

                                if -1.1e256 < b

                                1. Initial program 64.7%

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

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                4. Step-by-step derivation
                                  1. lower--.f64N/A

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  2. lower-+.f6459.4

                                    \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                5. Applied rewrites59.4%

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                6. Taylor expanded in z around 0

                                  \[\leadsto a - \color{blue}{b} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites43.4%

                                    \[\leadsto a - \color{blue}{b} \]
                                  2. Taylor expanded in b around 0

                                    \[\leadsto a + \color{blue}{z} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites57.3%

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

                                  Alternative 12: 13.7% accurate, 15.0× speedup?

                                  \[\begin{array}{l} \\ -b \end{array} \]
                                  (FPCore (x y z t a b) :precision binary64 (- b))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	return -b;
                                  }
                                  
                                  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 = -b
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                  	return -b;
                                  }
                                  
                                  def code(x, y, z, t, a, b):
                                  	return -b
                                  
                                  function code(x, y, z, t, a, b)
                                  	return Float64(-b)
                                  end
                                  
                                  function tmp = code(x, y, z, t, a, b)
                                  	tmp = -b;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := (-b)
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  -b
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 63.7%

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

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  4. Step-by-step derivation
                                    1. lower--.f64N/A

                                      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                    2. lower-+.f6459.6

                                      \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                  5. Applied rewrites59.6%

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  6. Taylor expanded in b around inf

                                    \[\leadsto -1 \cdot \color{blue}{b} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites14.9%

                                      \[\leadsto -b \]
                                    2. Add Preprocessing

                                    Developer Target 1: 82.3% accurate, 0.3× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\ t_3 := \frac{t\_2}{t\_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (let* ((t_1 (+ (+ x t) y))
                                            (t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
                                            (t_3 (/ t_2 t_1))
                                            (t_4 (- (+ z a) b)))
                                       (if (< t_3 -3.5813117084150564e+153)
                                         t_4
                                         (if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double t_1 = (x + t) + y;
                                    	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                    	double t_3 = t_2 / t_1;
                                    	double t_4 = (z + a) - b;
                                    	double tmp;
                                    	if (t_3 < -3.5813117084150564e+153) {
                                    		tmp = t_4;
                                    	} else if (t_3 < 1.2285964308315609e+82) {
                                    		tmp = 1.0 / (t_1 / t_2);
                                    	} else {
                                    		tmp = t_4;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    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) :: t_3
                                        real(8) :: t_4
                                        real(8) :: tmp
                                        t_1 = (x + t) + y
                                        t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                        t_3 = t_2 / t_1
                                        t_4 = (z + a) - b
                                        if (t_3 < (-3.5813117084150564d+153)) then
                                            tmp = t_4
                                        else if (t_3 < 1.2285964308315609d+82) then
                                            tmp = 1.0d0 / (t_1 / t_2)
                                        else
                                            tmp = t_4
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y, double z, double t, double a, double b) {
                                    	double t_1 = (x + t) + y;
                                    	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                    	double t_3 = t_2 / t_1;
                                    	double t_4 = (z + a) - b;
                                    	double tmp;
                                    	if (t_3 < -3.5813117084150564e+153) {
                                    		tmp = t_4;
                                    	} else if (t_3 < 1.2285964308315609e+82) {
                                    		tmp = 1.0 / (t_1 / t_2);
                                    	} else {
                                    		tmp = t_4;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b):
                                    	t_1 = (x + t) + y
                                    	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                    	t_3 = t_2 / t_1
                                    	t_4 = (z + a) - b
                                    	tmp = 0
                                    	if t_3 < -3.5813117084150564e+153:
                                    		tmp = t_4
                                    	elif t_3 < 1.2285964308315609e+82:
                                    		tmp = 1.0 / (t_1 / t_2)
                                    	else:
                                    		tmp = t_4
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b)
                                    	t_1 = Float64(Float64(x + t) + y)
                                    	t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b))
                                    	t_3 = Float64(t_2 / t_1)
                                    	t_4 = Float64(Float64(z + a) - b)
                                    	tmp = 0.0
                                    	if (t_3 < -3.5813117084150564e+153)
                                    		tmp = t_4;
                                    	elseif (t_3 < 1.2285964308315609e+82)
                                    		tmp = Float64(1.0 / Float64(t_1 / t_2));
                                    	else
                                    		tmp = t_4;
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b)
                                    	t_1 = (x + t) + y;
                                    	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                    	t_3 = t_2 / t_1;
                                    	t_4 = (z + a) - b;
                                    	tmp = 0.0;
                                    	if (t_3 < -3.5813117084150564e+153)
                                    		tmp = t_4;
                                    	elseif (t_3 < 1.2285964308315609e+82)
                                    		tmp = 1.0 / (t_1 / t_2);
                                    	else
                                    		tmp = t_4;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \left(x + t\right) + y\\
                                    t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
                                    t_3 := \frac{t\_2}{t\_1}\\
                                    t_4 := \left(z + a\right) - b\\
                                    \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
                                    \;\;\;\;t\_4\\
                                    
                                    \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
                                    \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_4\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    

                                    Reproduce

                                    ?
                                    herbie shell --seed 2024359 
                                    (FPCore (x y z t a b)
                                      :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
                                      :precision binary64
                                    
                                      :alt
                                      (! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b))))
                                    
                                      (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))