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

Percentage Accurate: 95.2% → 97.6%
Time: 10.0s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.6% 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 96.9%

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

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

Alternative 2: 43.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(z + x\right) + a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+302)))
     (* b y)
     (+ (+ z x) a))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+302)) {
		tmp = b * y;
	} else {
		tmp = (z + x) + a;
	}
	return tmp;
}
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 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+302)) {
		tmp = b * y;
	} else {
		tmp = (z + x) + a;
	}
	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 <= -math.inf) or not (t_1 <= 5e+302):
		tmp = b * y
	else:
		tmp = (z + x) + a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+302))
		tmp = Float64(b * y);
	else
		tmp = Float64(Float64(z + x) + a);
	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 <= -Inf) || ~((t_1 <= 5e+302)))
		tmp = b * y;
	else
		tmp = (z + x) + a;
	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, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+302]], $MachinePrecision]], N[(b * y), $MachinePrecision], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\left(z + x\right) + a\\


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

    1. Initial program 91.2%

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

        \[\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 rewrites34.2%

          \[\leadsto b \cdot y \]

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

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\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 -\infty \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 5 \cdot 10^{+302}\right):\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(z + x\right) + a\\ \end{array} \]
          6. Add Preprocessing

          Alternative 3: 83.0% accurate, 0.9× speedup?

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

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

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

              if -2.7000000000000002e43 < y < 2.7000000000000002

              1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 1.8999999999999999e189 < y

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

                Alternative 4: 86.6% accurate, 1.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+107} \lor \neg \left(z \leq 1.85 \cdot 10^{+27}\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 -3.8e+107) (not (<= z 1.85e+27)))
                   (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 <= -3.8e+107) || !(z <= 1.85e+27)) {
                		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 <= -3.8e+107) || !(z <= 1.85e+27))
                		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, -3.8e+107], N[Not[LessEqual[z, 1.85e+27]], $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 -3.8 \cdot 10^{+107} \lor \neg \left(z \leq 1.85 \cdot 10^{+27}\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 < -3.7999999999999998e107 or 1.85000000000000001e27 < z

                  1. Initial program 92.7%

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

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

                    if -3.7999999999999998e107 < z < 1.85000000000000001e27

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

                        \[\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 simplification93.1%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+107} \lor \neg \left(z \leq 1.85 \cdot 10^{+27}\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 5: 86.6% accurate, 1.1× speedup?

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

                      1. Initial program 92.7%

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

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

                        if -3.7999999999999998e107 < z < 1.85000000000000001e27

                        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

                      Alternative 6: 79.1% accurate, 1.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+107} \lor \neg \left(z \leq 1.6 \cdot 10^{+27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(-z, y - 1, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-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 -2.9e+107) (not (<= z 1.6e+27)))
                         (fma (- 1.0 t) a (fma (- z) (- y 1.0) x))
                         (fma (- 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 <= -2.9e+107) || !(z <= 1.6e+27)) {
                      		tmp = fma((1.0 - t), a, fma(-z, (y - 1.0), x));
                      	} else {
                      		tmp = fma(-a, t, (fma((y - 2.0), b, x) + a));
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if ((z <= -2.9e+107) || !(z <= 1.6e+27))
                      		tmp = fma(Float64(1.0 - t), a, fma(Float64(-z), Float64(y - 1.0), x));
                      	else
                      		tmp = fma(Float64(-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, -2.9e+107], N[Not[LessEqual[z, 1.6e+27]], $MachinePrecision]], N[(N[(1.0 - t), $MachinePrecision] * a + N[((-z) * N[(y - 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[((-a) * t + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;z \leq -2.9 \cdot 10^{+107} \lor \neg \left(z \leq 1.6 \cdot 10^{+27}\right):\\
                      \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(-z, y - 1, x\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(-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 < -2.89999999999999988e107 or 1.60000000000000008e27 < z

                        1. Initial program 92.7%

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

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

                          if -2.89999999999999988e107 < z < 1.60000000000000008e27

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

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

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

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

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

                            Alternative 7: 84.9% accurate, 1.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.8 \cdot 10^{+98} \lor \neg \left(b \leq 7.2 \cdot 10^{+67}\right):\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\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.8e+98) (not (<= b 7.2e+67)))
                               (fma (- b a) t (fma (- y 2.0) b a))
                               (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.8e+98) || !(b <= 7.2e+67)) {
                            		tmp = fma((b - a), t, fma((y - 2.0), b, a));
                            	} 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.8e+98) || !(b <= 7.2e+67))
                            		tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, a));
                            	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.8e+98], N[Not[LessEqual[b, 7.2e+67]], $MachinePrecision]], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + a), $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.8 \cdot 10^{+98} \lor \neg \left(b \leq 7.2 \cdot 10^{+67}\right):\\
                            \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\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.79999999999999958e98 or 7.1999999999999998e67 < b

                              1. Initial program 96.6%

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

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

                                  if -9.79999999999999958e98 < b < 7.1999999999999998e67

                                  1. Initial program 97.0%

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

                                      \[\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 simplification84.1%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.8 \cdot 10^{+98} \lor \neg \left(b \leq 7.2 \cdot 10^{+67}\right):\\ \;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\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 8: 71.0% accurate, 1.2× speedup?

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

                                    1. Initial program 91.6%

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

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

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

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

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

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

                                        if -2.89999999999999988e107 < z < 7.49999999999999948e111

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

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

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

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

                                          Alternative 9: 55.2% accurate, 1.3× speedup?

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

                                            1. Initial program 92.9%

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

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

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

                                            if -1.02e125 < t < -3.5e-67

                                            1. Initial program 100.0%

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

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

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

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

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

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

                                            if -3.5e-67 < t < 175000

                                            1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 10: 66.8% accurate, 1.4× speedup?

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

                                                  1. Initial program 93.5%

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

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

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

                                                  if -1.02e125 < t < 3.39999999999999998e41

                                                  1. Initial program 98.8%

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

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

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

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

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

                                                    Alternative 11: 55.5% accurate, 1.4× speedup?

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

                                                      1. Initial program 92.7%

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

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

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

                                                      if -1.02e125 < t < -3.5e-67

                                                      1. Initial program 100.0%

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

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

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

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

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

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

                                                      if -3.5e-67 < t < 1.5599999999999999e28

                                                      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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 12: 65.1% accurate, 1.4× speedup?

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

                                                          1. Initial program 86.0%

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

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

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

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

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

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

                                                          if -3e85 < y < 1.1e37

                                                          1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1.1e37 < y

                                                            1. Initial program 98.4%

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

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

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

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

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

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

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

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

                                                            Alternative 13: 65.6% accurate, 1.5× speedup?

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

                                                              1. Initial program 93.3%

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

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

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

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

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

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

                                                              if -3e85 < y < 1.1e37

                                                              1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+85} \lor \neg \left(y \leq 1.1 \cdot 10^{+37}\right):\\ \;\;\;\;\left(b - z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, z\right) + x\\ \end{array} \]
                                                              10. Add Preprocessing

                                                              Alternative 14: 62.5% accurate, 1.5× speedup?

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

                                                                1. Initial program 94.1%

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

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

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

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

                                                                if -2700 < t < 1.5599999999999999e28

                                                                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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  Alternative 15: 56.5% accurate, 1.8× speedup?

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

                                                                    1. Initial program 94.1%

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

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

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

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

                                                                    if -2700 < t < 1.5599999999999999e28

                                                                    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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      Alternative 16: 43.8% accurate, 1.8× speedup?

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

                                                                        1. Initial program 96.4%

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

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

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

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

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

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

                                                                        if -1300 < t < 1.86000000000000009e28

                                                                        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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            if 1.86000000000000009e28 < t

                                                                            1. Initial program 92.2%

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

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

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

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

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

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

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

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

                                                                            Alternative 17: 42.8% accurate, 1.8× speedup?

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

                                                                              1. Initial program 93.1%

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

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

                                                                                  \[\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 rewrites43.6%

                                                                                    \[\leadsto b \cdot t \]

                                                                                  if -3.8000000000000004e131 < t < 1.86000000000000009e28

                                                                                  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \left(x + z\right) + a \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites48.0%

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

                                                                                      if 1.86000000000000009e28 < t

                                                                                      1. Initial program 92.2%

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

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

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

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

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

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

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

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

                                                                                      Alternative 18: 27.6% accurate, 2.1× speedup?

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

                                                                                        1. Initial program 94.0%

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

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

                                                                                              \[\leadsto b \cdot y \]

                                                                                            if -5.1e14 < y < 3.0999999999999999e36

                                                                                            1. Initial program 99.3%

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

                                                                                              \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. +-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 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 rewrites31.9%

                                                                                                \[\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 rewrites21.9%

                                                                                                  \[\leadsto b \cdot t \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Final simplification28.2%

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+14} \lor \neg \left(y \leq 3.1 \cdot 10^{+36}\right):\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \]
                                                                                              6. Add Preprocessing

                                                                                              Alternative 19: 17.2% accurate, 6.2× speedup?

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

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

                                                                                                \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. +-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.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 -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 rewrites35.6%

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

                                                                                                    \[\leadsto b \cdot t \]
                                                                                                  2. Add Preprocessing

                                                                                                  Reproduce

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