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

Percentage Accurate: 89.5% → 95.6%
Time: 13.7s
Alternatives: 12
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 95.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

    if 2.0000000000000002e302 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 43.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{y}{1 + x} - -1 \cdot \frac{x}{z \cdot \left(1 + x\right)}}{t} + \frac{x}{1 + x}} \]
  3. Recombined 3 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 -5 \cdot 10^{+199}:\\ \;\;\;\;\frac{x}{x + 1} + \left(\frac{y}{t \cdot \left(x + 1\right)} - \frac{\frac{x}{t}}{z \cdot \left(x + 1\right)}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 2 \cdot 10^{+302}:\\ \;\;\;\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{x + 1} - \frac{x}{z \cdot \left(x + 1\right)}}{t}\\ \end{array} \]

Alternative 2: 95.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+199} \lor \neg \left(t_1 \leq 2 \cdot 10^{+302}\right):\\
\;\;\;\;\frac{x}{x + 1} + \left(\frac{y}{t \cdot \left(x + 1\right)} - \frac{\frac{x}{t}}{z \cdot \left(x + 1\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -4.9999999999999998e199 or 2.0000000000000002e302 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
  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 -5 \cdot 10^{+199} \lor \neg \left(\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 2 \cdot 10^{+302}\right):\\ \;\;\;\;\frac{x}{x + 1} + \left(\frac{y}{t \cdot \left(x + 1\right)} - \frac{\frac{x}{t}}{z \cdot \left(x + 1\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \end{array} \]

Alternative 3: 95.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+199} \lor \neg \left(t_1 \leq 2 \cdot 10^{+302}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -4.9999999999999998e199 or 2.0000000000000002e302 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 51.2%

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

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

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

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

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

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
  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 -5 \cdot 10^{+199} \lor \neg \left(\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 2 \cdot 10^{+302}\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: 80.4% accurate, 0.7× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 370000000:\\
\;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.7999999999999999e-60 or 3.7e8 < z

    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. Taylor expanded in z around inf 85.4%

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

    if -5.7999999999999999e-60 < z < -4.40000000000000001e-279

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

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

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

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

    if -4.40000000000000001e-279 < z < 4.8000000000000002e-197

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000002e-197 < z < 4.50000000000000024e-36

    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. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{1}{-\left(\frac{t}{\frac{x}{z}} + \left(-\color{blue}{1}\right)\right)}}{x + 1} \]
      6. metadata-eval87.1%

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

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

    if 4.50000000000000024e-36 < z < 3.7e8

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \frac{x + -1 \cdot \frac{\color{blue}{\mathsf{fma}\left(y, z, -x\right)}}{x}}{x + 1} \]
      2. associate-*r/91.0%

        \[\leadsto \frac{x + \color{blue}{\frac{-1 \cdot \mathsf{fma}\left(y, z, -x\right)}{x}}}{x + 1} \]
      3. neg-mul-191.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-60}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-279}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-197}:\\ \;\;\;\;\frac{x + \left(1 + \frac{z \cdot \left(t - y\right)}{x}\right)}{x + 1}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{x + \frac{1}{\left(--1\right) - \frac{t}{\frac{x}{z}}}}{x + 1}\\ \mathbf{elif}\;z \leq 370000000:\\ \;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 5: 80.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ t_2 := \frac{x + \frac{y}{t}}{x + 1}\\ t_3 := \frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\ \mathbf{if}\;z \leq -1.32 \cdot 10^{-61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-290}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 380000000000:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (- x (/ x (- (* z t) x))) (+ x 1.0)))
        (t_2 (/ (+ x (/ y t)) (+ x 1.0)))
        (t_3 (/ (+ x (/ (- x (* y z)) x)) (+ x 1.0))))
   (if (<= z -1.32e-61)
     t_2
     (if (<= z -4e-290)
       t_1
       (if (<= z 1.75e-183)
         t_3
         (if (<= z 6.5e-36) t_1 (if (<= z 380000000000.0) t_3 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x - (x / ((z * t) - x))) / (x + 1.0);
	double t_2 = (x + (y / t)) / (x + 1.0);
	double t_3 = (x + ((x - (y * z)) / x)) / (x + 1.0);
	double tmp;
	if (z <= -1.32e-61) {
		tmp = t_2;
	} else if (z <= -4e-290) {
		tmp = t_1;
	} else if (z <= 1.75e-183) {
		tmp = t_3;
	} else if (z <= 6.5e-36) {
		tmp = t_1;
	} else if (z <= 380000000000.0) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = (x - (x / ((z * t) - x))) / (x + 1.0d0)
    t_2 = (x + (y / t)) / (x + 1.0d0)
    t_3 = (x + ((x - (y * z)) / x)) / (x + 1.0d0)
    if (z <= (-1.32d-61)) then
        tmp = t_2
    else if (z <= (-4d-290)) then
        tmp = t_1
    else if (z <= 1.75d-183) then
        tmp = t_3
    else if (z <= 6.5d-36) then
        tmp = t_1
    else if (z <= 380000000000.0d0) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x - (x / ((z * t) - x))) / (x + 1.0);
	double t_2 = (x + (y / t)) / (x + 1.0);
	double t_3 = (x + ((x - (y * z)) / x)) / (x + 1.0);
	double tmp;
	if (z <= -1.32e-61) {
		tmp = t_2;
	} else if (z <= -4e-290) {
		tmp = t_1;
	} else if (z <= 1.75e-183) {
		tmp = t_3;
	} else if (z <= 6.5e-36) {
		tmp = t_1;
	} else if (z <= 380000000000.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x - (x / ((z * t) - x))) / (x + 1.0)
	t_2 = (x + (y / t)) / (x + 1.0)
	t_3 = (x + ((x - (y * z)) / x)) / (x + 1.0)
	tmp = 0
	if z <= -1.32e-61:
		tmp = t_2
	elif z <= -4e-290:
		tmp = t_1
	elif z <= 1.75e-183:
		tmp = t_3
	elif z <= 6.5e-36:
		tmp = t_1
	elif z <= 380000000000.0:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x - Float64(x / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
	t_2 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0))
	t_3 = Float64(Float64(x + Float64(Float64(x - Float64(y * z)) / x)) / Float64(x + 1.0))
	tmp = 0.0
	if (z <= -1.32e-61)
		tmp = t_2;
	elseif (z <= -4e-290)
		tmp = t_1;
	elseif (z <= 1.75e-183)
		tmp = t_3;
	elseif (z <= 6.5e-36)
		tmp = t_1;
	elseif (z <= 380000000000.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x - (x / ((z * t) - x))) / (x + 1.0);
	t_2 = (x + (y / t)) / (x + 1.0);
	t_3 = (x + ((x - (y * z)) / x)) / (x + 1.0);
	tmp = 0.0;
	if (z <= -1.32e-61)
		tmp = t_2;
	elseif (z <= -4e-290)
		tmp = t_1;
	elseif (z <= 1.75e-183)
		tmp = t_3;
	elseif (z <= 6.5e-36)
		tmp = t_1;
	elseif (z <= 380000000000.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(x / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.32e-61], t$95$2, If[LessEqual[z, -4e-290], t$95$1, If[LessEqual[z, 1.75e-183], t$95$3, If[LessEqual[z, 6.5e-36], t$95$1, If[LessEqual[z, 380000000000.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-290}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-183}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 380000000000:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.32000000000000002e-61 or 3.8e11 < z

    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. Taylor expanded in z around inf 85.4%

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

    if -1.32000000000000002e-61 < z < -4.0000000000000003e-290 or 1.74999999999999996e-183 < z < 6.50000000000000012e-36

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

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

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

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

    if -4.0000000000000003e-290 < z < 1.74999999999999996e-183 or 6.50000000000000012e-36 < z < 3.8e11

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{-1 \cdot \mathsf{fma}\left(y, z, -x\right)}{x}}}{x + 1} \]
      3. neg-mul-188.7%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{\color{blue}{\left(-\left(-x\right)\right)} - y \cdot z}{x}}{x + 1} \]
      9. remove-double-neg88.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{-61}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-290}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-183}:\\ \;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq 380000000000:\\ \;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 6: 80.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-286}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 26000000:\\
