Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.1% → 94.4%
Time: 11.0s
Alternatives: 15
Speedup: 1.3×

Specification

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

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

Initial Program: 66.1% 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: 94.4% accurate, 0.1× speedup?

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_2\\

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

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


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

    1. Initial program 26.1%

      \[\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)} \]

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999996e-281 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e295

    1. Initial program 99.3%

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

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

    1. Initial program 31.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(-1 \cdot \frac{y \cdot \left(\frac{x \cdot y}{b - y} - \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}\right)}{{z}^{2} \cdot \left(b - y\right)} + \left(\frac{t}{b - y} + \frac{x \cdot y}{z \cdot \left(b - y\right)}\right)\right) - \left(\frac{a}{b - y} + \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}}\right)} \]
    4. Applied rewrites85.6%

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

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

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

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

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

Alternative 2: 93.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;t\_3\\

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

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

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

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


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

    1. Initial program 26.1%

      \[\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)} \]

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999996e-281 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e295

    1. Initial program 99.3%

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

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

    1. Initial program 12.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--.f6485.9

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

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

Alternative 3: 85.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-280} \lor \neg \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 2 \cdot 10^{+295}\right)\right):\\
\;\;\;\;t\_1\\

\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)))) < -inf.0

    1. Initial program 21.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-/.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 0

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

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

      \[\leadsto \mathsf{fma}\left(t - a, \color{blue}{\frac{z}{y}}, 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)))) < -9.9999999999999996e-281 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e295

    1. Initial program 99.3%

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

    if -9.9999999999999996e-281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.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--.f6482.5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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}{y}, 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 -1 \cdot 10^{-280} \lor \neg \left(\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0 \lor \neg \left(\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+295}\right)\right):\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-280} \lor \neg \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 2 \cdot 10^{+295}\right)\right):\\
\;\;\;\;t\_1\\

\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)))) < -inf.0

    1. Initial program 21.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 x around inf

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999996e-281 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e295

    1. Initial program 99.3%

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

    if -9.9999999999999996e-281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.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--.f6482.5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;\frac{y}{\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 -1 \cdot 10^{-280} \lor \neg \left(\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0 \lor \neg \left(\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+295}\right)\right):\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(t - a\right) \cdot z}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3200000000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 880000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e9 or 8.8e11 < z

    1. Initial program 41.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--.f6486.7

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

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

    if -3.2e9 < z < -4.7999999999999998e-268 or 3.8000000000000003e-73 < z < 8.8e11

    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 x around 0

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

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

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

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

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

    if -4.7999999999999998e-268 < z < 3.8000000000000003e-73

    1. Initial program 84.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 x around inf

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

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

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

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

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

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

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

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

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

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

Alternative 6: 73.2% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8000000000000001e-14 or 8.8e11 < z

    1. Initial program 43.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--.f6485.4

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

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

    if -2.8000000000000001e-14 < z < 1.70000000000000008e-57

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

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

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

    if 1.70000000000000008e-57 < z < 8.8e11

    1. Initial program 89.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 x around 0

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

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

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

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

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

