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

Percentage Accurate: 95.1% → 97.5%
Time: 4.4s
Alternatives: 18
Speedup: 0.5×

Specification

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

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

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

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

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 18 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.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.5% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot b\\


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

    1. Initial program 100.0%

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

        \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b \]
      5. lift-*.f6450.1

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

        \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b \]
      7. +-commutativeN/A

        \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
      8. lower-+.f6450.1

        \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
    4. Applied rewrites50.1%

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

Alternative 2: 34.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;x - \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
   (if (<= t_1 (- INFINITY))
     (* b t)
     (if (<= t_1 5e+307) (- x (- z)) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = b * t;
	} else if (t_1 <= 5e+307) {
		tmp = x - -z;
	} else {
		tmp = b * t;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = b * t;
	} else if (t_1 <= 5e+307) {
		tmp = x - -z;
	} else {
		tmp = b * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = b * t
	elif t_1 <= 5e+307:
		tmp = x - -z
	else:
		tmp = b * t
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(b * t);
	elseif (t_1 <= 5e+307)
		tmp = Float64(x - Float64(-z));
	else
		tmp = Float64(b * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = b * t;
	elseif (t_1 <= 5e+307)
		tmp = x - -z;
	else
		tmp = b * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(b * t), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(x - (-z)), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;x - \left(-z\right)\\

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


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

    1. Initial program 86.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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--.f6455.6

        \[\leadsto \left(b - a\right) \cdot t \]
    4. Applied rewrites55.6%

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

      \[\leadsto b \cdot t \]
    6. Step-by-step derivation
      1. Applied rewrites30.7%

        \[\leadsto b \cdot t \]

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

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x - -1 \cdot \color{blue}{z} \]
        3. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
          2. lift-neg.f6437.0

            \[\leadsto x - \left(-z\right) \]
        4. Applied rewrites37.0%

          \[\leadsto x - \left(-z\right) \]
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 3: 84.4% accurate, 0.9× speedup?

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

        1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

        if -0.068000000000000005 < b < 2.4e12

        1. Initial program 99.2%

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

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

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

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

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

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

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

            \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
          7. lift--.f6491.3

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

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

        if 1.85000000000000011e166 < b

        1. Initial program 89.3%

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

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

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

        Alternative 4: 50.5% accurate, 1.1× speedup?

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

          1. Initial program 92.4%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. 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--.f6463.7

              \[\leadsto \left(b - a\right) \cdot t \]
          4. Applied rewrites63.7%

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

          if -4.30000000000000037e-22 < t < 2.2999999999999999e-101

          1. Initial program 97.4%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. 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--.f6439.8

              \[\leadsto \left(b - z\right) \cdot y \]
          4. Applied rewrites39.8%

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

          if 2.2999999999999999e-101 < t < 3.10000000000000014e-5

          1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \mathsf{fma}\left(\color{blue}{t - 1}, a, -z\right) \]
          6. Step-by-step derivation
            1. Applied rewrites50.8%

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

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            3. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
              2. lift-neg.f6432.6

                \[\leadsto x - \left(-z\right) \]
            4. Applied rewrites32.6%

              \[\leadsto x - \left(-z\right) \]

            if 3.10000000000000014e-5 < t < 2.4e53

            1. Initial program 98.2%

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

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

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

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

                \[\leadsto \left(1 - y\right) \cdot z \]
            4. Applied rewrites32.1%

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

          Alternative 5: 47.8% accurate, 1.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ t_2 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -4.3 \cdot 10^{-22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-261}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;x - \left(-z\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (- 1.0 y) z)) (t_2 (* (- b a) t)))
             (if (<= t -4.3e-22)
               t_2
               (if (<= t 3.7e-261)
                 t_1
                 (if (<= t 3.1e-5) (- x (- z)) (if (<= t 2.4e+53) t_1 t_2))))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (1.0 - y) * z;
          	double t_2 = (b - a) * t;
          	double tmp;
          	if (t <= -4.3e-22) {
          		tmp = t_2;
          	} else if (t <= 3.7e-261) {
          		tmp = t_1;
          	} else if (t <= 3.1e-5) {
          		tmp = x - -z;
          	} else if (t <= 2.4e+53) {
          		tmp = t_1;
          	} else {
          		tmp = t_2;
          	}
          	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) :: t_2
              real(8) :: tmp
              t_1 = (1.0d0 - y) * z
              t_2 = (b - a) * t
              if (t <= (-4.3d-22)) then
                  tmp = t_2
              else if (t <= 3.7d-261) then
                  tmp = t_1
              else if (t <= 3.1d-5) then
                  tmp = x - -z
              else if (t <= 2.4d+53) then
                  tmp = t_1
              else
                  tmp = t_2
              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 t_2 = (b - a) * t;
          	double tmp;
          	if (t <= -4.3e-22) {
          		tmp = t_2;
          	} else if (t <= 3.7e-261) {
          		tmp = t_1;
          	} else if (t <= 3.1e-5) {
          		tmp = x - -z;
          	} else if (t <= 2.4e+53) {
          		tmp = t_1;
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = (1.0 - y) * z
          	t_2 = (b - a) * t
          	tmp = 0
          	if t <= -4.3e-22:
          		tmp = t_2
          	elif t <= 3.7e-261:
          		tmp = t_1
          	elif t <= 3.1e-5:
          		tmp = x - -z
          	elif t <= 2.4e+53:
          		tmp = t_1
          	else:
          		tmp = t_2
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(1.0 - y) * z)
          	t_2 = Float64(Float64(b - a) * t)
          	tmp = 0.0
          	if (t <= -4.3e-22)
          		tmp = t_2;
          	elseif (t <= 3.7e-261)
          		tmp = t_1;
          	elseif (t <= 3.1e-5)
          		tmp = Float64(x - Float64(-z));
          	elseif (t <= 2.4e+53)
          		tmp = t_1;
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = (1.0 - y) * z;
          	t_2 = (b - a) * t;
          	tmp = 0.0;
          	if (t <= -4.3e-22)
          		tmp = t_2;
          	elseif (t <= 3.7e-261)
          		tmp = t_1;
          	elseif (t <= 3.1e-5)
          		tmp = x - -z;
          	elseif (t <= 2.4e+53)
          		tmp = t_1;
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.3e-22], t$95$2, If[LessEqual[t, 3.7e-261], t$95$1, If[LessEqual[t, 3.1e-5], N[(x - (-z)), $MachinePrecision], If[LessEqual[t, 2.4e+53], t$95$1, t$95$2]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(1 - y\right) \cdot z\\
          t_2 := \left(b - a\right) \cdot t\\
          \mathbf{if}\;t \leq -4.3 \cdot 10^{-22}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;t \leq 3.7 \cdot 10^{-261}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 3.1 \cdot 10^{-5}:\\
          \;\;\;\;x - \left(-z\right)\\
          
          \mathbf{elif}\;t \leq 2.4 \cdot 10^{+53}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if t < -4.30000000000000037e-22 or 2.4e53 < t

            1. Initial program 92.4%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. 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--.f6463.7

                \[\leadsto \left(b - a\right) \cdot t \]
            4. Applied rewrites63.7%

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

            if -4.30000000000000037e-22 < t < 3.7000000000000002e-261 or 3.10000000000000014e-5 < t < 2.4e53

            1. Initial program 97.7%

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

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

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

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

                \[\leadsto \left(1 - y\right) \cdot z \]
            4. Applied rewrites33.6%

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

            if 3.7000000000000002e-261 < t < 3.10000000000000014e-5

            1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x - -1 \cdot \color{blue}{z} \]
              3. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
                2. lift-neg.f6431.5

                  \[\leadsto x - \left(-z\right) \]
              4. Applied rewrites31.5%

                \[\leadsto x - \left(-z\right) \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 6: 84.0% accurate, 1.1× speedup?

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

              1. Initial program 89.7%

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

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

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

                if -3.6e44 < b < 2.05999999999999986e64

                1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 55.8% accurate, 1.2× speedup?

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

                1. Initial program 92.3%

                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                2. 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--.f6464.5

                    \[\leadsto \left(b - a\right) \cdot t \]
                4. Applied rewrites64.5%

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

                if -1.0499999999999999e22 < t < 3.19999999999999986e-5

                1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x - \left(-1 \cdot a - z\right) \]
                    2. mul-1-negN/A

                      \[\leadsto x - \left(\left(\mathsf{neg}\left(a\right)\right) - z\right) \]
                    3. lower-neg.f6448.5

                      \[\leadsto x - \left(\left(-a\right) - z\right) \]
                  4. Applied rewrites48.5%

                    \[\leadsto x - \left(\left(-a\right) - \color{blue}{z}\right) \]

                  if 3.19999999999999986e-5 < t < 2.4e53

                  1. Initial program 98.2%

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

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

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

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

                      \[\leadsto \left(1 - y\right) \cdot z \]
                  4. Applied rewrites32.1%

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

                  if 2.4e53 < t

                  1. Initial program 91.7%

                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                  2. 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--.f6470.8

                      \[\leadsto \left(b - a\right) \cdot t \]
                  4. Applied rewrites70.8%

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, b \cdot t\right) \]
                    4. lower-neg.f64N/A

                      \[\leadsto \mathsf{fma}\left(-a, t, b \cdot t\right) \]
                    5. lower-*.f6468.4

                      \[\leadsto \mathsf{fma}\left(-a, t, b \cdot t\right) \]
                  7. Applied rewrites68.4%

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

                Alternative 8: 68.9% accurate, 1.2× speedup?

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

                  1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x - z \cdot y\right) \]
                  8. Step-by-step derivation
                    1. +-commutative73.8

                      \[\leadsto \mathsf{fma}\left(y, b, x - z \cdot y\right) \]
                  9. Applied rewrites73.8%

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

                  if -3.2e16 < y < 4.89999999999999996e89

                  1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.89999999999999996e89 < y

                    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(\mathsf{neg}\left(y\right)\right) \cdot z\right) \]
                      6. lower-neg.f6473.5

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

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

                  Alternative 9: 56.3% accurate, 1.4× speedup?

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

                    1. Initial program 92.0%

                      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                    2. 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--.f6467.5

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

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

                    if -1.0499999999999999e22 < t < 3.19999999999999986e-5

                    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x - \left(-1 \cdot a - z\right) \]
                        2. mul-1-negN/A

                          \[\leadsto x - \left(\left(\mathsf{neg}\left(a\right)\right) - z\right) \]
                        3. lower-neg.f6448.5

                          \[\leadsto x - \left(\left(-a\right) - z\right) \]
                      4. Applied rewrites48.5%

                        \[\leadsto x - \left(\left(-a\right) - \color{blue}{z}\right) \]

                      if 3.19999999999999986e-5 < t < 2.4e53

                      1. Initial program 98.2%

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

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

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

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

                          \[\leadsto \left(1 - y\right) \cdot z \]
                      4. Applied rewrites32.1%

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

                    Alternative 10: 40.4% accurate, 1.4× speedup?

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

                      1. Initial program 92.5%

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

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

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

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

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

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

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

                          \[\leadsto -1 \cdot \left(a \cdot t\right) + a \]
                        2. associate-*r*N/A

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

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

                          \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, a\right) \]
                        5. lower-neg.f6450.0

                          \[\leadsto \mathsf{fma}\left(-a, t, a\right) \]
                      7. Applied rewrites50.0%

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

                      if -1750 < a < -1.21999999999999997e-104

                      1. Initial program 97.8%

                        \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                      2. 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--.f6437.0

                          \[\leadsto \left(b - z\right) \cdot y \]
                      4. Applied rewrites37.0%

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

                        \[\leadsto \left(-1 \cdot z\right) \cdot y \]
                      6. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot y \]
                        2. lower-neg.f6420.6

                          \[\leadsto \left(-z\right) \cdot y \]
                      7. Applied rewrites20.6%

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

                      if -1.21999999999999997e-104 < a < 0.0719999999999999946

                      1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x - -1 \cdot \color{blue}{z} \]
                        3. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
                          2. lift-neg.f6432.9

                            \[\leadsto x - \left(-z\right) \]
                        4. Applied rewrites32.9%

                          \[\leadsto x - \left(-z\right) \]
                      7. Recombined 3 regimes into one program.
                      8. Add Preprocessing

                      Alternative 11: 70.2% accurate, 1.4× speedup?

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

                        1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x - z \cdot y\right) \]
                        8. Step-by-step derivation
                          1. +-commutative74.0

                            \[\leadsto \mathsf{fma}\left(y, b, x - z \cdot y\right) \]
                        9. Applied rewrites74.0%

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

                        if -3.2e16 < y < 7.7999999999999999e46

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 12: 71.8% accurate, 1.4× speedup?

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

                          1. Initial program 89.8%

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

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

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

                            if -3.6e44 < b < 3.5999999999999999e59

                            1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 67.2% accurate, 1.4× speedup?

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

                              1. Initial program 90.9%

                                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                              2. 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--.f6470.6

                                  \[\leadsto \left(b - z\right) \cdot y \]
                              4. Applied rewrites70.6%

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

                              if -1.95e43 < y < 7.0000000000000001e89

                              1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 14: 34.1% accurate, 1.4× speedup?

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

                                1. Initial program 92.4%

                                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                2. 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--.f6465.0

                                    \[\leadsto \left(b - a\right) \cdot t \]
                                4. Applied rewrites65.0%

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

                                  \[\leadsto \left(-1 \cdot a\right) \cdot t \]
                                6. Step-by-step derivation
                                  1. mul-1-negN/A

                                    \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot t \]
                                  2. lower-neg.f6437.5

                                    \[\leadsto \left(-a\right) \cdot t \]
                                7. Applied rewrites37.5%

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

                                if -5.49999999999999966e27 < t < 1.05000000000000004e91

                                1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto x - -1 \cdot \color{blue}{z} \]
                                  3. Step-by-step derivation
                                    1. mul-1-negN/A

                                      \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
                                    2. lift-neg.f6430.7

                                      \[\leadsto x - \left(-z\right) \]
                                  4. Applied rewrites30.7%

                                    \[\leadsto x - \left(-z\right) \]

                                  if 1.3000000000000001e200 < t

                                  1. Initial program 88.3%

                                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                  2. 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--.f6483.4

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

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

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

                                      \[\leadsto b \cdot t \]
                                  7. Recombined 3 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 15: 41.7% accurate, 1.8× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(-a, t, a\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 -4.3e-24) t_1 (if (<= z 6.5e+118) (fma (- a) 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 <= -4.3e-24) {
                                  		tmp = t_1;
                                  	} else if (z <= 6.5e+118) {
                                  		tmp = fma(-a, 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 <= -4.3e-24)
                                  		tmp = t_1;
                                  	elseif (z <= 6.5e+118)
                                  		tmp = fma(Float64(-a), t, a);
                                  	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, -4.3e-24], t$95$1, If[LessEqual[z, 6.5e+118], N[((-a) * t + a), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \left(1 - y\right) \cdot z\\
                                  \mathbf{if}\;z \leq -4.3 \cdot 10^{-24}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;z \leq 6.5 \cdot 10^{+118}:\\
                                  \;\;\;\;\mathsf{fma}\left(-a, t, a\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if z < -4.3000000000000003e-24 or 6.5e118 < z

                                    1. Initial program 91.5%

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

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

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

                                        \[\leadsto \left(1 - y\right) \cdot \color{blue}{z} \]
                                      3. lower--.f6452.8

                                        \[\leadsto \left(1 - y\right) \cdot z \]
                                    4. Applied rewrites52.8%

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

                                    if -4.3000000000000003e-24 < z < 6.5e118

                                    1. Initial program 97.7%

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

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

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

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

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

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

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

                                        \[\leadsto -1 \cdot \left(a \cdot t\right) + a \]
                                      2. associate-*r*N/A

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

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

                                        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, a\right) \]
                                      5. lower-neg.f6433.6

                                        \[\leadsto \mathsf{fma}\left(-a, t, a\right) \]
                                    7. Applied rewrites33.6%

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

                                  Alternative 16: 26.4% accurate, 2.1× speedup?

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

                                    1. Initial program 90.9%

                                      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                    2. 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--.f6438.4

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

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

                                      \[\leadsto b \cdot t \]
                                    6. Step-by-step derivation
                                      1. Applied rewrites30.8%

                                        \[\leadsto b \cdot t \]

                                      if -2.8999999999999998e-16 < b < 4.4e22

                                      1. Initial program 99.2%

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

                                        \[\leadsto \color{blue}{x} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites22.0%

                                          \[\leadsto \color{blue}{x} \]
                                      4. Recombined 2 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 17: 17.7% accurate, 5.3× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+136}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b) :precision binary64 (if (<= a -4.1e+136) a x))
                                      double code(double x, double y, double z, double t, double a, double b) {
                                      	double tmp;
                                      	if (a <= -4.1e+136) {
                                      		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 (a <= (-4.1d+136)) 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 (a <= -4.1e+136) {
                                      		tmp = a;
                                      	} else {
                                      		tmp = x;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a, b):
                                      	tmp = 0
                                      	if a <= -4.1e+136:
                                      		tmp = a
                                      	else:
                                      		tmp = x
                                      	return tmp
                                      
                                      function code(x, y, z, t, a, b)
                                      	tmp = 0.0
                                      	if (a <= -4.1e+136)
                                      		tmp = a;
                                      	else
                                      		tmp = x;
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a, b)
                                      	tmp = 0.0;
                                      	if (a <= -4.1e+136)
                                      		tmp = a;
                                      	else
                                      		tmp = x;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.1e+136], a, x]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;a \leq -4.1 \cdot 10^{+136}:\\
                                      \;\;\;\;a\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;x\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if a < -4.0999999999999998e136

                                        1. Initial program 89.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. *-commutativeN/A

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

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

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

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

                                            \[\leadsto a \]

                                          if -4.0999999999999998e136 < a

                                          1. Initial program 96.0%

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

                                            \[\leadsto \color{blue}{x} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites16.7%

                                              \[\leadsto \color{blue}{x} \]
                                          4. Recombined 2 regimes into one program.
                                          5. Add Preprocessing

                                          Alternative 18: 15.4% accurate, 37.0× 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.1%

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

                                            \[\leadsto \color{blue}{x} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites15.4%

                                              \[\leadsto \color{blue}{x} \]
                                            2. Add Preprocessing

                                            Reproduce

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