\;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.1999999999999999e-65 or 2.6e7 < z

    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. Taylor expanded in z around inf 85.4%

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

    if -3.1999999999999999e-65 < z < -2.8e-286 or 4.8000000000000002e-197 < z < 6.8000000000000005e-36

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

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

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

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

    if -2.8e-286 < z < 4.8000000000000002e-197

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8000000000000005e-36 < z < 2.6e7

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \frac{x + -1 \cdot \frac{\color{blue}{\mathsf{fma}\left(y, z, -x\right)}}{x}}{x + 1} \]
      2. associate-*r/91.0%

        \[\leadsto \frac{x + \color{blue}{\frac{-1 \cdot \mathsf{fma}\left(y, z, -x\right)}{x}}}{x + 1} \]
      3. neg-mul-191.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-65}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-286}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-197}:\\ \;\;\;\;\frac{x + \left(1 + \frac{z \cdot \left(t - y\right)}{x}\right)}{x + 1}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-36}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;z \leq 26000000:\\ \;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 7: 84.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+32} \lor \neg \left(t \leq 1.3 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.0000000000000002e32 or 1.29999999999999998e-14 < t

    1. Initial program 89.3%

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

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

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

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

    if -7.0000000000000002e32 < t < 1.29999999999999998e-14

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.9999999999999997e-178 or 4.3e8 < z

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

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

    if -5.9999999999999997e-178 < z < 4.3e8

    1. Initial program 99.9%

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

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

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

      \[\leadsto \frac{x + \color{blue}{-1 \cdot \frac{y \cdot z - x}{x}}}{x + 1} \]
    5. Step-by-step derivation
      1. fma-neg81.1%

        \[\leadsto \frac{x + -1 \cdot \frac{\color{blue}{\mathsf{fma}\left(y, z, -x\right)}}{x}}{x + 1} \]
      2. associate-*r/81.1%

        \[\leadsto \frac{x + \color{blue}{\frac{-1 \cdot \mathsf{fma}\left(y, z, -x\right)}{x}}}{x + 1} \]
      3. neg-mul-181.1%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 77.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+73}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+15}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.84999999999999987e73

    1. Initial program 95.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{1}{t}, x\right)}}{x + 1} \]
    6. Applied egg-rr74.5%

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

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

    if -1.84999999999999987e73 < x < 2.05e15

    1. Initial program 92.7%

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

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

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

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

    if 2.05e15 < x

    1. Initial program 92.0%

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{1 + \color{blue}{\left(-\frac{y}{t}\right)}}{x} \]
      4. sub-neg75.0%

        \[\leadsto 1 - \frac{\color{blue}{1 - \frac{y}{t}}}{x} \]
    7. Simplified75.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+73}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+15}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 10: 67.3% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5499999999999998e-43 or 4.4000000000000002e-117 < x

    1. Initial program 94.0%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{1}{t}, x\right)}}{x + 1} \]
    6. Applied egg-rr70.0%

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

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

    if -2.5499999999999998e-43 < x < 4.4000000000000002e-117

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

    if -3.7999999999999997e-58 < x < 4.5e-118

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5e-118 < x

    1. Initial program 94.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{1}{t}, x\right)}}{x + 1} \]
    6. Applied egg-rr68.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{-58}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-118}:\\ \;\;\;\;\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 93.0%

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

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

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

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

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

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

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

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

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

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