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

Percentage Accurate: 89.1% → 98.7%
Time: 9.4s
Alternatives: 12
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 12 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.1% 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.7% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 2: 94.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.25 \cdot 10^{+125} \lor \neg \left(z \leq 6.4 \cdot 10^{+134}\right):\\
\;\;\;\;\left(\frac{y}{t \cdot \left(x + 1\right)} + \frac{x}{x + 1}\right) - \frac{x}{\left(z \cdot t\right) \cdot \left(x + 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2499999999999999e125 or 6.4000000000000001e134 < z

    1. Initial program 64.8%

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

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

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

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

    if -3.2499999999999999e125 < z < 6.4000000000000001e134

    1. Initial program 98.4%

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

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

Alternative 3: 94.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+125} \lor \neg \left(z \leq 1.9 \cdot 10^{+140}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.19999999999999983e125 or 1.9e140 < z

    1. Initial program 65.6%

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

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

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

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

    if -3.19999999999999983e125 < z < 1.9e140

    1. Initial program 97.9%

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

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

Alternative 4: 68.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{x + 1}\\ t_2 := y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-157}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-35}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-12}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (+ x 1.0))) (t_2 (* y (/ z (- (* z t) x)))))
   (if (<= x -1.8e-84)
     t_1
     (if (<= x 4.1e-157)
       t_2
       (if (<= x 7.2e-35) 1.0 (if (<= x 5e-12) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (x + 1.0);
	double t_2 = y * (z / ((z * t) - x));
	double tmp;
	if (x <= -1.8e-84) {
		tmp = t_1;
	} else if (x <= 4.1e-157) {
		tmp = t_2;
	} else if (x <= 7.2e-35) {
		tmp = 1.0;
	} else if (x <= 5e-12) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / (x + 1.0d0)
    t_2 = y * (z / ((z * t) - x))
    if (x <= (-1.8d-84)) then
        tmp = t_1
    else if (x <= 4.1d-157) then
        tmp = t_2
    else if (x <= 7.2d-35) then
        tmp = 1.0d0
    else if (x <= 5d-12) then
        tmp = t_2
    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 / (x + 1.0);
	double t_2 = y * (z / ((z * t) - x));
	double tmp;
	if (x <= -1.8e-84) {
		tmp = t_1;
	} else if (x <= 4.1e-157) {
		tmp = t_2;
	} else if (x <= 7.2e-35) {
		tmp = 1.0;
	} else if (x <= 5e-12) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (x + 1.0)
	t_2 = y * (z / ((z * t) - x))
	tmp = 0
	if x <= -1.8e-84:
		tmp = t_1
	elif x <= 4.1e-157:
		tmp = t_2
	elif x <= 7.2e-35:
		tmp = 1.0
	elif x <= 5e-12:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(x + 1.0))
	t_2 = Float64(y * Float64(z / Float64(Float64(z * t) - x)))
	tmp = 0.0
	if (x <= -1.8e-84)
		tmp = t_1;
	elseif (x <= 4.1e-157)
		tmp = t_2;
	elseif (x <= 7.2e-35)
		tmp = 1.0;
	elseif (x <= 5e-12)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (x + 1.0);
	t_2 = y * (z / ((z * t) - x));
	tmp = 0.0;
	if (x <= -1.8e-84)
		tmp = t_1;
	elseif (x <= 4.1e-157)
		tmp = t_2;
	elseif (x <= 7.2e-35)
		tmp = 1.0;
	elseif (x <= 5e-12)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e-84], t$95$1, If[LessEqual[x, 4.1e-157], t$95$2, If[LessEqual[x, 7.2e-35], 1.0, If[LessEqual[x, 5e-12], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 4.1 \cdot 10^{-157}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 7.2 \cdot 10^{-35}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 5 \cdot 10^{-12}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.80000000000000002e-84 or 4.9999999999999997e-12 < x

    1. Initial program 87.3%

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

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

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

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

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

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

    if -1.80000000000000002e-84 < x < 4.1000000000000002e-157 or 7.20000000000000038e-35 < x < 4.9999999999999997e-12

    1. Initial program 89.2%

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Taylor expanded in y around inf 58.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. *-commutative58.8%

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

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

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

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

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

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

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

    if 4.1000000000000002e-157 < x < 7.20000000000000038e-35

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-157}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-35}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]

Alternative 5: 68.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 4.1 \cdot 10^{-157}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 9.6 \cdot 10^{-34}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{-21}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.85e-84

    1. Initial program 91.4%

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

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

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

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

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

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

    if -1.85e-84 < x < 4.1000000000000002e-157 or 9.59999999999999965e-34 < x < 1.6000000000000001e-21

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.1000000000000002e-157 < x < 9.59999999999999965e-34

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

    if 1.6000000000000001e-21 < x

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{1 - \frac{y \cdot z}{{x}^{2}}} \]
      3. associate-/l*79.3%

        \[\leadsto 1 - \color{blue}{\frac{y}{\frac{{x}^{2}}{z}}} \]
      4. unpow279.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-157}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{-34}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-21}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{y}{\frac{x \cdot x}{z}}\\ \end{array} \]

