Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.7% → 92.7%
Time: 5.3s
Alternatives: 16
Speedup: 1.3×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
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) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b):
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\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 16 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: 66.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
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) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b):
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 92.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \frac{a}{b - y}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3700000:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.00000000000000021e35 or 3.7e6 < z

    1. Initial program 43.2%

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

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

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

        \[\leadsto \left(\frac{x \cdot y}{z \cdot \left(b - y\right)} + \frac{t}{b - y}\right) - \left(\color{blue}{\frac{a}{b - y}} + \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}}\right) \]
      3. times-fracN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \left(\frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}} + \color{blue}{\frac{a}{b - y}}\right) \]
      11. times-fracN/A

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

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \mathsf{fma}\left(\frac{y}{z}, \color{blue}{\frac{t - a}{{\left(b - y\right)}^{2}}}, \frac{a}{b - y}\right) \]
    4. Applied rewrites88.2%

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

      \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \frac{a}{\color{blue}{b - y}} \]
    6. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \frac{a}{b - \color{blue}{y}} \]
      2. lift--.f6499.0

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \frac{a}{b - y} \]
    7. Applied rewrites99.0%

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

    if -5.00000000000000021e35 < z < 3.7e6

    1. Initial program 87.3%

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

Alternative 2: 72.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-14}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.15e-69 or 1.7999999999999999e59 < z

    1. Initial program 47.4%

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

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
      3. lift--.f6477.4

        \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
    4. Applied rewrites77.4%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -2.15e-69 < z < -1.76e-270

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
      8. lift--.f6465.4

        \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)} \]
    4. Applied rewrites65.4%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b, z, y\right)} \]

      if -1.76e-270 < z < 2.8000000000000001e-14

      1. Initial program 88.5%

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \left(\frac{a}{y} + \frac{x \cdot \left(b - y\right)}{y}\right), \color{blue}{z}, x\right) \]
        4. div-add-revN/A

          \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{a + x \cdot \left(b - y\right)}{y}, z, x\right) \]
        5. sub-divN/A

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

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

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

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

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

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

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

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

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

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

        if 2.8000000000000001e-14 < z < 1.7999999999999999e59

        1. Initial program 79.6%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(y, x, \color{blue}{\left(t - a\right) \cdot z}\right)}{y + z \cdot \left(b - y\right)} \]
          9. lift--.f6479.6

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(y, x, \left(t - a\right) \cdot z\right)}{z \cdot \color{blue}{\left(b - y\right)}} \]
          2. lift--.f6468.9

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

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

      Alternative 3: 85.0% accurate, 0.8× speedup?

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

        1. Initial program 41.4%

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

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
          2. lift--.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
          3. lift--.f6482.7

            \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
        4. Applied rewrites82.7%

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

        if -4.5e10 < z < 1.7999999999999999e59

        1. Initial program 86.9%

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

      Alternative 4: 85.0% accurate, 0.8× speedup?

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

        1. Initial program 41.4%

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

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
          2. lift--.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
          3. lift--.f6482.7

            \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
        4. Applied rewrites82.7%

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

        if -4.5e10 < z < 1.7999999999999999e59

        1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 72.0% accurate, 0.8× speedup?

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

        1. Initial program 49.6%

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

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
          2. lift--.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
          3. lift--.f6476.8

            \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
        4. Applied rewrites76.8%

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

        if -2.15e-69 < z < 1.20000000000000007e-117

        1. Initial program 87.7%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
          8. lift--.f6468.7

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

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

        if 1.20000000000000007e-117 < z < 8e6

        1. Initial program 87.3%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(t - a\right) \cdot z}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
          8. lift--.f6457.2

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

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

      Alternative 6: 72.0% accurate, 0.8× speedup?

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

        1. Initial program 49.6%

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

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
          2. lift--.f64N/A

            \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
          3. lift--.f6476.8

            \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
        4. Applied rewrites76.8%

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

        if -2.15e-69 < z < 1.20000000000000007e-117

        1. Initial program 87.7%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
          8. lift--.f6468.7

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b, z, y\right)} \]

          if 1.20000000000000007e-117 < z < 8e6

          1. Initial program 87.3%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(t - a\right) \cdot z}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
            8. lift--.f6457.2

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

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

        Alternative 7: 70.5% accurate, 0.8× speedup?

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

          1. Initial program 49.6%

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

            \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
            2. lift--.f64N/A

              \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
            3. lift--.f6476.8

              \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
          4. Applied rewrites76.8%

            \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

          if -2.1e-69 < z < 3.1000000000000001e-118

          1. Initial program 87.7%

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

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

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

            if 3.1000000000000001e-118 < z < 8e6

            1. Initial program 87.4%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\left(t - a\right) \cdot z}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
              8. lift--.f6457.1

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

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

          Alternative 8: 46.0% accurate, 1.0× speedup?

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

            1. Initial program 38.5%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t}{\color{blue}{b - y}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{t}{b - \color{blue}{y}} \]
              2. lift--.f6445.5

                \[\leadsto \frac{t}{b - y} \]
            7. Applied rewrites45.5%

              \[\leadsto \frac{t}{\color{blue}{b - y}} \]

            if -1.04999999999999993e44 < z < -2.1e-69 or 3.1000000000000001e-118 < z < 1.40000000000000004e73

            1. Initial program 83.4%

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

              \[\leadsto \color{blue}{\frac{t - a}{b}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{t - a}{\color{blue}{b}} \]
              2. lift--.f6438.1

                \[\leadsto \frac{t - a}{b} \]
            4. Applied rewrites38.1%

              \[\leadsto \color{blue}{\frac{t - a}{b}} \]

            if -2.1e-69 < z < 3.1000000000000001e-118

            1. Initial program 87.7%

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

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

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

            Alternative 9: 44.3% accurate, 1.0× speedup?

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

              1. Initial program 41.4%

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
                8. lift--.f6427.0

                  \[\leadsto \frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)} \]
              4. Applied rewrites27.0%

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

                \[\leadsto \frac{t}{\color{blue}{b - y}} \]
              6. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{t}{b - \color{blue}{y}} \]
                2. lift--.f6445.1

                  \[\leadsto \frac{t}{b - y} \]
              7. Applied rewrites45.1%

                \[\leadsto \frac{t}{\color{blue}{b - y}} \]

              if -9.8000000000000005e35 < z < -2.15e-69 or 3.9500000000000001e-16 < z < 2.9500000000000001e28

              1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\frac{\mathsf{fma}\left(t - a, z, y \cdot x\right)}{b}}{z} \]
                9. lower-*.f6448.3

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

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

                \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
              6. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(\frac{a}{b}\right) \]
                2. lower-neg.f64N/A

                  \[\leadsto -\frac{a}{b} \]
                3. lower-/.f6423.5

                  \[\leadsto -\frac{a}{b} \]
              7. Applied rewrites23.5%

                \[\leadsto -\frac{a}{b} \]

              if -2.15e-69 < z < 3.9500000000000001e-16

              1. Initial program 87.7%

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

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

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

              Alternative 10: 36.8% accurate, 1.0× speedup?

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

                1. Initial program 41.2%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{\mathsf{fma}\left(t - a, z, y \cdot x\right)}{b}}{z} \]
                  9. lower-*.f6430.9

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

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

                  \[\leadsto \frac{t}{\color{blue}{b}} \]
                6. Step-by-step derivation
                  1. lower-/.f6428.3

                    \[\leadsto \frac{t}{b} \]
                7. Applied rewrites28.3%

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

                if -9.8000000000000005e35 < z < -2.15e-69 or 3.9500000000000001e-16 < z < 7.19999999999999952e29

                1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{\mathsf{fma}\left(t - a, z, y \cdot x\right)}{b}}{z} \]
                  9. lower-*.f6448.6

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

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

                  \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
                6. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \mathsf{neg}\left(\frac{a}{b}\right) \]
                  2. lower-neg.f64N/A

                    \[\leadsto -\frac{a}{b} \]
                  3. lower-/.f6423.8

                    \[\leadsto -\frac{a}{b} \]
                7. Applied rewrites23.8%

                  \[\leadsto -\frac{a}{b} \]

                if -2.15e-69 < z < 3.9500000000000001e-16

                1. Initial program 87.7%

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

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

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

                Alternative 11: 71.8% accurate, 1.2× speedup?

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

                  1. Initial program 50.7%

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

                    \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
                  3. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
                    2. lift--.f64N/A

                      \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
                    3. lift--.f6475.8

                      \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
                  4. Applied rewrites75.8%

                    \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

                  if -2.54999999999999993e-69 < z < 3.10000000000000004e-14

                  1. Initial program 87.7%

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \left(\frac{a}{y} + \frac{x \cdot \left(b - y\right)}{y}\right), \color{blue}{z}, x\right) \]
                    4. div-add-revN/A

                      \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{a + x \cdot \left(b - y\right)}{y}, z, x\right) \]
                    5. sub-divN/A

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{t - \left(a + \left(b - y\right) \cdot x\right)}{y}, z, x\right) \]
                    11. lift--.f6453.0

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

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

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

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

                  Alternative 12: 68.1% accurate, 1.3× speedup?

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

                    1. Initial program 50.8%

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

                      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
                    3. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
                      2. lift--.f64N/A

                        \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
                      3. lift--.f6475.6

                        \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
                    4. Applied rewrites75.6%

                      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

                    if -1.80000000000000009e-69 < z < 4.2000000000000002e-16

                    1. Initial program 87.7%

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \left(\frac{a}{y} + \frac{x \cdot \left(b - y\right)}{y}\right), \color{blue}{z}, x\right) \]
                      4. div-add-revN/A

                        \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{a + x \cdot \left(b - y\right)}{y}, z, x\right) \]
                      5. sub-divN/A

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{t}{y}, z, x\right) \]
                    6. Step-by-step derivation
                      1. Applied rewrites58.2%

                        \[\leadsto \mathsf{fma}\left(\frac{t}{y}, z, x\right) \]
                    7. Recombined 2 regimes into one program.
                    8. Add Preprocessing

                    Alternative 13: 64.1% accurate, 1.3× speedup?

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

                      1. Initial program 53.0%

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

                        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
                      3. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
                        2. lift--.f64N/A

                          \[\leadsto \frac{t - a}{\color{blue}{b} - y} \]
                        3. lift--.f6472.9

                          \[\leadsto \frac{t - a}{b - \color{blue}{y}} \]
                      4. Applied rewrites72.9%

                        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

                      if -1.80000000000000009e-69 < z < 4.7000000000000001e-63

                      1. Initial program 87.7%

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

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

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

                      Alternative 14: 53.0% accurate, 1.3× speedup?

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

                        1. Initial program 55.1%

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

                          \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} \]
                        3. Step-by-step derivation
                          1. associate-*r/N/A

                            \[\leadsto \frac{-1 \cdot x}{\color{blue}{z - 1}} \]
                          2. lower-/.f64N/A

                            \[\leadsto \frac{-1 \cdot x}{\color{blue}{z - 1}} \]
                          3. mul-1-negN/A

                            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{z} - 1} \]
                          4. lower-neg.f64N/A

                            \[\leadsto \frac{-x}{\color{blue}{z} - 1} \]
                          5. lower--.f6448.0

                            \[\leadsto \frac{-x}{z - \color{blue}{1}} \]
                        4. Applied rewrites48.0%

                          \[\leadsto \color{blue}{\frac{-x}{z - 1}} \]

                        if -3.4e17 < y < 2.49999999999999999e-74

                        1. Initial program 80.4%

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

                          \[\leadsto \color{blue}{\frac{t - a}{b}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{t - a}{\color{blue}{b}} \]
                          2. lift--.f6458.9

                            \[\leadsto \frac{t - a}{b} \]
                        4. Applied rewrites58.9%

                          \[\leadsto \color{blue}{\frac{t - a}{b}} \]
                      3. Recombined 2 regimes into one program.
                      4. Add Preprocessing

                      Alternative 15: 36.4% accurate, 1.6× speedup?

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

                        1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\frac{\mathsf{fma}\left(t - a, z, y \cdot x\right)}{b}}{z} \]
                          9. lower-*.f6433.3

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

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

                          \[\leadsto \frac{t}{\color{blue}{b}} \]
                        6. Step-by-step derivation
                          1. lower-/.f6427.4

                            \[\leadsto \frac{t}{b} \]
                        7. Applied rewrites27.4%

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

                        if -1e16 < z < 8.7999999999999998e-63

                        1. Initial program 87.7%

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \left(\frac{a}{y} + \frac{x \cdot \left(b - y\right)}{y}\right), \color{blue}{z}, x\right) \]
                          4. div-add-revN/A

                            \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{a + x \cdot \left(b - y\right)}{y}, z, x\right) \]
                          5. sub-divN/A

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{t - \left(a + \left(b - y\right) \cdot x\right)}{y}, z, x\right) \]
                          11. lift--.f6450.8

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

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

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

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

                        Alternative 16: 24.8% accurate, 39.0× speedup?

                        \[\begin{array}{l} \\ x \end{array} \]
                        (FPCore (x y z t a b) :precision binary64 x)
                        double code(double x, double y, double z, double t, double a, double b) {
                        	return x;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t, a, b)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            code = x
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	return x;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	return x
                        
                        function code(x, y, z, t, a, b)
                        	return x
                        end
                        
                        function tmp = code(x, y, z, t, a, b)
                        	tmp = x;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := x
                        
                        \begin{array}{l}
                        
                        \\
                        x
                        \end{array}
                        
                        Derivation
                        1. Initial program 66.7%

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

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

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

                          Developer Target 1: 74.1% accurate, 0.6× speedup?

                          \[\begin{array}{l} \\ \frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
                          }
                          
                          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 = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
                          }
                          
                          def code(x, y, z, t, a, b):
                          	return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
                          
                          function code(x, y, z, t, a, b)
                          	return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z))))
                          end
                          
                          function tmp = code(x, y, z, t, a, b)
                          	tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          \frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
                          \end{array}
                          

                          Reproduce

                          ?
                          herbie shell --seed 2025107 
                          (FPCore (x y z t a b)
                            :name "Development.Shake.Progress:decay from shake-0.15.5"
                            :precision binary64
                          
                            :alt
                            (! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
                          
                            (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))