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

Percentage Accurate: 90.4% → 98.0%
Time: 44.3s
Alternatives: 14
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 90.4% 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: 98.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-20} \lor \neg \left(z \leq 5.1 \cdot 10^{-23}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.95e-20) (not (<= z 5.1e-23)))
   (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0))
   (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.95e-20) || !(z <= 5.1e-23)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 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 ((z <= (-1.95d-20)) .or. (.not. (z <= 5.1d-23))) then
        tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
    else
        tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.95e-20) || !(z <= 5.1e-23)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.95e-20) or not (z <= 5.1e-23):
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0)
	else:
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.95e-20) || !(z <= 5.1e-23))
		tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.95e-20) || ~((z <= 5.1e-23)))
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	else
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.95e-20], N[Not[LessEqual[z, 5.1e-23]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-20} \lor \neg \left(z \leq 5.1 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.95000000000000004e-20 or 5.10000000000000011e-23 < z

    1. Initial program 86.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative86.0%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*91.7%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg97.6%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg97.6%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified97.6%

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

    if -1.95000000000000004e-20 < z < 5.10000000000000011e-23

    1. Initial program 99.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-20} \lor \neg \left(z \leq 5.1 \cdot 10^{-23}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \end{array} \]

Alternative 2: 68.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;z \leq -8.4 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-269}:\\ \;\;\;\;\frac{y}{t + x \cdot \left(t + \frac{-1}{z}\right)}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-143}:\\ \;\;\;\;1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-78}:\\ \;\;\;\;1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-45}:\\ \;\;\;\;\frac{x - \frac{y}{\frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
   (if (<= z -8.4e+49)
     t_1
     (if (<= z -2.4e-269)
       (/ y (+ t (* x (+ t (/ -1.0 z)))))
       (if (<= z 1.35e-143)
         1.0
         (if (<= z 5.6e-78)
           t_1
           (if (<= z 5.8e-78)
             1.0
             (if (<= z 1.12e-45) (/ (- x (/ y (/ x z))) (+ x 1.0)) t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (z <= -8.4e+49) {
		tmp = t_1;
	} else if (z <= -2.4e-269) {
		tmp = y / (t + (x * (t + (-1.0 / z))));
	} else if (z <= 1.35e-143) {
		tmp = 1.0;
	} else if (z <= 5.6e-78) {
		tmp = t_1;
	} else if (z <= 5.8e-78) {
		tmp = 1.0;
	} else if (z <= 1.12e-45) {
		tmp = (x - (y / (x / z))) / (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) :: tmp
    t_1 = (x + (y / t)) / (x + 1.0d0)
    if (z <= (-8.4d+49)) then
        tmp = t_1
    else if (z <= (-2.4d-269)) then
        tmp = y / (t + (x * (t + ((-1.0d0) / z))))
    else if (z <= 1.35d-143) then
        tmp = 1.0d0
    else if (z <= 5.6d-78) then
        tmp = t_1
    else if (z <= 5.8d-78) then
        tmp = 1.0d0
    else if (z <= 1.12d-45) then
        tmp = (x - (y / (x / z))) / (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 tmp;
	if (z <= -8.4e+49) {
		tmp = t_1;
	} else if (z <= -2.4e-269) {
		tmp = y / (t + (x * (t + (-1.0 / z))));
	} else if (z <= 1.35e-143) {
		tmp = 1.0;
	} else if (z <= 5.6e-78) {
		tmp = t_1;
	} else if (z <= 5.8e-78) {
		tmp = 1.0;
	} else if (z <= 1.12e-45) {
		tmp = (x - (y / (x / z))) / (x + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (y / t)) / (x + 1.0)
	tmp = 0
	if z <= -8.4e+49:
		tmp = t_1
	elif z <= -2.4e-269:
		tmp = y / (t + (x * (t + (-1.0 / z))))
	elif z <= 1.35e-143:
		tmp = 1.0
	elif z <= 5.6e-78:
		tmp = t_1
	elif z <= 5.8e-78:
		tmp = 1.0
	elif z <= 1.12e-45:
		tmp = (x - (y / (x / z))) / (x + 1.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -8.4e+49)
		tmp = t_1;
	elseif (z <= -2.4e-269)
		tmp = Float64(y / Float64(t + Float64(x * Float64(t + Float64(-1.0 / z)))));
	elseif (z <= 1.35e-143)
		tmp = 1.0;
	elseif (z <= 5.6e-78)
		tmp = t_1;
	elseif (z <= 5.8e-78)
		tmp = 1.0;
	elseif (z <= 1.12e-45)
		tmp = Float64(Float64(x - Float64(y / Float64(x / z))) / 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);
	tmp = 0.0;
	if (z <= -8.4e+49)
		tmp = t_1;
	elseif (z <= -2.4e-269)
		tmp = y / (t + (x * (t + (-1.0 / z))));
	elseif (z <= 1.35e-143)
		tmp = 1.0;
	elseif (z <= 5.6e-78)
		tmp = t_1;
	elseif (z <= 5.8e-78)
		tmp = 1.0;
	elseif (z <= 1.12e-45)
		tmp = (x - (y / (x / z))) / (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]}, If[LessEqual[z, -8.4e+49], t$95$1, If[LessEqual[z, -2.4e-269], N[(y / N[(t + N[(x * N[(t + N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-143], 1.0, If[LessEqual[z, 5.6e-78], t$95$1, If[LessEqual[z, 5.8e-78], 1.0, If[LessEqual[z, 1.12e-45], N[(N[(x - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -8.4 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-143}:\\
\;\;\;\;1\\

\mathbf{elif}\;z \leq 5.6 \cdot 10^{-78}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-78}:\\
\;\;\;\;1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-45}:\\
\;\;\;\;\frac{x - \frac{y}{\frac{x}{z}}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.40000000000000043e49 or 1.35000000000000005e-143 < z < 5.60000000000000047e-78 or 1.1199999999999999e-45 < z

    1. Initial program 87.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative87.9%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified87.9%

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

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

    if -8.40000000000000043e49 < z < -2.4000000000000001e-269

    1. Initial program 95.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative95.4%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*66.9%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \left(1 + x\right)}} \]
    8. Step-by-step derivation
      1. associate-/l*57.6%

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{\left(x + 1\right) \cdot \left(t \cdot z - x\right)}{z}}} \]
    10. Taylor expanded in x around 0 58.8%

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

    if -2.4000000000000001e-269 < z < 1.35000000000000005e-143 or 5.60000000000000047e-78 < z < 5.8000000000000001e-78

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*26.4%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg26.5%

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

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

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

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

    if 5.8000000000000001e-78 < z < 1.1199999999999999e-45

    1. Initial program 99.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.4%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*88.2%

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \frac{y \cdot z}{x} + x}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative88.0%

        \[\leadsto \frac{\color{blue}{x + -1 \cdot \frac{y \cdot z}{x}}}{1 + x} \]
      2. mul-1-neg88.0%

        \[\leadsto \frac{x + \color{blue}{\left(-\frac{y \cdot z}{x}\right)}}{1 + x} \]
      3. unsub-neg88.0%

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

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

        \[\leadsto \frac{x - \frac{y}{\frac{x}{z}}}{\color{blue}{x + 1}} \]
    9. Simplified88.2%

      \[\leadsto \color{blue}{\frac{x - \frac{y}{\frac{x}{z}}}{x + 1}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{+49}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-269}:\\ \;\;\;\;\frac{y}{t + x \cdot \left(t + \frac{-1}{z}\right)}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-143}:\\ \;\;\;\;1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-78}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-78}:\\ \;\;\;\;1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-45}:\\ \;\;\;\;\frac{x - \frac{y}{\frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 3: 83.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ t_2 := \frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{if}\;z \leq -3 \cdot 10^{-195}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-267}:\\ \;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (- x (/ x (- (* z t) x))) (+ x 1.0)))
        (t_2 (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0))))
   (if (<= z -3e-195)
     t_2
     (if (<= z -2.15e-239)
       t_1
       (if (<= z -2.75e-266)
         t_2
         (if (<= z 7.2e-267)
           (/ (+ x (- 1.0 (/ y (/ x z)))) (+ x 1.0))
           (if (<= z 1.38e-142) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x - (x / ((z * t) - x))) / (x + 1.0);
	double t_2 = (x + (y / (t - (x / z)))) / (x + 1.0);
	double tmp;
	if (z <= -3e-195) {
		tmp = t_2;
	} else if (z <= -2.15e-239) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = t_2;
	} else if (z <= 7.2e-267) {
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	} else if (z <= 1.38e-142) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x - (x / ((z * t) - x))) / (x + 1.0d0)
    t_2 = (x + (y / (t - (x / z)))) / (x + 1.0d0)
    if (z <= (-3d-195)) then
        tmp = t_2
    else if (z <= (-2.15d-239)) then
        tmp = t_1
    else if (z <= (-2.75d-266)) then
        tmp = t_2
    else if (z <= 7.2d-267) then
        tmp = (x + (1.0d0 - (y / (x / z)))) / (x + 1.0d0)
    else if (z <= 1.38d-142) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x - (x / ((z * t) - x))) / (x + 1.0);
	double t_2 = (x + (y / (t - (x / z)))) / (x + 1.0);
	double tmp;
	if (z <= -3e-195) {
		tmp = t_2;
	} else if (z <= -2.15e-239) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = t_2;
	} else if (z <= 7.2e-267) {
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	} else if (z <= 1.38e-142) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x - (x / ((z * t) - x))) / (x + 1.0)
	t_2 = (x + (y / (t - (x / z)))) / (x + 1.0)
	tmp = 0
	if z <= -3e-195:
		tmp = t_2
	elif z <= -2.15e-239:
		tmp = t_1
	elif z <= -2.75e-266:
		tmp = t_2
	elif z <= 7.2e-267:
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0)
	elif z <= 1.38e-142:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x - Float64(x / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
	t_2 = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -3e-195)
		tmp = t_2;
	elseif (z <= -2.15e-239)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = t_2;
	elseif (z <= 7.2e-267)
		tmp = Float64(Float64(x + Float64(1.0 - Float64(y / Float64(x / z)))) / Float64(x + 1.0));
	elseif (z <= 1.38e-142)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x - (x / ((z * t) - x))) / (x + 1.0);
	t_2 = (x + (y / (t - (x / z)))) / (x + 1.0);
	tmp = 0.0;
	if (z <= -3e-195)
		tmp = t_2;
	elseif (z <= -2.15e-239)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = t_2;
	elseif (z <= 7.2e-267)
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	elseif (z <= 1.38e-142)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(x / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-195], t$95$2, If[LessEqual[z, -2.15e-239], t$95$1, If[LessEqual[z, -2.75e-266], t$95$2, If[LessEqual[z, 7.2e-267], N[(N[(x + N[(1.0 - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.38e-142], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\
t_2 := \frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\
\mathbf{if}\;z \leq -3 \cdot 10^{-195}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.15 \cdot 10^{-239}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-267}:\\
\;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\

\mathbf{elif}\;z \leq 1.38 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3e-195 or -2.15e-239 < z < -2.75000000000000013e-266 or 1.37999999999999998e-142 < z

    1. Initial program 90.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.5%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*85.9%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg89.9%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg89.9%

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

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

    if -3e-195 < z < -2.15e-239 or 7.2000000000000002e-267 < z < 1.37999999999999998e-142

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

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

        \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
    6. Simplified77.7%

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

    if -2.75000000000000013e-266 < z < 7.2000000000000002e-267

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

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

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

      \[\leadsto \color{blue}{\frac{1 + \left(-1 \cdot \frac{y \cdot z}{x} + x\right)}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative87.9%

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

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

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

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

        \[\leadsto \frac{x + \left(1 + \color{blue}{\left(-\frac{y \cdot z}{x}\right)}\right)}{1 + x} \]
      6. unsub-neg87.9%

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

        \[\leadsto \frac{x + \left(1 - \color{blue}{\frac{y}{\frac{x}{z}}}\right)}{1 + x} \]
      8. +-commutative87.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-239}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-267}:\\ \;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-142}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \end{array} \]

Alternative 4: 55.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{-170}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-59}:\\ \;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-14}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ z (- (* z t) x)))))
   (if (<= y -1.7e-170)
     t_1
     (if (<= y 1.02e-141)
       (/ x (+ x 1.0))
       (if (<= y 6.6e-59)
         (/ y (* t (+ x 1.0)))
         (if (<= y 3.2e-14) 1.0 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (z / ((z * t) - x));
	double tmp;
	if (y <= -1.7e-170) {
		tmp = t_1;
	} else if (y <= 1.02e-141) {
		tmp = x / (x + 1.0);
	} else if (y <= 6.6e-59) {
		tmp = y / (t * (x + 1.0));
	} else if (y <= 3.2e-14) {
		tmp = 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) :: tmp
    t_1 = y * (z / ((z * t) - x))
    if (y <= (-1.7d-170)) then
        tmp = t_1
    else if (y <= 1.02d-141) then
        tmp = x / (x + 1.0d0)
    else if (y <= 6.6d-59) then
        tmp = y / (t * (x + 1.0d0))
    else if (y <= 3.2d-14) then
        tmp = 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 = y * (z / ((z * t) - x));
	double tmp;
	if (y <= -1.7e-170) {
		tmp = t_1;
	} else if (y <= 1.02e-141) {
		tmp = x / (x + 1.0);
	} else if (y <= 6.6e-59) {
		tmp = y / (t * (x + 1.0));
	} else if (y <= 3.2e-14) {
		tmp = 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (z / ((z * t) - x))
	tmp = 0
	if y <= -1.7e-170:
		tmp = t_1
	elif y <= 1.02e-141:
		tmp = x / (x + 1.0)
	elif y <= 6.6e-59:
		tmp = y / (t * (x + 1.0))
	elif y <= 3.2e-14:
		tmp = 1.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(z / Float64(Float64(z * t) - x)))
	tmp = 0.0
	if (y <= -1.7e-170)
		tmp = t_1;
	elseif (y <= 1.02e-141)
		tmp = Float64(x / Float64(x + 1.0));
	elseif (y <= 6.6e-59)
		tmp = Float64(y / Float64(t * Float64(x + 1.0)));
	elseif (y <= 3.2e-14)
		tmp = 1.0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (z / ((z * t) - x));
	tmp = 0.0;
	if (y <= -1.7e-170)
		tmp = t_1;
	elseif (y <= 1.02e-141)
		tmp = x / (x + 1.0);
	elseif (y <= 6.6e-59)
		tmp = y / (t * (x + 1.0));
	elseif (y <= 3.2e-14)
		tmp = 1.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e-170], t$95$1, If[LessEqual[y, 1.02e-141], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e-59], N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-14], 1.0, t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{z \cdot t - x}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-170}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.02 \cdot 10^{-141}:\\
\;\;\;\;\frac{x}{x + 1}\\

\mathbf{elif}\;y \leq 6.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-14}:\\
\;\;\;\;1\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.70000000000000006e-170 or 3.2000000000000002e-14 < y

    1. Initial program 88.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.2%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified88.2%

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

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

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

        \[\leadsto \frac{y \cdot z}{\left(1 + x\right) \cdot \left(\color{blue}{z \cdot t} - x\right)} \]
      3. times-frac68.0%

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

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

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

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

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

    if -1.70000000000000006e-170 < y < 1.02e-141

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative49.6%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    6. Simplified49.6%

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

    if 1.02e-141 < y < 6.59999999999999964e-59

    1. Initial program 94.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative94.6%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. *-commutative57.6%

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

        \[\leadsto \frac{y \cdot z}{\left(1 + x\right) \cdot \left(\color{blue}{z \cdot t} - x\right)} \]
      3. times-frac57.4%

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

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

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

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

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

    if 6.59999999999999964e-59 < y < 3.2000000000000002e-14

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*35.4%

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

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

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

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg35.4%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified35.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-170}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-59}:\\ \;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-14}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \end{array} \]

Alternative 5: 74.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-144} \lor \neg \left(z \leq 2.15 \cdot 10^{-54}\right):\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.1e-144) (not (<= z 2.15e-54)))
   (/ (+ x (/ y t)) (+ x 1.0))
   (/ (+ x (- 1.0 (/ y (/ x z)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.1e-144) || !(z <= 2.15e-54)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 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 ((z <= (-2.1d-144)) .or. (.not. (z <= 2.15d-54))) then
        tmp = (x + (y / t)) / (x + 1.0d0)
    else
        tmp = (x + (1.0d0 - (y / (x / z)))) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.1e-144) || !(z <= 2.15e-54)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.1e-144) or not (z <= 2.15e-54):
		tmp = (x + (y / t)) / (x + 1.0)
	else:
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.1e-144) || !(z <= 2.15e-54))
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x + Float64(1.0 - Float64(y / Float64(x / z)))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.1e-144) || ~((z <= 2.15e-54)))
		tmp = (x + (y / t)) / (x + 1.0);
	else
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.1e-144], N[Not[LessEqual[z, 2.15e-54]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(1.0 - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-144} \lor \neg \left(z \leq 2.15 \cdot 10^{-54}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1000000000000001e-144 or 2.15e-54 < z

    1. Initial program 88.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.5%

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

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

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

    if -2.1000000000000001e-144 < z < 2.15e-54

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \left(1 + \color{blue}{\left(-\frac{y \cdot z}{x}\right)}\right)}{1 + x} \]
      6. unsub-neg65.7%

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

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

        \[\leadsto \frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{\color{blue}{x + 1}} \]
    6. Simplified65.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-144} \lor \neg \left(z \leq 2.15 \cdot 10^{-54}\right):\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\ \end{array} \]

