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

Percentage Accurate: 95.5% → 97.7%
Time: 7.3s
Alternatives: 25
Speedup: 1.1×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 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.5% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.7% 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 96.1%

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

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

Alternative 2: 49.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - z \cdot y\\ t_2 := \left(b - a\right) \cdot t\\ t_3 := a + y \cdot b\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+112}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-26}:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-141}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-31}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+122}:\\ \;\;\;\;x + b \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* z y))) (t_2 (* (- b a) t)) (t_3 (+ a (* y b))))
   (if (<= t -3.1e+112)
     t_2
     (if (<= t -1.3e+45)
       t_1
       (if (<= t -1.15e-26)
         (* (- 1.0 y) z)
         (if (<= t -9.5e-141)
           t_3
           (if (<= t 4.3e-247)
             t_1
             (if (<= t 1.55e-31)
               t_3
               (if (<= t 7.5e+122) (+ x (* b y)) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (z * y);
	double t_2 = (b - a) * t;
	double t_3 = a + (y * b);
	double tmp;
	if (t <= -3.1e+112) {
		tmp = t_2;
	} else if (t <= -1.3e+45) {
		tmp = t_1;
	} else if (t <= -1.15e-26) {
		tmp = (1.0 - y) * z;
	} else if (t <= -9.5e-141) {
		tmp = t_3;
	} else if (t <= 4.3e-247) {
		tmp = t_1;
	} else if (t <= 1.55e-31) {
		tmp = t_3;
	} else if (t <= 7.5e+122) {
		tmp = x + (b * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x - (z * y)
    t_2 = (b - a) * t
    t_3 = a + (y * b)
    if (t <= (-3.1d+112)) then
        tmp = t_2
    else if (t <= (-1.3d+45)) then
        tmp = t_1
    else if (t <= (-1.15d-26)) then
        tmp = (1.0d0 - y) * z
    else if (t <= (-9.5d-141)) then
        tmp = t_3
    else if (t <= 4.3d-247) then
        tmp = t_1
    else if (t <= 1.55d-31) then
        tmp = t_3
    else if (t <= 7.5d+122) then
        tmp = x + (b * y)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (z * y);
	double t_2 = (b - a) * t;
	double t_3 = a + (y * b);
	double tmp;
	if (t <= -3.1e+112) {
		tmp = t_2;
	} else if (t <= -1.3e+45) {
		tmp = t_1;
	} else if (t <= -1.15e-26) {
		tmp = (1.0 - y) * z;
	} else if (t <= -9.5e-141) {
		tmp = t_3;
	} else if (t <= 4.3e-247) {
		tmp = t_1;
	} else if (t <= 1.55e-31) {
		tmp = t_3;
	} else if (t <= 7.5e+122) {
		tmp = x + (b * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (z * y)
	t_2 = (b - a) * t
	t_3 = a + (y * b)
	tmp = 0
	if t <= -3.1e+112:
		tmp = t_2
	elif t <= -1.3e+45:
		tmp = t_1
	elif t <= -1.15e-26:
		tmp = (1.0 - y) * z
	elif t <= -9.5e-141:
		tmp = t_3
	elif t <= 4.3e-247:
		tmp = t_1
	elif t <= 1.55e-31:
		tmp = t_3
	elif t <= 7.5e+122:
		tmp = x + (b * y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(z * y))
	t_2 = Float64(Float64(b - a) * t)
	t_3 = Float64(a + Float64(y * b))
	tmp = 0.0
	if (t <= -3.1e+112)
		tmp = t_2;
	elseif (t <= -1.3e+45)
		tmp = t_1;
	elseif (t <= -1.15e-26)
		tmp = Float64(Float64(1.0 - y) * z);
	elseif (t <= -9.5e-141)
		tmp = t_3;
	elseif (t <= 4.3e-247)
		tmp = t_1;
	elseif (t <= 1.55e-31)
		tmp = t_3;
	elseif (t <= 7.5e+122)
		tmp = Float64(x + Float64(b * y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (z * y);
	t_2 = (b - a) * t;
	t_3 = a + (y * b);
	tmp = 0.0;
	if (t <= -3.1e+112)
		tmp = t_2;
	elseif (t <= -1.3e+45)
		tmp = t_1;
	elseif (t <= -1.15e-26)
		tmp = (1.0 - y) * z;
	elseif (t <= -9.5e-141)
		tmp = t_3;
	elseif (t <= 4.3e-247)
		tmp = t_1;
	elseif (t <= 1.55e-31)
		tmp = t_3;
	elseif (t <= 7.5e+122)
		tmp = x + (b * y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(y * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+112], t$95$2, If[LessEqual[t, -1.3e+45], t$95$1, If[LessEqual[t, -1.15e-26], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, -9.5e-141], t$95$3, If[LessEqual[t, 4.3e-247], t$95$1, If[LessEqual[t, 1.55e-31], t$95$3, If[LessEqual[t, 7.5e+122], N[(x + N[(b * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - z \cdot y\\
t_2 := \left(b - a\right) \cdot t\\
t_3 := a + y \cdot b\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+112}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.3 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.15 \cdot 10^{-26}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-141}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-31}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+122}:\\
\;\;\;\;x + b \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.09999999999999983e112 or 7.5000000000000002e122 < t

    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 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--.f6477.0

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

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

    if -3.09999999999999983e112 < t < -1.30000000000000004e45 or -9.49999999999999996e-141 < t < 4.30000000000000005e-247

    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 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--.f6482.1

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

      \[\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 - y \cdot \color{blue}{z} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto x - z \cdot y \]
      2. lower-*.f6460.6

        \[\leadsto x - z \cdot y \]
    8. Applied rewrites60.6%

      \[\leadsto x - z \cdot \color{blue}{y} \]

    if -1.30000000000000004e45 < t < -1.15000000000000004e-26

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

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

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

    if -1.15000000000000004e-26 < t < -9.49999999999999996e-141 or 4.30000000000000005e-247 < t < 1.55e-31

    1. Initial program 97.6%

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

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

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

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

        \[\leadsto a + \color{blue}{y} \cdot b \]
      3. Step-by-step derivation
        1. Applied rewrites58.3%

          \[\leadsto a + \color{blue}{y} \cdot b \]

        if 1.55e-31 < t < 7.5000000000000002e122

        1. Initial program 96.7%

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

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

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

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

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

              \[\leadsto x + \left(t - 2\right) \cdot \color{blue}{b} \]
            3. lower--.f6438.0

              \[\leadsto x + \left(t - 2\right) \cdot b \]
          4. Applied rewrites38.0%

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

            \[\leadsto x + \color{blue}{b \cdot y} \]
          6. Step-by-step derivation
            1. lower-*.f6456.1

              \[\leadsto x + b \cdot \color{blue}{y} \]
          7. Applied rewrites56.1%

            \[\leadsto x + \color{blue}{b \cdot y} \]
        5. Recombined 5 regimes into one program.
        6. Add Preprocessing

        Alternative 3: 87.4% accurate, 1.0× speedup?

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

          1. Initial program 92.9%

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

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

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

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

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

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

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

          if -9.4999999999999991e-47 < b < 2.20000000000000005e-42

          1. Initial program 100.0%

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

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

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

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

        Alternative 4: 86.5% accurate, 1.0× speedup?

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

          1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.4999999999999991e-47 < b < 2.20000000000000005e-42

          1. Initial program 100.0%

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

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

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

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

        Alternative 5: 49.9% accurate, 1.1× speedup?

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

          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 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--.f6477.0

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

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

          if -3.09999999999999983e112 < t < -1.30000000000000004e45

          1. Initial program 95.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--.f6486.6

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

            \[\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 - y \cdot \color{blue}{z} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto x - z \cdot y \]
            2. lower-*.f6460.4

              \[\leadsto x - z \cdot y \]
          8. Applied rewrites60.4%

            \[\leadsto x - z \cdot \color{blue}{y} \]

          if -1.30000000000000004e45 < t < -2.40000000000000002e-27

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

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

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

          if -2.40000000000000002e-27 < t < 7.5000000000000002e122

          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 x around inf

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

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

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

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

                \[\leadsto x + \left(t - 2\right) \cdot \color{blue}{b} \]
              3. lower--.f6432.8

                \[\leadsto x + \left(t - 2\right) \cdot b \]
            4. Applied rewrites32.8%

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

              \[\leadsto x + \color{blue}{b \cdot y} \]
            6. Step-by-step derivation
              1. lower-*.f6449.7

                \[\leadsto x + b \cdot \color{blue}{y} \]
            7. Applied rewrites49.7%

              \[\leadsto x + \color{blue}{b \cdot y} \]
          5. Recombined 4 regimes into one program.
          6. Add Preprocessing

          Alternative 6: 84.2% accurate, 1.1× speedup?

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

            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. 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 rewrites96.1%

              \[\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. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

            if -1.55e20 < b < 2.50000000000000001e-42

            1. Initial program 100.0%

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

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

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

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

          Alternative 7: 63.7% accurate, 1.2× speedup?

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

            1. Initial program 91.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)} + \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--.f6474.4

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, a\right) \]
                9. lower-+.f6473.6

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, a\right) \]
                10. associate--l-73.6

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

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

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

              if -1.35e20 < b < 2.79999999999999993e-182

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto x - a \cdot \left(t - \color{blue}{1}\right) \]
                2. lift--.f6464.0

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

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

              if 2.79999999999999993e-182 < b < 1.99999999999999989e-29

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
                2. lift--.f6470.0

                  \[\leadsto x - z \cdot \left(y - 1\right) \]
              8. Applied rewrites70.0%

                \[\leadsto x - z \cdot \color{blue}{\left(y - 1\right)} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification69.5%

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

            Alternative 8: 27.5% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot t\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+248}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{+132}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t \leq -1000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* (- a) t)))
               (if (<= t -1.15e+248)
                 t_1
                 (if (<= t -3.5e+132)
                   (* b t)
                   (if (<= t -1000000.0) t_1 (if (<= t 3.2e+42) x (* b t)))))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = -a * t;
            	double tmp;
            	if (t <= -1.15e+248) {
            		tmp = t_1;
            	} else if (t <= -3.5e+132) {
            		tmp = b * t;
            	} else if (t <= -1000000.0) {
            		tmp = t_1;
            	} else if (t <= 3.2e+42) {
            		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) :: t_1
                real(8) :: tmp
                t_1 = -a * t
                if (t <= (-1.15d+248)) then
                    tmp = t_1
                else if (t <= (-3.5d+132)) then
                    tmp = b * t
                else if (t <= (-1000000.0d0)) then
                    tmp = t_1
                else if (t <= 3.2d+42) 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 t_1 = -a * t;
            	double tmp;
            	if (t <= -1.15e+248) {
            		tmp = t_1;
            	} else if (t <= -3.5e+132) {
            		tmp = b * t;
            	} else if (t <= -1000000.0) {
            		tmp = t_1;
            	} else if (t <= 3.2e+42) {
            		tmp = x;
            	} else {
            		tmp = b * t;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = -a * t
            	tmp = 0
            	if t <= -1.15e+248:
            		tmp = t_1
            	elif t <= -3.5e+132:
            		tmp = b * t
            	elif t <= -1000000.0:
            		tmp = t_1
            	elif t <= 3.2e+42:
            		tmp = x
            	else:
            		tmp = b * t
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(-a) * t)
            	tmp = 0.0
            	if (t <= -1.15e+248)
            		tmp = t_1;
            	elseif (t <= -3.5e+132)
            		tmp = Float64(b * t);
            	elseif (t <= -1000000.0)
            		tmp = t_1;
            	elseif (t <= 3.2e+42)
            		tmp = x;
            	else
            		tmp = Float64(b * t);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = -a * t;
            	tmp = 0.0;
            	if (t <= -1.15e+248)
            		tmp = t_1;
            	elseif (t <= -3.5e+132)
            		tmp = b * t;
            	elseif (t <= -1000000.0)
            		tmp = t_1;
            	elseif (t <= 3.2e+42)
            		tmp = x;
            	else
            		tmp = b * t;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -1.15e+248], t$95$1, If[LessEqual[t, -3.5e+132], N[(b * t), $MachinePrecision], If[LessEqual[t, -1000000.0], t$95$1, If[LessEqual[t, 3.2e+42], x, N[(b * t), $MachinePrecision]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(-a\right) \cdot t\\
            \mathbf{if}\;t \leq -1.15 \cdot 10^{+248}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t \leq -3.5 \cdot 10^{+132}:\\
            \;\;\;\;b \cdot t\\
            
            \mathbf{elif}\;t \leq -1000000:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t \leq 3.2 \cdot 10^{+42}:\\
            \;\;\;\;x\\
            
            \mathbf{else}:\\
            \;\;\;\;b \cdot t\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t < -1.1500000000000001e248 or -3.5000000000000002e132 < t < -1e6

              1. Initial program 90.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--.f6454.2

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

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

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

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

              if -1.1500000000000001e248 < t < -3.5000000000000002e132 or 3.20000000000000002e42 < t

              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 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--.f6462.1

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

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

                  \[\leadsto b \cdot t \]

                if -1e6 < t < 3.20000000000000002e42

                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 x around inf

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

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

                Alternative 9: 73.0% accurate, 1.2× speedup?

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

                  1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

                  if -9.79999999999999977e-60 < b < 1.5500000000000001e-42

                  1. Initial program 100.0%

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

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

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

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

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

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

                Alternative 10: 61.0% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{-182}:\\ \;\;\;\;x - a \cdot \left(t - 1\right)\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{-29}:\\ \;\;\;\;x - z \cdot \left(y - 1\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 -2.05e+21)
                     t_1
                     (if (<= b 2.8e-182)
                       (- x (* a (- t 1.0)))
                       (if (<= b 2.7e-29) (- x (* z (- y 1.0))) 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 <= -2.05e+21) {
                		tmp = t_1;
                	} else if (b <= 2.8e-182) {
                		tmp = x - (a * (t - 1.0));
                	} else if (b <= 2.7e-29) {
                		tmp = x - (z * (y - 1.0));
                	} 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 <= (-2.05d+21)) then
                        tmp = t_1
                    else if (b <= 2.8d-182) then
                        tmp = x - (a * (t - 1.0d0))
                    else if (b <= 2.7d-29) then
                        tmp = x - (z * (y - 1.0d0))
                    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 <= -2.05e+21) {
                		tmp = t_1;
                	} else if (b <= 2.8e-182) {
                		tmp = x - (a * (t - 1.0));
                	} else if (b <= 2.7e-29) {
                		tmp = x - (z * (y - 1.0));
                	} 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 <= -2.05e+21:
                		tmp = t_1
                	elif b <= 2.8e-182:
                		tmp = x - (a * (t - 1.0))
                	elif b <= 2.7e-29:
                		tmp = x - (z * (y - 1.0))
                	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 <= -2.05e+21)
                		tmp = t_1;
                	elseif (b <= 2.8e-182)
                		tmp = Float64(x - Float64(a * Float64(t - 1.0)));
                	elseif (b <= 2.7e-29)
                		tmp = Float64(x - Float64(z * Float64(y - 1.0)));
                	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 <= -2.05e+21)
                		tmp = t_1;
                	elseif (b <= 2.8e-182)
                		tmp = x - (a * (t - 1.0));
                	elseif (b <= 2.7e-29)
                		tmp = x - (z * (y - 1.0));
                	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, -2.05e+21], t$95$1, If[LessEqual[b, 2.8e-182], N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.7e-29], N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $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 -2.05 \cdot 10^{+21}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;b \leq 2.8 \cdot 10^{-182}:\\
                \;\;\;\;x - a \cdot \left(t - 1\right)\\
                
                \mathbf{elif}\;b \leq 2.7 \cdot 10^{-29}:\\
                \;\;\;\;x - z \cdot \left(y - 1\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if b < -2.05e21 or 2.70000000000000023e-29 < b

                  1. Initial program 91.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 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.6

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

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

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

                  if -2.05e21 < b < 2.79999999999999993e-182

                  1. Initial program 100.0%

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

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

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

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

                      \[\leadsto x - a \cdot \left(t - \color{blue}{1}\right) \]
                    2. lift--.f6464.0

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

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

                  if 2.79999999999999993e-182 < b < 2.70000000000000023e-29

                  1. Initial program 100.0%

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

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

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

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

                      \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
                    2. lift--.f6470.0

                      \[\leadsto x - z \cdot \left(y - 1\right) \]
                  8. Applied rewrites70.0%

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

                Alternative 11: 55.3% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{-182}:\\ \;\;\;\;x - a \cdot t\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-30}:\\ \;\;\;\;x - z \cdot y\\ \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.3e+20)
                     t_1
                     (if (<= b 2.8e-182) (- x (* a t)) (if (<= b 3e-30) (- x (* z y)) 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.3e+20) {
                		tmp = t_1;
                	} else if (b <= 2.8e-182) {
                		tmp = x - (a * t);
                	} else if (b <= 3e-30) {
                		tmp = x - (z * y);
                	} 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.3d+20)) then
                        tmp = t_1
                    else if (b <= 2.8d-182) then
                        tmp = x - (a * t)
                    else if (b <= 3d-30) then
                        tmp = x - (z * y)
                    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.3e+20) {
                		tmp = t_1;
                	} else if (b <= 2.8e-182) {
                		tmp = x - (a * t);
                	} else if (b <= 3e-30) {
                		tmp = x - (z * y);
                	} 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.3e+20:
                		tmp = t_1
                	elif b <= 2.8e-182:
                		tmp = x - (a * t)
                	elif b <= 3e-30:
                		tmp = x - (z * y)
                	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.3e+20)
                		tmp = t_1;
                	elseif (b <= 2.8e-182)
                		tmp = Float64(x - Float64(a * t));
                	elseif (b <= 3e-30)
                		tmp = Float64(x - Float64(z * y));
                	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.3e+20)
                		tmp = t_1;
                	elseif (b <= 2.8e-182)
                		tmp = x - (a * t);
                	elseif (b <= 3e-30)
                		tmp = x - (z * y);
                	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.3e+20], t$95$1, If[LessEqual[b, 2.8e-182], N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-30], N[(x - N[(z * y), $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.3 \cdot 10^{+20}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;b \leq 2.8 \cdot 10^{-182}:\\
                \;\;\;\;x - a \cdot t\\
                
                \mathbf{elif}\;b \leq 3 \cdot 10^{-30}:\\
                \;\;\;\;x - z \cdot y\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if b < -1.3e20 or 2.9999999999999999e-30 < b

                  1. Initial program 91.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 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.6

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

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

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

                  if -1.3e20 < b < 2.79999999999999993e-182

                  1. Initial program 100.0%

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

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

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

                    \[\leadsto x - a \cdot \color{blue}{t} \]
                  7. Step-by-step derivation
                    1. lower-*.f6445.4

                      \[\leadsto x - a \cdot t \]
                  8. Applied rewrites45.4%

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

                  if 2.79999999999999993e-182 < b < 2.9999999999999999e-30

                  1. Initial program 100.0%

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

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

                    \[\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 - y \cdot \color{blue}{z} \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto x - z \cdot y \]
                    2. lower-*.f6451.8

                      \[\leadsto x - z \cdot y \]
                  8. Applied rewrites51.8%

                    \[\leadsto x - z \cdot \color{blue}{y} \]
                3. Recombined 3 regimes into one program.
                4. Add Preprocessing

                Alternative 12: 69.7% accurate, 1.4× speedup?

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

                  1. Initial program 92.5%

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

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

                    if -9.79999999999999977e-60 < b < 4600

                    1. Initial program 100.0%

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

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

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

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

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

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

                  Alternative 13: 69.6% accurate, 1.4× speedup?

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

                    1. Initial program 91.4%

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

                      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} + \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--.f6475.8

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, a\right) \]
                        9. lower-+.f6475.0

                          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(t + y\right)} - 2, b, a\right) \]
                        10. associate--l-75.0

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

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

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

                      if -7.2000000000000002e42 < b < 2.70000000000000023e-29

                      1. Initial program 100.0%

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

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

                        \[\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.f6472.8

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

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

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

                    Alternative 14: 51.5% accurate, 1.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-243}:\\ \;\;\;\;x - a \cdot t\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+25}:\\ \;\;\;\;x + b \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 -5.2e+67)
                         t_1
                         (if (<= y 7.2e-243)
                           (- x (* a t))
                           (if (<= y 3.4e+25) (+ x (* b 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 <= -5.2e+67) {
                    		tmp = t_1;
                    	} else if (y <= 7.2e-243) {
                    		tmp = x - (a * t);
                    	} else if (y <= 3.4e+25) {
                    		tmp = x + (b * 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 <= (-5.2d+67)) then
                            tmp = t_1
                        else if (y <= 7.2d-243) then
                            tmp = x - (a * t)
                        else if (y <= 3.4d+25) then
                            tmp = x + (b * 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 <= -5.2e+67) {
                    		tmp = t_1;
                    	} else if (y <= 7.2e-243) {
                    		tmp = x - (a * t);
                    	} else if (y <= 3.4e+25) {
                    		tmp = x + (b * t);
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = (b - z) * y
                    	tmp = 0
                    	if y <= -5.2e+67:
                    		tmp = t_1
                    	elif y <= 7.2e-243:
                    		tmp = x - (a * t)
                    	elif y <= 3.4e+25:
                    		tmp = x + (b * 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 <= -5.2e+67)
                    		tmp = t_1;
                    	elseif (y <= 7.2e-243)
                    		tmp = Float64(x - Float64(a * t));
                    	elseif (y <= 3.4e+25)
                    		tmp = Float64(x + Float64(b * 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 <= -5.2e+67)
                    		tmp = t_1;
                    	elseif (y <= 7.2e-243)
                    		tmp = x - (a * t);
                    	elseif (y <= 3.4e+25)
                    		tmp = x + (b * 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, -5.2e+67], t$95$1, If[LessEqual[y, 7.2e-243], N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+25], N[(x + N[(b * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(b - z\right) \cdot y\\
                    \mathbf{if}\;y \leq -5.2 \cdot 10^{+67}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;y \leq 7.2 \cdot 10^{-243}:\\
                    \;\;\;\;x - a \cdot t\\
                    
                    \mathbf{elif}\;y \leq 3.4 \cdot 10^{+25}:\\
                    \;\;\;\;x + b \cdot t\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if y < -5.2000000000000001e67 or 3.39999999999999984e25 < y

                      1. Initial program 95.1%

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

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

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

                      if -5.2000000000000001e67 < y < 7.2000000000000003e-243

                      1. Initial program 96.3%

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

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

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

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

                          \[\leadsto x - a \cdot t \]
                      8. Applied rewrites46.3%

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

                      if 7.2000000000000003e-243 < y < 3.39999999999999984e25

                      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 x around inf

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

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

                          \[\leadsto x + \color{blue}{b \cdot t} \]
                        3. Step-by-step derivation
                          1. lower-*.f6447.6

                            \[\leadsto x + b \cdot \color{blue}{t} \]
                        4. Applied rewrites47.6%

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

                      Alternative 15: 50.8% accurate, 1.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.55 \cdot 10^{-301}:\\ \;\;\;\;x - a \cdot t\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+61}:\\ \;\;\;\;\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 -5.2e+67)
                           t_1
                           (if (<= y 3.55e-301)
                             (- x (* a t))
                             (if (<= y 3.6e+61) (* (- 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 <= -5.2e+67) {
                      		tmp = t_1;
                      	} else if (y <= 3.55e-301) {
                      		tmp = x - (a * t);
                      	} else if (y <= 3.6e+61) {
                      		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 <= (-5.2d+67)) then
                              tmp = t_1
                          else if (y <= 3.55d-301) then
                              tmp = x - (a * t)
                          else if (y <= 3.6d+61) 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 <= -5.2e+67) {
                      		tmp = t_1;
                      	} else if (y <= 3.55e-301) {
                      		tmp = x - (a * t);
                      	} else if (y <= 3.6e+61) {
                      		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 <= -5.2e+67:
                      		tmp = t_1
                      	elif y <= 3.55e-301:
                      		tmp = x - (a * t)
                      	elif y <= 3.6e+61:
                      		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 <= -5.2e+67)
                      		tmp = t_1;
                      	elseif (y <= 3.55e-301)
                      		tmp = Float64(x - Float64(a * t));
                      	elseif (y <= 3.6e+61)
                      		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 <= -5.2e+67)
                      		tmp = t_1;
                      	elseif (y <= 3.55e-301)
                      		tmp = x - (a * t);
                      	elseif (y <= 3.6e+61)
                      		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, -5.2e+67], t$95$1, If[LessEqual[y, 3.55e-301], N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+61], 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 -5.2 \cdot 10^{+67}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;y \leq 3.55 \cdot 10^{-301}:\\
                      \;\;\;\;x - a \cdot t\\
                      
                      \mathbf{elif}\;y \leq 3.6 \cdot 10^{+61}:\\
                      \;\;\;\;\left(b - a\right) \cdot t\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if y < -5.2000000000000001e67 or 3.6000000000000001e61 < y

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

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

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

                        if -5.2000000000000001e67 < y < 3.55e-301

                        1. Initial program 95.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 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--.f6477.8

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

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

                          \[\leadsto x - a \cdot \color{blue}{t} \]
                        7. Step-by-step derivation
                          1. lower-*.f6448.9

                            \[\leadsto x - a \cdot t \]
                        8. Applied rewrites48.9%

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

                        if 3.55e-301 < y < 3.6000000000000001e61

                        1. Initial program 98.6%

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

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

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

                      Alternative 16: 61.0% accurate, 1.5× speedup?

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

                        1. Initial program 91.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 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.6

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

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

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

                        if -2.05e21 < b < 3.09999999999999991e-30

                        1. Initial program 100.0%

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

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

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

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

                            \[\leadsto x - a \cdot \left(t - \color{blue}{1}\right) \]
                          2. lift--.f6459.7

                            \[\leadsto x - a \cdot \left(t - 1\right) \]
                        8. Applied rewrites59.7%

                          \[\leadsto x - a \cdot \color{blue}{\left(t - 1\right)} \]
                      3. Recombined 2 regimes into one program.
                      4. Final simplification64.4%

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

                      Alternative 17: 26.8% accurate, 1.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{+132}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{+68}:\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= t -1.95e+132)
                         (* b t)
                         (if (<= t -2.9e+68) (* (- y) z) (if (<= t 3.2e+42) x (* b t)))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (t <= -1.95e+132) {
                      		tmp = b * t;
                      	} else if (t <= -2.9e+68) {
                      		tmp = -y * z;
                      	} else if (t <= 3.2e+42) {
                      		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 <= (-1.95d+132)) then
                              tmp = b * t
                          else if (t <= (-2.9d+68)) then
                              tmp = -y * z
                          else if (t <= 3.2d+42) 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 <= -1.95e+132) {
                      		tmp = b * t;
                      	} else if (t <= -2.9e+68) {
                      		tmp = -y * z;
                      	} else if (t <= 3.2e+42) {
                      		tmp = x;
                      	} else {
                      		tmp = b * t;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if t <= -1.95e+132:
                      		tmp = b * t
                      	elif t <= -2.9e+68:
                      		tmp = -y * z
                      	elif t <= 3.2e+42:
                      		tmp = x
                      	else:
                      		tmp = b * t
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (t <= -1.95e+132)
                      		tmp = Float64(b * t);
                      	elseif (t <= -2.9e+68)
                      		tmp = Float64(Float64(-y) * z);
                      	elseif (t <= 3.2e+42)
                      		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 <= -1.95e+132)
                      		tmp = b * t;
                      	elseif (t <= -2.9e+68)
                      		tmp = -y * z;
                      	elseif (t <= 3.2e+42)
                      		tmp = x;
                      	else
                      		tmp = b * t;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.95e+132], N[(b * t), $MachinePrecision], If[LessEqual[t, -2.9e+68], N[((-y) * z), $MachinePrecision], If[LessEqual[t, 3.2e+42], x, N[(b * t), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq -1.95 \cdot 10^{+132}:\\
                      \;\;\;\;b \cdot t\\
                      
                      \mathbf{elif}\;t \leq -2.9 \cdot 10^{+68}:\\
                      \;\;\;\;\left(-y\right) \cdot z\\
                      
                      \mathbf{elif}\;t \leq 3.2 \cdot 10^{+42}:\\
                      \;\;\;\;x\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;b \cdot t\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if t < -1.95000000000000001e132 or 3.20000000000000002e42 < t

                        1. Initial program 91.4%

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

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

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

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

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

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

                            \[\leadsto b \cdot t \]

                          if -1.95000000000000001e132 < t < -2.90000000000000011e68

                          1. Initial program 94.1%

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

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

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

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

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

                              \[\leadsto \left(-y\right) \cdot z \]
                          8. Applied rewrites42.3%

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

                          if -2.90000000000000011e68 < t < 3.20000000000000002e42

                          1. Initial program 98.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} \]
                          4. Step-by-step derivation
                            1. Applied rewrites24.4%

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

                          Alternative 18: 50.9% accurate, 1.8× speedup?

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

                            1. Initial program 95.1%

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

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

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

                            if -5.50000000000000021e22 < y < 3.6000000000000001e61

                            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--.f6436.9

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

                              \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification51.6%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+22} \lor \neg \left(y \leq 3.6 \cdot 10^{+61}\right):\\ \;\;\;\;\left(b - z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 19: 46.3% accurate, 1.8× speedup?

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

                            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 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--.f6481.5

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

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

                            if -1.8000000000000001e111 < t < 2.0000000000000002e128

                            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--.f6432.3

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

                              \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification44.6%

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

                          Alternative 20: 42.1% accurate, 1.8× speedup?

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

                            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 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--.f6451.4

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

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

                            if -4.19999999999999977e-13 < z < 5.4999999999999997e78

                            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 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--.f6435.3

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

                              \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification42.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-13} \lor \neg \left(z \leq 5.5 \cdot 10^{+78}\right):\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 21: 33.6% accurate, 1.8× speedup?

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

                            1. Initial program 94.1%

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

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

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

                              if -5.2999999999999998e75 < x < 3.59999999999999986e124

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

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

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

                            Alternative 22: 21.1% accurate, 1.9× speedup?

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

                              1. Initial program 94.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 rewrites39.6%

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

                                if -6.1999999999999999e36 < x < 1.5e-275

                                1. Initial program 98.6%

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

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

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

                                  \[\leadsto 1 \cdot a \]
                                7. Step-by-step derivation
                                  1. Applied rewrites26.2%

                                    \[\leadsto 1 \cdot a \]

                                  if 1.5e-275 < x < 3.9999999999999999e99

                                  1. Initial program 96.4%

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

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

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

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

                                  Alternative 23: 26.9% accurate, 2.1× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.26 \cdot 10^{+98} \lor \neg \left(t \leq 3.2 \cdot 10^{+42}\right):\\ \;\;\;\;b \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b)
                                   :precision binary64
                                   (if (or (<= t -1.26e+98) (not (<= t 3.2e+42))) (* b t) x))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	double tmp;
                                  	if ((t <= -1.26e+98) || !(t <= 3.2e+42)) {
                                  		tmp = b * t;
                                  	} 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 ((t <= (-1.26d+98)) .or. (.not. (t <= 3.2d+42))) then
                                          tmp = b * t
                                      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 ((t <= -1.26e+98) || !(t <= 3.2e+42)) {
                                  		tmp = b * t;
                                  	} else {
                                  		tmp = x;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b):
                                  	tmp = 0
                                  	if (t <= -1.26e+98) or not (t <= 3.2e+42):
                                  		tmp = b * t
                                  	else:
                                  		tmp = x
                                  	return tmp
                                  
                                  function code(x, y, z, t, a, b)
                                  	tmp = 0.0
                                  	if ((t <= -1.26e+98) || !(t <= 3.2e+42))
                                  		tmp = Float64(b * t);
                                  	else
                                  		tmp = x;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b)
                                  	tmp = 0.0;
                                  	if ((t <= -1.26e+98) || ~((t <= 3.2e+42)))
                                  		tmp = b * t;
                                  	else
                                  		tmp = x;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.26e+98], N[Not[LessEqual[t, 3.2e+42]], $MachinePrecision]], N[(b * t), $MachinePrecision], x]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;t \leq -1.26 \cdot 10^{+98} \lor \neg \left(t \leq 3.2 \cdot 10^{+42}\right):\\
                                  \;\;\;\;b \cdot t\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if t < -1.25999999999999999e98 or 3.20000000000000002e42 < 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--.f6468.0

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

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

                                        \[\leadsto b \cdot t \]

                                      if -1.25999999999999999e98 < t < 3.20000000000000002e42

                                      1. Initial program 98.2%

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

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

                                          \[\leadsto \color{blue}{x} \]
                                      5. Recombined 2 regimes into one program.
                                      6. Final simplification30.1%

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

                                      Alternative 24: 21.4% accurate, 2.8× speedup?

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

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

                                          if -1.40000000000000008e-10 < x < 3.9999999999999999e99

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

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

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

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

                                          Alternative 25: 16.1% 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 96.1%

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

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

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

                                            Reproduce

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