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

Percentage Accurate: 95.1% → 97.9%
Time: 5.5s
Alternatives: 18
Speedup: 0.5×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 95.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.9% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\


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

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

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

    1. Initial program 95.1%

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

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

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

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

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

Alternative 2: 85.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+126}:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ x (* b (- (+ t y) 2.0))) (* z (- y 1.0)))))
   (if (<= z -1.55e+156)
     t_1
     (if (<= z 1.9e+126)
       (+ (- x (* a (- t 1.0))) (* (- (+ y t) 2.0) b))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	double tmp;
	if (z <= -1.55e+156) {
		tmp = t_1;
	} else if (z <= 1.9e+126) {
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (b * ((t + y) - 2.0d0))) - (z * (y - 1.0d0))
    if (z <= (-1.55d+156)) then
        tmp = t_1
    else if (z <= 1.9d+126) then
        tmp = (x - (a * (t - 1.0d0))) + (((y + t) - 2.0d0) * b)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	double tmp;
	if (z <= -1.55e+156) {
		tmp = t_1;
	} else if (z <= 1.9e+126) {
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0))
	tmp = 0
	if z <= -1.55e+156:
		tmp = t_1
	elif z <= 1.9e+126:
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) - Float64(z * Float64(y - 1.0)))
	tmp = 0.0
	if (z <= -1.55e+156)
		tmp = t_1;
	elseif (z <= 1.9e+126)
		tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(Float64(Float64(y + t) - 2.0) * b));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	tmp = 0.0;
	if (z <= -1.55e+156)
		tmp = t_1;
	elseif (z <= 1.9e+126)
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+156], t$95$1, If[LessEqual[z, 1.9e+126], N[(N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+126}:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5500000000000001e156 or 1.90000000000000008e126 < z

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

    if -1.5500000000000001e156 < z < 1.90000000000000008e126

    1. Initial program 95.1%

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

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

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

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

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

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

Alternative 3: 84.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(y - 1\right)\\
t_2 := \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - t\_1\\
\mathbf{if}\;b \leq -1.7 \cdot 10^{-37}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.70000000000000009e-37 or 5.0000000000000002e-55 < b

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000009e-37 < b < 5.0000000000000002e-55

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
      4. lower-+.f6451.0

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
    10. Applied rewrites51.0%

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

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

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

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

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

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

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

Alternative 4: 83.7% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.1999999999999999e52 or 8.19999999999999999e46 < b

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
      4. lower-+.f6451.0

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
    10. Applied rewrites51.0%

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

    if -8.1999999999999999e52 < b < 8.19999999999999999e46

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
      4. lower-+.f6451.0

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
    10. Applied rewrites51.0%

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

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

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

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

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

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

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

Alternative 5: 67.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -1400:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.39999999999999996e171 or 4.4e184 < 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. Taylor expanded in y around inf

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

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

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

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

    if -7.39999999999999996e171 < y < -1400 or 2.0000000000000002e44 < y < 4.4e184

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

    if -1400 < y < 2.0000000000000002e44

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
      13. *-lft-identity45.4

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

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

Alternative 6: 65.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -0.0135:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+126}:\\
\;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.4000000000000002e194 or 4.1999999999999998e126 < z

    1. Initial program 95.1%

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

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

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

        \[\leadsto z \cdot \left(1 - \color{blue}{y}\right) \]
    4. Applied rewrites27.9%

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

    if -4.4000000000000002e194 < z < -0.0134999999999999998

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
      13. *-lft-identity45.4

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

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

    if -0.0134999999999999998 < z < 4.1999999999999998e126

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
      4. lower-+.f6451.0

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
    10. Applied rewrites51.0%

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

Alternative 7: 65.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.9 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \left(z \cdot \left(\frac{b}{z} - 1\right)\right)\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.8999999999999999e29

    1. Initial program 95.1%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(z \cdot \left(\frac{b}{z} - 1\right)\right) \]
      3. lower-/.f6434.2

        \[\leadsto y \cdot \left(z \cdot \left(\frac{b}{z} - 1\right)\right) \]
    7. Applied rewrites34.2%

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

    if -5.8999999999999999e29 < y < 2.90000000000000002e58

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
      13. *-lft-identity45.4

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

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

    if 2.90000000000000002e58 < 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. Taylor expanded in y around inf

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

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

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

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

Alternative 8: 60.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.7999999999999999e29 or 2.90000000000000002e58 < 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. Taylor expanded in y around inf

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

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

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

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

    if -5.7999999999999999e29 < y < 2.90000000000000002e58

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
      13. *-lft-identity45.4

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

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