Alternative 7: 36.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-a}{b}\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+16}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+134}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a) b)))
   (if (<= a -1.7e+68)
     t_1
     (if (<= a 5.6e+16)
       (/ t (- b y))
       (if (<= a 7e+134) (/ x (- 1.0 z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -a / b;
	double tmp;
	if (a <= -1.7e+68) {
		tmp = t_1;
	} else if (a <= 5.6e+16) {
		tmp = t / (b - y);
	} else if (a <= 7e+134) {
		tmp = x / (1.0 - z);
	} else {
		tmp = t_1;
	}
	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) :: tmp
    t_1 = -a / b
    if (a <= (-1.7d+68)) then
        tmp = t_1
    else if (a <= 5.6d+16) then
        tmp = t / (b - y)
    else if (a <= 7d+134) then
        tmp = x / (1.0d0 - z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -a / b;
	double tmp;
	if (a <= -1.7e+68) {
		tmp = t_1;
	} else if (a <= 5.6e+16) {
		tmp = t / (b - y);
	} else if (a <= 7e+134) {
		tmp = x / (1.0 - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = -a / b
	tmp = 0
	if a <= -1.7e+68:
		tmp = t_1
	elif a <= 5.6e+16:
		tmp = t / (b - y)
	elif a <= 7e+134:
		tmp = x / (1.0 - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(-a) / b)
	tmp = 0.0
	if (a <= -1.7e+68)
		tmp = t_1;
	elseif (a <= 5.6e+16)
		tmp = Float64(t / Float64(b - y));
	elseif (a <= 7e+134)
		tmp = Float64(x / Float64(1.0 - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = -a / b;
	tmp = 0.0;
	if (a <= -1.7e+68)
		tmp = t_1;
	elseif (a <= 5.6e+16)
		tmp = t / (b - y);
	elseif (a <= 7e+134)
		tmp = x / (1.0 - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[a, -1.7e+68], t$95$1, If[LessEqual[a, 5.6e+16], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e+134], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+16}:\\
\;\;\;\;\frac{t}{b - y}\\

\mathbf{elif}\;a \leq 7 \cdot 10^{+134}:\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.70000000000000008e68 or 7.00000000000000006e134 < a

    1. Initial program 59.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 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--.f6446.4

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

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

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

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

      if -1.70000000000000008e68 < a < 5.6e16

      1. Initial program 68.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 t around inf

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.6e16 < a < 7.00000000000000006e134

        1. Initial program 71.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--.f6460.0

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

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

      Alternative 8: 35.5% accurate, 1.2× speedup?

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

        1. Initial program 59.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 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--.f6446.4

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

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

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

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

          if -1.70000000000000008e68 < a < 3.0999999999999998e25

          1. Initial program 68.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 t around inf

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

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

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

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

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

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

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

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

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

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

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

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

            if 3.0999999999999998e25 < a < 1.75000000000000001e134

            1. Initial program 71.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--.f6460.0

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

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

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

            Alternative 9: 29.2% accurate, 1.2× speedup?

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

              1. Initial program 59.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 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--.f6446.4

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

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

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

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

                if -1.5000000000000001e68 < a < 8.5000000000000002e-257

                1. Initial program 69.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 t around inf

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

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

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

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

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

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

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

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

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

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

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

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

                  if 8.5000000000000002e-257 < a < 1.75000000000000001e134

                  1. Initial program 69.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 x around inf

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 1 \cdot x \]
                  7. Step-by-step derivation
                    1. Applied rewrites34.8%

                      \[\leadsto 1 \cdot x \]
                  8. Recombined 3 regimes into one program.
                  9. Add Preprocessing

                  Alternative 10: 67.8% accurate, 1.3× speedup?

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

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

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

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

                    if -1.5499999999999999e-15 < z < 2.49999999999999999e-71

                    1. Initial program 86.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 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--.f6469.1

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

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

                      \[\leadsto x + \color{blue}{z \cdot \left(\frac{t}{y} - \frac{x \cdot \left(b - y\right)}{y}\right)} \]
                    7. Step-by-step derivation
                      1. Applied rewrites46.8%

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{t}{y}, z, x\right) \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification70.4%

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

                      Alternative 11: 50.5% accurate, 1.3× speedup?

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

                        1. Initial program 42.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--.f6483.2

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

                          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
                        6. Taylor expanded in t around 0

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

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

                          if -2.8000000000000001e-14 < z < 2.49999999999999999e-71

                          1. Initial program 86.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 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--.f6469.1

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

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

                            \[\leadsto x + \color{blue}{z \cdot \left(\frac{t}{y} - \frac{x \cdot \left(b - y\right)}{y}\right)} \]
                          7. Step-by-step derivation
                            1. Applied rewrites46.8%

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

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

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

                              if 2.49999999999999999e-71 < z

                              1. Initial program 56.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--.f6457.2

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

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

                            Alternative 12: 53.4% accurate, 1.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8000 \lor \neg \left(y \leq 3.8 \cdot 10^{+99}\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 -8000.0) (not (<= y 3.8e+99))) (/ 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 <= -8000.0) || !(y <= 3.8e+99)) {
                            		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 <= (-8000.0d0)) .or. (.not. (y <= 3.8d+99))) 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 <= -8000.0) || !(y <= 3.8e+99)) {
                            		tmp = x / (1.0 - z);
                            	} else {
                            		tmp = (t - a) / b;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if (y <= -8000.0) or not (y <= 3.8e+99):
                            		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 <= -8000.0) || !(y <= 3.8e+99))
                            		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 <= -8000.0) || ~((y <= 3.8e+99)))
                            		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, -8000.0], N[Not[LessEqual[y, 3.8e+99]], $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 -8000 \lor \neg \left(y \leq 3.8 \cdot 10^{+99}\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 < -8e3 or 3.8e99 < y

                              1. Initial program 52.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--.f6451.2

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

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

                              if -8e3 < y < 3.8e99

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

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

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

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

                            Alternative 13: 37.4% accurate, 1.6× speedup?

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

                              1. Initial program 47.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 t around inf

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

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

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

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

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

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

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

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

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

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

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

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

                                if -6e7 < z < 1.39999999999999997e-56

                                1. Initial program 87.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 x around inf

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto 1 \cdot x \]
                                7. Step-by-step derivation
                                  1. Applied rewrites40.4%

                                    \[\leadsto 1 \cdot x \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification34.1%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -60000000 \lor \neg \left(z \leq 1.4 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 14: 25.5% accurate, 6.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto 1 \cdot x \]
                                7. Step-by-step derivation
                                  1. Applied rewrites21.3%

                                    \[\leadsto 1 \cdot x \]
                                  2. Add Preprocessing

                                  Alternative 15: 3.8% accurate, 6.5× speedup?

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

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

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

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

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

                                      Developer Target 1: 73.0% 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 2024339 
                                      (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)))))