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

Percentage Accurate: 61.1% → 90.8%
Time: 10.8s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

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

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

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

Alternative 1: 90.8% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4500000000000001e-12 or 1.9999999999999999e-48 < a

    1. Initial program 50.5%

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

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

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

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

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

    if -1.4500000000000001e-12 < a < -9.9999999999999998e-201

    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. Applied rewrites95.1%

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

    if -9.9999999999999998e-201 < a < 1.9999999999999999e-48

    1. Initial program 72.6%

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

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

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

Alternative 2: 86.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 13.3%

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

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

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

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

      \[\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)) < 9.999999999999999e201

    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. Applied rewrites99.8%

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

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

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

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


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

    1. Initial program 13.3%

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

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

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

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

      \[\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)) < 9.999999999999999e201

    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. Step-by-step derivation
      1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right) - b \cdot y\right)}{\left(x + t\right) + y} \]
      14. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a + \color{blue}{\left(-1 \cdot b\right)} \cdot y\right)}{\left(x + t\right) + y} \]
      17. associate-*r*N/A

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \mathsf{fma}\left(t + y, a, \color{blue}{-1 \cdot \left(b \cdot y\right)}\right)\right)}{\left(x + t\right) + y} \]
      22. associate-*r*N/A

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

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

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

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

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

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

Alternative 4: 74.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+180} \lor \neg \left(t\_2 \leq 10^{+202}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\right)}{t\_1}\\ \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)))
   (if (or (<= t_2 -2e+180) (not (<= t_2 1e+202)))
     (- (+ a z) b)
     (/ (fma (+ t y) a (* (+ y x) z)) t_1))))
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 tmp;
	if ((t_2 <= -2e+180) || !(t_2 <= 1e+202)) {
		tmp = (a + z) - b;
	} else {
		tmp = fma((t + y), a, ((y + x) * z)) / t_1;
	}
	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)
	tmp = 0.0
	if ((t_2 <= -2e+180) || !(t_2 <= 1e+202))
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = Float64(fma(Float64(t + y), a, Float64(Float64(y + x) * z)) / t_1);
	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]}, If[Or[LessEqual[t$95$2, -2e+180], N[Not[LessEqual[t$95$2, 1e+202]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * a + N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\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}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+180} \lor \neg \left(t\_2 \leq 10^{+202}\right):\\
\;\;\;\;\left(a + z\right) - b\\

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


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

    1. Initial program 21.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 \left(a + z\right) - \color{blue}{b} \]
      2. lower-+.f6474.0

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

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

    if -2e180 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.999999999999999e201

    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 b around 0

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

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

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

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

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

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

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

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

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

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

Alternative 5: 65.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+180} \lor \neg \left(t\_1 \leq 10^{+202}\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 -2e+180) (not (<= t_1 1e+202)))
     (- (+ 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 <= -2e+180) || !(t_1 <= 1e+202)) {
		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 <= -2e+180) || !(t_1 <= 1e+202))
		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, -2e+180], N[Not[LessEqual[t$95$1, 1e+202]], $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 -2 \cdot 10^{+180} \lor \neg \left(t\_1 \leq 10^{+202}\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)) < -2e180 or 9.999999999999999e201 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 21.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 \left(a + z\right) - \color{blue}{b} \]
      2. lower-+.f6474.0

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

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

    if -2e180 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.999999999999999e201

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

Alternative 6: 92.2% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.9999999999999998e-89 or 5.9999999999999999e-88 < a

    1. Initial program 55.5%

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

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

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

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

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

    if -8.9999999999999998e-89 < a < 5.9999999999999999e-88

    1. Initial program 71.3%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in 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 \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 \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \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 \color{blue}{z} \]
    5. Applied rewrites88.4%

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

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

