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

Percentage Accurate: 60.7% → 88.4%
Time: 5.6s
Alternatives: 15
Speedup: 1.5×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 60.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: 88.4% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 45.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. Applied rewrites72.3%

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

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

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

      if -1.08000000000000005e33 < a < 6.10000000000000009e184

      1. Initial program 69.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. Applied rewrites75.2%

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

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

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{x}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}}, \frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)}\right) - b \cdot \frac{y}{\left(y + x\right) + t} \]
        2. div-add-revN/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(z, \frac{x + y}{t + \left(x + y\right)}, \frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)}\right) - b \cdot \frac{y}{\left(y + x\right) + t} \]
        10. lift-+.f64N/A

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

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

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

      if 6.10000000000000009e184 < a

      1. Initial program 36.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. Applied rewrites72.9%

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

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

          \[\leadsto a \cdot \color{blue}{\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)} \]
        2. div-add-revN/A

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

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

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

          \[\leadsto a \cdot \frac{t + y}{t + \color{blue}{\left(x + y\right)}} \]
        6. lift-+.f6476.8

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

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

    Alternative 2: 87.9% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_3 := \left(a + z\right) - b\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+236}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+280}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t + y}{t\_1}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (+ (+ y x) t))
            (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
            (t_3 (- (+ a z) b)))
       (if (<= t_2 -1e+236)
         t_3
         (if (<= t_2 4e+280)
           (fma (/ (+ t y) t_1) a (/ (- (* (+ y x) z) (* b y)) t_1))
           t_3))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (y + x) + t;
    	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
    	double t_3 = (a + z) - b;
    	double tmp;
    	if (t_2 <= -1e+236) {
    		tmp = t_3;
    	} else if (t_2 <= 4e+280) {
    		tmp = fma(((t + y) / t_1), a, ((((y + x) * z) - (b * y)) / t_1));
    	} else {
    		tmp = t_3;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(y + x) + t)
    	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
    	t_3 = Float64(Float64(a + z) - b)
    	tmp = 0.0
    	if (t_2 <= -1e+236)
    		tmp = t_3;
    	elseif (t_2 <= 4e+280)
    		tmp = fma(Float64(Float64(t + y) / t_1), a, Float64(Float64(Float64(Float64(y + x) * z) - Float64(b * y)) / t_1));
    	else
    		tmp = t_3;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+236], t$95$3, If[LessEqual[t$95$2, 4e+280], N[(N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision] * a + N[(N[(N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(y + x\right) + t\\
    t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
    t_3 := \left(a + z\right) - b\\
    \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+236}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+280}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{t + y}{t\_1}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{t\_1}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_3\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000005e236 or 4.0000000000000001e280 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

          \[\leadsto \left(a + z\right) - b \]
      4. Applied rewrites73.0%

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

      if -1.00000000000000005e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.0000000000000001e280

      1. Initial program 99.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. Applied rewrites99.2%

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

    Alternative 3: 87.8% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ t_3 := \left(a + z\right) - b\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+236}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+280}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(t\_3, y, z \cdot x\right)\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (+ (+ x t) y))
            (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1))
            (t_3 (- (+ a z) b)))
       (if (<= t_2 -1e+236)
         t_3
         (if (<= t_2 4e+280) (/ (fma a t (fma t_3 y (* z x))) t_1) t_3))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (x + t) + y;
    	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
    	double t_3 = (a + z) - b;
    	double tmp;
    	if (t_2 <= -1e+236) {
    		tmp = t_3;
    	} else if (t_2 <= 4e+280) {
    		tmp = fma(a, t, fma(t_3, y, (z * x))) / t_1;
    	} else {
    		tmp = t_3;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(x + t) + y)
    	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
    	t_3 = Float64(Float64(a + z) - b)
    	tmp = 0.0
    	if (t_2 <= -1e+236)
    		tmp = t_3;
    	elseif (t_2 <= 4e+280)
    		tmp = Float64(fma(a, t, fma(t_3, y, Float64(z * x))) / t_1);
    	else
    		tmp = t_3;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+236], t$95$3, If[LessEqual[t$95$2, 4e+280], N[(N[(a * t + N[(t$95$3 * y + N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(x + t\right) + y\\
    t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\
    t_3 := \left(a + z\right) - b\\
    \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+236}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+280}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(t\_3, y, z \cdot x\right)\right)}{t\_1}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_3\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000005e236 or 4.0000000000000001e280 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

          \[\leadsto \left(a + z\right) - b \]
      4. Applied rewrites73.0%

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

      if -1.00000000000000005e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.0000000000000001e280

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(\left(a + z\right) - b, y, z \cdot x\right)\right)}{\left(x + t\right) + y} \]
        8. lower-*.f6499.5

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

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

    Alternative 4: 74.9% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ t_3 := \left(a + z\right) - b\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+236}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{+176}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (+ (+ x t) y))
            (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1))
            (t_3 (- (+ a z) b)))
       (if (<= t_2 -1e+236)
         t_3
         (if (<= t_2 1e+176) (/ (fma (+ t y) a (* (+ y x) z)) t_1) t_3))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (x + t) + y;
    	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
    	double t_3 = (a + z) - b;
    	double tmp;
    	if (t_2 <= -1e+236) {
    		tmp = t_3;
    	} else if (t_2 <= 1e+176) {
    		tmp = fma((t + y), a, ((y + x) * z)) / t_1;
    	} else {
    		tmp = t_3;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(x + t) + y)
    	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
    	t_3 = Float64(Float64(a + z) - b)
    	tmp = 0.0
    	if (t_2 <= -1e+236)
    		tmp = t_3;
    	elseif (t_2 <= 1e+176)
    		tmp = Float64(fma(Float64(t + y), a, Float64(Float64(y + x) * z)) / t_1);
    	else
    		tmp = t_3;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+236], t$95$3, If[LessEqual[t$95$2, 1e+176], N[(N[(N[(t + y), $MachinePrecision] * a + N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(x + t\right) + y\\
    t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\
    t_3 := \left(a + z\right) - b\\
    \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+236}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+176}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\right)}{t\_1}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_3\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000005e236 or 1e176 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

          \[\leadsto \left(a + z\right) - b \]
      4. Applied rewrites72.5%

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

      if -1.00000000000000005e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e176

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

        \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}}{\left(x + t\right) + y} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\right)}{\left(x + t\right) + y} \]
        7. lower-+.f6477.1

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

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

    Alternative 5: 67.1% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{+124}:\\ \;\;\;\;a + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+168}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t + y}{t\_1}, a, z\right)\\ \mathbf{else}:\\ \;\;\;\;a - b \cdot \frac{y}{t\_1}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (+ (+ y x) t)))
       (if (<= t -6.2e+124)
         (+ a (* x (/ (- z a) t)))
         (if (<= t 8.2e+168) (fma (/ (+ t y) t_1) a z) (- a (* b (/ y t_1)))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (y + x) + t;
    	double tmp;
    	if (t <= -6.2e+124) {
    		tmp = a + (x * ((z - a) / t));
    	} else if (t <= 8.2e+168) {
    		tmp = fma(((t + y) / t_1), a, z);
    	} else {
    		tmp = a - (b * (y / t_1));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(y + x) + t)
    	tmp = 0.0
    	if (t <= -6.2e+124)
    		tmp = Float64(a + Float64(x * Float64(Float64(z - a) / t)));
    	elseif (t <= 8.2e+168)
    		tmp = fma(Float64(Float64(t + y) / t_1), a, z);
    	else
    		tmp = Float64(a - Float64(b * Float64(y / t_1)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[t, -6.2e+124], N[(a + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+168], N[(N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision] * a + z), $MachinePrecision], N[(a - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(y + x\right) + t\\
    \mathbf{if}\;t \leq -6.2 \cdot 10^{+124}:\\
    \;\;\;\;a + x \cdot \frac{z - a}{t}\\
    
    \mathbf{elif}\;t \leq 8.2 \cdot 10^{+168}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{t + y}{t\_1}, a, z\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;a - b \cdot \frac{y}{t\_1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -6.2000000000000004e124

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

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

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

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

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

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

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

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

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

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

          \[\leadsto a + x \cdot \left(\frac{z}{t} - \color{blue}{\frac{a}{t}}\right) \]
        3. sub-divN/A

          \[\leadsto a + x \cdot \frac{z - a}{t} \]
        4. lower-/.f64N/A

          \[\leadsto a + x \cdot \frac{z - a}{t} \]
        5. lower--.f6461.2

          \[\leadsto a + x \cdot \frac{z - a}{t} \]
      7. Applied rewrites61.2%

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

      if -6.2000000000000004e124 < t < 8.2000000000000006e168

      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. Applied rewrites72.5%

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

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

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

        if 8.2000000000000006e168 < t

        1. Initial program 46.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. Applied rewrites49.1%

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

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

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

        Alternative 6: 65.9% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+79}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+176}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
                (t_2 (- (+ a z) b)))
           (if (<= t_1 -5e+79)
             t_2
             (if (<= t_1 1e+176) (/ (fma a t (* z x)) (+ t x)) t_2))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
        	double t_2 = (a + z) - b;
        	double tmp;
        	if (t_1 <= -5e+79) {
        		tmp = t_2;
        	} else if (t_1 <= 1e+176) {
        		tmp = fma(a, t, (z * x)) / (t + x);
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
        	t_2 = Float64(Float64(a + z) - b)
        	tmp = 0.0
        	if (t_1 <= -5e+79)
        		tmp = t_2;
        	elseif (t_1 <= 1e+176)
        		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+79], t$95$2, If[LessEqual[t$95$1, 1e+176], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
        t_2 := \left(a + z\right) - b\\
        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+79}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+176}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5e79 or 1e176 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

              \[\leadsto \left(a + z\right) - b \]
          4. Applied rewrites70.0%

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 61.1% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := a + x \cdot \frac{z - a}{t}\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{+131}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+137}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (+ a (* x (/ (- z a) t)))))
           (if (<= t -4.4e+131) t_1 (if (<= t 5.2e+137) (- (+ a z) b) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = a + (x * ((z - a) / t));
        	double tmp;
        	if (t <= -4.4e+131) {
        		tmp = t_1;
        	} else if (t <= 5.2e+137) {
        		tmp = (a + z) - b;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t, a, b)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: t_1
            real(8) :: tmp
            t_1 = a + (x * ((z - a) / t))
            if (t <= (-4.4d+131)) then
                tmp = t_1
            else if (t <= 5.2d+137) then
                tmp = (a + z) - b
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = a + (x * ((z - a) / t));
        	double tmp;
        	if (t <= -4.4e+131) {
        		tmp = t_1;
        	} else if (t <= 5.2e+137) {
        		tmp = (a + z) - b;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = a + (x * ((z - a) / t))
        	tmp = 0
        	if t <= -4.4e+131:
        		tmp = t_1
        	elif t <= 5.2e+137:
        		tmp = (a + z) - b
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(a + Float64(x * Float64(Float64(z - a) / t)))
        	tmp = 0.0
        	if (t <= -4.4e+131)
        		tmp = t_1;
        	elseif (t <= 5.2e+137)
        		tmp = Float64(Float64(a + z) - b);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = a + (x * ((z - a) / t));
        	tmp = 0.0;
        	if (t <= -4.4e+131)
        		tmp = t_1;
        	elseif (t <= 5.2e+137)
        		tmp = (a + z) - b;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+131], t$95$1, If[LessEqual[t, 5.2e+137], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := a + x \cdot \frac{z - a}{t}\\
        \mathbf{if}\;t \leq -4.4 \cdot 10^{+131}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 5.2 \cdot 10^{+137}:\\
        \;\;\;\;\left(a + z\right) - b\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -4.3999999999999998e131 or 5.1999999999999998e137 < t

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

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

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

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

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

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

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

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

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

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

              \[\leadsto a + x \cdot \left(\frac{z}{t} - \color{blue}{\frac{a}{t}}\right) \]
            3. sub-divN/A

              \[\leadsto a + x \cdot \frac{z - a}{t} \]
            4. lower-/.f64N/A

              \[\leadsto a + x \cdot \frac{z - a}{t} \]
            5. lower--.f6463.2

              \[\leadsto a + x \cdot \frac{z - a}{t} \]
          7. Applied rewrites63.2%

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

          if -4.3999999999999998e131 < t < 5.1999999999999998e137

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

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

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

              \[\leadsto \left(a + z\right) - b \]
          4. Applied rewrites60.2%

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

        Alternative 8: 57.0% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{-128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-211}:\\ \;\;\;\;\frac{x \cdot z}{t + x}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-134}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (- (+ a z) b)))
           (if (<= y -7.5e-128)
             t_1
             (if (<= y -3.6e-211) (/ (* x z) (+ t x)) (if (<= y 2.4e-134) a t_1)))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = (a + z) - b;
        	double tmp;
        	if (y <= -7.5e-128) {
        		tmp = t_1;
        	} else if (y <= -3.6e-211) {
        		tmp = (x * z) / (t + x);
        	} else if (y <= 2.4e-134) {
        		tmp = a;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t, a, b)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: t_1
            real(8) :: tmp
            t_1 = (a + z) - b
            if (y <= (-7.5d-128)) then
                tmp = t_1
            else if (y <= (-3.6d-211)) then
                tmp = (x * z) / (t + x)
            else if (y <= 2.4d-134) then
                tmp = a
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = (a + z) - b;
        	double tmp;
        	if (y <= -7.5e-128) {
        		tmp = t_1;
        	} else if (y <= -3.6e-211) {
        		tmp = (x * z) / (t + x);
        	} else if (y <= 2.4e-134) {
        		tmp = a;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = (a + z) - b
        	tmp = 0
        	if y <= -7.5e-128:
        		tmp = t_1
        	elif y <= -3.6e-211:
        		tmp = (x * z) / (t + x)
        	elif y <= 2.4e-134:
        		tmp = a
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(Float64(a + z) - b)
        	tmp = 0.0
        	if (y <= -7.5e-128)
        		tmp = t_1;
        	elseif (y <= -3.6e-211)
        		tmp = Float64(Float64(x * z) / Float64(t + x));
        	elseif (y <= 2.4e-134)
        		tmp = a;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = (a + z) - b;
        	tmp = 0.0;
        	if (y <= -7.5e-128)
        		tmp = t_1;
        	elseif (y <= -3.6e-211)
        		tmp = (x * z) / (t + x);
        	elseif (y <= 2.4e-134)
        		tmp = a;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -7.5e-128], t$95$1, If[LessEqual[y, -3.6e-211], N[(N[(x * z), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-134], a, t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(a + z\right) - b\\
        \mathbf{if}\;y \leq -7.5 \cdot 10^{-128}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq -3.6 \cdot 10^{-211}:\\
        \;\;\;\;\frac{x \cdot z}{t + x}\\
        
        \mathbf{elif}\;y \leq 2.4 \cdot 10^{-134}:\\
        \;\;\;\;a\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -7.50000000000000021e-128 or 2.4000000000000001e-134 < y

          1. Initial program 53.9%

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

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

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

              \[\leadsto \left(a + z\right) - b \]
          4. Applied rewrites64.2%

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

          if -7.50000000000000021e-128 < y < -3.5999999999999999e-211

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x \cdot z}{\color{blue}{t} + x} \]
          6. Step-by-step derivation
            1. lower-*.f6428.9

              \[\leadsto \frac{x \cdot z}{t + x} \]
          7. Applied rewrites28.9%

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

          if -3.5999999999999999e-211 < y < 2.4000000000000001e-134

          1. Initial program 76.9%

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

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

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

          Alternative 9: 56.1% accurate, 1.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -8 \cdot 10^{-128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-211}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-134}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (- (+ a z) b)))
             (if (<= y -8e-128) t_1 (if (<= y -3.6e-211) z (if (<= y 2.4e-134) a t_1)))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (a + z) - b;
          	double tmp;
          	if (y <= -8e-128) {
          		tmp = t_1;
          	} else if (y <= -3.6e-211) {
          		tmp = z;
          	} else if (y <= 2.4e-134) {
          		tmp = a;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: tmp
              t_1 = (a + z) - b
              if (y <= (-8d-128)) then
                  tmp = t_1
              else if (y <= (-3.6d-211)) then
                  tmp = z
              else if (y <= 2.4d-134) then
                  tmp = a
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (a + z) - b;
          	double tmp;
          	if (y <= -8e-128) {
          		tmp = t_1;
          	} else if (y <= -3.6e-211) {
          		tmp = z;
          	} else if (y <= 2.4e-134) {
          		tmp = a;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = (a + z) - b
          	tmp = 0
          	if y <= -8e-128:
          		tmp = t_1
          	elif y <= -3.6e-211:
          		tmp = z
          	elif y <= 2.4e-134:
          		tmp = a
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(a + z) - b)
          	tmp = 0.0
          	if (y <= -8e-128)
          		tmp = t_1;
          	elseif (y <= -3.6e-211)
          		tmp = z;
          	elseif (y <= 2.4e-134)
          		tmp = a;
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = (a + z) - b;
          	tmp = 0.0;
          	if (y <= -8e-128)
          		tmp = t_1;
          	elseif (y <= -3.6e-211)
          		tmp = z;
          	elseif (y <= 2.4e-134)
          		tmp = a;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -8e-128], t$95$1, If[LessEqual[y, -3.6e-211], z, If[LessEqual[y, 2.4e-134], a, t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(a + z\right) - b\\
          \mathbf{if}\;y \leq -8 \cdot 10^{-128}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y \leq -3.6 \cdot 10^{-211}:\\
          \;\;\;\;z\\
          
          \mathbf{elif}\;y \leq 2.4 \cdot 10^{-134}:\\
          \;\;\;\;a\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y < -8.00000000000000043e-128 or 2.4000000000000001e-134 < y

            1. Initial program 53.9%

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

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

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

                \[\leadsto \left(a + z\right) - b \]
            4. Applied rewrites64.2%

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

            if -8.00000000000000043e-128 < y < -3.5999999999999999e-211

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

              \[\leadsto \color{blue}{z} \]
            3. Step-by-step derivation
              1. Applied rewrites32.0%

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

              if -3.5999999999999999e-211 < y < 2.4000000000000001e-134

              1. Initial program 76.9%

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

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

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

              Alternative 10: 55.9% accurate, 0.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+18}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
                      (t_2 (- (+ a z) b)))
                 (if (<= t_1 -5e+18)
                   t_2
                   (if (<= t_1 5000000.0) (/ (fma a t (* z x)) t) t_2))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
              	double t_2 = (a + z) - b;
              	double tmp;
              	if (t_1 <= -5e+18) {
              		tmp = t_2;
              	} else if (t_1 <= 5000000.0) {
              		tmp = fma(a, t, (z * x)) / t;
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
              	t_2 = Float64(Float64(a + z) - b)
              	tmp = 0.0
              	if (t_1 <= -5e+18)
              		tmp = t_2;
              	elseif (t_1 <= 5000000.0)
              		tmp = Float64(fma(a, t, Float64(z * x)) / t);
              	else
              		tmp = t_2;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+18], t$95$2, If[LessEqual[t$95$1, 5000000.0], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$2]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
              t_2 := \left(a + z\right) - b\\
              \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+18}:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq 5000000:\\
              \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5e18 or 5e6 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

                    \[\leadsto \left(a + z\right) - b \]
                4. Applied rewrites65.3%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t} \]
                6. Step-by-step derivation
                  1. Applied rewrites34.1%

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

                Alternative 11: 51.9% accurate, 3.9× speedup?

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

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

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

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

                      \[\leadsto \left(a + z\right) - b \]
                  4. Applied rewrites43.5%

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

                    \[\leadsto z - b \]
                  6. Step-by-step derivation
                    1. Applied rewrites34.0%

                      \[\leadsto z - b \]

                    if -1.74999999999999999e93 < b

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

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

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

                        \[\leadsto \left(a + z\right) - b \]
                    4. Applied rewrites58.5%

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

                      \[\leadsto a + \color{blue}{z} \]
                    6. Step-by-step derivation
                      1. lift-+.f6455.7

                        \[\leadsto a + z \]
                    7. Applied rewrites55.7%

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

                  Alternative 12: 48.3% accurate, 2.6× speedup?

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

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

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

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

                      if -450 < a < 2.05e79

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

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

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

                          \[\leadsto \left(a + z\right) - b \]
                      4. Applied rewrites51.7%

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

                        \[\leadsto z - b \]
                      6. Step-by-step derivation
                        1. Applied rewrites45.8%

                          \[\leadsto z - b \]

                        if 2.05e79 < a

                        1. Initial program 43.9%

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

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

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

                            \[\leadsto \left(a + z\right) - b \]
                        4. Applied rewrites62.4%

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

                          \[\leadsto a - b \]
                        6. Step-by-step derivation
                          1. Applied rewrites54.8%

                            \[\leadsto a - b \]
                        7. Recombined 3 regimes into one program.
                        8. Add Preprocessing

                        Alternative 13: 48.3% accurate, 2.6× speedup?

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

                          1. Initial program 47.6%

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

                            \[\leadsto \color{blue}{z} \]
                          3. Step-by-step derivation
                            1. Applied rewrites49.2%

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

                            if -2.25000000000000008e63 < z < 5.00000000000000041e-6

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

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

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

                                \[\leadsto \left(a + z\right) - b \]
                            4. Applied rewrites52.6%

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

                              \[\leadsto a - b \]
                            6. Step-by-step derivation
                              1. Applied rewrites47.5%

                                \[\leadsto a - b \]
                            7. Recombined 2 regimes into one program.
                            8. Add Preprocessing

                            Alternative 14: 44.8% accurate, 3.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-9}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-13}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (<= t -4.5e-9) a (if (<= t 1.1e-13) z a)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (t <= -4.5e-9) {
                            		tmp = a;
                            	} else if (t <= 1.1e-13) {
                            		tmp = z;
                            	} else {
                            		tmp = a;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: tmp
                                if (t <= (-4.5d-9)) then
                                    tmp = a
                                else if (t <= 1.1d-13) then
                                    tmp = z
                                else
                                    tmp = a
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (t <= -4.5e-9) {
                            		tmp = a;
                            	} else if (t <= 1.1e-13) {
                            		tmp = z;
                            	} else {
                            		tmp = a;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if t <= -4.5e-9:
                            		tmp = a
                            	elif t <= 1.1e-13:
                            		tmp = z
                            	else:
                            		tmp = a
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if (t <= -4.5e-9)
                            		tmp = a;
                            	elseif (t <= 1.1e-13)
                            		tmp = z;
                            	else
                            		tmp = a;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if (t <= -4.5e-9)
                            		tmp = a;
                            	elseif (t <= 1.1e-13)
                            		tmp = z;
                            	else
                            		tmp = a;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e-9], a, If[LessEqual[t, 1.1e-13], z, a]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;t \leq -4.5 \cdot 10^{-9}:\\
                            \;\;\;\;a\\
                            
                            \mathbf{elif}\;t \leq 1.1 \cdot 10^{-13}:\\
                            \;\;\;\;z\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;a\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if t < -4.49999999999999976e-9 or 1.09999999999999998e-13 < t

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

                                \[\leadsto \color{blue}{a} \]
                              3. Step-by-step derivation
                                1. Applied rewrites45.0%

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

                                if -4.49999999999999976e-9 < t < 1.09999999999999998e-13

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

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

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

                                Alternative 15: 33.1% accurate, 29.5× speedup?

                                \[\begin{array}{l} \\ a \end{array} \]
                                (FPCore (x y z t a b) :precision binary64 a)
                                double code(double x, double y, double z, double t, double a, double b) {
                                	return a;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, a, b)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    real(8), intent (in) :: b
                                    code = a
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b) {
                                	return a;
                                }
                                
                                def code(x, y, z, t, a, b):
                                	return a
                                
                                function code(x, y, z, t, a, b)
                                	return a
                                end
                                
                                function tmp = code(x, y, z, t, a, b)
                                	tmp = a;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := a
                                
                                \begin{array}{l}
                                
                                \\
                                a
                                \end{array}
                                
                                Derivation
                                1. Initial program 60.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. Taylor expanded in t around inf

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

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

                                  Reproduce

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