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

Percentage Accurate: 89.5% → 97.3%
Time: 11.1s
Alternatives: 14
Speedup: 0.3×

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 14 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.5% 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: 97.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
t_2 := x - z \cdot t\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+139}:\\
\;\;\;\;\frac{x + y \cdot \left(\frac{x}{y \cdot t\_2} - \frac{z}{t\_2}\right)}{x + 1}\\

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

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


\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))) < -4.00000000000000013e139

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + y \cdot \left(\frac{z}{t \cdot z - x} - \frac{x}{\color{blue}{\left(t \cdot z - x\right)} \cdot y}\right)}{x + 1} \]
      13. lower-*.f6499.9

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

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

    if -4.00000000000000013e139 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000003e263

    1. Initial program 98.9%

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

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

    1. Initial program 28.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
    7. Step-by-step derivation
      1. *-rgt-identityN/A

        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
      2. distribute-lft-inN/A

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

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

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

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

        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
      7. lower-fma.f6488.1

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

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

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

Alternative 2: 89.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 1.2:\\
\;\;\;\;\frac{x + \frac{x}{t\_3}}{x + 1}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\
\;\;\;\;\frac{y \cdot z}{t\_3 \cdot \left(-1 - x\right)}\\

\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))) < 2.0000000000000001e-61 or 2.00000000000000003e263 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

    1. Initial program 71.2%

      \[\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
    7. Step-by-step derivation
      1. *-rgt-identityN/A

        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
      2. distribute-lft-inN/A

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

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

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

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

        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
      7. lower-fma.f6481.5

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

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

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

    1. Initial program 99.9%

      \[\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. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{x - \frac{x}{\color{blue}{t \cdot z - x}}}{1 + x} \]
      5. lower-*.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. lower-+.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.19999999999999996 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000003e263

    1. Initial program 99.7%

      \[\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. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{x + 1} + \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\ t_2 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq 0.98:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 1.2:\\ \;\;\;\;1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\ \;\;\;\;\frac{y \cdot z}{\left(x - z \cdot t\right) \cdot \left(-1 - x\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (/ x (+ x 1.0)) (/ y (fma x t t))))
        (t_2 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
   (if (<= t_2 0.98)
     t_1
     (if (<= t_2 1.2)
       1.0
       (if (<= t_2 2e+263) (/ (* y z) (* (- x (* z t)) (- -1.0 x))) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / (x + 1.0)) + (y / fma(x, t, t));
	double t_2 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_2 <= 0.98) {
		tmp = t_1;
	} else if (t_2 <= 1.2) {
		tmp = 1.0;
	} else if (t_2 <= 2e+263) {
		tmp = (y * z) / ((x - (z * t)) * (-1.0 - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / fma(x, t, t)))
	t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
	tmp = 0.0
	if (t_2 <= 0.98)
		tmp = t_1;
	elseif (t_2 <= 1.2)
		tmp = 1.0;
	elseif (t_2 <= 2e+263)
		tmp = Float64(Float64(y * z) / Float64(Float64(x - Float64(z * t)) * Float64(-1.0 - x)));
	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[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.98], t$95$1, If[LessEqual[t$95$2, 1.2], 1.0, If[LessEqual[t$95$2, 2e+263], N[(N[(y * z), $MachinePrecision] / N[(N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 1.2:\\
\;\;\;\;1\\

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

\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))) < 0.97999999999999998 or 2.00000000000000003e263 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

    1. Initial program 73.3%

      \[\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
    7. Step-by-step derivation
      1. *-rgt-identityN/A

        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
      2. distribute-lft-inN/A

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

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

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

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

        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
      7. lower-fma.f6481.2

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

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

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

    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.4%

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

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

      1. Initial program 99.7%

        \[\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. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 89.1% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ t_2 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq 0.98:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 1.2:\\ \;\;\;\;1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\ \;\;\;\;\frac{y \cdot z}{\left(x - z \cdot t\right) \cdot \left(-1 - 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)))
            (t_2 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
       (if (<= t_2 0.98)
         t_1
         (if (<= t_2 1.2)
           1.0
           (if (<= t_2 2e+263) (/ (* y z) (* (- x (* z t)) (- -1.0 x))) t_1)))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (x + (y / t)) / (x + 1.0);
    	double t_2 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
    	double tmp;
    	if (t_2 <= 0.98) {
    		tmp = t_1;
    	} else if (t_2 <= 1.2) {
    		tmp = 1.0;
    	} else if (t_2 <= 2e+263) {
    		tmp = (y * z) / ((x - (z * t)) * (-1.0 - x));
    	} else {
    		tmp = t_1;
    	}
    	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) :: t_2
        real(8) :: tmp
        t_1 = (x + (y / t)) / (x + 1.0d0)
        t_2 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)
        if (t_2 <= 0.98d0) then
            tmp = t_1
        else if (t_2 <= 1.2d0) then
            tmp = 1.0d0
        else if (t_2 <= 2d+263) then
            tmp = (y * z) / ((x - (z * t)) * ((-1.0d0) - x))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = (x + (y / t)) / (x + 1.0);
    	double t_2 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
    	double tmp;
    	if (t_2 <= 0.98) {
    		tmp = t_1;
    	} else if (t_2 <= 1.2) {
    		tmp = 1.0;
    	} else if (t_2 <= 2e+263) {
    		tmp = (y * z) / ((x - (z * t)) * (-1.0 - x));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = (x + (y / t)) / (x + 1.0)
    	t_2 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)
    	tmp = 0
    	if t_2 <= 0.98:
    		tmp = t_1
    	elif t_2 <= 1.2:
    		tmp = 1.0
    	elif t_2 <= 2e+263:
    		tmp = (y * z) / ((x - (z * t)) * (-1.0 - 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))
    	t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
    	tmp = 0.0
    	if (t_2 <= 0.98)
    		tmp = t_1;
    	elseif (t_2 <= 1.2)
    		tmp = 1.0;
    	elseif (t_2 <= 2e+263)
    		tmp = Float64(Float64(y * z) / Float64(Float64(x - Float64(z * t)) * Float64(-1.0 - x)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = (x + (y / t)) / (x + 1.0);
    	t_2 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
    	tmp = 0.0;
    	if (t_2 <= 0.98)
    		tmp = t_1;
    	elseif (t_2 <= 1.2)
    		tmp = 1.0;
    	elseif (t_2 <= 2e+263)
    		tmp = (y * z) / ((x - (z * t)) * (-1.0 - x));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = 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]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.98], t$95$1, If[LessEqual[t$95$2, 1.2], 1.0, If[LessEqual[t$95$2, 2e+263], N[(N[(y * z), $MachinePrecision] / N[(N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
    t_2 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
    \mathbf{if}\;t\_2 \leq 0.98:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 1.2:\\
    \;\;\;\;1\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\
    \;\;\;\;\frac{y \cdot z}{\left(x - z \cdot t\right) \cdot \left(-1 - x\right)}\\
    
    \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))) < 0.97999999999999998 or 2.00000000000000003e263 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

      1. Initial program 73.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 \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]
      4. Step-by-step derivation
        1. lower-/.f6480.4

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

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

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

      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.4%

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

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

        1. Initial program 99.7%

          \[\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. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 82.9% 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+41}:\\ \;\;\;\;t\_1 + 1\\ \mathbf{elif}\;t\_2 \leq 0.02:\\ \;\;\;\;t\_1 + \mathsf{fma}\left(x, -x, x\right)\\ \mathbf{elif}\;t\_2 \leq 1.2:\\ \;\;\;\;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 (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
         (if (<= t_2 -2e+41)
           (+ t_1 1.0)
           (if (<= t_2 0.02) (+ t_1 (fma x (- x) x)) (if (<= t_2 1.2) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
      	double tmp;
      	if (t_2 <= -2e+41) {
      		tmp = t_1 + 1.0;
      	} else if (t_2 <= 0.02) {
      		tmp = t_1 + fma(x, -x, x);
      	} else if (t_2 <= 1.2) {
      		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(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
      	tmp = 0.0
      	if (t_2 <= -2e+41)
      		tmp = Float64(t_1 + 1.0);
      	elseif (t_2 <= 0.02)
      		tmp = Float64(t_1 + fma(x, Float64(-x), x));
      	elseif (t_2 <= 1.2)
      		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+41], N[(t$95$1 + 1.0), $MachinePrecision], If[LessEqual[t$95$2, 0.02], N[(t$95$1 + N[(x * (-x) + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1.2], 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
      \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+41}:\\
      \;\;\;\;t\_1 + 1\\
      
      \mathbf{elif}\;t\_2 \leq 0.02:\\
      \;\;\;\;t\_1 + \mathsf{fma}\left(x, -x, x\right)\\
      
      \mathbf{elif}\;t\_2 \leq 1.2:\\
      \;\;\;\;1\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \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))) < -2.00000000000000001e41

        1. Initial program 75.7%

          \[\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
        7. Step-by-step derivation
          1. *-rgt-identityN/A

            \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
          2. distribute-lft-inN/A

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

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

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

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

            \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
          7. lower-fma.f6475.8

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

          \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
        9. Taylor expanded in x around inf

          \[\leadsto \color{blue}{1} + \frac{y}{\mathsf{fma}\left(x, t, t\right)} \]
        10. Step-by-step derivation
          1. Simplified75.8%

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

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

          1. Initial program 96.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
          7. Step-by-step derivation
            1. *-rgt-identityN/A

              \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
            2. distribute-lft-inN/A

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

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

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

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

              \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
            7. lower-fma.f6480.0

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) + \frac{y}{\mathsf{fma}\left(x, t, t\right)} \]
            6. lower-neg.f6478.3

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{-x}, x\right) + \frac{y}{\mathsf{fma}\left(x, t, t\right)} \]
          11. Simplified78.3%

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

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

          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.8%

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

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

            1. Initial program 53.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
            7. Step-by-step derivation
              1. *-rgt-identityN/A

                \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
              2. distribute-lft-inN/A

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

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

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

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

                \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
              7. lower-fma.f6477.6

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

              \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
            9. Taylor expanded in y around inf

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

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

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

                \[\leadsto \frac{y}{\color{blue}{x \cdot t} + t} \]
              4. lower-fma.f6464.3

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

              \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
          5. Recombined 4 regimes into one program.
          6. Final simplification83.9%

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

          Alternative 6: 82.7% 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+41}:\\ \;\;\;\;t\_1 + 1\\ \mathbf{elif}\;t\_2 \leq 0.02:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\ \mathbf{elif}\;t\_2 \leq 1.2:\\ \;\;\;\;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 (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
             (if (<= t_2 -2e+41)
               (+ t_1 1.0)
               (if (<= t_2 0.02) (fma (/ y t) (- 1.0 x) x) (if (<= t_2 1.2) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
          	double tmp;
          	if (t_2 <= -2e+41) {
          		tmp = t_1 + 1.0;
          	} else if (t_2 <= 0.02) {
          		tmp = fma((y / t), (1.0 - x), x);
          	} else if (t_2 <= 1.2) {
          		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(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
          	tmp = 0.0
          	if (t_2 <= -2e+41)
          		tmp = Float64(t_1 + 1.0);
          	elseif (t_2 <= 0.02)
          		tmp = fma(Float64(y / t), Float64(1.0 - x), x);
          	elseif (t_2 <= 1.2)
          		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+41], N[(t$95$1 + 1.0), $MachinePrecision], If[LessEqual[t$95$2, 0.02], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 1.2], 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
          \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+41}:\\
          \;\;\;\;t\_1 + 1\\
          
          \mathbf{elif}\;t\_2 \leq 0.02:\\
          \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
          
          \mathbf{elif}\;t\_2 \leq 1.2:\\
          \;\;\;\;1\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \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))) < -2.00000000000000001e41

            1. Initial program 75.7%

              \[\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
            7. Step-by-step derivation
              1. *-rgt-identityN/A

                \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
              2. distribute-lft-inN/A

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

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

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

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

                \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
              7. lower-fma.f6475.8

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

              \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
            9. Taylor expanded in x around inf

              \[\leadsto \color{blue}{1} + \frac{y}{\mathsf{fma}\left(x, t, t\right)} \]
            10. Step-by-step derivation
              1. Simplified75.8%

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

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

              1. Initial program 96.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
              7. Step-by-step derivation
                1. *-rgt-identityN/A

                  \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                2. distribute-lft-inN/A

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

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

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

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

                  \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                7. lower-fma.f6480.0

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(t, \frac{x}{x + 1}, \frac{y}{\color{blue}{x + 1}}\right)}{t} \]
                10. lower-+.f6479.9

                  \[\leadsto \frac{\mathsf{fma}\left(t, \frac{x}{x + 1}, \frac{y}{\color{blue}{x + 1}}\right)}{t} \]
              11. Simplified79.9%

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

                \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{t}\right) + \frac{y}{t}} \]
              13. 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. associate-/l*N/A

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

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

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

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

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

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

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

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

              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.8%

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

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

                1. Initial program 53.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
                7. Step-by-step derivation
                  1. *-rgt-identityN/A

                    \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                  2. distribute-lft-inN/A

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

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

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

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

                    \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                  7. lower-fma.f6477.6

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

                  \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                9. Taylor expanded in y around inf

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

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

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

                    \[\leadsto \frac{y}{\color{blue}{x \cdot t} + t} \]
                  4. lower-fma.f6464.3

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

                  \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
              5. Recombined 4 regimes into one program.
              6. Final simplification83.5%

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

              Alternative 7: 75.9% 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\ \;\;\;\;t\_1 + 1\\ \mathbf{elif}\;t\_2 \leq 0.98:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 1.2:\\ \;\;\;\;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 (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
                 (if (<= t_2 -1e+19)
                   (+ t_1 1.0)
                   (if (<= t_2 0.98) (/ x (+ x 1.0)) (if (<= t_2 1.2) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
              	double tmp;
              	if (t_2 <= -1e+19) {
              		tmp = t_1 + 1.0;
              	} else if (t_2 <= 0.98) {
              		tmp = x / (x + 1.0);
              	} else if (t_2 <= 1.2) {
              		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(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
              	tmp = 0.0
              	if (t_2 <= -1e+19)
              		tmp = Float64(t_1 + 1.0);
              	elseif (t_2 <= 0.98)
              		tmp = Float64(x / Float64(x + 1.0));
              	elseif (t_2 <= 1.2)
              		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+19], N[(t$95$1 + 1.0), $MachinePrecision], If[LessEqual[t$95$2, 0.98], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1.2], 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
              \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\
              \;\;\;\;t\_1 + 1\\
              
              \mathbf{elif}\;t\_2 \leq 0.98:\\
              \;\;\;\;\frac{x}{x + 1}\\
              
              \mathbf{elif}\;t\_2 \leq 1.2:\\
              \;\;\;\;1\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \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))) < -1e19

                1. Initial program 78.3%

                  \[\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
                7. Step-by-step derivation
                  1. *-rgt-identityN/A

                    \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                  2. distribute-lft-inN/A

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

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

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

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

                    \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                  7. lower-fma.f6475.8

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

                  \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                9. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{1} + \frac{y}{\mathsf{fma}\left(x, t, t\right)} \]
                10. Step-by-step derivation
                  1. Simplified75.8%

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

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

                  1. Initial program 96.4%

                    \[\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. lower-/.f64N/A

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

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

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

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

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

                  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.4%

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

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

                    1. Initial program 53.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
                    7. Step-by-step derivation
                      1. *-rgt-identityN/A

                        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                      2. distribute-lft-inN/A

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

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

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

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

                        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                      7. lower-fma.f6477.6

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

                      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                    9. Taylor expanded in y around inf

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

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

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

                        \[\leadsto \frac{y}{\color{blue}{x \cdot t} + t} \]
                      4. lower-fma.f6464.3

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

                      \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                  5. Recombined 4 regimes into one program.
                  6. Final simplification78.6%

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

                  Alternative 8: 76.0% 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0.98:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 1.2:\\ \;\;\;\;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 (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
                     (if (<= t_2 -5e-12)
                       t_1
                       (if (<= t_2 0.98) (/ x (+ x 1.0)) (if (<= t_2 1.2) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                  	double tmp;
                  	if (t_2 <= -5e-12) {
                  		tmp = t_1;
                  	} else if (t_2 <= 0.98) {
                  		tmp = x / (x + 1.0);
                  	} else if (t_2 <= 1.2) {
                  		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(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
                  	tmp = 0.0
                  	if (t_2 <= -5e-12)
                  		tmp = t_1;
                  	elseif (t_2 <= 0.98)
                  		tmp = Float64(x / Float64(x + 1.0));
                  	elseif (t_2 <= 1.2)
                  		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-12], t$95$1, If[LessEqual[t$95$2, 0.98], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1.2], 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
                  \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-12}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t\_2 \leq 0.98:\\
                  \;\;\;\;\frac{x}{x + 1}\\
                  
                  \mathbf{elif}\;t\_2 \leq 1.2:\\
                  \;\;\;\;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))) < -4.9999999999999997e-12 or 1.19999999999999996 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                    1. Initial program 65.4%

                      \[\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
                    7. Step-by-step derivation
                      1. *-rgt-identityN/A

                        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                      2. distribute-lft-inN/A

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

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

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

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

                        \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                      7. lower-fma.f6476.8

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

                      \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                    9. Taylor expanded in y around inf

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

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

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

                        \[\leadsto \frac{y}{\color{blue}{x \cdot t} + t} \]
                      4. lower-fma.f6464.6

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

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

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

                    1. Initial program 96.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}{\frac{x}{1 + x}} \]
                    4. Step-by-step derivation
                      1. lower-/.f64N/A

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

                        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                      3. lower-+.f6455.3

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

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

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

                    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.4%

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

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

                    Alternative 9: 74.0% accurate, 0.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 0.98:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;t\_1 \leq 1.2:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
                       (if (<= t_1 -5e-12)
                         (/ y t)
                         (if (<= t_1 0.98) (/ x (+ x 1.0)) (if (<= t_1 1.2) 1.0 (/ y t))))))
                    double code(double x, double y, double z, double t) {
                    	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                    	double tmp;
                    	if (t_1 <= -5e-12) {
                    		tmp = y / t;
                    	} else if (t_1 <= 0.98) {
                    		tmp = x / (x + 1.0);
                    	} else if (t_1 <= 1.2) {
                    		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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)
                        if (t_1 <= (-5d-12)) then
                            tmp = y / t
                        else if (t_1 <= 0.98d0) then
                            tmp = x / (x + 1.0d0)
                        else if (t_1 <= 1.2d0) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                    	double tmp;
                    	if (t_1 <= -5e-12) {
                    		tmp = y / t;
                    	} else if (t_1 <= 0.98) {
                    		tmp = x / (x + 1.0);
                    	} else if (t_1 <= 1.2) {
                    		tmp = 1.0;
                    	} else {
                    		tmp = y / t;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)
                    	tmp = 0
                    	if t_1 <= -5e-12:
                    		tmp = y / t
                    	elif t_1 <= 0.98:
                    		tmp = x / (x + 1.0)
                    	elif t_1 <= 1.2:
                    		tmp = 1.0
                    	else:
                    		tmp = y / t
                    	return tmp
                    
                    function code(x, y, z, t)
                    	t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
                    	tmp = 0.0
                    	if (t_1 <= -5e-12)
                    		tmp = Float64(y / t);
                    	elseif (t_1 <= 0.98)
                    		tmp = Float64(x / Float64(x + 1.0));
                    	elseif (t_1 <= 1.2)
                    		tmp = 1.0;
                    	else
                    		tmp = Float64(y / t);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                    	tmp = 0.0;
                    	if (t_1 <= -5e-12)
                    		tmp = y / t;
                    	elseif (t_1 <= 0.98)
                    		tmp = x / (x + 1.0);
                    	elseif (t_1 <= 1.2)
                    		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-12], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.98], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.2], 1.0, N[(y / t), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-12}:\\
                    \;\;\;\;\frac{y}{t}\\
                    
                    \mathbf{elif}\;t\_1 \leq 0.98:\\
                    \;\;\;\;\frac{x}{x + 1}\\
                    
                    \mathbf{elif}\;t\_1 \leq 1.2:\\
                    \;\;\;\;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))) < -4.9999999999999997e-12 or 1.19999999999999996 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                      1. Initial program 65.4%

                        \[\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. lower-/.f6458.2

                          \[\leadsto \color{blue}{\frac{y}{t}} \]
                      5. Simplified58.2%

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

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

                      1. Initial program 96.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}{\frac{x}{1 + x}} \]
                      4. Step-by-step derivation
                        1. lower-/.f64N/A

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

                          \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                        3. lower-+.f6455.3

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

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

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

                      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.4%

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

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

                      Alternative 10: 73.9% accurate, 0.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 0.02:\\ \;\;\;\;x - x \cdot x\\ \mathbf{elif}\;t\_1 \leq 1.2:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \end{array} \]
                      (FPCore (x y z t)
                       :precision binary64
                       (let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
                         (if (<= t_1 -5e-12)
                           (/ y t)
                           (if (<= t_1 0.02) (- x (* x x)) (if (<= t_1 1.2) 1.0 (/ y t))))))
                      double code(double x, double y, double z, double t) {
                      	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                      	double tmp;
                      	if (t_1 <= -5e-12) {
                      		tmp = y / t;
                      	} else if (t_1 <= 0.02) {
                      		tmp = x - (x * x);
                      	} else if (t_1 <= 1.2) {
                      		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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)
                          if (t_1 <= (-5d-12)) then
                              tmp = y / t
                          else if (t_1 <= 0.02d0) then
                              tmp = x - (x * x)
                          else if (t_1 <= 1.2d0) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                      	double tmp;
                      	if (t_1 <= -5e-12) {
                      		tmp = y / t;
                      	} else if (t_1 <= 0.02) {
                      		tmp = x - (x * x);
                      	} else if (t_1 <= 1.2) {
                      		tmp = 1.0;
                      	} else {
                      		tmp = y / t;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t):
                      	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)
                      	tmp = 0
                      	if t_1 <= -5e-12:
                      		tmp = y / t
                      	elif t_1 <= 0.02:
                      		tmp = x - (x * x)
                      	elif t_1 <= 1.2:
                      		tmp = 1.0
                      	else:
                      		tmp = y / t
                      	return tmp
                      
                      function code(x, y, z, t)
                      	t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
                      	tmp = 0.0
                      	if (t_1 <= -5e-12)
                      		tmp = Float64(y / t);
                      	elseif (t_1 <= 0.02)
                      		tmp = Float64(x - Float64(x * x));
                      	elseif (t_1 <= 1.2)
                      		tmp = 1.0;
                      	else
                      		tmp = Float64(y / t);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t)
                      	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                      	tmp = 0.0;
                      	if (t_1 <= -5e-12)
                      		tmp = y / t;
                      	elseif (t_1 <= 0.02)
                      		tmp = x - (x * x);
                      	elseif (t_1 <= 1.2)
                      		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-12], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.02], N[(x - N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.2], 1.0, N[(y / t), $MachinePrecision]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
                      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-12}:\\
                      \;\;\;\;\frac{y}{t}\\
                      
                      \mathbf{elif}\;t\_1 \leq 0.02:\\
                      \;\;\;\;x - x \cdot x\\
                      
                      \mathbf{elif}\;t\_1 \leq 1.2:\\
                      \;\;\;\;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))) < -4.9999999999999997e-12 or 1.19999999999999996 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                        1. Initial program 65.4%

                          \[\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. lower-/.f6458.2

                            \[\leadsto \color{blue}{\frac{y}{t}} \]
                        5. Simplified58.2%

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

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

                        1. Initial program 96.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}{\frac{x}{1 + x}} \]
                        4. Step-by-step derivation
                          1. lower-/.f64N/A

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

                            \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                          3. lower-+.f6454.4

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

                          \[\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. lower--.f64N/A

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

                            \[\leadsto x - \color{blue}{x \cdot x} \]
                          9. lower-*.f6453.3

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

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

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

                        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.8%

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

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

                        Alternative 11: 96.2% accurate, 0.3× speedup?

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

                          1. Initial program 45.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
                          7. Step-by-step derivation
                            1. *-rgt-identityN/A

                              \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                            2. distribute-lft-inN/A

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

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

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

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

                              \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                            7. lower-fma.f6485.8

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

                            \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                          9. Taylor expanded in x around inf

                            \[\leadsto \color{blue}{1} + \frac{y}{\mathsf{fma}\left(x, t, t\right)} \]
                          10. Step-by-step derivation
                            1. Simplified85.8%

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

                            if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000003e263

                            1. Initial program 99.0%

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

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

                            1. Initial program 28.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}{\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{t + t \cdot x}} \]
                            7. Step-by-step derivation
                              1. *-rgt-identityN/A

                                \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{t \cdot 1} + t \cdot x} \]
                              2. distribute-lft-inN/A

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

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

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

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

                                \[\leadsto \frac{x}{x + 1} + \frac{y}{\color{blue}{x \cdot t + t}} \]
                              7. lower-fma.f6488.1

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

                              \[\leadsto \frac{x}{x + 1} + \color{blue}{\frac{y}{\mathsf{fma}\left(x, t, t\right)}} \]
                          11. Recombined 3 regimes into one program.
                          12. Final simplification96.8%

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

                          Alternative 12: 63.1% accurate, 0.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 0.02:\\ \;\;\;\;x - x \cdot x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                          (FPCore (x y z t)
                           :precision binary64
                           (if (<= (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0)) 0.02)
                             (- x (* x x))
                             1.0))
                          double code(double x, double y, double z, double t) {
                          	double tmp;
                          	if (((x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.02) {
                          		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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)) <= 0.02d0) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.02) {
                          		tmp = x - (x * x);
                          	} else {
                          		tmp = 1.0;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t):
                          	tmp = 0
                          	if ((x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.02:
                          		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(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) <= 0.02)
                          		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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.02)
                          		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[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.02], N[(x - N[(x * x), $MachinePrecision]), $MachinePrecision], 1.0]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 0.02:\\
                          \;\;\;\;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))) < 0.0200000000000000004

                            1. Initial program 89.2%

                              \[\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. lower-/.f64N/A

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

                                \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
                              3. lower-+.f6436.7

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

                              \[\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. lower--.f64N/A

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

                                \[\leadsto x - \color{blue}{x \cdot x} \]
                              9. lower-*.f6431.7

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

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

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

                            1. Initial program 85.7%

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

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

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

                            Alternative 13: 81.8% accurate, 1.1× speedup?

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

                              1. Initial program 82.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 \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]
                              4. Step-by-step derivation
                                1. lower-/.f6491.1

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

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

                              if -1.35000000000000003e-128 < t < 0.37

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(y\right), \frac{z}{x \cdot x + \color{blue}{x}}, 1\right) \]
                                11. lower-fma.f6481.3

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

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

                            Alternative 14: 54.2% 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 86.9%

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

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

                              Developer Target 1: 99.4% 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 2024215 
                              (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)))