Alternative 7: 63.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-115}:\\ \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{-59}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{t\_1 \cdot y}{\left(x + t\right) + y}\\ \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 -1.3e+93)
     t_1
     (if (<= y -8.2e-115)
       (- a (* b (/ y (+ (+ y x) t))))
       (if (<= y 1.72e-59)
         (/ (fma a t (* z x)) (+ t x))
         (if (<= y 2.3e+24) (/ (* t_1 y) (+ (+ x t) y)) 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 <= -1.3e+93) {
		tmp = t_1;
	} else if (y <= -8.2e-115) {
		tmp = a - (b * (y / ((y + x) + t)));
	} else if (y <= 1.72e-59) {
		tmp = fma(a, t, (z * x)) / (t + x);
	} else if (y <= 2.3e+24) {
		tmp = (t_1 * y) / ((x + t) + y);
	} 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 <= -1.3e+93)
		tmp = t_1;
	elseif (y <= -8.2e-115)
		tmp = Float64(a - Float64(b * Float64(y / Float64(Float64(y + x) + t))));
	elseif (y <= 1.72e-59)
		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
	elseif (y <= 2.3e+24)
		tmp = Float64(Float64(t_1 * y) / Float64(Float64(x + t) + y));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.3e+93], t$95$1, If[LessEqual[y, -8.2e-115], N[(a - N[(b * N[(y / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e-59], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+24], N[(N[(t$95$1 * y), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+24}:\\
\;\;\;\;\frac{t\_1 \cdot y}{\left(x + t\right) + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3e93 or 2.2999999999999999e24 < y

    1. Initial program 35.8%

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

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

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

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

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

    if -1.3e93 < y < -8.1999999999999993e-115

    1. Initial program 72.6%

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

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

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

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

      if -8.1999999999999993e-115 < y < 1.72e-59

      1. Initial program 78.3%

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

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

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

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

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

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

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

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

      if 1.72e-59 < y < 2.2999999999999999e24

      1. Initial program 74.8%

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

        \[\leadsto \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{\left(\left(a + z\right) - b\right) \cdot \color{blue}{y}}{\left(x + t\right) + y} \]
        2. lower-*.f64N/A

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+93}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-115}:\\ \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{-59}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{\left(\left(a + z\right) - b\right) \cdot y}{\left(x + t\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
    8. Add Preprocessing

    Alternative 8: 63.4% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-115}:\\ \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+18}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \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 -1.3e+93)
         t_1
         (if (<= y -8.2e-115)
           (- a (* b (/ y (+ (+ y x) t))))
           (if (<= y 1.45e+18) (/ (fma a t (* z x)) (+ t x)) 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 <= -1.3e+93) {
    		tmp = t_1;
    	} else if (y <= -8.2e-115) {
    		tmp = a - (b * (y / ((y + x) + t)));
    	} else if (y <= 1.45e+18) {
    		tmp = fma(a, t, (z * x)) / (t + x);
    	} 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 <= -1.3e+93)
    		tmp = t_1;
    	elseif (y <= -8.2e-115)
    		tmp = Float64(a - Float64(b * Float64(y / Float64(Float64(y + x) + t))));
    	elseif (y <= 1.45e+18)
    		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.3e+93], t$95$1, If[LessEqual[y, -8.2e-115], N[(a - N[(b * N[(y / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+18], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(a + z\right) - b\\
    \mathbf{if}\;y \leq -1.3 \cdot 10^{+93}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq -8.2 \cdot 10^{-115}:\\
    \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\
    
    \mathbf{elif}\;y \leq 1.45 \cdot 10^{+18}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -1.3e93 or 1.45e18 < y

      1. Initial program 36.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 \left(a + z\right) - \color{blue}{b} \]
        2. lower-+.f6480.1

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

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

      if -1.3e93 < y < -8.1999999999999993e-115

      1. Initial program 72.6%

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

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

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

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

        if -8.1999999999999993e-115 < y < 1.45e18

        1. Initial program 78.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 0

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+93}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-115}:\\ \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+18}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
      8. Add Preprocessing

      Alternative 9: 56.0% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -3.6 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-146}:\\ \;\;\;\;\frac{t + y}{t + \left(x + y\right)} \cdot a\\ \mathbf{elif}\;y \leq 1.66 \cdot 10^{+19}:\\ \;\;\;\;\mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right)\\ \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 -3.6e+67)
           t_1
           (if (<= y 9e-146)
             (* (/ (+ t y) (+ t (+ x y))) a)
             (if (<= y 1.66e+19) (fma (/ (* b y) x) -1.0 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 <= -3.6e+67) {
      		tmp = t_1;
      	} else if (y <= 9e-146) {
      		tmp = ((t + y) / (t + (x + y))) * a;
      	} else if (y <= 1.66e+19) {
      		tmp = fma(((b * y) / x), -1.0, 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 <= -3.6e+67)
      		tmp = t_1;
      	elseif (y <= 9e-146)
      		tmp = Float64(Float64(Float64(t + y) / Float64(t + Float64(x + y))) * a);
      	elseif (y <= 1.66e+19)
      		tmp = fma(Float64(Float64(b * y) / x), -1.0, z);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.6e+67], t$95$1, If[LessEqual[y, 9e-146], N[(N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 1.66e+19], N[(N[(N[(b * y), $MachinePrecision] / x), $MachinePrecision] * -1.0 + z), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(a + z\right) - b\\
      \mathbf{if}\;y \leq -3.6 \cdot 10^{+67}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 9 \cdot 10^{-146}:\\
      \;\;\;\;\frac{t + y}{t + \left(x + y\right)} \cdot a\\
      
      \mathbf{elif}\;y \leq 1.66 \cdot 10^{+19}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -3.5999999999999999e67 or 1.66e19 < y

        1. Initial program 38.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 \left(a + z\right) - \color{blue}{b} \]
          2. lower-+.f6480.3

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

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

        if -3.5999999999999999e67 < y < 9.0000000000000001e-146

        1. Initial program 74.6%

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

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

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

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

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

          \[\leadsto \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) \cdot a \]
        7. Step-by-step derivation
          1. div-add-revN/A

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

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

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

            \[\leadsto \frac{t + y}{t + \left(x + y\right)} \cdot a \]
          5. lower-+.f6451.6

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

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

        if 9.0000000000000001e-146 < y < 1.66e19

        1. Initial program 84.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 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. +-commutativeN/A

            \[\leadsto -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} + \color{blue}{z} \]
          2. *-commutativeN/A

            \[\leadsto \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} \cdot -1 + z \]
          3. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(\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}, \color{blue}{-1}, z\right) \]
        5. Applied rewrites54.1%

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

          \[\leadsto \mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right) \]
        7. Step-by-step derivation
          1. lift-*.f6451.5

            \[\leadsto \mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right) \]
        8. Applied rewrites51.5%

          \[\leadsto \mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right) \]
      3. Recombined 3 regimes into one program.
      4. Final simplification63.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+67}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-146}:\\ \;\;\;\;\frac{t + y}{t + \left(x + y\right)} \cdot a\\ \mathbf{elif}\;y \leq 1.66 \cdot 10^{+19}:\\ \;\;\;\;\mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
      5. Add Preprocessing

      Alternative 10: 59.8% accurate, 1.3× speedup?

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

        1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.99999999999999984e78 < x < 1.2799999999999999e213

        1. Initial program 60.9%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. 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 \left(a + z\right) - \color{blue}{b} \]
          2. lower-+.f6461.6

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

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

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

      Alternative 11: 60.3% accurate, 1.3× speedup?

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

        1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto a + x \cdot \frac{z - a}{t} \]
        8. Applied rewrites60.3%

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

        if -1.35e70 < t < 2.60000000000000016e118

        1. Initial program 65.9%

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

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

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

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

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

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

      Alternative 12: 59.7% accurate, 1.3× speedup?

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

        1. Initial program 75.6%

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

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

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

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

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

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

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

            \[\leadsto z \cdot \frac{x + y}{t + \color{blue}{\left(x + y\right)}} \]
          6. lower-+.f6460.2

            \[\leadsto z \cdot \frac{x + y}{t + \left(x + \color{blue}{y}\right)} \]
        6. Applied rewrites60.2%

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

        if -5e103 < x < 1.2799999999999999e213

        1. Initial program 61.4%

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

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

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

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

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

        if 1.2799999999999999e213 < x

        1. Initial program 21.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 0

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z + t \cdot \frac{a - z}{x} \]
        8. Applied rewrites71.3%

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

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

      Alternative 13: 59.3% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+105}:\\ \;\;\;\;\mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right)\\ \mathbf{elif}\;x \leq 1.28 \cdot 10^{+213}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + t \cdot \frac{a - z}{x}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= x -2.4e+105)
         (fma (/ (* b y) x) -1.0 z)
         (if (<= x 1.28e+213) (- (+ a z) b) (+ z (* t (/ (- a z) x))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (x <= -2.4e+105) {
      		tmp = fma(((b * y) / x), -1.0, z);
      	} else if (x <= 1.28e+213) {
      		tmp = (a + z) - b;
      	} else {
      		tmp = z + (t * ((a - z) / x));
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (x <= -2.4e+105)
      		tmp = fma(Float64(Float64(b * y) / x), -1.0, z);
      	elseif (x <= 1.28e+213)
      		tmp = Float64(Float64(a + z) - b);
      	else
      		tmp = Float64(z + Float64(t * Float64(Float64(a - z) / x)));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.4e+105], N[(N[(N[(b * y), $MachinePrecision] / x), $MachinePrecision] * -1.0 + z), $MachinePrecision], If[LessEqual[x, 1.28e+213], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(z + N[(t * N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -2.4 \cdot 10^{+105}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right)\\
      
      \mathbf{elif}\;x \leq 1.28 \cdot 10^{+213}:\\
      \;\;\;\;\left(a + z\right) - b\\
      
      \mathbf{else}:\\
      \;\;\;\;z + t \cdot \frac{a - z}{x}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -2.39999999999999975e105

        1. Initial program 75.6%

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

          \[\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. +-commutativeN/A

            \[\leadsto -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} + \color{blue}{z} \]
          2. *-commutativeN/A

            \[\leadsto \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} \cdot -1 + z \]
          3. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(\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}, \color{blue}{-1}, z\right) \]
        5. Applied rewrites62.5%

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

          \[\leadsto \mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right) \]
        7. Step-by-step derivation
          1. lift-*.f6460.0

            \[\leadsto \mathsf{fma}\left(\frac{b \cdot y}{x}, -1, z\right) \]
        8. Applied rewrites60.0%

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

        if -2.39999999999999975e105 < x < 1.2799999999999999e213

        1. Initial program 61.4%

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

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

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

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

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

        if 1.2799999999999999e213 < x

        1. Initial program 21.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 0

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z + t \cdot \frac{a - z}{x} \]
        8. Applied rewrites71.3%

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

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

      Alternative 14: 59.0% accurate, 2.4× speedup?

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

        1. Initial program 38.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 \left(a + z\right) - \color{blue}{b} \]
          2. lower-+.f6480.8

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

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

        if -3.10000000000000018e71 < y < 3.5000000000000002e23

        1. Initial program 76.3%

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

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

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

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

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

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

            \[\leadsto a + z \]
        8. Applied rewrites45.6%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+71} \lor \neg \left(y \leq 3.5 \cdot 10^{+23}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
      5. Add Preprocessing

      Alternative 15: 53.0% accurate, 2.8× speedup?

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

        1. Initial program 54.6%

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

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

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

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

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

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

            \[\leadsto a + z \]
        8. Applied rewrites60.5%

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

        if -3.70000000000000016e-110 < a < 30500

        1. Initial program 71.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 \left(a + z\right) - \color{blue}{b} \]
          2. lower-+.f6450.9

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

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

          \[\leadsto z - b \]
        7. Step-by-step derivation
          1. Applied rewrites50.5%

            \[\leadsto z - b \]
        8. Recombined 2 regimes into one program.
        9. Final simplification57.1%

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

        Alternative 16: 44.5% accurate, 3.5× speedup?

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

          1. Initial program 56.5%

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

            \[\leadsto \color{blue}{z} \]
          4. Step-by-step derivation
            1. Applied rewrites47.9%

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

            if -1.85e81 < x < 1.89999999999999998e61

            1. Initial program 62.4%

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

              \[\leadsto \color{blue}{a} \]
            4. Step-by-step derivation
              1. Applied rewrites50.8%

                \[\leadsto \color{blue}{a} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification49.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+81}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+61}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
            7. Add Preprocessing

            Alternative 17: 52.4% accurate, 4.5× speedup?

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

              1. Initial program 75.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 x around inf

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

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

                if -3.9999999999999998e105 < x

                1. Initial program 57.6%

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

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

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

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

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

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

                    \[\leadsto a + z \]
                8. Applied rewrites53.4%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+105}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
              7. Add Preprocessing

              Alternative 18: 32.5% accurate, 45.0× speedup?

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

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

                  \[\leadsto \color{blue}{a} \]
                2. Final simplification37.7%

                  \[\leadsto a \]
                3. Add Preprocessing

                Developer Target 1: 81.9% 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 2025061 
                (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)))