Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.0% → 95.0%
Time: 9.5s
Alternatives: 13
Speedup: 0.9×

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 13 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.0% 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: 95.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(-1, \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}\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\


\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)))) < -inf.0 or 2.0000000000000001e281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 66.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. div-addN/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)}} \]
      4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
      15. remove-double-negN/A

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999985e-305 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e281

    1. Initial program 66.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. div-addN/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)}} \]
      4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
      15. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{\color{blue}{y + z \cdot \left(b - y\right)}} \]
    5. Applied rewrites66.0%

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

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

    1. Initial program 66.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. lower--.f64N/A

        \[\leadsto \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) - \color{blue}{\frac{a}{b - y}} \]
    4. Applied rewrites46.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \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}} \]

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

    1. Initial program 66.0%

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

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

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

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

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

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

Alternative 2: 94.4% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;t\_1\\

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

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


\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 2.0000000000000001e281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 66.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. div-addN/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)}} \]
      4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
      15. remove-double-negN/A

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999985e-305 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e281

    1. Initial program 66.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. div-addN/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)}} \]
      4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
      15. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{\color{blue}{y + z \cdot \left(b - y\right)}} \]
    5. Applied rewrites66.0%

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

    if -4.99999999999999985e-305 < (/.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 66.0%

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

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

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

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

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

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

Alternative 3: 91.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;t\_1\\

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

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


\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 2.0000000000000001e281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 66.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. div-addN/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)}} \]
      4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
      15. remove-double-negN/A

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

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

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

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

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

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

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

      if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999985e-305 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e281

      1. Initial program 66.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. div-addN/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)}} \]
        4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
        15. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{\color{blue}{y + z \cdot \left(b - y\right)}} \]
      5. Applied rewrites66.0%

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

      if -4.99999999999999985e-305 < (/.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 66.0%

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

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

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

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

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

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

    Alternative 4: 88.1% accurate, 0.2× speedup?

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

      1. Initial program 66.0%

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{y \cdot x} + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
        8. lower-fma.f6466.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999985e-305 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000031e289

          1. Initial program 66.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. div-addN/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)}} \]
            4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
            15. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{\color{blue}{y + z \cdot \left(b - y\right)}} \]
          5. Applied rewrites66.0%

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

          if -4.99999999999999985e-305 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 5.00000000000000031e289 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

          1. Initial program 66.0%

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

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

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

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

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

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

        Alternative 5: 87.3% accurate, 0.7× speedup?

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

          1. Initial program 66.0%

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

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

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

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

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

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

          if -1.28e20 < z < 23000

          1. Initial program 66.0%

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{y \cdot x} + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
            8. lower-fma.f6466.0

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 83.3% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -7.6 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 22000:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(t - a\right) \cdot z\right)}{\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 -7.6e+19)
               t_1
               (if (<= z 22000.0) (/ (fma y x (* (- t a) z)) (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 <= -7.6e+19) {
          		tmp = t_1;
          	} else if (z <= 22000.0) {
          		tmp = fma(y, x, ((t - a) * z)) / 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 <= -7.6e+19)
          		tmp = t_1;
          	elseif (z <= 22000.0)
          		tmp = Float64(fma(y, x, Float64(Float64(t - a) * z)) / 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, -7.6e+19], t$95$1, If[LessEqual[z, 22000.0], N[(N[(y * x + N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / N[(b * z + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{t - a}{b - y}\\
          \mathbf{if}\;z \leq -7.6 \cdot 10^{+19}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 22000:\\
          \;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(t - a\right) \cdot z\right)}{\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 < -7.6e19 or 22000 < z

            1. Initial program 66.0%

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

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

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

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

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

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

            if -7.6e19 < z < 22000

            1. Initial program 66.0%

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

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{y \cdot x} + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
              8. lower-fma.f6466.0

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 73.9% accurate, 0.9× speedup?

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

              1. Initial program 66.0%

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

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

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

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

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

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

              if -9.00000000000000039e24 < z < 59000

              1. Initial program 66.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. div-addN/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)}} \]
                4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
                15. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{\color{blue}{y + z \cdot \left(b - y\right)}} \]
              5. Applied rewrites66.0%

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

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

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

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

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

            Alternative 8: 65.5% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -7.6 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-58}:\\ \;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-15}:\\ \;\;\;\;-1 \cdot \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 -7.6e+19)
                 t_1
                 (if (<= z -2.55e-58)
                   (/ (- (+ t (/ (* x y) z)) a) b)
                   (if (<= z 7e-15) (* -1.0 (/ 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 <= -7.6e+19) {
            		tmp = t_1;
            	} else if (z <= -2.55e-58) {
            		tmp = ((t + ((x * y) / z)) - a) / b;
            	} else if (z <= 7e-15) {
            		tmp = -1.0 * (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 <= (-7.6d+19)) then
                    tmp = t_1
                else if (z <= (-2.55d-58)) then
                    tmp = ((t + ((x * y) / z)) - a) / b
                else if (z <= 7d-15) then
                    tmp = (-1.0d0) * (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 <= -7.6e+19) {
            		tmp = t_1;
            	} else if (z <= -2.55e-58) {
            		tmp = ((t + ((x * y) / z)) - a) / b;
            	} else if (z <= 7e-15) {
            		tmp = -1.0 * (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 <= -7.6e+19:
            		tmp = t_1
            	elif z <= -2.55e-58:
            		tmp = ((t + ((x * y) / z)) - a) / b
            	elif z <= 7e-15:
            		tmp = -1.0 * (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 <= -7.6e+19)
            		tmp = t_1;
            	elseif (z <= -2.55e-58)
            		tmp = Float64(Float64(Float64(t + Float64(Float64(x * y) / z)) - a) / b);
            	elseif (z <= 7e-15)
            		tmp = Float64(-1.0 * 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 <= -7.6e+19)
            		tmp = t_1;
            	elseif (z <= -2.55e-58)
            		tmp = ((t + ((x * y) / z)) - a) / b;
            	elseif (z <= 7e-15)
            		tmp = -1.0 * (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, -7.6e+19], t$95$1, If[LessEqual[z, -2.55e-58], N[(N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 7e-15], N[(-1.0 * N[(x / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{t - a}{b - y}\\
            \mathbf{if}\;z \leq -7.6 \cdot 10^{+19}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq -2.55 \cdot 10^{-58}:\\
            \;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\
            
            \mathbf{elif}\;z \leq 7 \cdot 10^{-15}:\\
            \;\;\;\;-1 \cdot \frac{x}{z - 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -7.6e19 or 7.0000000000000001e-15 < z

              1. Initial program 66.0%

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

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

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

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

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

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

              if -7.6e19 < z < -2.55e-58

              1. Initial program 66.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. div-addN/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)}} \]
                4. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{\left(b - y\right) \cdot z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)}, x, \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\right) \]
                15. remove-double-negN/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b} \]
                5. lower-*.f6439.8

                  \[\leadsto \frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b} \]
              6. Applied rewrites39.8%

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

              if -2.55e-58 < z < 7.0000000000000001e-15

              1. Initial program 66.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. lower-*.f64N/A

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

                  \[\leadsto -1 \cdot \frac{x}{\color{blue}{z - 1}} \]
                3. lower--.f6433.8

                  \[\leadsto -1 \cdot \frac{x}{z - \color{blue}{1}} \]
              4. Applied rewrites33.8%

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

            Alternative 9: 65.5% accurate, 1.0× speedup?

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

              1. Initial program 66.0%

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

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

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

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

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

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

              if -7.6e19 < z < -2.55e-58

              1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.55e-58 < z < 7.0000000000000001e-15

              1. Initial program 66.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. lower-*.f64N/A

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

                  \[\leadsto -1 \cdot \frac{x}{\color{blue}{z - 1}} \]
                3. lower--.f6433.8

                  \[\leadsto -1 \cdot \frac{x}{z - \color{blue}{1}} \]
              4. Applied rewrites33.8%

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

            Alternative 10: 65.2% accurate, 1.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{-63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-15}:\\ \;\;\;\;-1 \cdot \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 -4.8e-63) t_1 (if (<= z 7e-15) (* -1.0 (/ 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 <= -4.8e-63) {
            		tmp = t_1;
            	} else if (z <= 7e-15) {
            		tmp = -1.0 * (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 <= (-4.8d-63)) then
                    tmp = t_1
                else if (z <= 7d-15) then
                    tmp = (-1.0d0) * (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 <= -4.8e-63) {
            		tmp = t_1;
            	} else if (z <= 7e-15) {
            		tmp = -1.0 * (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 <= -4.8e-63:
            		tmp = t_1
            	elif z <= 7e-15:
            		tmp = -1.0 * (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 <= -4.8e-63)
            		tmp = t_1;
            	elseif (z <= 7e-15)
            		tmp = Float64(-1.0 * 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 <= -4.8e-63)
            		tmp = t_1;
            	elseif (z <= 7e-15)
            		tmp = -1.0 * (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, -4.8e-63], t$95$1, If[LessEqual[z, 7e-15], N[(-1.0 * N[(x / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{t - a}{b - y}\\
            \mathbf{if}\;z \leq -4.8 \cdot 10^{-63}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 7 \cdot 10^{-15}:\\
            \;\;\;\;-1 \cdot \frac{x}{z - 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -4.8000000000000001e-63 or 7.0000000000000001e-15 < z

              1. Initial program 66.0%

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

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

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

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

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

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

              if -4.8000000000000001e-63 < z < 7.0000000000000001e-15

              1. Initial program 66.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. lower-*.f64N/A

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

                  \[\leadsto -1 \cdot \frac{x}{\color{blue}{z - 1}} \]
                3. lower--.f6433.8

                  \[\leadsto -1 \cdot \frac{x}{z - \color{blue}{1}} \]
              4. Applied rewrites33.8%

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

            Alternative 11: 51.8% accurate, 2.5× speedup?

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
            5. Add Preprocessing

            Alternative 12: 35.0% accurate, 3.4× speedup?

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

              \[\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. lower--.f6435.0

                \[\leadsto \frac{t - a}{b} \]
            4. Applied rewrites35.0%

              \[\leadsto \color{blue}{\frac{t - a}{b}} \]
            5. Add Preprocessing

            Alternative 13: 20.4% accurate, 5.5× speedup?

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

              \[\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. lower--.f6435.0

                \[\leadsto \frac{t - a}{b} \]
            4. Applied rewrites35.0%

              \[\leadsto \color{blue}{\frac{t - a}{b}} \]
            5. Taylor expanded in t around inf

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

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

              \[\leadsto \frac{t}{\color{blue}{b}} \]
            8. Add Preprocessing

            Reproduce

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