Alternative 9: 58.2% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -11500000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-10}:\\ \;\;\;\;z + b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+131}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))))
   (if (<= y -11500000.0)
     t_1
     (if (<= y 3e-10)
       (+ z (* b (- t 2.0)))
       (if (<= y 7.5e+131) (* t (- b a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -11500000.0) {
		tmp = t_1;
	} else if (y <= 3e-10) {
		tmp = z + (b * (t - 2.0));
	} else if (y <= 7.5e+131) {
		tmp = t * (b - a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (b - z)
    if (y <= (-11500000.0d0)) then
        tmp = t_1
    else if (y <= 3d-10) then
        tmp = z + (b * (t - 2.0d0))
    else if (y <= 7.5d+131) then
        tmp = t * (b - a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -11500000.0) {
		tmp = t_1;
	} else if (y <= 3e-10) {
		tmp = z + (b * (t - 2.0));
	} else if (y <= 7.5e+131) {
		tmp = t * (b - a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -11500000.0:
		tmp = t_1
	elif y <= 3e-10:
		tmp = z + (b * (t - 2.0))
	elif y <= 7.5e+131:
		tmp = t * (b - a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -11500000.0)
		tmp = t_1;
	elseif (y <= 3e-10)
		tmp = Float64(z + Float64(b * Float64(t - 2.0)));
	elseif (y <= 7.5e+131)
		tmp = Float64(t * Float64(b - a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	tmp = 0.0;
	if (y <= -11500000.0)
		tmp = t_1;
	elseif (y <= 3e-10)
		tmp = z + (b * (t - 2.0));
	elseif (y <= 7.5e+131)
		tmp = t * (b - a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -11500000.0], t$95$1, If[LessEqual[y, 3e-10], N[(z + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+131], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -11500000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-10}:\\
\;\;\;\;z + b \cdot \left(t - 2\right)\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+131}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.15e7 or 7.4999999999999995e131 < 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. Taylor expanded in y around inf

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

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

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

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

    if -1.15e7 < y < 3e-10

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
      13. *-lft-identity45.4

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

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

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

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

        \[\leadsto z + b \cdot \left(t - 2\right) \]
      3. lower--.f6432.2

        \[\leadsto z + b \cdot \left(t - 2\right) \]
    12. Applied rewrites32.2%

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

    if 3e-10 < y < 7.4999999999999995e131

    1. Initial program 95.1%

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

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

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

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

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

Alternative 10: 55.6% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+37}:\\
\;\;\;\;x + b \cdot \left(y - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1e14 or 1.1e37 < t

    1. Initial program 95.1%

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

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

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

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

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

    if -3.1e14 < t < 1.1e37

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
      4. lower-+.f6451.0

        \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
    10. Applied rewrites51.0%

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

      \[\leadsto x + b \cdot \left(y - 2\right) \]
    12. Step-by-step derivation
      1. lower--.f6437.4

        \[\leadsto x + b \cdot \left(y - 2\right) \]
    13. Applied rewrites37.4%

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

Alternative 11: 53.9% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 94000000000:\\
\;\;\;\;\mathsf{fma}\left(-2, b, x + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1e14 or 9.4e10 < t

    1. Initial program 95.1%

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

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

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

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

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

    if -3.1e14 < t < 9.4e10

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6445.4

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites45.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
      13. *-lft-identity45.4

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

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

      \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) \]
    11. Step-by-step derivation
      1. Applied rewrites29.8%

        \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) \]
    12. Recombined 2 regimes into one program.
    13. Add Preprocessing

    Alternative 12: 48.3% accurate, 1.6× speedup?

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

      1. Initial program 95.1%

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

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

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

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

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

      if -8.0000000000000002e-8 < t < 1.9000000000000001e-65

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        5. lower-*.f6445.4

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      7. Applied rewrites45.4%

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

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      9. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lower-*.f6423.7

          \[\leadsto x - -1 \cdot z \]
      10. Applied rewrites23.7%

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      11. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lift-*.f64N/A

          \[\leadsto x - -1 \cdot z \]
        3. mul-1-negN/A

          \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
        4. add-flipN/A

          \[\leadsto x + z \]
        5. +-commutativeN/A

          \[\leadsto z + x \]
        6. lower-+.f6423.7

          \[\leadsto z + x \]
      12. Applied rewrites23.7%

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

      if 1.9000000000000001e-65 < t < 1800

      1. Initial program 95.1%

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

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

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

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

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

    Alternative 13: 47.9% accurate, 2.0× speedup?

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

      1. Initial program 95.1%

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

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

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

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

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

      if -8.0000000000000002e-8 < t < 9.4e10

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        5. lower-*.f6445.4

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      7. Applied rewrites45.4%

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

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      9. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lower-*.f6423.7

          \[\leadsto x - -1 \cdot z \]
      10. Applied rewrites23.7%

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      11. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lift-*.f64N/A

          \[\leadsto x - -1 \cdot z \]
        3. mul-1-negN/A

          \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
        4. add-flipN/A

          \[\leadsto x + z \]
        5. +-commutativeN/A

          \[\leadsto z + x \]
        6. lower-+.f6423.7

          \[\leadsto z + x \]
      12. Applied rewrites23.7%

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

    Alternative 14: 33.2% accurate, 1.5× speedup?

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

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \color{blue}{t} \]
      6. Step-by-step derivation
        1. lower-*.f6417.9

          \[\leadsto b \cdot t \]
      7. Applied rewrites17.9%

        \[\leadsto b \cdot \color{blue}{t} \]

      if -0.0015200000000000001 < b < -1.50000000000000015e-222 or 1.95000000000000011e-170 < b < 1.1600000000000001e47

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        5. lower-*.f6445.4

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      7. Applied rewrites45.4%

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

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      9. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lower-*.f6423.7

          \[\leadsto x - -1 \cdot z \]
      10. Applied rewrites23.7%

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      11. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lift-*.f64N/A

          \[\leadsto x - -1 \cdot z \]
        3. mul-1-negN/A

          \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
        4. add-flipN/A

          \[\leadsto x + z \]
        5. +-commutativeN/A

          \[\leadsto z + x \]
        6. lower-+.f6423.7

          \[\leadsto z + x \]
      12. Applied rewrites23.7%

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

      if -1.50000000000000015e-222 < b < 1.95000000000000011e-170

      1. Initial program 95.1%

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

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

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

          \[\leadsto a \cdot \left(1 - \color{blue}{t}\right) \]
      4. Applied rewrites29.3%

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

    Alternative 15: 32.2% accurate, 2.5× speedup?

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

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \color{blue}{t} \]
      6. Step-by-step derivation
        1. lower-*.f6417.9

          \[\leadsto b \cdot t \]
      7. Applied rewrites17.9%

        \[\leadsto b \cdot \color{blue}{t} \]

      if -0.0015200000000000001 < b < 1.1600000000000001e47

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        5. lower-*.f6445.4

          \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      7. Applied rewrites45.4%

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

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      9. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lower-*.f6423.7

          \[\leadsto x - -1 \cdot z \]
      10. Applied rewrites23.7%

        \[\leadsto x - -1 \cdot \color{blue}{z} \]
      11. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto x - -1 \cdot z \]
        2. lift-*.f64N/A

          \[\leadsto x - -1 \cdot z \]
        3. mul-1-negN/A

          \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
        4. add-flipN/A

          \[\leadsto x + z \]
        5. +-commutativeN/A

          \[\leadsto z + x \]
        6. lower-+.f6423.7

          \[\leadsto z + x \]
      12. Applied rewrites23.7%

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

    Alternative 16: 26.1% accurate, 3.8× speedup?

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

      1. Initial program 95.1%

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

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

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

          \[\leadsto a \cdot \left(1 - \color{blue}{t}\right) \]
      4. Applied rewrites29.3%

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

        \[\leadsto a \]
      6. Step-by-step derivation
        1. Applied rewrites11.2%

          \[\leadsto a \]

        if -2.15e101 < a

        1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
          5. lower-*.f6445.4

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        7. Applied rewrites45.4%

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

          \[\leadsto x - -1 \cdot \color{blue}{z} \]
        9. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto x - -1 \cdot z \]
          2. lower-*.f6423.7

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites23.7%

          \[\leadsto x - -1 \cdot \color{blue}{z} \]
        11. Step-by-step derivation
          1. lift--.f64N/A

            \[\leadsto x - -1 \cdot z \]
          2. lift-*.f64N/A

            \[\leadsto x - -1 \cdot z \]
          3. mul-1-negN/A

            \[\leadsto x - \left(\mathsf{neg}\left(z\right)\right) \]
          4. add-flipN/A

            \[\leadsto x + z \]
          5. +-commutativeN/A

            \[\leadsto z + x \]
          6. lower-+.f6423.7

            \[\leadsto z + x \]
        12. Applied rewrites23.7%

          \[\leadsto \color{blue}{z + x} \]
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 17: 16.4% accurate, 3.3× speedup?

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

        1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
          5. lower-*.f6445.4

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        7. Applied rewrites45.4%

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

          \[\leadsto x - -1 \cdot \color{blue}{z} \]
        9. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto x - -1 \cdot z \]
          2. lower-*.f6423.7

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites23.7%

          \[\leadsto x - -1 \cdot \color{blue}{z} \]
        11. Taylor expanded in x around 0

          \[\leadsto z \]
        12. Step-by-step derivation
          1. Applied rewrites10.6%

            \[\leadsto z \]

          if -7.5e-50 < z < 1.1500000000000001e141

          1. Initial program 95.1%

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

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

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

              \[\leadsto a \cdot \left(1 - \color{blue}{t}\right) \]
          4. Applied rewrites29.3%

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

            \[\leadsto a \]
          6. Step-by-step derivation
            1. Applied rewrites11.2%

              \[\leadsto a \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 18: 11.2% accurate, 28.4× speedup?

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

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

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

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

              \[\leadsto a \cdot \left(1 - \color{blue}{t}\right) \]
          4. Applied rewrites29.3%

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

            \[\leadsto a \]
          6. Step-by-step derivation
            1. Applied rewrites11.2%

              \[\leadsto a \]
            2. Add Preprocessing

            Reproduce

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