Alternative 6: 82.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{-266} \lor \neg \left(z \leq 4.5 \cdot 10^{-150}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.75e-266) (not (<= z 4.5e-150)))
   (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0))
   (/ (+ x (- 1.0 (/ y (/ x z)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.75e-266) || !(z <= 4.5e-150)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 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 ((z <= (-2.75d-266)) .or. (.not. (z <= 4.5d-150))) then
        tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
    else
        tmp = (x + (1.0d0 - (y / (x / z)))) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.75e-266) || !(z <= 4.5e-150)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.75e-266) or not (z <= 4.5e-150):
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0)
	else:
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.75e-266) || !(z <= 4.5e-150))
		tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x + Float64(1.0 - Float64(y / Float64(x / z)))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.75e-266) || ~((z <= 4.5e-150)))
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	else
		tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.75e-266], N[Not[LessEqual[z, 4.5e-150]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(1.0 - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{-266} \lor \neg \left(z \leq 4.5 \cdot 10^{-150}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.75000000000000013e-266 or 4.5000000000000002e-150 < z

    1. Initial program 90.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.9%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified90.9%

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*82.9%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg86.7%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg86.7%

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

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

    if -2.75000000000000013e-266 < z < 4.5000000000000002e-150

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \color{blue}{\frac{1 + \left(-1 \cdot \frac{y \cdot z}{x} + x\right)}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative76.9%

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

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

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

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

        \[\leadsto \frac{x + \left(1 + \color{blue}{\left(-\frac{y \cdot z}{x}\right)}\right)}{1 + x} \]
      6. unsub-neg76.9%

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

        \[\leadsto \frac{x + \left(1 - \color{blue}{\frac{y}{\frac{x}{z}}}\right)}{1 + x} \]
      8. +-commutative76.9%

        \[\leadsto \frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{\color{blue}{x + 1}} \]
    6. Simplified76.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{-266} \lor \neg \left(z \leq 4.5 \cdot 10^{-150}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\ \end{array} \]

Alternative 7: 70.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;z \leq -3.85 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;z \leq 10^{-150}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
   (if (<= z -3.85e-59)
     t_1
     (if (<= z -2.75e-266)
       (* y (/ z (- (* z t) x)))
       (if (<= z 1e-150) 1.0 t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (z <= -3.85e-59) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = y * (z / ((z * t) - x));
	} else if (z <= 1e-150) {
		tmp = 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) :: tmp
    t_1 = (x + (y / t)) / (x + 1.0d0)
    if (z <= (-3.85d-59)) then
        tmp = t_1
    else if (z <= (-2.75d-266)) then
        tmp = y * (z / ((z * t) - x))
    else if (z <= 1d-150) then
        tmp = 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 tmp;
	if (z <= -3.85e-59) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = y * (z / ((z * t) - x));
	} else if (z <= 1e-150) {
		tmp = 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (y / t)) / (x + 1.0)
	tmp = 0
	if z <= -3.85e-59:
		tmp = t_1
	elif z <= -2.75e-266:
		tmp = y * (z / ((z * t) - x))
	elif z <= 1e-150:
		tmp = 1.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -3.85e-59)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = Float64(y * Float64(z / Float64(Float64(z * t) - x)));
	elseif (z <= 1e-150)
		tmp = 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);
	tmp = 0.0;
	if (z <= -3.85e-59)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = y * (z / ((z * t) - x));
	elseif (z <= 1e-150)
		tmp = 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]}, If[LessEqual[z, -3.85e-59], t$95$1, If[LessEqual[z, -2.75e-266], N[(y * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-150], 1.0, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -3.85 \cdot 10^{-59}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\

\mathbf{elif}\;z \leq 10^{-150}:\\
\;\;\;\;1\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.85e-59 or 1.00000000000000001e-150 < z

    1. Initial program 88.1%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.1%

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

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

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

    if -3.85e-59 < z < -2.75000000000000013e-266

    1. Initial program 99.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.5%

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

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

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

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

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

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

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

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

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

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

    if -2.75000000000000013e-266 < z < 1.00000000000000001e-150

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*26.8%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg26.8%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg26.8%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified26.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.85 \cdot 10^{-59}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;z \leq 10^{-150}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 8: 69.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;z \leq -1.32 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;\frac{y}{t + x \cdot \left(t + \frac{-1}{z}\right)}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
   (if (<= z -1.32e+47)
     t_1
     (if (<= z -2.75e-266)
       (/ y (+ t (* x (+ t (/ -1.0 z)))))
       (if (<= z 1.5e-151) 1.0 t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (z <= -1.32e+47) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = y / (t + (x * (t + (-1.0 / z))));
	} else if (z <= 1.5e-151) {
		tmp = 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) :: tmp
    t_1 = (x + (y / t)) / (x + 1.0d0)
    if (z <= (-1.32d+47)) then
        tmp = t_1
    else if (z <= (-2.75d-266)) then
        tmp = y / (t + (x * (t + ((-1.0d0) / z))))
    else if (z <= 1.5d-151) then
        tmp = 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 tmp;
	if (z <= -1.32e+47) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = y / (t + (x * (t + (-1.0 / z))));
	} else if (z <= 1.5e-151) {
		tmp = 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (y / t)) / (x + 1.0)
	tmp = 0
	if z <= -1.32e+47:
		tmp = t_1
	elif z <= -2.75e-266:
		tmp = y / (t + (x * (t + (-1.0 / z))))
	elif z <= 1.5e-151:
		tmp = 1.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -1.32e+47)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = Float64(y / Float64(t + Float64(x * Float64(t + Float64(-1.0 / z)))));
	elseif (z <= 1.5e-151)
		tmp = 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);
	tmp = 0.0;
	if (z <= -1.32e+47)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = y / (t + (x * (t + (-1.0 / z))));
	elseif (z <= 1.5e-151)
		tmp = 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]}, If[LessEqual[z, -1.32e+47], t$95$1, If[LessEqual[z, -2.75e-266], N[(y / N[(t + N[(x * N[(t + N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-151], 1.0, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -1.32 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-151}:\\
\;\;\;\;1\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.31999999999999992e47 or 1.5e-151 < z

    1. Initial program 88.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified88.7%

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

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

    if -1.31999999999999992e47 < z < -2.75000000000000013e-266

    1. Initial program 95.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative95.4%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*66.9%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \left(1 + x\right)}} \]
    8. Step-by-step derivation
      1. associate-/l*57.6%

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{\left(x + 1\right) \cdot \left(t \cdot z - x\right)}{z}}} \]
    10. Taylor expanded in x around 0 58.8%

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

    if -2.75000000000000013e-266 < z < 1.5e-151

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*26.8%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg26.8%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg26.8%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified26.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{+47}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;\frac{y}{t + x \cdot \left(t + \frac{-1}{z}\right)}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 9: 69.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;z \leq -1.32 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;\frac{\frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-146}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
   (if (<= z -1.32e+47)
     t_1
     (if (<= z -2.75e-266)
       (/ (/ y (- t (/ x z))) (+ x 1.0))
       (if (<= z 1.25e-146) 1.0 t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (z <= -1.32e+47) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = (y / (t - (x / z))) / (x + 1.0);
	} else if (z <= 1.25e-146) {
		tmp = 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) :: tmp
    t_1 = (x + (y / t)) / (x + 1.0d0)
    if (z <= (-1.32d+47)) then
        tmp = t_1
    else if (z <= (-2.75d-266)) then
        tmp = (y / (t - (x / z))) / (x + 1.0d0)
    else if (z <= 1.25d-146) then
        tmp = 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 tmp;
	if (z <= -1.32e+47) {
		tmp = t_1;
	} else if (z <= -2.75e-266) {
		tmp = (y / (t - (x / z))) / (x + 1.0);
	} else if (z <= 1.25e-146) {
		tmp = 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (y / t)) / (x + 1.0)
	tmp = 0
	if z <= -1.32e+47:
		tmp = t_1
	elif z <= -2.75e-266:
		tmp = (y / (t - (x / z))) / (x + 1.0)
	elif z <= 1.25e-146:
		tmp = 1.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -1.32e+47)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = Float64(Float64(y / Float64(t - Float64(x / z))) / Float64(x + 1.0));
	elseif (z <= 1.25e-146)
		tmp = 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);
	tmp = 0.0;
	if (z <= -1.32e+47)
		tmp = t_1;
	elseif (z <= -2.75e-266)
		tmp = (y / (t - (x / z))) / (x + 1.0);
	elseif (z <= 1.25e-146)
		tmp = 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]}, If[LessEqual[z, -1.32e+47], t$95$1, If[LessEqual[z, -2.75e-266], N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-146], 1.0, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -1.32 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-146}:\\
\;\;\;\;1\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.31999999999999992e47 or 1.24999999999999989e-146 < z

    1. Initial program 88.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified88.7%

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

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

    if -1.31999999999999992e47 < z < -2.75000000000000013e-266

    1. Initial program 95.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative95.4%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*66.9%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg69.7%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg69.7%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified69.7%

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

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

    if -2.75000000000000013e-266 < z < 1.24999999999999989e-146

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.9%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*26.8%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg26.8%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg26.8%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified26.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{+47}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-266}:\\ \;\;\;\;\frac{\frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-146}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 10: 50.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-144} \lor \neg \left(z \leq 5.3 \cdot 10^{-34}\right):\\ \;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -4e-144) (not (<= z 5.3e-34))) (/ y (* t (+ x 1.0))) 1.0))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4e-144) || !(z <= 5.3e-34)) {
		tmp = y / (t * (x + 1.0));
	} 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 ((z <= (-4d-144)) .or. (.not. (z <= 5.3d-34))) then
        tmp = y / (t * (x + 1.0d0))
    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 ((z <= -4e-144) || !(z <= 5.3e-34)) {
		tmp = y / (t * (x + 1.0));
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -4e-144) or not (z <= 5.3e-34):
		tmp = y / (t * (x + 1.0))
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -4e-144) || !(z <= 5.3e-34))
		tmp = Float64(y / Float64(t * Float64(x + 1.0)));
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -4e-144) || ~((z <= 5.3e-34)))
		tmp = y / (t * (x + 1.0));
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4e-144], N[Not[LessEqual[z, 5.3e-34]], $MachinePrecision]], N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-144} \lor \neg \left(z \leq 5.3 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9999999999999998e-144 or 5.2999999999999997e-34 < z

    1. Initial program 88.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.3%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{\left(t \cdot z - x\right) \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. *-commutative53.0%

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

        \[\leadsto \frac{y \cdot z}{\left(1 + x\right) \cdot \left(\color{blue}{z \cdot t} - x\right)} \]
      3. times-frac59.0%

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

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

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

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

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

    if -3.9999999999999998e-144 < z < 5.2999999999999997e-34

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*45.8%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg45.9%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg45.9%

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

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-144} \lor \neg \left(z \leq 5.3 \cdot 10^{-34}\right):\\ \;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 11: 31.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-53} \lor \neg \left(z \leq 2.85 \cdot 10^{-33}\right):\\ \;\;\;\;x + x \cdot x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -8.2e-53) (not (<= z 2.85e-33))) (+ x (* x x)) 1.0))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8.2e-53) || !(z <= 2.85e-33)) {
		tmp = x + (x * x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-8.2d-53)) .or. (.not. (z <= 2.85d-33))) then
        tmp = x + (x * x)
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8.2e-53) || !(z <= 2.85e-33)) {
		tmp = x + (x * x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -8.2e-53) or not (z <= 2.85e-33):
		tmp = x + (x * x)
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -8.2e-53) || !(z <= 2.85e-33))
		tmp = Float64(x + Float64(x * x));
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -8.2e-53) || ~((z <= 2.85e-33)))
		tmp = x + (x * x);
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.2e-53], N[Not[LessEqual[z, 2.85e-33]], $MachinePrecision]], N[(x + N[(x * x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-53} \lor \neg \left(z \leq 2.85 \cdot 10^{-33}\right):\\
\;\;\;\;x + x \cdot x\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.2000000000000001e-53 or 2.85000000000000013e-33 < z

    1. Initial program 86.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative86.2%

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

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

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

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    6. Simplified34.1%

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

      \[\leadsto \color{blue}{-1 \cdot {x}^{2} + x} \]
    8. Step-by-step derivation
      1. +-commutative32.4%

        \[\leadsto \color{blue}{x + -1 \cdot {x}^{2}} \]
      2. mul-1-neg32.4%

        \[\leadsto x + \color{blue}{\left(-{x}^{2}\right)} \]
      3. unsub-neg32.4%

        \[\leadsto \color{blue}{x - {x}^{2}} \]
      4. unpow232.4%

        \[\leadsto x - \color{blue}{x \cdot x} \]
    9. Simplified32.4%

      \[\leadsto \color{blue}{x - x \cdot x} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv32.4%

        \[\leadsto \color{blue}{x + \left(-x\right) \cdot x} \]
      2. add-sqr-sqrt13.3%

        \[\leadsto x + \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot x \]
      3. sqrt-unprod32.4%

        \[\leadsto x + \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot x \]
      4. sqr-neg32.4%

        \[\leadsto x + \sqrt{\color{blue}{x \cdot x}} \cdot x \]
      5. sqrt-prod19.1%

        \[\leadsto x + \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot x \]
      6. add-sqr-sqrt32.4%

        \[\leadsto x + \color{blue}{x} \cdot x \]
    11. Applied egg-rr32.4%

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

    if -8.2000000000000001e-53 < z < 2.85000000000000013e-33

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*50.6%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg50.6%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg50.6%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified50.6%

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-53} \lor \neg \left(z \leq 2.85 \cdot 10^{-33}\right):\\ \;\;\;\;x + x \cdot x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 12: 32.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-51} \lor \neg \left(z \leq 2.25 \cdot 10^{-53}\right):\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -3.6e-51) (not (<= z 2.25e-53))) (/ x (+ x 1.0)) 1.0))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.6e-51) || !(z <= 2.25e-53)) {
		tmp = x / (x + 1.0);
	} 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 ((z <= (-3.6d-51)) .or. (.not. (z <= 2.25d-53))) then
        tmp = x / (x + 1.0d0)
    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 ((z <= -3.6e-51) || !(z <= 2.25e-53)) {
		tmp = x / (x + 1.0);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.6e-51) or not (z <= 2.25e-53):
		tmp = x / (x + 1.0)
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.6e-51) || !(z <= 2.25e-53))
		tmp = Float64(x / Float64(x + 1.0));
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -3.6e-51) || ~((z <= 2.25e-53)))
		tmp = x / (x + 1.0);
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.6e-51], N[Not[LessEqual[z, 2.25e-53]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-51} \lor \neg \left(z \leq 2.25 \cdot 10^{-53}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6e-51 or 2.24999999999999992e-53 < z

    1. Initial program 86.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative86.5%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative34.8%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    6. Simplified34.8%

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

    if -3.6e-51 < z < 2.24999999999999992e-53

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*50.1%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg50.2%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg50.2%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified50.2%

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-51} \lor \neg \left(z \leq 2.25 \cdot 10^{-53}\right):\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 13: 31.0% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-26}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -6.2e-52) x (if (<= z 1.15e-26) 1.0 x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6.2e-52) {
		tmp = x;
	} else if (z <= 1.15e-26) {
		tmp = 1.0;
	} else {
		tmp = x;
	}
	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 (z <= (-6.2d-52)) then
        tmp = x
    else if (z <= 1.15d-26) then
        tmp = 1.0d0
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6.2e-52) {
		tmp = x;
	} else if (z <= 1.15e-26) {
		tmp = 1.0;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -6.2e-52:
		tmp = x
	elif z <= 1.15e-26:
		tmp = 1.0
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -6.2e-52)
		tmp = x;
	elseif (z <= 1.15e-26)
		tmp = 1.0;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -6.2e-52)
		tmp = x;
	elseif (z <= 1.15e-26)
		tmp = 1.0;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.2e-52], x, If[LessEqual[z, 1.15e-26], 1.0, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-52}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-26}:\\
