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

Percentage Accurate: 95.0% → 97.0%
Time: 5.4s
Alternatives: 27
Speedup: 1.0×

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}

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 27 alternatives:

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

Initial Program: 95.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.0% accurate, 1.0× speedup?

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

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

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Step-by-step derivation
    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - t\_1\right)\\

\mathbf{elif}\;t \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.6999999999999998e77

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
      16. lower-neg.f6496.2

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

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

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

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

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

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

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

        \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
      6. lower--.f64N/A

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

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

    if -2.6999999999999998e77 < t < 2.2999999999999998

    1. Initial program 95.0%

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

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    3. Step-by-step derivation
      1. sub-negate-revN/A

        \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
      2. mul-1-negN/A

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

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

        \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
      6. sub-negate-revN/A

        \[\leadsto \left(1 - t\right) \cdot a \]
      7. lower--.f6428.1

        \[\leadsto \left(1 - t\right) \cdot a \]
    4. Applied rewrites28.1%

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
      6. *-commutativeN/A

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

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

        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
      9. *-commutativeN/A

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

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

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

    if 2.2999999999999998 < t

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\left(\mathsf{neg}\left(z \cdot y\right)\right) + x\right) - -1 \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
      10. distribute-lft-neg-inN/A

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

        \[\leadsto \left(\left(\left(\left(-1 \cdot z\right) \cdot y + x\right) - -1 \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
      12. lower-fma.f64N/A

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

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

        \[\leadsto \left(\left(\mathsf{fma}\left(-z, y, x\right) - -1 \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
      15. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{fma}\left(-z, y, x\right) - \left(\mathsf{neg}\left(z\right)\right)\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
      16. lower-neg.f6477.6

        \[\leadsto \left(\left(\mathsf{fma}\left(-z, y, x\right) - \left(-z\right)\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
    7. Applied rewrites77.6%

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

Alternative 3: 89.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) - t\_1\right)\\

\mathbf{elif}\;t \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.6999999999999998e77

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
      16. lower-neg.f6496.2

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

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

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

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

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

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

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

        \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
      6. lower--.f64N/A

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

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

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

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

      if -2.6999999999999998e77 < t < 2.2999999999999998

      1. Initial program 95.0%

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

        \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
      3. Step-by-step derivation
        1. sub-negate-revN/A

          \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
        2. mul-1-negN/A

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

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

          \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
        5. mul-1-negN/A

          \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
        6. sub-negate-revN/A

          \[\leadsto \left(1 - t\right) \cdot a \]
        7. lower--.f6428.1

          \[\leadsto \left(1 - t\right) \cdot a \]
      4. Applied rewrites28.1%

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

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

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

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

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

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

          \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
        6. *-commutativeN/A

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

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

          \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
        9. *-commutativeN/A

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

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

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

      if 2.2999999999999998 < t

      1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\left(\mathsf{neg}\left(z \cdot y\right)\right) + x\right) - -1 \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
        10. distribute-lft-neg-inN/A

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

          \[\leadsto \left(\left(\left(\left(-1 \cdot z\right) \cdot y + x\right) - -1 \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
        12. lower-fma.f64N/A

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

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

          \[\leadsto \left(\left(\mathsf{fma}\left(-z, y, x\right) - -1 \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
        15. mul-1-negN/A

          \[\leadsto \left(\left(\mathsf{fma}\left(-z, y, x\right) - \left(\mathsf{neg}\left(z\right)\right)\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
        16. lower-neg.f6477.6

          \[\leadsto \left(\left(\mathsf{fma}\left(-z, y, x\right) - \left(-z\right)\right) - \left(t - 1\right) \cdot a\right) + b \cdot t \]
      7. Applied rewrites77.6%

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

    Alternative 4: 89.7% accurate, 0.9× speedup?

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

      1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
        16. lower-neg.f6496.2

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

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

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

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

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

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

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

          \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
        6. lower--.f64N/A

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

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

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

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

        if -2.6999999999999998e77 < t < 2.2999999999999998

        1. Initial program 95.0%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        3. Step-by-step derivation
          1. sub-negate-revN/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          2. mul-1-negN/A

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

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

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(1 - t\right) \cdot a \]
          7. lower--.f6428.1

            \[\leadsto \left(1 - t\right) \cdot a \]
        4. Applied rewrites28.1%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          6. *-commutativeN/A

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          9. *-commutativeN/A

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

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

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

        if 2.2999999999999998 < t

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right)} - \left(\left(t - 1\right) \cdot a - b \cdot t\right) \]
          10. sub-negate-revN/A

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

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

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

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

      Alternative 5: 89.2% accurate, 0.9× speedup?

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

        1. Initial program 95.0%

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

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

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

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

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

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

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

        if -2.6999999999999998e77 < t < 2.2999999999999998

        1. Initial program 95.0%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        3. Step-by-step derivation
          1. sub-negate-revN/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          2. mul-1-negN/A

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

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

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(1 - t\right) \cdot a \]
          7. lower--.f6428.1

            \[\leadsto \left(1 - t\right) \cdot a \]
        4. Applied rewrites28.1%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          6. *-commutativeN/A

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          9. *-commutativeN/A

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

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

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

        if 2.2999999999999998 < t

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right)} - \left(\left(t - 1\right) \cdot a - b \cdot t\right) \]
          10. sub-negate-revN/A

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

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

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

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

      Alternative 6: 89.2% accurate, 1.0× speedup?

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

        1. Initial program 95.0%

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

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

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

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

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

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

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

        if -2.6999999999999998e77 < t < 3.2000000000000002

        1. Initial program 95.0%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        3. Step-by-step derivation
          1. sub-negate-revN/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          2. mul-1-negN/A

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

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

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(1 - t\right) \cdot a \]
          7. lower--.f6428.1

            \[\leadsto \left(1 - t\right) \cdot a \]
        4. Applied rewrites28.1%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          6. *-commutativeN/A

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          9. *-commutativeN/A

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

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

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

      Alternative 7: 87.4% accurate, 1.0× speedup?

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

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - \left(t - 1\right) \cdot a \]
          7. +-commutativeN/A

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

            \[\leadsto \left(1 - y\right) \cdot z + \color{blue}{\left(x - \left(t - 1\right) \cdot a\right)} \]
          9. sub-negate-revN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          10. mul-1-negN/A

            \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          11. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y - 1\right)\right), z, x - \left(t - 1\right) \cdot a\right) \]
          13. sub-negate-revN/A

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

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a\right) \]
          16. sub-negate-revN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 - t\right) \cdot a\right) \]
          17. sub-flipN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a\right) \]
          18. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + a \cdot \left(1 + -1 \cdot t\right)\right) \]
        10. Applied rewrites67.8%

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

        if -5.60000000000000023e123 < z < 0.00559999999999999994

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

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

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

        if 0.00559999999999999994 < z

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 86.7% accurate, 0.9× speedup?

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

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{-1 \cdot \left(a \cdot t\right)}\right) \]
        5. Step-by-step derivation
          1. associate-*r*N/A

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \]
          4. lift-neg.f6451.0

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-a\right) \cdot t\right) \]
        6. Applied rewrites51.0%

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

        if -5.3999999999999999e79 < t < 3.4999999999999999e-9

        1. Initial program 95.0%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        3. Step-by-step derivation
          1. sub-negate-revN/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          2. mul-1-negN/A

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

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

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(1 - t\right) \cdot a \]
          7. lower--.f6428.1

            \[\leadsto \left(1 - t\right) \cdot a \]
        4. Applied rewrites28.1%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          6. *-commutativeN/A

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          9. *-commutativeN/A

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

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

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

        if 3.4999999999999999e-9 < t < 8.9999999999999998e230

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(y - 1\right) \cdot z \]
          11. lift-*.f6473.2

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

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

        if 8.9999999999999998e230 < t

        1. Initial program 95.0%

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

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

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

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

            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          4. lift--.f64N/A

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

            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          6. lift-*.f64N/A

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

            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          8. +-commutativeN/A

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          9. lower-+.f64N/A

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          10. *-commutativeN/A

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

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

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

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

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
          15. lift-*.f6480.7

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
        4. Applied rewrites80.7%

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

          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{neg}\left(\left(\left(t - 1\right) \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(\left(\left(t - 1\right) \cdot a + \left(y - 1\right) \cdot z\right)\right) \]
          4. lower-neg.f64N/A

            \[\leadsto -\left(\left(t - 1\right) \cdot a + \left(y - 1\right) \cdot z\right) \]
          5. *-commutativeN/A

            \[\leadsto -\left(a \cdot \left(t - 1\right) + \left(y - 1\right) \cdot z\right) \]
          6. *-commutativeN/A

            \[\leadsto -\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          7. lower-fma.f64N/A

            \[\leadsto -\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
          8. lift--.f64N/A

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

            \[\leadsto -\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
          10. lift--.f6453.6

            \[\leadsto -\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
        7. Applied rewrites53.6%

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

      Alternative 9: 86.3% accurate, 1.0× speedup?

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

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - \left(t - 1\right) \cdot a \]
          7. +-commutativeN/A

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

            \[\leadsto \left(1 - y\right) \cdot z + \color{blue}{\left(x - \left(t - 1\right) \cdot a\right)} \]
          9. sub-negate-revN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          10. mul-1-negN/A

            \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          11. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y - 1\right)\right), z, x - \left(t - 1\right) \cdot a\right) \]
          13. sub-negate-revN/A

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

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a\right) \]
          16. sub-negate-revN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 - t\right) \cdot a\right) \]
          17. sub-flipN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a\right) \]
          18. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + a \cdot \left(1 + -1 \cdot t\right)\right) \]
        10. Applied rewrites67.8%

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

        if -5.60000000000000023e123 < z < 0.00559999999999999994

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

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

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

        if 0.00559999999999999994 < z

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(y - 1\right) \cdot z \]
          11. lift-*.f6473.2

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

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

      Alternative 10: 85.9% accurate, 1.0× speedup?

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

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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)} \]
        3. Step-by-step derivation
          1. lower--.f64N/A

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

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

            \[\leadsto \left(b \cdot \left(\left(y + t\right) - 2\right) + x\right) - a \cdot \left(t - 1\right) \]
          4. *-commutativeN/A

            \[\leadsto \left(\left(\left(y + t\right) - 2\right) \cdot b + x\right) - a \cdot \left(t - 1\right) \]
          5. lower-fma.f64N/A

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(t - 1\right) \cdot a \]
          11. lift-*.f6473.2

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

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

        if -2.79999999999999987e63 < b < -2.20000000000000012e-104

        1. Initial program 95.0%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        3. Step-by-step derivation
          1. sub-negate-revN/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          2. mul-1-negN/A

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

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

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(1 - t\right) \cdot a \]
          7. lower--.f6428.1

            \[\leadsto \left(1 - t\right) \cdot a \]
        4. Applied rewrites28.1%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          6. *-commutativeN/A

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          9. *-commutativeN/A

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

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

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

        if -2.20000000000000012e-104 < b < 1.42e85

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - \left(t - 1\right) \cdot a \]
          7. +-commutativeN/A

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

            \[\leadsto \left(1 - y\right) \cdot z + \color{blue}{\left(x - \left(t - 1\right) \cdot a\right)} \]
          9. sub-negate-revN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          10. mul-1-negN/A

            \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          11. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y - 1\right)\right), z, x - \left(t - 1\right) \cdot a\right) \]
          13. sub-negate-revN/A

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

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a\right) \]
          16. sub-negate-revN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 - t\right) \cdot a\right) \]
          17. sub-flipN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a\right) \]
          18. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + a \cdot \left(1 + -1 \cdot t\right)\right) \]
        10. Applied rewrites67.8%

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

        if 1.42e85 < b

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot \color{blue}{a}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
        9. Applied rewrites59.7%

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

      Alternative 11: 85.6% accurate, 1.0× speedup?

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

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot \color{blue}{a}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
        9. Applied rewrites59.7%

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

        if -2.95000000000000014e63 < b < -2.20000000000000012e-104

        1. Initial program 95.0%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        3. Step-by-step derivation
          1. sub-negate-revN/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          2. mul-1-negN/A

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

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

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(1 - t\right) \cdot a \]
          7. lower--.f6428.1

            \[\leadsto \left(1 - t\right) \cdot a \]
        4. Applied rewrites28.1%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          6. *-commutativeN/A

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

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

            \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
          9. *-commutativeN/A

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

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

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

        if -2.20000000000000012e-104 < b < 1.42e85

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - \left(t - 1\right) \cdot a \]
          7. +-commutativeN/A

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

            \[\leadsto \left(1 - y\right) \cdot z + \color{blue}{\left(x - \left(t - 1\right) \cdot a\right)} \]
          9. sub-negate-revN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          10. mul-1-negN/A

            \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          11. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y - 1\right)\right), z, x - \left(t - 1\right) \cdot a\right) \]
          13. sub-negate-revN/A

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

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a\right) \]
          16. sub-negate-revN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 - t\right) \cdot a\right) \]
          17. sub-flipN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a\right) \]
          18. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + a \cdot \left(1 + -1 \cdot t\right)\right) \]
        10. Applied rewrites67.8%

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

      Alternative 12: 82.3% accurate, 1.2× speedup?

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

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot \color{blue}{a}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
        9. Applied rewrites59.7%

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

        if -9.8000000000000003e146 < b < 1.42e85

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \left(x + \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a \]
          6. sub-negate-revN/A

            \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - \left(t - 1\right) \cdot a \]
          7. +-commutativeN/A

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

            \[\leadsto \left(1 - y\right) \cdot z + \color{blue}{\left(x - \left(t - 1\right) \cdot a\right)} \]
          9. sub-negate-revN/A

            \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          10. mul-1-negN/A

            \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
          11. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y - 1\right)\right), z, x - \left(t - 1\right) \cdot a\right) \]
          13. sub-negate-revN/A

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

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a\right) \]
          16. sub-negate-revN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 - t\right) \cdot a\right) \]
          17. sub-flipN/A

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a\right) \]
          18. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x + a \cdot \left(1 + -1 \cdot t\right)\right) \]
        10. Applied rewrites67.8%

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

      Alternative 13: 71.6% accurate, 1.3× speedup?

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

        1. Initial program 95.0%

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

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

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

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

            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          4. lift--.f64N/A

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

            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          6. lift-*.f64N/A

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

            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          8. +-commutativeN/A

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          9. lower-+.f64N/A

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          10. *-commutativeN/A

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

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

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

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

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
          15. lift-*.f6480.7

            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
        4. Applied rewrites80.7%

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

          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{neg}\left(\left(\left(t - 1\right) \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(\left(\left(t - 1\right) \cdot a + \left(y - 1\right) \cdot z\right)\right) \]
          4. lower-neg.f64N/A

            \[\leadsto -\left(\left(t - 1\right) \cdot a + \left(y - 1\right) \cdot z\right) \]
          5. *-commutativeN/A

            \[\leadsto -\left(a \cdot \left(t - 1\right) + \left(y - 1\right) \cdot z\right) \]
          6. *-commutativeN/A

            \[\leadsto -\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
          7. lower-fma.f64N/A

            \[\leadsto -\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
          8. lift--.f64N/A

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

            \[\leadsto -\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
          10. lift--.f6453.6

            \[\leadsto -\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
        7. Applied rewrites53.6%

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

        if -0.023 < z < 1.60000000000000009e64

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot \color{blue}{a}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
        9. Applied rewrites59.7%

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

        if 1.60000000000000009e64 < z

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        9. Step-by-step derivation
          1. lower-*.f6449.1

            \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        10. Applied rewrites49.1%

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 14: 71.4% accurate, 1.3× speedup?

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

        1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

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

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

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

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

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

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

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

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

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

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

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

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

            \[\leadsto \left(-1 \cdot \left(a \cdot t\right) + a\right) - z \cdot \left(y - 1\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + a\right) - z \cdot \left(y - 1\right) \]
          4. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(-1 \cdot a, t, a\right) - z \cdot \left(y - 1\right) \]
          5. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, a\right) - z \cdot \left(y - 1\right) \]
          6. lift-neg.f64N/A

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

            \[\leadsto \mathsf{fma}\left(-a, t, a\right) - z \cdot \left(y - 1\right) \]
          8. lift--.f6453.2

            \[\leadsto \mathsf{fma}\left(-a, t, a\right) - z \cdot \left(y - 1\right) \]
        10. Applied rewrites53.2%

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

        if -0.023 < z < 1.60000000000000009e64

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
          14. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
          15. lower-+.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
          16. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)}\right) \]
          17. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \left(t - 1\right)}\right) \]
        3. Applied rewrites97.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\right)} \]
        4. Taylor expanded in z around 0

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x - a \cdot \left(t - 1\right)}\right) \]
        5. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \color{blue}{a \cdot \left(t - 1\right)}\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot \color{blue}{a}\right) \]
          3. lift--.f64N/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot \color{blue}{a}\right) \]
        6. Applied rewrites74.2%

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x - \left(t - 1\right) \cdot a}\right) \]
        7. Taylor expanded in t around 0

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot \color{blue}{a}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(\mathsf{neg}\left(a\right)\right)\right) \]
          2. lift-neg.f6459.7

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
        9. Applied rewrites59.7%

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]

        if 1.60000000000000009e64 < z

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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)} \]
        3. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          2. lower-+.f64N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          3. lower--.f64N/A

            \[\leadsto x + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)}\right) \]
          4. +-commutativeN/A

            \[\leadsto x + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto x + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          6. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          7. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          10. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(z \cdot \left(y - 1\right) + \color{blue}{-1 \cdot a}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(\left(y - 1\right) \cdot z + \color{blue}{-1} \cdot a\right)\right) \]
          13. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, \color{blue}{z}, -1 \cdot a\right)\right) \]
          14. lift--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -1 \cdot a\right)\right) \]
          15. mul-1-negN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right) \]
        4. Applied rewrites96.2%

          \[\leadsto \color{blue}{x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right)} \]
        5. Taylor expanded in x around 0

          \[\leadsto \left(a + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \color{blue}{z \cdot \left(y - 1\right)} \]
        6. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto a + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - z \cdot \left(\color{blue}{y} - 1\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \color{blue}{\left(y - 1\right)}\right) \]
        7. Applied rewrites81.5%

          \[\leadsto a + \color{blue}{\left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - \left(y - 1\right) \cdot z\right)} \]
        8. Taylor expanded in y around inf

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        9. Step-by-step derivation
          1. lower-*.f6449.1

            \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        10. Applied rewrites49.1%

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 15: 68.9% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\ \mathbf{if}\;z \leq -0.023:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+64}:\\ \;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ a (- (* b y) (* (- y 1.0) z)))))
         (if (<= z -0.023)
           t_1
           (if (<= z 1.6e+64) (fma (- (+ t y) 2.0) b (- x (- a))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = a + ((b * y) - ((y - 1.0) * z));
      	double tmp;
      	if (z <= -0.023) {
      		tmp = t_1;
      	} else if (z <= 1.6e+64) {
      		tmp = fma(((t + y) - 2.0), b, (x - -a));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(a + Float64(Float64(b * y) - Float64(Float64(y - 1.0) * z)))
      	tmp = 0.0
      	if (z <= -0.023)
      		tmp = t_1;
      	elseif (z <= 1.6e+64)
      		tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(-a)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(N[(b * y), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.023], t$95$1, If[LessEqual[z, 1.6e+64], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\
      \mathbf{if}\;z \leq -0.023:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 1.6 \cdot 10^{+64}:\\
      \;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -0.023 or 1.60000000000000009e64 < z

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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)} \]
        3. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          2. lower-+.f64N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          3. lower--.f64N/A

            \[\leadsto x + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)}\right) \]
          4. +-commutativeN/A

            \[\leadsto x + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto x + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          6. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          7. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          10. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(z \cdot \left(y - 1\right) + \color{blue}{-1 \cdot a}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(\left(y - 1\right) \cdot z + \color{blue}{-1} \cdot a\right)\right) \]
          13. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, \color{blue}{z}, -1 \cdot a\right)\right) \]
          14. lift--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -1 \cdot a\right)\right) \]
          15. mul-1-negN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right) \]
        4. Applied rewrites96.2%

          \[\leadsto \color{blue}{x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right)} \]
        5. Taylor expanded in x around 0

          \[\leadsto \left(a + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \color{blue}{z \cdot \left(y - 1\right)} \]
        6. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto a + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - z \cdot \left(\color{blue}{y} - 1\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \color{blue}{\left(y - 1\right)}\right) \]
        7. Applied rewrites81.5%

          \[\leadsto a + \color{blue}{\left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - \left(y - 1\right) \cdot z\right)} \]
        8. Taylor expanded in y around inf

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        9. Step-by-step derivation
          1. lower-*.f6449.1

            \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        10. Applied rewrites49.1%

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]

        if -0.023 < z < 1.60000000000000009e64

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b} \]
          2. lift--.f64N/A

            \[\leadsto \color{blue}{\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
          3. lift--.f64N/A

            \[\leadsto \left(\color{blue}{\left(x - \left(y - 1\right) \cdot z\right)} - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          4. lift-*.f64N/A

            \[\leadsto \left(\left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          5. lift--.f64N/A

            \[\leadsto \left(\left(x - \color{blue}{\left(y - 1\right)} \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          6. lift-*.f64N/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t - 1\right) \cdot a}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          7. lift--.f64N/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          8. lift-*.f64N/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b} \]
          9. lift-+.f64N/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
          10. lift--.f64N/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{\left(\left(y + t\right) - 2\right)} \cdot b \]
          11. +-commutativeN/A

            \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
          12. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y + t\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
          13. lift--.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
          14. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
          15. lower-+.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
          16. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)}\right) \]
          17. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \left(t - 1\right)}\right) \]
        3. Applied rewrites97.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\right)} \]
        4. Taylor expanded in z around 0

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x - a \cdot \left(t - 1\right)}\right) \]
        5. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \color{blue}{a \cdot \left(t - 1\right)}\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot \color{blue}{a}\right) \]
          3. lift--.f64N/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right) \]
          4. lift-*.f6474.2

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot \color{blue}{a}\right) \]
        6. Applied rewrites74.2%

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x - \left(t - 1\right) \cdot a}\right) \]
        7. Taylor expanded in t around 0

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - -1 \cdot \color{blue}{a}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(\mathsf{neg}\left(a\right)\right)\right) \]
          2. lift-neg.f6459.7

            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
        9. Applied rewrites59.7%

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right) \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 16: 58.2% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\ \mathbf{if}\;z \leq -4 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+57}:\\ \;\;\;\;a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ a (- (* b y) (* (- y 1.0) z)))))
         (if (<= z -4e-6)
           t_1
           (if (<= z 7.5e+57) (+ a (fma -2.0 b (* (- b a) t))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = a + ((b * y) - ((y - 1.0) * z));
      	double tmp;
      	if (z <= -4e-6) {
      		tmp = t_1;
      	} else if (z <= 7.5e+57) {
      		tmp = a + fma(-2.0, b, ((b - a) * t));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(a + Float64(Float64(b * y) - Float64(Float64(y - 1.0) * z)))
      	tmp = 0.0
      	if (z <= -4e-6)
      		tmp = t_1;
      	elseif (z <= 7.5e+57)
      		tmp = Float64(a + fma(-2.0, b, Float64(Float64(b - a) * t)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(N[(b * y), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e-6], t$95$1, If[LessEqual[z, 7.5e+57], N[(a + N[(-2.0 * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\
      \mathbf{if}\;z \leq -4 \cdot 10^{-6}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 7.5 \cdot 10^{+57}:\\
      \;\;\;\;a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -3.99999999999999982e-6 or 7.5000000000000006e57 < z

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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)} \]
        3. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          2. lower-+.f64N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          3. lower--.f64N/A

            \[\leadsto x + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)}\right) \]
          4. +-commutativeN/A

            \[\leadsto x + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto x + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          6. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          7. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          10. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(z \cdot \left(y - 1\right) + \color{blue}{-1 \cdot a}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(\left(y - 1\right) \cdot z + \color{blue}{-1} \cdot a\right)\right) \]
          13. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, \color{blue}{z}, -1 \cdot a\right)\right) \]
          14. lift--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -1 \cdot a\right)\right) \]
          15. mul-1-negN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right) \]
        4. Applied rewrites96.2%

          \[\leadsto \color{blue}{x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right)} \]
        5. Taylor expanded in x around 0

          \[\leadsto \left(a + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \color{blue}{z \cdot \left(y - 1\right)} \]
        6. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto a + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - z \cdot \left(\color{blue}{y} - 1\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \color{blue}{\left(y - 1\right)}\right) \]
        7. Applied rewrites81.5%

          \[\leadsto a + \color{blue}{\left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - \left(y - 1\right) \cdot z\right)} \]
        8. Taylor expanded in y around inf

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        9. Step-by-step derivation
          1. lower-*.f6449.1

            \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]
        10. Applied rewrites49.1%

          \[\leadsto a + \left(b \cdot y - \left(y - 1\right) \cdot z\right) \]

        if -3.99999999999999982e-6 < z < 7.5000000000000006e57

        1. Initial program 95.0%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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)} \]
        3. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          2. lower-+.f64N/A

            \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
          3. lower--.f64N/A

            \[\leadsto x + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)}\right) \]
          4. +-commutativeN/A

            \[\leadsto x + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto x + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          6. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
          7. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          10. lower--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(z \cdot \left(y - 1\right) + \color{blue}{-1 \cdot a}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(\left(y - 1\right) \cdot z + \color{blue}{-1} \cdot a\right)\right) \]
          13. lower-fma.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, \color{blue}{z}, -1 \cdot a\right)\right) \]
          14. lift--.f64N/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -1 \cdot a\right)\right) \]
          15. mul-1-negN/A

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
          16. lower-neg.f6496.2

            \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right) \]
        4. Applied rewrites96.2%

          \[\leadsto \color{blue}{x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right)} \]
        5. Taylor expanded in x around 0

          \[\leadsto \left(a + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \color{blue}{z \cdot \left(y - 1\right)} \]
        6. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto a + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - z \cdot \left(\color{blue}{y} - 1\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
          6. lower--.f64N/A

            \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \color{blue}{\left(y - 1\right)}\right) \]
        7. Applied rewrites81.5%

          \[\leadsto a + \color{blue}{\left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - \left(y - 1\right) \cdot z\right)} \]
        8. Taylor expanded in z around 0

          \[\leadsto a + \left(b \cdot \left(y - 2\right) + t \cdot \color{blue}{\left(b - a\right)}\right) \]
        9. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto a + \left(\left(y - 2\right) \cdot b + t \cdot \left(b - a\right)\right) \]
          2. lower-fma.f64N/A

            \[\leadsto a + \mathsf{fma}\left(y - 2, b, t \cdot \left(b - a\right)\right) \]
          3. lift--.f64N/A

            \[\leadsto a + \mathsf{fma}\left(y - 2, b, t \cdot \left(b - a\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
          5. lift--.f64N/A

            \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
          6. lift-*.f6460.0

            \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
        10. Applied rewrites60.0%

          \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
        11. Taylor expanded in y around 0

          \[\leadsto a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) \]
        12. Step-by-step derivation
          1. Applied rewrites47.0%

            \[\leadsto a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) \]
        13. Recombined 2 regimes into one program.
        14. Add Preprocessing

        Alternative 17: 57.3% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+69}:\\ \;\;\;\;a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* (- 1.0 y) z)))
           (if (<= z -1.02e+130)
             t_1
             (if (<= z 1.8e+69) (+ a (fma -2.0 b (* (- b a) t))) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = (1.0 - y) * z;
        	double tmp;
        	if (z <= -1.02e+130) {
        		tmp = t_1;
        	} else if (z <= 1.8e+69) {
        		tmp = a + fma(-2.0, b, ((b - a) * t));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(Float64(1.0 - y) * z)
        	tmp = 0.0
        	if (z <= -1.02e+130)
        		tmp = t_1;
        	elseif (z <= 1.8e+69)
        		tmp = Float64(a + fma(-2.0, b, Float64(Float64(b - a) * t)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.02e+130], t$95$1, If[LessEqual[z, 1.8e+69], N[(a + N[(-2.0 * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(1 - y\right) \cdot z\\
        \mathbf{if}\;z \leq -1.02 \cdot 10^{+130}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 1.8 \cdot 10^{+69}:\\
        \;\;\;\;a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.01999999999999999e130 or 1.8000000000000001e69 < z

          1. Initial program 95.0%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. Taylor expanded in z around inf

            \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
          3. Step-by-step derivation
            1. sub-negate-revN/A

              \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
            2. mul-1-negN/A

              \[\leadsto z \cdot \left(-1 \cdot \color{blue}{\left(y - 1\right)}\right) \]
            3. *-commutativeN/A

              \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
            4. lower-*.f64N/A

              \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
            5. mul-1-negN/A

              \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
            6. sub-negate-revN/A

              \[\leadsto \left(1 - y\right) \cdot z \]
            7. lower--.f6428.5

              \[\leadsto \left(1 - y\right) \cdot z \]
          4. Applied rewrites28.5%

            \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

          if -1.01999999999999999e130 < z < 1.8000000000000001e69

          1. Initial program 95.0%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. 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)} \]
          3. Step-by-step derivation
            1. associate--l+N/A

              \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
            2. lower-+.f64N/A

              \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
            3. lower--.f64N/A

              \[\leadsto x + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)}\right) \]
            4. +-commutativeN/A

              \[\leadsto x + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto x + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
            6. lower-fma.f64N/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
            7. lower--.f64N/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
            9. lower-*.f64N/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
            10. lower--.f64N/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
            11. +-commutativeN/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(z \cdot \left(y - 1\right) + \color{blue}{-1 \cdot a}\right)\right) \]
            12. *-commutativeN/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(\left(y - 1\right) \cdot z + \color{blue}{-1} \cdot a\right)\right) \]
            13. lower-fma.f64N/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, \color{blue}{z}, -1 \cdot a\right)\right) \]
            14. lift--.f64N/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -1 \cdot a\right)\right) \]
            15. mul-1-negN/A

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
            16. lower-neg.f6496.2

              \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right) \]
          4. Applied rewrites96.2%

            \[\leadsto \color{blue}{x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right)} \]
          5. Taylor expanded in x around 0

            \[\leadsto \left(a + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \color{blue}{z \cdot \left(y - 1\right)} \]
          6. Step-by-step derivation
            1. associate--l+N/A

              \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
            2. lower-+.f64N/A

              \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
            3. +-commutativeN/A

              \[\leadsto a + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - z \cdot \left(\color{blue}{y} - 1\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
            6. lower--.f64N/A

              \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \color{blue}{\left(y - 1\right)}\right) \]
          7. Applied rewrites81.5%

            \[\leadsto a + \color{blue}{\left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - \left(y - 1\right) \cdot z\right)} \]
          8. Taylor expanded in z around 0

            \[\leadsto a + \left(b \cdot \left(y - 2\right) + t \cdot \color{blue}{\left(b - a\right)}\right) \]
          9. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto a + \left(\left(y - 2\right) \cdot b + t \cdot \left(b - a\right)\right) \]
            2. lower-fma.f64N/A

              \[\leadsto a + \mathsf{fma}\left(y - 2, b, t \cdot \left(b - a\right)\right) \]
            3. lift--.f64N/A

              \[\leadsto a + \mathsf{fma}\left(y - 2, b, t \cdot \left(b - a\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
            5. lift--.f64N/A

              \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
            6. lift-*.f6460.0

              \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
          10. Applied rewrites60.0%

            \[\leadsto a + \mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) \]
          11. Taylor expanded in y around 0

            \[\leadsto a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) \]
          12. Step-by-step derivation
            1. Applied rewrites47.0%

              \[\leadsto a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) \]
          13. Recombined 2 regimes into one program.
          14. Add Preprocessing

          Alternative 18: 48.5% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-289}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+63}:\\ \;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (- 1.0 y) z)))
             (if (<= z -2.6e+87)
               t_1
               (if (<= z -5.1e-289)
                 (* (- 1.0 t) a)
                 (if (<= z 8.5e+63) (* (- (+ t y) 2.0) b) t_1)))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (1.0 - y) * z;
          	double tmp;
          	if (z <= -2.6e+87) {
          		tmp = t_1;
          	} else if (z <= -5.1e-289) {
          		tmp = (1.0 - t) * a;
          	} else if (z <= 8.5e+63) {
          		tmp = ((t + y) - 2.0) * b;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: tmp
              t_1 = (1.0d0 - y) * z
              if (z <= (-2.6d+87)) then
                  tmp = t_1
              else if (z <= (-5.1d-289)) then
                  tmp = (1.0d0 - t) * a
              else if (z <= 8.5d+63) then
                  tmp = ((t + y) - 2.0d0) * b
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (1.0 - y) * z;
          	double tmp;
          	if (z <= -2.6e+87) {
          		tmp = t_1;
          	} else if (z <= -5.1e-289) {
          		tmp = (1.0 - t) * a;
          	} else if (z <= 8.5e+63) {
          		tmp = ((t + y) - 2.0) * b;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = (1.0 - y) * z
          	tmp = 0
          	if z <= -2.6e+87:
          		tmp = t_1
          	elif z <= -5.1e-289:
          		tmp = (1.0 - t) * a
          	elif z <= 8.5e+63:
          		tmp = ((t + y) - 2.0) * b
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(1.0 - y) * z)
          	tmp = 0.0
          	if (z <= -2.6e+87)
          		tmp = t_1;
          	elseif (z <= -5.1e-289)
          		tmp = Float64(Float64(1.0 - t) * a);
          	elseif (z <= 8.5e+63)
          		tmp = Float64(Float64(Float64(t + y) - 2.0) * b);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = (1.0 - y) * z;
          	tmp = 0.0;
          	if (z <= -2.6e+87)
          		tmp = t_1;
          	elseif (z <= -5.1e-289)
          		tmp = (1.0 - t) * a;
          	elseif (z <= 8.5e+63)
          		tmp = ((t + y) - 2.0) * b;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.6e+87], t$95$1, If[LessEqual[z, -5.1e-289], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 8.5e+63], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(1 - y\right) \cdot z\\
          \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq -5.1 \cdot 10^{-289}:\\
          \;\;\;\;\left(1 - t\right) \cdot a\\
          
          \mathbf{elif}\;z \leq 8.5 \cdot 10^{+63}:\\
          \;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -2.59999999999999998e87 or 8.5000000000000004e63 < z

            1. Initial program 95.0%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. Taylor expanded in z around inf

              \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
            3. Step-by-step derivation
              1. sub-negate-revN/A

                \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
              2. mul-1-negN/A

                \[\leadsto z \cdot \left(-1 \cdot \color{blue}{\left(y - 1\right)}\right) \]
              3. *-commutativeN/A

                \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
              4. lower-*.f64N/A

                \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
              5. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
              6. sub-negate-revN/A

                \[\leadsto \left(1 - y\right) \cdot z \]
              7. lower--.f6428.5

                \[\leadsto \left(1 - y\right) \cdot z \]
            4. Applied rewrites28.5%

              \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

            if -2.59999999999999998e87 < z < -5.0999999999999996e-289

            1. Initial program 95.0%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. Taylor expanded in a around inf

              \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
            3. Step-by-step derivation
              1. sub-negate-revN/A

                \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
              2. mul-1-negN/A

                \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
              3. *-commutativeN/A

                \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
              4. lower-*.f64N/A

                \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
              5. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
              6. sub-negate-revN/A

                \[\leadsto \left(1 - t\right) \cdot a \]
              7. lower--.f6428.1

                \[\leadsto \left(1 - t\right) \cdot a \]
            4. Applied rewrites28.1%

              \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]

            if -5.0999999999999996e-289 < z < 8.5000000000000004e63

            1. Initial program 95.0%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. 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)} \]
            3. Step-by-step derivation
              1. associate--l+N/A

                \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
              2. lower-+.f64N/A

                \[\leadsto x + \color{blue}{\left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
              3. lower--.f64N/A

                \[\leadsto x + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)}\right) \]
              4. +-commutativeN/A

                \[\leadsto x + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto x + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
              6. lower-fma.f64N/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1 \cdot a} + z \cdot \left(y - 1\right)\right)\right) \]
              7. lower--.f64N/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, b \cdot \left(y - 2\right)\right) - \left(\color{blue}{-1} \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
              8. *-commutativeN/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
              9. lower-*.f64N/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
              10. lower--.f64N/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
              11. +-commutativeN/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(z \cdot \left(y - 1\right) + \color{blue}{-1 \cdot a}\right)\right) \]
              12. *-commutativeN/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \left(\left(y - 1\right) \cdot z + \color{blue}{-1} \cdot a\right)\right) \]
              13. lower-fma.f64N/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, \color{blue}{z}, -1 \cdot a\right)\right) \]
              14. lift--.f64N/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -1 \cdot a\right)\right) \]
              15. mul-1-negN/A

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, \mathsf{neg}\left(a\right)\right)\right) \]
              16. lower-neg.f6496.2

                \[\leadsto x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right) \]
            4. Applied rewrites96.2%

              \[\leadsto \color{blue}{x + \left(\mathsf{fma}\left(b - a, t, \left(y - 2\right) \cdot b\right) - \mathsf{fma}\left(y - 1, z, -a\right)\right)} \]
            5. Taylor expanded in x around 0

              \[\leadsto \left(a + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \color{blue}{z \cdot \left(y - 1\right)} \]
            6. Step-by-step derivation
              1. associate--l+N/A

                \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
              2. lower-+.f64N/A

                \[\leadsto a + \left(\left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right) - \color{blue}{z \cdot \left(y - 1\right)}\right) \]
              3. +-commutativeN/A

                \[\leadsto a + \left(\left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right) - z \cdot \left(\color{blue}{y} - 1\right)\right) \]
              4. *-commutativeN/A

                \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \left(y - 1\right)\right) \]
              6. lower--.f64N/A

                \[\leadsto a + \left(\left(\left(b - a\right) \cdot t + \left(y - 2\right) \cdot b\right) - z \cdot \color{blue}{\left(y - 1\right)}\right) \]
            7. Applied rewrites81.5%

              \[\leadsto a + \color{blue}{\left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - \left(y - 1\right) \cdot z\right)} \]
            8. Taylor expanded in b around inf

              \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(\left(t + y\right) - 2\right) \cdot \color{blue}{b} \]
              2. lower-*.f64N/A

                \[\leadsto \left(\left(t + y\right) - 2\right) \cdot \color{blue}{b} \]
              3. lift--.f64N/A

                \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
              4. lift-+.f6436.7

                \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
            10. Applied rewrites36.7%

              \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
          3. Recombined 3 regimes into one program.
          4. Add Preprocessing

          Alternative 19: 46.7% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -8 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+64}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, \left(-a\right) \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (- 1.0 y) z)))
             (if (<= z -8e+40)
               t_1
               (if (<= z 1.26e+64) (fma (- t 2.0) b (* (- a) t)) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (1.0 - y) * z;
          	double tmp;
          	if (z <= -8e+40) {
          		tmp = t_1;
          	} else if (z <= 1.26e+64) {
          		tmp = fma((t - 2.0), b, (-a * t));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(1.0 - y) * z)
          	tmp = 0.0
          	if (z <= -8e+40)
          		tmp = t_1;
          	elseif (z <= 1.26e+64)
          		tmp = fma(Float64(t - 2.0), b, Float64(Float64(-a) * t));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8e+40], t$95$1, If[LessEqual[z, 1.26e+64], N[(N[(t - 2.0), $MachinePrecision] * b + N[((-a) * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(1 - y\right) \cdot z\\
          \mathbf{if}\;z \leq -8 \cdot 10^{+40}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1.26 \cdot 10^{+64}:\\
          \;\;\;\;\mathsf{fma}\left(t - 2, b, \left(-a\right) \cdot t\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -8.00000000000000024e40 or 1.26e64 < z

            1. Initial program 95.0%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. Taylor expanded in z around inf

              \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
            3. Step-by-step derivation
              1. sub-negate-revN/A

                \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
              2. mul-1-negN/A

                \[\leadsto z \cdot \left(-1 \cdot \color{blue}{\left(y - 1\right)}\right) \]
              3. *-commutativeN/A

                \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
              4. lower-*.f64N/A

                \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
              5. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
              6. sub-negate-revN/A

                \[\leadsto \left(1 - y\right) \cdot z \]
              7. lower--.f6428.5

                \[\leadsto \left(1 - y\right) \cdot z \]
            4. Applied rewrites28.5%

              \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

            if -8.00000000000000024e40 < z < 1.26e64

            1. Initial program 95.0%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b} \]
              2. lift--.f64N/A

                \[\leadsto \color{blue}{\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
              3. lift--.f64N/A

                \[\leadsto \left(\color{blue}{\left(x - \left(y - 1\right) \cdot z\right)} - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              4. lift-*.f64N/A

                \[\leadsto \left(\left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              5. lift--.f64N/A

                \[\leadsto \left(\left(x - \color{blue}{\left(y - 1\right)} \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              6. lift-*.f64N/A

                \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t - 1\right) \cdot a}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              7. lift--.f64N/A

                \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t - 1\right)} \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              8. lift-*.f64N/A

                \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b} \]
              9. lift-+.f64N/A

                \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
              10. lift--.f64N/A

                \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{\left(\left(y + t\right) - 2\right)} \cdot b \]
              11. +-commutativeN/A

                \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
              12. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y + t\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
              13. lift--.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
              14. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
              15. lower-+.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
              16. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)}\right) \]
              17. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \left(t - 1\right)}\right) \]
            3. Applied rewrites97.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\right)} \]
            4. Taylor expanded in t around inf

              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{-1 \cdot \left(a \cdot t\right)}\right) \]
            5. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-1 \cdot a\right) \cdot \color{blue}{t}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-1 \cdot a\right) \cdot \color{blue}{t}\right) \]
              3. mul-1-negN/A

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \]
              4. lift-neg.f6451.0

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-a\right) \cdot t\right) \]
            6. Applied rewrites51.0%

              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{\left(-a\right) \cdot t}\right) \]
            7. Taylor expanded in y around 0

              \[\leadsto \mathsf{fma}\left(\color{blue}{t} - 2, b, \left(-a\right) \cdot t\right) \]
            8. Step-by-step derivation
              1. Applied rewrites37.4%

                \[\leadsto \mathsf{fma}\left(\color{blue}{t} - 2, b, \left(-a\right) \cdot t\right) \]
            9. Recombined 2 regimes into one program.
            10. Add Preprocessing

            Alternative 20: 43.3% accurate, 1.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-31}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+63}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* (- 1.0 y) z)))
               (if (<= z -2.6e+87)
                 t_1
                 (if (<= z 3.6e-31)
                   (* (- 1.0 t) a)
                   (if (<= z 7.5e+63) (* (- b a) t) t_1)))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = (1.0 - y) * z;
            	double tmp;
            	if (z <= -2.6e+87) {
            		tmp = t_1;
            	} else if (z <= 3.6e-31) {
            		tmp = (1.0 - t) * a;
            	} else if (z <= 7.5e+63) {
            		tmp = (b - a) * t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (1.0d0 - y) * z
                if (z <= (-2.6d+87)) then
                    tmp = t_1
                else if (z <= 3.6d-31) then
                    tmp = (1.0d0 - t) * a
                else if (z <= 7.5d+63) then
                    tmp = (b - a) * t
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = (1.0 - y) * z;
            	double tmp;
            	if (z <= -2.6e+87) {
            		tmp = t_1;
            	} else if (z <= 3.6e-31) {
            		tmp = (1.0 - t) * a;
            	} else if (z <= 7.5e+63) {
            		tmp = (b - a) * t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = (1.0 - y) * z
            	tmp = 0
            	if z <= -2.6e+87:
            		tmp = t_1
            	elif z <= 3.6e-31:
            		tmp = (1.0 - t) * a
            	elif z <= 7.5e+63:
            		tmp = (b - a) * t
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(1.0 - y) * z)
            	tmp = 0.0
            	if (z <= -2.6e+87)
            		tmp = t_1;
            	elseif (z <= 3.6e-31)
            		tmp = Float64(Float64(1.0 - t) * a);
            	elseif (z <= 7.5e+63)
            		tmp = Float64(Float64(b - a) * t);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = (1.0 - y) * z;
            	tmp = 0.0;
            	if (z <= -2.6e+87)
            		tmp = t_1;
            	elseif (z <= 3.6e-31)
            		tmp = (1.0 - t) * a;
            	elseif (z <= 7.5e+63)
            		tmp = (b - a) * t;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.6e+87], t$95$1, If[LessEqual[z, 3.6e-31], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 7.5e+63], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(1 - y\right) \cdot z\\
            \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 3.6 \cdot 10^{-31}:\\
            \;\;\;\;\left(1 - t\right) \cdot a\\
            
            \mathbf{elif}\;z \leq 7.5 \cdot 10^{+63}:\\
            \;\;\;\;\left(b - a\right) \cdot t\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -2.59999999999999998e87 or 7.5000000000000005e63 < z

              1. Initial program 95.0%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Taylor expanded in z around inf

                \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
              3. Step-by-step derivation
                1. sub-negate-revN/A

                  \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
                2. mul-1-negN/A

                  \[\leadsto z \cdot \left(-1 \cdot \color{blue}{\left(y - 1\right)}\right) \]
                3. *-commutativeN/A

                  \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                5. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
                6. sub-negate-revN/A

                  \[\leadsto \left(1 - y\right) \cdot z \]
                7. lower--.f6428.5

                  \[\leadsto \left(1 - y\right) \cdot z \]
              4. Applied rewrites28.5%

                \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

              if -2.59999999999999998e87 < z < 3.60000000000000004e-31

              1. Initial program 95.0%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Taylor expanded in a around inf

                \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
              3. Step-by-step derivation
                1. sub-negate-revN/A

                  \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                2. mul-1-negN/A

                  \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                3. *-commutativeN/A

                  \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                5. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                6. sub-negate-revN/A

                  \[\leadsto \left(1 - t\right) \cdot a \]
                7. lower--.f6428.1

                  \[\leadsto \left(1 - t\right) \cdot a \]
              4. Applied rewrites28.1%

                \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]

              if 3.60000000000000004e-31 < z < 7.5000000000000005e63

              1. Initial program 95.0%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Taylor expanded in t around inf

                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                3. lower--.f6432.0

                  \[\leadsto \left(b - a\right) \cdot t \]
              4. Applied rewrites32.0%

                \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 21: 42.7% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.0076:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* (- 1.0 y) z)))
               (if (<= z -2.6e+87) t_1 (if (<= z 0.0076) (* (- 1.0 t) a) t_1))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = (1.0 - y) * z;
            	double tmp;
            	if (z <= -2.6e+87) {
            		tmp = t_1;
            	} else if (z <= 0.0076) {
            		tmp = (1.0 - t) * 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 = (1.0d0 - y) * z
                if (z <= (-2.6d+87)) then
                    tmp = t_1
                else if (z <= 0.0076d0) then
                    tmp = (1.0d0 - t) * 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 = (1.0 - y) * z;
            	double tmp;
            	if (z <= -2.6e+87) {
            		tmp = t_1;
            	} else if (z <= 0.0076) {
            		tmp = (1.0 - t) * a;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = (1.0 - y) * z
            	tmp = 0
            	if z <= -2.6e+87:
            		tmp = t_1
            	elif z <= 0.0076:
            		tmp = (1.0 - t) * a
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(1.0 - y) * z)
            	tmp = 0.0
            	if (z <= -2.6e+87)
            		tmp = t_1;
            	elseif (z <= 0.0076)
            		tmp = Float64(Float64(1.0 - t) * a);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = (1.0 - y) * z;
            	tmp = 0.0;
            	if (z <= -2.6e+87)
            		tmp = t_1;
            	elseif (z <= 0.0076)
            		tmp = (1.0 - t) * a;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.6e+87], t$95$1, If[LessEqual[z, 0.0076], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(1 - y\right) \cdot z\\
            \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 0.0076:\\
            \;\;\;\;\left(1 - t\right) \cdot a\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -2.59999999999999998e87 or 0.00759999999999999998 < z

              1. Initial program 95.0%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Taylor expanded in z around inf

                \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
              3. Step-by-step derivation
                1. sub-negate-revN/A

                  \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
                2. mul-1-negN/A

                  \[\leadsto z \cdot \left(-1 \cdot \color{blue}{\left(y - 1\right)}\right) \]
                3. *-commutativeN/A

                  \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                5. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
                6. sub-negate-revN/A

                  \[\leadsto \left(1 - y\right) \cdot z \]
                7. lower--.f6428.5

                  \[\leadsto \left(1 - y\right) \cdot z \]
              4. Applied rewrites28.5%

                \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]

              if -2.59999999999999998e87 < z < 0.00759999999999999998

              1. Initial program 95.0%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Taylor expanded in a around inf

                \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
              3. Step-by-step derivation
                1. sub-negate-revN/A

                  \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                2. mul-1-negN/A

                  \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                3. *-commutativeN/A

                  \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                5. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                6. sub-negate-revN/A

                  \[\leadsto \left(1 - t\right) \cdot a \]
                7. lower--.f6428.1

                  \[\leadsto \left(1 - t\right) \cdot a \]
              4. Applied rewrites28.1%

                \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 22: 34.7% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-y\right) \cdot z\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.008:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* (- y) z)))
               (if (<= z -1.8e+129) t_1 (if (<= z 0.008) (* (- 1.0 t) a) t_1))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = -y * z;
            	double tmp;
            	if (z <= -1.8e+129) {
            		tmp = t_1;
            	} else if (z <= 0.008) {
            		tmp = (1.0 - t) * 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 = -y * z
                if (z <= (-1.8d+129)) then
                    tmp = t_1
                else if (z <= 0.008d0) then
                    tmp = (1.0d0 - t) * 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 = -y * z;
            	double tmp;
            	if (z <= -1.8e+129) {
            		tmp = t_1;
            	} else if (z <= 0.008) {
            		tmp = (1.0 - t) * a;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = -y * z
            	tmp = 0
            	if z <= -1.8e+129:
            		tmp = t_1
            	elif z <= 0.008:
            		tmp = (1.0 - t) * a
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(-y) * z)
            	tmp = 0.0
            	if (z <= -1.8e+129)
            		tmp = t_1;
            	elseif (z <= 0.008)
            		tmp = Float64(Float64(1.0 - t) * a);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = -y * z;
            	tmp = 0.0;
            	if (z <= -1.8e+129)
            		tmp = t_1;
            	elseif (z <= 0.008)
            		tmp = (1.0 - t) * a;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[z, -1.8e+129], t$95$1, If[LessEqual[z, 0.008], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(-y\right) \cdot z\\
            \mathbf{if}\;z \leq -1.8 \cdot 10^{+129}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 0.008:\\
            \;\;\;\;\left(1 - t\right) \cdot a\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.8000000000000001e129 or 0.0080000000000000002 < z

              1. Initial program 95.0%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Taylor expanded in y around inf

                \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                3. lower--.f6433.4

                  \[\leadsto \left(b - z\right) \cdot y \]
              4. Applied rewrites33.4%

                \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
              5. Taylor expanded in z around 0

                \[\leadsto b \cdot y \]
              6. Step-by-step derivation
                1. Applied rewrites18.0%

                  \[\leadsto b \cdot y \]
                2. Taylor expanded in z around inf

                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot z\right)} \]
                3. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                  2. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot z \]
                  3. lift-neg.f64N/A

                    \[\leadsto \left(-y\right) \cdot z \]
                  4. lower-*.f6419.4

                    \[\leadsto \left(-y\right) \cdot z \]
                4. Applied rewrites19.4%

                  \[\leadsto \left(-y\right) \cdot \color{blue}{z} \]

                if -1.8000000000000001e129 < z < 0.0080000000000000002

                1. Initial program 95.0%

                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                2. Taylor expanded in a around inf

                  \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                3. Step-by-step derivation
                  1. sub-negate-revN/A

                    \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                  2. mul-1-negN/A

                    \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                  5. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                  6. sub-negate-revN/A

                    \[\leadsto \left(1 - t\right) \cdot a \]
                  7. lower--.f6428.1

                    \[\leadsto \left(1 - t\right) \cdot a \]
                4. Applied rewrites28.1%

                  \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
              7. Recombined 2 regimes into one program.
              8. Add Preprocessing

              Alternative 23: 29.1% accurate, 1.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-y\right) \cdot z\\ \mathbf{if}\;y \leq -700000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-110}:\\ \;\;\;\;\left(-t\right) \cdot a\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+68}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* (- y) z)))
                 (if (<= y -700000000.0)
                   t_1
                   (if (<= y 1.45e-110) (* (- t) a) (if (<= y 5.4e+68) x t_1)))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = -y * z;
              	double tmp;
              	if (y <= -700000000.0) {
              		tmp = t_1;
              	} else if (y <= 1.45e-110) {
              		tmp = -t * a;
              	} else if (y <= 5.4e+68) {
              		tmp = x;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a, b)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = -y * z
                  if (y <= (-700000000.0d0)) then
                      tmp = t_1
                  else if (y <= 1.45d-110) then
                      tmp = -t * a
                  else if (y <= 5.4d+68) then
                      tmp = x
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = -y * z;
              	double tmp;
              	if (y <= -700000000.0) {
              		tmp = t_1;
              	} else if (y <= 1.45e-110) {
              		tmp = -t * a;
              	} else if (y <= 5.4e+68) {
              		tmp = x;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = -y * z
              	tmp = 0
              	if y <= -700000000.0:
              		tmp = t_1
              	elif y <= 1.45e-110:
              		tmp = -t * a
              	elif y <= 5.4e+68:
              		tmp = x
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(Float64(-y) * z)
              	tmp = 0.0
              	if (y <= -700000000.0)
              		tmp = t_1;
              	elseif (y <= 1.45e-110)
              		tmp = Float64(Float64(-t) * a);
              	elseif (y <= 5.4e+68)
              		tmp = x;
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = -y * z;
              	tmp = 0.0;
              	if (y <= -700000000.0)
              		tmp = t_1;
              	elseif (y <= 1.45e-110)
              		tmp = -t * a;
              	elseif (y <= 5.4e+68)
              		tmp = x;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[y, -700000000.0], t$95$1, If[LessEqual[y, 1.45e-110], N[((-t) * a), $MachinePrecision], If[LessEqual[y, 5.4e+68], x, t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(-y\right) \cdot z\\
              \mathbf{if}\;y \leq -700000000:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;y \leq 1.45 \cdot 10^{-110}:\\
              \;\;\;\;\left(-t\right) \cdot a\\
              
              \mathbf{elif}\;y \leq 5.4 \cdot 10^{+68}:\\
              \;\;\;\;x\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y < -7e8 or 5.39999999999999982e68 < y

                1. Initial program 95.0%

                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                2. Taylor expanded in y around inf

                  \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                  3. lower--.f6433.4

                    \[\leadsto \left(b - z\right) \cdot y \]
                4. Applied rewrites33.4%

                  \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                5. Taylor expanded in z around 0

                  \[\leadsto b \cdot y \]
                6. Step-by-step derivation
                  1. Applied rewrites18.0%

                    \[\leadsto b \cdot y \]
                  2. Taylor expanded in z around inf

                    \[\leadsto -1 \cdot \color{blue}{\left(y \cdot z\right)} \]
                  3. Step-by-step derivation
                    1. associate-*r*N/A

                      \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                    2. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot z \]
                    3. lift-neg.f64N/A

                      \[\leadsto \left(-y\right) \cdot z \]
                    4. lower-*.f6419.4

                      \[\leadsto \left(-y\right) \cdot z \]
                  4. Applied rewrites19.4%

                    \[\leadsto \left(-y\right) \cdot \color{blue}{z} \]

                  if -7e8 < y < 1.4500000000000001e-110

                  1. Initial program 95.0%

                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                  2. Taylor expanded in a around inf

                    \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                  3. Step-by-step derivation
                    1. sub-negate-revN/A

                      \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                    2. mul-1-negN/A

                      \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                    5. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                    6. sub-negate-revN/A

                      \[\leadsto \left(1 - t\right) \cdot a \]
                    7. lower--.f6428.1

                      \[\leadsto \left(1 - t\right) \cdot a \]
                  4. Applied rewrites28.1%

                    \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                  5. Taylor expanded in t around inf

                    \[\leadsto \left(-1 \cdot t\right) \cdot a \]
                  6. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot a \]
                    2. lower-neg.f6419.3

                      \[\leadsto \left(-t\right) \cdot a \]
                  7. Applied rewrites19.3%

                    \[\leadsto \left(-t\right) \cdot a \]

                  if 1.4500000000000001e-110 < y < 5.39999999999999982e68

                  1. Initial program 95.0%

                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                  2. Taylor expanded in x around 0

                    \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                  3. Step-by-step derivation
                    1. lower--.f64N/A

                      \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                    2. *-commutativeN/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                    3. +-commutativeN/A

                      \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                    4. lift--.f64N/A

                      \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a} \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                    5. lift-+.f64N/A

                      \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                    7. lift-+.f64N/A

                      \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                    9. lower-+.f64N/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                    10. *-commutativeN/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\left(t - 1\right) \cdot a + \color{blue}{z} \cdot \left(y - 1\right)\right) \]
                    11. lower-fma.f64N/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                    12. lift--.f64N/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                    13. *-commutativeN/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                    14. lift--.f64N/A

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                    15. lift-*.f6480.7

                      \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                  4. Applied rewrites80.7%

                    \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
                  5. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{x} \]
                  6. Step-by-step derivation
                    1. Applied rewrites16.1%

                      \[\leadsto \color{blue}{x} \]
                  7. Recombined 3 regimes into one program.
                  8. Add Preprocessing

                  Alternative 24: 27.2% accurate, 2.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-y\right) \cdot z\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (- y) z))) (if (<= z -3.3e+99) t_1 (if (<= z 9.2e+35) x t_1))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = -y * z;
                  	double tmp;
                  	if (z <= -3.3e+99) {
                  		tmp = t_1;
                  	} else if (z <= 9.2e+35) {
                  		tmp = x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = -y * z
                      if (z <= (-3.3d+99)) then
                          tmp = t_1
                      else if (z <= 9.2d+35) then
                          tmp = x
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = -y * z;
                  	double tmp;
                  	if (z <= -3.3e+99) {
                  		tmp = t_1;
                  	} else if (z <= 9.2e+35) {
                  		tmp = x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = -y * z
                  	tmp = 0
                  	if z <= -3.3e+99:
                  		tmp = t_1
                  	elif z <= 9.2e+35:
                  		tmp = x
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(-y) * z)
                  	tmp = 0.0
                  	if (z <= -3.3e+99)
                  		tmp = t_1;
                  	elseif (z <= 9.2e+35)
                  		tmp = x;
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = -y * z;
                  	tmp = 0.0;
                  	if (z <= -3.3e+99)
                  		tmp = t_1;
                  	elseif (z <= 9.2e+35)
                  		tmp = x;
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[z, -3.3e+99], t$95$1, If[LessEqual[z, 9.2e+35], x, t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(-y\right) \cdot z\\
                  \mathbf{if}\;z \leq -3.3 \cdot 10^{+99}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 9.2 \cdot 10^{+35}:\\
                  \;\;\;\;x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -3.2999999999999999e99 or 9.1999999999999993e35 < z

                    1. Initial program 95.0%

                      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                    2. Taylor expanded in y around inf

                      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                      3. lower--.f6433.4

                        \[\leadsto \left(b - z\right) \cdot y \]
                    4. Applied rewrites33.4%

                      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                    5. Taylor expanded in z around 0

                      \[\leadsto b \cdot y \]
                    6. Step-by-step derivation
                      1. Applied rewrites18.0%

                        \[\leadsto b \cdot y \]
                      2. Taylor expanded in z around inf

                        \[\leadsto -1 \cdot \color{blue}{\left(y \cdot z\right)} \]
                      3. Step-by-step derivation
                        1. associate-*r*N/A

                          \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                        2. mul-1-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot z \]
                        3. lift-neg.f64N/A

                          \[\leadsto \left(-y\right) \cdot z \]
                        4. lower-*.f6419.4

                          \[\leadsto \left(-y\right) \cdot z \]
                      4. Applied rewrites19.4%

                        \[\leadsto \left(-y\right) \cdot \color{blue}{z} \]

                      if -3.2999999999999999e99 < z < 9.1999999999999993e35

                      1. Initial program 95.0%

                        \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                      2. Taylor expanded in x around 0

                        \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower--.f64N/A

                          \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                        2. *-commutativeN/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                        3. +-commutativeN/A

                          \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                        4. lift--.f64N/A

                          \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a} \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                        5. lift-+.f64N/A

                          \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                        6. lift-*.f64N/A

                          \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                        7. lift-+.f64N/A

                          \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                        8. +-commutativeN/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                        9. lower-+.f64N/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                        10. *-commutativeN/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\left(t - 1\right) \cdot a + \color{blue}{z} \cdot \left(y - 1\right)\right) \]
                        11. lower-fma.f64N/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                        12. lift--.f64N/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                        13. *-commutativeN/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                        14. lift--.f64N/A

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                        15. lift-*.f6480.7

                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                      4. Applied rewrites80.7%

                        \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
                      5. Taylor expanded in x around inf

                        \[\leadsto \color{blue}{x} \]
                      6. Step-by-step derivation
                        1. Applied rewrites16.1%

                          \[\leadsto \color{blue}{x} \]
                      7. Recombined 2 regimes into one program.
                      8. Add Preprocessing

                      Alternative 25: 21.6% accurate, 1.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-206}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+66}:\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= x -8.2e+164) x (if (<= x 4.3e-206) a (if (<= x 7.5e+66) (* b y) x))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (x <= -8.2e+164) {
                      		tmp = x;
                      	} else if (x <= 4.3e-206) {
                      		tmp = a;
                      	} else if (x <= 7.5e+66) {
                      		tmp = b * y;
                      	} else {
                      		tmp = x;
                      	}
                      	return tmp;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a, b)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8) :: tmp
                          if (x <= (-8.2d+164)) then
                              tmp = x
                          else if (x <= 4.3d-206) then
                              tmp = a
                          else if (x <= 7.5d+66) then
                              tmp = b * y
                          else
                              tmp = x
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (x <= -8.2e+164) {
                      		tmp = x;
                      	} else if (x <= 4.3e-206) {
                      		tmp = a;
                      	} else if (x <= 7.5e+66) {
                      		tmp = b * y;
                      	} else {
                      		tmp = x;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if x <= -8.2e+164:
                      		tmp = x
                      	elif x <= 4.3e-206:
                      		tmp = a
                      	elif x <= 7.5e+66:
                      		tmp = b * y
                      	else:
                      		tmp = x
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (x <= -8.2e+164)
                      		tmp = x;
                      	elseif (x <= 4.3e-206)
                      		tmp = a;
                      	elseif (x <= 7.5e+66)
                      		tmp = Float64(b * y);
                      	else
                      		tmp = x;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b)
                      	tmp = 0.0;
                      	if (x <= -8.2e+164)
                      		tmp = x;
                      	elseif (x <= 4.3e-206)
                      		tmp = a;
                      	elseif (x <= 7.5e+66)
                      		tmp = b * y;
                      	else
                      		tmp = x;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.2e+164], x, If[LessEqual[x, 4.3e-206], a, If[LessEqual[x, 7.5e+66], N[(b * y), $MachinePrecision], x]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\
                      \;\;\;\;x\\
                      
                      \mathbf{elif}\;x \leq 4.3 \cdot 10^{-206}:\\
                      \;\;\;\;a\\
                      
                      \mathbf{elif}\;x \leq 7.5 \cdot 10^{+66}:\\
                      \;\;\;\;b \cdot y\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if x < -8.20000000000000032e164 or 7.50000000000000024e66 < x

                        1. Initial program 95.0%

                          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                        2. Taylor expanded in x around 0

                          \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                        3. Step-by-step derivation
                          1. lower--.f64N/A

                            \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                          2. *-commutativeN/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                          3. +-commutativeN/A

                            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                          4. lift--.f64N/A

                            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a} \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                          5. lift-+.f64N/A

                            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                          6. lift-*.f64N/A

                            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                          7. lift-+.f64N/A

                            \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                          8. +-commutativeN/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                          9. lower-+.f64N/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                          10. *-commutativeN/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\left(t - 1\right) \cdot a + \color{blue}{z} \cdot \left(y - 1\right)\right) \]
                          11. lower-fma.f64N/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                          12. lift--.f64N/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                          13. *-commutativeN/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                          14. lift--.f64N/A

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                          15. lift-*.f6480.7

                            \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                        4. Applied rewrites80.7%

                          \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
                        5. Taylor expanded in x around inf

                          \[\leadsto \color{blue}{x} \]
                        6. Step-by-step derivation
                          1. Applied rewrites16.1%

                            \[\leadsto \color{blue}{x} \]

                          if -8.20000000000000032e164 < x < 4.30000000000000025e-206

                          1. Initial program 95.0%

                            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                          2. Taylor expanded in a around inf

                            \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                          3. Step-by-step derivation
                            1. sub-negate-revN/A

                              \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                            2. mul-1-negN/A

                              \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                            3. *-commutativeN/A

                              \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                            4. lower-*.f64N/A

                              \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                            5. mul-1-negN/A

                              \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                            6. sub-negate-revN/A

                              \[\leadsto \left(1 - t\right) \cdot a \]
                            7. lower--.f6428.1

                              \[\leadsto \left(1 - t\right) \cdot a \]
                          4. Applied rewrites28.1%

                            \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                          5. Taylor expanded in t around 0

                            \[\leadsto a \]
                          6. Step-by-step derivation
                            1. Applied rewrites10.9%

                              \[\leadsto a \]

                            if 4.30000000000000025e-206 < x < 7.50000000000000024e66

                            1. Initial program 95.0%

                              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                            2. Taylor expanded in y around inf

                              \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                            3. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                              2. lower-*.f64N/A

                                \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                              3. lower--.f6433.4

                                \[\leadsto \left(b - z\right) \cdot y \]
                            4. Applied rewrites33.4%

                              \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                            5. Taylor expanded in z around 0

                              \[\leadsto b \cdot y \]
                            6. Step-by-step derivation
                              1. Applied rewrites18.0%

                                \[\leadsto b \cdot y \]
                            7. Recombined 3 regimes into one program.
                            8. Add Preprocessing

                            Alternative 26: 19.7% accurate, 3.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-15}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (<= x -8.2e+164) x (if (<= x 2.9e-15) a x)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (x <= -8.2e+164) {
                            		tmp = x;
                            	} else if (x <= 2.9e-15) {
                            		tmp = a;
                            	} else {
                            		tmp = x;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: tmp
                                if (x <= (-8.2d+164)) then
                                    tmp = x
                                else if (x <= 2.9d-15) then
                                    tmp = a
                                else
                                    tmp = x
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (x <= -8.2e+164) {
                            		tmp = x;
                            	} else if (x <= 2.9e-15) {
                            		tmp = a;
                            	} else {
                            		tmp = x;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if x <= -8.2e+164:
                            		tmp = x
                            	elif x <= 2.9e-15:
                            		tmp = a
                            	else:
                            		tmp = x
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if (x <= -8.2e+164)
                            		tmp = x;
                            	elseif (x <= 2.9e-15)
                            		tmp = a;
                            	else
                            		tmp = x;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if (x <= -8.2e+164)
                            		tmp = x;
                            	elseif (x <= 2.9e-15)
                            		tmp = a;
                            	else
                            		tmp = x;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.2e+164], x, If[LessEqual[x, 2.9e-15], a, x]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\
                            \;\;\;\;x\\
                            
                            \mathbf{elif}\;x \leq 2.9 \cdot 10^{-15}:\\
                            \;\;\;\;a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < -8.20000000000000032e164 or 2.90000000000000019e-15 < x

                              1. Initial program 95.0%

                                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                              2. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                              3. Step-by-step derivation
                                1. lower--.f64N/A

                                  \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                                2. *-commutativeN/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                                3. +-commutativeN/A

                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                4. lift--.f64N/A

                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a} \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                5. lift-+.f64N/A

                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                6. lift-*.f64N/A

                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                                7. lift-+.f64N/A

                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                8. +-commutativeN/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                9. lower-+.f64N/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                10. *-commutativeN/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\left(t - 1\right) \cdot a + \color{blue}{z} \cdot \left(y - 1\right)\right) \]
                                11. lower-fma.f64N/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                                12. lift--.f64N/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                                13. *-commutativeN/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                14. lift--.f64N/A

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                15. lift-*.f6480.7

                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                              4. Applied rewrites80.7%

                                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
                              5. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{x} \]
                              6. Step-by-step derivation
                                1. Applied rewrites16.1%

                                  \[\leadsto \color{blue}{x} \]

                                if -8.20000000000000032e164 < x < 2.90000000000000019e-15

                                1. Initial program 95.0%

                                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                2. Taylor expanded in a around inf

                                  \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                                3. Step-by-step derivation
                                  1. sub-negate-revN/A

                                    \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                                  2. mul-1-negN/A

                                    \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                                  3. *-commutativeN/A

                                    \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                                  4. lower-*.f64N/A

                                    \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                                  5. mul-1-negN/A

                                    \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                                  6. sub-negate-revN/A

                                    \[\leadsto \left(1 - t\right) \cdot a \]
                                  7. lower--.f6428.1

                                    \[\leadsto \left(1 - t\right) \cdot a \]
                                4. Applied rewrites28.1%

                                  \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                5. Taylor expanded in t around 0

                                  \[\leadsto a \]
                                6. Step-by-step derivation
                                  1. Applied rewrites10.9%

                                    \[\leadsto a \]
                                7. Recombined 2 regimes into one program.
                                8. Add Preprocessing

                                Alternative 27: 16.1% accurate, 28.4× speedup?

                                \[\begin{array}{l} \\ x \end{array} \]
                                (FPCore (x y z t a b) :precision binary64 x)
                                double code(double x, double y, double z, double t, double a, double b) {
                                	return x;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, a, b)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    real(8), intent (in) :: b
                                    code = x
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b) {
                                	return x;
                                }
                                
                                def code(x, y, z, t, a, b):
                                	return x
                                
                                function code(x, y, z, t, a, b)
                                	return x
                                end
                                
                                function tmp = code(x, y, z, t, a, b)
                                	tmp = x;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := x
                                
                                \begin{array}{l}
                                
                                \\
                                x
                                \end{array}
                                
                                Derivation
                                1. Initial program 95.0%

                                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                                3. Step-by-step derivation
                                  1. lower--.f64N/A

                                    \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \color{blue}{\left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                                  2. *-commutativeN/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                                  3. +-commutativeN/A

                                    \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                  4. lift--.f64N/A

                                    \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a} \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                  5. lift-+.f64N/A

                                    \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                  6. lift-*.f64N/A

                                    \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(\color{blue}{a \cdot \left(t - 1\right)} + z \cdot \left(y - 1\right)\right) \]
                                  7. lift-+.f64N/A

                                    \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                  8. +-commutativeN/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                  9. lower-+.f64N/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right) \]
                                  10. *-commutativeN/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \left(\left(t - 1\right) \cdot a + \color{blue}{z} \cdot \left(y - 1\right)\right) \]
                                  11. lower-fma.f64N/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                                  12. lift--.f64N/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                                  13. *-commutativeN/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                  14. lift--.f64N/A

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                  15. lift-*.f6480.7

                                    \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                4. Applied rewrites80.7%

                                  \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)} \]
                                5. Taylor expanded in x around inf

                                  \[\leadsto \color{blue}{x} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites16.1%

                                    \[\leadsto \color{blue}{x} \]
                                  2. Add Preprocessing

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025134 
                                  (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)))