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

Percentage Accurate: 95.2% → 96.3%
Time: 5.8s
Alternatives: 23
Speedup: 1.1×

Specification

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

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

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

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

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

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 96.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2e-132

    1. Initial program 95.7%

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

        \[\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) \]
    5. Applied rewrites96.8%

      \[\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)} \]

    if 2e-132 < t

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 2.7 \cdot 10^{-23}:\\
\;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.09999999999999973e99

    1. Initial program 90.6%

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

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

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

      if -6.09999999999999973e99 < b < 2.69999999999999985e-23

      1. Initial program 98.4%

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

        \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
      4. 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.4

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

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

      if 2.69999999999999985e-23 < b

      1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 55.0% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -155000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-80}:\\ \;\;\;\;\mathsf{fma}\left(-y, z, z\right)\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-86}:\\ \;\;\;\;x - \left(\left(-a\right) - z\right)\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+19}:\\ \;\;\;\;\left(b - z\right) \cdot y\\ \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 -155000000000.0)
         t_1
         (if (<= t -4.4e-80)
           (fma (- y) z z)
           (if (<= t 1.65e-86)
             (- x (- (- a) z))
             (if (<= t 1.05e+19) (* (- b z) y) 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 <= -155000000000.0) {
    		tmp = t_1;
    	} else if (t <= -4.4e-80) {
    		tmp = fma(-y, z, z);
    	} else if (t <= 1.65e-86) {
    		tmp = x - (-a - z);
    	} else if (t <= 1.05e+19) {
    		tmp = (b - z) * y;
    	} 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 <= -155000000000.0)
    		tmp = t_1;
    	elseif (t <= -4.4e-80)
    		tmp = fma(Float64(-y), z, z);
    	elseif (t <= 1.65e-86)
    		tmp = Float64(x - Float64(Float64(-a) - z));
    	elseif (t <= 1.05e+19)
    		tmp = Float64(Float64(b - z) * y);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -155000000000.0], t$95$1, If[LessEqual[t, -4.4e-80], N[((-y) * z + z), $MachinePrecision], If[LessEqual[t, 1.65e-86], N[(x - N[((-a) - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+19], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(b - a\right) \cdot t\\
    \mathbf{if}\;t \leq -155000000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq -4.4 \cdot 10^{-80}:\\
    \;\;\;\;\mathsf{fma}\left(-y, z, z\right)\\
    
    \mathbf{elif}\;t \leq 1.65 \cdot 10^{-86}:\\
    \;\;\;\;x - \left(\left(-a\right) - z\right)\\
    
    \mathbf{elif}\;t \leq 1.05 \cdot 10^{+19}:\\
    \;\;\;\;\left(b - z\right) \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if t < -1.55e11 or 1.05e19 < t

      1. Initial program 92.2%

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

        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
      4. 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.7

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

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

      if -1.55e11 < t < -4.4000000000000002e-80

      1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(y\right), z, z\right) \]
        5. lower-neg.f6431.6

          \[\leadsto \mathsf{fma}\left(-y, z, z\right) \]
      8. Applied rewrites31.6%

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

      if -4.4000000000000002e-80 < t < 1.64999999999999993e-86

      1. Initial program 98.1%

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

        \[\leadsto \color{blue}{\left(x + \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)} \]
      4. 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) \]
      5. 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)} \]
      6. Taylor expanded in x around inf

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

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

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

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

        if 1.64999999999999993e-86 < t < 1.05e19

        1. Initial program 97.2%

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

          \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
        4. 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--.f6436.8

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

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

      Alternative 4: 50.8% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -1.45 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-58}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-246}:\\ \;\;\;\;x - \left(-z\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+103}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* (- b z) y)))
         (if (<= y -1.45e+15)
           t_1
           (if (<= y -2e-58)
             (* (- 1.0 t) a)
             (if (<= y -1.95e-246)
               (- x (- z))
               (if (<= y 4.8e+103) (* (- b a) t) t_1))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (b - z) * y;
      	double tmp;
      	if (y <= -1.45e+15) {
      		tmp = t_1;
      	} else if (y <= -2e-58) {
      		tmp = (1.0 - t) * a;
      	} else if (y <= -1.95e-246) {
      		tmp = x - -z;
      	} else if (y <= 4.8e+103) {
      		tmp = (b - a) * t;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (b - z) * y
          if (y <= (-1.45d+15)) then
              tmp = t_1
          else if (y <= (-2d-58)) then
              tmp = (1.0d0 - t) * a
          else if (y <= (-1.95d-246)) then
              tmp = x - -z
          else if (y <= 4.8d+103) then
              tmp = (b - a) * t
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (b - z) * y;
      	double tmp;
      	if (y <= -1.45e+15) {
      		tmp = t_1;
      	} else if (y <= -2e-58) {
      		tmp = (1.0 - t) * a;
      	} else if (y <= -1.95e-246) {
      		tmp = x - -z;
      	} else if (y <= 4.8e+103) {
      		tmp = (b - a) * t;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = (b - z) * y
      	tmp = 0
      	if y <= -1.45e+15:
      		tmp = t_1
      	elif y <= -2e-58:
      		tmp = (1.0 - t) * a
      	elif y <= -1.95e-246:
      		tmp = x - -z
      	elif y <= 4.8e+103:
      		tmp = (b - a) * t
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(b - z) * y)
      	tmp = 0.0
      	if (y <= -1.45e+15)
      		tmp = t_1;
      	elseif (y <= -2e-58)
      		tmp = Float64(Float64(1.0 - t) * a);
      	elseif (y <= -1.95e-246)
      		tmp = Float64(x - Float64(-z));
      	elseif (y <= 4.8e+103)
      		tmp = Float64(Float64(b - a) * t);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = (b - z) * y;
      	tmp = 0.0;
      	if (y <= -1.45e+15)
      		tmp = t_1;
      	elseif (y <= -2e-58)
      		tmp = (1.0 - t) * a;
      	elseif (y <= -1.95e-246)
      		tmp = x - -z;
      	elseif (y <= 4.8e+103)
      		tmp = (b - a) * t;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.45e+15], t$95$1, If[LessEqual[y, -2e-58], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, -1.95e-246], N[(x - (-z)), $MachinePrecision], If[LessEqual[y, 4.8e+103], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(b - z\right) \cdot y\\
      \mathbf{if}\;y \leq -1.45 \cdot 10^{+15}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -2 \cdot 10^{-58}:\\
      \;\;\;\;\left(1 - t\right) \cdot a\\
      
      \mathbf{elif}\;y \leq -1.95 \cdot 10^{-246}:\\
      \;\;\;\;x - \left(-z\right)\\
      
      \mathbf{elif}\;y \leq 4.8 \cdot 10^{+103}:\\
      \;\;\;\;\left(b - a\right) \cdot t\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < -1.45e15 or 4.7999999999999997e103 < 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. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

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

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

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

        if -1.45e15 < y < -2.0000000000000001e-58

        1. Initial program 97.9%

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

          \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
        4. 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--.f6432.9

            \[\leadsto \left(1 - t\right) \cdot a \]
        5. Applied rewrites32.9%

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

        if -2.0000000000000001e-58 < y < -1.94999999999999989e-246

        1. Initial program 98.3%

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

          \[\leadsto \color{blue}{\left(x + \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)} \]
        4. 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.3

            \[\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) \]
        5. Applied rewrites98.3%

          \[\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)} \]
        6. Taylor expanded in x around inf

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

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

              \[\leadsto x - \left(-z\right) \]
          4. Applied rewrites39.1%

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

          if -1.94999999999999989e-246 < y < 4.7999999999999997e103

          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. Add Preprocessing
          3. Taylor expanded in t around inf

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

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

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

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

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

        Alternative 5: 68.9% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -5.4 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.22 \cdot 10^{-54}:\\ \;\;\;\;x - \mathsf{fma}\left(z, y - 1, -a\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{+33}:\\ \;\;\;\;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 (* (- (+ t y) 2.0) b)))
           (if (<= b -5.4e+99)
             t_1
             (if (<= b -2.22e-54)
               (- x (fma z (- y 1.0) (- a)))
               (if (<= b 3.2e+33) (- 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 = ((t + y) - 2.0) * b;
        	double tmp;
        	if (b <= -5.4e+99) {
        		tmp = t_1;
        	} else if (b <= -2.22e-54) {
        		tmp = x - fma(z, (y - 1.0), -a);
        	} else if (b <= 3.2e+33) {
        		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(Float64(t + y) - 2.0) * b)
        	tmp = 0.0
        	if (b <= -5.4e+99)
        		tmp = t_1;
        	elseif (b <= -2.22e-54)
        		tmp = Float64(x - fma(z, Float64(y - 1.0), Float64(-a)));
        	elseif (b <= 3.2e+33)
        		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[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.4e+99], t$95$1, If[LessEqual[b, -2.22e-54], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e+33], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
        \mathbf{if}\;b \leq -5.4 \cdot 10^{+99}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;b \leq -2.22 \cdot 10^{-54}:\\
        \;\;\;\;x - \mathsf{fma}\left(z, y - 1, -a\right)\\
        
        \mathbf{elif}\;b \leq 3.2 \cdot 10^{+33}:\\
        \;\;\;\;x - \mathsf{fma}\left(t - 1, a, -z\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -5.39999999999999978e99 or 3.20000000000000017e33 < b

          1. Initial program 90.1%

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

            \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
          4. 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-*.f6473.0

              \[\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-+.f6473.0

              \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
          5. Applied rewrites73.0%

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

          if -5.39999999999999978e99 < b < -2.2200000000000001e-54

          1. Initial program 95.3%

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

            \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
          4. 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--.f6467.4

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

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

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

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

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

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

              \[\leadsto x - \mathsf{fma}\left(z, y - 1, \mathsf{neg}\left(a\right)\right) \]
            5. lower-neg.f6450.9

              \[\leadsto x - \mathsf{fma}\left(z, y - 1, -a\right) \]
          8. Applied rewrites50.9%

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

          if -2.2200000000000001e-54 < b < 3.20000000000000017e33

          1. Initial program 99.3%

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

            \[\leadsto \color{blue}{\left(x + \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)} \]
          4. 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.3

              \[\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) \]
          5. Applied rewrites99.3%

            \[\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)} \]
          6. Taylor expanded in x around inf

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

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

          Alternative 6: 83.4% accurate, 1.1× speedup?

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

            1. Initial program 90.6%

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

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

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

              if -6.09999999999999973e99 < b < 1e22

              1. Initial program 98.5%

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

                \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
              4. 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--.f6487.5

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

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

              if 1e22 < b

              1. Initial program 90.0%

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

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

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

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

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

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

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

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

                    \[\leadsto x + b \cdot \color{blue}{\left(t + \left(y - 2\right)\right)} \]
                  7. distribute-lft-outN/A

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

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

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

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

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

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

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

              Alternative 7: 97.6% accurate, 1.1× speedup?

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

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Add Preprocessing
              3. 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) \]
              4. Applied rewrites97.6%

                \[\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)} \]
              5. Add Preprocessing

              Alternative 8: 76.1% accurate, 1.2× speedup?

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

                1. Initial program 90.6%

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

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

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

                  if -5.70000000000000003e99 < b < 6.6e21

                  1. Initial program 98.5%

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

                    \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                  4. 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--.f6487.5

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

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

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

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

                    if 6.6e21 < b

                    1. Initial program 90.1%

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

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

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

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

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

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

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

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

                          \[\leadsto x + b \cdot \color{blue}{\left(t + \left(y - 2\right)\right)} \]
                        7. distribute-lft-outN/A

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

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

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

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

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

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

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

                    Alternative 9: 76.5% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -5.7 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{+21}:\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, y \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 -5.7e+99)
                         t_1
                         (if (<= b 6.6e+21) (- x (fma (- t 1.0) a (* y 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 <= -5.7e+99) {
                    		tmp = t_1;
                    	} else if (b <= 6.6e+21) {
                    		tmp = x - fma((t - 1.0), a, (y * 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 <= -5.7e+99)
                    		tmp = t_1;
                    	elseif (b <= 6.6e+21)
                    		tmp = Float64(x - fma(Float64(t - 1.0), a, Float64(y * 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, -5.7e+99], t$95$1, If[LessEqual[b, 6.6e+21], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + N[(y * 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 -5.7 \cdot 10^{+99}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;b \leq 6.6 \cdot 10^{+21}:\\
                    \;\;\;\;x - \mathsf{fma}\left(t - 1, a, y \cdot z\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if b < -5.70000000000000003e99 or 6.6e21 < b

                      1. Initial program 90.3%

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

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

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

                        if -5.70000000000000003e99 < b < 6.6e21

                        1. Initial program 98.5%

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

                          \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                        4. 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--.f6487.5

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

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

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

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

                        Alternative 10: 50.7% accurate, 1.4× speedup?

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

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

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

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

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

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

                          if -8.5e14 < y < 3.40000000000000007e-295

                          1. Initial program 98.1%

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

                            \[\leadsto \color{blue}{\left(x + \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)} \]
                          4. 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.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) \]
                          5. Applied rewrites98.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)} \]
                          6. Taylor expanded in x around inf

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

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

                              \[\leadsto x - a \cdot \color{blue}{t} \]
                            3. Step-by-step derivation
                              1. lower-*.f6438.2

                                \[\leadsto x - a \cdot t \]
                            4. Applied rewrites38.2%

                              \[\leadsto x - a \cdot \color{blue}{t} \]

                            if 3.40000000000000007e-295 < y < 4.7999999999999997e103

                            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. Add Preprocessing
                            3. Taylor expanded in t around inf

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

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

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

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

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

                          Alternative 11: 42.5% accurate, 1.4× speedup?

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

                            1. Initial program 91.1%

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

                              \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                            4. 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--.f6458.8

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(y\right), z, z\right) \]
                              5. lower-neg.f6458.9

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

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

                            if -2.20000000000000009e98 < z < -2.05000000000000003e30

                            1. Initial program 96.6%

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

                              \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                            4. 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--.f6432.8

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

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

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

                                \[\leadsto b \cdot y \]

                              if -2.05000000000000003e30 < z < 1.5e48

                              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. Add Preprocessing
                              3. Taylor expanded in a around inf

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

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

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

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

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

                            Alternative 12: 71.3% accurate, 1.4× speedup?

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

                              1. Initial program 91.2%

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

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

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

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

                                  \[\leadsto \left(1 - t\right) \cdot a + \left(\left(y + t\right) - 2\right) \cdot b \]
                              5. Applied rewrites76.5%

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

                                \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
                              7. Step-by-step derivation
                                1. Applied rewrites74.3%

                                  \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]

                                if -5.8000000000000003e34 < b < 9.4e20

                                1. Initial program 99.0%

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

                                  \[\leadsto \color{blue}{\left(x + \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)} \]
                                4. 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) \]
                                5. 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)} \]
                                6. Taylor expanded in x around inf

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

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

                                  if 9.4e20 < b

                                  1. Initial program 90.1%

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

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

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

                                  Alternative 13: 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 -1.48 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 9.4 \cdot 10^{+20}:\\ \;\;\;\;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 -1.48e+32)
                                       t_1
                                       (if (<= b 9.4e+20) (- 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 <= -1.48e+32) {
                                  		tmp = t_1;
                                  	} else if (b <= 9.4e+20) {
                                  		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 <= -1.48e+32)
                                  		tmp = t_1;
                                  	elseif (b <= 9.4e+20)
                                  		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, -1.48e+32], t$95$1, If[LessEqual[b, 9.4e+20], 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 -1.48 \cdot 10^{+32}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;b \leq 9.4 \cdot 10^{+20}:\\
                                  \;\;\;\;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 < -1.4799999999999999e32 or 9.4e20 < b

                                    1. Initial program 90.7%

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

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

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

                                      if -1.4799999999999999e32 < b < 9.4e20

                                      1. Initial program 99.1%

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

                                        \[\leadsto \color{blue}{\left(x + \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)} \]
                                      4. 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) \]
                                      5. 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)} \]
                                      6. Taylor expanded in x around inf

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

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

                                      Alternative 14: 69.1% accurate, 1.4× speedup?

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

                                        1. Initial program 90.1%

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

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

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

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

                                        if -5.39999999999999978e99 < b < 4.60000000000000021e33

                                        1. Initial program 98.5%

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

                                          \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
                                        4. 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--.f6487.2

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

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

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

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

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

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

                                            \[\leadsto x - \mathsf{fma}\left(z, y - 1, \mathsf{neg}\left(a\right)\right) \]
                                          5. lower-neg.f6466.5

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

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

                                      Alternative 15: 35.4% accurate, 1.4× speedup?

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

                                        1. Initial program 89.2%

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

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

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

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

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

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

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

                                            \[\leadsto b \cdot t \]

                                          if -2.6000000000000001e83 < t < 3.5e19

                                          1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(y\right), z, z\right) \]
                                            5. lower-neg.f6433.3

                                              \[\leadsto \mathsf{fma}\left(-y, z, z\right) \]
                                          8. Applied rewrites33.3%

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

                                          if 3.5e19 < t < 1.22000000000000005e212

                                          1. Initial program 94.9%

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

                                            \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                          4. 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--.f6459.4

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

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

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

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

                                              \[\leadsto \left(-a\right) \cdot t \]
                                          8. Applied rewrites34.2%

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

                                        Alternative 16: 35.2% accurate, 1.5× speedup?

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

                                          1. Initial program 91.6%

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

                                            \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                          4. 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--.f6468.2

                                              \[\leadsto \left(b - z\right) \cdot y \]
                                          5. Applied rewrites68.2%

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

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

                                              \[\leadsto b \cdot y \]

                                            if -7.2e9 < y < 0.045999999999999999

                                            1. Initial program 97.9%

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

                                              \[\leadsto \color{blue}{\left(x + \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)} \]
                                            4. 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) \]
                                            5. 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)} \]
                                            6. Taylor expanded in x around inf

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

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

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

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

                                              if 0.045999999999999999 < y < 2.4499999999999999e95

                                              1. Initial program 97.0%

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

                                                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                              4. 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--.f6434.2

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

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

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

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

                                              Alternative 17: 25.3% accurate, 1.5× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -134000000000:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-276}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a b)
                                               :precision binary64
                                               (if (<= t -134000000000.0)
                                                 (* b t)
                                                 (if (<= t 1.55e-276) z (if (<= t 4e+37) x (* b t)))))
                                              double code(double x, double y, double z, double t, double a, double b) {
                                              	double tmp;
                                              	if (t <= -134000000000.0) {
                                              		tmp = b * t;
                                              	} else if (t <= 1.55e-276) {
                                              		tmp = z;
                                              	} else if (t <= 4e+37) {
                                              		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 (t <= (-134000000000.0d0)) then
                                                      tmp = b * t
                                                  else if (t <= 1.55d-276) then
                                                      tmp = z
                                                  else if (t <= 4d+37) 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 (t <= -134000000000.0) {
                                              		tmp = b * t;
                                              	} else if (t <= 1.55e-276) {
                                              		tmp = z;
                                              	} else if (t <= 4e+37) {
                                              		tmp = x;
                                              	} else {
                                              		tmp = b * t;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x, y, z, t, a, b):
                                              	tmp = 0
                                              	if t <= -134000000000.0:
                                              		tmp = b * t
                                              	elif t <= 1.55e-276:
                                              		tmp = z
                                              	elif t <= 4e+37:
                                              		tmp = x
                                              	else:
                                              		tmp = b * t
                                              	return tmp
                                              
                                              function code(x, y, z, t, a, b)
                                              	tmp = 0.0
                                              	if (t <= -134000000000.0)
                                              		tmp = Float64(b * t);
                                              	elseif (t <= 1.55e-276)
                                              		tmp = z;
                                              	elseif (t <= 4e+37)
                                              		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 (t <= -134000000000.0)
                                              		tmp = b * t;
                                              	elseif (t <= 1.55e-276)
                                              		tmp = z;
                                              	elseif (t <= 4e+37)
                                              		tmp = x;
                                              	else
                                              		tmp = b * t;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -134000000000.0], N[(b * t), $MachinePrecision], If[LessEqual[t, 1.55e-276], z, If[LessEqual[t, 4e+37], x, N[(b * t), $MachinePrecision]]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;t \leq -134000000000:\\
                                              \;\;\;\;b \cdot t\\
                                              
                                              \mathbf{elif}\;t \leq 1.55 \cdot 10^{-276}:\\
                                              \;\;\;\;z\\
                                              
                                              \mathbf{elif}\;t \leq 4 \cdot 10^{+37}:\\
                                              \;\;\;\;x\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;b \cdot t\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if t < -1.34e11 or 3.99999999999999982e37 < t

                                                1. Initial program 92.1%

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

                                                  \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                4. 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--.f6466.4

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

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

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

                                                    \[\leadsto b \cdot t \]

                                                  if -1.34e11 < t < 1.54999999999999995e-276

                                                  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. Add Preprocessing
                                                  3. Taylor expanded in z around inf

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

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

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

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

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

                                                    \[\leadsto z \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites14.8%

                                                      \[\leadsto z \]

                                                    if 1.54999999999999995e-276 < t < 3.99999999999999982e37

                                                    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. Add Preprocessing
                                                    3. Taylor expanded in x around inf

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

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

                                                    Alternative 18: 61.7% accurate, 1.5× speedup?

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

                                                      1. Initial program 90.5%

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

                                                        \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                                      4. 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-*.f6469.3

                                                          \[\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-+.f6469.3

                                                          \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
                                                      5. Applied rewrites69.3%

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

                                                      if -5.8000000000000003e34 < b < 3.5e31

                                                      1. Initial program 99.0%

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

                                                        \[\leadsto \color{blue}{\left(x + \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)} \]
                                                      4. 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) \]
                                                      5. 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)} \]
                                                      6. Taylor expanded in x around inf

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

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

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

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

                                                        Alternative 19: 56.4% accurate, 1.5× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.7 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+31}:\\ \;\;\;\;x - \left(\left(-a\right) - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a b)
                                                         :precision binary64
                                                         (let* ((t_1 (* (- (+ t y) 2.0) b)))
                                                           (if (<= b -1.7e+33) t_1 (if (<= b 3.7e+31) (- x (- (- a) z)) t_1))))
                                                        double code(double x, double y, double z, double t, double a, double b) {
                                                        	double t_1 = ((t + y) - 2.0) * b;
                                                        	double tmp;
                                                        	if (b <= -1.7e+33) {
                                                        		tmp = t_1;
                                                        	} else if (b <= 3.7e+31) {
                                                        		tmp = x - (-a - 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 = ((t + y) - 2.0d0) * b
                                                            if (b <= (-1.7d+33)) then
                                                                tmp = t_1
                                                            else if (b <= 3.7d+31) then
                                                                tmp = x - (-a - 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 = ((t + y) - 2.0) * b;
                                                        	double tmp;
                                                        	if (b <= -1.7e+33) {
                                                        		tmp = t_1;
                                                        	} else if (b <= 3.7e+31) {
                                                        		tmp = x - (-a - z);
                                                        	} else {
                                                        		tmp = t_1;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(x, y, z, t, a, b):
                                                        	t_1 = ((t + y) - 2.0) * b
                                                        	tmp = 0
                                                        	if b <= -1.7e+33:
                                                        		tmp = t_1
                                                        	elif b <= 3.7e+31:
                                                        		tmp = x - (-a - z)
                                                        	else:
                                                        		tmp = t_1
                                                        	return tmp
                                                        
                                                        function code(x, y, z, t, a, b)
                                                        	t_1 = Float64(Float64(Float64(t + y) - 2.0) * b)
                                                        	tmp = 0.0
                                                        	if (b <= -1.7e+33)
                                                        		tmp = t_1;
                                                        	elseif (b <= 3.7e+31)
                                                        		tmp = Float64(x - Float64(Float64(-a) - z));
                                                        	else
                                                        		tmp = t_1;
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(x, y, z, t, a, b)
                                                        	t_1 = ((t + y) - 2.0) * b;
                                                        	tmp = 0.0;
                                                        	if (b <= -1.7e+33)
                                                        		tmp = t_1;
                                                        	elseif (b <= 3.7e+31)
                                                        		tmp = x - (-a - z);
                                                        	else
                                                        		tmp = t_1;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.7e+33], t$95$1, If[LessEqual[b, 3.7e+31], N[(x - N[((-a) - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
                                                        \mathbf{if}\;b \leq -1.7 \cdot 10^{+33}:\\
                                                        \;\;\;\;t\_1\\
                                                        
                                                        \mathbf{elif}\;b \leq 3.7 \cdot 10^{+31}:\\
                                                        \;\;\;\;x - \left(\left(-a\right) - z\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;t\_1\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if b < -1.7e33 or 3.6999999999999998e31 < b

                                                          1. Initial program 90.5%

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

                                                            \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                                          4. 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-*.f6469.3

                                                              \[\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-+.f6469.3

                                                              \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
                                                          5. Applied rewrites69.3%

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

                                                          if -1.7e33 < b < 3.6999999999999998e31

                                                          1. Initial program 99.1%

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

                                                            \[\leadsto \color{blue}{\left(x + \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)} \]
                                                          4. 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) \]
                                                          5. 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)} \]
                                                          6. Taylor expanded in x around inf

                                                            \[\leadsto x - \mathsf{fma}\left(\color{blue}{t - 1}, a, -z\right) \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites68.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.f6446.0

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

                                                              \[\leadsto x - \left(\left(-a\right) - \color{blue}{z}\right) \]
                                                          8. Recombined 2 regimes into one program.
                                                          9. Add Preprocessing

                                                          Alternative 20: 49.0% accurate, 1.8× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -155000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.1 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(-y, z, z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a b)
                                                           :precision binary64
                                                           (let* ((t_1 (* (- b a) t)))
                                                             (if (<= t -155000000000.0) t_1 (if (<= t 9.1e+18) (fma (- y) z 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 <= -155000000000.0) {
                                                          		tmp = t_1;
                                                          	} else if (t <= 9.1e+18) {
                                                          		tmp = fma(-y, z, 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 <= -155000000000.0)
                                                          		tmp = t_1;
                                                          	elseif (t <= 9.1e+18)
                                                          		tmp = fma(Float64(-y), z, z);
                                                          	else
                                                          		tmp = t_1;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -155000000000.0], t$95$1, If[LessEqual[t, 9.1e+18], N[((-y) * z + z), $MachinePrecision], t$95$1]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_1 := \left(b - a\right) \cdot t\\
                                                          \mathbf{if}\;t \leq -155000000000:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          \mathbf{elif}\;t \leq 9.1 \cdot 10^{+18}:\\
                                                          \;\;\;\;\mathsf{fma}\left(-y, z, z\right)\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if t < -1.55e11 or 9.1e18 < t

                                                            1. Initial program 92.2%

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

                                                              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                            4. 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.7

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

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

                                                            if -1.55e11 < t < 9.1e18

                                                            1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(y\right), z, z\right) \]
                                                              5. lower-neg.f6433.7

                                                                \[\leadsto \mathsf{fma}\left(-y, z, z\right) \]
                                                            8. Applied rewrites33.7%

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

                                                          Alternative 21: 27.2% accurate, 2.1× speedup?

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

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

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

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

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

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

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

                                                                \[\leadsto b \cdot t \]

                                                              if -2.7999999999999998e-4 < t < 1.14999999999999998e50

                                                              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. Add Preprocessing
                                                              3. Taylor expanded in y around inf

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

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

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

                                                                  \[\leadsto \left(b - z\right) \cdot y \]
                                                              5. Applied rewrites38.5%

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

                                                                \[\leadsto b \cdot y \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites21.2%

                                                                  \[\leadsto b \cdot y \]
                                                              8. Recombined 2 regimes into one program.
                                                              9. Add Preprocessing

                                                              Alternative 22: 19.1% accurate, 2.8× speedup?

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

                                                                1. Initial program 94.5%

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

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

                                                                    \[\leadsto \color{blue}{x} \]

                                                                  if -8.19999999999999962e220 < x < 4.5e11

                                                                  1. Initial program 95.6%

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

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

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

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

                                                                    \[\leadsto z \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites12.8%

                                                                      \[\leadsto z \]
                                                                  8. Recombined 2 regimes into one program.
                                                                  9. Add Preprocessing

                                                                  Alternative 23: 15.6% 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.2%

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

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

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

                                                                    Reproduce

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