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

Percentage Accurate: 95.6% → 97.5%
Time: 9.8s
Alternatives: 20
Speedup: 1.1×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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.6% 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.5% accurate, 1.1× speedup?

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

\\
\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x - \mathsf{fma}\left(y - 1, z, -a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 42.2% 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^{+296}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\ \;\;\;\;\left(a + x\right) + z\\ \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+296) (* b t) (if (<= t_1 2e+300) (+ (+ a x) z) (* 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+296) {
		tmp = b * t;
	} else if (t_1 <= 2e+300) {
		tmp = (a + x) + z;
	} 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+296)) then
        tmp = b * t
    else if (t_1 <= 2d+300) then
        tmp = (a + x) + z
    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+296) {
		tmp = b * t;
	} else if (t_1 <= 2e+300) {
		tmp = (a + x) + z;
	} 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+296:
		tmp = b * t
	elif t_1 <= 2e+300:
		tmp = (a + x) + z
	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+296)
		tmp = Float64(b * t);
	elseif (t_1 <= 2e+300)
		tmp = Float64(Float64(a + x) + z);
	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+296)
		tmp = b * t;
	elseif (t_1 <= 2e+300)
		tmp = (a + x) + z;
	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+296], N[(b * t), $MachinePrecision], If[LessEqual[t$95$1, 2e+300], N[(N[(a + x), $MachinePrecision] + z), $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^{+296}:\\
\;\;\;\;b \cdot t\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;\left(a + x\right) + z\\

\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)) < -5.0000000000000001e296

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto b \cdot t \]

        if -5.0000000000000001e296 < (+.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)) < 2.0000000000000001e300

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.0000000000000001e300 < (+.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 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 3: 32.9% 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^{+296} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+292}\right):\\ \;\;\;\;b \cdot t\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \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 (or (<= t_1 -5e+296) (not (<= t_1 2e+292))) (* b t) (+ z 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 <= -5e+296) || !(t_1 <= 2e+292)) {
              		tmp = b * t;
              	} else {
              		tmp = z + x;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a, b)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: 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+296)) .or. (.not. (t_1 <= 2d+292))) then
                      tmp = b * t
                  else
                      tmp = z + x
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
              	double tmp;
              	if ((t_1 <= -5e+296) || !(t_1 <= 2e+292)) {
              		tmp = b * t;
              	} else {
              		tmp = z + x;
              	}
              	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+296) or not (t_1 <= 2e+292):
              		tmp = b * t
              	else:
              		tmp = z + 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 <= -5e+296) || !(t_1 <= 2e+292))
              		tmp = Float64(b * t);
              	else
              		tmp = Float64(z + x);
              	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+296) || ~((t_1 <= 2e+292)))
              		tmp = b * t;
              	else
              		tmp = z + x;
              	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[Or[LessEqual[t$95$1, -5e+296], N[Not[LessEqual[t$95$1, 2e+292]], $MachinePrecision]], N[(b * t), $MachinePrecision], N[(z + x), $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^{+296} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+292}\right):\\
              \;\;\;\;b \cdot t\\
              
              \mathbf{else}:\\
              \;\;\;\;z + x\\
              
              
              \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)) < -5.0000000000000001e296 or 2e292 < (+.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 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto b \cdot t \]

                    if -5.0000000000000001e296 < (+.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)) < 2e292

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                      12. lower-neg.f6478.9

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

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

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

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

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

                          \[\leadsto \left(a + x\right) + z \]
                        2. Taylor expanded in a around 0

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

                            \[\leadsto z + x \]
                        4. Recombined 2 regimes into one program.
                        5. Final simplification39.4%

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

                        Alternative 4: 86.5% accurate, 0.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\ t_2 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -9.4 \cdot 10^{+213}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.065:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+183}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (fma (- b a) t (+ (fma (- y 2.0) b x) a))) (t_2 (* (- b z) y)))
                           (if (<= y -9.4e+213)
                             t_2
                             (if (<= y -4.7e-13)
                               t_1
                               (if (<= y 0.065)
                                 (fma (- t 2.0) b (- x (fma (- t 1.0) a (- z))))
                                 (if (<= y 6.8e+183) t_1 t_2))))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = fma((b - a), t, (fma((y - 2.0), b, x) + a));
                        	double t_2 = (b - z) * y;
                        	double tmp;
                        	if (y <= -9.4e+213) {
                        		tmp = t_2;
                        	} else if (y <= -4.7e-13) {
                        		tmp = t_1;
                        	} else if (y <= 0.065) {
                        		tmp = fma((t - 2.0), b, (x - fma((t - 1.0), a, -z)));
                        	} else if (y <= 6.8e+183) {
                        		tmp = t_1;
                        	} else {
                        		tmp = t_2;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = fma(Float64(b - a), t, Float64(fma(Float64(y - 2.0), b, x) + a))
                        	t_2 = Float64(Float64(b - z) * y)
                        	tmp = 0.0
                        	if (y <= -9.4e+213)
                        		tmp = t_2;
                        	elseif (y <= -4.7e-13)
                        		tmp = t_1;
                        	elseif (y <= 0.065)
                        		tmp = fma(Float64(t - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(-z))));
                        	elseif (y <= 6.8e+183)
                        		tmp = t_1;
                        	else
                        		tmp = t_2;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -9.4e+213], t$95$2, If[LessEqual[y, -4.7e-13], t$95$1, If[LessEqual[y, 0.065], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+183], t$95$1, t$95$2]]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
                        t_2 := \left(b - z\right) \cdot y\\
                        \mathbf{if}\;y \leq -9.4 \cdot 10^{+213}:\\
                        \;\;\;\;t\_2\\
                        
                        \mathbf{elif}\;y \leq -4.7 \cdot 10^{-13}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;y \leq 0.065:\\
                        \;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\
                        
                        \mathbf{elif}\;y \leq 6.8 \cdot 10^{+183}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_2\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y < -9.3999999999999995e213 or 6.8e183 < y

                          1. Initial program 80.0%

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

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

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

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

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

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

                          if -9.3999999999999995e213 < y < -4.7000000000000002e-13 or 0.065000000000000002 < y < 6.8e183

                          1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -4.7000000000000002e-13 < y < 0.065000000000000002

                            1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                              12. lower-neg.f6498.6

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

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

                          Alternative 5: 66.5% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-59}:\\ \;\;\;\;\mathsf{fma}\left(b - a, t, a + x\right)\\ \mathbf{elif}\;y \leq 1.86 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (- b z) y)))
                             (if (<= y -4.6e+209)
                               t_1
                               (if (<= y -8e-59)
                                 (fma (- b a) t (+ a x))
                                 (if (<= y 1.86e-116)
                                   (fma (- t 2.0) b (+ z x))
                                   (if (<= y 4.7e+94) (fma (- b a) t (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 - z) * y;
                          	double tmp;
                          	if (y <= -4.6e+209) {
                          		tmp = t_1;
                          	} else if (y <= -8e-59) {
                          		tmp = fma((b - a), t, (a + x));
                          	} else if (y <= 1.86e-116) {
                          		tmp = fma((t - 2.0), b, (z + x));
                          	} else if (y <= 4.7e+94) {
                          		tmp = fma((b - a), t, 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 - z) * y)
                          	tmp = 0.0
                          	if (y <= -4.6e+209)
                          		tmp = t_1;
                          	elseif (y <= -8e-59)
                          		tmp = fma(Float64(b - a), t, Float64(a + x));
                          	elseif (y <= 1.86e-116)
                          		tmp = fma(Float64(t - 2.0), b, Float64(z + x));
                          	elseif (y <= 4.7e+94)
                          		tmp = fma(Float64(b - a), t, 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 - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+209], t$95$1, If[LessEqual[y, -8e-59], N[(N[(b - a), $MachinePrecision] * t + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.86e-116], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.7e+94], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left(b - z\right) \cdot y\\
                          \mathbf{if}\;y \leq -4.6 \cdot 10^{+209}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;y \leq -8 \cdot 10^{-59}:\\
                          \;\;\;\;\mathsf{fma}\left(b - a, t, a + x\right)\\
                          
                          \mathbf{elif}\;y \leq 1.86 \cdot 10^{-116}:\\
                          \;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
                          
                          \mathbf{elif}\;y \leq 4.7 \cdot 10^{+94}:\\
                          \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 regimes
                          2. if y < -4.60000000000000019e209 or 4.70000000000000017e94 < y

                            1. Initial program 84.0%

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

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

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

                            if -4.60000000000000019e209 < y < -8.0000000000000002e-59

                            1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -8.0000000000000002e-59 < y < 1.86e-116

                                1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                  12. lower-neg.f6499.0

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

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

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

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

                                  if 1.86e-116 < y < 4.70000000000000017e94

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 6: 88.0% accurate, 0.9× speedup?

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

                                      1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y - 2, b, x - \mathsf{fma}\left(y - 1, z, \color{blue}{\mathsf{neg}\left(a\right)}\right)\right) \]
                                        12. lower-neg.f6487.4

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

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

                                      if -1.9600000000000001e93 < y < -4.7000000000000002e-13

                                      1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -4.7000000000000002e-13 < y < 2.25000000000000003e80

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                          12. lower-neg.f6497.1

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

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

                                      Alternative 7: 67.3% accurate, 1.0× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b - a, t, a + x\right)\\ t_2 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+209}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{+94}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b)
                                       :precision binary64
                                       (let* ((t_1 (fma (- b a) t (+ a x))) (t_2 (* (- b z) y)))
                                         (if (<= y -4.6e+209)
                                           t_2
                                           (if (<= y -8e-59)
                                             t_1
                                             (if (<= y 1.9e-116)
                                               (fma (- t 2.0) b (+ z x))
                                               (if (<= y 4.7e+94) t_1 t_2))))))
                                      double code(double x, double y, double z, double t, double a, double b) {
                                      	double t_1 = fma((b - a), t, (a + x));
                                      	double t_2 = (b - z) * y;
                                      	double tmp;
                                      	if (y <= -4.6e+209) {
                                      		tmp = t_2;
                                      	} else if (y <= -8e-59) {
                                      		tmp = t_1;
                                      	} else if (y <= 1.9e-116) {
                                      		tmp = fma((t - 2.0), b, (z + x));
                                      	} else if (y <= 4.7e+94) {
                                      		tmp = t_1;
                                      	} else {
                                      		tmp = t_2;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a, b)
                                      	t_1 = fma(Float64(b - a), t, Float64(a + x))
                                      	t_2 = Float64(Float64(b - z) * y)
                                      	tmp = 0.0
                                      	if (y <= -4.6e+209)
                                      		tmp = t_2;
                                      	elseif (y <= -8e-59)
                                      		tmp = t_1;
                                      	elseif (y <= 1.9e-116)
                                      		tmp = fma(Float64(t - 2.0), b, Float64(z + x));
                                      	elseif (y <= 4.7e+94)
                                      		tmp = t_1;
                                      	else
                                      		tmp = t_2;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t + N[(a + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+209], t$95$2, If[LessEqual[y, -8e-59], t$95$1, If[LessEqual[y, 1.9e-116], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.7e+94], t$95$1, t$95$2]]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \mathsf{fma}\left(b - a, t, a + x\right)\\
                                      t_2 := \left(b - z\right) \cdot y\\
                                      \mathbf{if}\;y \leq -4.6 \cdot 10^{+209}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      \mathbf{elif}\;y \leq -8 \cdot 10^{-59}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;y \leq 1.9 \cdot 10^{-116}:\\
                                      \;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
                                      
                                      \mathbf{elif}\;y \leq 4.7 \cdot 10^{+94}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if y < -4.60000000000000019e209 or 4.70000000000000017e94 < y

                                        1. Initial program 84.0%

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

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

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

                                        if -4.60000000000000019e209 < y < -8.0000000000000002e-59 or 1.9000000000000001e-116 < y < 4.70000000000000017e94

                                        1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -8.0000000000000002e-59 < y < 1.9000000000000001e-116

                                            1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                              12. lower-neg.f6499.0

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

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

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

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

                                            Alternative 8: 89.7% accurate, 1.0× speedup?

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

                                              1. Initial program 88.9%

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

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

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

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

                                              if -225 < y < 2.25000000000000003e80

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                12. lower-neg.f6497.1

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

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

                                              if 2.25000000000000003e80 < y

                                              1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(y - 2, b, x - \mathsf{fma}\left(y - 1, z, \color{blue}{\mathsf{neg}\left(a\right)}\right)\right) \]
                                                12. lower-neg.f6488.8

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

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

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

                                            Alternative 9: 86.0% accurate, 1.1× speedup?

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

                                              1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if -7.99999999999999987e157 < z < 1.9000000000000001e66

                                                1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 10: 84.9% accurate, 1.1× speedup?

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

                                                  1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -9.4e14 < b < 1.46000000000000008e-5

                                                        1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 11: 73.6% accurate, 1.2× speedup?

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

                                                          1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto x - \mathsf{fma}\left(a, t - 1, z \cdot \color{blue}{\left(y - 1\right)}\right) \]
                                                            4. Applied rewrites76.9%

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

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

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

                                                              if -7.9999999999999994e228 < z < 3.2500000000000001e66

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    if 3.2500000000000001e66 < z

                                                                    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto x - \mathsf{fma}\left(a, t - 1, z \cdot \color{blue}{\left(y - 1\right)}\right) \]
                                                                      4. Applied rewrites91.6%

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

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

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

                                                                      Alternative 12: 73.5% accurate, 1.2× speedup?

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

                                                                        1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto x - \mathsf{fma}\left(a, t - 1, z \cdot \color{blue}{\left(y - 1\right)}\right) \]
                                                                          4. Applied rewrites89.9%

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

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

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

                                                                            if -7.9999999999999994e228 < z < 1.89999999999999982e100

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 13: 57.3% accurate, 1.4× speedup?

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

                                                                                  1. Initial program 86.6%

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

                                                                                    \[\leadsto \color{blue}{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.3

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

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

                                                                                  if -4.5999999999999999e61 < y < 1.61999999999999995e-240

                                                                                  1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    if 1.61999999999999995e-240 < y < 4.5999999999999999e94

                                                                                    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 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--.f6455.8

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

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

                                                                                  Alternative 14: 53.6% accurate, 1.4× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{-241}:\\ \;\;\;\;\left(a + x\right) + z\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+94}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \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 -4.6e+61)
                                                                                       t_1
                                                                                       (if (<= y 6.8e-241)
                                                                                         (+ (+ a x) z)
                                                                                         (if (<= y 4.6e+94) (* (- b a) t) 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 <= -4.6e+61) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (y <= 6.8e-241) {
                                                                                  		tmp = (a + x) + z;
                                                                                  	} else if (y <= 4.6e+94) {
                                                                                  		tmp = (b - a) * t;
                                                                                  	} else {
                                                                                  		tmp = t_1;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  module fmin_fmax_functions
                                                                                      implicit none
                                                                                      private
                                                                                      public fmax
                                                                                      public fmin
                                                                                  
                                                                                      interface fmax
                                                                                          module procedure fmax88
                                                                                          module procedure fmax44
                                                                                          module procedure fmax84
                                                                                          module procedure fmax48
                                                                                      end interface
                                                                                      interface fmin
                                                                                          module procedure fmin88
                                                                                          module procedure fmin44
                                                                                          module procedure fmin84
                                                                                          module procedure fmin48
                                                                                      end interface
                                                                                  contains
                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                      end function
                                                                                  end module
                                                                                  
                                                                                  real(8) function code(x, y, z, t, a, b)
                                                                                  use fmin_fmax_functions
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      real(8), intent (in) :: z
                                                                                      real(8), intent (in) :: t
                                                                                      real(8), intent (in) :: a
                                                                                      real(8), intent (in) :: b
                                                                                      real(8) :: t_1
                                                                                      real(8) :: tmp
                                                                                      t_1 = (b - z) * y
                                                                                      if (y <= (-4.6d+61)) then
                                                                                          tmp = t_1
                                                                                      else if (y <= 6.8d-241) then
                                                                                          tmp = (a + x) + z
                                                                                      else if (y <= 4.6d+94) then
                                                                                          tmp = (b - a) * t
                                                                                      else
                                                                                          tmp = t_1
                                                                                      end if
                                                                                      code = tmp
                                                                                  end function
                                                                                  
                                                                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	double t_1 = (b - z) * y;
                                                                                  	double tmp;
                                                                                  	if (y <= -4.6e+61) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (y <= 6.8e-241) {
                                                                                  		tmp = (a + x) + z;
                                                                                  	} else if (y <= 4.6e+94) {
                                                                                  		tmp = (b - a) * t;
                                                                                  	} else {
                                                                                  		tmp = t_1;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b):
                                                                                  	t_1 = (b - z) * y
                                                                                  	tmp = 0
                                                                                  	if y <= -4.6e+61:
                                                                                  		tmp = t_1
                                                                                  	elif y <= 6.8e-241:
                                                                                  		tmp = (a + x) + z
                                                                                  	elif y <= 4.6e+94:
                                                                                  		tmp = (b - a) * t
                                                                                  	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 <= -4.6e+61)
                                                                                  		tmp = t_1;
                                                                                  	elseif (y <= 6.8e-241)
                                                                                  		tmp = Float64(Float64(a + x) + z);
                                                                                  	elseif (y <= 4.6e+94)
                                                                                  		tmp = Float64(Float64(b - a) * t);
                                                                                  	else
                                                                                  		tmp = t_1;
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                  	t_1 = (b - z) * y;
                                                                                  	tmp = 0.0;
                                                                                  	if (y <= -4.6e+61)
                                                                                  		tmp = t_1;
                                                                                  	elseif (y <= 6.8e-241)
                                                                                  		tmp = (a + x) + z;
                                                                                  	elseif (y <= 4.6e+94)
                                                                                  		tmp = (b - a) * t;
                                                                                  	else
                                                                                  		tmp = t_1;
                                                                                  	end
                                                                                  	tmp_2 = tmp;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+61], t$95$1, If[LessEqual[y, 6.8e-241], N[(N[(a + x), $MachinePrecision] + z), $MachinePrecision], If[LessEqual[y, 4.6e+94], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  t_1 := \left(b - z\right) \cdot y\\
                                                                                  \mathbf{if}\;y \leq -4.6 \cdot 10^{+61}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  \mathbf{elif}\;y \leq 6.8 \cdot 10^{-241}:\\
                                                                                  \;\;\;\;\left(a + x\right) + z\\
                                                                                  
                                                                                  \mathbf{elif}\;y \leq 4.6 \cdot 10^{+94}:\\
                                                                                  \;\;\;\;\left(b - a\right) \cdot t\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 3 regimes
                                                                                  2. if y < -4.5999999999999999e61 or 4.5999999999999999e94 < y

                                                                                    1. Initial program 86.6%

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

                                                                                      \[\leadsto \color{blue}{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.3

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

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

                                                                                    if -4.5999999999999999e61 < y < 6.7999999999999998e-241

                                                                                    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        if 6.7999999999999998e-241 < y < 4.5999999999999999e94

                                                                                        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 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--.f6455.8

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

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

                                                                                      Alternative 15: 66.6% accurate, 1.5× speedup?

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

                                                                                        1. Initial program 84.0%

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

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

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

                                                                                        if -4.60000000000000019e209 < y < 4.70000000000000017e94

                                                                                        1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          Alternative 16: 56.4% accurate, 1.8× speedup?

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

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

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

                                                                                            if -7e14 < t < 3.2e53

                                                                                            1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                              12. lower-neg.f6463.1

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

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

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

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

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

                                                                                                  \[\leadsto \left(a + x\right) + z \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Final simplification59.2%

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+14} \lor \neg \left(t \leq 3.2 \cdot 10^{+53}\right):\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\left(a + x\right) + z\\ \end{array} \]
                                                                                              6. Add Preprocessing

                                                                                              Alternative 17: 45.5% accurate, 1.8× speedup?

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

                                                                                                1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                                  12. lower-neg.f6462.8

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

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

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

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

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

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

                                                                                                    if -9.00000000000000068e127 < b < 1.1e141

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                                      12. lower-neg.f6473.8

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

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

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

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

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

                                                                                                          \[\leadsto \left(a + x\right) + z \]
                                                                                                      4. Recombined 2 regimes into one program.
                                                                                                      5. Final simplification48.4%

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

                                                                                                      Alternative 18: 35.9% accurate, 2.1× speedup?

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

                                                                                                        1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              \[\leadsto b \cdot y \]

                                                                                                            if -1.6999999999999999e55 < y < 3.7000000000000002

                                                                                                            1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                                              12. lower-neg.f6495.5

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

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

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

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

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

                                                                                                                  \[\leadsto \left(a + x\right) + z \]
                                                                                                                2. Taylor expanded in a around 0

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

                                                                                                                    \[\leadsto z + x \]
                                                                                                                4. Recombined 2 regimes into one program.
                                                                                                                5. Final simplification40.9%

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

                                                                                                                Alternative 19: 30.9% accurate, 2.3× speedup?

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

                                                                                                                  1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                      \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                                                    12. lower-neg.f6478.3

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

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

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

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

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

                                                                                                                        \[\leadsto \left(a + x\right) + z \]
                                                                                                                      2. Taylor expanded in a around 0

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

                                                                                                                          \[\leadsto z + x \]

                                                                                                                        if -3.25000000000000004e46 < x < 2.5e14

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                            \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                                                          12. lower-neg.f6464.0

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

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

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

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

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

                                                                                                                              \[\leadsto \left(a + x\right) + z \]
                                                                                                                            2. Taylor expanded in x around 0

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

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

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

                                                                                                                            Alternative 20: 20.8% accurate, 9.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \color{blue}{\mathsf{neg}\left(z\right)}\right)\right) \]
                                                                                                                              12. lower-neg.f6470.4

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

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

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

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

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

                                                                                                                                  \[\leadsto \left(a + x\right) + z \]
                                                                                                                                2. Taylor expanded in x around 0

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

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

                                                                                                                                  Reproduce

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