Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A

Percentage Accurate: 89.8% → 94.8%
Time: 12.1s
Alternatives: 19
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t):
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t)
	return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0))
end
function tmp = code(x, y, z, t)
	tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\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 19 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: 89.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t):
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t)
	return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0))
end
function tmp = code(x, y, z, t)
	tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}

Alternative 1: 94.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{x + 1} + \frac{\frac{y}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right)}}{t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+112}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4999999999999997e173 or 3.89999999999999968e112 < z

    1. Initial program 66.1%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing
    3. Taylor expanded in t around -inf

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

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

        \[\leadsto \frac{x}{1 + x} + \color{blue}{\left(\mathsf{neg}\left(\frac{-1 \cdot \frac{y}{1 + x} - -1 \cdot \frac{x}{z \cdot \left(1 + x\right)}}{t}\right)\right)} \]
      3. unsub-negN/A

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

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

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

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

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

        \[\leadsto \frac{x}{x + 1} - \color{blue}{\frac{-1 \cdot \frac{y}{1 + x} - -1 \cdot \frac{x}{z \cdot \left(1 + x\right)}}{t}} \]
    5. Simplified88.6%

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

    if -6.4999999999999997e173 < z < 3.89999999999999968e112

    1. Initial program 99.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification95.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+173}:\\ \;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right)}}{t}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+112}:\\ \;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right)}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 93.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\ t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_2 \leq -1000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{\mathsf{fma}\left(y, z, -x\right)}{z \cdot t}\\ \mathbf{elif}\;t\_2 \leq 2:\\ \;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 10^{+205}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x))
        (t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
        (t_3 (/ (* z y) (* (+ x 1.0) t_1))))
   (if (<= t_2 -2e+254)
     (/ y (fma x t t))
     (if (<= t_2 -1000000000.0)
       t_3
       (if (<= t_2 2e-63)
         (+ x (/ (fma y z (- x)) (* z t)))
         (if (<= t_2 2.0)
           (/ (- x (/ x (fma z t (- x)))) (+ x 1.0))
           (if (<= t_2 1e+205) t_3 (/ (+ x (/ y t)) (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
	double t_3 = (z * y) / ((x + 1.0) * t_1);
	double tmp;
	if (t_2 <= -2e+254) {
		tmp = y / fma(x, t, t);
	} else if (t_2 <= -1000000000.0) {
		tmp = t_3;
	} else if (t_2 <= 2e-63) {
		tmp = x + (fma(y, z, -x) / (z * t));
	} else if (t_2 <= 2.0) {
		tmp = (x - (x / fma(z, t, -x))) / (x + 1.0);
	} else if (t_2 <= 1e+205) {
		tmp = t_3;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0))
	t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1))
	tmp = 0.0
	if (t_2 <= -2e+254)
		tmp = Float64(y / fma(x, t, t));
	elseif (t_2 <= -1000000000.0)
		tmp = t_3;
	elseif (t_2 <= 2e-63)
		tmp = Float64(x + Float64(fma(y, z, Float64(-x)) / Float64(z * t)));
	elseif (t_2 <= 2.0)
		tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(-x)))) / Float64(x + 1.0));
	elseif (t_2 <= 1e+205)
		tmp = t_3;
	else
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 2e-63], N[(x + N[(N[(y * z + (-x)), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x - N[(x / N[(z * t + (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -1000000000:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;x + \frac{\mathsf{fma}\left(y, z, -x\right)}{z \cdot t}\\

\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\

\mathbf{elif}\;t\_2 \leq 10^{+205}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254

    1. Initial program 31.1%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      3. +-lowering-+.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
      5. +-commutativeN/A

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      6. +-lowering-+.f6461.7

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    5. Simplified61.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
    6. Taylor expanded in y around inf

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

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

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

        \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
      4. distribute-lft1-inN/A

        \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
      5. accelerator-lowering-fma.f6474.1

        \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
    8. Simplified74.1%

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

    if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205

    1. Initial program 99.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
      8. +-lowering-+.f6496.1

        \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
    5. Simplified96.1%

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

    if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000013e-63

    1. Initial program 93.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

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

        \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z - x}{t \cdot z}}}{x + 1} \]
      2. sub-negN/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}}{t \cdot z}}{x + 1} \]
      3. mul-1-negN/A

        \[\leadsto \frac{x + \frac{y \cdot z + \color{blue}{-1 \cdot x}}{t \cdot z}}{x + 1} \]
      4. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \frac{x + \frac{\mathsf{fma}\left(y, z, \color{blue}{\mathsf{neg}\left(x\right)}\right)}{t \cdot z}}{x + 1} \]
      7. *-lowering-*.f6493.1

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

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

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

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

      if 2.00000000000000013e-63 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2

      1. Initial program 100.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

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

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

          \[\leadsto \frac{\color{blue}{x - \frac{x}{t \cdot z - x}}}{1 + x} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \frac{x - \color{blue}{\frac{x}{t \cdot z - x}}}{1 + x} \]
        4. --lowering--.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z - x}}}{1 + x} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z} - x}}{1 + x} \]
        6. +-commutativeN/A

          \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
        7. +-lowering-+.f6499.1

          \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
      5. Simplified99.1%

        \[\leadsto \color{blue}{\frac{x - \frac{x}{t \cdot z - x}}{x + 1}} \]
      6. Step-by-step derivation
        1. sub-negN/A

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

          \[\leadsto \frac{x - \frac{x}{\color{blue}{z \cdot t} + \left(\mathsf{neg}\left(x\right)\right)}}{x + 1} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, \mathsf{neg}\left(x\right)\right)}}}{x + 1} \]
        4. neg-lowering-neg.f6499.1

          \[\leadsto \frac{x - \frac{x}{\mathsf{fma}\left(z, t, \color{blue}{-x}\right)}}{x + 1} \]
      7. Applied egg-rr99.1%

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

      if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6478.3

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified78.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
    8. Recombined 5 regimes into one program.
    9. Final simplification94.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -1000000000:\\ \;\;\;\;\frac{z \cdot y}{\left(x + 1\right) \cdot \left(z \cdot t - x\right)}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 2 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{\mathsf{fma}\left(y, z, -x\right)}{z \cdot t}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 2:\\ \;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 10^{+205}:\\ \;\;\;\;\frac{z \cdot y}{\left(x + 1\right) \cdot \left(z \cdot t - x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 91.4% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\ t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_2 \leq -1000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\ \mathbf{elif}\;t\_2 \leq 2:\\ \;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 10^{+205}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (* z t) x))
            (t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
            (t_3 (/ (* z y) (* (+ x 1.0) t_1))))
       (if (<= t_2 -2e+254)
         (/ y (fma x t t))
         (if (<= t_2 -1000000000.0)
           t_3
           (if (<= t_2 2e-63)
             (fma (/ y t) (- 1.0 x) x)
             (if (<= t_2 2.0)
               (/ (- x (/ x (fma z t (- x)))) (+ x 1.0))
               (if (<= t_2 1e+205) t_3 (/ (+ x (/ y t)) (+ x 1.0)))))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (z * t) - x;
    	double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
    	double t_3 = (z * y) / ((x + 1.0) * t_1);
    	double tmp;
    	if (t_2 <= -2e+254) {
    		tmp = y / fma(x, t, t);
    	} else if (t_2 <= -1000000000.0) {
    		tmp = t_3;
    	} else if (t_2 <= 2e-63) {
    		tmp = fma((y / t), (1.0 - x), x);
    	} else if (t_2 <= 2.0) {
    		tmp = (x - (x / fma(z, t, -x))) / (x + 1.0);
    	} else if (t_2 <= 1e+205) {
    		tmp = t_3;
    	} else {
    		tmp = (x + (y / t)) / (x + 1.0);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(z * t) - x)
    	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0))
    	t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1))
    	tmp = 0.0
    	if (t_2 <= -2e+254)
    		tmp = Float64(y / fma(x, t, t));
    	elseif (t_2 <= -1000000000.0)
    		tmp = t_3;
    	elseif (t_2 <= 2e-63)
    		tmp = fma(Float64(y / t), Float64(1.0 - x), x);
    	elseif (t_2 <= 2.0)
    		tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(-x)))) / Float64(x + 1.0));
    	elseif (t_2 <= 1e+205)
    		tmp = t_3;
    	else
    		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 2e-63], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x - N[(x / N[(z * t + (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := z \cdot t - x\\
    t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
    t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
    \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
    
    \mathbf{elif}\;t\_2 \leq -1000000000:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
    
    \mathbf{elif}\;t\_2 \leq 2:\\
    \;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+205}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6461.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified61.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in y around inf

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

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

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

          \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
        4. distribute-lft1-inN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
        5. accelerator-lowering-fma.f6474.1

          \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
      8. Simplified74.1%

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

      if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205

      1. Initial program 99.5%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

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

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

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

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

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

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

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

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
        8. +-lowering-+.f6496.1

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
      5. Simplified96.1%

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

      if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000013e-63

      1. Initial program 93.6%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6485.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified85.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in x around 0

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

          \[\leadsto \color{blue}{\frac{y}{t} + x \cdot \left(1 - \frac{y}{t}\right)} \]
        2. sub-negN/A

          \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{y}{t}\right)\right)\right)} \]
        3. mul-1-negN/A

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

          \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(-1 \cdot \frac{y}{t} + 1\right)} \]
        5. distribute-lft-inN/A

          \[\leadsto \frac{y}{t} + \color{blue}{\left(x \cdot \left(-1 \cdot \frac{y}{t}\right) + x \cdot 1\right)} \]
        6. mul-1-negN/A

          \[\leadsto \frac{y}{t} + \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y}{t}\right)\right)} + x \cdot 1\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \frac{y}{t} + \left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{y}{t}\right)\right)} + x \cdot 1\right) \]
        8. associate-/l*N/A

          \[\leadsto \frac{y}{t} + \left(\left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot y}{t}}\right)\right) + x \cdot 1\right) \]
        9. mul-1-negN/A

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

          \[\leadsto \frac{y}{t} + \left(-1 \cdot \frac{x \cdot y}{t} + \color{blue}{x}\right) \]
        11. associate-+r+N/A

          \[\leadsto \color{blue}{\left(\frac{y}{t} + -1 \cdot \frac{x \cdot y}{t}\right) + x} \]
        12. mul-1-negN/A

          \[\leadsto \left(\frac{y}{t} + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{t}\right)\right)}\right) + x \]
        13. unsub-negN/A

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

          \[\leadsto \left(\frac{y}{t} - \color{blue}{x \cdot \frac{y}{t}}\right) + x \]
        15. *-lft-identityN/A

          \[\leadsto \left(\color{blue}{1 \cdot \frac{y}{t}} - x \cdot \frac{y}{t}\right) + x \]
        16. distribute-rgt-out--N/A

          \[\leadsto \color{blue}{\frac{y}{t} \cdot \left(1 - x\right)} + x \]
        17. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)} \]
        18. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{t}}, 1 - x, x\right) \]
        19. --lowering--.f6485.7

          \[\leadsto \mathsf{fma}\left(\frac{y}{t}, \color{blue}{1 - x}, x\right) \]
      8. Simplified85.7%

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

      if 2.00000000000000013e-63 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2

      1. Initial program 100.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

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

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

          \[\leadsto \frac{\color{blue}{x - \frac{x}{t \cdot z - x}}}{1 + x} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \frac{x - \color{blue}{\frac{x}{t \cdot z - x}}}{1 + x} \]
        4. --lowering--.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z - x}}}{1 + x} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z} - x}}{1 + x} \]
        6. +-commutativeN/A

          \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
        7. +-lowering-+.f6499.1

          \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
      5. Simplified99.1%

        \[\leadsto \color{blue}{\frac{x - \frac{x}{t \cdot z - x}}{x + 1}} \]
      6. Step-by-step derivation
        1. sub-negN/A

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

          \[\leadsto \frac{x - \frac{x}{\color{blue}{z \cdot t} + \left(\mathsf{neg}\left(x\right)\right)}}{x + 1} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, \mathsf{neg}\left(x\right)\right)}}}{x + 1} \]
        4. neg-lowering-neg.f6499.1

          \[\leadsto \frac{x - \frac{x}{\mathsf{fma}\left(z, t, \color{blue}{-x}\right)}}{x + 1} \]
      7. Applied egg-rr99.1%

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

      if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6478.3

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified78.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
    3. Recombined 5 regimes into one program.
    4. Final simplification92.7%

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

    Alternative 4: 91.4% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\ t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_2 \leq -1000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\ \mathbf{elif}\;t\_2 \leq 2:\\ \;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 10^{+205}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (* z t) x))
            (t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
            (t_3 (/ (* z y) (* (+ x 1.0) t_1))))
       (if (<= t_2 -2e+254)
         (/ y (fma x t t))
         (if (<= t_2 -1000000000.0)
           t_3
           (if (<= t_2 2e-63)
             (fma (/ y t) (- 1.0 x) x)
             (if (<= t_2 2.0)
               (/ (+ x (/ x (- x (* z t)))) (+ x 1.0))
               (if (<= t_2 1e+205) t_3 (/ (+ x (/ y t)) (+ x 1.0)))))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (z * t) - x;
    	double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
    	double t_3 = (z * y) / ((x + 1.0) * t_1);
    	double tmp;
    	if (t_2 <= -2e+254) {
    		tmp = y / fma(x, t, t);
    	} else if (t_2 <= -1000000000.0) {
    		tmp = t_3;
    	} else if (t_2 <= 2e-63) {
    		tmp = fma((y / t), (1.0 - x), x);
    	} else if (t_2 <= 2.0) {
    		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
    	} else if (t_2 <= 1e+205) {
    		tmp = t_3;
    	} else {
    		tmp = (x + (y / t)) / (x + 1.0);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(z * t) - x)
    	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0))
    	t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1))
    	tmp = 0.0
    	if (t_2 <= -2e+254)
    		tmp = Float64(y / fma(x, t, t));
    	elseif (t_2 <= -1000000000.0)
    		tmp = t_3;
    	elseif (t_2 <= 2e-63)
    		tmp = fma(Float64(y / t), Float64(1.0 - x), x);
    	elseif (t_2 <= 2.0)
    		tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0));
    	elseif (t_2 <= 1e+205)
    		tmp = t_3;
    	else
    		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 2e-63], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := z \cdot t - x\\
    t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
    t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
    \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
    
    \mathbf{elif}\;t\_2 \leq -1000000000:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
    
    \mathbf{elif}\;t\_2 \leq 2:\\
    \;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+205}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6461.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified61.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in y around inf

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

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

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

          \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
        4. distribute-lft1-inN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
        5. accelerator-lowering-fma.f6474.1

          \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
      8. Simplified74.1%

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

      if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205

      1. Initial program 99.5%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

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

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

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

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

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

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

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

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
        8. +-lowering-+.f6496.1

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
      5. Simplified96.1%

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

      if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000013e-63

      1. Initial program 93.6%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6485.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified85.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in x around 0

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

          \[\leadsto \color{blue}{\frac{y}{t} + x \cdot \left(1 - \frac{y}{t}\right)} \]
        2. sub-negN/A

          \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{y}{t}\right)\right)\right)} \]
        3. mul-1-negN/A

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

          \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(-1 \cdot \frac{y}{t} + 1\right)} \]
        5. distribute-lft-inN/A

          \[\leadsto \frac{y}{t} + \color{blue}{\left(x \cdot \left(-1 \cdot \frac{y}{t}\right) + x \cdot 1\right)} \]
        6. mul-1-negN/A

          \[\leadsto \frac{y}{t} + \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y}{t}\right)\right)} + x \cdot 1\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \frac{y}{t} + \left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{y}{t}\right)\right)} + x \cdot 1\right) \]
        8. associate-/l*N/A

          \[\leadsto \frac{y}{t} + \left(\left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot y}{t}}\right)\right) + x \cdot 1\right) \]
        9. mul-1-negN/A

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

          \[\leadsto \frac{y}{t} + \left(-1 \cdot \frac{x \cdot y}{t} + \color{blue}{x}\right) \]
        11. associate-+r+N/A

          \[\leadsto \color{blue}{\left(\frac{y}{t} + -1 \cdot \frac{x \cdot y}{t}\right) + x} \]
        12. mul-1-negN/A

          \[\leadsto \left(\frac{y}{t} + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{t}\right)\right)}\right) + x \]
        13. unsub-negN/A

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

          \[\leadsto \left(\frac{y}{t} - \color{blue}{x \cdot \frac{y}{t}}\right) + x \]
        15. *-lft-identityN/A

          \[\leadsto \left(\color{blue}{1 \cdot \frac{y}{t}} - x \cdot \frac{y}{t}\right) + x \]
        16. distribute-rgt-out--N/A

          \[\leadsto \color{blue}{\frac{y}{t} \cdot \left(1 - x\right)} + x \]
        17. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)} \]
        18. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{t}}, 1 - x, x\right) \]
        19. --lowering--.f6485.7

          \[\leadsto \mathsf{fma}\left(\frac{y}{t}, \color{blue}{1 - x}, x\right) \]
      8. Simplified85.7%

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

      if 2.00000000000000013e-63 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2

      1. Initial program 100.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

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

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

          \[\leadsto \frac{\color{blue}{x - \frac{x}{t \cdot z - x}}}{1 + x} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \frac{x - \color{blue}{\frac{x}{t \cdot z - x}}}{1 + x} \]
        4. --lowering--.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z - x}}}{1 + x} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z} - x}}{1 + x} \]
        6. +-commutativeN/A

          \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
        7. +-lowering-+.f6499.1

          \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
      5. Simplified99.1%

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

      if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6478.3

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified78.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
    3. Recombined 5 regimes into one program.
    4. Final simplification92.7%

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

    Alternative 5: 90.3% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\ t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\ t_4 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_2 \leq -1000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0.9999999999999853:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_2 \leq 20:\\ \;\;\;\;\frac{x - \mathsf{fma}\left(y, \frac{z}{x}, -1\right)}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 10^{+205}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (* z t) x))
            (t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
            (t_3 (/ (* z y) (* (+ x 1.0) t_1)))
            (t_4 (/ (+ x (/ y t)) (+ x 1.0))))
       (if (<= t_2 -2e+254)
         (/ y (fma x t t))
         (if (<= t_2 -1000000000.0)
           t_3
           (if (<= t_2 0.9999999999999853)
             t_4
             (if (<= t_2 20.0)
               (/ (- x (fma y (/ z x) -1.0)) (+ x 1.0))
               (if (<= t_2 1e+205) t_3 t_4)))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (z * t) - x;
    	double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
    	double t_3 = (z * y) / ((x + 1.0) * t_1);
    	double t_4 = (x + (y / t)) / (x + 1.0);
    	double tmp;
    	if (t_2 <= -2e+254) {
    		tmp = y / fma(x, t, t);
    	} else if (t_2 <= -1000000000.0) {
    		tmp = t_3;
    	} else if (t_2 <= 0.9999999999999853) {
    		tmp = t_4;
    	} else if (t_2 <= 20.0) {
    		tmp = (x - fma(y, (z / x), -1.0)) / (x + 1.0);
    	} else if (t_2 <= 1e+205) {
    		tmp = t_3;
    	} else {
    		tmp = t_4;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(z * t) - x)
    	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0))
    	t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1))
    	t_4 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
    	tmp = 0.0
    	if (t_2 <= -2e+254)
    		tmp = Float64(y / fma(x, t, t));
    	elseif (t_2 <= -1000000000.0)
    		tmp = t_3;
    	elseif (t_2 <= 0.9999999999999853)
    		tmp = t_4;
    	elseif (t_2 <= 20.0)
    		tmp = Float64(Float64(x - fma(y, Float64(z / x), -1.0)) / Float64(x + 1.0));
    	elseif (t_2 <= 1e+205)
    		tmp = t_3;
    	else
    		tmp = t_4;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 0.9999999999999853], t$95$4, If[LessEqual[t$95$2, 20.0], N[(N[(x - N[(y * N[(z / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, t$95$4]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := z \cdot t - x\\
    t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
    t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
    t_4 := \frac{x + \frac{y}{t}}{x + 1}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
    \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
    
    \mathbf{elif}\;t\_2 \leq -1000000000:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 0.9999999999999853:\\
    \;\;\;\;t\_4\\
    
    \mathbf{elif}\;t\_2 \leq 20:\\
    \;\;\;\;\frac{x - \mathsf{fma}\left(y, \frac{z}{x}, -1\right)}{x + 1}\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+205}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_4\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6461.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified61.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in y around inf

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

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

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

          \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
        4. distribute-lft1-inN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
        5. accelerator-lowering-fma.f6474.1

          \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
      8. Simplified74.1%

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

      if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205

      1. Initial program 99.5%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

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

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

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

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

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

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

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

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
        8. +-lowering-+.f6497.8

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
      5. Simplified97.8%

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

      if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999999999998535 or 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

      1. Initial program 75.8%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6480.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified80.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]

      if 0.99999999999998535 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

      1. Initial program 100.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in t around 0

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

          \[\leadsto \frac{x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z - x}{x}\right)\right)}}{x + 1} \]
        2. neg-lowering-neg.f64N/A

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

          \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot z}{x} - \frac{x}{x}\right)}\right)\right)}{x + 1} \]
        4. sub-negN/A

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

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

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

          \[\leadsto \frac{x + \left(\mathsf{neg}\left(\left(y \cdot \frac{z}{x} + \color{blue}{-1}\right)\right)\right)}{x + 1} \]
        8. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(y, \frac{z}{x}, -1\right)}\right)\right)}{x + 1} \]
        9. /-lowering-/.f6499.5

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

        \[\leadsto \frac{x + \color{blue}{\left(-\mathsf{fma}\left(y, \frac{z}{x}, -1\right)\right)}}{x + 1} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification91.8%

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

    Alternative 6: 90.3% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\ t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\ t_4 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_2 \leq -1000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0.9999999999999853:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_2 \leq 20:\\ \;\;\;\;1 - z \cdot \frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{elif}\;t\_2 \leq 10^{+205}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (* z t) x))
            (t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
            (t_3 (/ (* z y) (* (+ x 1.0) t_1)))
            (t_4 (/ (+ x (/ y t)) (+ x 1.0))))
       (if (<= t_2 -2e+254)
         (/ y (fma x t t))
         (if (<= t_2 -1000000000.0)
           t_3
           (if (<= t_2 0.9999999999999853)
             t_4
             (if (<= t_2 20.0)
               (- 1.0 (* z (/ y (fma x x x))))
               (if (<= t_2 1e+205) t_3 t_4)))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (z * t) - x;
    	double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
    	double t_3 = (z * y) / ((x + 1.0) * t_1);
    	double t_4 = (x + (y / t)) / (x + 1.0);
    	double tmp;
    	if (t_2 <= -2e+254) {
    		tmp = y / fma(x, t, t);
    	} else if (t_2 <= -1000000000.0) {
    		tmp = t_3;
    	} else if (t_2 <= 0.9999999999999853) {
    		tmp = t_4;
    	} else if (t_2 <= 20.0) {
    		tmp = 1.0 - (z * (y / fma(x, x, x)));
    	} else if (t_2 <= 1e+205) {
    		tmp = t_3;
    	} else {
    		tmp = t_4;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(z * t) - x)
    	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0))
    	t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1))
    	t_4 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
    	tmp = 0.0
    	if (t_2 <= -2e+254)
    		tmp = Float64(y / fma(x, t, t));
    	elseif (t_2 <= -1000000000.0)
    		tmp = t_3;
    	elseif (t_2 <= 0.9999999999999853)
    		tmp = t_4;
    	elseif (t_2 <= 20.0)
    		tmp = Float64(1.0 - Float64(z * Float64(y / fma(x, x, x))));
    	elseif (t_2 <= 1e+205)
    		tmp = t_3;
    	else
    		tmp = t_4;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 0.9999999999999853], t$95$4, If[LessEqual[t$95$2, 20.0], N[(1.0 - N[(z * N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, t$95$4]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := z \cdot t - x\\
    t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
    t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
    t_4 := \frac{x + \frac{y}{t}}{x + 1}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
    \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
    
    \mathbf{elif}\;t\_2 \leq -1000000000:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 0.9999999999999853:\\
    \;\;\;\;t\_4\\
    
    \mathbf{elif}\;t\_2 \leq 20:\\
    \;\;\;\;1 - z \cdot \frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+205}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_4\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254

      1. Initial program 31.1%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6461.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified61.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in y around inf

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

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

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

          \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
        4. distribute-lft1-inN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
        5. accelerator-lowering-fma.f6474.1

          \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
      8. Simplified74.1%

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

      if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205

      1. Initial program 99.5%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

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

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

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

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

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

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

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

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
        8. +-lowering-+.f6497.8

          \[\leadsto \frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \color{blue}{\left(x + 1\right)}} \]
      5. Simplified97.8%

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

      if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999999999998535 or 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

      1. Initial program 75.8%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6480.7

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified80.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]

      if 0.99999999999998535 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

      1. Initial program 100.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in t around 0

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

          \[\leadsto \frac{x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z - x}{x}\right)\right)}}{x + 1} \]
        2. neg-lowering-neg.f64N/A

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

          \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot z}{x} - \frac{x}{x}\right)}\right)\right)}{x + 1} \]
        4. sub-negN/A

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

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

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

          \[\leadsto \frac{x + \left(\mathsf{neg}\left(\left(y \cdot \frac{z}{x} + \color{blue}{-1}\right)\right)\right)}{x + 1} \]
        8. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(y, \frac{z}{x}, -1\right)}\right)\right)}{x + 1} \]
        9. /-lowering-/.f6499.5

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

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

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

          \[\leadsto 1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z}{x \cdot \left(1 + x\right)}\right)\right)} \]
        2. unsub-negN/A

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

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

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

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

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

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

          \[\leadsto 1 - z \cdot \frac{y}{x \cdot \color{blue}{\left(x + 1\right)}} \]
        9. distribute-lft-inN/A

          \[\leadsto 1 - z \cdot \frac{y}{\color{blue}{x \cdot x + x \cdot 1}} \]
        10. *-rgt-identityN/A

          \[\leadsto 1 - z \cdot \frac{y}{x \cdot x + \color{blue}{x}} \]
        11. accelerator-lowering-fma.f6499.5

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

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

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

    Alternative 7: 82.9% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+100}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\ \mathbf{elif}\;t\_1 \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
       (if (<= t_1 -1e+100)
         (/ y (fma x t t))
         (if (<= t_1 0.0001)
           (fma (/ y t) (- 1.0 x) x)
           (if (<= t_1 20.0) 1.0 (/ y (* (+ x 1.0) t)))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
    	double tmp;
    	if (t_1 <= -1e+100) {
    		tmp = y / fma(x, t, t);
    	} else if (t_1 <= 0.0001) {
    		tmp = fma((y / t), (1.0 - x), x);
    	} else if (t_1 <= 20.0) {
    		tmp = 1.0;
    	} else {
    		tmp = y / ((x + 1.0) * t);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
    	tmp = 0.0
    	if (t_1 <= -1e+100)
    		tmp = Float64(y / fma(x, t, t));
    	elseif (t_1 <= 0.0001)
    		tmp = fma(Float64(y / t), Float64(1.0 - x), x);
    	elseif (t_1 <= 20.0)
    		tmp = 1.0;
    	else
    		tmp = Float64(y / Float64(Float64(x + 1.0) * t));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+100], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+100}:\\
    \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
    
    \mathbf{elif}\;t\_1 \leq 0.0001:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
    
    \mathbf{elif}\;t\_1 \leq 20:\\
    \;\;\;\;1\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e100

      1. Initial program 63.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6466.4

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified66.4%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in y around inf

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

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

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

          \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
        4. distribute-lft1-inN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
        5. accelerator-lowering-fma.f6473.1

          \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
      8. Simplified73.1%

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

      if -1.00000000000000002e100 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4

      1. Initial program 95.3%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        3. +-lowering-+.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        6. +-lowering-+.f6476.3

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
      5. Simplified76.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      6. Taylor expanded in x around 0

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

          \[\leadsto \color{blue}{\frac{y}{t} + x \cdot \left(1 - \frac{y}{t}\right)} \]
        2. sub-negN/A

          \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{y}{t}\right)\right)\right)} \]
        3. mul-1-negN/A

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

          \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(-1 \cdot \frac{y}{t} + 1\right)} \]
        5. distribute-lft-inN/A

          \[\leadsto \frac{y}{t} + \color{blue}{\left(x \cdot \left(-1 \cdot \frac{y}{t}\right) + x \cdot 1\right)} \]
        6. mul-1-negN/A

          \[\leadsto \frac{y}{t} + \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y}{t}\right)\right)} + x \cdot 1\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \frac{y}{t} + \left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{y}{t}\right)\right)} + x \cdot 1\right) \]
        8. associate-/l*N/A

          \[\leadsto \frac{y}{t} + \left(\left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot y}{t}}\right)\right) + x \cdot 1\right) \]
        9. mul-1-negN/A

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

          \[\leadsto \frac{y}{t} + \left(-1 \cdot \frac{x \cdot y}{t} + \color{blue}{x}\right) \]
        11. associate-+r+N/A

          \[\leadsto \color{blue}{\left(\frac{y}{t} + -1 \cdot \frac{x \cdot y}{t}\right) + x} \]
        12. mul-1-negN/A

          \[\leadsto \left(\frac{y}{t} + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{t}\right)\right)}\right) + x \]
        13. unsub-negN/A

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

          \[\leadsto \left(\frac{y}{t} - \color{blue}{x \cdot \frac{y}{t}}\right) + x \]
        15. *-lft-identityN/A

          \[\leadsto \left(\color{blue}{1 \cdot \frac{y}{t}} - x \cdot \frac{y}{t}\right) + x \]
        16. distribute-rgt-out--N/A

          \[\leadsto \color{blue}{\frac{y}{t} \cdot \left(1 - x\right)} + x \]
        17. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)} \]
        18. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{t}}, 1 - x, x\right) \]
        19. --lowering--.f6475.3

          \[\leadsto \mathsf{fma}\left(\frac{y}{t}, \color{blue}{1 - x}, x\right) \]
      8. Simplified75.3%

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

      if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

      1. Initial program 100.0%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Add Preprocessing
      3. Taylor expanded in x around inf

        \[\leadsto \color{blue}{1} \]
      4. Step-by-step derivation
        1. Simplified97.3%

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

        if 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

        1. Initial program 59.5%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{x + 1} \]
        4. Step-by-step derivation
          1. /-lowering-/.f6457.6

            \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{x + 1} \]
        5. Simplified57.6%

          \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{x + 1} \]
        6. Step-by-step derivation
          1. associate-/l/N/A

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

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

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

            \[\leadsto \frac{y}{\color{blue}{t \cdot \left(x + 1\right)}} \]
          5. +-lowering-+.f6457.7

            \[\leadsto \frac{y}{t \cdot \color{blue}{\left(x + 1\right)}} \]
        7. Applied egg-rr57.7%

          \[\leadsto \color{blue}{\frac{y}{t \cdot \left(x + 1\right)}} \]
      5. Recombined 4 regimes into one program.
      6. Final simplification82.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -1 \cdot 10^{+100}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 8: 78.8% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-46}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;x - \frac{x}{z \cdot t}\\ \mathbf{elif}\;t\_1 \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
         (if (<= t_1 -1e-46)
           (/ y (fma x t t))
           (if (<= t_1 0.0001)
             (- x (/ x (* z t)))
             (if (<= t_1 20.0) 1.0 (/ y (* (+ x 1.0) t)))))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
      	double tmp;
      	if (t_1 <= -1e-46) {
      		tmp = y / fma(x, t, t);
      	} else if (t_1 <= 0.0001) {
      		tmp = x - (x / (z * t));
      	} else if (t_1 <= 20.0) {
      		tmp = 1.0;
      	} else {
      		tmp = y / ((x + 1.0) * t);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
      	tmp = 0.0
      	if (t_1 <= -1e-46)
      		tmp = Float64(y / fma(x, t, t));
      	elseif (t_1 <= 0.0001)
      		tmp = Float64(x - Float64(x / Float64(z * t)));
      	elseif (t_1 <= 20.0)
      		tmp = 1.0;
      	else
      		tmp = Float64(y / Float64(Float64(x + 1.0) * t));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-46], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(x - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-46}:\\
      \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
      
      \mathbf{elif}\;t\_1 \leq 0.0001:\\
      \;\;\;\;x - \frac{x}{z \cdot t}\\
      
      \mathbf{elif}\;t\_1 \leq 20:\\
      \;\;\;\;1\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e-46

        1. Initial program 78.2%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
          2. +-commutativeN/A

            \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
          3. +-lowering-+.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
          4. /-lowering-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
          5. +-commutativeN/A

            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
          6. +-lowering-+.f6462.0

            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
        5. Simplified62.0%

          \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
        6. Taylor expanded in y around inf

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

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

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

            \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
          4. distribute-lft1-inN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
          5. accelerator-lowering-fma.f6464.0

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
        8. Simplified64.0%

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

        if -1.00000000000000002e-46 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4

        1. Initial program 93.4%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

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

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

            \[\leadsto \frac{\color{blue}{x - \frac{x}{t \cdot z - x}}}{1 + x} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \frac{x - \color{blue}{\frac{x}{t \cdot z - x}}}{1 + x} \]
          4. --lowering--.f64N/A

            \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z - x}}}{1 + x} \]
          5. *-lowering-*.f64N/A

            \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z} - x}}{1 + x} \]
          6. +-commutativeN/A

            \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
          7. +-lowering-+.f6468.4

            \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
        5. Simplified68.4%

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

          \[\leadsto \color{blue}{x \cdot \left(1 - \frac{1}{t \cdot z}\right)} \]
        7. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{t \cdot z}\right)\right)\right)} \]
          2. distribute-lft-inN/A

            \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(\mathsf{neg}\left(\frac{1}{t \cdot z}\right)\right)} \]
          3. *-rgt-identityN/A

            \[\leadsto \color{blue}{x} + x \cdot \left(\mathsf{neg}\left(\frac{1}{t \cdot z}\right)\right) \]
          4. distribute-neg-fracN/A

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

            \[\leadsto x + x \cdot \frac{\color{blue}{-1}}{t \cdot z} \]
          6. associate-/l*N/A

            \[\leadsto x + \color{blue}{\frac{x \cdot -1}{t \cdot z}} \]
          7. *-commutativeN/A

            \[\leadsto x + \frac{\color{blue}{-1 \cdot x}}{t \cdot z} \]
          8. associate-*r/N/A

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

            \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{t \cdot z}\right)\right)} \]
          10. unsub-negN/A

            \[\leadsto \color{blue}{x - \frac{x}{t \cdot z}} \]
          11. *-rgt-identityN/A

            \[\leadsto x - \frac{\color{blue}{x \cdot 1}}{t \cdot z} \]
          12. associate-*r/N/A

            \[\leadsto x - \color{blue}{x \cdot \frac{1}{t \cdot z}} \]
          13. --lowering--.f64N/A

            \[\leadsto \color{blue}{x - x \cdot \frac{1}{t \cdot z}} \]
          14. associate-*r/N/A

            \[\leadsto x - \color{blue}{\frac{x \cdot 1}{t \cdot z}} \]
          15. *-rgt-identityN/A

            \[\leadsto x - \frac{\color{blue}{x}}{t \cdot z} \]
          16. /-lowering-/.f64N/A

            \[\leadsto x - \color{blue}{\frac{x}{t \cdot z}} \]
          17. *-lowering-*.f6467.1

            \[\leadsto x - \frac{x}{\color{blue}{t \cdot z}} \]
        8. Simplified67.1%

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

        if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

        1. Initial program 100.0%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Add Preprocessing
        3. Taylor expanded in x around inf

          \[\leadsto \color{blue}{1} \]
        4. Step-by-step derivation
          1. Simplified97.3%

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

          if 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

          1. Initial program 59.5%

            \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{x + 1} \]
          4. Step-by-step derivation
            1. /-lowering-/.f6457.6

              \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{x + 1} \]
          5. Simplified57.6%

            \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{x + 1} \]
          6. Step-by-step derivation
            1. associate-/l/N/A

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

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

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

              \[\leadsto \frac{y}{\color{blue}{t \cdot \left(x + 1\right)}} \]
            5. +-lowering-+.f6457.7

              \[\leadsto \frac{y}{t \cdot \color{blue}{\left(x + 1\right)}} \]
          7. Applied egg-rr57.7%

            \[\leadsto \color{blue}{\frac{y}{t \cdot \left(x + 1\right)}} \]
        5. Recombined 4 regimes into one program.
        6. Final simplification79.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -1 \cdot 10^{-46}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x - \frac{x}{z \cdot t}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 9: 78.8% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ t_2 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0.0001:\\ \;\;\;\;x - \frac{x}{z \cdot t}\\ \mathbf{elif}\;t\_2 \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (/ y (fma x t t)))
                (t_2 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
           (if (<= t_2 -1e-46)
             t_1
             (if (<= t_2 0.0001) (- x (/ x (* z t))) (if (<= t_2 20.0) 1.0 t_1)))))
        double code(double x, double y, double z, double t) {
        	double t_1 = y / fma(x, t, t);
        	double t_2 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
        	double tmp;
        	if (t_2 <= -1e-46) {
        		tmp = t_1;
        	} else if (t_2 <= 0.0001) {
        		tmp = x - (x / (z * t));
        	} else if (t_2 <= 20.0) {
        		tmp = 1.0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	t_1 = Float64(y / fma(x, t, t))
        	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
        	tmp = 0.0
        	if (t_2 <= -1e-46)
        		tmp = t_1;
        	elseif (t_2 <= 0.0001)
        		tmp = Float64(x - Float64(x / Float64(z * t)));
        	elseif (t_2 <= 20.0)
        		tmp = 1.0;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-46], t$95$1, If[LessEqual[t$95$2, 0.0001], N[(x - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20.0], 1.0, t$95$1]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
        t_2 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
        \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-46}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq 0.0001:\\
        \;\;\;\;x - \frac{x}{z \cdot t}\\
        
        \mathbf{elif}\;t\_2 \leq 20:\\
        \;\;\;\;1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e-46 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

          1. Initial program 69.5%

            \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
            3. +-lowering-+.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
            6. +-lowering-+.f6466.1

              \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
          5. Simplified66.1%

            \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
          6. Taylor expanded in y around inf

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

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

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

              \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
            4. distribute-lft1-inN/A

              \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
            5. accelerator-lowering-fma.f6461.1

              \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
          8. Simplified61.1%

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

          if -1.00000000000000002e-46 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4

          1. Initial program 93.4%

            \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
          2. Add Preprocessing
          3. Taylor expanded in y around 0

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

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

              \[\leadsto \frac{\color{blue}{x - \frac{x}{t \cdot z - x}}}{1 + x} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \frac{x - \color{blue}{\frac{x}{t \cdot z - x}}}{1 + x} \]
            4. --lowering--.f64N/A

              \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z - x}}}{1 + x} \]
            5. *-lowering-*.f64N/A

              \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z} - x}}{1 + x} \]
            6. +-commutativeN/A

              \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
            7. +-lowering-+.f6468.4

              \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
          5. Simplified68.4%

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

            \[\leadsto \color{blue}{x \cdot \left(1 - \frac{1}{t \cdot z}\right)} \]
          7. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{1}{t \cdot z}\right)\right)\right)} \]
            2. distribute-lft-inN/A

              \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(\mathsf{neg}\left(\frac{1}{t \cdot z}\right)\right)} \]
            3. *-rgt-identityN/A

              \[\leadsto \color{blue}{x} + x \cdot \left(\mathsf{neg}\left(\frac{1}{t \cdot z}\right)\right) \]
            4. distribute-neg-fracN/A

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

              \[\leadsto x + x \cdot \frac{\color{blue}{-1}}{t \cdot z} \]
            6. associate-/l*N/A

              \[\leadsto x + \color{blue}{\frac{x \cdot -1}{t \cdot z}} \]
            7. *-commutativeN/A

              \[\leadsto x + \frac{\color{blue}{-1 \cdot x}}{t \cdot z} \]
            8. associate-*r/N/A

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

              \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{t \cdot z}\right)\right)} \]
            10. unsub-negN/A

              \[\leadsto \color{blue}{x - \frac{x}{t \cdot z}} \]
            11. *-rgt-identityN/A

              \[\leadsto x - \frac{\color{blue}{x \cdot 1}}{t \cdot z} \]
            12. associate-*r/N/A

              \[\leadsto x - \color{blue}{x \cdot \frac{1}{t \cdot z}} \]
            13. --lowering--.f64N/A

              \[\leadsto \color{blue}{x - x \cdot \frac{1}{t \cdot z}} \]
            14. associate-*r/N/A

              \[\leadsto x - \color{blue}{\frac{x \cdot 1}{t \cdot z}} \]
            15. *-rgt-identityN/A

              \[\leadsto x - \frac{\color{blue}{x}}{t \cdot z} \]
            16. /-lowering-/.f64N/A

              \[\leadsto x - \color{blue}{\frac{x}{t \cdot z}} \]
            17. *-lowering-*.f6467.1

              \[\leadsto x - \frac{x}{\color{blue}{t \cdot z}} \]
          8. Simplified67.1%

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

          if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

          1. Initial program 100.0%

            \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
          2. Add Preprocessing
          3. Taylor expanded in x around inf

            \[\leadsto \color{blue}{1} \]
          4. Step-by-step derivation
            1. Simplified97.3%

              \[\leadsto \color{blue}{1} \]
          5. Recombined 3 regimes into one program.
          6. Final simplification79.4%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -1 \cdot 10^{-46}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x - \frac{x}{z \cdot t}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 10: 76.6% accurate, 0.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ t_2 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0.999995:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (/ y (fma x t t)))
                  (t_2 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
             (if (<= t_2 -2e-71)
               t_1
               (if (<= t_2 0.999995) (/ x (+ x 1.0)) (if (<= t_2 20.0) 1.0 t_1)))))
          double code(double x, double y, double z, double t) {
          	double t_1 = y / fma(x, t, t);
          	double t_2 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
          	double tmp;
          	if (t_2 <= -2e-71) {
          		tmp = t_1;
          	} else if (t_2 <= 0.999995) {
          		tmp = x / (x + 1.0);
          	} else if (t_2 <= 20.0) {
          		tmp = 1.0;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	t_1 = Float64(y / fma(x, t, t))
          	t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
          	tmp = 0.0
          	if (t_2 <= -2e-71)
          		tmp = t_1;
          	elseif (t_2 <= 0.999995)
          		tmp = Float64(x / Float64(x + 1.0));
          	elseif (t_2 <= 20.0)
          		tmp = 1.0;
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-71], t$95$1, If[LessEqual[t$95$2, 0.999995], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20.0], 1.0, t$95$1]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
          t_2 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
          \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-71}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 0.999995:\\
          \;\;\;\;\frac{x}{x + 1}\\
          
          \mathbf{elif}\;t\_2 \leq 20:\\
          \;\;\;\;1\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999998e-71 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

            1. Initial program 72.6%

              \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
              2. +-commutativeN/A

                \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
              3. +-lowering-+.f64N/A

                \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
              4. /-lowering-/.f64N/A

                \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
              5. +-commutativeN/A

                \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
              6. +-lowering-+.f6468.6

                \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
            5. Simplified68.6%

              \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
            6. Taylor expanded in y around inf

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

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

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

                \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
              4. distribute-lft1-inN/A

                \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
              5. accelerator-lowering-fma.f6460.1

                \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
            8. Simplified60.1%

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

            if -1.9999999999999998e-71 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999499999999997

            1. Initial program 92.0%

              \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
            2. Add Preprocessing
            3. Taylor expanded in t around inf

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

                \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
              2. +-commutativeN/A

                \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
              3. +-lowering-+.f6460.5

                \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
            5. Simplified60.5%

              \[\leadsto \color{blue}{\frac{x}{x + 1}} \]

            if 0.99999499999999997 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

            1. Initial program 100.0%

              \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{1} \]
            4. Step-by-step derivation
              1. Simplified98.2%

                \[\leadsto \color{blue}{1} \]
            5. Recombined 3 regimes into one program.
            6. Final simplification78.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.999995:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \end{array} \]
            7. Add Preprocessing

            Alternative 11: 74.6% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 0.999995:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;t\_1 \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
               (if (<= t_1 -2e-71)
                 (/ y t)
                 (if (<= t_1 0.999995) (/ x (+ x 1.0)) (if (<= t_1 20.0) 1.0 (/ y t))))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
            	double tmp;
            	if (t_1 <= -2e-71) {
            		tmp = y / t;
            	} else if (t_1 <= 0.999995) {
            		tmp = x / (x + 1.0);
            	} else if (t_1 <= 20.0) {
            		tmp = 1.0;
            	} else {
            		tmp = y / t;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
                if (t_1 <= (-2d-71)) then
                    tmp = y / t
                else if (t_1 <= 0.999995d0) then
                    tmp = x / (x + 1.0d0)
                else if (t_1 <= 20.0d0) then
                    tmp = 1.0d0
                else
                    tmp = y / t
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
            	double tmp;
            	if (t_1 <= -2e-71) {
            		tmp = y / t;
            	} else if (t_1 <= 0.999995) {
            		tmp = x / (x + 1.0);
            	} else if (t_1 <= 20.0) {
            		tmp = 1.0;
            	} else {
            		tmp = y / t;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)
            	tmp = 0
            	if t_1 <= -2e-71:
            		tmp = y / t
            	elif t_1 <= 0.999995:
            		tmp = x / (x + 1.0)
            	elif t_1 <= 20.0:
            		tmp = 1.0
            	else:
            		tmp = y / t
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
            	tmp = 0.0
            	if (t_1 <= -2e-71)
            		tmp = Float64(y / t);
            	elseif (t_1 <= 0.999995)
            		tmp = Float64(x / Float64(x + 1.0));
            	elseif (t_1 <= 20.0)
            		tmp = 1.0;
            	else
            		tmp = Float64(y / t);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
            	tmp = 0.0;
            	if (t_1 <= -2e-71)
            		tmp = y / t;
            	elseif (t_1 <= 0.999995)
            		tmp = x / (x + 1.0);
            	elseif (t_1 <= 20.0)
            		tmp = 1.0;
            	else
            		tmp = y / t;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-71], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.999995], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / t), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
            \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\
            \;\;\;\;\frac{y}{t}\\
            
            \mathbf{elif}\;t\_1 \leq 0.999995:\\
            \;\;\;\;\frac{x}{x + 1}\\
            
            \mathbf{elif}\;t\_1 \leq 20:\\
            \;\;\;\;1\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{y}{t}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999998e-71 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

              1. Initial program 72.6%

                \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \color{blue}{\frac{y}{t}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f6452.7

                  \[\leadsto \color{blue}{\frac{y}{t}} \]
              5. Simplified52.7%

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

              if -1.9999999999999998e-71 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999499999999997

              1. Initial program 92.0%

                \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
              2. Add Preprocessing
              3. Taylor expanded in t around inf

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

                  \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
                2. +-commutativeN/A

                  \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                3. +-lowering-+.f6460.5

                  \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
              5. Simplified60.5%

                \[\leadsto \color{blue}{\frac{x}{x + 1}} \]

              if 0.99999499999999997 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

              1. Initial program 100.0%

                \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
              2. Add Preprocessing
              3. Taylor expanded in x around inf

                \[\leadsto \color{blue}{1} \]
              4. Step-by-step derivation
                1. Simplified98.2%

                  \[\leadsto \color{blue}{1} \]
              5. Recombined 3 regimes into one program.
              6. Final simplification75.1%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.999995:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \]
              7. Add Preprocessing

              Alternative 12: 74.5% accurate, 0.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;x - x \cdot x\\ \mathbf{elif}\;t\_1 \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
                 (if (<= t_1 -2e-71)
                   (/ y t)
                   (if (<= t_1 0.0001) (- x (* x x)) (if (<= t_1 20.0) 1.0 (/ y t))))))
              double code(double x, double y, double z, double t) {
              	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
              	double tmp;
              	if (t_1 <= -2e-71) {
              		tmp = y / t;
              	} else if (t_1 <= 0.0001) {
              		tmp = x - (x * x);
              	} else if (t_1 <= 20.0) {
              		tmp = 1.0;
              	} else {
              		tmp = y / t;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
                  if (t_1 <= (-2d-71)) then
                      tmp = y / t
                  else if (t_1 <= 0.0001d0) then
                      tmp = x - (x * x)
                  else if (t_1 <= 20.0d0) then
                      tmp = 1.0d0
                  else
                      tmp = y / t
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t) {
              	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
              	double tmp;
              	if (t_1 <= -2e-71) {
              		tmp = y / t;
              	} else if (t_1 <= 0.0001) {
              		tmp = x - (x * x);
              	} else if (t_1 <= 20.0) {
              		tmp = 1.0;
              	} else {
              		tmp = y / t;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)
              	tmp = 0
              	if t_1 <= -2e-71:
              		tmp = y / t
              	elif t_1 <= 0.0001:
              		tmp = x - (x * x)
              	elif t_1 <= 20.0:
              		tmp = 1.0
              	else:
              		tmp = y / t
              	return tmp
              
              function code(x, y, z, t)
              	t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
              	tmp = 0.0
              	if (t_1 <= -2e-71)
              		tmp = Float64(y / t);
              	elseif (t_1 <= 0.0001)
              		tmp = Float64(x - Float64(x * x));
              	elseif (t_1 <= 20.0)
              		tmp = 1.0;
              	else
              		tmp = Float64(y / t);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
              	tmp = 0.0;
              	if (t_1 <= -2e-71)
              		tmp = y / t;
              	elseif (t_1 <= 0.0001)
              		tmp = x - (x * x);
              	elseif (t_1 <= 20.0)
              		tmp = 1.0;
              	else
              		tmp = y / t;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-71], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(x - N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / t), $MachinePrecision]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
              \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\
              \;\;\;\;\frac{y}{t}\\
              
              \mathbf{elif}\;t\_1 \leq 0.0001:\\
              \;\;\;\;x - x \cdot x\\
              
              \mathbf{elif}\;t\_1 \leq 20:\\
              \;\;\;\;1\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{y}{t}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999998e-71 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                1. Initial program 72.6%

                  \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{\frac{y}{t}} \]
                4. Step-by-step derivation
                  1. /-lowering-/.f6452.7

                    \[\leadsto \color{blue}{\frac{y}{t}} \]
                5. Simplified52.7%

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

                if -1.9999999999999998e-71 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4

                1. Initial program 91.6%

                  \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                2. Add Preprocessing
                3. Taylor expanded in t around inf

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

                    \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
                  2. +-commutativeN/A

                    \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                  3. +-lowering-+.f6461.0

                    \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                5. Simplified61.0%

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot x\right)} \]
                7. Step-by-step derivation
                  1. distribute-rgt-inN/A

                    \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot x\right) \cdot x} \]
                  2. *-lft-identityN/A

                    \[\leadsto \color{blue}{x} + \left(-1 \cdot x\right) \cdot x \]
                  3. mul-1-negN/A

                    \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \cdot x \]
                  4. distribute-lft-neg-outN/A

                    \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(x \cdot x\right)\right)} \]
                  5. unpow2N/A

                    \[\leadsto x + \left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right) \]
                  6. unsub-negN/A

                    \[\leadsto \color{blue}{x - {x}^{2}} \]
                  7. --lowering--.f64N/A

                    \[\leadsto \color{blue}{x - {x}^{2}} \]
                  8. unpow2N/A

                    \[\leadsto x - \color{blue}{x \cdot x} \]
                  9. *-lowering-*.f6459.9

                    \[\leadsto x - \color{blue}{x \cdot x} \]
                8. Simplified59.9%

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

                if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20

                1. Initial program 100.0%

                  \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                2. Add Preprocessing
                3. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{1} \]
                4. Step-by-step derivation
                  1. Simplified97.3%

                    \[\leadsto \color{blue}{1} \]
                5. Recombined 3 regimes into one program.
                6. Final simplification74.9%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x - x \cdot x\\ \mathbf{elif}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 20:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \]
                7. Add Preprocessing

                Alternative 13: 95.1% accurate, 0.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+254}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ \mathbf{elif}\;t\_1 \leq 10^{+205}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
                   (if (<= t_1 -2e+254)
                     (/ y (fma x t t))
                     (if (<= t_1 1e+205) t_1 (/ (+ x (/ y t)) (+ x 1.0))))))
                double code(double x, double y, double z, double t) {
                	double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
                	double tmp;
                	if (t_1 <= -2e+254) {
                		tmp = y / fma(x, t, t);
                	} else if (t_1 <= 1e+205) {
                		tmp = t_1;
                	} else {
                		tmp = (x + (y / t)) / (x + 1.0);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t)
                	t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
                	tmp = 0.0
                	if (t_1 <= -2e+254)
                		tmp = Float64(y / fma(x, t, t));
                	elseif (t_1 <= 1e+205)
                		tmp = t_1;
                	else
                		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+205], t$95$1, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
                \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+254}:\\
                \;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
                
                \mathbf{elif}\;t\_1 \leq 10^{+205}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254

                  1. Initial program 31.1%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing
                  3. Taylor expanded in z around inf

                    \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                  4. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                    2. +-commutativeN/A

                      \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
                    5. +-commutativeN/A

                      \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                    6. +-lowering-+.f6461.7

                      \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                  5. Simplified61.7%

                    \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
                  6. Taylor expanded in y around inf

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

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

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

                      \[\leadsto \frac{y}{\color{blue}{\left(x + 1\right)} \cdot t} \]
                    4. distribute-lft1-inN/A

                      \[\leadsto \frac{y}{\color{blue}{x \cdot t + t}} \]
                    5. accelerator-lowering-fma.f6474.1

                      \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, t, t\right)}} \]
                  8. Simplified74.1%

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

                  if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205

                  1. Initial program 98.5%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing

                  if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                  1. Initial program 31.1%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing
                  3. Taylor expanded in z around inf

                    \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                  4. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                    2. +-commutativeN/A

                      \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
                    5. +-commutativeN/A

                      \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                    6. +-lowering-+.f6478.3

                      \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                  5. Simplified78.3%

                    \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification95.2%

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

                Alternative 14: 94.8% accurate, 0.6× speedup?

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

                  1. Initial program 66.1%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing
                  3. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y}{\mathsf{fma}\left(t, x, t\right)} + \left(\frac{x}{x + 1} - \frac{x}{t \cdot \left(z \cdot \color{blue}{\left(x + 1\right)}\right)}\right) \]
                    16. distribute-rgt-inN/A

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

                      \[\leadsto \frac{y}{\mathsf{fma}\left(t, x, t\right)} + \left(\frac{x}{x + 1} - \frac{x}{t \cdot \left(x \cdot z + \color{blue}{z}\right)}\right) \]
                    18. accelerator-lowering-fma.f6488.6

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

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

                  if -4.2e173 < z < 1.89999999999999994e110

                  1. Initial program 99.3%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing
                3. Recombined 2 regimes into one program.
                4. Final simplification95.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+173}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(t, x, t\right)} + \left(\frac{x}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right) \cdot t}\right)\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+110}:\\ \;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(t, x, t\right)} + \left(\frac{x}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right) \cdot t}\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 15: 61.9% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x - x \cdot x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0)) 0.0001)
                   (- x (* x x))
                   1.0))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
                		tmp = x - (x * x);
                	} else {
                		tmp = 1.0;
                	}
                	return tmp;
                }
                
                real(8) function code(x, y, z, t)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8) :: tmp
                    if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)) <= 0.0001d0) then
                        tmp = x - (x * x)
                    else
                        tmp = 1.0d0
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t) {
                	double tmp;
                	if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
                		tmp = x - (x * x);
                	} else {
                		tmp = 1.0;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	tmp = 0
                	if ((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001:
                		tmp = x - (x * x)
                	else:
                		tmp = 1.0
                	return tmp
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) <= 0.0001)
                		tmp = Float64(x - Float64(x * x));
                	else
                		tmp = 1.0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	tmp = 0.0;
                	if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001)
                		tmp = x - (x * x);
                	else
                		tmp = 1.0;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.0001], N[(x - N[(x * x), $MachinePrecision]), $MachinePrecision], 1.0]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\
                \;\;\;\;x - x \cdot x\\
                
                \mathbf{else}:\\
                \;\;\;\;1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4

                  1. Initial program 85.5%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing
                  3. Taylor expanded in t around inf

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

                      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
                    2. +-commutativeN/A

                      \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                    3. +-lowering-+.f6430.9

                      \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                  5. Simplified30.9%

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

                    \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot x\right)} \]
                  7. Step-by-step derivation
                    1. distribute-rgt-inN/A

                      \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot x\right) \cdot x} \]
                    2. *-lft-identityN/A

                      \[\leadsto \color{blue}{x} + \left(-1 \cdot x\right) \cdot x \]
                    3. mul-1-negN/A

                      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \cdot x \]
                    4. distribute-lft-neg-outN/A

                      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(x \cdot x\right)\right)} \]
                    5. unpow2N/A

                      \[\leadsto x + \left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right) \]
                    6. unsub-negN/A

                      \[\leadsto \color{blue}{x - {x}^{2}} \]
                    7. --lowering--.f64N/A

                      \[\leadsto \color{blue}{x - {x}^{2}} \]
                    8. unpow2N/A

                      \[\leadsto x - \color{blue}{x \cdot x} \]
                    9. *-lowering-*.f6429.8

                      \[\leadsto x - \color{blue}{x \cdot x} \]
                  8. Simplified29.8%

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

                  if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                  1. Initial program 89.8%

                    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{1} \]
                  4. Step-by-step derivation
                    1. Simplified78.3%

                      \[\leadsto \color{blue}{1} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification60.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x - x \cdot x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 16: 61.8% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0)) 0.0001) x 1.0))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
                  		tmp = x;
                  	} else {
                  		tmp = 1.0;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8) :: tmp
                      if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)) <= 0.0001d0) then
                          tmp = x
                      else
                          tmp = 1.0d0
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
                  		tmp = x;
                  	} else {
                  		tmp = 1.0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	tmp = 0
                  	if ((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001:
                  		tmp = x
                  	else:
                  		tmp = 1.0
                  	return tmp
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) <= 0.0001)
                  		tmp = x;
                  	else
                  		tmp = 1.0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001)
                  		tmp = x;
                  	else
                  		tmp = 1.0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.0001], x, 1.0]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\
                  \;\;\;\;x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4

                    1. Initial program 85.5%

                      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf

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

                        \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
                      2. +-commutativeN/A

                        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                      3. +-lowering-+.f6430.9

                        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                    5. Simplified30.9%

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

                      \[\leadsto \color{blue}{x} \]
                    7. Step-by-step derivation
                      1. Simplified29.4%

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

                      if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                      1. Initial program 89.8%

                        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around inf

                        \[\leadsto \color{blue}{1} \]
                      4. Step-by-step derivation
                        1. Simplified78.3%

                          \[\leadsto \color{blue}{1} \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification60.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 17: 81.0% accurate, 1.1× speedup?

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

                        1. Initial program 87.7%

                          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                        2. Add Preprocessing
                        3. Taylor expanded in z around inf

                          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                        4. Step-by-step derivation
                          1. /-lowering-/.f64N/A

                            \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                          2. +-commutativeN/A

                            \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                          3. +-lowering-+.f64N/A

                            \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
                          5. +-commutativeN/A

                            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                          6. +-lowering-+.f6487.8

                            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                        5. Simplified87.8%

                          \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]

                        if -4.29999999999999998e-100 < t < 2.65000000000000015e-92

                        1. Initial program 89.4%

                          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                        2. Add Preprocessing
                        3. Taylor expanded in t around 0

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

                            \[\leadsto \frac{x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z - x}{x}\right)\right)}}{x + 1} \]
                          2. neg-lowering-neg.f64N/A

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

                            \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot z}{x} - \frac{x}{x}\right)}\right)\right)}{x + 1} \]
                          4. sub-negN/A

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

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

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

                            \[\leadsto \frac{x + \left(\mathsf{neg}\left(\left(y \cdot \frac{z}{x} + \color{blue}{-1}\right)\right)\right)}{x + 1} \]
                          8. accelerator-lowering-fma.f64N/A

                            \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(y, \frac{z}{x}, -1\right)}\right)\right)}{x + 1} \]
                          9. /-lowering-/.f6476.3

                            \[\leadsto \frac{x + \left(-\mathsf{fma}\left(y, \color{blue}{\frac{z}{x}}, -1\right)\right)}{x + 1} \]
                        5. Simplified76.3%

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

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

                            \[\leadsto 1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z}{x \cdot \left(1 + x\right)}\right)\right)} \]
                          2. unsub-negN/A

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

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

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

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

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

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

                            \[\leadsto 1 - z \cdot \frac{y}{x \cdot \color{blue}{\left(x + 1\right)}} \]
                          9. distribute-lft-inN/A

                            \[\leadsto 1 - z \cdot \frac{y}{\color{blue}{x \cdot x + x \cdot 1}} \]
                          10. *-rgt-identityN/A

                            \[\leadsto 1 - z \cdot \frac{y}{x \cdot x + \color{blue}{x}} \]
                          11. accelerator-lowering-fma.f6478.6

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-100}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{-92}:\\ \;\;\;\;1 - z \cdot \frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 18: 78.3% accurate, 1.2× speedup?

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

                        1. Initial program 87.3%

                          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                        2. Add Preprocessing
                        3. Taylor expanded in t around 0

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

                            \[\leadsto \frac{x + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z - x}{x}\right)\right)}}{x + 1} \]
                          2. neg-lowering-neg.f64N/A

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

                            \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot z}{x} - \frac{x}{x}\right)}\right)\right)}{x + 1} \]
                          4. sub-negN/A

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

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

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

                            \[\leadsto \frac{x + \left(\mathsf{neg}\left(\left(y \cdot \frac{z}{x} + \color{blue}{-1}\right)\right)\right)}{x + 1} \]
                          8. accelerator-lowering-fma.f64N/A

                            \[\leadsto \frac{x + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(y, \frac{z}{x}, -1\right)}\right)\right)}{x + 1} \]
                          9. /-lowering-/.f6487.6

                            \[\leadsto \frac{x + \left(-\mathsf{fma}\left(y, \color{blue}{\frac{z}{x}}, -1\right)\right)}{x + 1} \]
                        5. Simplified87.6%

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

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

                            \[\leadsto 1 + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot z}{x \cdot \left(1 + x\right)}\right)\right)} \]
                          2. unsub-negN/A

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

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

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

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

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

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

                            \[\leadsto 1 - z \cdot \frac{y}{x \cdot \color{blue}{\left(x + 1\right)}} \]
                          9. distribute-lft-inN/A

                            \[\leadsto 1 - z \cdot \frac{y}{\color{blue}{x \cdot x + x \cdot 1}} \]
                          10. *-rgt-identityN/A

                            \[\leadsto 1 - z \cdot \frac{y}{x \cdot x + \color{blue}{x}} \]
                          11. accelerator-lowering-fma.f6488.9

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

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

                        if -8.5000000000000002e-24 < x < 1.70000000000000001e-18

                        1. Initial program 89.5%

                          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                        2. Add Preprocessing
                        3. Taylor expanded in z around inf

                          \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                        4. Step-by-step derivation
                          1. /-lowering-/.f64N/A

                            \[\leadsto \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                          2. +-commutativeN/A

                            \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                          3. +-lowering-+.f64N/A

                            \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto \frac{\color{blue}{\frac{y}{t}} + x}{1 + x} \]
                          5. +-commutativeN/A

                            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                          6. +-lowering-+.f6472.6

                            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
                        5. Simplified72.6%

                          \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
                        6. Taylor expanded in x around 0

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

                            \[\leadsto \color{blue}{\frac{y}{t} + x \cdot \left(1 - \frac{y}{t}\right)} \]
                          2. sub-negN/A

                            \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(\frac{y}{t}\right)\right)\right)} \]
                          3. mul-1-negN/A

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

                            \[\leadsto \frac{y}{t} + x \cdot \color{blue}{\left(-1 \cdot \frac{y}{t} + 1\right)} \]
                          5. distribute-lft-inN/A

                            \[\leadsto \frac{y}{t} + \color{blue}{\left(x \cdot \left(-1 \cdot \frac{y}{t}\right) + x \cdot 1\right)} \]
                          6. mul-1-negN/A

                            \[\leadsto \frac{y}{t} + \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y}{t}\right)\right)} + x \cdot 1\right) \]
                          7. distribute-rgt-neg-inN/A

                            \[\leadsto \frac{y}{t} + \left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{y}{t}\right)\right)} + x \cdot 1\right) \]
                          8. associate-/l*N/A

                            \[\leadsto \frac{y}{t} + \left(\left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot y}{t}}\right)\right) + x \cdot 1\right) \]
                          9. mul-1-negN/A

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

                            \[\leadsto \frac{y}{t} + \left(-1 \cdot \frac{x \cdot y}{t} + \color{blue}{x}\right) \]
                          11. associate-+r+N/A

                            \[\leadsto \color{blue}{\left(\frac{y}{t} + -1 \cdot \frac{x \cdot y}{t}\right) + x} \]
                          12. mul-1-negN/A

                            \[\leadsto \left(\frac{y}{t} + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{t}\right)\right)}\right) + x \]
                          13. unsub-negN/A

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

                            \[\leadsto \left(\frac{y}{t} - \color{blue}{x \cdot \frac{y}{t}}\right) + x \]
                          15. *-lft-identityN/A

                            \[\leadsto \left(\color{blue}{1 \cdot \frac{y}{t}} - x \cdot \frac{y}{t}\right) + x \]
                          16. distribute-rgt-out--N/A

                            \[\leadsto \color{blue}{\frac{y}{t} \cdot \left(1 - x\right)} + x \]
                          17. accelerator-lowering-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)} \]
                          18. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{t}}, 1 - x, x\right) \]
                          19. --lowering--.f6472.6

                            \[\leadsto \mathsf{fma}\left(\frac{y}{t}, \color{blue}{1 - x}, x\right) \]
                        8. Simplified72.6%

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

                      Alternative 19: 52.8% accurate, 45.0× speedup?

                      \[\begin{array}{l} \\ 1 \end{array} \]
                      (FPCore (x y z t) :precision binary64 1.0)
                      double code(double x, double y, double z, double t) {
                      	return 1.0;
                      }
                      
                      real(8) function code(x, y, z, t)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          code = 1.0d0
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	return 1.0;
                      }
                      
                      def code(x, y, z, t):
                      	return 1.0
                      
                      function code(x, y, z, t)
                      	return 1.0
                      end
                      
                      function tmp = code(x, y, z, t)
                      	tmp = 1.0;
                      end
                      
                      code[x_, y_, z_, t_] := 1.0
                      
                      \begin{array}{l}
                      
                      \\
                      1
                      \end{array}
                      
                      Derivation
                      1. Initial program 88.2%

                        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around inf

                        \[\leadsto \color{blue}{1} \]
                      4. Step-by-step derivation
                        1. Simplified51.2%

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

                        Developer Target 1: 99.5% accurate, 0.7× speedup?

                        \[\begin{array}{l} \\ \frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1} \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
                        double code(double x, double y, double z, double t) {
                        	return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
                        }
                        
                        real(8) function code(x, y, z, t)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            code = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
                        }
                        
                        def code(x, y, z, t):
                        	return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
                        
                        function code(x, y, z, t)
                        	return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0))
                        end
                        
                        function tmp = code(x, y, z, t)
                        	tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
                        end
                        
                        code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
                        \end{array}
                        

                        Reproduce

                        ?
                        herbie shell --seed 2024198 
                        (FPCore (x y z t)
                          :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
                          :precision binary64
                        
                          :alt
                          (! :herbie-platform default (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1)))
                        
                          (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))