Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.0% → 91.0%
Time: 12.4s
Alternatives: 18
Speedup: 1.2×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
    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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 66.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
    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: 91.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 10^{+269}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t - a, \frac{z}{t\_1}, t\_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999999e266

    1. Initial program 27.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999999e266 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e269

    1. Initial program 94.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t - a\right) \cdot \frac{z}{\mathsf{fma}\left(b - y, z, y\right)} + \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
      3. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z \cdot \left(t - a\right) - \left(\mathsf{neg}\left(y\right)\right) \cdot x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
      11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

    1. Initial program 35.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - a, \frac{z}{\mathsf{fma}\left(b - y, z, y\right)}, y \cdot \frac{x}{\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. Initial program 0.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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)} \]
    4. Step-by-step derivation
      1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -5 \cdot 10^{+266}:\\ \;\;\;\;\mathsf{fma}\left(t - a, {\left(b - y\right)}^{-1}, y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}\right)\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 10^{+269}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(t - a, \frac{z}{\mathsf{fma}\left(b - y, z, y\right)}, y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{z}, y, t - a\right)}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{t - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 88.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b - y, z, y\right)\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := \frac{x \cdot y + t\_2}{y + z \cdot \left(b - y\right)}\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+266} \lor \neg \left(t\_3 \leq 10^{+269}\right):\\ \;\;\;\;\mathsf{fma}\left(t - a, {\left(b - y\right)}^{-1}, y \cdot \frac{x}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_2\right)}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma (- b y) z y))
        (t_2 (* z (- t a)))
        (t_3 (/ (+ (* x y) t_2) (+ y (* z (- b y))))))
   (if (or (<= t_3 -5e+266) (not (<= t_3 1e+269)))
     (fma (- t a) (pow (- b y) -1.0) (* y (/ x t_1)))
     (/ (fma x y t_2) t_1))))
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 = z * (t - a);
	double t_3 = ((x * y) + t_2) / (y + (z * (b - y)));
	double tmp;
	if ((t_3 <= -5e+266) || !(t_3 <= 1e+269)) {
		tmp = fma((t - a), pow((b - y), -1.0), (y * (x / t_1)));
	} else {
		tmp = fma(x, y, t_2) / t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(Float64(b - y), z, y)
	t_2 = Float64(z * Float64(t - a))
	t_3 = Float64(Float64(Float64(x * y) + t_2) / Float64(y + Float64(z * Float64(b - y))))
	tmp = 0.0
	if ((t_3 <= -5e+266) || !(t_3 <= 1e+269))
		tmp = fma(Float64(t - a), (Float64(b - y) ^ -1.0), Float64(y * Float64(x / t_1)));
	else
		tmp = Float64(fma(x, y, t_2) / t_1);
	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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$3, -5e+266], N[Not[LessEqual[t$95$3, 1e+269]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] * N[Power[N[(b - y), $MachinePrecision], -1.0], $MachinePrecision] + N[(y * N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_2\right)}{t\_1}\\


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

    1. Initial program 18.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999999e266 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e269

    1. Initial program 94.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t - a\right) \cdot \frac{z}{\mathsf{fma}\left(b - y, z, y\right)} + \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
      3. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z \cdot \left(t - a\right) - \left(\mathsf{neg}\left(y\right)\right) \cdot x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
      11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -5 \cdot 10^{+266} \lor \neg \left(\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 10^{+269}\right):\\ \;\;\;\;\mathsf{fma}\left(t - a, {\left(b - y\right)}^{-1}, y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+224}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\

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

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


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

    1. Initial program 39.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e252 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999994e224

    1. Initial program 94.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
      4. div-addN/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)}} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t - a\right) \cdot \frac{z}{\mathsf{fma}\left(b - y, z, y\right)} + \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
      3. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z \cdot \left(t - a\right) - \left(\mathsf{neg}\left(y\right)\right) \cdot x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
      11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, 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. Add Preprocessing
    3. Taylor expanded in z around inf

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -1 \cdot 10^{+253}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{t - a}{x}, y\right)}{\mathsf{fma}\left(b - y, z, y\right)} \cdot x\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+224}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{t - a}{x}, y\right)}{\mathsf{fma}\left(b - y, z, y\right)} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 69.3% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.5999999999999998e-136 or 124 < z

    1. Initial program 53.9%

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

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

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

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

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

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

    if -3.5999999999999998e-136 < z < 9.99999999999999961e-81

    1. Initial program 87.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. 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)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.99999999999999961e-81 < z < 124

      1. Initial program 99.8%

        \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
      2. Add Preprocessing
      3. 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. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
        4. div-addN/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)}} \]
        5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, \frac{y}{z}, t\right)} - a}{b} \]
        6. lower-/.f6461.9

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

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

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{x}{z}, t - a\right)}{b} \]
      9. Recombined 3 regimes into one program.
      10. Final simplification73.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-136}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 10^{-80}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\ \mathbf{elif}\;z \leq 124:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{x}{z}, t - a\right)}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 5: 69.5% accurate, 0.8× speedup?

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

        1. Initial program 53.9%

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

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

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

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

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

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

        if -3.5999999999999998e-136 < z < 9.99999999999999961e-81

        1. Initial program 87.0%

          \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
        2. Add Preprocessing
        3. 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)} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.99999999999999961e-81 < z < 124

          1. Initial program 99.8%

            \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
          2. Add Preprocessing
          3. 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. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
            4. div-addN/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)}} \]
            5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, \frac{y}{z}, t\right)} - a}{b} \]
            6. lower-/.f6461.9

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, \frac{y}{z}, t\right) - a}{b}} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification73.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-136}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 10^{-80}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\ \mathbf{elif}\;z \leq 124:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y}{z}, t\right) - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
        10. Add Preprocessing

        Alternative 6: 82.9% accurate, 0.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+117} \lor \neg \left(z \leq 2.95 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -1.1e+117) (not (<= z 2.95e+88)))
           (/ (- t a) (- b y))
           (/ (fma x y (* z (- t a))) (fma (- b y) z y))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -1.1e+117) || !(z <= 2.95e+88)) {
        		tmp = (t - a) / (b - y);
        	} else {
        		tmp = fma(x, y, (z * (t - a))) / fma((b - y), z, y);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -1.1e+117) || !(z <= 2.95e+88))
        		tmp = Float64(Float64(t - a) / Float64(b - y));
        	else
        		tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / fma(Float64(b - y), z, y));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.1e+117], N[Not[LessEqual[z, 2.95e+88]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.1 \cdot 10^{+117} \lor \neg \left(z \leq 2.95 \cdot 10^{+88}\right):\\
        \;\;\;\;\frac{t - a}{b - y}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.10000000000000007e117 or 2.94999999999999984e88 < z

          1. Initial program 31.6%

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

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

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

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

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

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

          if -1.10000000000000007e117 < z < 2.94999999999999984e88

          1. Initial program 88.5%

            \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
          2. Add Preprocessing
          3. 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. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
            4. div-addN/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)}} \]
            5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t - a\right) \cdot \frac{z}{\mathsf{fma}\left(b - y, z, y\right)} + \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
            3. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{z \cdot \left(t - a\right) - \left(\mathsf{neg}\left(y\right)\right) \cdot x}{\mathsf{fma}\left(b - y, z, y\right)}} \]
            11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+117} \lor \neg \left(z \leq 2.95 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 7: 72.1% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+19} \lor \neg \left(z \leq 252\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot t\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -1.2e+19) (not (<= z 252.0)))
           (/ (- t a) (- b y))
           (/ (fma x y (* z t)) (fma (- b y) z y))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -1.2e+19) || !(z <= 252.0)) {
        		tmp = (t - a) / (b - y);
        	} else {
        		tmp = fma(x, y, (z * t)) / fma((b - y), z, y);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -1.2e+19) || !(z <= 252.0))
        		tmp = Float64(Float64(t - a) / Float64(b - y));
        	else
        		tmp = Float64(fma(x, y, Float64(z * t)) / fma(Float64(b - y), z, y));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e+19], N[Not[LessEqual[z, 252.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.2 \cdot 10^{+19} \lor \neg \left(z \leq 252\right):\\
        \;\;\;\;\frac{t - a}{b - y}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot t\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.2e19 or 252 < z

          1. Initial program 45.2%

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

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

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

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

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

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

          if -1.2e19 < z < 252

          1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(x, y, \mathsf{Rewrite=>}\left(lower-*.f64, \left(z \cdot t\right)\right)\right)}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \]
          7. Applied rewrites66.7%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+19} \lor \neg \left(z \leq 252\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot t\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 8: 72.1% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+19} \lor \neg \left(z \leq 252\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -1.2e+19) (not (<= z 252.0)))
           (/ (- t a) (- b y))
           (/ (fma t z (* y x)) (fma (- b y) z y))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -1.2e+19) || !(z <= 252.0)) {
        		tmp = (t - a) / (b - y);
        	} else {
        		tmp = fma(t, z, (y * x)) / fma((b - y), z, y);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -1.2e+19) || !(z <= 252.0))
        		tmp = Float64(Float64(t - a) / Float64(b - y));
        	else
        		tmp = Float64(fma(t, z, Float64(y * x)) / fma(Float64(b - y), z, y));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e+19], N[Not[LessEqual[z, 252.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.2 \cdot 10^{+19} \lor \neg \left(z \leq 252\right):\\
        \;\;\;\;\frac{t - a}{b - y}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.2e19 or 252 < z

          1. Initial program 45.2%

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

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

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

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

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

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

          if -1.2e19 < z < 252

          1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+19} \lor \neg \left(z \leq 252\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 42.1% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-a}{b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{-65}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-276}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-19}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (/ (- a) b)) (t_2 (/ x (- 1.0 z))))
           (if (<= y -3.8e-65)
             t_2
             (if (<= y -2.55e-276)
               t_1
               (if (<= y 5.6e-109) (/ t b) (if (<= y 2.2e-19) t_1 t_2))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = -a / b;
        	double t_2 = x / (1.0 - z);
        	double tmp;
        	if (y <= -3.8e-65) {
        		tmp = t_2;
        	} else if (y <= -2.55e-276) {
        		tmp = t_1;
        	} else if (y <= 5.6e-109) {
        		tmp = t / b;
        	} else if (y <= 2.2e-19) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: tmp
            t_1 = -a / b
            t_2 = x / (1.0d0 - z)
            if (y <= (-3.8d-65)) then
                tmp = t_2
            else if (y <= (-2.55d-276)) then
                tmp = t_1
            else if (y <= 5.6d-109) then
                tmp = t / b
            else if (y <= 2.2d-19) then
                tmp = t_1
            else
                tmp = t_2
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = -a / b;
        	double t_2 = x / (1.0 - z);
        	double tmp;
        	if (y <= -3.8e-65) {
        		tmp = t_2;
        	} else if (y <= -2.55e-276) {
        		tmp = t_1;
        	} else if (y <= 5.6e-109) {
        		tmp = t / b;
        	} else if (y <= 2.2e-19) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = -a / b
        	t_2 = x / (1.0 - z)
        	tmp = 0
        	if y <= -3.8e-65:
        		tmp = t_2
        	elif y <= -2.55e-276:
        		tmp = t_1
        	elif y <= 5.6e-109:
        		tmp = t / b
        	elif y <= 2.2e-19:
        		tmp = t_1
        	else:
        		tmp = t_2
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(Float64(-a) / b)
        	t_2 = Float64(x / Float64(1.0 - z))
        	tmp = 0.0
        	if (y <= -3.8e-65)
        		tmp = t_2;
        	elseif (y <= -2.55e-276)
        		tmp = t_1;
        	elseif (y <= 5.6e-109)
        		tmp = Float64(t / b);
        	elseif (y <= 2.2e-19)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = -a / b;
        	t_2 = x / (1.0 - z);
        	tmp = 0.0;
        	if (y <= -3.8e-65)
        		tmp = t_2;
        	elseif (y <= -2.55e-276)
        		tmp = t_1;
        	elseif (y <= 5.6e-109)
        		tmp = t / b;
        	elseif (y <= 2.2e-19)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e-65], t$95$2, If[LessEqual[y, -2.55e-276], t$95$1, If[LessEqual[y, 5.6e-109], N[(t / b), $MachinePrecision], If[LessEqual[y, 2.2e-19], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{-a}{b}\\
        t_2 := \frac{x}{1 - z}\\
        \mathbf{if}\;y \leq -3.8 \cdot 10^{-65}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;y \leq -2.55 \cdot 10^{-276}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 5.6 \cdot 10^{-109}:\\
        \;\;\;\;\frac{t}{b}\\
        
        \mathbf{elif}\;y \leq 2.2 \cdot 10^{-19}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -3.8000000000000002e-65 or 2.1999999999999998e-19 < y

          1. Initial program 64.5%

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

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

              \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
            2. fp-cancel-sign-sub-invN/A

              \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
            3. metadata-evalN/A

              \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
            4. *-lft-identityN/A

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

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

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

          if -3.8000000000000002e-65 < y < -2.54999999999999984e-276 or 5.59999999999999958e-109 < y < 2.1999999999999998e-19

          1. Initial program 76.1%

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

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

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

              \[\leadsto \mathsf{neg}\left(\color{blue}{a \cdot \frac{z}{y + z \cdot \left(b - y\right)}}\right) \]
            3. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
          7. Step-by-step derivation
            1. Applied rewrites47.1%

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

            if -2.54999999999999984e-276 < y < 5.59999999999999958e-109

            1. Initial program 74.0%

              \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
            2. Add Preprocessing
            3. 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. +-commutativeN/A

                \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
              4. div-addN/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)}} \]
              5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t}{\color{blue}{b}} \]
            9. Step-by-step derivation
              1. Applied rewrites47.9%

                \[\leadsto \frac{t}{\color{blue}{b}} \]
            10. Recombined 3 regimes into one program.
            11. Final simplification50.4%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{-65}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-276}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
            12. Add Preprocessing

            Alternative 10: 69.9% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-136} \lor \neg \left(z \leq 1.06 \cdot 10^{-9}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= z -3.6e-136) (not (<= z 1.06e-9)))
               (/ (- t a) (- b y))
               (fma (/ (- t a) y) z x)))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((z <= -3.6e-136) || !(z <= 1.06e-9)) {
            		tmp = (t - a) / (b - y);
            	} else {
            		tmp = fma(((t - a) / y), z, x);
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((z <= -3.6e-136) || !(z <= 1.06e-9))
            		tmp = Float64(Float64(t - a) / Float64(b - y));
            	else
            		tmp = fma(Float64(Float64(t - a) / y), z, x);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.6e-136], N[Not[LessEqual[z, 1.06e-9]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] * z + x), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -3.6 \cdot 10^{-136} \lor \neg \left(z \leq 1.06 \cdot 10^{-9}\right):\\
            \;\;\;\;\frac{t - a}{b - y}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -3.5999999999999998e-136 or 1.0600000000000001e-9 < z

              1. Initial program 55.2%

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

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

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

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

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

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

              if -3.5999999999999998e-136 < z < 1.0600000000000001e-9

              1. Initial program 89.2%

                \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
              2. Add Preprocessing
              3. 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)} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-136} \lor \neg \left(z \leq 1.06 \cdot 10^{-9}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\ \end{array} \]
              10. Add Preprocessing

              Alternative 11: 66.7% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.35 \cdot 10^{-136} \lor \neg \left(z \leq 1.1 \cdot 10^{-80}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-a}{y}, z, x\right)\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (or (<= z -3.35e-136) (not (<= z 1.1e-80)))
                 (/ (- t a) (- b y))
                 (fma (/ (- a) y) z x)))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if ((z <= -3.35e-136) || !(z <= 1.1e-80)) {
              		tmp = (t - a) / (b - y);
              	} else {
              		tmp = fma((-a / y), z, x);
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if ((z <= -3.35e-136) || !(z <= 1.1e-80))
              		tmp = Float64(Float64(t - a) / Float64(b - y));
              	else
              		tmp = fma(Float64(Float64(-a) / y), z, x);
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.35e-136], N[Not[LessEqual[z, 1.1e-80]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[((-a) / y), $MachinePrecision] * z + x), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -3.35 \cdot 10^{-136} \lor \neg \left(z \leq 1.1 \cdot 10^{-80}\right):\\
              \;\;\;\;\frac{t - a}{b - y}\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(\frac{-a}{y}, z, x\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -3.3499999999999999e-136 or 1.10000000000000005e-80 < z

                1. Initial program 60.3%

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

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

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

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

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

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

                if -3.3499999999999999e-136 < z < 1.10000000000000005e-80

                1. Initial program 87.0%

                  \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
                2. Add Preprocessing
                3. 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)} \]
                4. Step-by-step derivation
                  1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.35 \cdot 10^{-136} \lor \neg \left(z \leq 1.1 \cdot 10^{-80}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-a}{y}, z, x\right)\\ \end{array} \]
                10. Add Preprocessing

                Alternative 12: 64.1% accurate, 1.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-136} \lor \neg \left(z \leq 10^{-80}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (if (or (<= z -2.4e-136) (not (<= z 1e-80))) (/ (- t a) (- b y)) (fma x z x)))
                double code(double x, double y, double z, double t, double a, double b) {
                	double tmp;
                	if ((z <= -2.4e-136) || !(z <= 1e-80)) {
                		tmp = (t - a) / (b - y);
                	} else {
                		tmp = fma(x, z, x);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b)
                	tmp = 0.0
                	if ((z <= -2.4e-136) || !(z <= 1e-80))
                		tmp = Float64(Float64(t - a) / Float64(b - y));
                	else
                		tmp = fma(x, z, x);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.4e-136], N[Not[LessEqual[z, 1e-80]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * z + x), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -2.4 \cdot 10^{-136} \lor \neg \left(z \leq 10^{-80}\right):\\
                \;\;\;\;\frac{t - a}{b - y}\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -2.3999999999999999e-136 or 9.99999999999999961e-81 < z

                  1. Initial program 60.3%

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

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

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

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

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

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

                  if -2.3999999999999999e-136 < z < 9.99999999999999961e-81

                  1. Initial program 87.0%

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

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

                      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                    2. fp-cancel-sign-sub-invN/A

                      \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                    3. metadata-evalN/A

                      \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                    4. *-lft-identityN/A

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

                      \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                  5. Applied rewrites55.2%

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

                    \[\leadsto x + \color{blue}{x \cdot z} \]
                  7. Step-by-step derivation
                    1. Applied rewrites55.2%

                      \[\leadsto \mathsf{fma}\left(x, \color{blue}{z}, x\right) \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification64.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-136} \lor \neg \left(z \leq 10^{-80}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 13: 54.7% accurate, 1.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-74} \lor \neg \left(y \leq 1.55 \cdot 10^{-18}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (or (<= y -4.5e-74) (not (<= y 1.55e-18))) (/ x (- 1.0 z)) (/ (- t a) b)))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((y <= -4.5e-74) || !(y <= 1.55e-18)) {
                  		tmp = x / (1.0 - z);
                  	} else {
                  		tmp = (t - a) / b;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a, b)
                      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 <= (-4.5d-74)) .or. (.not. (y <= 1.55d-18))) then
                          tmp = x / (1.0d0 - z)
                      else
                          tmp = (t - a) / b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((y <= -4.5e-74) || !(y <= 1.55e-18)) {
                  		tmp = x / (1.0 - z);
                  	} else {
                  		tmp = (t - a) / b;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	tmp = 0
                  	if (y <= -4.5e-74) or not (y <= 1.55e-18):
                  		tmp = x / (1.0 - z)
                  	else:
                  		tmp = (t - a) / b
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if ((y <= -4.5e-74) || !(y <= 1.55e-18))
                  		tmp = Float64(x / Float64(1.0 - z));
                  	else
                  		tmp = Float64(Float64(t - a) / b);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	tmp = 0.0;
                  	if ((y <= -4.5e-74) || ~((y <= 1.55e-18)))
                  		tmp = x / (1.0 - z);
                  	else
                  		tmp = (t - a) / b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.5e-74], N[Not[LessEqual[y, 1.55e-18]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;y \leq -4.5 \cdot 10^{-74} \lor \neg \left(y \leq 1.55 \cdot 10^{-18}\right):\\
                  \;\;\;\;\frac{x}{1 - z}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{t - a}{b}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < -4.4999999999999999e-74 or 1.55000000000000003e-18 < y

                    1. Initial program 64.7%

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

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

                        \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                      2. fp-cancel-sign-sub-invN/A

                        \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                      3. metadata-evalN/A

                        \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                      4. *-lft-identityN/A

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

                        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                    5. Applied rewrites52.8%

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

                    if -4.4999999999999999e-74 < y < 1.55000000000000003e-18

                    1. Initial program 75.0%

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

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

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

                        \[\leadsto \frac{\color{blue}{t - a}}{b} \]
                    5. Applied rewrites68.1%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-74} \lor \neg \left(y \leq 1.55 \cdot 10^{-18}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 14: 36.7% accurate, 1.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{-65}:\\ \;\;\;\;\frac{x}{1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-a}{b}\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (<= z -4.2e-103) (/ t b) (if (<= z 1.72e-65) (/ x 1.0) (/ (- a) b))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if (z <= -4.2e-103) {
                  		tmp = t / b;
                  	} else if (z <= 1.72e-65) {
                  		tmp = x / 1.0;
                  	} else {
                  		tmp = -a / b;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a, b)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: tmp
                      if (z <= (-4.2d-103)) then
                          tmp = t / b
                      else if (z <= 1.72d-65) then
                          tmp = x / 1.0d0
                      else
                          tmp = -a / b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if (z <= -4.2e-103) {
                  		tmp = t / b;
                  	} else if (z <= 1.72e-65) {
                  		tmp = x / 1.0;
                  	} else {
                  		tmp = -a / b;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	tmp = 0
                  	if z <= -4.2e-103:
                  		tmp = t / b
                  	elif z <= 1.72e-65:
                  		tmp = x / 1.0
                  	else:
                  		tmp = -a / b
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if (z <= -4.2e-103)
                  		tmp = Float64(t / b);
                  	elseif (z <= 1.72e-65)
                  		tmp = Float64(x / 1.0);
                  	else
                  		tmp = Float64(Float64(-a) / b);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	tmp = 0.0;
                  	if (z <= -4.2e-103)
                  		tmp = t / b;
                  	elseif (z <= 1.72e-65)
                  		tmp = x / 1.0;
                  	else
                  		tmp = -a / b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.2e-103], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.72e-65], N[(x / 1.0), $MachinePrecision], N[((-a) / b), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -4.2 \cdot 10^{-103}:\\
                  \;\;\;\;\frac{t}{b}\\
                  
                  \mathbf{elif}\;z \leq 1.72 \cdot 10^{-65}:\\
                  \;\;\;\;\frac{x}{1}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{-a}{b}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z < -4.20000000000000009e-103

                    1. Initial program 53.9%

                      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
                    2. Add Preprocessing
                    3. 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. +-commutativeN/A

                        \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
                      4. div-addN/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)}} \]
                      5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{t}{\color{blue}{b}} \]
                    9. Step-by-step derivation
                      1. Applied rewrites34.8%

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

                      if -4.20000000000000009e-103 < z < 1.72000000000000005e-65

                      1. Initial program 88.1%

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

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

                          \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                        2. fp-cancel-sign-sub-invN/A

                          \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                        3. metadata-evalN/A

                          \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                        4. *-lft-identityN/A

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

                          \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                      5. Applied rewrites54.1%

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

                        \[\leadsto \frac{x}{1} \]
                      7. Step-by-step derivation
                        1. Applied rewrites54.1%

                          \[\leadsto \frac{x}{1} \]

                        if 1.72000000000000005e-65 < z

                        1. Initial program 63.3%

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

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

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

                            \[\leadsto \mathsf{neg}\left(\color{blue}{a \cdot \frac{z}{y + z \cdot \left(b - y\right)}}\right) \]
                          3. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
                        7. Step-by-step derivation
                          1. Applied rewrites40.5%

                            \[\leadsto \frac{-a}{\color{blue}{b}} \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification43.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{-65}:\\ \;\;\;\;\frac{x}{1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-a}{b}\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 15: 34.6% accurate, 1.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{-118} \lor \neg \left(y \leq 3.8 \cdot 10^{-105}\right):\\ \;\;\;\;\frac{x}{1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (if (or (<= y -2.45e-118) (not (<= y 3.8e-105))) (/ x 1.0) (/ t b)))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if ((y <= -2.45e-118) || !(y <= 3.8e-105)) {
                        		tmp = x / 1.0;
                        	} else {
                        		tmp = t / b;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y, z, t, a, b)
                            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.45d-118)) .or. (.not. (y <= 3.8d-105))) then
                                tmp = x / 1.0d0
                            else
                                tmp = t / b
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if ((y <= -2.45e-118) || !(y <= 3.8e-105)) {
                        		tmp = x / 1.0;
                        	} else {
                        		tmp = t / b;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	tmp = 0
                        	if (y <= -2.45e-118) or not (y <= 3.8e-105):
                        		tmp = x / 1.0
                        	else:
                        		tmp = t / b
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	tmp = 0.0
                        	if ((y <= -2.45e-118) || !(y <= 3.8e-105))
                        		tmp = Float64(x / 1.0);
                        	else
                        		tmp = Float64(t / b);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	tmp = 0.0;
                        	if ((y <= -2.45e-118) || ~((y <= 3.8e-105)))
                        		tmp = x / 1.0;
                        	else
                        		tmp = t / b;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.45e-118], N[Not[LessEqual[y, 3.8e-105]], $MachinePrecision]], N[(x / 1.0), $MachinePrecision], N[(t / b), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq -2.45 \cdot 10^{-118} \lor \neg \left(y \leq 3.8 \cdot 10^{-105}\right):\\
                        \;\;\;\;\frac{x}{1}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{t}{b}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < -2.4499999999999999e-118 or 3.7999999999999998e-105 < y

                          1. Initial program 67.4%

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

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

                              \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                            2. fp-cancel-sign-sub-invN/A

                              \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                            3. metadata-evalN/A

                              \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                            4. *-lft-identityN/A

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

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

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

                            \[\leadsto \frac{x}{1} \]
                          7. Step-by-step derivation
                            1. Applied rewrites35.6%

                              \[\leadsto \frac{x}{1} \]

                            if -2.4499999999999999e-118 < y < 3.7999999999999998e-105

                            1. Initial program 73.7%

                              \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
                            2. Add Preprocessing
                            3. 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. +-commutativeN/A

                                \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
                              4. div-addN/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)}} \]
                              5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{t}{\color{blue}{b}} \]
                            9. Step-by-step derivation
                              1. Applied rewrites40.7%

                                \[\leadsto \frac{t}{\color{blue}{b}} \]
                            10. Recombined 2 regimes into one program.
                            11. Final simplification37.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{-118} \lor \neg \left(y \leq 3.8 \cdot 10^{-105}\right):\\ \;\;\;\;\frac{x}{1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
                            12. Add Preprocessing

                            Alternative 16: 36.6% accurate, 1.6× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-103} \lor \neg \left(z \leq 1.4 \cdot 10^{-8}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (or (<= z -4.2e-103) (not (<= z 1.4e-8))) (/ t b) (fma x z x)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((z <= -4.2e-103) || !(z <= 1.4e-8)) {
                            		tmp = t / b;
                            	} else {
                            		tmp = fma(x, z, x);
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if ((z <= -4.2e-103) || !(z <= 1.4e-8))
                            		tmp = Float64(t / b);
                            	else
                            		tmp = fma(x, z, x);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.2e-103], N[Not[LessEqual[z, 1.4e-8]], $MachinePrecision]], N[(t / b), $MachinePrecision], N[(x * z + x), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;z \leq -4.2 \cdot 10^{-103} \lor \neg \left(z \leq 1.4 \cdot 10^{-8}\right):\\
                            \;\;\;\;\frac{t}{b}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -4.20000000000000009e-103 or 1.4e-8 < z

                              1. Initial program 54.2%

                                \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
                              2. Add Preprocessing
                              3. 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. +-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{z \cdot \left(t - a\right) + x \cdot y}}{y + z \cdot \left(b - y\right)} \]
                                4. div-addN/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)}} \]
                                5. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{t}{\color{blue}{b}} \]
                              9. Step-by-step derivation
                                1. Applied rewrites27.9%

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

                                if -4.20000000000000009e-103 < z < 1.4e-8

                                1. Initial program 89.5%

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

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

                                    \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                                  2. fp-cancel-sign-sub-invN/A

                                    \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                                  3. metadata-evalN/A

                                    \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                                  4. *-lft-identityN/A

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{z}, x\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification37.3%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-103} \lor \neg \left(z \leq 1.4 \cdot 10^{-8}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 17: 25.9% 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 69.8%

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

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

                                    \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                                  2. fp-cancel-sign-sub-invN/A

                                    \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                                  3. metadata-evalN/A

                                    \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                                  4. *-lft-identityN/A

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

                                    \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                                5. Applied rewrites31.5%

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

                                  \[\leadsto x + \color{blue}{x \cdot z} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites24.5%

                                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{z}, x\right) \]
                                  2. Final simplification24.5%

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

                                  Alternative 18: 3.8% accurate, 6.5× speedup?

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

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

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

                                      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                                    2. fp-cancel-sign-sub-invN/A

                                      \[\leadsto \frac{x}{\color{blue}{1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot z}} \]
                                    3. metadata-evalN/A

                                      \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                                    4. *-lft-identityN/A

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

                                      \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                                  5. Applied rewrites31.5%

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

                                    \[\leadsto x + \color{blue}{x \cdot z} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites24.5%

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

                                      \[\leadsto x \cdot z \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites3.2%

                                        \[\leadsto x \cdot z \]
                                      2. Final simplification3.2%

                                        \[\leadsto x \cdot z \]
                                      3. Add Preprocessing

                                      Developer Target 1: 73.2% 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)));
                                      }
                                      
                                      real(8) function code(x, y, z, t, a, b)
                                          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 2024337 
                                      (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)))))