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

Percentage Accurate: 95.0% → 98.0%
Time: 8.7s
Alternatives: 21
Speedup: 0.9×

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 21 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.0% 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: 98.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_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\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


\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 y around 0

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

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

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

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

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

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

    Alternative 2: 91.9% accurate, 0.9× speedup?

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

      1. Initial program 89.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 x around 0

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

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

      if -2.1999999999999998e-9 < y < 0.125

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(t - 2, b, \left(x - a \cdot \left(t - 1\right)\right) + \color{blue}{1} \cdot z\right) \]
        10. *-lft-identityN/A

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

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

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

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

    Alternative 3: 87.7% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t + y\right) - 2\\ t_2 := \mathsf{fma}\left(t\_1, b, x - \left(y - 1\right) \cdot z\right)\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{-24}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-31}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+166}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(t\_1, b, x\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (- (+ t y) 2.0)) (t_2 (fma t_1 b (- x (* (- y 1.0) z)))))
       (if (<= b -3.5e-24)
         t_2
         (if (<= b 8.5e-31)
           (- (fma (- 1.0 y) z x) (* (- t 1.0) a))
           (if (<= b 2.1e+166) t_2 (fma (- 1.0 t) a (fma t_1 b x)))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (t + y) - 2.0;
    	double t_2 = fma(t_1, b, (x - ((y - 1.0) * z)));
    	double tmp;
    	if (b <= -3.5e-24) {
    		tmp = t_2;
    	} else if (b <= 8.5e-31) {
    		tmp = fma((1.0 - y), z, x) - ((t - 1.0) * a);
    	} else if (b <= 2.1e+166) {
    		tmp = t_2;
    	} else {
    		tmp = fma((1.0 - t), a, fma(t_1, b, x));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(t + y) - 2.0)
    	t_2 = fma(t_1, b, Float64(x - Float64(Float64(y - 1.0) * z)))
    	tmp = 0.0
    	if (b <= -3.5e-24)
    		tmp = t_2;
    	elseif (b <= 8.5e-31)
    		tmp = Float64(fma(Float64(1.0 - y), z, x) - Float64(Float64(t - 1.0) * a));
    	elseif (b <= 2.1e+166)
    		tmp = t_2;
    	else
    		tmp = fma(Float64(1.0 - t), a, fma(t_1, b, x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * b + N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e-24], t$95$2, If[LessEqual[b, 8.5e-31], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.1e+166], t$95$2, N[(N[(1.0 - t), $MachinePrecision] * a + N[(t$95$1 * b + x), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(t + y\right) - 2\\
    t_2 := \mathsf{fma}\left(t\_1, b, x - \left(y - 1\right) \cdot z\right)\\
    \mathbf{if}\;b \leq -3.5 \cdot 10^{-24}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;b \leq 8.5 \cdot 10^{-31}:\\
    \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\\
    
    \mathbf{elif}\;b \leq 2.1 \cdot 10^{+166}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(t\_1, b, x\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < -3.4999999999999996e-24 or 8.5000000000000007e-31 < b < 2.1000000000000001e166

      1. Initial program 88.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 a around 0

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

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

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

          \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right)} \]
        4. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
        5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

      if -3.4999999999999996e-24 < b < 8.5000000000000007e-31

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

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

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

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

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

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

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

        if 2.1000000000000001e166 < b

        1. Initial program 84.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 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. fp-cancel-sub-sign-invN/A

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

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

            \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
          4. associate-*r*N/A

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

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

      Alternative 4: 95.6% accurate, 0.9× speedup?

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

        1. Initial program 95.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 y around 0

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

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

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

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

        if 8.0000000000000004e178 < y

        1. Initial program 70.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 y around 0

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

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

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

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

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

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

        Alternative 5: 86.4% accurate, 1.1× speedup?

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

          1. Initial program 89.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 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. fp-cancel-sub-sign-invN/A

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

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

              \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
            4. associate-*r*N/A

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

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

          if -6.40000000000000025e-24 < b < 1.14999999999999994e117

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

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

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

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

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

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

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

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

          Alternative 6: 84.2% accurate, 1.1× speedup?

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

            1. Initial program 87.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 a around 0

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

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

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

                \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right)} \]
              4. *-commutativeN/A

                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
              5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot z\right) \]
            7. Step-by-step derivation
              1. Applied rewrites83.5%

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

              if -6.40000000000000025e-24 < b < 1.29999999999999997e-20

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

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

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

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

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

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

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

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

              Alternative 7: 36.1% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t\right) \cdot a\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -0.06:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-75}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 440000000:\\ \;\;\;\;\left(-z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* (- t) a)))
                 (if (<= t -2.25e+49)
                   t_1
                   (if (<= t -0.06)
                     (* y b)
                     (if (<= t 6.2e-75) (+ a x) (if (<= t 440000000.0) (* (- z) y) t_1))))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = -t * a;
              	double tmp;
              	if (t <= -2.25e+49) {
              		tmp = t_1;
              	} else if (t <= -0.06) {
              		tmp = y * b;
              	} else if (t <= 6.2e-75) {
              		tmp = a + x;
              	} else if (t <= 440000000.0) {
              		tmp = -z * y;
              	} 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 * a
                  if (t <= (-2.25d+49)) then
                      tmp = t_1
                  else if (t <= (-0.06d0)) then
                      tmp = y * b
                  else if (t <= 6.2d-75) then
                      tmp = a + x
                  else if (t <= 440000000.0d0) then
                      tmp = -z * y
                  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 * a;
              	double tmp;
              	if (t <= -2.25e+49) {
              		tmp = t_1;
              	} else if (t <= -0.06) {
              		tmp = y * b;
              	} else if (t <= 6.2e-75) {
              		tmp = a + x;
              	} else if (t <= 440000000.0) {
              		tmp = -z * y;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = -t * a
              	tmp = 0
              	if t <= -2.25e+49:
              		tmp = t_1
              	elif t <= -0.06:
              		tmp = y * b
              	elif t <= 6.2e-75:
              		tmp = a + x
              	elif t <= 440000000.0:
              		tmp = -z * y
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(Float64(-t) * a)
              	tmp = 0.0
              	if (t <= -2.25e+49)
              		tmp = t_1;
              	elseif (t <= -0.06)
              		tmp = Float64(y * b);
              	elseif (t <= 6.2e-75)
              		tmp = Float64(a + x);
              	elseif (t <= 440000000.0)
              		tmp = Float64(Float64(-z) * y);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = -t * a;
              	tmp = 0.0;
              	if (t <= -2.25e+49)
              		tmp = t_1;
              	elseif (t <= -0.06)
              		tmp = y * b;
              	elseif (t <= 6.2e-75)
              		tmp = a + x;
              	elseif (t <= 440000000.0)
              		tmp = -z * y;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) * a), $MachinePrecision]}, If[LessEqual[t, -2.25e+49], t$95$1, If[LessEqual[t, -0.06], N[(y * b), $MachinePrecision], If[LessEqual[t, 6.2e-75], N[(a + x), $MachinePrecision], If[LessEqual[t, 440000000.0], N[((-z) * y), $MachinePrecision], t$95$1]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(-t\right) \cdot a\\
              \mathbf{if}\;t \leq -2.25 \cdot 10^{+49}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \leq -0.06:\\
              \;\;\;\;y \cdot b\\
              
              \mathbf{elif}\;t \leq 6.2 \cdot 10^{-75}:\\
              \;\;\;\;a + x\\
              
              \mathbf{elif}\;t \leq 440000000:\\
              \;\;\;\;\left(-z\right) \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if t < -2.24999999999999991e49 or 4.4e8 < 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 a around inf

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

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

                    \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                  3. lower--.f6437.5

                    \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                5. Applied rewrites37.5%

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

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

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

                  if -2.24999999999999991e49 < t < -0.059999999999999998

                  1. Initial program 86.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 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. fp-cancel-sub-sign-invN/A

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

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

                      \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    4. associate-*r*N/A

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

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

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

                      \[\leadsto y \cdot \color{blue}{b} \]

                    if -0.059999999999999998 < t < 6.20000000000000013e-75

                    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 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. fp-cancel-sub-sign-invN/A

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

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

                        \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                      4. associate-*r*N/A

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

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

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

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

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

                          \[\leadsto a + x \]

                        if 6.20000000000000013e-75 < t < 4.4e8

                        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 y around inf

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

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

                            \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                          3. lower--.f6472.8

                            \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                        5. Applied rewrites72.8%

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

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

                            \[\leadsto \left(-z\right) \cdot y \]
                        8. Recombined 4 regimes into one program.
                        9. Add Preprocessing

                        Alternative 8: 66.7% accurate, 1.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -7 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-28}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, z\right) + x\\ \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 -7e+61)
                             t_1
                             (if (<= y -1.1e-28)
                               (fma (- 1.0 t) a x)
                               (if (<= y 1.85e+15) (+ (fma (- t 2.0) b z) 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 <= -7e+61) {
                        		tmp = t_1;
                        	} else if (y <= -1.1e-28) {
                        		tmp = fma((1.0 - t), a, x);
                        	} else if (y <= 1.85e+15) {
                        		tmp = fma((t - 2.0), b, z) + 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 <= -7e+61)
                        		tmp = t_1;
                        	elseif (y <= -1.1e-28)
                        		tmp = fma(Float64(1.0 - t), a, x);
                        	elseif (y <= 1.85e+15)
                        		tmp = Float64(fma(Float64(t - 2.0), b, z) + 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, -7e+61], t$95$1, If[LessEqual[y, -1.1e-28], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[y, 1.85e+15], N[(N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(b - z\right) \cdot y\\
                        \mathbf{if}\;y \leq -7 \cdot 10^{+61}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;y \leq -1.1 \cdot 10^{-28}:\\
                        \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
                        
                        \mathbf{elif}\;y \leq 1.85 \cdot 10^{+15}:\\
                        \;\;\;\;\mathsf{fma}\left(t - 2, b, z\right) + x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y < -7.00000000000000036e61 or 1.85e15 < y

                          1. Initial program 87.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 y around inf

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

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

                              \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                            3. lower--.f6472.0

                              \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                          5. Applied rewrites72.0%

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

                          if -7.00000000000000036e61 < y < -1.09999999999999998e-28

                          1. Initial program 99.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 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. fp-cancel-sub-sign-invN/A

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

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

                              \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                            4. associate-*r*N/A

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

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

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

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

                            if -1.09999999999999998e-28 < y < 1.85e15

                            1. Initial program 98.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 a around 0

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

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

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

                                \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right)} \]
                              4. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
                              5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 9: 58.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 -6.4 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-28}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+116}:\\ \;\;\;\;\left(1 - y\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 -6.4e-24)
                                 t_1
                                 (if (<= b 2.9e-28)
                                   (fma (- 1.0 t) a x)
                                   (if (<= b 5.8e+116) (* (- 1.0 y) 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 <= -6.4e-24) {
                            		tmp = t_1;
                            	} else if (b <= 2.9e-28) {
                            		tmp = fma((1.0 - t), a, x);
                            	} else if (b <= 5.8e+116) {
                            		tmp = (1.0 - y) * 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 <= -6.4e-24)
                            		tmp = t_1;
                            	elseif (b <= 2.9e-28)
                            		tmp = fma(Float64(1.0 - t), a, x);
                            	elseif (b <= 5.8e+116)
                            		tmp = Float64(Float64(1.0 - y) * 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, -6.4e-24], t$95$1, If[LessEqual[b, 2.9e-28], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[b, 5.8e+116], N[(N[(1.0 - y), $MachinePrecision] * z), $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 -6.4 \cdot 10^{-24}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;b \leq 2.9 \cdot 10^{-28}:\\
                            \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
                            
                            \mathbf{elif}\;b \leq 5.8 \cdot 10^{+116}:\\
                            \;\;\;\;\left(1 - y\right) \cdot z\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if b < -6.40000000000000025e-24 or 5.8000000000000003e116 < b

                              1. Initial program 89.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 y around 0

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

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

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

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

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

                                  \[\leadsto \left(\mathsf{fma}\left(-2, b, z\right) + \mathsf{fma}\left(b - z, y, x\right)\right) + \color{blue}{a} \]
                                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. *-commutativeN/A

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

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

                                    \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                                  4. lower-+.f6478.3

                                    \[\leadsto \left(\color{blue}{\left(t + y\right)} - 2\right) \cdot b \]
                                4. Applied rewrites78.3%

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

                                if -6.40000000000000025e-24 < b < 2.90000000000000013e-28

                                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 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. fp-cancel-sub-sign-invN/A

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

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

                                    \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                  4. associate-*r*N/A

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

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

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

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

                                  if 2.90000000000000013e-28 < b < 5.8000000000000003e116

                                  1. Initial program 81.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 z around inf

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

                                      \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                    2. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                    3. lower--.f6452.9

                                      \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                  5. Applied rewrites52.9%

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

                                Alternative 10: 73.6% accurate, 1.3× speedup?

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

                                  1. Initial program 88.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 a around 0

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

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

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

                                      \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right)} \]
                                    4. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
                                    5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                                    if -7.2000000000000006e-30 < b < 8e51

                                    1. Initial program 97.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 y around 0

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(1 - y, z, x\right) + a \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification79.2%

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

                                      Alternative 11: 65.2% accurate, 1.4× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -5.9 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-74}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\ \mathbf{elif}\;t \leq 3100000000:\\ \;\;\;\;\left(b - z\right) \cdot y\\ \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 -5.9e+29)
                                           t_1
                                           (if (<= t 4.4e-74)
                                             (+ (fma (- y 2.0) b x) a)
                                             (if (<= t 3100000000.0) (* (- b z) y) 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 <= -5.9e+29) {
                                      		tmp = t_1;
                                      	} else if (t <= 4.4e-74) {
                                      		tmp = fma((y - 2.0), b, x) + a;
                                      	} else if (t <= 3100000000.0) {
                                      		tmp = (b - z) * y;
                                      	} 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 <= -5.9e+29)
                                      		tmp = t_1;
                                      	elseif (t <= 4.4e-74)
                                      		tmp = Float64(fma(Float64(y - 2.0), b, x) + a);
                                      	elseif (t <= 3100000000.0)
                                      		tmp = Float64(Float64(b - z) * y);
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.9e+29], t$95$1, If[LessEqual[t, 4.4e-74], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 3100000000.0], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \left(b - a\right) \cdot t\\
                                      \mathbf{if}\;t \leq -5.9 \cdot 10^{+29}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;t \leq 4.4 \cdot 10^{-74}:\\
                                      \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\
                                      
                                      \mathbf{elif}\;t \leq 3100000000:\\
                                      \;\;\;\;\left(b - z\right) \cdot y\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if t < -5.8999999999999999e29 or 3.1e9 < t

                                        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 t around inf

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

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

                                            \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                          3. lower--.f6463.5

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

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

                                        if -5.8999999999999999e29 < t < 4.40000000000000021e-74

                                        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 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. fp-cancel-sub-sign-invN/A

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

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

                                            \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                          4. associate-*r*N/A

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

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

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

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

                                          if 4.40000000000000021e-74 < t < 3.1e9

                                          1. Initial program 93.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 y around inf

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

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

                                              \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                            3. lower--.f6468.5

                                              \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                                          5. Applied rewrites68.5%

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

                                        Alternative 12: 48.7% accurate, 1.4× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -0.112:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-217}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 3100000000:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \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 -0.112)
                                             t_1
                                             (if (<= t -1.8e-217)
                                               (+ a x)
                                               (if (<= t 3100000000.0) (* (- 1.0 y) z) 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 <= -0.112) {
                                        		tmp = t_1;
                                        	} else if (t <= -1.8e-217) {
                                        		tmp = a + x;
                                        	} else if (t <= 3100000000.0) {
                                        		tmp = (1.0 - y) * 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 - a) * t
                                            if (t <= (-0.112d0)) then
                                                tmp = t_1
                                            else if (t <= (-1.8d-217)) then
                                                tmp = a + x
                                            else if (t <= 3100000000.0d0) then
                                                tmp = (1.0d0 - y) * 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 - a) * t;
                                        	double tmp;
                                        	if (t <= -0.112) {
                                        		tmp = t_1;
                                        	} else if (t <= -1.8e-217) {
                                        		tmp = a + x;
                                        	} else if (t <= 3100000000.0) {
                                        		tmp = (1.0 - y) * z;
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a, b):
                                        	t_1 = (b - a) * t
                                        	tmp = 0
                                        	if t <= -0.112:
                                        		tmp = t_1
                                        	elif t <= -1.8e-217:
                                        		tmp = a + x
                                        	elif t <= 3100000000.0:
                                        		tmp = (1.0 - y) * z
                                        	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 <= -0.112)
                                        		tmp = t_1;
                                        	elseif (t <= -1.8e-217)
                                        		tmp = Float64(a + x);
                                        	elseif (t <= 3100000000.0)
                                        		tmp = Float64(Float64(1.0 - y) * z);
                                        	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 <= -0.112)
                                        		tmp = t_1;
                                        	elseif (t <= -1.8e-217)
                                        		tmp = a + x;
                                        	elseif (t <= 3100000000.0)
                                        		tmp = (1.0 - y) * z;
                                        	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, -0.112], t$95$1, If[LessEqual[t, -1.8e-217], N[(a + x), $MachinePrecision], If[LessEqual[t, 3100000000.0], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left(b - a\right) \cdot t\\
                                        \mathbf{if}\;t \leq -0.112:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;t \leq -1.8 \cdot 10^{-217}:\\
                                        \;\;\;\;a + x\\
                                        
                                        \mathbf{elif}\;t \leq 3100000000:\\
                                        \;\;\;\;\left(1 - y\right) \cdot z\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if t < -0.112000000000000002 or 3.1e9 < t

                                          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 t around inf

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

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

                                              \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                            3. lower--.f6460.7

                                              \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                          5. Applied rewrites60.7%

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

                                          if -0.112000000000000002 < t < -1.79999999999999991e-217

                                          1. Initial program 97.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 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. fp-cancel-sub-sign-invN/A

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

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

                                              \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                            4. associate-*r*N/A

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

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

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

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

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

                                                \[\leadsto a + x \]

                                              if -1.79999999999999991e-217 < t < 3.1e9

                                              1. Initial program 97.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 z around inf

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

                                                  \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                3. lower--.f6443.8

                                                  \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                              5. Applied rewrites43.8%

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

                                            Alternative 13: 37.3% accurate, 1.4× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - t\right) \cdot a\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-159}:\\ \;\;\;\;\left(-z\right) \cdot y\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{+97}:\\ \;\;\;\;\left(y - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b)
                                             :precision binary64
                                             (let* ((t_1 (* (- 1.0 t) a)))
                                               (if (<= a -3.8e+57)
                                                 t_1
                                                 (if (<= a -3.4e-159)
                                                   (* (- z) y)
                                                   (if (<= a 9.4e+97) (* (- y 2.0) b) t_1)))))
                                            double code(double x, double y, double z, double t, double a, double b) {
                                            	double t_1 = (1.0 - t) * a;
                                            	double tmp;
                                            	if (a <= -3.8e+57) {
                                            		tmp = t_1;
                                            	} else if (a <= -3.4e-159) {
                                            		tmp = -z * y;
                                            	} else if (a <= 9.4e+97) {
                                            		tmp = (y - 2.0) * 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 = (1.0d0 - t) * a
                                                if (a <= (-3.8d+57)) then
                                                    tmp = t_1
                                                else if (a <= (-3.4d-159)) then
                                                    tmp = -z * y
                                                else if (a <= 9.4d+97) then
                                                    tmp = (y - 2.0d0) * 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 = (1.0 - t) * a;
                                            	double tmp;
                                            	if (a <= -3.8e+57) {
                                            		tmp = t_1;
                                            	} else if (a <= -3.4e-159) {
                                            		tmp = -z * y;
                                            	} else if (a <= 9.4e+97) {
                                            		tmp = (y - 2.0) * b;
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a, b):
                                            	t_1 = (1.0 - t) * a
                                            	tmp = 0
                                            	if a <= -3.8e+57:
                                            		tmp = t_1
                                            	elif a <= -3.4e-159:
                                            		tmp = -z * y
                                            	elif a <= 9.4e+97:
                                            		tmp = (y - 2.0) * b
                                            	else:
                                            		tmp = t_1
                                            	return tmp
                                            
                                            function code(x, y, z, t, a, b)
                                            	t_1 = Float64(Float64(1.0 - t) * a)
                                            	tmp = 0.0
                                            	if (a <= -3.8e+57)
                                            		tmp = t_1;
                                            	elseif (a <= -3.4e-159)
                                            		tmp = Float64(Float64(-z) * y);
                                            	elseif (a <= 9.4e+97)
                                            		tmp = Float64(Float64(y - 2.0) * b);
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a, b)
                                            	t_1 = (1.0 - t) * a;
                                            	tmp = 0.0;
                                            	if (a <= -3.8e+57)
                                            		tmp = t_1;
                                            	elseif (a <= -3.4e-159)
                                            		tmp = -z * y;
                                            	elseif (a <= 9.4e+97)
                                            		tmp = (y - 2.0) * b;
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -3.8e+57], t$95$1, If[LessEqual[a, -3.4e-159], N[((-z) * y), $MachinePrecision], If[LessEqual[a, 9.4e+97], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_1 := \left(1 - t\right) \cdot a\\
                                            \mathbf{if}\;a \leq -3.8 \cdot 10^{+57}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;a \leq -3.4 \cdot 10^{-159}:\\
                                            \;\;\;\;\left(-z\right) \cdot y\\
                                            
                                            \mathbf{elif}\;a \leq 9.4 \cdot 10^{+97}:\\
                                            \;\;\;\;\left(y - 2\right) \cdot b\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if a < -3.7999999999999999e57 or 9.3999999999999994e97 < a

                                              1. Initial program 89.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. *-commutativeN/A

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

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

                                                  \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                              5. Applied rewrites62.1%

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

                                              if -3.7999999999999999e57 < a < -3.39999999999999984e-159

                                              1. Initial program 96.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 y around inf

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

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

                                                  \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                                3. lower--.f6444.1

                                                  \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                                              5. Applied rewrites44.1%

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

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

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

                                                if -3.39999999999999984e-159 < a < 9.3999999999999994e97

                                                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 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. fp-cancel-sub-sign-invN/A

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

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

                                                    \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                  4. associate-*r*N/A

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

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

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

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

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

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

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

                                                        \[\leadsto \left(y - 2\right) \cdot b \]
                                                    4. Recombined 3 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 14: 36.9% accurate, 1.4× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t\right) \cdot a\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -0.06:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3100000000:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                    (FPCore (x y z t a b)
                                                     :precision binary64
                                                     (let* ((t_1 (* (- t) a)))
                                                       (if (<= t -2.25e+49)
                                                         t_1
                                                         (if (<= t -0.06) (* y b) (if (<= t 3100000000.0) (+ a x) t_1)))))
                                                    double code(double x, double y, double z, double t, double a, double b) {
                                                    	double t_1 = -t * a;
                                                    	double tmp;
                                                    	if (t <= -2.25e+49) {
                                                    		tmp = t_1;
                                                    	} else if (t <= -0.06) {
                                                    		tmp = y * b;
                                                    	} else if (t <= 3100000000.0) {
                                                    		tmp = a + x;
                                                    	} 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 * a
                                                        if (t <= (-2.25d+49)) then
                                                            tmp = t_1
                                                        else if (t <= (-0.06d0)) then
                                                            tmp = y * b
                                                        else if (t <= 3100000000.0d0) then
                                                            tmp = a + x
                                                        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 * a;
                                                    	double tmp;
                                                    	if (t <= -2.25e+49) {
                                                    		tmp = t_1;
                                                    	} else if (t <= -0.06) {
                                                    		tmp = y * b;
                                                    	} else if (t <= 3100000000.0) {
                                                    		tmp = a + x;
                                                    	} else {
                                                    		tmp = t_1;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    def code(x, y, z, t, a, b):
                                                    	t_1 = -t * a
                                                    	tmp = 0
                                                    	if t <= -2.25e+49:
                                                    		tmp = t_1
                                                    	elif t <= -0.06:
                                                    		tmp = y * b
                                                    	elif t <= 3100000000.0:
                                                    		tmp = a + x
                                                    	else:
                                                    		tmp = t_1
                                                    	return tmp
                                                    
                                                    function code(x, y, z, t, a, b)
                                                    	t_1 = Float64(Float64(-t) * a)
                                                    	tmp = 0.0
                                                    	if (t <= -2.25e+49)
                                                    		tmp = t_1;
                                                    	elseif (t <= -0.06)
                                                    		tmp = Float64(y * b);
                                                    	elseif (t <= 3100000000.0)
                                                    		tmp = Float64(a + x);
                                                    	else
                                                    		tmp = t_1;
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    function tmp_2 = code(x, y, z, t, a, b)
                                                    	t_1 = -t * a;
                                                    	tmp = 0.0;
                                                    	if (t <= -2.25e+49)
                                                    		tmp = t_1;
                                                    	elseif (t <= -0.06)
                                                    		tmp = y * b;
                                                    	elseif (t <= 3100000000.0)
                                                    		tmp = a + x;
                                                    	else
                                                    		tmp = t_1;
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) * a), $MachinePrecision]}, If[LessEqual[t, -2.25e+49], t$95$1, If[LessEqual[t, -0.06], N[(y * b), $MachinePrecision], If[LessEqual[t, 3100000000.0], N[(a + x), $MachinePrecision], t$95$1]]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    t_1 := \left(-t\right) \cdot a\\
                                                    \mathbf{if}\;t \leq -2.25 \cdot 10^{+49}:\\
                                                    \;\;\;\;t\_1\\
                                                    
                                                    \mathbf{elif}\;t \leq -0.06:\\
                                                    \;\;\;\;y \cdot b\\
                                                    
                                                    \mathbf{elif}\;t \leq 3100000000:\\
                                                    \;\;\;\;a + x\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;t\_1\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if t < -2.24999999999999991e49 or 3.1e9 < t

                                                      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. *-commutativeN/A

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

                                                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                        3. lower--.f6437.7

                                                          \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                                      5. Applied rewrites37.7%

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

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

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

                                                        if -2.24999999999999991e49 < t < -0.059999999999999998

                                                        1. Initial program 86.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 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. fp-cancel-sub-sign-invN/A

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

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

                                                            \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                          4. associate-*r*N/A

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

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

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

                                                            \[\leadsto y \cdot \color{blue}{b} \]

                                                          if -0.059999999999999998 < t < 3.1e9

                                                          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 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. fp-cancel-sub-sign-invN/A

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

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

                                                              \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                            4. associate-*r*N/A

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

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

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

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

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

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

                                                            Alternative 15: 67.3% accurate, 1.5× speedup?

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

                                                              1. Initial program 89.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 y around 0

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

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

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

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

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

                                                                  \[\leadsto \left(\mathsf{fma}\left(-2, b, z\right) + \mathsf{fma}\left(b - z, y, x\right)\right) + \color{blue}{a} \]
                                                                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. *-commutativeN/A

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

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

                                                                    \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                                                                  4. lower-+.f6479.0

                                                                    \[\leadsto \left(\color{blue}{\left(t + y\right)} - 2\right) \cdot b \]
                                                                4. Applied rewrites79.0%

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

                                                                if -6.40000000000000025e-24 < b < 8.4999999999999997e124

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

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

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

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

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

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

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

                                                                    \[\leadsto \left(x + \left(z + -1 \cdot \left(y \cdot z\right)\right)\right) + a \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites72.4%

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

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

                                                                  Alternative 16: 58.1% accurate, 1.7× speedup?

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

                                                                    1. Initial program 87.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 y around inf

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

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

                                                                        \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                                                      3. lower--.f6472.6

                                                                        \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                                                                    5. Applied rewrites72.6%

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

                                                                    if -7.00000000000000036e61 < y < 7.2e19

                                                                    1. Initial program 98.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 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. fp-cancel-sub-sign-invN/A

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

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

                                                                        \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                      4. associate-*r*N/A

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

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

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

                                                                        \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                                    8. Recombined 2 regimes into one program.
                                                                    9. Final simplification62.0%

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

                                                                    Alternative 17: 51.2% accurate, 1.8× speedup?

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

                                                                      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 y around inf

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

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

                                                                          \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                                                        3. lower--.f6473.5

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

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

                                                                      if -1.9000000000000001e63 < y < 6.59999999999999985e31

                                                                      1. Initial program 98.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. *-commutativeN/A

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

                                                                          \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                        3. lower--.f6444.0

                                                                          \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                                                      5. Applied rewrites44.0%

                                                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                    3. Recombined 2 regimes into one program.
                                                                    4. Final simplification57.8%

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

                                                                    Alternative 18: 41.2% accurate, 1.8× speedup?

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

                                                                      1. Initial program 88.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 z around inf

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

                                                                          \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                        3. lower--.f6458.0

                                                                          \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                                                      5. Applied rewrites58.0%

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

                                                                      if -2.35000000000000007e-20 < z < 2.8999999999999999e130

                                                                      1. Initial program 96.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 a around inf

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

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

                                                                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                        3. lower--.f6438.6

                                                                          \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                                                      5. Applied rewrites38.6%

                                                                        \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                    3. Recombined 2 regimes into one program.
                                                                    4. Final simplification46.7%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{-20} \lor \neg \left(z \leq 2.9 \cdot 10^{+130}\right):\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \end{array} \]
                                                                    5. Add Preprocessing

                                                                    Alternative 19: 33.0% accurate, 1.8× speedup?

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

                                                                      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 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. fp-cancel-sub-sign-invN/A

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

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

                                                                          \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                        4. associate-*r*N/A

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

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

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

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

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

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

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

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

                                                                            if -1.65e45 < b < 1.2e55

                                                                            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 y around inf

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

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

                                                                                \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                                                              3. lower--.f6433.9

                                                                                \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                                                                            5. Applied rewrites33.9%

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

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

                                                                                \[\leadsto \left(-z\right) \cdot y \]
                                                                            8. Recombined 2 regimes into one program.
                                                                            9. Final simplification37.6%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+45} \lor \neg \left(b \leq 1.2 \cdot 10^{+55}\right):\\ \;\;\;\;\left(y - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot y\\ \end{array} \]
                                                                            10. Add Preprocessing

                                                                            Alternative 20: 33.0% accurate, 2.1× speedup?

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

                                                                              1. Initial program 87.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 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. fp-cancel-sub-sign-invN/A

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

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

                                                                                  \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                                4. associate-*r*N/A

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

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

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

                                                                                  \[\leadsto y \cdot \color{blue}{b} \]

                                                                                if -2.0999999999999998e48 < b < 4.80000000000000009e57

                                                                                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 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. fp-cancel-sub-sign-invN/A

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

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

                                                                                    \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                                  4. associate-*r*N/A

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

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

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

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

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

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

                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.1 \cdot 10^{+48} \lor \neg \left(b \leq 4.8 \cdot 10^{+57}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;a + x\\ \end{array} \]
                                                                                  6. Add Preprocessing

                                                                                  Alternative 21: 24.5% accurate, 9.3× speedup?

                                                                                  \[\begin{array}{l} \\ a + x \end{array} \]
                                                                                  (FPCore (x y z t a b) :precision binary64 (+ a x))
                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	return a + 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 = a + x
                                                                                  end function
                                                                                  
                                                                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	return a + x;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b):
                                                                                  	return a + x
                                                                                  
                                                                                  function code(x, y, z, t, a, b)
                                                                                  	return Float64(a + x)
                                                                                  end
                                                                                  
                                                                                  function tmp = code(x, y, z, t, a, b)
                                                                                  	tmp = a + x;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_] := N[(a + x), $MachinePrecision]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  a + x
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  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 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. fp-cancel-sub-sign-invN/A

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

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

                                                                                      \[\leadsto \color{blue}{\left(-1 \cdot a\right)} \cdot \left(t - 1\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                                    4. associate-*r*N/A

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

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

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

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

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

                                                                                        \[\leadsto a + x \]
                                                                                      2. Add Preprocessing

                                                                                      Reproduce

                                                                                      ?
                                                                                      herbie shell --seed 2025016 
                                                                                      (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)))