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

Percentage Accurate: 89.8% → 95.9%
Time: 14.9s
Alternatives: 10
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 89.8% accurate, 1.0× speedup?

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

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

Alternative 1: 95.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+216}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\right) - \frac{x}{t \cdot \left(z \cdot \left(x + 1\right)\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
   (if (<= t_1 (- INFINITY))
     (/ (+ x (/ y t)) (+ x 1.0))
     (if (<= t_1 5e+216)
       t_1
       (-
        (+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0))))
        (/ x (* t (* z (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else if (t_1 <= 5e+216) {
		tmp = t_1;
	} else {
		tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) - (x / (t * (z * (x + 1.0))));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else if (t_1 <= 5e+216) {
		tmp = t_1;
	} else {
		tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) - (x / (t * (z * (x + 1.0))));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x + (y / t)) / (x + 1.0)
	elif t_1 <= 5e+216:
		tmp = t_1
	else:
		tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) - (x / (t * (z * (x + 1.0))))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	elseif (t_1 <= 5e+216)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))) - Float64(x / Float64(t * Float64(z * Float64(x + 1.0)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x + (y / t)) / (x + 1.0);
	elseif (t_1 <= 5e+216)
		tmp = t_1;
	else
		tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) - (x / (t * (z * (x + 1.0))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+216], t$95$1, N[(N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(t * N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+216}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 4.9999999999999998e216

    1. Initial program 99.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]

    if 4.9999999999999998e216 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 27.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq -\infty:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 5 \cdot 10^{+216}:\\ \;\;\;\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\right) - \frac{x}{t \cdot \left(z \cdot \left(x + 1\right)\right)}\\ \end{array} \]

Alternative 2: 95.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+216}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{-1}{\frac{-t}{y}}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
   (if (<= t_1 (- INFINITY))
     (/ (+ x (/ y t)) (+ x 1.0))
     (if (<= t_1 5e+216) t_1 (/ (+ x (/ -1.0 (/ (- t) y))) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else if (t_1 <= 5e+216) {
		tmp = t_1;
	} else {
		tmp = (x + (-1.0 / (-t / y))) / (x + 1.0);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else if (t_1 <= 5e+216) {
		tmp = t_1;
	} else {
		tmp = (x + (-1.0 / (-t / y))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x + (y / t)) / (x + 1.0)
	elif t_1 <= 5e+216:
		tmp = t_1
	else:
		tmp = (x + (-1.0 / (-t / y))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	elseif (t_1 <= 5e+216)
		tmp = t_1;
	else
		tmp = Float64(Float64(x + Float64(-1.0 / Float64(Float64(-t) / y))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x + (y / t)) / (x + 1.0);
	elseif (t_1 <= 5e+216)
		tmp = t_1;
	else
		tmp = (x + (-1.0 / (-t / y))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+216], t$95$1, N[(N[(x + N[(-1.0 / N[((-t) / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+216}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 4.9999999999999998e216

    1. Initial program 99.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]

    if 4.9999999999999998e216 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 27.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq -\infty:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 5 \cdot 10^{+216}:\\ \;\;\;\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{-1}{\frac{-t}{y}}}{x + 1}\\ \end{array} \]

Alternative 3: 82.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.60000000000000025e-154 or 2.10000000000000006e-56 < t

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.60000000000000025e-154 < t < 2.10000000000000006e-56

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{y}{t}}{x + 1} + \frac{x}{x + 1}\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-56}:\\
\;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.69999999999999976e-97

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{x + 1} - \frac{\frac{x - y \cdot z}{z \cdot t - x}}{x + 1}} \]
      2. associate-/l/85.4%

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

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

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

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

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

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

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

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

    if -3.69999999999999976e-97 < z < 6.59999999999999967e-56

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.59999999999999967e-56 < z

    1. Initial program 77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative83.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1} + \frac{x}{x + 1}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-56}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 5: 75.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1} + \frac{x}{x + 1}\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{-188}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.1e-97)
   (+ (/ (/ y t) (+ x 1.0)) (/ x (+ x 1.0)))
   (if (<= z 2.65e-188) 1.0 (/ (+ x (/ y t)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.1e-97) {
		tmp = ((y / t) / (x + 1.0)) + (x / (x + 1.0));
	} else if (z <= 2.65e-188) {
		tmp = 1.0;
	} else {
		tmp = (x + (y / t)) / (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.1d-97)) then
        tmp = ((y / t) / (x + 1.0d0)) + (x / (x + 1.0d0))
    else if (z <= 2.65d-188) then
        tmp = 1.0d0
    else
        tmp = (x + (y / t)) / (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.1e-97) {
		tmp = ((y / t) / (x + 1.0)) + (x / (x + 1.0));
	} else if (z <= 2.65e-188) {
		tmp = 1.0;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.1e-97:
		tmp = ((y / t) / (x + 1.0)) + (x / (x + 1.0))
	elif z <= 2.65e-188:
		tmp = 1.0
	else:
		tmp = (x + (y / t)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.1e-97)
		tmp = Float64(Float64(Float64(y / t) / Float64(x + 1.0)) + Float64(x / Float64(x + 1.0)));
	elseif (z <= 2.65e-188)
		tmp = 1.0;
	else
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.1e-97)
		tmp = ((y / t) / (x + 1.0)) + (x / (x + 1.0));
	elseif (z <= 2.65e-188)
		tmp = 1.0;
	else
		tmp = (x + (y / t)) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.1e-97], N[(N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e-188], 1.0, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{y}{t}}{x + 1} + \frac{x}{x + 1}\\

\mathbf{elif}\;z \leq 2.65 \cdot 10^{-188}:\\
\;\;\;\;1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0999999999999999e-97

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{x + 1} - \frac{\frac{x - y \cdot z}{z \cdot t - x}}{x + 1}} \]
      2. associate-/l/85.4%

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

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

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

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

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

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

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

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

    if -1.0999999999999999e-97 < z < 2.65000000000000007e-188

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.65000000000000007e-188 < z

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative77.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1} + \frac{x}{x + 1}\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{-188}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 6: 75.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-98} \lor \neg \left(z \leq 2.65 \cdot 10^{-188}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7000000000000001e-98 or 2.65000000000000007e-188 < z

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative82.0%

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

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

    if -1.7000000000000001e-98 < z < 2.65000000000000007e-188

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-70}:\\
\;\;\;\;1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.90000000000000019e-70 or 1.1e-111 < x

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.90000000000000019e-70 < x < 1.1e-111

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-111}:\\ \;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 8: 67.4% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 10^{-111}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -3.9e-70) 1.0 (if (<= x 1e-111) (/ y t) 1.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.9e-70) {
		tmp = 1.0;
	} else if (x <= 1e-111) {
		tmp = y / t;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-3.9d-70)) then
        tmp = 1.0d0
    else if (x <= 1d-111) then
        tmp = y / t
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.9e-70) {
		tmp = 1.0;
	} else if (x <= 1e-111) {
		tmp = y / t;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -3.9e-70:
		tmp = 1.0
	elif x <= 1e-111:
		tmp = y / t
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -3.9e-70)
		tmp = 1.0;
	elseif (x <= 1e-111)
		tmp = Float64(y / t);
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -3.9e-70)
		tmp = 1.0;
	elseif (x <= 1e-111)
		tmp = y / t;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.9e-70], 1.0, If[LessEqual[x, 1e-111], N[(y / t), $MachinePrecision], 1.0]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-70}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 10^{-111}:\\
