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

Percentage Accurate: 89.6% → 96.3%
Time: 14.7s
Alternatives: 10
Speedup: 0.2×

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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{z}{\frac{t_1}{y}}}{x + 1}\\ t_3 := \frac{x + \frac{y \cdot z - x}{t_1}}{x + 1}\\ \mathbf{if}\;t_3 \leq -6 \cdot 10^{-46}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+265}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x))
        (t_2 (/ (+ x (/ z (/ t_1 y))) (+ x 1.0)))
        (t_3 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
   (if (<= t_3 -6e-46)
     t_2
     (if (<= t_3 4e+265)
       t_3
       (if (<= t_3 INFINITY) t_2 (/ (+ x (/ y t)) (+ x 1.0)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (z / (t_1 / y))) / (x + 1.0);
	double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	double tmp;
	if (t_3 <= -6e-46) {
		tmp = t_2;
	} else if (t_3 <= 4e+265) {
		tmp = t_3;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = (x + (y / 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 t_2 = (x + (z / (t_1 / y))) / (x + 1.0);
	double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	double tmp;
	if (t_3 <= -6e-46) {
		tmp = t_2;
	} else if (t_3 <= 4e+265) {
		tmp = t_3;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	t_2 = (x + (z / (t_1 / y))) / (x + 1.0)
	t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0)
	tmp = 0
	if t_3 <= -6e-46:
		tmp = t_2
	elif t_3 <= 4e+265:
		tmp = t_3
	elif t_3 <= math.inf:
		tmp = t_2
	else:
		tmp = (x + (y / t)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	t_2 = Float64(Float64(x + Float64(z / Float64(t_1 / y))) / Float64(x + 1.0))
	t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0))
	tmp = 0.0
	if (t_3 <= -6e-46)
		tmp = t_2;
	elseif (t_3 <= 4e+265)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * t) - x;
	t_2 = (x + (z / (t_1 / y))) / (x + 1.0);
	t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	tmp = 0.0;
	if (t_3 <= -6e-46)
		tmp = t_2;
	elseif (t_3 <= 4e+265)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = t_2;
	else
		tmp = (x + (y / 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]}, Block[{t$95$2 = N[(N[(x + N[(z / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -6e-46], t$95$2, If[LessEqual[t$95$3, 4e+265], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+265}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999975e-46 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 4.00000000000000027e265

    1. Initial program 99.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{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 z around inf 100.0%

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

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

Alternative 2: 74.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t \leq -1.16 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-288}:\\ \;\;\;\;\frac{x - z \cdot \frac{y}{x}}{x + 1}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-285}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-201}:\\ \;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
   (if (<= t -1.16e-143)
     t_1
     (if (<= t -1.2e-288)
       (/ (- x (* z (/ y x))) (+ x 1.0))
       (if (<= t 5.6e-285)
         1.0
         (if (<= t 1.5e-201)
           (* (/ y (+ x 1.0)) (/ z (- (* z t) x)))
           (if (<= t 5.4e-151) 1.0 t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (t <= -1.16e-143) {
		tmp = t_1;
	} else if (t <= -1.2e-288) {
		tmp = (x - (z * (y / x))) / (x + 1.0);
	} else if (t <= 5.6e-285) {
		tmp = 1.0;
	} else if (t <= 1.5e-201) {
		tmp = (y / (x + 1.0)) * (z / ((z * t) - x));
	} else if (t <= 5.4e-151) {
		tmp = 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (y / t)) / (x + 1.0d0)
    if (t <= (-1.16d-143)) then
        tmp = t_1
    else if (t <= (-1.2d-288)) then
        tmp = (x - (z * (y / x))) / (x + 1.0d0)
    else if (t <= 5.6d-285) then
        tmp = 1.0d0
    else if (t <= 1.5d-201) then
        tmp = (y / (x + 1.0d0)) * (z / ((z * t) - x))
    else if (t <= 5.4d-151) then
        tmp = 1.0d0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (t <= -1.16e-143) {
		tmp = t_1;
	} else if (t <= -1.2e-288) {
		tmp = (x - (z * (y / x))) / (x + 1.0);
	} else if (t <= 5.6e-285) {
		tmp = 1.0;
	} else if (t <= 1.5e-201) {
		tmp = (y / (x + 1.0)) * (z / ((z * t) - x));
	} else if (t <= 5.4e-151) {
		tmp = 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (y / t)) / (x + 1.0)
	tmp = 0
	if t <= -1.16e-143:
		tmp = t_1
	elif t <= -1.2e-288:
		tmp = (x - (z * (y / x))) / (x + 1.0)
	elif t <= 5.6e-285:
		tmp = 1.0
	elif t <= 1.5e-201:
		tmp = (y / (x + 1.0)) * (z / ((z * t) - x))
	elif t <= 5.4e-151:
		tmp = 1.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	tmp = 0.0
	if (t <= -1.16e-143)
		tmp = t_1;
	elseif (t <= -1.2e-288)
		tmp = Float64(Float64(x - Float64(z * Float64(y / x))) / Float64(x + 1.0));
	elseif (t <= 5.6e-285)
		tmp = 1.0;
	elseif (t <= 1.5e-201)
		tmp = Float64(Float64(y / Float64(x + 1.0)) * Float64(z / Float64(Float64(z * t) - x)));
	elseif (t <= 5.4e-151)
		tmp = 1.0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x + (y / t)) / (x + 1.0);
	tmp = 0.0;
	if (t <= -1.16e-143)
		tmp = t_1;
	elseif (t <= -1.2e-288)
		tmp = (x - (z * (y / x))) / (x + 1.0);
	elseif (t <= 5.6e-285)
		tmp = 1.0;
	elseif (t <= 1.5e-201)
		tmp = (y / (x + 1.0)) * (z / ((z * t) - x));
	elseif (t <= 5.4e-151)
		tmp = 1.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.16e-143], t$95$1, If[LessEqual[t, -1.2e-288], N[(N[(x - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-285], 1.0, If[LessEqual[t, 1.5e-201], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-151], 1.0, t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-285}:\\
\;\;\;\;1\\

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

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-151}:\\
\;\;\;\;1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.16000000000000008e-143 or 5.40000000000000014e-151 < t

    1. Initial program 84.1%

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

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

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

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

    if -1.16000000000000008e-143 < t < -1.1999999999999999e-288

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x - z \cdot \color{blue}{\frac{-y}{x}}}{x + 1} \]
      11. add-sqr-sqrt18.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{x}}{x + 1} \]
      12. sqrt-unprod49.9%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{x}}{x + 1} \]
      13. sqr-neg49.9%

        \[\leadsto \frac{x - z \cdot \frac{\sqrt{\color{blue}{y \cdot y}}}{x}}{x + 1} \]
      14. sqrt-unprod41.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{x}}{x + 1} \]
      15. add-sqr-sqrt71.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{y}}{x}}{x + 1} \]
    11. Applied egg-rr71.8%

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

    if -1.1999999999999999e-288 < t < 5.59999999999999982e-285 or 1.50000000000000001e-201 < t < 5.40000000000000014e-151

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if 5.59999999999999982e-285 < t < 1.50000000000000001e-201

    1. Initial program 90.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.16 \cdot 10^{-143}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-288}:\\ \;\;\;\;\frac{x - z \cdot \frac{y}{x}}{x + 1}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-285}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-201}:\\ \;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 3: 79.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-260}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-150}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.99999999999999985e-143 or 1.12e-150 < t

    1. Initial program 84.1%

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

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

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

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

    if -2.99999999999999985e-143 < t < 2.3e-260 or 2.79999999999999991e-205 < t < 1.12e-150

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

    if 2.3e-260 < t < 2.79999999999999991e-205

    1. Initial program 83.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{-143}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-260}:\\ \;\;\;\;\frac{\left(x + 1\right) - \frac{y \cdot z}{x}}{x + 1}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-205}:\\ \;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-150}:\\ \;\;\;\;\frac{\left(x + 1\right) - \frac{y \cdot z}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 4: 79.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{-50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-28}:\\ \;\;\;\;\frac{x - \frac{x}{t_1}}{x + 1}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{t_1}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;\frac{x - z \cdot \frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ y t)) (+ x 1.0))))
   (if (<= z -3.1e-50)
     t_2
     (if (<= z 3.3e-28)
       (/ (- x (/ x t_1)) (+ x 1.0))
       (if (<= z 5.5e-18)
         (* (/ y (+ x 1.0)) (/ z t_1))
         (if (<= z 2.2e+66) (/ (- x (* z (/ y x))) (+ x 1.0)) t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (z <= -3.1e-50) {
		tmp = t_2;
	} else if (z <= 3.3e-28) {
		tmp = (x - (x / t_1)) / (x + 1.0);
	} else if (z <= 5.5e-18) {
		tmp = (y / (x + 1.0)) * (z / t_1);
	} else if (z <= 2.2e+66) {
		tmp = (x - (z * (y / x))) / (x + 1.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z * t) - x
    t_2 = (x + (y / t)) / (x + 1.0d0)
    if (z <= (-3.1d-50)) then
        tmp = t_2
    else if (z <= 3.3d-28) then
        tmp = (x - (x / t_1)) / (x + 1.0d0)
    else if (z <= 5.5d-18) then
        tmp = (y / (x + 1.0d0)) * (z / t_1)
    else if (z <= 2.2d+66) then
        tmp = (x - (z * (y / x))) / (x + 1.0d0)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (y / t)) / (x + 1.0);
	double tmp;
	if (z <= -3.1e-50) {
		tmp = t_2;
	} else if (z <= 3.3e-28) {
		tmp = (x - (x / t_1)) / (x + 1.0);
	} else if (z <= 5.5e-18) {
		tmp = (y / (x + 1.0)) * (z / t_1);
	} else if (z <= 2.2e+66) {
		tmp = (x - (z * (y / x))) / (x + 1.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	t_2 = (x + (y / t)) / (x + 1.0)
	tmp = 0
	if z <= -3.1e-50:
		tmp = t_2
	elif z <= 3.3e-28:
		tmp = (x - (x / t_1)) / (x + 1.0)
	elif z <= 5.5e-18:
		tmp = (y / (x + 1.0)) * (z / t_1)
	elif z <= 2.2e+66:
		tmp = (x - (z * (y / x))) / (x + 1.0)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	t_2 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -3.1e-50)
		tmp = t_2;
	elseif (z <= 3.3e-28)
		tmp = Float64(Float64(x - Float64(x / t_1)) / Float64(x + 1.0));
	elseif (z <= 5.5e-18)
		tmp = Float64(Float64(y / Float64(x + 1.0)) * Float64(z / t_1));
	elseif (z <= 2.2e+66)
		tmp = Float64(Float64(x - Float64(z * Float64(y / x))) / Float64(x + 1.0));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * t) - x;
	t_2 = (x + (y / t)) / (x + 1.0);
	tmp = 0.0;
	if (z <= -3.1e-50)
		tmp = t_2;
	elseif (z <= 3.3e-28)
		tmp = (x - (x / t_1)) / (x + 1.0);
	elseif (z <= 5.5e-18)
		tmp = (y / (x + 1.0)) * (z / t_1);
	elseif (z <= 2.2e+66)
		tmp = (x - (z * (y / x))) / (x + 1.0);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e-50], t$95$2, If[LessEqual[z, 3.3e-28], N[(N[(x - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-18], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+66], N[(N[(x - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-28}:\\
\;\;\;\;\frac{x - \frac{x}{t_1}}{x + 1}\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{t_1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.1000000000000002e-50 or 2.1999999999999998e66 < z

    1. Initial program 74.4%

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

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

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

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

    if -3.1000000000000002e-50 < z < 3.3000000000000002e-28

    1. Initial program 99.9%

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

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

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

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

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

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

    if 3.3000000000000002e-28 < z < 5.5e-18

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if 5.5e-18 < z < 2.1999999999999998e66

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x + z \cdot \color{blue}{\frac{-y}{x}}}{x + 1} \]
    10. Step-by-step derivation
      1. distribute-frac-neg69.3%

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

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

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

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

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

        \[\leadsto \frac{x + z \cdot \left(-\frac{\color{blue}{-y}}{x}\right)}{x + 1} \]
      7. distribute-rgt-neg-in41.9%

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

        \[\leadsto \frac{\color{blue}{x - z \cdot \frac{-y}{x}}}{x + 1} \]
      9. clear-num41.9%

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

        \[\leadsto \frac{x - z \cdot \color{blue}{\frac{-y}{x}}}{x + 1} \]
      11. add-sqr-sqrt27.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{x}}{x + 1} \]
      12. sqrt-unprod42.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{x}}{x + 1} \]
      13. sqr-neg42.8%

        \[\leadsto \frac{x - z \cdot \frac{\sqrt{\color{blue}{y \cdot y}}}{x}}{x + 1} \]
      14. sqrt-unprod34.7%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{x}}{x + 1} \]
      15. add-sqr-sqrt69.3%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{y}}{x}}{x + 1} \]
    11. Applied egg-rr69.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-50}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-28}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;\frac{x - z \cdot \frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 5: 85.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{-207} \lor \neg \left(z \leq 1.4 \cdot 10^{-131}\right):\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t_1}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - \frac{x}{t_1}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x)))
   (if (or (<= z -6.5e-207) (not (<= z 1.4e-131)))
     (/ (+ x (* z (/ y t_1))) (+ x 1.0))
     (/ (- x (/ x t_1)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double tmp;
	if ((z <= -6.5e-207) || !(z <= 1.4e-131)) {
		tmp = (x + (z * (y / t_1))) / (x + 1.0);
	} else {
		tmp = (x - (x / t_1)) / (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) :: t_1
    real(8) :: tmp
    t_1 = (z * t) - x
    if ((z <= (-6.5d-207)) .or. (.not. (z <= 1.4d-131))) then
        tmp = (x + (z * (y / t_1))) / (x + 1.0d0)
    else
        tmp = (x - (x / t_1)) / (x + 1.0d0)
    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 ((z <= -6.5e-207) || !(z <= 1.4e-131)) {
		tmp = (x + (z * (y / t_1))) / (x + 1.0);
	} else {
		tmp = (x - (x / t_1)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	tmp = 0
	if (z <= -6.5e-207) or not (z <= 1.4e-131):
		tmp = (x + (z * (y / t_1))) / (x + 1.0)
	else:
		tmp = (x - (x / t_1)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	tmp = 0.0
	if ((z <= -6.5e-207) || !(z <= 1.4e-131))
		tmp = Float64(Float64(x + Float64(z * Float64(y / t_1))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x - Float64(x / t_1)) / 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 ((z <= -6.5e-207) || ~((z <= 1.4e-131)))
		tmp = (x + (z * (y / t_1))) / (x + 1.0);
	else
		tmp = (x - (x / t_1)) / (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[Or[LessEqual[z, -6.5e-207], N[Not[LessEqual[z, 1.4e-131]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot t - x\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-207} \lor \neg \left(z \leq 1.4 \cdot 10^{-131}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t_1}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5000000000000001e-207 or 1.4e-131 < z

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

    if -6.5000000000000001e-207 < z < 1.4e-131

    1. Initial program 99.9%

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

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

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

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

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

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

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

Alternative 6: 85.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{-205} \lor \neg \left(z \leq 6.5 \cdot 10^{-129}\right):\\ \;\;\;\;\frac{x + \frac{z}{\frac{t_1}{y}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - \frac{x}{t_1}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x)))
   (if (or (<= z -2.5e-205) (not (<= z 6.5e-129)))
     (/ (+ x (/ z (/ t_1 y))) (+ x 1.0))
     (/ (- x (/ x t_1)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double tmp;
	if ((z <= -2.5e-205) || !(z <= 6.5e-129)) {
		tmp = (x + (z / (t_1 / y))) / (x + 1.0);
	} else {
		tmp = (x - (x / t_1)) / (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) :: t_1
    real(8) :: tmp
    t_1 = (z * t) - x
    if ((z <= (-2.5d-205)) .or. (.not. (z <= 6.5d-129))) then
        tmp = (x + (z / (t_1 / y))) / (x + 1.0d0)
    else
        tmp = (x - (x / t_1)) / (x + 1.0d0)
    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 ((z <= -2.5e-205) || !(z <= 6.5e-129)) {
		tmp = (x + (z / (t_1 / y))) / (x + 1.0);
	} else {
		tmp = (x - (x / t_1)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	tmp = 0
	if (z <= -2.5e-205) or not (z <= 6.5e-129):
		tmp = (x + (z / (t_1 / y))) / (x + 1.0)
	else:
		tmp = (x - (x / t_1)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	tmp = 0.0
	if ((z <= -2.5e-205) || !(z <= 6.5e-129))
		tmp = Float64(Float64(x + Float64(z / Float64(t_1 / y))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x - Float64(x / t_1)) / 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 ((z <= -2.5e-205) || ~((z <= 6.5e-129)))
		tmp = (x + (z / (t_1 / y))) / (x + 1.0);
	else
		tmp = (x - (x / t_1)) / (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[Or[LessEqual[z, -2.5e-205], N[Not[LessEqual[z, 6.5e-129]], $MachinePrecision]], N[(N[(x + N[(z / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot t - x\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-205} \lor \neg \left(z \leq 6.5 \cdot 10^{-129}\right):\\
\;\;\;\;\frac{x + \frac{z}{\frac{t_1}{y}}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5e-205 or 6.49999999999999952e-129 < z

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5e-205 < z < 6.49999999999999952e-129

    1. Initial program 99.9%

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

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

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

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

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

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

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

Alternative 7: 75.1% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-151}:\\
\;\;\;\;1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.6e-144 or 5.40000000000000014e-151 < t

    1. Initial program 84.1%

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

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

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

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

    if -4.6e-144 < t < -5.4999999999999998e-287

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x - z \cdot \color{blue}{\frac{-y}{x}}}{x + 1} \]
      11. add-sqr-sqrt18.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{x}}{x + 1} \]
      12. sqrt-unprod49.9%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{x}}{x + 1} \]
      13. sqr-neg49.9%

        \[\leadsto \frac{x - z \cdot \frac{\sqrt{\color{blue}{y \cdot y}}}{x}}{x + 1} \]
      14. sqrt-unprod41.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{x}}{x + 1} \]
      15. add-sqr-sqrt71.8%

        \[\leadsto \frac{x - z \cdot \frac{\color{blue}{y}}{x}}{x + 1} \]
    11. Applied egg-rr71.8%

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

    if -5.4999999999999998e-287 < t < 5.40000000000000014e-151

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{-144}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-287}:\\ \;\;\;\;\frac{x - z \cdot \frac{y}{x}}{x + 1}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 8: 74.0% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000003e-181 or 8.2000000000000002e-151 < t

    1. Initial program 84.3%

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

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

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

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

    if -2.10000000000000003e-181 < t < 8.2000000000000002e-151

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 67.7% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.2000000000000001e-25 or 7.79999999999999975e-99 < x

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e-25 < x < 7.79999999999999975e-99

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{-25}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-99}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 10: 53.2% 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 86.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  8. Final simplification57.0%

    \[\leadsto 1 \]

Developer target: 99.5% 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 2023301 
(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)))