\;\;\;\;1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.1999999999999998e-52 or 1.15000000000000004e-26 < z

    1. Initial program 86.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative86.2%

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

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

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

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    6. Simplified34.1%

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

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

    if -6.1999999999999998e-52 < z < 1.15000000000000004e-26

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
    5. Step-by-step derivation
      1. associate-/l*50.6%

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

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

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
    8. Step-by-step derivation
      1. mul-1-neg50.6%

        \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
      2. unsub-neg50.6%

        \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
    9. Simplified50.6%

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-26}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 19.7% accurate, 17.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 92.6%

    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
  2. Step-by-step derivation
    1. *-commutative92.6%

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

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

    \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t \cdot z - x}}}{x + 1} \]
  5. Step-by-step derivation
    1. associate-/l*72.2%

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

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

    \[\leadsto \frac{x + \frac{y}{\color{blue}{t + -1 \cdot \frac{x}{z}}}}{x + 1} \]
  8. Step-by-step derivation
    1. mul-1-neg75.2%

      \[\leadsto \frac{x + \frac{y}{t + \color{blue}{\left(-\frac{x}{z}\right)}}}{x + 1} \]
    2. unsub-neg75.2%

      \[\leadsto \frac{x + \frac{y}{\color{blue}{t - \frac{x}{z}}}}{x + 1} \]
  9. Simplified75.2%

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

    \[\leadsto \color{blue}{1} \]
  11. Final simplification22.7%

    \[\leadsto 1 \]

Developer target: 99.9% accurate, 0.8× 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 2023278 
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
  :precision binary64

  :herbie-target
  (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))

  (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))