Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 65.5% → 96.2%
Time: 5.9s
Alternatives: 17
Speedup: 1.3×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 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: 65.5% 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: 96.2% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \mathsf{fma}\left(\frac{y}{z}, \frac{t - a}{{\left(b - y\right)}^{2}}, \frac{a}{b - 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(z, \frac{t - a}{t\_2}, x \cdot \frac{y}{t\_2}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;t\_3\\

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

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

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


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

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

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

    1. Initial program 10.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.5% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(-x \cdot \frac{y}{b - y}\right) - \left(-\frac{\left(t - a\right) \cdot y}{{\left(b - y\right)}^{2}}\right)}{z}, -1, t\_2\right)\\

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

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


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

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

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

    1. Initial program 28.9%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

Alternative 3: 90.7% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{-291}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999994e-304 or 9.99999999999999962e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.99999999999999962e125

    1. Initial program 99.4%

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

    if -1.99999999999999994e-304 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999962e-292 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 11.8%

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

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

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

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

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

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

Alternative 4: 87.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq 10^{-291}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+125}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t - a}{\mathsf{fma}\left(b - y, z, y\right)}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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 29.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999994e-304 or 9.99999999999999962e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.99999999999999962e125

      1. Initial program 99.4%

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

      if -1.99999999999999994e-304 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999962e-292 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

      1. Initial program 11.8%

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

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

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

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

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

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

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

      1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 91.1% accurate, 0.2× speedup?

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

        1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 99.4%

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

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

        1. Initial program 10.9%

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

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

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

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

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

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

      Alternative 6: 72.0% accurate, 0.8× speedup?

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

        1. Initial program 44.1%

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

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

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

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

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

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

        if -0.0269999999999999997 < z < 4.5e-47

        1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t - a}{y} \cdot z + \color{blue}{x} \]
            3. lower-*.f6464.6

              \[\leadsto \frac{t - a}{y} \cdot z + x \]
          3. Applied rewrites64.6%

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

          if 4.5e-47 < z < 9e12

          1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 76.4% accurate, 0.9× speedup?

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

          1. Initial program 42.8%

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

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

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

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

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

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

          if -3.3e21 < z < 5e6

          1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 71.5% accurate, 1.1× speedup?

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

            1. Initial program 45.0%

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

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

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

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

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

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

            if -0.0269999999999999997 < z < 0.010999999999999999

            1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{t - a}{y} \cdot z + \color{blue}{x} \]
                3. lower-*.f6463.7

                  \[\leadsto \frac{t - a}{y} \cdot z + x \]
              3. Applied rewrites63.7%

                \[\leadsto \frac{t - a}{y} \cdot z + \color{blue}{x} \]
            7. Recombined 2 regimes into one program.
            8. Add Preprocessing

            Alternative 9: 71.5% accurate, 1.2× speedup?

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

              1. Initial program 45.0%

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

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

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

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

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

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

              if -0.0269999999999999997 < z < 0.010999999999999999

              1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 34.6% accurate, 1.3× speedup?

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

                1. Initial program 47.8%

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

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

                    \[\leadsto \color{blue}{x} \]
                  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. lift--.f64N/A

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

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

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

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

                      \[\leadsto \frac{t}{b} \]
                  7. Applied rewrites25.9%

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

                  if -1.25e266 < z < -0.34999999999999998

                  1. Initial program 50.1%

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

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

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

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

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

                      \[\leadsto \frac{\left(\mathsf{neg}\left(a\right)\right) \cdot z}{y + z \cdot \left(b - y\right)} \]
                    5. lower-*.f64N/A

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

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

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

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

                      \[\leadsto \frac{\left(-a\right) \cdot z}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
                    10. lift--.f6422.5

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

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

                    \[\leadsto \frac{a \cdot z}{\color{blue}{y \cdot \left(z - 1\right)}} \]
                  6. Step-by-step derivation
                    1. times-fracN/A

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

                      \[\leadsto \frac{a}{y} \cdot \frac{z}{\color{blue}{z - 1}} \]
                    3. lower-/.f64N/A

                      \[\leadsto \frac{a}{y} \cdot \frac{z}{\color{blue}{z} - 1} \]
                    4. lower-/.f64N/A

                      \[\leadsto \frac{a}{y} \cdot \frac{z}{z - \color{blue}{1}} \]
                    5. lower--.f6419.3

                      \[\leadsto \frac{a}{y} \cdot \frac{z}{z - 1} \]
                  7. Applied rewrites19.3%

                    \[\leadsto \frac{a}{y} \cdot \color{blue}{\frac{z}{z - 1}} \]
                  8. Taylor expanded in z around inf

                    \[\leadsto \frac{a}{y} \]
                  9. Step-by-step derivation
                    1. lift-/.f6419.1

                      \[\leadsto \frac{a}{y} \]
                  10. Applied rewrites19.1%

                    \[\leadsto \frac{a}{y} \]

                  if -0.34999999999999998 < z < 1.4e-58

                  1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 67.1% accurate, 1.3× speedup?

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

                    1. Initial program 47.5%

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

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

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

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

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

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

                    if -0.0269999999999999997 < z < 2.7e-40

                    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 64.0% accurate, 1.3× speedup?

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

                      1. Initial program 54.2%

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

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

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

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

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

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

                      if -4.79999999999999975e-122 < z < 1.70000000000000009e-59

                      1. Initial program 87.1%

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

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

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

                      Alternative 13: 53.9% accurate, 1.3× speedup?

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

                        1. Initial program 49.5%

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

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

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

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

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

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

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

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

                        if -4.6e8 < y < 1.8e45

                        1. Initial program 79.2%

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

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

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

                            \[\leadsto \frac{t - a}{b} \]
                        4. Applied rewrites54.2%

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

                      Alternative 14: 46.4% accurate, 1.4× speedup?

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

                        1. Initial program 50.0%

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

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

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

                          if -2.1e18 < y < 9.2e16

                          1. Initial program 79.6%

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

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

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

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

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

                        Alternative 15: 33.1% accurate, 1.6× speedup?

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

                          1. Initial program 47.2%

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

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

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

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

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

                              \[\leadsto \frac{\left(\mathsf{neg}\left(a\right)\right) \cdot z}{y + z \cdot \left(b - y\right)} \]
                            5. lower-*.f64N/A

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

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

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

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

                              \[\leadsto \frac{\left(-a\right) \cdot z}{\mathsf{fma}\left(b - y, \color{blue}{z}, y\right)} \]
                            10. lift--.f6422.5

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

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

                            \[\leadsto \frac{a \cdot z}{\color{blue}{y \cdot \left(z - 1\right)}} \]
                          6. Step-by-step derivation
                            1. times-fracN/A

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

                              \[\leadsto \frac{a}{y} \cdot \frac{z}{\color{blue}{z - 1}} \]
                            3. lower-/.f64N/A

                              \[\leadsto \frac{a}{y} \cdot \frac{z}{\color{blue}{z} - 1} \]
                            4. lower-/.f64N/A

                              \[\leadsto \frac{a}{y} \cdot \frac{z}{z - \color{blue}{1}} \]
                            5. lower--.f6421.3

                              \[\leadsto \frac{a}{y} \cdot \frac{z}{z - 1} \]
                          7. Applied rewrites21.3%

                            \[\leadsto \frac{a}{y} \cdot \color{blue}{\frac{z}{z - 1}} \]
                          8. Taylor expanded in z around inf

                            \[\leadsto \frac{a}{y} \]
                          9. Step-by-step derivation
                            1. lift-/.f6420.4

                              \[\leadsto \frac{a}{y} \]
                          10. Applied rewrites20.4%

                            \[\leadsto \frac{a}{y} \]

                          if -0.34999999999999998 < z < 1.75e-34

                          1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 16: 24.8% accurate, 5.6× speedup?

                          \[\begin{array}{l} \\ \mathsf{fma}\left(x, z, x\right) \end{array} \]
                          (FPCore (x y z t a b) :precision binary64 (fma x z x))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return fma(x, z, x);
                          }
                          
                          function code(x, y, z, t, a, b)
                          	return fma(x, z, x)
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(x * z + x), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          \mathsf{fma}\left(x, z, x\right)
                          \end{array}
                          
                          Derivation
                          1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(x, z, x\right) \]
                            2. Add Preprocessing

                            Alternative 17: 24.6% accurate, 39.0× speedup?

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

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

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

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

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

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

                              Reproduce

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