Alternative 6: 68.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ \mathbf{if}\;x \leq -1.45 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{\frac{t_1}{z}}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-36}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \frac{z}{t_1}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{y}{\frac{x \cdot x}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x)))
   (if (<= x -1.45e-84)
     (/ x (+ x 1.0))
     (if (<= x 3.6e-157)
       (/ y (/ t_1 z))
       (if (<= x 1.35e-36)
         1.0
         (if (<= x 1.15e-19) (* y (/ z t_1)) (- 1.0 (/ y (/ (* x x) z)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double tmp;
	if (x <= -1.45e-84) {
		tmp = x / (x + 1.0);
	} else if (x <= 3.6e-157) {
		tmp = y / (t_1 / z);
	} else if (x <= 1.35e-36) {
		tmp = 1.0;
	} else if (x <= 1.15e-19) {
		tmp = y * (z / t_1);
	} else {
		tmp = 1.0 - (y / ((x * x) / z));
	}
	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 = (z * t) - x
    if (x <= (-1.45d-84)) then
        tmp = x / (x + 1.0d0)
    else if (x <= 3.6d-157) then
        tmp = y / (t_1 / z)
    else if (x <= 1.35d-36) then
        tmp = 1.0d0
    else if (x <= 1.15d-19) then
        tmp = y * (z / t_1)
    else
        tmp = 1.0d0 - (y / ((x * x) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double tmp;
	if (x <= -1.45e-84) {
		tmp = x / (x + 1.0);
	} else if (x <= 3.6e-157) {
		tmp = y / (t_1 / z);
	} else if (x <= 1.35e-36) {
		tmp = 1.0;
	} else if (x <= 1.15e-19) {
		tmp = y * (z / t_1);
	} else {
		tmp = 1.0 - (y / ((x * x) / z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	tmp = 0
	if x <= -1.45e-84:
		tmp = x / (x + 1.0)
	elif x <= 3.6e-157:
		tmp = y / (t_1 / z)
	elif x <= 1.35e-36:
		tmp = 1.0
	elif x <= 1.15e-19:
		tmp = y * (z / t_1)
	else:
		tmp = 1.0 - (y / ((x * x) / z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	tmp = 0.0
	if (x <= -1.45e-84)
		tmp = Float64(x / Float64(x + 1.0));
	elseif (x <= 3.6e-157)
		tmp = Float64(y / Float64(t_1 / z));
	elseif (x <= 1.35e-36)
		tmp = 1.0;
	elseif (x <= 1.15e-19)
		tmp = Float64(y * Float64(z / t_1));
	else
		tmp = Float64(1.0 - Float64(y / Float64(Float64(x * x) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * t) - x;
	tmp = 0.0;
	if (x <= -1.45e-84)
		tmp = x / (x + 1.0);
	elseif (x <= 3.6e-157)
		tmp = y / (t_1 / z);
	elseif (x <= 1.35e-36)
		tmp = 1.0;
	elseif (x <= 1.15e-19)
		tmp = y * (z / t_1);
	else
		tmp = 1.0 - (y / ((x * x) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[x, -1.45e-84], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-157], N[(y / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e-36], 1.0, If[LessEqual[x, 1.15e-19], N[(y * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[(N[(x * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 3.6 \cdot 10^{-157}:\\
\;\;\;\;\frac{y}{\frac{t_1}{z}}\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{-36}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 1.15 \cdot 10^{-19}:\\
\;\;\;\;y \cdot \frac{z}{t_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.4500000000000001e-84

    1. Initial program 91.4%

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

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

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

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

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

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

    if -1.4500000000000001e-84 < x < 3.6e-157

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

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

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

        \[\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 x around 0 59.0%

      \[\leadsto \color{blue}{y} \cdot \frac{z}{t \cdot z - x} \]
    8. Taylor expanded in y around 0 56.2%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot z - x}} \]
    9. Step-by-step derivation
      1. fma-neg56.2%

        \[\leadsto \frac{y \cdot z}{\color{blue}{\mathsf{fma}\left(t, z, -x\right)}} \]
      2. associate-/l*59.2%

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

        \[\leadsto \frac{y}{\frac{\color{blue}{t \cdot z - x}}{z}} \]
    10. Simplified59.2%

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

    if 3.6e-157 < x < 1.35000000000000004e-36

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

    if 1.35000000000000004e-36 < x < 1.1499999999999999e-19

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.1499999999999999e-19 < x

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{1 - \frac{y \cdot z}{{x}^{2}}} \]
      3. associate-/l*79.3%

        \[\leadsto 1 - \color{blue}{\frac{y}{\frac{{x}^{2}}{z}}} \]
      4. unpow279.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{\frac{z \cdot t - x}{z}}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-36}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{y}{\frac{x \cdot x}{z}}\\ \end{array} \]

Alternative 7: 82.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-39} \lor \neg \left(t \leq 5.9 \cdot 10^{-36}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.5e-39 or 5.89999999999999995e-36 < t

    1. Initial program 83.9%

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

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

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

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

    if -3.5e-39 < t < 5.89999999999999995e-36

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 75.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-113} \lor \neg \left(t \leq 1.32 \cdot 10^{-176}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.20000000000000024e-113 or 1.32e-176 < t

    1. Initial program 84.6%

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

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

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

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

    if -6.20000000000000024e-113 < t < 1.32e-176

    1. Initial program 95.9%

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

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

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

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

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

        \[\leadsto \color{blue}{1 - \frac{y \cdot z - t \cdot z}{{x}^{2}}} \]
      3. distribute-rgt-out--61.1%

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

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

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

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

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

Alternative 9: 75.1% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.90000000000000001e-109 or 2.1e-182 < t

    1. Initial program 84.6%

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

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

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

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

    if -1.90000000000000001e-109 < t < 2.1e-182

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{1 - \frac{y \cdot z}{{x}^{2}}} \]
      3. associate-/l*62.6%

        \[\leadsto 1 - \color{blue}{\frac{y}{\frac{{x}^{2}}{z}}} \]
      4. unpow262.6%

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

      \[\leadsto \color{blue}{1 - \frac{y}{\frac{x \cdot x}{z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.8%

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

Alternative 10: 67.4% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0066:\\
\;\;\;\;1\\

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

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


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

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

    if -0.0066 < x < 1.5999999999999999e-111

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

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

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

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

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

Alternative 11: 67.5% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{x + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.80000000000000009e-114

    1. Initial program 91.7%

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

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

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

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

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

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

    if -1.80000000000000009e-114 < x < 8.99999999999999987e-111

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

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

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

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

    if 8.99999999999999987e-111 < x

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 53.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 87.8%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  7. Final simplification54.3%

    \[\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 2023200 
(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)))