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

Percentage Accurate: 61.3% → 88.5%
Time: 7.8s
Alternatives: 13
Speedup: 1.3×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 61.3% 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.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+242}\right):\\ \;\;\;\;\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 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+242))) (- (+ a z) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+242)) {
		tmp = (a + z) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+242)) {
		tmp = (a + z) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 2e+242):
		tmp = (a + z) - b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+242))
		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 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 2e+242)))
		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[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+242]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}

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

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


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

    1. Initial program 8.9%

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

Alternative 2: 66.4% accurate, 0.2× 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^{+262}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-45}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+35}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+242}:\\ \;\;\;\;\frac{t\_3 \cdot y}{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+262)
     t_3
     (if (<= t_2 -5e-45)
       (/ (fma z x (* y (- z b))) t_1)
       (if (<= t_2 2e+35)
         (/ (fma a t (* z x)) (+ t x))
         (if (<= t_2 2e+242) (/ (* t_3 y) 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+262) {
		tmp = t_3;
	} else if (t_2 <= -5e-45) {
		tmp = fma(z, x, (y * (z - b))) / t_1;
	} else if (t_2 <= 2e+35) {
		tmp = fma(a, t, (z * x)) / (t + x);
	} else if (t_2 <= 2e+242) {
		tmp = (t_3 * y) / 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+262)
		tmp = t_3;
	elseif (t_2 <= -5e-45)
		tmp = Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1);
	elseif (t_2 <= 2e+35)
		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
	elseif (t_2 <= 2e+242)
		tmp = Float64(Float64(t_3 * y) / 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+262], t$95$3, If[LessEqual[t$95$2, -5e-45], N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+35], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+242], N[(N[(t$95$3 * y), $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^{+262}:\\
\;\;\;\;t\_3\\

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+242}:\\
\;\;\;\;\frac{t\_3 \cdot y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1e262 or 2.0000000000000001e242 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 11.4%

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

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

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

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

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

    if -1e262 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.99999999999999976e-45

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999976e-45 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.9999999999999999e35

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 3: 66.1% accurate, 0.2× 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 -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+114}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, y \cdot \left(z - b\right)\right)}{t + y}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+35}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+242}:\\ \;\;\;\;\frac{t\_3 \cdot y}{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 (- INFINITY))
     t_3
     (if (<= t_2 -5e+114)
       (/ (fma (+ t y) a (* y (- z b))) (+ t y))
       (if (<= t_2 2e+35)
         (/ (fma a t (* z x)) (+ t x))
         (if (<= t_2 2e+242) (/ (* t_3 y) 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 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= -5e+114) {
		tmp = fma((t + y), a, (y * (z - b))) / (t + y);
	} else if (t_2 <= 2e+35) {
		tmp = fma(a, t, (z * x)) / (t + x);
	} else if (t_2 <= 2e+242) {
		tmp = (t_3 * y) / 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 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= -5e+114)
		tmp = Float64(fma(Float64(t + y), a, Float64(y * Float64(z - b))) / Float64(t + y));
	elseif (t_2 <= 2e+35)
		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
	elseif (t_2 <= 2e+242)
		tmp = Float64(Float64(t_3 * y) / 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, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -5e+114], N[(N[(N[(t + y), $MachinePrecision] * a + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+35], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+242], N[(N[(t$95$3 * y), $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 -\infty:\\
\;\;\;\;t\_3\\

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+242}:\\
\;\;\;\;\frac{t\_3 \cdot y}{t\_1}\\

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


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

    1. Initial program 8.9%

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e114 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.9999999999999999e35

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 4: 65.5% 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 -5 \cdot 10^{+114}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+35}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+242}:\\ \;\;\;\;\frac{t\_3 \cdot y}{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 -5e+114)
     t_3
     (if (<= t_2 2e+35)
       (/ (fma a t (* z x)) (+ t x))
       (if (<= t_2 2e+242) (/ (* t_3 y) 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 <= -5e+114) {
		tmp = t_3;
	} else if (t_2 <= 2e+35) {
		tmp = fma(a, t, (z * x)) / (t + x);
	} else if (t_2 <= 2e+242) {
		tmp = (t_3 * y) / 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 <= -5e+114)
		tmp = t_3;
	elseif (t_2 <= 2e+35)
		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
	elseif (t_2 <= 2e+242)
		tmp = Float64(Float64(t_3 * y) / 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, -5e+114], t$95$3, If[LessEqual[t$95$2, 2e+35], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+242], N[(N[(t$95$3 * y), $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 -5 \cdot 10^{+114}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+242}:\\
\;\;\;\;\frac{t\_3 \cdot y}{t\_1}\\

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


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

    1. Initial program 29.4%

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

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

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

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

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

    if -5.0000000000000001e114 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.9999999999999999e35

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 5: 73.9% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_1\right)}{\left(y + x\right) + t}\\


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

    1. Initial program 22.4%

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+114} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+94}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
   (if (or (<= t_1 -5e+114) (not (<= t_1 5e+94)))
     (- (+ a z) b)
     (/ (fma a t (* z x)) (+ t x)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double tmp;
	if ((t_1 <= -5e+114) || !(t_1 <= 5e+94)) {
		tmp = (a + z) - b;
	} else {
		tmp = fma(a, t, (z * x)) / (t + x);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
	tmp = 0.0
	if ((t_1 <= -5e+114) || !(t_1 <= 5e+94))
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+114], N[Not[LessEqual[t$95$1, 5e+94]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\


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

    1. Initial program 37.7%

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 7: 62.2% accurate, 1.3× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+151} \lor \neg \left(x \leq 6.4 \cdot 10^{+127}\right):\\
\;\;\;\;z - \frac{b - a}{x} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.4000000000000001e151 or 6.39999999999999952e127 < x

    1. Initial program 60.8%

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

      \[\leadsto \color{blue}{z + -1 \cdot \frac{-1 \cdot \left(\left(a \cdot \left(t + y\right) + y \cdot z\right) - b \cdot y\right) - -1 \cdot \left(z \cdot \left(t + y\right)\right)}{x}} \]
    4. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{-1 \cdot \left(\left(a \cdot \left(t + y\right) + y \cdot z\right) - b \cdot y\right) - -1 \cdot \left(z \cdot \left(t + y\right)\right)}{x}} \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

      if -2.4000000000000001e151 < x < 6.39999999999999952e127

      1. Initial program 64.0%

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

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

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

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

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

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

    Alternative 8: 55.7% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -9.1 \cdot 10^{-125}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-194}:\\ \;\;\;\;\frac{x}{t + x} \cdot z\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-9}:\\ \;\;\;\;\frac{a}{z} \cdot z\\ \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 -9.1e-125)
         t_1
         (if (<= y 5.4e-194)
           (* (/ x (+ t x)) z)
           (if (<= y 1.1e-9) (* (/ a z) z) 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 <= -9.1e-125) {
    		tmp = t_1;
    	} else if (y <= 5.4e-194) {
    		tmp = (x / (t + x)) * z;
    	} else if (y <= 1.1e-9) {
    		tmp = (a / z) * z;
    	} 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 <= (-9.1d-125)) then
            tmp = t_1
        else if (y <= 5.4d-194) then
            tmp = (x / (t + x)) * z
        else if (y <= 1.1d-9) then
            tmp = (a / z) * z
        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 <= -9.1e-125) {
    		tmp = t_1;
    	} else if (y <= 5.4e-194) {
    		tmp = (x / (t + x)) * z;
    	} else if (y <= 1.1e-9) {
    		tmp = (a / z) * z;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = (a + z) - b
    	tmp = 0
    	if y <= -9.1e-125:
    		tmp = t_1
    	elif y <= 5.4e-194:
    		tmp = (x / (t + x)) * z
    	elif y <= 1.1e-9:
    		tmp = (a / z) * z
    	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 <= -9.1e-125)
    		tmp = t_1;
    	elseif (y <= 5.4e-194)
    		tmp = Float64(Float64(x / Float64(t + x)) * z);
    	elseif (y <= 1.1e-9)
    		tmp = Float64(Float64(a / z) * z);
    	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 <= -9.1e-125)
    		tmp = t_1;
    	elseif (y <= 5.4e-194)
    		tmp = (x / (t + x)) * z;
    	elseif (y <= 1.1e-9)
    		tmp = (a / z) * z;
    	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, -9.1e-125], t$95$1, If[LessEqual[y, 5.4e-194], N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[y, 1.1e-9], N[(N[(a / z), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(a + z\right) - b\\
    \mathbf{if}\;y \leq -9.1 \cdot 10^{-125}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 5.4 \cdot 10^{-194}:\\
    \;\;\;\;\frac{x}{t + x} \cdot z\\
    
    \mathbf{elif}\;y \leq 1.1 \cdot 10^{-9}:\\
    \;\;\;\;\frac{a}{z} \cdot z\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -9.10000000000000046e-125 or 1.0999999999999999e-9 < y

      1. Initial program 55.2%

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

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

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

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

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

      if -9.10000000000000046e-125 < y < 5.4e-194

      1. Initial program 80.7%

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

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

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

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

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

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

          \[\leadsto \frac{x}{t + x} \cdot z \]
        3. Step-by-step derivation
          1. Applied rewrites53.1%

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

          if 5.4e-194 < y < 1.0999999999999999e-9

          1. Initial program 73.8%

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

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

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

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

            \[\leadsto \frac{a}{z} \cdot z \]
          7. Step-by-step derivation
            1. Applied rewrites61.6%

              \[\leadsto \frac{a}{z} \cdot z \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 9: 56.7% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+191} \lor \neg \left(t \leq 1.5 \cdot 10^{+233}\right):\\ \;\;\;\;\frac{a}{z} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= t -7.2e+191) (not (<= t 1.5e+233))) (* (/ a z) z) (- (+ a z) b)))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((t <= -7.2e+191) || !(t <= 1.5e+233)) {
          		tmp = (a / z) * z;
          	} else {
          		tmp = (a + z) - b;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: tmp
              if ((t <= (-7.2d+191)) .or. (.not. (t <= 1.5d+233))) then
                  tmp = (a / z) * z
              else
                  tmp = (a + z) - b
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((t <= -7.2e+191) || !(t <= 1.5e+233)) {
          		tmp = (a / z) * z;
          	} else {
          		tmp = (a + z) - b;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if (t <= -7.2e+191) or not (t <= 1.5e+233):
          		tmp = (a / z) * z
          	else:
          		tmp = (a + z) - b
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((t <= -7.2e+191) || !(t <= 1.5e+233))
          		tmp = Float64(Float64(a / z) * z);
          	else
          		tmp = Float64(Float64(a + z) - b);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if ((t <= -7.2e+191) || ~((t <= 1.5e+233)))
          		tmp = (a / z) * z;
          	else
          		tmp = (a + z) - b;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.2e+191], N[Not[LessEqual[t, 1.5e+233]], $MachinePrecision]], N[(N[(a / z), $MachinePrecision] * z), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -7.2 \cdot 10^{+191} \lor \neg \left(t \leq 1.5 \cdot 10^{+233}\right):\\
          \;\;\;\;\frac{a}{z} \cdot z\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(a + z\right) - b\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -7.1999999999999999e191 or 1.50000000000000007e233 < t

            1. Initial program 64.0%

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

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

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

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

              \[\leadsto \frac{a}{z} \cdot z \]
            7. Step-by-step derivation
              1. Applied rewrites61.7%

                \[\leadsto \frac{a}{z} \cdot z \]

              if -7.1999999999999999e191 < t < 1.50000000000000007e233

              1. Initial program 63.0%

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+191} \lor \neg \left(t \leq 1.5 \cdot 10^{+233}\right):\\ \;\;\;\;\frac{a}{z} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
            10. Add Preprocessing

            Alternative 10: 51.3% accurate, 2.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+125} \lor \neg \left(b \leq 4 \cdot 10^{+92}\right):\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= b -2.9e+125) (not (<= b 4e+92))) (- a b) (+ a z)))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((b <= -2.9e+125) || !(b <= 4e+92)) {
            		tmp = a - b;
            	} else {
            		tmp = a + z;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: tmp
                if ((b <= (-2.9d+125)) .or. (.not. (b <= 4d+92))) then
                    tmp = a - b
                else
                    tmp = a + z
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((b <= -2.9e+125) || !(b <= 4e+92)) {
            		tmp = a - b;
            	} else {
            		tmp = a + z;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if (b <= -2.9e+125) or not (b <= 4e+92):
            		tmp = a - b
            	else:
            		tmp = a + z
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((b <= -2.9e+125) || !(b <= 4e+92))
            		tmp = Float64(a - b);
            	else
            		tmp = Float64(a + z);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	tmp = 0.0;
            	if ((b <= -2.9e+125) || ~((b <= 4e+92)))
            		tmp = a - b;
            	else
            		tmp = a + z;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.9e+125], N[Not[LessEqual[b, 4e+92]], $MachinePrecision]], N[(a - b), $MachinePrecision], N[(a + z), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;b \leq -2.9 \cdot 10^{+125} \lor \neg \left(b \leq 4 \cdot 10^{+92}\right):\\
            \;\;\;\;a - b\\
            
            \mathbf{else}:\\
            \;\;\;\;a + z\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < -2.89999999999999993e125 or 4.0000000000000002e92 < b

              1. Initial program 49.4%

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

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

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

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

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

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

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

                if -2.89999999999999993e125 < b < 4.0000000000000002e92

                1. Initial program 70.0%

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

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

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

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

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

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

                    \[\leadsto -b \]
                  2. Taylor expanded in b around 0

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

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

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

                  Alternative 11: 50.5% accurate, 2.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.2 \cdot 10^{+224} \lor \neg \left(b \leq 3.8 \cdot 10^{+146}\right):\\ \;\;\;\;-b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (or (<= b -2.2e+224) (not (<= b 3.8e+146))) (- b) (+ a z)))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((b <= -2.2e+224) || !(b <= 3.8e+146)) {
                  		tmp = -b;
                  	} else {
                  		tmp = a + z;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: tmp
                      if ((b <= (-2.2d+224)) .or. (.not. (b <= 3.8d+146))) then
                          tmp = -b
                      else
                          tmp = a + z
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((b <= -2.2e+224) || !(b <= 3.8e+146)) {
                  		tmp = -b;
                  	} else {
                  		tmp = a + z;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	tmp = 0
                  	if (b <= -2.2e+224) or not (b <= 3.8e+146):
                  		tmp = -b
                  	else:
                  		tmp = a + z
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if ((b <= -2.2e+224) || !(b <= 3.8e+146))
                  		tmp = Float64(-b);
                  	else
                  		tmp = Float64(a + z);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	tmp = 0.0;
                  	if ((b <= -2.2e+224) || ~((b <= 3.8e+146)))
                  		tmp = -b;
                  	else
                  		tmp = a + z;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.2e+224], N[Not[LessEqual[b, 3.8e+146]], $MachinePrecision]], (-b), N[(a + z), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b \leq -2.2 \cdot 10^{+224} \lor \neg \left(b \leq 3.8 \cdot 10^{+146}\right):\\
                  \;\;\;\;-b\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;a + z\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if b < -2.2e224 or 3.79999999999999979e146 < b

                    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. Add Preprocessing
                    3. Taylor expanded in y around inf

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

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

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

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

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

                        \[\leadsto -b \]

                      if -2.2e224 < b < 3.79999999999999979e146

                      1. Initial program 69.2%

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

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

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

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

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

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

                          \[\leadsto -b \]
                        2. Taylor expanded in b around 0

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

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

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

                        Alternative 12: 56.9% accurate, 3.5× speedup?

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

                          1. Initial program 63.1%

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

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

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

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

                            \[\leadsto 1 \cdot z \]
                          7. Step-by-step derivation
                            1. Applied rewrites60.2%

                              \[\leadsto 1 \cdot z \]

                            if -4.99999999999999976e157 < x

                            1. Initial program 63.2%

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

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

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

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

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

                          Alternative 13: 13.5% accurate, 15.0× speedup?

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

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

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

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

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

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

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

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

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

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\ t_3 := \frac{t\_2}{t\_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (let* ((t_1 (+ (+ x t) y))
                                    (t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
                                    (t_3 (/ t_2 t_1))
                                    (t_4 (- (+ z a) b)))
                               (if (< t_3 -3.5813117084150564e+153)
                                 t_4
                                 (if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double t_1 = (x + t) + y;
                            	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                            	double t_3 = t_2 / t_1;
                            	double t_4 = (z + a) - b;
                            	double tmp;
                            	if (t_3 < -3.5813117084150564e+153) {
                            		tmp = t_4;
                            	} else if (t_3 < 1.2285964308315609e+82) {
                            		tmp = 1.0 / (t_1 / t_2);
                            	} else {
                            		tmp = t_4;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: t_1
                                real(8) :: t_2
                                real(8) :: t_3
                                real(8) :: t_4
                                real(8) :: tmp
                                t_1 = (x + t) + y
                                t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                t_3 = t_2 / t_1
                                t_4 = (z + a) - b
                                if (t_3 < (-3.5813117084150564d+153)) then
                                    tmp = t_4
                                else if (t_3 < 1.2285964308315609d+82) then
                                    tmp = 1.0d0 / (t_1 / t_2)
                                else
                                    tmp = t_4
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double t_1 = (x + t) + y;
                            	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                            	double t_3 = t_2 / t_1;
                            	double t_4 = (z + a) - b;
                            	double tmp;
                            	if (t_3 < -3.5813117084150564e+153) {
                            		tmp = t_4;
                            	} else if (t_3 < 1.2285964308315609e+82) {
                            		tmp = 1.0 / (t_1 / t_2);
                            	} else {
                            		tmp = t_4;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	t_1 = (x + t) + y
                            	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                            	t_3 = t_2 / t_1
                            	t_4 = (z + a) - b
                            	tmp = 0
                            	if t_3 < -3.5813117084150564e+153:
                            		tmp = t_4
                            	elif t_3 < 1.2285964308315609e+82:
                            		tmp = 1.0 / (t_1 / t_2)
                            	else:
                            		tmp = t_4
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	t_1 = Float64(Float64(x + t) + y)
                            	t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b))
                            	t_3 = Float64(t_2 / t_1)
                            	t_4 = Float64(Float64(z + a) - b)
                            	tmp = 0.0
                            	if (t_3 < -3.5813117084150564e+153)
                            		tmp = t_4;
                            	elseif (t_3 < 1.2285964308315609e+82)
                            		tmp = Float64(1.0 / Float64(t_1 / t_2));
                            	else
                            		tmp = t_4;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	t_1 = (x + t) + y;
                            	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                            	t_3 = t_2 / t_1;
                            	t_4 = (z + a) - b;
                            	tmp = 0.0;
                            	if (t_3 < -3.5813117084150564e+153)
                            		tmp = t_4;
                            	elseif (t_3 < 1.2285964308315609e+82)
                            		tmp = 1.0 / (t_1 / t_2);
                            	else
                            		tmp = t_4;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \left(x + t\right) + y\\
                            t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
                            t_3 := \frac{t\_2}{t\_1}\\
                            t_4 := \left(z + a\right) - b\\
                            \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
                            \;\;\;\;t\_4\\
                            
                            \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
                            \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_4\\
                            
                            
                            \end{array}
                            \end{array}
                            

                            Reproduce

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