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

Percentage Accurate: 88.6% → 97.6%
Time: 13.7s
Alternatives: 16
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 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: 88.6% 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.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 0.0001:\\
\;\;\;\;\frac{x + \frac{y - \frac{x}{z}}{t}}{x + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e5 or 1.00000000000000005e-4 < (/.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 91.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 \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{\color{blue}{t \cdot z - x}}}{x + 1} \]
      4. *-lowering-*.f6485.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x - \frac{\color{blue}{\frac{x}{z} - y}}{t}}{x + 1} \]
        12. /-lowering-/.f6499.1

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

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

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

      1. Initial program 0.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
    11. Recombined 3 regimes into one program.
    12. Final simplification98.6%

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

    Alternative 2: 88.5% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ t_2 := z \cdot t - x\\ t_3 := \frac{x + \frac{y \cdot z - x}{t\_2}}{x + 1}\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+195}:\\ \;\;\;\;\frac{x - y \cdot \frac{z}{x}}{x + 1}\\ \mathbf{elif}\;t\_3 \leq 0.0001:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_3 \leq 2:\\ \;\;\;\;1\\ \mathbf{elif}\;t\_3 \leq 10^{+285}:\\ \;\;\;\;\frac{y \cdot z}{t\_2 \cdot \left(x + 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)))
            (t_2 (- (* z t) x))
            (t_3 (/ (+ x (/ (- (* y z) x) t_2)) (+ x 1.0))))
       (if (<= t_3 -1e+195)
         (/ (- x (* y (/ z x))) (+ x 1.0))
         (if (<= t_3 0.0001)
           t_1
           (if (<= t_3 2.0)
             1.0
             (if (<= t_3 1e+285) (/ (* y z) (* t_2 (+ 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 t_2 = (z * t) - x;
    	double t_3 = (x + (((y * z) - x) / t_2)) / (x + 1.0);
    	double tmp;
    	if (t_3 <= -1e+195) {
    		tmp = (x - (y * (z / x))) / (x + 1.0);
    	} else if (t_3 <= 0.0001) {
    		tmp = t_1;
    	} else if (t_3 <= 2.0) {
    		tmp = 1.0;
    	} else if (t_3 <= 1e+285) {
    		tmp = (y * z) / (t_2 * (x + 1.0));
    	} 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) :: t_3
        real(8) :: tmp
        t_1 = (x + (y / t)) / (x + 1.0d0)
        t_2 = (z * t) - x
        t_3 = (x + (((y * z) - x) / t_2)) / (x + 1.0d0)
        if (t_3 <= (-1d+195)) then
            tmp = (x - (y * (z / x))) / (x + 1.0d0)
        else if (t_3 <= 0.0001d0) then
            tmp = t_1
        else if (t_3 <= 2.0d0) then
            tmp = 1.0d0
        else if (t_3 <= 1d+285) then
            tmp = (y * z) / (t_2 * (x + 1.0d0))
        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 = (z * t) - x;
    	double t_3 = (x + (((y * z) - x) / t_2)) / (x + 1.0);
    	double tmp;
    	if (t_3 <= -1e+195) {
    		tmp = (x - (y * (z / x))) / (x + 1.0);
    	} else if (t_3 <= 0.0001) {
    		tmp = t_1;
    	} else if (t_3 <= 2.0) {
    		tmp = 1.0;
    	} else if (t_3 <= 1e+285) {
    		tmp = (y * z) / (t_2 * (x + 1.0));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = (x + (y / t)) / (x + 1.0)
    	t_2 = (z * t) - x
    	t_3 = (x + (((y * z) - x) / t_2)) / (x + 1.0)
    	tmp = 0
    	if t_3 <= -1e+195:
    		tmp = (x - (y * (z / x))) / (x + 1.0)
    	elif t_3 <= 0.0001:
    		tmp = t_1
    	elif t_3 <= 2.0:
    		tmp = 1.0
    	elif t_3 <= 1e+285:
    		tmp = (y * z) / (t_2 * (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))
    	t_2 = Float64(Float64(z * t) - x)
    	t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_2)) / Float64(x + 1.0))
    	tmp = 0.0
    	if (t_3 <= -1e+195)
    		tmp = Float64(Float64(x - Float64(y * Float64(z / x))) / Float64(x + 1.0));
    	elseif (t_3 <= 0.0001)
    		tmp = t_1;
    	elseif (t_3 <= 2.0)
    		tmp = 1.0;
    	elseif (t_3 <= 1e+285)
    		tmp = Float64(Float64(y * z) / Float64(t_2 * Float64(x + 1.0)));
    	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 = (z * t) - x;
    	t_3 = (x + (((y * z) - x) / t_2)) / (x + 1.0);
    	tmp = 0.0;
    	if (t_3 <= -1e+195)
    		tmp = (x - (y * (z / x))) / (x + 1.0);
    	elseif (t_3 <= 0.0001)
    		tmp = t_1;
    	elseif (t_3 <= 2.0)
    		tmp = 1.0;
    	elseif (t_3 <= 1e+285)
    		tmp = (y * z) / (t_2 * (x + 1.0));
    	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[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+195], N[(N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0001], t$95$1, If[LessEqual[t$95$3, 2.0], 1.0, If[LessEqual[t$95$3, 1e+285], N[(N[(y * z), $MachinePrecision] / N[(t$95$2 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
    t_2 := z \cdot t - x\\
    t_3 := \frac{x + \frac{y \cdot z - x}{t\_2}}{x + 1}\\
    \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+195}:\\
    \;\;\;\;\frac{x - y \cdot \frac{z}{x}}{x + 1}\\
    
    \mathbf{elif}\;t\_3 \leq 0.0001:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_3 \leq 2:\\
    \;\;\;\;1\\
    
    \mathbf{elif}\;t\_3 \leq 10^{+285}:\\
    \;\;\;\;\frac{y \cdot z}{t\_2 \cdot \left(x + 1\right)}\\
    
    \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))) < -9.99999999999999977e194

      1. Initial program 48.4%

        \[\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}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

          \[\leadsto \frac{x + \frac{y \cdot z}{\color{blue}{t \cdot z - x}}}{x + 1} \]
        4. *-lowering-*.f6448.4

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

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

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

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

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

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

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

          \[\leadsto \frac{x - \color{blue}{y \cdot \frac{z}{x}}}{x + 1} \]
        6. /-lowering-/.f6483.3

          \[\leadsto \frac{x - y \cdot \color{blue}{\frac{z}{x}}}{x + 1} \]
      8. Simplified83.3%

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

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

      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 z around inf

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

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

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

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

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

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

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

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

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

      1. Initial program 100.0%

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

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

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

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

        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 88.3% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ t_2 := z \cdot t - x\\ t_3 := \frac{x + \frac{y \cdot z - x}{t\_2}}{x + 1}\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+195}:\\ \;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\ \mathbf{elif}\;t\_3 \leq 0.0001:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_3 \leq 2:\\ \;\;\;\;1\\ \mathbf{elif}\;t\_3 \leq 10^{+285}:\\ \;\;\;\;\frac{y \cdot z}{t\_2 \cdot \left(x + 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)))
              (t_2 (- (* z t) x))
              (t_3 (/ (+ x (/ (- (* y z) x) t_2)) (+ x 1.0))))
         (if (<= t_3 -1e+195)
           (fma (- 0.0 y) (/ z (fma x x x)) 1.0)
           (if (<= t_3 0.0001)
             t_1
             (if (<= t_3 2.0)
               1.0
               (if (<= t_3 1e+285) (/ (* y z) (* t_2 (+ 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 t_2 = (z * t) - x;
      	double t_3 = (x + (((y * z) - x) / t_2)) / (x + 1.0);
      	double tmp;
      	if (t_3 <= -1e+195) {
      		tmp = fma((0.0 - y), (z / fma(x, x, x)), 1.0);
      	} else if (t_3 <= 0.0001) {
      		tmp = t_1;
      	} else if (t_3 <= 2.0) {
      		tmp = 1.0;
      	} else if (t_3 <= 1e+285) {
      		tmp = (y * z) / (t_2 * (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))
      	t_2 = Float64(Float64(z * t) - x)
      	t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_2)) / Float64(x + 1.0))
      	tmp = 0.0
      	if (t_3 <= -1e+195)
      		tmp = fma(Float64(0.0 - y), Float64(z / fma(x, x, x)), 1.0);
      	elseif (t_3 <= 0.0001)
      		tmp = t_1;
      	elseif (t_3 <= 2.0)
      		tmp = 1.0;
      	elseif (t_3 <= 1e+285)
      		tmp = Float64(Float64(y * z) / Float64(t_2 * Float64(x + 1.0)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+195], N[(N[(0.0 - y), $MachinePrecision] * N[(z / N[(x * x + x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[t$95$3, 0.0001], t$95$1, If[LessEqual[t$95$3, 2.0], 1.0, If[LessEqual[t$95$3, 1e+285], N[(N[(y * z), $MachinePrecision] / N[(t$95$2 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
      t_2 := z \cdot t - x\\
      t_3 := \frac{x + \frac{y \cdot z - x}{t\_2}}{x + 1}\\
      \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+195}:\\
      \;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
      
      \mathbf{elif}\;t\_3 \leq 0.0001:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_3 \leq 2:\\
      \;\;\;\;1\\
      
      \mathbf{elif}\;t\_3 \leq 10^{+285}:\\
      \;\;\;\;\frac{y \cdot z}{t\_2 \cdot \left(x + 1\right)}\\
      
      \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))) < -9.99999999999999977e194

        1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(0 - y, \frac{z}{x \cdot x + \color{blue}{x}}, 1\right) \]
          12. accelerator-lowering-fma.f6483.0

            \[\leadsto \mathsf{fma}\left(0 - y, \frac{z}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}}, 1\right) \]
        11. Simplified83.0%

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

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

        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 z around inf

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

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

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

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

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

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

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

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

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

        1. Initial program 100.0%

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

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

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

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

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 97.3% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \mathsf{fma}\left(y, \frac{z}{t\_1 \cdot \left(x + 1\right)}, 1\right)\\ t_3 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\ \mathbf{if}\;t\_3 \leq -100000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 0.0001:\\ \;\;\;\;x + \frac{y - \frac{x}{z}}{t}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (- (* z t) x))
                (t_2 (fma y (/ z (* t_1 (+ x 1.0))) 1.0))
                (t_3 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
           (if (<= t_3 -100000.0)
             t_2
             (if (<= t_3 0.0001)
               (+ x (/ (- y (/ x z)) t))
               (if (<= t_3 INFINITY) t_2 (/ (+ x (/ y t)) (+ x 1.0)))))))
        double code(double x, double y, double z, double t) {
        	double t_1 = (z * t) - x;
        	double t_2 = fma(y, (z / (t_1 * (x + 1.0))), 1.0);
        	double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
        	double tmp;
        	if (t_3 <= -100000.0) {
        		tmp = t_2;
        	} else if (t_3 <= 0.0001) {
        		tmp = x + ((y - (x / z)) / t);
        	} else if (t_3 <= ((double) INFINITY)) {
        		tmp = t_2;
        	} else {
        		tmp = (x + (y / t)) / (x + 1.0);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	t_1 = Float64(Float64(z * t) - x)
        	t_2 = fma(y, Float64(z / Float64(t_1 * Float64(x + 1.0))), 1.0)
        	t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0))
        	tmp = 0.0
        	if (t_3 <= -100000.0)
        		tmp = t_2;
        	elseif (t_3 <= 0.0001)
        		tmp = Float64(x + Float64(Float64(y - Float64(x / z)) / t));
        	elseif (t_3 <= Inf)
        		tmp = t_2;
        	else
        		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(t$95$1 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -100000.0], t$95$2, If[LessEqual[t$95$3, 0.0001], N[(x + N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := z \cdot t - x\\
        t_2 := \mathsf{fma}\left(y, \frac{z}{t\_1 \cdot \left(x + 1\right)}, 1\right)\\
        t_3 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
        \mathbf{if}\;t\_3 \leq -100000:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t\_3 \leq 0.0001:\\
        \;\;\;\;x + \frac{y - \frac{x}{z}}{t}\\
        
        \mathbf{elif}\;t\_3 \leq \infty:\\
        \;\;\;\;t\_2\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e5 or 1.00000000000000005e-4 < (/.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 91.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 \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

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

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

              \[\leadsto \frac{x + \frac{y \cdot z}{\color{blue}{t \cdot z - x}}}{x + 1} \]
            4. *-lowering-*.f6485.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x - \frac{\color{blue}{\frac{x}{z} - y}}{t}}{x + 1} \]
              12. /-lowering-/.f6499.1

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

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

              \[\leadsto \frac{x - \frac{\frac{x}{z} - y}{t}}{\color{blue}{1}} \]
            7. Step-by-step derivation
              1. Simplified96.7%

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

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

              1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 94.9% accurate, 0.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ t_2 := z \cdot t - x\\ t_3 := \mathsf{fma}\left(y, \frac{z}{t\_2 \cdot \left(x + 1\right)}, 1\right)\\ t_4 := \frac{x + \frac{y \cdot z - x}{t\_2}}{x + 1}\\ \mathbf{if}\;t\_4 \leq -100000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq 0.0001:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_3\\ \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 (- (* z t) x))
                    (t_3 (fma y (/ z (* t_2 (+ x 1.0))) 1.0))
                    (t_4 (/ (+ x (/ (- (* y z) x) t_2)) (+ x 1.0))))
               (if (<= t_4 -100000.0)
                 t_3
                 (if (<= t_4 0.0001) t_1 (if (<= t_4 INFINITY) t_3 t_1)))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (x + (y / t)) / (x + 1.0);
            	double t_2 = (z * t) - x;
            	double t_3 = fma(y, (z / (t_2 * (x + 1.0))), 1.0);
            	double t_4 = (x + (((y * z) - x) / t_2)) / (x + 1.0);
            	double tmp;
            	if (t_4 <= -100000.0) {
            		tmp = t_3;
            	} else if (t_4 <= 0.0001) {
            		tmp = t_1;
            	} else if (t_4 <= ((double) INFINITY)) {
            		tmp = t_3;
            	} 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(z * t) - x)
            	t_3 = fma(y, Float64(z / Float64(t_2 * Float64(x + 1.0))), 1.0)
            	t_4 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_2)) / Float64(x + 1.0))
            	tmp = 0.0
            	if (t_4 <= -100000.0)
            		tmp = t_3;
            	elseif (t_4 <= 0.0001)
            		tmp = t_1;
            	elseif (t_4 <= Inf)
            		tmp = t_3;
            	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]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(z / N[(t$95$2 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -100000.0], t$95$3, If[LessEqual[t$95$4, 0.0001], t$95$1, If[LessEqual[t$95$4, Infinity], t$95$3, t$95$1]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
            t_2 := z \cdot t - x\\
            t_3 := \mathsf{fma}\left(y, \frac{z}{t\_2 \cdot \left(x + 1\right)}, 1\right)\\
            t_4 := \frac{x + \frac{y \cdot z - x}{t\_2}}{x + 1}\\
            \mathbf{if}\;t\_4 \leq -100000:\\
            \;\;\;\;t\_3\\
            
            \mathbf{elif}\;t\_4 \leq 0.0001:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_4 \leq \infty:\\
            \;\;\;\;t\_3\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_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))) < -1e5 or 1.00000000000000005e-4 < (/.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 91.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 \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

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

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

                  \[\leadsto \frac{x + \frac{y \cdot z}{\color{blue}{t \cdot z - x}}}{x + 1} \]
                4. *-lowering-*.f6485.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 77.1%

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
              11. Recombined 2 regimes into one program.
              12. Final simplification96.5%

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

              Alternative 6: 84.8% 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{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+195}:\\ \;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 1.002:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;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 (/ (+ x (/ y t)) (+ x 1.0))))
                 (if (<= t_1 -1e+195)
                   (fma (- 0.0 y) (/ z (fma x x x)) 1.0)
                   (if (<= t_1 0.0001) t_2 (if (<= t_1 1.002) 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 = (x + (y / t)) / (x + 1.0);
              	double tmp;
              	if (t_1 <= -1e+195) {
              		tmp = fma((0.0 - y), (z / fma(x, x, x)), 1.0);
              	} else if (t_1 <= 0.0001) {
              		tmp = t_2;
              	} else if (t_1 <= 1.002) {
              		tmp = 1.0;
              	} else {
              		tmp = 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(Float64(x + Float64(y / t)) / Float64(x + 1.0))
              	tmp = 0.0
              	if (t_1 <= -1e+195)
              		tmp = fma(Float64(0.0 - y), Float64(z / fma(x, x, x)), 1.0);
              	elseif (t_1 <= 0.0001)
              		tmp = t_2;
              	elseif (t_1 <= 1.002)
              		tmp = 1.0;
              	else
              		tmp = 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[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+195], N[(N[(0.0 - y), $MachinePrecision] * N[(z / N[(x * x + x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], t$95$2, If[LessEqual[t$95$1, 1.002], 1.0, t$95$2]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
              t_2 := \frac{x + \frac{y}{t}}{x + 1}\\
              \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+195}:\\
              \;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
              
              \mathbf{elif}\;t\_1 \leq 0.0001:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq 1.002:\\
              \;\;\;\;1\\
              
              \mathbf{else}:\\
              \;\;\;\;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))) < -9.99999999999999977e194

                1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(0 - y, \frac{z}{x \cdot x + \color{blue}{x}}, 1\right) \]
                  12. accelerator-lowering-fma.f6483.0

                    \[\leadsto \mathsf{fma}\left(0 - y, \frac{z}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}}, 1\right) \]
                11. Simplified83.0%

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

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

                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 \color{blue}{\frac{x + \frac{y}{t}}{1 + x}} \]
                4. Step-by-step derivation
                  1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

                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. Simplified99.0%

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

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

                Alternative 7: 81.1% 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 -2 \cdot 10^{+75}:\\ \;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 50000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1}\\ \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 -2e+75)
                     (fma (- 0.0 y) (/ z (fma x x x)) 1.0)
                     (if (<= t_1 0.0001)
                       (+ x (/ y t))
                       (if (<= t_1 50000.0) 1.0 (/ (/ y t) (+ x 1.0)))))))
                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 <= -2e+75) {
                		tmp = fma((0.0 - y), (z / fma(x, x, x)), 1.0);
                	} else if (t_1 <= 0.0001) {
                		tmp = x + (y / t);
                	} else if (t_1 <= 50000.0) {
                		tmp = 1.0;
                	} else {
                		tmp = (y / t) / (x + 1.0);
                	}
                	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 <= -2e+75)
                		tmp = fma(Float64(0.0 - y), Float64(z / fma(x, x, x)), 1.0);
                	elseif (t_1 <= 0.0001)
                		tmp = Float64(x + Float64(y / t));
                	elseif (t_1 <= 50000.0)
                		tmp = 1.0;
                	else
                		tmp = Float64(Float64(y / t) / Float64(x + 1.0));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(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, -2e+75], N[(N[(0.0 - y), $MachinePrecision] * N[(z / N[(x * x + x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000.0], 1.0, N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $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 -2 \cdot 10^{+75}:\\
                \;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
                
                \mathbf{elif}\;t\_1 \leq 0.0001:\\
                \;\;\;\;x + \frac{y}{t}\\
                
                \mathbf{elif}\;t\_1 \leq 50000:\\
                \;\;\;\;1\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\frac{y}{t}}{x + 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))) < -1.99999999999999985e75

                  1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(0 - y, \frac{z}{x \cdot x + \color{blue}{x}}, 1\right) \]
                    12. accelerator-lowering-fma.f6474.0

                      \[\leadsto \mathsf{fma}\left(0 - y, \frac{z}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}}, 1\right) \]
                  11. Simplified74.0%

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

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

                  1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                  7. Step-by-step derivation
                    1. Simplified82.5%

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

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

                        \[\leadsto \color{blue}{\frac{y}{t} + x} \]
                      3. /-lowering-/.f6482.5

                        \[\leadsto \color{blue}{\frac{y}{t}} + x \]
                    3. Applied egg-rr82.5%

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

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

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

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

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

                      1. Initial program 70.8%

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

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

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

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

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

                    Alternative 8: 80.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}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+75}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{t - y}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 50000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1}\\ \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 -2e+75)
                         (fma z (/ (- t y) (fma x x x)) 1.0)
                         (if (<= t_1 0.0001)
                           (+ x (/ y t))
                           (if (<= t_1 50000.0) 1.0 (/ (/ y t) (+ x 1.0)))))))
                    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 <= -2e+75) {
                    		tmp = fma(z, ((t - y) / fma(x, x, x)), 1.0);
                    	} else if (t_1 <= 0.0001) {
                    		tmp = x + (y / t);
                    	} else if (t_1 <= 50000.0) {
                    		tmp = 1.0;
                    	} else {
                    		tmp = (y / t) / (x + 1.0);
                    	}
                    	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 <= -2e+75)
                    		tmp = fma(z, Float64(Float64(t - y) / fma(x, x, x)), 1.0);
                    	elseif (t_1 <= 0.0001)
                    		tmp = Float64(x + Float64(y / t));
                    	elseif (t_1 <= 50000.0)
                    		tmp = 1.0;
                    	else
                    		tmp = Float64(Float64(y / t) / Float64(x + 1.0));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(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, -2e+75], N[(z * N[(N[(t - y), $MachinePrecision] / N[(x * x + x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000.0], 1.0, N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $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 -2 \cdot 10^{+75}:\\
                    \;\;\;\;\mathsf{fma}\left(z, \frac{t - y}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 0.0001:\\
                    \;\;\;\;x + \frac{y}{t}\\
                    
                    \mathbf{elif}\;t\_1 \leq 50000:\\
                    \;\;\;\;1\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\frac{y}{t}}{x + 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))) < -1.99999999999999985e75

                      1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                      7. Step-by-step derivation
                        1. Simplified82.5%

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

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

                            \[\leadsto \color{blue}{\frac{y}{t} + x} \]
                          3. /-lowering-/.f6482.5

                            \[\leadsto \color{blue}{\frac{y}{t}} + x \]
                        3. Applied egg-rr82.5%

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

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

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

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

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

                          1. Initial program 70.8%

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

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

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

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

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

                        Alternative 9: 73.8% 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^{-48}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 50000:\\ \;\;\;\;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-48)
                             (/ y t)
                             (if (<= t_1 0.0001) x (if (<= t_1 50000.0) 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-48) {
                        		tmp = y / t;
                        	} else if (t_1 <= 0.0001) {
                        		tmp = x;
                        	} else if (t_1 <= 50000.0) {
                        		tmp = 1.0;
                        	} else {
                        		tmp = y / t;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y, z, t)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8) :: t_1
                            real(8) :: tmp
                            t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)
                            if (t_1 <= (-5d-48)) then
                                tmp = y / t
                            else if (t_1 <= 0.0001d0) then
                                tmp = x
                            else if (t_1 <= 50000.0d0) then
                                tmp = 1.0d0
                            else
                                tmp = y / t
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
                        	double tmp;
                        	if (t_1 <= -5e-48) {
                        		tmp = y / t;
                        	} else if (t_1 <= 0.0001) {
                        		tmp = x;
                        	} else if (t_1 <= 50000.0) {
                        		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-48:
                        		tmp = y / t
                        	elif t_1 <= 0.0001:
                        		tmp = x
                        	elif t_1 <= 50000.0:
                        		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-48)
                        		tmp = Float64(y / t);
                        	elseif (t_1 <= 0.0001)
                        		tmp = x;
                        	elseif (t_1 <= 50000.0)
                        		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-48)
                        		tmp = y / t;
                        	elseif (t_1 <= 0.0001)
                        		tmp = x;
                        	elseif (t_1 <= 50000.0)
                        		tmp = 1.0;
                        	else
                        		tmp = y / t;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(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-48], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], x, If[LessEqual[t$95$1, 50000.0], 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^{-48}:\\
                        \;\;\;\;\frac{y}{t}\\
                        
                        \mathbf{elif}\;t\_1 \leq 0.0001:\\
                        \;\;\;\;x\\
                        
                        \mathbf{elif}\;t\_1 \leq 50000:\\
                        \;\;\;\;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.9999999999999999e-48 or 5e4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                          1. Initial program 70.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. /-lowering-/.f6447.9

                              \[\leadsto \color{blue}{\frac{y}{t}} \]
                          5. Simplified47.9%

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

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

                          1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                          7. Step-by-step derivation
                            1. Simplified84.2%

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

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

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

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

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

                                  \[\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^{-48}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\ \;\;\;\;x\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 50000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t}\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 10: 62.2% accurate, 0.4× 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 -\infty:\\ \;\;\;\;1\\ \mathbf{elif}\;t\_1 \leq 0.0001:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \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 (- INFINITY)) 1.0 (if (<= t_1 0.0001) x 1.0))))
                              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 <= -((double) INFINITY)) {
                              		tmp = 1.0;
                              	} else if (t_1 <= 0.0001) {
                              		tmp = x;
                              	} else {
                              		tmp = 1.0;
                              	}
                              	return tmp;
                              }
                              
                              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 <= -Double.POSITIVE_INFINITY) {
                              		tmp = 1.0;
                              	} else if (t_1 <= 0.0001) {
                              		tmp = x;
                              	} else {
                              		tmp = 1.0;
                              	}
                              	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 <= -math.inf:
                              		tmp = 1.0
                              	elif t_1 <= 0.0001:
                              		tmp = x
                              	else:
                              		tmp = 1.0
                              	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 <= Float64(-Inf))
                              		tmp = 1.0;
                              	elseif (t_1 <= 0.0001)
                              		tmp = x;
                              	else
                              		tmp = 1.0;
                              	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 <= -Inf)
                              		tmp = 1.0;
                              	elseif (t_1 <= 0.0001)
                              		tmp = x;
                              	else
                              		tmp = 1.0;
                              	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, (-Infinity)], 1.0, If[LessEqual[t$95$1, 0.0001], x, 1.0]]]
                              
                              \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 -\infty:\\
                              \;\;\;\;1\\
                              
                              \mathbf{elif}\;t\_1 \leq 0.0001:\\
                              \;\;\;\;x\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;1\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -inf.0 or 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

                                1. Initial program 86.5%

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

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

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

                                  1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                                  7. Step-by-step derivation
                                    1. Simplified73.6%

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

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

                                        \[\leadsto \color{blue}{x} \]
                                    4. Recombined 2 regimes into one program.
                                    5. Final simplification64.5%

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

                                    Alternative 11: 95.6% accurate, 0.6× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ \mathsf{fma}\left(y, \frac{z}{t\_1 \cdot \left(x + 1\right)}, \frac{x}{x + 1}\right) + \frac{x}{t\_1 \cdot \left(-1 - x\right)} \end{array} \end{array} \]
                                    (FPCore (x y z t)
                                     :precision binary64
                                     (let* ((t_1 (- (* z t) x)))
                                       (+
                                        (fma y (/ z (* t_1 (+ x 1.0))) (/ x (+ x 1.0)))
                                        (/ x (* t_1 (- -1.0 x))))))
                                    double code(double x, double y, double z, double t) {
                                    	double t_1 = (z * t) - x;
                                    	return fma(y, (z / (t_1 * (x + 1.0))), (x / (x + 1.0))) + (x / (t_1 * (-1.0 - x)));
                                    }
                                    
                                    function code(x, y, z, t)
                                    	t_1 = Float64(Float64(z * t) - x)
                                    	return Float64(fma(y, Float64(z / Float64(t_1 * Float64(x + 1.0))), Float64(x / Float64(x + 1.0))) + Float64(x / Float64(t_1 * Float64(-1.0 - x))))
                                    end
                                    
                                    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, N[(N[(y * N[(z / N[(t$95$1 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(t$95$1 * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := z \cdot t - x\\
                                    \mathsf{fma}\left(y, \frac{z}{t\_1 \cdot \left(x + 1\right)}, \frac{x}{x + 1}\right) + \frac{x}{t\_1 \cdot \left(-1 - x\right)}
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 88.5%

                                      \[\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}{\left(\frac{x}{1 + x} + \frac{y \cdot z}{\left(1 + x\right) \cdot \left(t \cdot z - x\right)}\right) - \frac{x}{\left(1 + x\right) \cdot \left(t \cdot z - x\right)}} \]
                                    4. Step-by-step derivation
                                      1. --lowering--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(y, \frac{z}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}, \frac{x}{x + 1}\right) + \frac{x}{\left(z \cdot t - x\right) \cdot \left(-1 - x\right)} \]
                                    7. Add Preprocessing

                                    Alternative 12: 75.5% accurate, 1.2× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3900000:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-53}:\\ \;\;\;\;\frac{z \cdot \left(t - y\right)}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{elif}\;x \leq 29000:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                                    (FPCore (x y z t)
                                     :precision binary64
                                     (if (<= x -3900000.0)
                                       (+ 1.0 (/ -1.0 x))
                                       (if (<= x -1.8e-53)
                                         (/ (* z (- t y)) (fma x x x))
                                         (if (<= x 29000.0) (+ x (/ y t)) 1.0))))
                                    double code(double x, double y, double z, double t) {
                                    	double tmp;
                                    	if (x <= -3900000.0) {
                                    		tmp = 1.0 + (-1.0 / x);
                                    	} else if (x <= -1.8e-53) {
                                    		tmp = (z * (t - y)) / fma(x, x, x);
                                    	} else if (x <= 29000.0) {
                                    		tmp = x + (y / t);
                                    	} else {
                                    		tmp = 1.0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t)
                                    	tmp = 0.0
                                    	if (x <= -3900000.0)
                                    		tmp = Float64(1.0 + Float64(-1.0 / x));
                                    	elseif (x <= -1.8e-53)
                                    		tmp = Float64(Float64(z * Float64(t - y)) / fma(x, x, x));
                                    	elseif (x <= 29000.0)
                                    		tmp = Float64(x + Float64(y / t));
                                    	else
                                    		tmp = 1.0;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_] := If[LessEqual[x, -3900000.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.8e-53], N[(N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision] / N[(x * x + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 29000.0], N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision], 1.0]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;x \leq -3900000:\\
                                    \;\;\;\;1 + \frac{-1}{x}\\
                                    
                                    \mathbf{elif}\;x \leq -1.8 \cdot 10^{-53}:\\
                                    \;\;\;\;\frac{z \cdot \left(t - y\right)}{\mathsf{fma}\left(x, x, x\right)}\\
                                    
                                    \mathbf{elif}\;x \leq 29000:\\
                                    \;\;\;\;x + \frac{y}{t}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 4 regimes
                                    2. if x < -3.9e6

                                      1. Initial program 86.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}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
                                      4. Step-by-step derivation
                                        1. /-lowering-/.f64N/A

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

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

                                          \[\leadsto \frac{x + \frac{y \cdot z}{\color{blue}{t \cdot z - x}}}{x + 1} \]
                                        4. *-lowering-*.f6486.1

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

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

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

                                          \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
                                        2. /-lowering-/.f6492.0

                                          \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
                                      8. Simplified92.0%

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

                                      if -3.9e6 < x < -1.7999999999999999e-53

                                      1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{z \cdot \left(t - y\right)}{x \cdot x + \color{blue}{x}} \]
                                        9. accelerator-lowering-fma.f6454.3

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

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

                                      if -1.7999999999999999e-53 < x < 29000

                                      1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                                      7. Step-by-step derivation
                                        1. Simplified70.4%

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

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

                                            \[\leadsto \color{blue}{\frac{y}{t} + x} \]
                                          3. /-lowering-/.f6470.4

                                            \[\leadsto \color{blue}{\frac{y}{t}} + x \]
                                        3. Applied egg-rr70.4%

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

                                        if 29000 < x

                                        1. Initial program 87.4%

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

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

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

                                        Alternative 13: 77.0% accurate, 1.7× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.063:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq 115000:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                                        (FPCore (x y z t)
                                         :precision binary64
                                         (if (<= x -0.063) (/ x (+ x 1.0)) (if (<= x 115000.0) (+ x (/ y t)) 1.0)))
                                        double code(double x, double y, double z, double t) {
                                        	double tmp;
                                        	if (x <= -0.063) {
                                        		tmp = x / (x + 1.0);
                                        	} else if (x <= 115000.0) {
                                        		tmp = x + (y / t);
                                        	} 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 <= (-0.063d0)) then
                                                tmp = x / (x + 1.0d0)
                                            else if (x <= 115000.0d0) then
                                                tmp = x + (y / t)
                                            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 <= -0.063) {
                                        		tmp = x / (x + 1.0);
                                        	} else if (x <= 115000.0) {
                                        		tmp = x + (y / t);
                                        	} else {
                                        		tmp = 1.0;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t):
                                        	tmp = 0
                                        	if x <= -0.063:
                                        		tmp = x / (x + 1.0)
                                        	elif x <= 115000.0:
                                        		tmp = x + (y / t)
                                        	else:
                                        		tmp = 1.0
                                        	return tmp
                                        
                                        function code(x, y, z, t)
                                        	tmp = 0.0
                                        	if (x <= -0.063)
                                        		tmp = Float64(x / Float64(x + 1.0));
                                        	elseif (x <= 115000.0)
                                        		tmp = Float64(x + Float64(y / t));
                                        	else
                                        		tmp = 1.0;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t)
                                        	tmp = 0.0;
                                        	if (x <= -0.063)
                                        		tmp = x / (x + 1.0);
                                        	elseif (x <= 115000.0)
                                        		tmp = x + (y / t);
                                        	else
                                        		tmp = 1.0;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_] := If[LessEqual[x, -0.063], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 115000.0], N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision], 1.0]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;x \leq -0.063:\\
                                        \;\;\;\;\frac{x}{x + 1}\\
                                        
                                        \mathbf{elif}\;x \leq 115000:\\
                                        \;\;\;\;x + \frac{y}{t}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if x < -0.063

                                          1. Initial program 86.5%

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

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

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

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

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

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

                                          if -0.063 < x < 115000

                                          1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                                          7. Step-by-step derivation
                                            1. Simplified66.1%

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

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

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

                                                \[\leadsto \color{blue}{\frac{y}{t}} + x \]
                                            3. Applied egg-rr66.1%

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

                                            if 115000 < x

                                            1. Initial program 87.4%

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

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

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

                                            Alternative 14: 76.9% accurate, 1.7× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;x \leq 29000:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t)
                                             :precision binary64
                                             (if (<= x -1.0) (+ 1.0 (/ -1.0 x)) (if (<= x 29000.0) (+ x (/ y t)) 1.0)))
                                            double code(double x, double y, double z, double t) {
                                            	double tmp;
                                            	if (x <= -1.0) {
                                            		tmp = 1.0 + (-1.0 / x);
                                            	} else if (x <= 29000.0) {
                                            		tmp = x + (y / t);
                                            	} 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 <= (-1.0d0)) then
                                                    tmp = 1.0d0 + ((-1.0d0) / x)
                                                else if (x <= 29000.0d0) then
                                                    tmp = x + (y / t)
                                                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 <= -1.0) {
                                            		tmp = 1.0 + (-1.0 / x);
                                            	} else if (x <= 29000.0) {
                                            		tmp = x + (y / t);
                                            	} else {
                                            		tmp = 1.0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t):
                                            	tmp = 0
                                            	if x <= -1.0:
                                            		tmp = 1.0 + (-1.0 / x)
                                            	elif x <= 29000.0:
                                            		tmp = x + (y / t)
                                            	else:
                                            		tmp = 1.0
                                            	return tmp
                                            
                                            function code(x, y, z, t)
                                            	tmp = 0.0
                                            	if (x <= -1.0)
                                            		tmp = Float64(1.0 + Float64(-1.0 / x));
                                            	elseif (x <= 29000.0)
                                            		tmp = Float64(x + Float64(y / t));
                                            	else
                                            		tmp = 1.0;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t)
                                            	tmp = 0.0;
                                            	if (x <= -1.0)
                                            		tmp = 1.0 + (-1.0 / x);
                                            	elseif (x <= 29000.0)
                                            		tmp = x + (y / t);
                                            	else
                                            		tmp = 1.0;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_] := If[LessEqual[x, -1.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 29000.0], N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision], 1.0]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;x \leq -1:\\
                                            \;\;\;\;1 + \frac{-1}{x}\\
                                            
                                            \mathbf{elif}\;x \leq 29000:\\
                                            \;\;\;\;x + \frac{y}{t}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if x < -1

                                              1. Initial program 86.5%

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

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

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

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

                                                  \[\leadsto \frac{x + \frac{y \cdot z}{\color{blue}{t \cdot z - x}}}{x + 1} \]
                                                4. *-lowering-*.f6486.5

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

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

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

                                                  \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
                                                2. /-lowering-/.f6489.3

                                                  \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
                                              8. Simplified89.3%

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

                                              if -1 < x < 29000

                                              1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                                              7. Step-by-step derivation
                                                1. Simplified66.1%

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

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

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

                                                    \[\leadsto \color{blue}{\frac{y}{t}} + x \]
                                                3. Applied egg-rr66.1%

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

                                                if 29000 < x

                                                1. Initial program 87.4%

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

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

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

                                                Alternative 15: 77.0% accurate, 1.7× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.62:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 29000:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t)
                                                 :precision binary64
                                                 (if (<= x -0.62) 1.0 (if (<= x 29000.0) (+ x (/ y t)) 1.0)))
                                                double code(double x, double y, double z, double t) {
                                                	double tmp;
                                                	if (x <= -0.62) {
                                                		tmp = 1.0;
                                                	} else if (x <= 29000.0) {
                                                		tmp = x + (y / t);
                                                	} 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 <= (-0.62d0)) then
                                                        tmp = 1.0d0
                                                    else if (x <= 29000.0d0) then
                                                        tmp = x + (y / t)
                                                    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 <= -0.62) {
                                                		tmp = 1.0;
                                                	} else if (x <= 29000.0) {
                                                		tmp = x + (y / t);
                                                	} else {
                                                		tmp = 1.0;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t):
                                                	tmp = 0
                                                	if x <= -0.62:
                                                		tmp = 1.0
                                                	elif x <= 29000.0:
                                                		tmp = x + (y / t)
                                                	else:
                                                		tmp = 1.0
                                                	return tmp
                                                
                                                function code(x, y, z, t)
                                                	tmp = 0.0
                                                	if (x <= -0.62)
                                                		tmp = 1.0;
                                                	elseif (x <= 29000.0)
                                                		tmp = Float64(x + Float64(y / t));
                                                	else
                                                		tmp = 1.0;
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t)
                                                	tmp = 0.0;
                                                	if (x <= -0.62)
                                                		tmp = 1.0;
                                                	elseif (x <= 29000.0)
                                                		tmp = x + (y / t);
                                                	else
                                                		tmp = 1.0;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_] := If[LessEqual[x, -0.62], 1.0, If[LessEqual[x, 29000.0], N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision], 1.0]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;x \leq -0.62:\\
                                                \;\;\;\;1\\
                                                
                                                \mathbf{elif}\;x \leq 29000:\\
                                                \;\;\;\;x + \frac{y}{t}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if x < -0.619999999999999996 or 29000 < x

                                                  1. Initial program 87.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. Simplified90.3%

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

                                                    if -0.619999999999999996 < x < 29000

                                                    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                                                    7. Step-by-step derivation
                                                      1. Simplified66.1%

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

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

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

                                                          \[\leadsto \color{blue}{\frac{y}{t}} + x \]
                                                      3. Applied egg-rr66.1%

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.62:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 29000:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 16: 52.8% accurate, 45.0× speedup?

                                                    \[\begin{array}{l} \\ 1 \end{array} \]
                                                    (FPCore (x y z t) :precision binary64 1.0)
                                                    double code(double x, double y, double z, double t) {
                                                    	return 1.0;
                                                    }
                                                    
                                                    real(8) function code(x, y, z, t)
                                                        real(8), intent (in) :: x
                                                        real(8), intent (in) :: y
                                                        real(8), intent (in) :: z
                                                        real(8), intent (in) :: t
                                                        code = 1.0d0
                                                    end function
                                                    
                                                    public static double code(double x, double y, double z, double t) {
                                                    	return 1.0;
                                                    }
                                                    
                                                    def code(x, y, z, t):
                                                    	return 1.0
                                                    
                                                    function code(x, y, z, t)
                                                    	return 1.0
                                                    end
                                                    
                                                    function tmp = code(x, y, z, t)
                                                    	tmp = 1.0;
                                                    end
                                                    
                                                    code[x_, y_, z_, t_] := 1.0
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    1
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Initial program 88.5%

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

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

                                                      Developer Target 1: 99.5% accurate, 0.7× speedup?

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

                                                      Reproduce

                                                      ?
                                                      herbie shell --seed 2024195 
                                                      (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)))