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

Percentage Accurate: 95.2% → 97.8%
Time: 10.9s
Alternatives: 21
Speedup: 0.5×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 2: 33.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+302}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
   (if (<= t_1 -5e+302) (* b t) (if (<= t_1 5e+305) (+ a x) (* b y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if (t_1 <= -5e+302) {
		tmp = b * t;
	} else if (t_1 <= 5e+305) {
		tmp = a + x;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
    if (t_1 <= (-5d+302)) then
        tmp = b * t
    else if (t_1 <= 5d+305) then
        tmp = a + x
    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 t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if (t_1 <= -5e+302) {
		tmp = b * t;
	} else if (t_1 <= 5e+305) {
		tmp = a + x;
	} else {
		tmp = b * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
	tmp = 0
	if t_1 <= -5e+302:
		tmp = b * t
	elif t_1 <= 5e+305:
		tmp = a + x
	else:
		tmp = b * y
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (t_1 <= -5e+302)
		tmp = Float64(b * t);
	elseif (t_1 <= 5e+305)
		tmp = Float64(a + x);
	else
		tmp = Float64(b * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (t_1 <= -5e+302)
		tmp = b * t;
	elseif (t_1 <= 5e+305)
		tmp = a + x;
	else
		tmp = b * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+302], N[(b * t), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], N[(a + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;a + x\\

\mathbf{else}:\\
\;\;\;\;b \cdot y\\


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5e302 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 5.00000000000000009e305

        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 0

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto a + x \]

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

            1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

            Alternative 3: 31.9% accurate, 1.0× speedup?

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

              1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -3.99999999999999985e226 < t < -6.79999999999999982 or 8.00000000000000026e139 < t

                  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--.f6467.4

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

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

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

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

                    if -6.79999999999999982 < t < -5.6e-303

                    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto a + x \]

                        if -5.6e-303 < t < 4.9999999999999997e-127

                        1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

                          if 4.9999999999999997e-127 < t < 8.00000000000000026e139

                          1. Initial program 92.1%

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

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

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

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

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

                          Alternative 4: 60.8% accurate, 1.0× speedup?

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

                            1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - z \cdot y\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-+.f6479.8

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

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

                              if -7.2000000000000005e33 < b < -2.19999999999999991e-238 or 8.50000000000000004e-193 < b < 2.30000000000000002e111

                              1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -2.19999999999999991e-238 < b < 8.50000000000000004e-193

                                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 0

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

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

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

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

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

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

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

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

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

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

                                Alternative 5: 57.7% accurate, 1.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-z, y - 1, x\right)\\ t_2 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{+100}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-283}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.92 \cdot 10^{-121}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b)
                                 :precision binary64
                                 (let* ((t_1 (fma (- z) (- y 1.0) x)) (t_2 (* (- b a) t)))
                                   (if (<= t -5.4e+100)
                                     t_2
                                     (if (<= t -4.2e-283)
                                       t_1
                                       (if (<= t 1.92e-121) (fma (- y 2.0) b a) (if (<= t 3e+19) t_1 t_2))))))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	double t_1 = fma(-z, (y - 1.0), x);
                                	double t_2 = (b - a) * t;
                                	double tmp;
                                	if (t <= -5.4e+100) {
                                		tmp = t_2;
                                	} else if (t <= -4.2e-283) {
                                		tmp = t_1;
                                	} else if (t <= 1.92e-121) {
                                		tmp = fma((y - 2.0), b, a);
                                	} else if (t <= 3e+19) {
                                		tmp = t_1;
                                	} else {
                                		tmp = t_2;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b)
                                	t_1 = fma(Float64(-z), Float64(y - 1.0), x)
                                	t_2 = Float64(Float64(b - a) * t)
                                	tmp = 0.0
                                	if (t <= -5.4e+100)
                                		tmp = t_2;
                                	elseif (t <= -4.2e-283)
                                		tmp = t_1;
                                	elseif (t <= 1.92e-121)
                                		tmp = fma(Float64(y - 2.0), b, a);
                                	elseif (t <= 3e+19)
                                		tmp = t_1;
                                	else
                                		tmp = t_2;
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-z) * N[(y - 1.0), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.4e+100], t$95$2, If[LessEqual[t, -4.2e-283], t$95$1, If[LessEqual[t, 1.92e-121], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 3e+19], t$95$1, t$95$2]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \mathsf{fma}\left(-z, y - 1, x\right)\\
                                t_2 := \left(b - a\right) \cdot t\\
                                \mathbf{if}\;t \leq -5.4 \cdot 10^{+100}:\\
                                \;\;\;\;t\_2\\
                                
                                \mathbf{elif}\;t \leq -4.2 \cdot 10^{-283}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t \leq 1.92 \cdot 10^{-121}:\\
                                \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
                                
                                \mathbf{elif}\;t \leq 3 \cdot 10^{+19}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_2\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if t < -5.39999999999999997e100 or 3e19 < t

                                  1. Initial program 91.0%

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

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

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

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

                                  if -5.39999999999999997e100 < t < -4.19999999999999994e-283 or 1.9199999999999999e-121 < t < 3e19

                                  1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -4.19999999999999994e-283 < t < 1.9199999999999999e-121

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 6: 87.6% accurate, 1.0× speedup?

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

                                        1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -4.79999999999999983e32 < z < 2.4499999999999999e95

                                        1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

                                      Alternative 7: 81.7% accurate, 1.1× speedup?

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

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

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

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

                                        if -8.80000000000000058e250 < z < 2.1000000000000001e99

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

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

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

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

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

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

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

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

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

                                        if 2.1000000000000001e99 < z

                                        1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 8: 84.2% accurate, 1.1× speedup?

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

                                          1. Initial program 89.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--.f6492.2

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

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

                                          if -5e175 < y < 6.60000000000000037e-9

                                          1. Initial program 96.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 + b \cdot \left(t - 2\right)\right) - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)} \]
                                          4. Step-by-step derivation
                                            1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 6.60000000000000037e-9 < y

                                          1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 9: 48.0% accurate, 1.1× speedup?

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

                                            1. Initial program 91.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--.f6466.4

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

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

                                            if -6.79999999999999982 < t < -5.6e-303

                                            1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto a + x \]

                                                if -5.6e-303 < t < 4.1999999999999997e-126

                                                1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

                                                  if 4.1999999999999997e-126 < t < 8.2e14

                                                  1. Initial program 94.1%

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

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

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

                                                Alternative 10: 73.1% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -2.7000000000000001e112 < a < 5.60000000000000016e73

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - z \cdot y\right) \]
                                                    8. Recombined 2 regimes into one program.
                                                    9. Final simplification78.0%

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

                                                    Alternative 11: 63.0% accurate, 1.2× speedup?

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

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

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

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

                                                      if -3.9999999999999997e175 < y < -2.20000000000000009e-128

                                                      1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

                                                        if -2.20000000000000009e-128 < y < 1.1000000000000001

                                                        1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 12: 64.7% accurate, 1.2× speedup?

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

                                                          1. Initial program 90.3%

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

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

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

                                                          if -5.39999999999999997e100 < t < -1.4000000000000001e24

                                                          1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if -1.4000000000000001e24 < t < 8.50000000000000033e-27

                                                            1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 13: 56.1% accurate, 1.3× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -3.6 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.55 \cdot 10^{-26}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\ \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 -3.6e+98)
                                                                 t_1
                                                                 (if (<= t -2.55e-26)
                                                                   (fma (- t) a x)
                                                                   (if (<= t 8.5e-27) (fma (- y 2.0) b 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 <= -3.6e+98) {
                                                            		tmp = t_1;
                                                            	} else if (t <= -2.55e-26) {
                                                            		tmp = fma(-t, a, x);
                                                            	} else if (t <= 8.5e-27) {
                                                            		tmp = fma((y - 2.0), b, 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 <= -3.6e+98)
                                                            		tmp = t_1;
                                                            	elseif (t <= -2.55e-26)
                                                            		tmp = fma(Float64(-t), a, x);
                                                            	elseif (t <= 8.5e-27)
                                                            		tmp = fma(Float64(y - 2.0), b, 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, -3.6e+98], t$95$1, If[LessEqual[t, -2.55e-26], N[((-t) * a + x), $MachinePrecision], If[LessEqual[t, 8.5e-27], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], t$95$1]]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            t_1 := \left(b - a\right) \cdot t\\
                                                            \mathbf{if}\;t \leq -3.6 \cdot 10^{+98}:\\
                                                            \;\;\;\;t\_1\\
                                                            
                                                            \mathbf{elif}\;t \leq -2.55 \cdot 10^{-26}:\\
                                                            \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
                                                            
                                                            \mathbf{elif}\;t \leq 8.5 \cdot 10^{-27}:\\
                                                            \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;t\_1\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 3 regimes
                                                            2. if t < -3.59999999999999981e98 or 8.50000000000000033e-27 < t

                                                              1. Initial program 90.4%

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

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

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

                                                              if -3.59999999999999981e98 < t < -2.54999999999999995e-26

                                                              1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if -2.54999999999999995e-26 < t < 8.50000000000000033e-27

                                                                  1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    Alternative 14: 37.5% accurate, 1.4× speedup?

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

                                                                      1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

                                                                        if -9.1999999999999997e169 < y < -1.3999999999999999e-134

                                                                        1. Initial program 97.0%

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

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

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

                                                                        if -1.3999999999999999e-134 < y < 8.00000000000000046e84

                                                                        1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          Alternative 15: 33.7% accurate, 1.5× speedup?

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

                                                                            1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

                                                                              if -7.50000000000000055e209 < y < -1.99999999999999997e67

                                                                              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 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--.f6438.4

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

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

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

                                                                                if -1.99999999999999997e67 < y < 9.5000000000000006e74

                                                                                1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  Alternative 16: 56.0% accurate, 1.7× speedup?

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

                                                                                    1. Initial program 90.9%

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

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

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

                                                                                    if -3.9999999999999997e175 < y < 5.5999999999999995e67

                                                                                    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 17: 49.8% accurate, 1.8× speedup?

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

                                                                                      1. Initial program 91.2%

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

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

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

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

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

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

                                                                                      if -1.7599999999999999e167 < y < 8.5e11

                                                                                      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--.f6444.7

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

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

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

                                                                                    Alternative 18: 46.8% accurate, 1.8× speedup?

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

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

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

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

                                                                                      if -1.5999999999999999e34 < z < 2.84999999999999993e78

                                                                                      1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \mathsf{fma}\left(-t, a, x\right) \]
                                                                                        4. Recombined 2 regimes into one program.
                                                                                        5. Final simplification51.6%

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

                                                                                        Alternative 19: 38.4% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            if -2.90000000000000019e189 < y < 8.00000000000000046e84

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \mathsf{fma}\left(-t, a, x\right) \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Final simplification45.9%

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

                                                                                              Alternative 20: 32.1% accurate, 2.1× speedup?

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

                                                                                                1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  if -2.69999999999999994e189 < y < 9.5000000000000006e74

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    Alternative 21: 23.4% accurate, 9.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        Reproduce

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