Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2

Percentage Accurate: 95.2% → 97.3%
Time: 8.8s
Alternatives: 26
Speedup: 0.5×

Specification

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

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

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

\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\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 26 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: 95.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.3% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - \mathsf{fma}\left(t - 1, a, t\_1\right)\\


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

    1. Initial program 100.0%

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

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b))

    1. Initial program 0.0%

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

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

        \[\leadsto \color{blue}{x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 2: 96.6% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - 1\right) \cdot z\\ \mathbf{if}\;\left(\left(x - t\_1\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\ \;\;\;\;\left(\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, t\_1\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* (- y 1.0) z)))
       (if (<= (+ (- (- x t_1) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)) INFINITY)
         (- (+ (fma (- b a) t (fma (- y 2.0) b x)) a) t_1)
         (- x (fma (- t 1.0) a t_1)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (y - 1.0) * z;
    	double tmp;
    	if ((((x - t_1) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
    		tmp = (fma((b - a), t, fma((y - 2.0), b, x)) + a) - t_1;
    	} else {
    		tmp = x - fma((t - 1.0), a, t_1);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(y - 1.0) * z)
    	tmp = 0.0
    	if (Float64(Float64(Float64(x - t_1) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf)
    		tmp = Float64(Float64(fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)) + a) - t_1);
    	else
    		tmp = Float64(x - fma(Float64(t - 1.0), a, t_1));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - t$95$1), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + t$95$1), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(y - 1\right) \cdot z\\
    \mathbf{if}\;\left(\left(x - t\_1\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\
    \;\;\;\;\left(\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\right) - t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;x - \mathsf{fma}\left(t - 1, a, t\_1\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0

      1. Initial program 100.0%

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

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

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

        if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b))

        1. Initial program 0.0%

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

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

            \[\leadsto \color{blue}{x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 3: 72.1% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b - a, t, \mathsf{fma}\left(-2, b, x\right)\right) + a\\ t_2 := z + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -300000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-8}:\\ \;\;\;\;\left(x + a\right) - \left(y - 1\right) \cdot z\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (+ (fma (- b a) t (fma -2.0 b x)) a))
                (t_2 (+ z (* (- (+ y t) 2.0) b))))
           (if (<= b -1.1e+180)
             t_2
             (if (<= b -300000000.0)
               t_1
               (if (<= b 3.6e-8)
                 (- (+ x a) (* (- y 1.0) z))
                 (if (<= b 7e+62) t_1 t_2))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma((b - a), t, fma(-2.0, b, x)) + a;
        	double t_2 = z + (((y + t) - 2.0) * b);
        	double tmp;
        	if (b <= -1.1e+180) {
        		tmp = t_2;
        	} else if (b <= -300000000.0) {
        		tmp = t_1;
        	} else if (b <= 3.6e-8) {
        		tmp = (x + a) - ((y - 1.0) * z);
        	} else if (b <= 7e+62) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(fma(Float64(b - a), t, fma(-2.0, b, x)) + a)
        	t_2 = Float64(z + Float64(Float64(Float64(y + t) - 2.0) * b))
        	tmp = 0.0
        	if (b <= -1.1e+180)
        		tmp = t_2;
        	elseif (b <= -300000000.0)
        		tmp = t_1;
        	elseif (b <= 3.6e-8)
        		tmp = Float64(Float64(x + a) - Float64(Float64(y - 1.0) * z));
        	elseif (b <= 7e+62)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(b - a), $MachinePrecision] * t + N[(-2.0 * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+180], t$95$2, If[LessEqual[b, -300000000.0], t$95$1, If[LessEqual[b, 3.6e-8], N[(N[(x + a), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e+62], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(b - a, t, \mathsf{fma}\left(-2, b, x\right)\right) + a\\
        t_2 := z + \left(\left(y + t\right) - 2\right) \cdot b\\
        \mathbf{if}\;b \leq -1.1 \cdot 10^{+180}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;b \leq -300000000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;b \leq 3.6 \cdot 10^{-8}:\\
        \;\;\;\;\left(x + a\right) - \left(y - 1\right) \cdot z\\
        
        \mathbf{elif}\;b \leq 7 \cdot 10^{+62}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -1.1e180 or 6.99999999999999967e62 < b

          1. Initial program 93.6%

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

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

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

              \[\leadsto z + \left(\left(y + t\right) - 2\right) \cdot b \]
            3. Step-by-step derivation
              1. Applied rewrites90.6%

                \[\leadsto z + \left(\left(y + t\right) - 2\right) \cdot b \]

              if -1.1e180 < b < -3e8 or 3.59999999999999981e-8 < b < 6.99999999999999967e62

              1. Initial program 89.8%

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(b - a, t, x + -2 \cdot b\right) + a \]
                  3. Step-by-step derivation
                    1. Applied rewrites80.1%

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

                    if -3e8 < b < 3.59999999999999981e-8

                    1. Initial program 99.2%

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

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

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

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

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

                      Alternative 4: 32.9% accurate, 0.9× speedup?

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

                        1. Initial program 96.6%

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

                          \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                        4. Step-by-step derivation
                          1. Applied rewrites59.1%

                            \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                          2. Taylor expanded in y around inf

                            \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                          3. Step-by-step derivation
                            1. Applied rewrites59.1%

                              \[\leadsto \left(-y\right) \cdot z \]

                            if -1.68e156 < y < -3.5e-118

                            1. Initial program 100.0%

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

                              \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                            4. Step-by-step derivation
                              1. Applied rewrites47.2%

                                \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]

                              if -3.5e-118 < y < 1.15e-175

                              1. Initial program 97.2%

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

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

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

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

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

                                    \[\leadsto x + a \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites40.3%

                                      \[\leadsto x + a \]

                                    if 1.15e-175 < y < 8.9999999999999999e-132

                                    1. Initial program 87.5%

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

                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites62.7%

                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                      2. Taylor expanded in a around 0

                                        \[\leadsto b \cdot t \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites62.8%

                                          \[\leadsto b \cdot t \]

                                        if 8.9999999999999999e-132 < y < 1.8499999999999999e-35

                                        1. Initial program 95.6%

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

                                          \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites46.0%

                                            \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                          2. Taylor expanded in y around 0

                                            \[\leadsto z \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites46.0%

                                              \[\leadsto z \]

                                            if 1.8499999999999999e-35 < y

                                            1. Initial program 90.3%

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

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

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

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

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

                                                  \[\leadsto b \cdot y + a \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites36.6%

                                                    \[\leadsto b \cdot y + a \]
                                                4. Recombined 6 regimes into one program.
                                                5. Add Preprocessing

                                                Alternative 5: 82.7% accurate, 0.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -350000000:\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(-2, b, x\right)\right) + a\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+62}:\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a b)
                                                 :precision binary64
                                                 (let* ((t_1 (+ z (* (- (+ y t) 2.0) b))))
                                                   (if (<= b -1.1e+180)
                                                     t_1
                                                     (if (<= b -350000000.0)
                                                       (+ (fma (- b a) t (fma -2.0 b x)) a)
                                                       (if (<= b 3.6e+62) (- x (fma (- t 1.0) a (* (- y 1.0) z))) t_1)))))
                                                double code(double x, double y, double z, double t, double a, double b) {
                                                	double t_1 = z + (((y + t) - 2.0) * b);
                                                	double tmp;
                                                	if (b <= -1.1e+180) {
                                                		tmp = t_1;
                                                	} else if (b <= -350000000.0) {
                                                		tmp = fma((b - a), t, fma(-2.0, b, x)) + a;
                                                	} else if (b <= 3.6e+62) {
                                                		tmp = x - fma((t - 1.0), a, ((y - 1.0) * z));
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a, b)
                                                	t_1 = Float64(z + Float64(Float64(Float64(y + t) - 2.0) * b))
                                                	tmp = 0.0
                                                	if (b <= -1.1e+180)
                                                		tmp = t_1;
                                                	elseif (b <= -350000000.0)
                                                		tmp = Float64(fma(Float64(b - a), t, fma(-2.0, b, x)) + a);
                                                	elseif (b <= 3.6e+62)
                                                		tmp = Float64(x - fma(Float64(t - 1.0), a, Float64(Float64(y - 1.0) * z)));
                                                	else
                                                		tmp = t_1;
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+180], t$95$1, If[LessEqual[b, -350000000.0], N[(N[(N[(b - a), $MachinePrecision] * t + N[(-2.0 * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[b, 3.6e+62], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := z + \left(\left(y + t\right) - 2\right) \cdot b\\
                                                \mathbf{if}\;b \leq -1.1 \cdot 10^{+180}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;b \leq -350000000:\\
                                                \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(-2, b, x\right)\right) + a\\
                                                
                                                \mathbf{elif}\;b \leq 3.6 \cdot 10^{+62}:\\
                                                \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if b < -1.1e180 or 3.6e62 < b

                                                  1. Initial program 93.6%

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

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

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

                                                      \[\leadsto z + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites90.6%

                                                        \[\leadsto z + \left(\left(y + t\right) - 2\right) \cdot b \]

                                                      if -1.1e180 < b < -3.5e8

                                                      1. Initial program 86.0%

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(b - a, t, x + -2 \cdot b\right) + a \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites77.6%

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

                                                            if -3.5e8 < b < 3.6e62

                                                            1. Initial program 99.2%

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

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

                                                                \[\leadsto \color{blue}{x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
                                                            5. Recombined 3 regimes into one program.
                                                            6. Add Preprocessing

                                                            Alternative 6: 88.0% accurate, 1.0× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -350000000:\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\\ \mathbf{elif}\;b \leq 46:\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-a, t - 1, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\ \end{array} \end{array} \]
                                                            (FPCore (x y z t a b)
                                                             :precision binary64
                                                             (if (<= b -350000000.0)
                                                               (+ (fma (- b a) t (fma (- y 2.0) b x)) a)
                                                               (if (<= b 46.0)
                                                                 (- x (fma (- t 1.0) a (* (- y 1.0) z)))
                                                                 (fma (- a) (- t 1.0) (fma (- (+ t y) 2.0) b x)))))
                                                            double code(double x, double y, double z, double t, double a, double b) {
                                                            	double tmp;
                                                            	if (b <= -350000000.0) {
                                                            		tmp = fma((b - a), t, fma((y - 2.0), b, x)) + a;
                                                            	} else if (b <= 46.0) {
                                                            		tmp = x - fma((t - 1.0), a, ((y - 1.0) * z));
                                                            	} else {
                                                            		tmp = fma(-a, (t - 1.0), fma(((t + y) - 2.0), b, x));
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(x, y, z, t, a, b)
                                                            	tmp = 0.0
                                                            	if (b <= -350000000.0)
                                                            		tmp = Float64(fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)) + a);
                                                            	elseif (b <= 46.0)
                                                            		tmp = Float64(x - fma(Float64(t - 1.0), a, Float64(Float64(y - 1.0) * z)));
                                                            	else
                                                            		tmp = fma(Float64(-a), Float64(t - 1.0), fma(Float64(Float64(t + y) - 2.0), b, x));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -350000000.0], N[(N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[b, 46.0], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-a) * N[(t - 1.0), $MachinePrecision] + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;b \leq -350000000:\\
                                                            \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\\
                                                            
                                                            \mathbf{elif}\;b \leq 46:\\
                                                            \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(-a, t - 1, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 3 regimes
                                                            2. if b < -3.5e8

                                                              1. Initial program 91.6%

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

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

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

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

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

                                                                  if -3.5e8 < b < 46

                                                                  1. Initial program 99.2%

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

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

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

                                                                    if 46 < b

                                                                    1. Initial program 91.9%

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

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

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

                                                                    Alternative 7: 55.7% accurate, 1.1× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -2.75 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-68}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-254}:\\ \;\;\;\;\left(x + a\right) - \left(-z\right)\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+83}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                    (FPCore (x y z t a b)
                                                                     :precision binary64
                                                                     (let* ((t_1 (* (- b z) y)))
                                                                       (if (<= y -2.75e+41)
                                                                         t_1
                                                                         (if (<= y -6.5e-68)
                                                                           (* (- b a) t)
                                                                           (if (<= y 2.4e-254)
                                                                             (- (+ x a) (- z))
                                                                             (if (<= y 2.05e+83) (fma (- t 2.0) b x) t_1))))))
                                                                    double code(double x, double y, double z, double t, double a, double b) {
                                                                    	double t_1 = (b - z) * y;
                                                                    	double tmp;
                                                                    	if (y <= -2.75e+41) {
                                                                    		tmp = t_1;
                                                                    	} else if (y <= -6.5e-68) {
                                                                    		tmp = (b - a) * t;
                                                                    	} else if (y <= 2.4e-254) {
                                                                    		tmp = (x + a) - -z;
                                                                    	} else if (y <= 2.05e+83) {
                                                                    		tmp = fma((t - 2.0), b, x);
                                                                    	} else {
                                                                    		tmp = t_1;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    function code(x, y, z, t, a, b)
                                                                    	t_1 = Float64(Float64(b - z) * y)
                                                                    	tmp = 0.0
                                                                    	if (y <= -2.75e+41)
                                                                    		tmp = t_1;
                                                                    	elseif (y <= -6.5e-68)
                                                                    		tmp = Float64(Float64(b - a) * t);
                                                                    	elseif (y <= 2.4e-254)
                                                                    		tmp = Float64(Float64(x + a) - Float64(-z));
                                                                    	elseif (y <= 2.05e+83)
                                                                    		tmp = fma(Float64(t - 2.0), b, x);
                                                                    	else
                                                                    		tmp = t_1;
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -2.75e+41], t$95$1, If[LessEqual[y, -6.5e-68], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 2.4e-254], N[(N[(x + a), $MachinePrecision] - (-z)), $MachinePrecision], If[LessEqual[y, 2.05e+83], N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    t_1 := \left(b - z\right) \cdot y\\
                                                                    \mathbf{if}\;y \leq -2.75 \cdot 10^{+41}:\\
                                                                    \;\;\;\;t\_1\\
                                                                    
                                                                    \mathbf{elif}\;y \leq -6.5 \cdot 10^{-68}:\\
                                                                    \;\;\;\;\left(b - a\right) \cdot t\\
                                                                    
                                                                    \mathbf{elif}\;y \leq 2.4 \cdot 10^{-254}:\\
                                                                    \;\;\;\;\left(x + a\right) - \left(-z\right)\\
                                                                    
                                                                    \mathbf{elif}\;y \leq 2.05 \cdot 10^{+83}:\\
                                                                    \;\;\;\;\mathsf{fma}\left(t - 2, b, x\right)\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;t\_1\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 4 regimes
                                                                    2. if y < -2.7500000000000002e41 or 2.05e83 < y

                                                                      1. Initial program 93.3%

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

                                                                        \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                                      4. Step-by-step derivation
                                                                        1. Applied rewrites71.9%

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

                                                                        if -2.7500000000000002e41 < y < -6.4999999999999997e-68

                                                                        1. Initial program 100.0%

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

                                                                          \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                        4. Step-by-step derivation
                                                                          1. Applied rewrites62.8%

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

                                                                          if -6.4999999999999997e-68 < y < 2.40000000000000002e-254

                                                                          1. Initial program 97.1%

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

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

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

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

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

                                                                                \[\leadsto \left(x + a\right) - -1 \cdot \color{blue}{z} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites60.2%

                                                                                  \[\leadsto \left(x + a\right) - \left(-z\right) \]

                                                                                if 2.40000000000000002e-254 < y < 2.05e83

                                                                                1. Initial program 95.4%

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

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

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

                                                                                    \[\leadsto x + \left(\color{blue}{t} - 2\right) \cdot b \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites58.1%

                                                                                      \[\leadsto x + \left(\color{blue}{t} - 2\right) \cdot b \]
                                                                                    2. Step-by-step derivation
                                                                                      1. lift-+.f64N/A

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

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

                                                                                        \[\leadsto \color{blue}{\left(t - 2\right) \cdot b} + x \]
                                                                                      4. lower-fma.f6458.1

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - 2, b, x\right)} \]
                                                                                    3. Applied rewrites58.1%

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - 2, b, x\right)} \]
                                                                                  4. Recombined 4 regimes into one program.
                                                                                  5. Add Preprocessing

                                                                                  Alternative 8: 87.9% accurate, 1.1× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -350000000 \lor \neg \left(b \leq 46\right):\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a b)
                                                                                   :precision binary64
                                                                                   (if (or (<= b -350000000.0) (not (<= b 46.0)))
                                                                                     (+ (fma (- b a) t (fma (- y 2.0) b x)) a)
                                                                                     (- x (fma (- t 1.0) a (* (- y 1.0) z)))))
                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	double tmp;
                                                                                  	if ((b <= -350000000.0) || !(b <= 46.0)) {
                                                                                  		tmp = fma((b - a), t, fma((y - 2.0), b, x)) + a;
                                                                                  	} else {
                                                                                  		tmp = x - fma((t - 1.0), a, ((y - 1.0) * z));
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  function code(x, y, z, t, a, b)
                                                                                  	tmp = 0.0
                                                                                  	if ((b <= -350000000.0) || !(b <= 46.0))
                                                                                  		tmp = Float64(fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)) + a);
                                                                                  	else
                                                                                  		tmp = Float64(x - fma(Float64(t - 1.0), a, Float64(Float64(y - 1.0) * z)));
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -350000000.0], N[Not[LessEqual[b, 46.0]], $MachinePrecision]], N[(N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  \mathbf{if}\;b \leq -350000000 \lor \neg \left(b \leq 46\right):\\
                                                                                  \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if b < -3.5e8 or 46 < b

                                                                                    1. Initial program 91.8%

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

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

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

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

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

                                                                                        if -3.5e8 < b < 46

                                                                                        1. Initial program 99.2%

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

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

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

                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -350000000 \lor \neg \left(b \leq 46\right):\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\ \end{array} \]
                                                                                        7. Add Preprocessing

                                                                                        Alternative 9: 55.3% accurate, 1.1× speedup?

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

                                                                                          1. Initial program 93.3%

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

                                                                                            \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. Applied rewrites71.9%

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

                                                                                            if -2.7500000000000002e41 < y < -6.4999999999999997e-68

                                                                                            1. Initial program 100.0%

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

                                                                                              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. Applied rewrites62.8%

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

                                                                                              if -6.4999999999999997e-68 < y < 6.6000000000000002e-22

                                                                                              1. Initial program 96.5%

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

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

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

                                                                                                  \[\leadsto \left(x + a\right) - \left(\color{blue}{y} - 1\right) \cdot z \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites55.5%

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

                                                                                                    \[\leadsto \left(x + a\right) - -1 \cdot \color{blue}{z} \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites55.5%

                                                                                                      \[\leadsto \left(x + a\right) - \left(-z\right) \]

                                                                                                    if 6.6000000000000002e-22 < y < 2.05e83

                                                                                                    1. Initial program 94.7%

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

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

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

                                                                                                        \[\leadsto x + \color{blue}{t} \cdot b \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites64.4%

                                                                                                          \[\leadsto x + \color{blue}{t} \cdot b \]
                                                                                                      4. Recombined 4 regimes into one program.
                                                                                                      5. Add Preprocessing

                                                                                                      Alternative 10: 50.9% accurate, 1.1× speedup?

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

                                                                                                        1. Initial program 91.8%

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

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

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

                                                                                                          if -4.4000000000000002e31 < t < -1.8e-99

                                                                                                          1. Initial program 96.4%

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

                                                                                                            \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. Applied rewrites54.8%

                                                                                                              \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

                                                                                                            if -1.8e-99 < t < 6.99999999999999966e-237

                                                                                                            1. Initial program 100.0%

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

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

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

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

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

                                                                                                                  \[\leadsto x + a \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites42.9%

                                                                                                                    \[\leadsto x + a \]

                                                                                                                  if 6.99999999999999966e-237 < t < 2.6e16

                                                                                                                  1. Initial program 98.4%

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

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

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

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

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

                                                                                                                        \[\leadsto b \cdot y + a \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites48.7%

                                                                                                                          \[\leadsto b \cdot y + a \]
                                                                                                                      4. Recombined 4 regimes into one program.
                                                                                                                      5. Add Preprocessing

                                                                                                                      Alternative 11: 31.7% accurate, 1.2× speedup?

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

                                                                                                                        1. Initial program 98.1%

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

                                                                                                                          \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                                                                                                        4. Step-by-step derivation
                                                                                                                          1. Applied rewrites45.7%

                                                                                                                            \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                                                          2. Taylor expanded in y around inf

                                                                                                                            \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. Applied rewrites45.7%

                                                                                                                              \[\leadsto \left(-y\right) \cdot z \]

                                                                                                                            if -2.7500000000000002e41 < y < 1.15e-175

                                                                                                                            1. Initial program 98.0%

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

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

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

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

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

                                                                                                                                  \[\leadsto x + a \]
                                                                                                                                3. Step-by-step derivation
                                                                                                                                  1. Applied rewrites38.5%

                                                                                                                                    \[\leadsto x + a \]

                                                                                                                                  if 1.15e-175 < y < 8.9999999999999999e-132

                                                                                                                                  1. Initial program 87.5%

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

                                                                                                                                    \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                  4. Step-by-step derivation
                                                                                                                                    1. Applied rewrites62.7%

                                                                                                                                      \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                                                                                    2. Taylor expanded in a around 0

                                                                                                                                      \[\leadsto b \cdot t \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites62.8%

                                                                                                                                        \[\leadsto b \cdot t \]

                                                                                                                                      if 8.9999999999999999e-132 < y < 1.9000000000000001e-35

                                                                                                                                      1. Initial program 95.6%

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

                                                                                                                                        \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. Applied rewrites46.0%

                                                                                                                                          \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                                                                        2. Taylor expanded in y around 0

                                                                                                                                          \[\leadsto z \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites46.0%

                                                                                                                                            \[\leadsto z \]

                                                                                                                                          if 1.9000000000000001e-35 < y

                                                                                                                                          1. Initial program 90.3%

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

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

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

                                                                                                                                              \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                                                                                                                            3. Step-by-step derivation
                                                                                                                                              1. Applied rewrites49.0%

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

                                                                                                                                                \[\leadsto y \cdot b \]
                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                1. Applied rewrites35.7%

                                                                                                                                                  \[\leadsto y \cdot b \]
                                                                                                                                              4. Recombined 5 regimes into one program.
                                                                                                                                              5. Add Preprocessing

                                                                                                                                              Alternative 12: 61.8% accurate, 1.2× speedup?

                                                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.8 \cdot 10^{+174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -26500000:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{+27}:\\ \;\;\;\;x - \left(y - 1\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                                                                              (FPCore (x y z t a b)
                                                                                                                                               :precision binary64
                                                                                                                                               (let* ((t_1 (* (- (+ t y) 2.0) b)))
                                                                                                                                                 (if (<= b -1.8e+174)
                                                                                                                                                   t_1
                                                                                                                                                   (if (<= b -26500000.0)
                                                                                                                                                     (+ (fma (- y 2.0) b x) a)
                                                                                                                                                     (if (<= b 6.6e+27) (- x (* (- y 1.0) z)) t_1)))))
                                                                                                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                                                                                                              	double t_1 = ((t + y) - 2.0) * b;
                                                                                                                                              	double tmp;
                                                                                                                                              	if (b <= -1.8e+174) {
                                                                                                                                              		tmp = t_1;
                                                                                                                                              	} else if (b <= -26500000.0) {
                                                                                                                                              		tmp = fma((y - 2.0), b, x) + a;
                                                                                                                                              	} else if (b <= 6.6e+27) {
                                                                                                                                              		tmp = x - ((y - 1.0) * z);
                                                                                                                                              	} else {
                                                                                                                                              		tmp = t_1;
                                                                                                                                              	}
                                                                                                                                              	return tmp;
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              function code(x, y, z, t, a, b)
                                                                                                                                              	t_1 = Float64(Float64(Float64(t + y) - 2.0) * b)
                                                                                                                                              	tmp = 0.0
                                                                                                                                              	if (b <= -1.8e+174)
                                                                                                                                              		tmp = t_1;
                                                                                                                                              	elseif (b <= -26500000.0)
                                                                                                                                              		tmp = Float64(fma(Float64(y - 2.0), b, x) + a);
                                                                                                                                              	elseif (b <= 6.6e+27)
                                                                                                                                              		tmp = Float64(x - Float64(Float64(y - 1.0) * z));
                                                                                                                                              	else
                                                                                                                                              		tmp = t_1;
                                                                                                                                              	end
                                                                                                                                              	return tmp
                                                                                                                                              end
                                                                                                                                              
                                                                                                                                              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.8e+174], t$95$1, If[LessEqual[b, -26500000.0], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[b, 6.6e+27], N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                                                                                                              
                                                                                                                                              \begin{array}{l}
                                                                                                                                              
                                                                                                                                              \\
                                                                                                                                              \begin{array}{l}
                                                                                                                                              t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
                                                                                                                                              \mathbf{if}\;b \leq -1.8 \cdot 10^{+174}:\\
                                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                                              
                                                                                                                                              \mathbf{elif}\;b \leq -26500000:\\
                                                                                                                                              \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\
                                                                                                                                              
                                                                                                                                              \mathbf{elif}\;b \leq 6.6 \cdot 10^{+27}:\\
                                                                                                                                              \;\;\;\;x - \left(y - 1\right) \cdot z\\
                                                                                                                                              
                                                                                                                                              \mathbf{else}:\\
                                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                                              
                                                                                                                                              
                                                                                                                                              \end{array}
                                                                                                                                              \end{array}
                                                                                                                                              
                                                                                                                                              Derivation
                                                                                                                                              1. Split input into 3 regimes
                                                                                                                                              2. if b < -1.8000000000000001e174 or 6.5999999999999996e27 < b

                                                                                                                                                1. Initial program 94.0%

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

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

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

                                                                                                                                                  if -1.8000000000000001e174 < b < -2.65e7

                                                                                                                                                  1. Initial program 85.7%

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

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

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

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

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

                                                                                                                                                        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) + a \]
                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites51.3%

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

                                                                                                                                                        if -2.65e7 < b < 6.5999999999999996e27

                                                                                                                                                        1. Initial program 99.2%

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

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

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

                                                                                                                                                            \[\leadsto x - \color{blue}{\left(y - 1\right)} \cdot z \]
                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites66.8%

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

                                                                                                                                                          Alternative 13: 61.5% accurate, 1.2× speedup?

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

                                                                                                                                                            1. Initial program 91.9%

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

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

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

                                                                                                                                                              if -3.9999999999999999e107 < b < -2.99999999999999984e-13

                                                                                                                                                              1. Initial program 89.7%

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

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

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

                                                                                                                                                                  \[\leadsto \left(x + a\right) - \left(\color{blue}{y} - 1\right) \cdot z \]
                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites56.9%

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

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

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

                                                                                                                                                                    if -2.99999999999999984e-13 < b < 6.5999999999999996e27

                                                                                                                                                                    1. Initial program 99.2%

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

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

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

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

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

                                                                                                                                                                      Alternative 14: 61.3% accurate, 1.2× speedup?

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

                                                                                                                                                                        1. Initial program 90.5%

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

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

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

                                                                                                                                                                          if -8.7000000000000005e83 < b < -4.49999999999999996e39

                                                                                                                                                                          1. Initial program 90.9%

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

                                                                                                                                                                            \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                                                                                                                                                                          4. Step-by-step derivation
                                                                                                                                                                            1. Applied rewrites68.1%

                                                                                                                                                                              \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]

                                                                                                                                                                            if -4.49999999999999996e39 < b < 6.5999999999999996e27

                                                                                                                                                                            1. Initial program 99.3%

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

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

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

                                                                                                                                                                                \[\leadsto x - \color{blue}{\left(y - 1\right)} \cdot z \]
                                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                                1. Applied rewrites65.2%

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

                                                                                                                                                                              Alternative 15: 36.5% accurate, 1.4× speedup?

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

                                                                                                                                                                                1. Initial program 84.0%

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

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

                                                                                                                                                                                    \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                                                                                                                                  2. Taylor expanded in a around inf

                                                                                                                                                                                    \[\leadsto \left(-1 \cdot a\right) \cdot t \]
                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                    1. Applied rewrites53.1%

                                                                                                                                                                                      \[\leadsto \left(-a\right) \cdot t \]

                                                                                                                                                                                    if -1e206 < t < -1.6e8 or 2.39999999999999994e102 < t

                                                                                                                                                                                    1. Initial program 94.1%

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

                                                                                                                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                      1. Applied rewrites56.6%

                                                                                                                                                                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                                                                                                                                      2. Taylor expanded in a around 0

                                                                                                                                                                                        \[\leadsto b \cdot t \]
                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                        1. Applied rewrites39.6%

                                                                                                                                                                                          \[\leadsto b \cdot t \]

                                                                                                                                                                                        if -1.6e8 < t < 2.39999999999999994e102

                                                                                                                                                                                        1. Initial program 97.9%

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

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

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

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

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

                                                                                                                                                                                              \[\leadsto b \cdot y + a \]
                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                              1. Applied rewrites38.8%

                                                                                                                                                                                                \[\leadsto b \cdot y + a \]
                                                                                                                                                                                            4. Recombined 3 regimes into one program.
                                                                                                                                                                                            5. Final simplification40.5%

                                                                                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+206}:\\ \;\;\;\;\left(-a\right) \cdot t\\ \mathbf{elif}\;t \leq -160000000 \lor \neg \left(t \leq 2.4 \cdot 10^{+102}\right):\\ \;\;\;\;b \cdot t\\ \mathbf{else}:\\ \;\;\;\;b \cdot y + a\\ \end{array} \]
                                                                                                                                                                                            6. Add Preprocessing

                                                                                                                                                                                            Alternative 16: 71.0% accurate, 1.4× speedup?

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

                                                                                                                                                                                              1. Initial program 92.1%

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

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

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

                                                                                                                                                                                                  \[\leadsto z + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                  1. Applied rewrites82.2%

                                                                                                                                                                                                    \[\leadsto z + \left(\left(y + t\right) - 2\right) \cdot b \]

                                                                                                                                                                                                  if -3.9999999999999999e107 < b < 3.2999999999999998e22

                                                                                                                                                                                                  1. Initial program 97.4%

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

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

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

                                                                                                                                                                                                      \[\leadsto \left(x + a\right) - \left(\color{blue}{y} - 1\right) \cdot z \]
                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                      1. Applied rewrites71.6%

                                                                                                                                                                                                        \[\leadsto \left(x + a\right) - \left(\color{blue}{y} - 1\right) \cdot z \]
                                                                                                                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                                                                                                                    5. Final simplification75.9%

                                                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+107} \lor \neg \left(b \leq 3.3 \cdot 10^{+22}\right):\\ \;\;\;\;z + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x + a\right) - \left(y - 1\right) \cdot z\\ \end{array} \]
                                                                                                                                                                                                    6. Add Preprocessing

                                                                                                                                                                                                    Alternative 17: 71.3% accurate, 1.4× speedup?

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

                                                                                                                                                                                                      1. Initial program 92.6%

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

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

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

                                                                                                                                                                                                        if -3.9999999999999999e107 < b < 66000

                                                                                                                                                                                                        1. Initial program 97.3%

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

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

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

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

                                                                                                                                                                                                              \[\leadsto \left(x + a\right) - \left(\color{blue}{y} - 1\right) \cdot z \]
                                                                                                                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                                                                                                                          5. Final simplification74.7%

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

                                                                                                                                                                                                          Alternative 18: 68.6% accurate, 1.4× speedup?

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

                                                                                                                                                                                                            1. Initial program 92.7%

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

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

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

                                                                                                                                                                                                              if -6.5e134 < b < 3.2999999999999998e22

                                                                                                                                                                                                              1. Initial program 96.9%

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

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

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

                                                                                                                                                                                                                  \[\leadsto \left(x + a\right) - \left(\color{blue}{y} - 1\right) \cdot z \]
                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                  1. Applied rewrites70.9%

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

                                                                                                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.5 \cdot 10^{+134} \lor \neg \left(b \leq 3.3 \cdot 10^{+22}\right):\\ \;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x + a\right) - \left(y - 1\right) \cdot z\\ \end{array} \]
                                                                                                                                                                                                                6. Add Preprocessing

                                                                                                                                                                                                                Alternative 19: 55.2% accurate, 1.4× speedup?

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

                                                                                                                                                                                                                  1. Initial program 93.3%

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

                                                                                                                                                                                                                    \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                                                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                                                                                    1. Applied rewrites71.9%

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

                                                                                                                                                                                                                    if -2.7500000000000002e41 < y < -6.4999999999999997e-68

                                                                                                                                                                                                                    1. Initial program 100.0%

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

                                                                                                                                                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                      1. Applied rewrites62.8%

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

                                                                                                                                                                                                                      if -6.4999999999999997e-68 < y < 6.19999999999999992e67

                                                                                                                                                                                                                      1. Initial program 96.3%

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

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

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

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

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

                                                                                                                                                                                                                            \[\leadsto \left(x + a\right) - -1 \cdot \color{blue}{z} \]
                                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                                            1. Applied rewrites53.2%

                                                                                                                                                                                                                              \[\leadsto \left(x + a\right) - \left(-z\right) \]
                                                                                                                                                                                                                          4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                          5. Add Preprocessing

                                                                                                                                                                                                                          Alternative 20: 50.7% accurate, 1.4× speedup?

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

                                                                                                                                                                                                                            1. Initial program 92.2%

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

                                                                                                                                                                                                                              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                                                                                              1. Applied rewrites62.0%

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

                                                                                                                                                                                                                              if -1.6e8 < t < 3.00000000000000021e-174

                                                                                                                                                                                                                              1. Initial program 97.4%

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

                                                                                                                                                                                                                                \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                                                                                                                                                                                              4. Step-by-step derivation
                                                                                                                                                                                                                                1. Applied rewrites45.3%

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

                                                                                                                                                                                                                                if 3.00000000000000021e-174 < t < 2.6e16

                                                                                                                                                                                                                                1. Initial program 100.0%

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

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

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

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

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

                                                                                                                                                                                                                                      \[\leadsto b \cdot y + a \]
                                                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                                                      1. Applied rewrites48.1%

                                                                                                                                                                                                                                        \[\leadsto b \cdot y + a \]
                                                                                                                                                                                                                                    4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                    5. Add Preprocessing

                                                                                                                                                                                                                                    Alternative 21: 41.4% accurate, 1.4× speedup?

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

                                                                                                                                                                                                                                      1. Initial program 90.9%

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

                                                                                                                                                                                                                                        \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                                                                                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                                                                                                        1. Applied rewrites61.5%

                                                                                                                                                                                                                                          \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

                                                                                                                                                                                                                                        if -9.49999999999999994e79 < z < 6.5999999999999999e-227

                                                                                                                                                                                                                                        1. Initial program 97.8%

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

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

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

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

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

                                                                                                                                                                                                                                              \[\leadsto b \cdot y + a \]
                                                                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                                                                              1. Applied rewrites42.5%

                                                                                                                                                                                                                                                \[\leadsto b \cdot y + a \]

                                                                                                                                                                                                                                              if 6.5999999999999999e-227 < z < 2.6999999999999998e119

                                                                                                                                                                                                                                              1. Initial program 97.4%

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

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

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

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

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

                                                                                                                                                                                                                                                    \[\leadsto x + a \]
                                                                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                                                                    1. Applied rewrites39.9%

                                                                                                                                                                                                                                                      \[\leadsto x + a \]
                                                                                                                                                                                                                                                  4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                                  5. Add Preprocessing

                                                                                                                                                                                                                                                  Alternative 22: 36.3% accurate, 1.5× speedup?

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

                                                                                                                                                                                                                                                    1. Initial program 90.7%

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

                                                                                                                                                                                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                                                      1. Applied rewrites66.6%

                                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                                                                                                                                                                                                      2. Taylor expanded in a around 0

                                                                                                                                                                                                                                                        \[\leadsto b \cdot t \]
                                                                                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                                                                                        1. Applied rewrites41.3%

                                                                                                                                                                                                                                                          \[\leadsto b \cdot t \]

                                                                                                                                                                                                                                                        if -4.95000000000000002e58 < t < 2.50000000000000003e42

                                                                                                                                                                                                                                                        1. Initial program 98.6%

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

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

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

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

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

                                                                                                                                                                                                                                                              \[\leadsto x + a \]
                                                                                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                                                                                              1. Applied rewrites36.5%

                                                                                                                                                                                                                                                                \[\leadsto x + a \]

                                                                                                                                                                                                                                                              if 2.50000000000000003e42 < t < 2.39999999999999994e102

                                                                                                                                                                                                                                                              1. Initial program 92.9%

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

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

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

                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                                  1. Applied rewrites45.0%

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

                                                                                                                                                                                                                                                                    \[\leadsto y \cdot b \]
                                                                                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                                                                                    1. Applied rewrites38.0%

                                                                                                                                                                                                                                                                      \[\leadsto y \cdot b \]
                                                                                                                                                                                                                                                                  4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                                                  5. Add Preprocessing

                                                                                                                                                                                                                                                                  Alternative 23: 36.6% accurate, 2.1× speedup?

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

                                                                                                                                                                                                                                                                    1. Initial program 91.0%

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

                                                                                                                                                                                                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                                                                      1. Applied rewrites64.7%

                                                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                                                                                                                                                                                                                      2. Taylor expanded in a around 0

                                                                                                                                                                                                                                                                        \[\leadsto b \cdot t \]
                                                                                                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                                                                                                        1. Applied rewrites37.2%

                                                                                                                                                                                                                                                                          \[\leadsto b \cdot t \]

                                                                                                                                                                                                                                                                        if -4.95000000000000002e58 < t < 1.60000000000000001e42

                                                                                                                                                                                                                                                                        1. Initial program 98.6%

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

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

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

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

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

                                                                                                                                                                                                                                                                              \[\leadsto x + a \]
                                                                                                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                                                                                                              1. Applied rewrites36.5%

                                                                                                                                                                                                                                                                                \[\leadsto x + a \]
                                                                                                                                                                                                                                                                            4. Recombined 2 regimes into one program.
                                                                                                                                                                                                                                                                            5. Final simplification36.8%

                                                                                                                                                                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.95 \cdot 10^{+58} \lor \neg \left(t \leq 1.6 \cdot 10^{+42}\right):\\ \;\;\;\;b \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]
                                                                                                                                                                                                                                                                            6. Add Preprocessing

                                                                                                                                                                                                                                                                            Alternative 24: 30.1% accurate, 2.3× speedup?

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

                                                                                                                                                                                                                                                                              1. Initial program 90.8%

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

                                                                                                                                                                                                                                                                                \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                                                                                                                                                                                                                                                              4. Step-by-step derivation
                                                                                                                                                                                                                                                                                1. Applied rewrites66.5%

                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                                                                                                                                                                                                                2. Taylor expanded in y around 0

                                                                                                                                                                                                                                                                                  \[\leadsto z \]
                                                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                                                  1. Applied rewrites31.0%

                                                                                                                                                                                                                                                                                    \[\leadsto z \]

                                                                                                                                                                                                                                                                                  if -7.8000000000000001e159 < z < 1.55000000000000004e121

                                                                                                                                                                                                                                                                                  1. Initial program 97.2%

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

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

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

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

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

                                                                                                                                                                                                                                                                                        \[\leadsto x + a \]
                                                                                                                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                                                                                                                        1. Applied rewrites31.9%

                                                                                                                                                                                                                                                                                          \[\leadsto x + a \]
                                                                                                                                                                                                                                                                                      4. Recombined 2 regimes into one program.
                                                                                                                                                                                                                                                                                      5. Final simplification31.7%

                                                                                                                                                                                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+159} \lor \neg \left(z \leq 1.55 \cdot 10^{+121}\right):\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]
                                                                                                                                                                                                                                                                                      6. Add Preprocessing

                                                                                                                                                                                                                                                                                      Alternative 25: 20.7% accurate, 2.8× speedup?

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

                                                                                                                                                                                                                                                                                        1. Initial program 92.1%

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

                                                                                                                                                                                                                                                                                          \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                                                                                                                                                                                                                                                                        4. Step-by-step derivation
                                                                                                                                                                                                                                                                                          1. Applied rewrites53.4%

                                                                                                                                                                                                                                                                                            \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                                                                                                                                                                                                                          2. Taylor expanded in y around 0

                                                                                                                                                                                                                                                                                            \[\leadsto z \]
                                                                                                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                                                                                                            1. Applied rewrites22.6%

                                                                                                                                                                                                                                                                                              \[\leadsto z \]

                                                                                                                                                                                                                                                                                            if -4.49999999999999968e-21 < z < 1.2999999999999999e121

                                                                                                                                                                                                                                                                                            1. Initial program 97.9%

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

                                                                                                                                                                                                                                                                                              \[\leadsto \color{blue}{x} \]
                                                                                                                                                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                                                                                                                                                              1. Applied rewrites24.5%

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

                                                                                                                                                                                                                                                                                            Alternative 26: 16.0% accurate, 37.0× speedup?

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

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

                                                                                                                                                                                                                                                                                              \[\leadsto \color{blue}{x} \]
                                                                                                                                                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                                                                                                                                                              1. Applied rewrites16.2%

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

                                                                                                                                                                                                                                                                                              Reproduce

                                                                                                                                                                                                                                                                                              ?
                                                                                                                                                                                                                                                                                              herbie shell --seed 2025019 
                                                                                                                                                                                                                                                                                              (FPCore (x y z t a b)
                                                                                                                                                                                                                                                                                                :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
                                                                                                                                                                                                                                                                                                :precision binary64
                                                                                                                                                                                                                                                                                                (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))