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

Percentage Accurate: 95.4% → 96.6%
Time: 9.3s
Alternatives: 24
Speedup: 1.1×

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 24 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.4% 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: 96.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(b - a, t, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (fma (- b a) t (- (+ (fma (- y 2.0) b x) a) (* z (- y 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
	return fma((b - a), t, ((fma((y - 2.0), b, x) + a) - (z * (y - 1.0))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(b - a), t, Float64(Float64(fma(Float64(y - 2.0), b, x) + a) - Float64(z * Float64(y - 1.0))))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b - a), $MachinePrecision] * t + N[(N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(b - a, t, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right)
\end{array}
Derivation
  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 t around 0

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

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

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

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

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

    Alternative 2: 91.9% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+20}:\\ \;\;\;\;\left(\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\right) - \left(-z\right)\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-51}:\\ \;\;\;\;\left(\mathsf{fma}\left(-2, b, \mathsf{fma}\left(b - z, y, z\right)\right) + x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(-z, y, z\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= t -1.1e+20)
       (- (+ (fma (- b a) t (fma (- y 2.0) b x)) a) (- z))
       (if (<= t 7.2e-51)
         (+ (+ (fma -2.0 b (fma (- b z) y z)) x) a)
         (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b (fma (- z) y z))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (t <= -1.1e+20) {
    		tmp = (fma((b - a), t, fma((y - 2.0), b, x)) + a) - -z;
    	} else if (t <= 7.2e-51) {
    		tmp = (fma(-2.0, b, fma((b - z), y, z)) + x) + a;
    	} else {
    		tmp = fma((1.0 - t), a, fma(((t + y) - 2.0), b, fma(-z, y, z)));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (t <= -1.1e+20)
    		tmp = Float64(Float64(fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)) + a) - Float64(-z));
    	elseif (t <= 7.2e-51)
    		tmp = Float64(Float64(fma(-2.0, b, fma(Float64(b - z), y, z)) + x) + a);
    	else
    		tmp = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, fma(Float64(-z), y, z)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.1e+20], N[(N[(N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] - (-z)), $MachinePrecision], If[LessEqual[t, 7.2e-51], N[(N[(N[(-2.0 * b + N[(N[(b - z), $MachinePrecision] * y + z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + a), $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]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t \leq -1.1 \cdot 10^{+20}:\\
    \;\;\;\;\left(\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\right) - \left(-z\right)\\
    
    \mathbf{elif}\;t \leq 7.2 \cdot 10^{-51}:\\
    \;\;\;\;\left(\mathsf{fma}\left(-2, b, \mathsf{fma}\left(b - z, y, z\right)\right) + x\right) + a\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(-z, y, z\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.1e20

      1. Initial program 92.8%

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

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

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

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

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

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

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

        if -1.1e20 < t < 7.2000000000000001e-51

        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 rewrites100.0%

          \[\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 rewrites99.3%

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

          if 7.2000000000000001e-51 < t

          1. Initial program 92.9%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. Add Preprocessing
          3. Taylor expanded in 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 rewrites94.5%

            \[\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)} \]
        8. Recombined 3 regimes into one program.
        9. Add Preprocessing

        Alternative 3: 89.6% accurate, 0.9× speedup?

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(b - a, t, y \cdot \left(b - z\right)\right) \]
            3. Step-by-step derivation
              1. Applied rewrites96.5%

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

              if -1.74999999999999994e167 < t < -3.1e20

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

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

              if -3.1e20 < t < 7.2e22

              1. Initial program 99.3%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Add Preprocessing
              3. Taylor expanded in 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.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 rewrites97.8%

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

                if 7.2e22 < t

                1. Initial program 91.0%

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(b - a, t, z \cdot \left(1 - y\right)\right) \]
                  3. Step-by-step derivation
                    1. Applied rewrites86.8%

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

                  Alternative 4: 57.7% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.1 \cdot 10^{+78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{-113}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-42}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+133}:\\ \;\;\;\;\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 (* (- (+ t y) 2.0) b)))
                     (if (<= b -1.1e+78)
                       t_1
                       (if (<= b 3.9e-113)
                         (fma (- 1.0 y) z x)
                         (if (<= b 1.5e-42)
                           (* (- 1.0 t) a)
                           (if (<= b 2.5e+133) (* (- b z) y) t_1))))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = ((t + y) - 2.0) * b;
                  	double tmp;
                  	if (b <= -1.1e+78) {
                  		tmp = t_1;
                  	} else if (b <= 3.9e-113) {
                  		tmp = fma((1.0 - y), z, x);
                  	} else if (b <= 1.5e-42) {
                  		tmp = (1.0 - t) * a;
                  	} else if (b <= 2.5e+133) {
                  		tmp = (b - z) * y;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(Float64(t + y) - 2.0) * b)
                  	tmp = 0.0
                  	if (b <= -1.1e+78)
                  		tmp = t_1;
                  	elseif (b <= 3.9e-113)
                  		tmp = fma(Float64(1.0 - y), z, x);
                  	elseif (b <= 1.5e-42)
                  		tmp = Float64(Float64(1.0 - t) * a);
                  	elseif (b <= 2.5e+133)
                  		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[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.1e+78], t$95$1, If[LessEqual[b, 3.9e-113], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[b, 1.5e-42], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 2.5e+133], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
                  \mathbf{if}\;b \leq -1.1 \cdot 10^{+78}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;b \leq 3.9 \cdot 10^{-113}:\\
                  \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
                  
                  \mathbf{elif}\;b \leq 1.5 \cdot 10^{-42}:\\
                  \;\;\;\;\left(1 - t\right) \cdot a\\
                  
                  \mathbf{elif}\;b \leq 2.5 \cdot 10^{+133}:\\
                  \;\;\;\;\left(b - z\right) \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if b < -1.10000000000000007e78 or 2.4999999999999998e133 < b

                    1. Initial program 88.9%

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                      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-+.f6483.2

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

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

                      if -1.10000000000000007e78 < b < 3.8999999999999999e-113

                      1. Initial program 100.0%

                        \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                      2. Add Preprocessing
                      3. Taylor expanded in 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 rewrites100.0%

                        \[\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}{a \cdot \left(t - 1\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites90.7%

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

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

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

                          if 3.8999999999999999e-113 < b < 1.50000000000000014e-42

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

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

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

                          if 1.50000000000000014e-42 < b < 2.4999999999999998e133

                          1. Initial program 96.9%

                            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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--.f6460.4

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

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

                        Alternative 5: 90.2% accurate, 1.1× speedup?

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

                          1. Initial program 91.9%

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

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

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

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

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

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

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

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

                              if -3.1e20 < t < 7.2e22

                              1. Initial program 99.3%

                                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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.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 rewrites97.8%

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

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

                              Alternative 6: 91.1% accurate, 1.1× speedup?

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

                                1. Initial program 92.8%

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

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

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

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

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

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

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

                                  if -1.1e20 < t < 7.2e22

                                  1. Initial program 99.3%

                                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in 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.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 rewrites97.8%

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

                                    if 7.2e22 < t

                                    1. Initial program 91.0%

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(b - a, t, z \cdot \left(1 - y\right)\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites86.8%

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

                                      Alternative 7: 82.0% accurate, 1.1× speedup?

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

                                        1. Initial program 90.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 inf

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

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

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

                                            \[\leadsto \color{blue}{\left(-1 \cdot z\right) \cdot y} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                          4. mul-1-negN/A

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

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

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

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

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

                                            \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b} + \left(-z\right) \cdot y \]
                                          4. lower-fma.f6482.8

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

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

                                        if -1.35e93 < b < 1.4e21

                                        1. Initial program 99.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 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.9%

                                          \[\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}{a \cdot \left(t - 1\right)} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites89.8%

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

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

                                        Alternative 8: 96.4% accurate, 1.1× speedup?

                                        \[\begin{array}{l} \\ \left(\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\right) - \left(y - 1\right) \cdot z \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (- (+ (fma (- b a) t (fma (- y 2.0) b x)) a) (* (- y 1.0) z)))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	return (fma((b - a), t, fma((y - 2.0), b, x)) + a) - ((y - 1.0) * z);
                                        }
                                        
                                        function code(x, y, z, t, a, b)
                                        	return Float64(Float64(fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)) + a) - Float64(Float64(y - 1.0) * z))
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \left(\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right) + a\right) - \left(y - 1\right) \cdot z
                                        \end{array}
                                        
                                        Derivation
                                        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 t around 0

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

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

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

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

                                        Alternative 9: 80.6% accurate, 1.2× speedup?

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

                                          1. Initial program 92.1%

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(b - a, t, z \cdot \left(1 - y\right)\right) \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites84.5%

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

                                              if -8.8e14 < t < 2.7500000000000001e22

                                              1. Initial program 99.3%

                                                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in 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.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 rewrites98.4%

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

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

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

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

                                                Alternative 10: 66.3% accurate, 1.2× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-66}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(b, y + -2, x\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a b)
                                                 :precision binary64
                                                 (let* ((t_1 (* (- b a) t)))
                                                   (if (<= t -6e+23)
                                                     t_1
                                                     (if (<= t -5.2e-66)
                                                       (fma (- 1.0 y) z x)
                                                       (if (<= t 1.15e+23) (+ (fma b (+ y -2.0) x) a) t_1)))))
                                                double code(double x, double y, double z, double t, double a, double b) {
                                                	double t_1 = (b - a) * t;
                                                	double tmp;
                                                	if (t <= -6e+23) {
                                                		tmp = t_1;
                                                	} else if (t <= -5.2e-66) {
                                                		tmp = fma((1.0 - y), z, x);
                                                	} else if (t <= 1.15e+23) {
                                                		tmp = fma(b, (y + -2.0), x) + a;
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a, b)
                                                	t_1 = Float64(Float64(b - a) * t)
                                                	tmp = 0.0
                                                	if (t <= -6e+23)
                                                		tmp = t_1;
                                                	elseif (t <= -5.2e-66)
                                                		tmp = fma(Float64(1.0 - y), z, x);
                                                	elseif (t <= 1.15e+23)
                                                		tmp = Float64(fma(b, Float64(y + -2.0), x) + a);
                                                	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, -6e+23], t$95$1, If[LessEqual[t, -5.2e-66], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 1.15e+23], N[(N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \left(b - a\right) \cdot t\\
                                                \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;t \leq -5.2 \cdot 10^{-66}:\\
                                                \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
                                                
                                                \mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\
                                                \;\;\;\;\mathsf{fma}\left(b, y + -2, x\right) + a\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if t < -6.0000000000000002e23 or 1.15e23 < t

                                                  1. Initial program 91.8%

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

                                                    \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                  4. Step-by-step derivation
                                                    1. *-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--.f6467.0

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

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

                                                  if -6.0000000000000002e23 < t < -5.1999999999999998e-66

                                                  1. Initial program 99.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 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 rewrites100.0%

                                                    \[\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}{a \cdot \left(t - 1\right)} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites87.4%

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

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

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

                                                      if -5.1999999999999998e-66 < t < 1.15e23

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

                                                        \[\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 rewrites98.0%

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

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

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

                                                        Alternative 11: 74.8% accurate, 1.2× speedup?

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

                                                          1. Initial program 94.6%

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

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

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

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

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

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

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

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

                                                              if -3.39999999999999991 < y < 8.5e21

                                                              1. Initial program 97.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.6%

                                                                \[\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}{a \cdot \left(t - 1\right)} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites71.3%

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

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

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

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

                                                                Alternative 12: 73.4% accurate, 1.2× speedup?

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

                                                                  1. Initial program 93.7%

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

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

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

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

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

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

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

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

                                                                      if -5.1999999999999998e-66 < t < 1.05000000000000004

                                                                      1. Initial program 99.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 rewrites100.0%

                                                                        \[\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 rewrites99.4%

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

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

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

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

                                                                        Alternative 13: 67.2% accurate, 1.4× speedup?

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

                                                                          1. Initial program 94.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--.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 -9.49999999999999937e22 < y < 2.2000000000000001e25

                                                                          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 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.6%

                                                                            \[\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}{a \cdot \left(t - 1\right)} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites71.5%

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

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

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

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

                                                                            Alternative 14: 54.9% accurate, 1.4× speedup?

                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-283}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+24}:\\ \;\;\;\;\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 -6e+23)
                                                                                 t_1
                                                                                 (if (<= t 3.4e-283)
                                                                                   (fma (- 1.0 y) z x)
                                                                                   (if (<= t 1.4e+24) (* (- 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 <= -6e+23) {
                                                                            		tmp = t_1;
                                                                            	} else if (t <= 3.4e-283) {
                                                                            		tmp = fma((1.0 - y), z, x);
                                                                            	} else if (t <= 1.4e+24) {
                                                                            		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 <= -6e+23)
                                                                            		tmp = t_1;
                                                                            	elseif (t <= 3.4e-283)
                                                                            		tmp = fma(Float64(1.0 - y), z, x);
                                                                            	elseif (t <= 1.4e+24)
                                                                            		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, -6e+23], t$95$1, If[LessEqual[t, 3.4e-283], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 1.4e+24], 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 -6 \cdot 10^{+23}:\\
                                                                            \;\;\;\;t\_1\\
                                                                            
                                                                            \mathbf{elif}\;t \leq 3.4 \cdot 10^{-283}:\\
                                                                            \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
                                                                            
                                                                            \mathbf{elif}\;t \leq 1.4 \cdot 10^{+24}:\\
                                                                            \;\;\;\;\left(b - z\right) \cdot y\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;t\_1\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 3 regimes
                                                                            2. if t < -6.0000000000000002e23 or 1.4000000000000001e24 < t

                                                                              1. Initial program 91.8%

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

                                                                                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                              4. Step-by-step derivation
                                                                                1. *-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--.f6467.0

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

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

                                                                              if -6.0000000000000002e23 < t < 3.3999999999999998e-283

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

                                                                                \[\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}{a \cdot \left(t - 1\right)} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites76.0%

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

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

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

                                                                                  if 3.3999999999999998e-283 < t < 1.4000000000000001e24

                                                                                  1. Initial program 100.0%

                                                                                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in 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--.f6450.0

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

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

                                                                                Alternative 15: 48.5% accurate, 1.4× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-167}:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+22}:\\ \;\;\;\;\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 (* (- b a) t)))
                                                                                   (if (<= t -6e+23)
                                                                                     t_1
                                                                                     (if (<= t -5.8e-167)
                                                                                       (* (- 1.0 y) z)
                                                                                       (if (<= t 6.8e+22) (* (- y 2.0) b) 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 <= -6e+23) {
                                                                                		tmp = t_1;
                                                                                	} else if (t <= -5.8e-167) {
                                                                                		tmp = (1.0 - y) * z;
                                                                                	} else if (t <= 6.8e+22) {
                                                                                		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 = (b - a) * t
                                                                                    if (t <= (-6d+23)) then
                                                                                        tmp = t_1
                                                                                    else if (t <= (-5.8d-167)) then
                                                                                        tmp = (1.0d0 - y) * z
                                                                                    else if (t <= 6.8d+22) 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 = (b - a) * t;
                                                                                	double tmp;
                                                                                	if (t <= -6e+23) {
                                                                                		tmp = t_1;
                                                                                	} else if (t <= -5.8e-167) {
                                                                                		tmp = (1.0 - y) * z;
                                                                                	} else if (t <= 6.8e+22) {
                                                                                		tmp = (y - 2.0) * b;
                                                                                	} else {
                                                                                		tmp = t_1;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                def code(x, y, z, t, a, b):
                                                                                	t_1 = (b - a) * t
                                                                                	tmp = 0
                                                                                	if t <= -6e+23:
                                                                                		tmp = t_1
                                                                                	elif t <= -5.8e-167:
                                                                                		tmp = (1.0 - y) * z
                                                                                	elif t <= 6.8e+22:
                                                                                		tmp = (y - 2.0) * b
                                                                                	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 <= -6e+23)
                                                                                		tmp = t_1;
                                                                                	elseif (t <= -5.8e-167)
                                                                                		tmp = Float64(Float64(1.0 - y) * z);
                                                                                	elseif (t <= 6.8e+22)
                                                                                		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 = (b - a) * t;
                                                                                	tmp = 0.0;
                                                                                	if (t <= -6e+23)
                                                                                		tmp = t_1;
                                                                                	elseif (t <= -5.8e-167)
                                                                                		tmp = (1.0 - y) * z;
                                                                                	elseif (t <= 6.8e+22)
                                                                                		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[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -6e+23], t$95$1, If[LessEqual[t, -5.8e-167], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 6.8e+22], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_1 := \left(b - a\right) \cdot t\\
                                                                                \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\
                                                                                \;\;\;\;t\_1\\
                                                                                
                                                                                \mathbf{elif}\;t \leq -5.8 \cdot 10^{-167}:\\
                                                                                \;\;\;\;\left(1 - y\right) \cdot z\\
                                                                                
                                                                                \mathbf{elif}\;t \leq 6.8 \cdot 10^{+22}:\\
                                                                                \;\;\;\;\left(y - 2\right) \cdot b\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;t\_1\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 3 regimes
                                                                                2. if t < -6.0000000000000002e23 or 6.8e22 < t

                                                                                  1. Initial program 91.8%

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

                                                                                    \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. *-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--.f6467.0

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

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

                                                                                  if -6.0000000000000002e23 < t < -5.80000000000000005e-167

                                                                                  1. Initial program 100.0%

                                                                                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in 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--.f6451.3

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

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

                                                                                  if -5.80000000000000005e-167 < t < 6.8e22

                                                                                  1. Initial program 98.9%

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

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

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

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

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

                                                                                      \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                    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-+.f6438.2

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

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

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

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

                                                                                    Alternative 16: 39.9% accurate, 1.4× speedup?

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

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

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

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

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

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

                                                                                          \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                        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-+.f6484.5

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

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

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

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

                                                                                          if -3.69999999999999987e93 < b < -7.3e-224

                                                                                          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 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--.f6445.2

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

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

                                                                                          if -7.3e-224 < b < 1.4e21

                                                                                          1. Initial program 99.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--.f6447.1

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

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

                                                                                          if 1.4e21 < b

                                                                                          1. Initial program 90.1%

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

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

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

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

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

                                                                                              \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                            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-+.f6463.9

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

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

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

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

                                                                                            Alternative 17: 37.2% accurate, 1.4× speedup?

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

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

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

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

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

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

                                                                                                  \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                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-+.f6484.5

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

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

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

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

                                                                                                  if -3.69999999999999987e93 < b < -4.40000000000000003e-221

                                                                                                  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 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--.f6445.2

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

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

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

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

                                                                                                    if -4.40000000000000003e-221 < b < 1.4e21

                                                                                                    1. Initial program 99.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--.f6447.1

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

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

                                                                                                    if 1.4e21 < b

                                                                                                    1. Initial program 90.1%

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

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

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

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

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

                                                                                                        \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                      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-+.f6463.9

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

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

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

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

                                                                                                      Alternative 18: 32.4% accurate, 1.4× speedup?

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

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

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

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

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

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

                                                                                                            \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                          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-+.f6484.5

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

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

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

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

                                                                                                            if -3.69999999999999987e93 < b < 2.50000000000000007e-207

                                                                                                            1. Initial program 99.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.3

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

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

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

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

                                                                                                              if 2.50000000000000007e-207 < b < 3.1e16

                                                                                                              1. Initial program 99.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--.f6450.4

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

                                                                                                                \[\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 rewrites35.4%

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

                                                                                                                if 3.1e16 < b

                                                                                                                1. Initial program 90.1%

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

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

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

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

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

                                                                                                                    \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                                  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-+.f6463.9

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

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

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

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

                                                                                                                  Alternative 19: 27.0% accurate, 1.4× speedup?

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

                                                                                                                    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 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--.f6449.0

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

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

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

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

                                                                                                                      if -3.69999999999999987e93 < b < 2.50000000000000007e-207

                                                                                                                      1. Initial program 99.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.3

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

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

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

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

                                                                                                                        if 2.50000000000000007e-207 < b < 5.8e18

                                                                                                                        1. Initial program 99.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--.f6450.4

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

                                                                                                                          \[\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 rewrites35.4%

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

                                                                                                                          if 5.8e18 < b

                                                                                                                          1. Initial program 90.1%

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

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

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

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

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

                                                                                                                              \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                                            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-+.f6463.9

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

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

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

                                                                                                                                \[\leadsto b \cdot \color{blue}{y} \]
                                                                                                                            7. Recombined 4 regimes into one program.
                                                                                                                            8. Add Preprocessing

                                                                                                                            Alternative 20: 48.6% accurate, 1.8× speedup?

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

                                                                                                                              1. Initial program 94.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--.f6470.9

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

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

                                                                                                                              if -9.5e20 < y < 104

                                                                                                                              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 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--.f6441.5

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

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

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

                                                                                                                            Alternative 21: 33.8% accurate, 1.8× speedup?

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

                                                                                                                              1. Initial program 94.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 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--.f6445.5

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

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

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

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

                                                                                                                                if -4.2e47 < y < 5.4e15

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

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

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

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

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

                                                                                                                                    \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                                                  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-+.f6434.9

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

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

                                                                                                                                    \[\leadsto \left(t - 2\right) \cdot b \]
                                                                                                                                  6. Step-by-step derivation
                                                                                                                                    1. Applied rewrites32.8%

                                                                                                                                      \[\leadsto \left(t - 2\right) \cdot b \]
                                                                                                                                  7. Recombined 2 regimes into one program.
                                                                                                                                  8. Final simplification38.8%

                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+47} \lor \neg \left(y \leq 5.4 \cdot 10^{+15}\right):\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(t - 2\right) \cdot b\\ \end{array} \]
                                                                                                                                  9. Add Preprocessing

                                                                                                                                  Alternative 22: 27.2% accurate, 1.8× speedup?

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

                                                                                                                                    1. Initial program 91.1%

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

                                                                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                                                                    4. Step-by-step derivation
                                                                                                                                      1. *-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--.f6447.9

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

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

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

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

                                                                                                                                      if -1.25e93 < b < 5.8e18

                                                                                                                                      1. Initial program 99.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--.f6436.8

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

                                                                                                                                        \[\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 rewrites24.5%

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

                                                                                                                                        if 5.8e18 < b

                                                                                                                                        1. Initial program 90.1%

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

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

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

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

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

                                                                                                                                            \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                                                          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-+.f6463.9

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

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

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

                                                                                                                                              \[\leadsto b \cdot \color{blue}{y} \]
                                                                                                                                          7. Recombined 3 regimes into one program.
                                                                                                                                          8. Add Preprocessing

                                                                                                                                          Alternative 23: 26.9% accurate, 2.1× speedup?

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

                                                                                                                                            1. Initial program 91.3%

                                                                                                                                              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                                                                            2. Add Preprocessing
                                                                                                                                            3. Taylor expanded in t around 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--.f6466.9

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

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

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

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

                                                                                                                                              if -7.1999999999999997e23 < t < 1.17999999999999997e44

                                                                                                                                              1. Initial program 99.3%

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

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

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

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

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

                                                                                                                                                  \[\leadsto \mathsf{fma}\left(b - a, \color{blue}{t}, \left(\mathsf{fma}\left(y - 2, b, x\right) + a\right) - z \cdot \left(y - 1\right)\right) \]
                                                                                                                                                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-+.f6432.2

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

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

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

                                                                                                                                                    \[\leadsto b \cdot \color{blue}{y} \]
                                                                                                                                                7. Recombined 2 regimes into one program.
                                                                                                                                                8. Final simplification27.8%

                                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+23} \lor \neg \left(t \leq 1.18 \cdot 10^{+44}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot y\\ \end{array} \]
                                                                                                                                                9. Add Preprocessing

                                                                                                                                                Alternative 24: 17.3% accurate, 6.2× speedup?

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

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

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

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

                                                                                                                                                    \[\leadsto t \cdot \color{blue}{b} \]
                                                                                                                                                  2. Add Preprocessing

                                                                                                                                                  Reproduce

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