\;\;\;\;\frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.90000000000000019e-70 or 1.00000000000000009e-111 < x

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.90000000000000019e-70 < x < 1.00000000000000009e-111

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 10^{-111}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 9: 56.6% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.35 \cdot 10^{-79}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -3.35e-79) 1.0 (if (<= x 2.45e-107) x 1.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.35e-79) {
		tmp = 1.0;
	} else if (x <= 2.45e-107) {
		tmp = x;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-3.35d-79)) then
        tmp = 1.0d0
    else if (x <= 2.45d-107) then
        tmp = x
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.35e-79) {
		tmp = 1.0;
	} else if (x <= 2.45e-107) {
		tmp = x;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -3.35e-79:
		tmp = 1.0
	elif x <= 2.45e-107:
		tmp = x
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -3.35e-79)
		tmp = 1.0;
	elseif (x <= 2.45e-107)
		tmp = x;
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -3.35e-79)
		tmp = 1.0;
	elseif (x <= 2.45e-107)
		tmp = x;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.35e-79], 1.0, If[LessEqual[x, 2.45e-107], x, 1.0]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.35 \cdot 10^{-79}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 2.45 \cdot 10^{-107}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.35000000000000009e-79 or 2.4499999999999999e-107 < x

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.35000000000000009e-79 < x < 2.4499999999999999e-107

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.35 \cdot 10^{-79}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 10: 53.9% 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 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  5. Final simplification55.9%

    \[\leadsto 1 \]

Developer target: 99.6% 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 2023336 
(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)))