Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.9% → 94.7%
Time: 6.2s
Alternatives: 15
Speedup: 1.2×

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 15 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.9% 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: 94.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ t_2 := \mathsf{fma}\left(b - y, z, y\right)\\ t_3 := \mathsf{fma}\left(z, \frac{t - a}{t\_2}, x \cdot \frac{y}{t\_2}\right)\\ t_4 := \left(b - y\right) \cdot \left(b - y\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+253}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left(-\frac{\left(-x \cdot \frac{y}{b - y}\right) - \left(-\frac{\left(t - a\right) \cdot y}{t\_4}\right)}{z}\right) + \frac{t - a}{b - y}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \frac{t}{b - y}\right) - \mathsf{fma}\left(y, \frac{t - a}{t\_4 \cdot z}, \frac{a}{b - y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
        (t_2 (fma (- b y) z y))
        (t_3 (fma z (/ (- t a) t_2) (* x (/ y t_2))))
        (t_4 (* (- b y) (- b y))))
   (if (<= t_1 -5e+253)
     t_3
     (if (<= t_1 -1e-306)
       t_1
       (if (<= t_1 0.0)
         (+
          (- (/ (- (- (* x (/ y (- b y)))) (- (/ (* (- t a) y) t_4))) z))
          (/ (- t a) (- b y)))
         (if (<= t_1 5e+290)
           t_1
           (if (<= t_1 INFINITY)
             t_3
             (-
              (fma x (/ y (* (- b y) z)) (/ t (- b y)))
              (fma y (/ (- t a) (* t_4 z)) (/ a (- b y)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_2 = fma((b - y), z, y);
	double t_3 = fma(z, ((t - a) / t_2), (x * (y / t_2)));
	double t_4 = (b - y) * (b - y);
	double tmp;
	if (t_1 <= -5e+253) {
		tmp = t_3;
	} else if (t_1 <= -1e-306) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = -((-(x * (y / (b - y))) - -(((t - a) * y) / t_4)) / z) + ((t - a) / (b - y));
	} else if (t_1 <= 5e+290) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = fma(x, (y / ((b - y) * z)), (t / (b - y))) - fma(y, ((t - a) / (t_4 * z)), (a / (b - y)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = fma(Float64(b - y), z, y)
	t_3 = fma(z, Float64(Float64(t - a) / t_2), Float64(x * Float64(y / t_2)))
	t_4 = Float64(Float64(b - y) * Float64(b - y))
	tmp = 0.0
	if (t_1 <= -5e+253)
		tmp = t_3;
	elseif (t_1 <= -1e-306)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(-Float64(Float64(Float64(-Float64(x * Float64(y / Float64(b - y)))) - Float64(-Float64(Float64(Float64(t - a) * y) / t_4))) / z)) + Float64(Float64(t - a) / Float64(b - y)));
	elseif (t_1 <= 5e+290)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(fma(x, Float64(y / Float64(Float64(b - y) * z)), Float64(t / Float64(b - y))) - fma(y, Float64(Float64(t - a) / Float64(t_4 * z)), Float64(a / Float64(b - y))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(x * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b - y), $MachinePrecision] * N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+253], t$95$3, If[LessEqual[t$95$1, -1e-306], t$95$1, If[LessEqual[t$95$1, 0.0], N[((-N[(N[((-N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) - (-N[(N[(N[(t - a), $MachinePrecision] * y), $MachinePrecision] / t$95$4), $MachinePrecision])), $MachinePrecision] / z), $MachinePrecision]) + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+290], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, N[(N[(x * N[(y / N[(N[(b - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[(t$95$4 * z), $MachinePrecision]), $MachinePrecision] + N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999997e253 or 4.9999999999999998e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 36.7%

      \[\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 \color{blue}{\frac{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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e253 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000003e-306 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.9999999999999998e290

    1. Initial program 99.4%

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

    if -1.00000000000000003e-306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 26.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}{\left(-1 \cdot \frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z} + \frac{t}{b - y}\right) - \frac{a}{b - y}} \]
    3. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto -1 \cdot \frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z} + \color{blue}{\frac{t - a}{b - y}} \]
    4. Applied rewrites85.3%

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

    if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 99.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}{\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. associate-/l*N/A

        \[\leadsto \left(x \cdot \frac{y}{z \cdot \left(b - y\right)} + \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(x, \frac{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) \]
      5. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{z \cdot \left(b - y\right)}, \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) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \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) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \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. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \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. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \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. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \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) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{y}{\left(b - y\right) \cdot z}, \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) \]
    4. Applied rewrites48.9%

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

Alternative 2: 94.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ t_2 := \mathsf{fma}\left(b - y, z, y\right)\\ t_3 := \mathsf{fma}\left(z, \frac{t - a}{t\_2}, x \cdot \frac{y}{t\_2}\right)\\ t_4 := \frac{t - a}{b - y}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+253}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left(-\frac{\left(-x \cdot \frac{y}{b - y}\right) - \left(-\frac{\left(t - a\right) \cdot y}{\left(b - y\right) \cdot \left(b - y\right)}\right)}{z}\right) + t\_4\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
        (t_2 (fma (- b y) z y))
        (t_3 (fma z (/ (- t a) t_2) (* x (/ y t_2))))
        (t_4 (/ (- t a) (- b y))))
   (if (<= t_1 -5e+253)
     t_3
     (if (<= t_1 -1e-306)
       t_1
       (if (<= t_1 0.0)
         (+
          (-
           (/
            (-
             (- (* x (/ y (- b y))))
             (- (/ (* (- t a) y) (* (- b y) (- b y)))))
            z))
          t_4)
         (if (<= t_1 5e+290) t_1 (if (<= t_1 INFINITY) t_3 t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_2 = fma((b - y), z, y);
	double t_3 = fma(z, ((t - a) / t_2), (x * (y / t_2)));
	double t_4 = (t - a) / (b - y);
	double tmp;
	if (t_1 <= -5e+253) {
		tmp = t_3;
	} else if (t_1 <= -1e-306) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = -((-(x * (y / (b - y))) - -(((t - a) * y) / ((b - y) * (b - y)))) / z) + t_4;
	} else if (t_1 <= 5e+290) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = fma(Float64(b - y), z, y)
	t_3 = fma(z, Float64(Float64(t - a) / t_2), Float64(x * Float64(y / t_2)))
	t_4 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (t_1 <= -5e+253)
		tmp = t_3;
	elseif (t_1 <= -1e-306)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(-Float64(Float64(Float64(-Float64(x * Float64(y / Float64(b - y)))) - Float64(-Float64(Float64(Float64(t - a) * y) / Float64(Float64(b - y) * Float64(b - y))))) / z)) + t_4);
	elseif (t_1 <= 5e+290)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = t_3;
	else
		tmp = t_4;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(x * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+253], t$95$3, If[LessEqual[t$95$1, -1e-306], t$95$1, If[LessEqual[t$95$1, 0.0], N[((-N[(N[((-N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) - (-N[(N[(N[(t - a), $MachinePrecision] * y), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] / z), $MachinePrecision]) + t$95$4), $MachinePrecision], If[LessEqual[t$95$1, 5e+290], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, t$95$4]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999997e253 or 4.9999999999999998e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 36.7%

      \[\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 \color{blue}{\frac{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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e253 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000003e-306 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.9999999999999998e290

    1. Initial program 99.4%

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

    if -1.00000000000000003e-306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 26.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}{\left(-1 \cdot \frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z} + \frac{t}{b - y}\right) - \frac{a}{b - y}} \]
    3. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto -1 \cdot \frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z} + \color{blue}{\frac{t - a}{b - y}} \]
    4. Applied rewrites85.3%

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

    if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

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

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

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

Alternative 3: 93.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ t_3 := \mathsf{fma}\left(b - y, z, y\right)\\ t_4 := \mathsf{fma}\left(z, \frac{t - a}{t\_3}, x \cdot \frac{y}{t\_3}\right)\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+253}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-311}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+290}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y)))
        (t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
        (t_3 (fma (- b y) z y))
        (t_4 (fma z (/ (- t a) t_3) (* x (/ y t_3)))))
   (if (<= t_2 -5e+253)
     t_4
     (if (<= t_2 -2e-311)
       t_2
       (if (<= t_2 0.0)
         t_1
         (if (<= t_2 5e+290) t_2 (if (<= t_2 INFINITY) t_4 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_3 = fma((b - y), z, y);
	double t_4 = fma(z, ((t - a) / t_3), (x * (y / t_3)));
	double tmp;
	if (t_2 <= -5e+253) {
		tmp = t_4;
	} else if (t_2 <= -2e-311) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t_1;
	} else if (t_2 <= 5e+290) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_4;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
	t_3 = fma(Float64(b - y), z, y)
	t_4 = fma(z, Float64(Float64(t - a) / t_3), Float64(x * Float64(y / t_3)))
	tmp = 0.0
	if (t_2 <= -5e+253)
		tmp = t_4;
	elseif (t_2 <= -2e-311)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t_1;
	elseif (t_2 <= 5e+290)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = t_4;
	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]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(t - a), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(x * N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+253], t$95$4, If[LessEqual[t$95$2, -2e-311], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+290], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$4, t$95$1]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_3 := \mathsf{fma}\left(b - y, z, y\right)\\
t_4 := \mathsf{fma}\left(z, \frac{t - a}{t\_3}, x \cdot \frac{y}{t\_3}\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+253}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-311}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999997e253 or 4.9999999999999998e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 36.7%

      \[\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 \color{blue}{\frac{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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e253 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.9999999999999e-311 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.9999999999999998e290

    1. Initial program 99.4%

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

    if -1.9999999999999e-311 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 10.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}{\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.5

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

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

Alternative 4: 91.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ t_3 := \mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(b - y, z, y\right)}, x\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-311}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+290}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y)))
        (t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
        (t_3 (fma z (/ (- t a) (fma (- b y) z y)) x)))
   (if (<= t_2 (- INFINITY))
     t_3
     (if (<= t_2 -2e-311)
       t_2
       (if (<= t_2 0.0)
         t_1
         (if (<= t_2 5e+290) t_2 (if (<= t_2 INFINITY) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_3 = fma(z, ((t - a) / fma((b - y), z, y)), x);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= -2e-311) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t_1;
	} else if (t_2 <= 5e+290) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
	t_3 = fma(z, Float64(Float64(t - a) / fma(Float64(b - y), z, y)), x)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= -2e-311)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t_1;
	elseif (t_2 <= 5e+290)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = t_3;
	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]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(z * N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-311], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+290], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-311}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 4.9999999999999998e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 32.0%

      \[\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 \color{blue}{\frac{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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.9999999999999e-311 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.9999999999999998e290

      1. Initial program 99.4%

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

      if -1.9999999999999e-311 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

      1. Initial program 10.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}{\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.5

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

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

    Alternative 5: 76.6% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-144}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{y}, x \cdot \frac{y}{y}\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\ \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.8e-18)
         t_1
         (if (<= z -2.55e-144)
           (fma z (/ (- t a) y) (* x (/ y y)))
           (if (<= z 7.2e-34) (/ (+ (* x y) (* z (- t a))) 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.8e-18) {
    		tmp = t_1;
    	} else if (z <= -2.55e-144) {
    		tmp = fma(z, ((t - a) / y), (x * (y / y)));
    	} else if (z <= 7.2e-34) {
    		tmp = ((x * y) + (z * (t - a))) / 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.8e-18)
    		tmp = t_1;
    	elseif (z <= -2.55e-144)
    		tmp = fma(z, Float64(Float64(t - a) / y), Float64(x * Float64(y / y)));
    	elseif (z <= 7.2e-34)
    		tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / 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.8e-18], t$95$1, If[LessEqual[z, -2.55e-144], N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] + N[(x * N[(y / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-34], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{t - a}{b - y}\\
    \mathbf{if}\;z \leq -2.8 \cdot 10^{-18}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq -2.55 \cdot 10^{-144}:\\
    \;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{y}, x \cdot \frac{y}{y}\right)\\
    
    \mathbf{elif}\;z \leq 7.2 \cdot 10^{-34}:\\
    \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -2.80000000000000012e-18 or 7.20000000000000016e-34 < z

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

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

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

      if -2.80000000000000012e-18 < z < -2.55e-144

      1. Initial program 87.8%

        \[\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 \color{blue}{\frac{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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.55e-144 < z < 7.20000000000000016e-34

          1. Initial program 86.8%

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

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

          Alternative 6: 70.7% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -4 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 23000000000000:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(b - y, z, y\right)}, 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 -4e-16)
               t_1
               (if (<= z 23000000000000.0)
                 (fma z (/ (- t a) (fma (- b y) z y)) 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 <= -4e-16) {
          		tmp = t_1;
          	} else if (z <= 23000000000000.0) {
          		tmp = fma(z, ((t - a) / fma((b - y), z, y)), 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 <= -4e-16)
          		tmp = t_1;
          	elseif (z <= 23000000000000.0)
          		tmp = fma(z, Float64(Float64(t - a) / fma(Float64(b - y), z, y)), 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, -4e-16], t$95$1, If[LessEqual[z, 23000000000000.0], N[(z * N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{t - a}{b - y}\\
          \mathbf{if}\;z \leq -4 \cdot 10^{-16}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 23000000000000:\\
          \;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(b - y, z, y\right)}, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -3.9999999999999999e-16 or 2.3e13 < z

            1. Initial program 47.5%

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

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

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

            if -3.9999999999999999e-16 < z < 2.3e13

            1. Initial program 87.1%

              \[\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 \color{blue}{\frac{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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 69.7% accurate, 1.0× speedup?

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

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

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

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

              if -2.80000000000000012e-18 < z < 7.20000000000000016e-34

              1. Initial program 87.0%

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

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

              Alternative 8: 68.8% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 29000000000000:\\ \;\;\;\;x \cdot \frac{y}{\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 -3.6e-16)
                   t_1
                   (if (<= z 29000000000000.0) (* x (/ y (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 <= -3.6e-16) {
              		tmp = t_1;
              	} else if (z <= 29000000000000.0) {
              		tmp = x * (y / 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 <= -3.6e-16)
              		tmp = t_1;
              	elseif (z <= 29000000000000.0)
              		tmp = Float64(x * Float64(y / 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, -3.6e-16], t$95$1, If[LessEqual[z, 29000000000000.0], N[(x * N[(y / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{t - a}{b - y}\\
              \mathbf{if}\;z \leq -3.6 \cdot 10^{-16}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 29000000000000:\\
              \;\;\;\;x \cdot \frac{y}{\mathsf{fma}\left(b - y, z, y\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -3.59999999999999983e-16 or 2.9e13 < z

                1. Initial program 47.5%

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

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

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

                if -3.59999999999999983e-16 < z < 2.9e13

                1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 68.4% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 22000000000000:\\ \;\;\;\;x \cdot \frac{y}{\mathsf{fma}\left(b, 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 -3.6e-16)
                   t_1
                   (if (<= z 22000000000000.0) (* x (/ y (fma b 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 <= -3.6e-16) {
              		tmp = t_1;
              	} else if (z <= 22000000000000.0) {
              		tmp = x * (y / fma(b, 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 <= -3.6e-16)
              		tmp = t_1;
              	elseif (z <= 22000000000000.0)
              		tmp = Float64(x * Float64(y / fma(b, 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, -3.6e-16], t$95$1, If[LessEqual[z, 22000000000000.0], N[(x * N[(y / N[(b * z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{t - a}{b - y}\\
              \mathbf{if}\;z \leq -3.6 \cdot 10^{-16}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 22000000000000:\\
              \;\;\;\;x \cdot \frac{y}{\mathsf{fma}\left(b, z, y\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -3.59999999999999983e-16 or 2.2e13 < z

                1. Initial program 47.5%

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

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

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

                if -3.59999999999999983e-16 < z < 2.2e13

                1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 64.6% accurate, 1.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{-20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-34}:\\ \;\;\;\;\frac{-x}{z - 1}\\ \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.05e-20) t_1 (if (<= z 6.2e-34) (/ (- x) (- z 1.0)) 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.05e-20) {
                		tmp = t_1;
                	} else if (z <= 6.2e-34) {
                		tmp = -x / (z - 1.0);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t, a, b)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8), intent (in) :: a
                    real(8), intent (in) :: b
                    real(8) :: t_1
                    real(8) :: tmp
                    t_1 = (t - a) / (b - y)
                    if (z <= (-2.05d-20)) then
                        tmp = t_1
                    else if (z <= 6.2d-34) then
                        tmp = -x / (z - 1.0d0)
                    else
                        tmp = t_1
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = (t - a) / (b - y);
                	double tmp;
                	if (z <= -2.05e-20) {
                		tmp = t_1;
                	} else if (z <= 6.2e-34) {
                		tmp = -x / (z - 1.0);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b):
                	t_1 = (t - a) / (b - y)
                	tmp = 0
                	if z <= -2.05e-20:
                		tmp = t_1
                	elif z <= 6.2e-34:
                		tmp = -x / (z - 1.0)
                	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.05e-20)
                		tmp = t_1;
                	elseif (z <= 6.2e-34)
                		tmp = Float64(Float64(-x) / Float64(z - 1.0));
                	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 <= -2.05e-20)
                		tmp = t_1;
                	elseif (z <= 6.2e-34)
                		tmp = -x / (z - 1.0);
                	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, -2.05e-20], t$95$1, If[LessEqual[z, 6.2e-34], N[((-x) / N[(z - 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{t - a}{b - y}\\
                \mathbf{if}\;z \leq -2.05 \cdot 10^{-20}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 6.2 \cdot 10^{-34}:\\
                \;\;\;\;\frac{-x}{z - 1}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -2.05e-20 or 6.1999999999999996e-34 < 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--.f6476.5

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

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

                  if -2.05e-20 < z < 6.1999999999999996e-34

                  1. Initial program 87.0%

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

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

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

                Alternative 11: 53.7% accurate, 1.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-x}{z - 1}\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-6}:\\ \;\;\;\;\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 -1.8e+15) t_1 (if (<= y 1.75e-6) (/ (- 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 <= -1.8e+15) {
                		tmp = t_1;
                	} else if (y <= 1.75e-6) {
                		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 <= (-1.8d+15)) then
                        tmp = t_1
                    else if (y <= 1.75d-6) 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 <= -1.8e+15) {
                		tmp = t_1;
                	} else if (y <= 1.75e-6) {
                		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 <= -1.8e+15:
                		tmp = t_1
                	elif y <= 1.75e-6:
                		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 <= -1.8e+15)
                		tmp = t_1;
                	elseif (y <= 1.75e-6)
                		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 <= -1.8e+15)
                		tmp = t_1;
                	elseif (y <= 1.75e-6)
                		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, -1.8e+15], t$95$1, If[LessEqual[y, 1.75e-6], 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 -1.8 \cdot 10^{+15}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \leq 1.75 \cdot 10^{-6}:\\
                \;\;\;\;\frac{t - a}{b}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -1.8e15 or 1.74999999999999997e-6 < y

                  1. Initial program 53.7%

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

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

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

                  if -1.8e15 < y < 1.74999999999999997e-6

                  1. Initial program 80.1%

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

                      \[\leadsto \frac{t - a}{b} \]
                  4. Applied rewrites56.5%

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

                Alternative 12: 47.9% accurate, 1.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b}\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{-20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (/ (- t a) b)))
                   (if (<= z -2.1e-20) t_1 (if (<= z 2.2e-26) x t_1))))
                double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = (t - a) / b;
                	double tmp;
                	if (z <= -2.1e-20) {
                		tmp = t_1;
                	} else if (z <= 2.2e-26) {
                		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
                    if (z <= (-2.1d-20)) then
                        tmp = t_1
                    else if (z <= 2.2d-26) 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;
                	double tmp;
                	if (z <= -2.1e-20) {
                		tmp = t_1;
                	} else if (z <= 2.2e-26) {
                		tmp = x;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b):
                	t_1 = (t - a) / b
                	tmp = 0
                	if z <= -2.1e-20:
                		tmp = t_1
                	elif z <= 2.2e-26:
                		tmp = x
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t, a, b)
                	t_1 = Float64(Float64(t - a) / b)
                	tmp = 0.0
                	if (z <= -2.1e-20)
                		tmp = t_1;
                	elseif (z <= 2.2e-26)
                		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;
                	tmp = 0.0;
                	if (z <= -2.1e-20)
                		tmp = t_1;
                	elseif (z <= 2.2e-26)
                		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] / b), $MachinePrecision]}, If[LessEqual[z, -2.1e-20], t$95$1, If[LessEqual[z, 2.2e-26], x, t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{t - a}{b}\\
                \mathbf{if}\;z \leq -2.1 \cdot 10^{-20}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 2.2 \cdot 10^{-26}:\\
                \;\;\;\;x\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -2.0999999999999999e-20 or 2.2000000000000001e-26 < z

                  1. Initial program 50.3%

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

                      \[\leadsto \frac{t - a}{b} \]
                  4. Applied rewrites46.7%

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

                  if -2.0999999999999999e-20 < z < 2.2000000000000001e-26

                  1. Initial program 87.0%

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

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

                  Alternative 13: 45.2% accurate, 1.6× speedup?

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

                    1. Initial program 47.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--.f6430.3

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

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

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

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

                    if -1.79999999999999991e-16 < z < 2.2e13

                    1. Initial program 87.1%

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

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

                    Alternative 14: 36.7% accurate, 2.0× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-16}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 22000000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (if (<= z -1.8e-16) (/ t b) (if (<= z 22000000000000.0) x (/ t b))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if (z <= -1.8e-16) {
                    		tmp = t / b;
                    	} else if (z <= 22000000000000.0) {
                    		tmp = x;
                    	} 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) :: tmp
                        if (z <= (-1.8d-16)) then
                            tmp = t / b
                        else if (z <= 22000000000000.0d0) then
                            tmp = x
                        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 tmp;
                    	if (z <= -1.8e-16) {
                    		tmp = t / b;
                    	} else if (z <= 22000000000000.0) {
                    		tmp = x;
                    	} else {
                    		tmp = t / b;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	tmp = 0
                    	if z <= -1.8e-16:
                    		tmp = t / b
                    	elif z <= 22000000000000.0:
                    		tmp = x
                    	else:
                    		tmp = t / b
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	tmp = 0.0
                    	if (z <= -1.8e-16)
                    		tmp = Float64(t / b);
                    	elseif (z <= 22000000000000.0)
                    		tmp = x;
                    	else
                    		tmp = Float64(t / b);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	tmp = 0.0;
                    	if (z <= -1.8e-16)
                    		tmp = t / b;
                    	elseif (z <= 22000000000000.0)
                    		tmp = x;
                    	else
                    		tmp = t / b;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.8e-16], N[(t / b), $MachinePrecision], If[LessEqual[z, 22000000000000.0], x, N[(t / b), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -1.8 \cdot 10^{-16}:\\
                    \;\;\;\;\frac{t}{b}\\
                    
                    \mathbf{elif}\;z \leq 22000000000000:\\
                    \;\;\;\;x\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{t}{b}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -1.79999999999999991e-16 or 2.2e13 < z

                      1. Initial program 47.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--.f6430.3

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

                        \[\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{t}{\color{blue}{b}} \]
                      6. Step-by-step derivation
                        1. lower-/.f6427.0

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

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

                      if -1.79999999999999991e-16 < z < 2.2e13

                      1. Initial program 87.1%

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

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

                      Alternative 15: 24.9% accurate, 23.9× 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.9%

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

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

                        Reproduce

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