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

Percentage Accurate: 89.2% → 98.6%
Time: 10.3s
Alternatives: 13
Speedup: 0.5×

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

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

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

Alternative 1: 98.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{t_1}}{x + 1} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t_1}, x - \frac{x}{t_1}\right)}{x + 1}\\ \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)))
   (if (<= (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0)) INFINITY)
     (/ (fma y (/ z t_1) (- x (/ x t_1))) (+ x 1.0))
     (/ (+ x (/ y t)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double tmp;
	if (((x + (((y * z) - x) / t_1)) / (x + 1.0)) <= ((double) INFINITY)) {
		tmp = fma(y, (z / t_1), (x - (x / t_1))) / (x + 1.0);
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	tmp = 0.0
	if (Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) <= Inf)
		tmp = Float64(fma(y, Float64(z / t_1), Float64(x - Float64(x / t_1))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y * N[(z / t$95$1), $MachinePrecision] + N[(x - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 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)) < +inf.0

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 2: 94.7% accurate, 0.5× 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^{+290}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
   (if (<= t_1 5e+290) t_1 (/ (+ x (/ y t)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_1 <= 5e+290) {
		tmp = t_1;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)
    if (t_1 <= 5d+290) then
        tmp = t_1
    else
        tmp = (x + (y / t)) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	double tmp;
	if (t_1 <= 5e+290) {
		tmp = t_1;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0)
	tmp = 0
	if t_1 <= 5e+290:
		tmp = t_1
	else:
		tmp = (x + (y / t)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0))
	tmp = 0.0
	if (t_1 <= 5e+290)
		tmp = t_1;
	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 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
	tmp = 0.0;
	if (t_1 <= 5e+290)
		tmp = t_1;
	else
		tmp = (x + (y / t)) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+290], t$95$1, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 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.9999999999999998e290

    1. Initial program 97.5%

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

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

    1. Initial program 33.2%

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

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

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

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

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

Alternative 3: 78.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ t_2 := z \cdot t - x\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{y}{x + 1} \cdot \frac{z}{x}\\ \mathbf{elif}\;t \leq 10^{-78}:\\ \;\;\;\;\frac{y \cdot z}{t_2 \cdot \left(x + 1\right)}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-34}:\\ \;\;\;\;\frac{x - \frac{x}{t_2}}{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))) (t_2 (- (* z t) x)))
   (if (<= t -5.8e+22)
     t_1
     (if (<= t 2.5e-173)
       (- 1.0 (* (/ y (+ x 1.0)) (/ z x)))
       (if (<= t 1e-78)
         (/ (* y z) (* t_2 (+ x 1.0)))
         (if (<= t 7.5e-34) (/ (- x (/ x t_2)) (+ 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 t_2 = (z * t) - x;
	double tmp;
	if (t <= -5.8e+22) {
		tmp = t_1;
	} else if (t <= 2.5e-173) {
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x));
	} else if (t <= 1e-78) {
		tmp = (y * z) / (t_2 * (x + 1.0));
	} else if (t <= 7.5e-34) {
		tmp = (x - (x / t_2)) / (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) :: t_2
    real(8) :: tmp
    t_1 = (x + (y / t)) / (x + 1.0d0)
    t_2 = (z * t) - x
    if (t <= (-5.8d+22)) then
        tmp = t_1
    else if (t <= 2.5d-173) then
        tmp = 1.0d0 - ((y / (x + 1.0d0)) * (z / x))
    else if (t <= 1d-78) then
        tmp = (y * z) / (t_2 * (x + 1.0d0))
    else if (t <= 7.5d-34) then
        tmp = (x - (x / t_2)) / (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 t_2 = (z * t) - x;
	double tmp;
	if (t <= -5.8e+22) {
		tmp = t_1;
	} else if (t <= 2.5e-173) {
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x));
	} else if (t <= 1e-78) {
		tmp = (y * z) / (t_2 * (x + 1.0));
	} else if (t <= 7.5e-34) {
		tmp = (x - (x / t_2)) / (x + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + (y / t)) / (x + 1.0)
	t_2 = (z * t) - x
	tmp = 0
	if t <= -5.8e+22:
		tmp = t_1
	elif t <= 2.5e-173:
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x))
	elif t <= 1e-78:
		tmp = (y * z) / (t_2 * (x + 1.0))
	elif t <= 7.5e-34:
		tmp = (x - (x / t_2)) / (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))
	t_2 = Float64(Float64(z * t) - x)
	tmp = 0.0
	if (t <= -5.8e+22)
		tmp = t_1;
	elseif (t <= 2.5e-173)
		tmp = Float64(1.0 - Float64(Float64(y / Float64(x + 1.0)) * Float64(z / x)));
	elseif (t <= 1e-78)
		tmp = Float64(Float64(y * z) / Float64(t_2 * Float64(x + 1.0)));
	elseif (t <= 7.5e-34)
		tmp = Float64(Float64(x - Float64(x / t_2)) / 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);
	t_2 = (z * t) - x;
	tmp = 0.0;
	if (t <= -5.8e+22)
		tmp = t_1;
	elseif (t <= 2.5e-173)
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x));
	elseif (t <= 1e-78)
		tmp = (y * z) / (t_2 * (x + 1.0));
	elseif (t <= 7.5e-34)
		tmp = (x - (x / t_2)) / (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]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[t, -5.8e+22], t$95$1, If[LessEqual[t, 2.5e-173], N[(1.0 - N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-78], N[(N[(y * z), $MachinePrecision] / N[(t$95$2 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-34], N[(N[(x - N[(x / t$95$2), $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}\\
t_2 := z \cdot t - x\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+22}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{x - \frac{x}{t_2}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.8e22 or 7.5000000000000004e-34 < t

    1. Initial program 87.9%

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

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

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

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

    if -5.8e22 < t < 2.5000000000000001e-173

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e-173 < t < 9.99999999999999999e-79

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if 9.99999999999999999e-79 < t < 7.5000000000000004e-34

    1. Initial program 93.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+22}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{y}{x + 1} \cdot \frac{z}{x}\\ \mathbf{elif}\;t \leq 10^{-78}:\\ \;\;\;\;\frac{y \cdot z}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-34}:\\ \;\;\;\;\frac{x - \frac{x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 4: 78.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t \leq -6.1 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{y}{x + 1} \cdot \frac{z}{x}\\ \mathbf{elif}\;t \leq 10^{-78}:\\ \;\;\;\;\frac{y \cdot z}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-60}:\\ \;\;\;\;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 -6.1e+22)
     t_1
     (if (<= t 2.5e-173)
       (- 1.0 (* (/ y (+ x 1.0)) (/ z x)))
       (if (<= t 1e-78)
         (/ (* y z) (* (- (* z t) x) (+ x 1.0)))
         (if (<= t 3.2e-60) 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 <= -6.1e+22) {
		tmp = t_1;
	} else if (t <= 2.5e-173) {
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x));
	} else if (t <= 1e-78) {
		tmp = (y * z) / (((z * t) - x) * (x + 1.0));
	} else if (t <= 3.2e-60) {
		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 <= (-6.1d+22)) then
        tmp = t_1
    else if (t <= 2.5d-173) then
        tmp = 1.0d0 - ((y / (x + 1.0d0)) * (z / x))
    else if (t <= 1d-78) then
        tmp = (y * z) / (((z * t) - x) * (x + 1.0d0))
    else if (t <= 3.2d-60) 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 <= -6.1e+22) {
		tmp = t_1;
	} else if (t <= 2.5e-173) {
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x));
	} else if (t <= 1e-78) {
		tmp = (y * z) / (((z * t) - x) * (x + 1.0));
	} else if (t <= 3.2e-60) {
		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 <= -6.1e+22:
		tmp = t_1
	elif t <= 2.5e-173:
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x))
	elif t <= 1e-78:
		tmp = (y * z) / (((z * t) - x) * (x + 1.0))
	elif t <= 3.2e-60:
		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 <= -6.1e+22)
		tmp = t_1;
	elseif (t <= 2.5e-173)
		tmp = Float64(1.0 - Float64(Float64(y / Float64(x + 1.0)) * Float64(z / x)));
	elseif (t <= 1e-78)
		tmp = Float64(Float64(y * z) / Float64(Float64(Float64(z * t) - x) * Float64(x + 1.0)));
	elseif (t <= 3.2e-60)
		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 <= -6.1e+22)
		tmp = t_1;
	elseif (t <= 2.5e-173)
		tmp = 1.0 - ((y / (x + 1.0)) * (z / x));
	elseif (t <= 1e-78)
		tmp = (y * z) / (((z * t) - x) * (x + 1.0));
	elseif (t <= 3.2e-60)
		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, -6.1e+22], t$95$1, If[LessEqual[t, 2.5e-173], N[(1.0 - N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-78], N[(N[(y * z), $MachinePrecision] / N[(N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-60], 1.0, t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-60}:\\
\;\;\;\;1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.0999999999999998e22 or 3.2000000000000001e-60 < t

    1. Initial program 88.1%

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

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

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

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

    if -6.0999999999999998e22 < t < 2.5000000000000001e-173

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e-173 < t < 9.99999999999999999e-79

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if 9.99999999999999999e-79 < t < 3.2000000000000001e-60

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{+22}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{y}{x + 1} \cdot \frac{z}{x}\\ \mathbf{elif}\;t \leq 10^{-78}:\\ \;\;\;\;\frac{y \cdot z}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-60}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 5: 68.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 + \frac{-1}{\frac{x}{y \cdot z}}\\ \mathbf{if}\;x \leq -0.98:\\ \;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-136}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ 1.0 (/ -1.0 (/ x (* y z))))))
   (if (<= x -0.98)
     (- 1.0 (* z (/ (/ y x) x)))
     (if (<= x -2.3e-151)
       t_1
       (if (<= x 3.1e-136)
         (/ y t)
         (if (<= x 4e-76) t_1 (if (<= x 5e-53) (/ y t) 1.0)))))))
double code(double x, double y, double z, double t) {
	double t_1 = 1.0 + (-1.0 / (x / (y * z)));
	double tmp;
	if (x <= -0.98) {
		tmp = 1.0 - (z * ((y / x) / x));
	} else if (x <= -2.3e-151) {
		tmp = t_1;
	} else if (x <= 3.1e-136) {
		tmp = y / t;
	} else if (x <= 4e-76) {
		tmp = t_1;
	} else if (x <= 5e-53) {
		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) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 + ((-1.0d0) / (x / (y * z)))
    if (x <= (-0.98d0)) then
        tmp = 1.0d0 - (z * ((y / x) / x))
    else if (x <= (-2.3d-151)) then
        tmp = t_1
    else if (x <= 3.1d-136) then
        tmp = y / t
    else if (x <= 4d-76) then
        tmp = t_1
    else if (x <= 5d-53) 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 t_1 = 1.0 + (-1.0 / (x / (y * z)));
	double tmp;
	if (x <= -0.98) {
		tmp = 1.0 - (z * ((y / x) / x));
	} else if (x <= -2.3e-151) {
		tmp = t_1;
	} else if (x <= 3.1e-136) {
		tmp = y / t;
	} else if (x <= 4e-76) {
		tmp = t_1;
	} else if (x <= 5e-53) {
		tmp = y / t;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 1.0 + (-1.0 / (x / (y * z)))
	tmp = 0
	if x <= -0.98:
		tmp = 1.0 - (z * ((y / x) / x))
	elif x <= -2.3e-151:
		tmp = t_1
	elif x <= 3.1e-136:
		tmp = y / t
	elif x <= 4e-76:
		tmp = t_1
	elif x <= 5e-53:
		tmp = y / t
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	t_1 = Float64(1.0 + Float64(-1.0 / Float64(x / Float64(y * z))))
	tmp = 0.0
	if (x <= -0.98)
		tmp = Float64(1.0 - Float64(z * Float64(Float64(y / x) / x)));
	elseif (x <= -2.3e-151)
		tmp = t_1;
	elseif (x <= 3.1e-136)
		tmp = Float64(y / t);
	elseif (x <= 4e-76)
		tmp = t_1;
	elseif (x <= 5e-53)
		tmp = Float64(y / t);
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 1.0 + (-1.0 / (x / (y * z)));
	tmp = 0.0;
	if (x <= -0.98)
		tmp = 1.0 - (z * ((y / x) / x));
	elseif (x <= -2.3e-151)
		tmp = t_1;
	elseif (x <= 3.1e-136)
		tmp = y / t;
	elseif (x <= 4e-76)
		tmp = t_1;
	elseif (x <= 5e-53)
		tmp = y / t;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 + N[(-1.0 / N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.98], N[(1.0 - N[(z * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.3e-151], t$95$1, If[LessEqual[x, 3.1e-136], N[(y / t), $MachinePrecision], If[LessEqual[x, 4e-76], t$95$1, If[LessEqual[x, 5e-53], N[(y / t), $MachinePrecision], 1.0]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -2.3 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 4 \cdot 10^{-76}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{y \cdot z}{\color{blue}{x \cdot x}} \]
      2. *-commutative92.8%

        \[\leadsto 1 - \frac{\color{blue}{z \cdot y}}{x \cdot x} \]
      3. associate-*r/95.7%

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

        \[\leadsto 1 - z \cdot \color{blue}{\frac{\frac{y}{x}}{x}} \]
    12. Simplified97.1%

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

    if -0.97999999999999998 < x < -2.29999999999999996e-151 or 3.1e-136 < x < 3.99999999999999971e-76

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{y \cdot z}}} \]
      2. inv-pow58.4%

        \[\leadsto 1 - \color{blue}{{\left(\frac{x}{y \cdot z}\right)}^{-1}} \]
    12. Applied egg-rr58.4%

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{y \cdot z}}} \]
    14. Simplified58.4%

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

    if -2.29999999999999996e-151 < x < 3.1e-136 or 3.99999999999999971e-76 < x < 5e-53

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

    if 5e-53 < x

    1. Initial program 88.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.98:\\ \;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{-151}:\\ \;\;\;\;1 + \frac{-1}{\frac{x}{y \cdot z}}\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-136}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-76}:\\ \;\;\;\;1 + \frac{-1}{\frac{x}{y \cdot z}}\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 6: 68.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 - \frac{y \cdot z}{x}\\ \mathbf{if}\;x \leq -0.36:\\ \;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-136}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- 1.0 (/ (* y z) x))))
   (if (<= x -0.36)
     (- 1.0 (* z (/ (/ y x) x)))
     (if (<= x -3.2e-151)
       t_1
       (if (<= x 2.9e-136)
         (/ y t)
         (if (<= x 3.8e-76) t_1 (if (<= x 2.2e-53) (/ y t) 1.0)))))))
double code(double x, double y, double z, double t) {
	double t_1 = 1.0 - ((y * z) / x);
	double tmp;
	if (x <= -0.36) {
		tmp = 1.0 - (z * ((y / x) / x));
	} else if (x <= -3.2e-151) {
		tmp = t_1;
	} else if (x <= 2.9e-136) {
		tmp = y / t;
	} else if (x <= 3.8e-76) {
		tmp = t_1;
	} else if (x <= 2.2e-53) {
		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) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 - ((y * z) / x)
    if (x <= (-0.36d0)) then
        tmp = 1.0d0 - (z * ((y / x) / x))
    else if (x <= (-3.2d-151)) then
        tmp = t_1
    else if (x <= 2.9d-136) then
        tmp = y / t
    else if (x <= 3.8d-76) then
        tmp = t_1
    else if (x <= 2.2d-53) 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 t_1 = 1.0 - ((y * z) / x);
	double tmp;
	if (x <= -0.36) {
		tmp = 1.0 - (z * ((y / x) / x));
	} else if (x <= -3.2e-151) {
		tmp = t_1;
	} else if (x <= 2.9e-136) {
		tmp = y / t;
	} else if (x <= 3.8e-76) {
		tmp = t_1;
	} else if (x <= 2.2e-53) {
		tmp = y / t;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 1.0 - ((y * z) / x)
	tmp = 0
	if x <= -0.36:
		tmp = 1.0 - (z * ((y / x) / x))
	elif x <= -3.2e-151:
		tmp = t_1
	elif x <= 2.9e-136:
		tmp = y / t
	elif x <= 3.8e-76:
		tmp = t_1
	elif x <= 2.2e-53:
		tmp = y / t
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	t_1 = Float64(1.0 - Float64(Float64(y * z) / x))
	tmp = 0.0
	if (x <= -0.36)
		tmp = Float64(1.0 - Float64(z * Float64(Float64(y / x) / x)));
	elseif (x <= -3.2e-151)
		tmp = t_1;
	elseif (x <= 2.9e-136)
		tmp = Float64(y / t);
	elseif (x <= 3.8e-76)
		tmp = t_1;
	elseif (x <= 2.2e-53)
		tmp = Float64(y / t);
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 1.0 - ((y * z) / x);
	tmp = 0.0;
	if (x <= -0.36)
		tmp = 1.0 - (z * ((y / x) / x));
	elseif (x <= -3.2e-151)
		tmp = t_1;
	elseif (x <= 2.9e-136)
		tmp = y / t;
	elseif (x <= 3.8e-76)
		tmp = t_1;
	elseif (x <= 2.2e-53)
		tmp = y / t;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.36], N[(1.0 - N[(z * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-151], t$95$1, If[LessEqual[x, 2.9e-136], N[(y / t), $MachinePrecision], If[LessEqual[x, 3.8e-76], t$95$1, If[LessEqual[x, 2.2e-53], N[(y / t), $MachinePrecision], 1.0]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 3.8 \cdot 10^{-76}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{y \cdot z}{\color{blue}{x \cdot x}} \]
      2. *-commutative92.8%

        \[\leadsto 1 - \frac{\color{blue}{z \cdot y}}{x \cdot x} \]
      3. associate-*r/95.7%

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

        \[\leadsto 1 - z \cdot \color{blue}{\frac{\frac{y}{x}}{x}} \]
    12. Simplified97.1%

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

    if -0.35999999999999999 < x < -3.20000000000000021e-151 or 2.89999999999999995e-136 < x < 3.8000000000000002e-76

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000021e-151 < x < 2.89999999999999995e-136 or 3.8000000000000002e-76 < x < 2.20000000000000018e-53

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

    if 2.20000000000000018e-53 < x

    1. Initial program 88.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.36:\\ \;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-151}:\\ \;\;\;\;1 - \frac{y \cdot z}{x}\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-136}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-76}:\\ \;\;\;\;1 - \frac{y \cdot z}{x}\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 7: 76.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-77}:\\ \;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{y \cdot z}{x}\\ \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.8e-14)
     t_1
     (if (<= t -1.9e-77)
       (- 1.0 (* z (/ (/ y x) x)))
       (if (<= t 2.5e-173) (- 1.0 (/ (* y z) x)) 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.8e-14) {
		tmp = t_1;
	} else if (t <= -1.9e-77) {
		tmp = 1.0 - (z * ((y / x) / x));
	} else if (t <= 2.5e-173) {
		tmp = 1.0 - ((y * z) / x);
	} 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.8d-14)) then
        tmp = t_1
    else if (t <= (-1.9d-77)) then
        tmp = 1.0d0 - (z * ((y / x) / x))
    else if (t <= 2.5d-173) then
        tmp = 1.0d0 - ((y * z) / x)
    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.8e-14) {
		tmp = t_1;
	} else if (t <= -1.9e-77) {
		tmp = 1.0 - (z * ((y / x) / x));
	} else if (t <= 2.5e-173) {
		tmp = 1.0 - ((y * z) / x);
	} 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.8e-14:
		tmp = t_1
	elif t <= -1.9e-77:
		tmp = 1.0 - (z * ((y / x) / x))
	elif t <= 2.5e-173:
		tmp = 1.0 - ((y * z) / x)
	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.8e-14)
		tmp = t_1;
	elseif (t <= -1.9e-77)
		tmp = Float64(1.0 - Float64(z * Float64(Float64(y / x) / x)));
	elseif (t <= 2.5e-173)
		tmp = Float64(1.0 - Float64(Float64(y * z) / x));
	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.8e-14)
		tmp = t_1;
	elseif (t <= -1.9e-77)
		tmp = 1.0 - (z * ((y / x) / x));
	elseif (t <= 2.5e-173)
		tmp = 1.0 - ((y * z) / x);
	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.8e-14], t$95$1, If[LessEqual[t, -1.9e-77], N[(1.0 - N[(z * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-173], N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-77}:\\
\;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\
\;\;\;\;1 - \frac{y \cdot z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.8e-14 or 2.5000000000000001e-173 < 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 86.8%

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

    if -4.8e-14 < t < -1.8999999999999999e-77

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{z \cdot y}}{x \cdot x} \]
      3. associate-*r/67.6%

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

        \[\leadsto 1 - z \cdot \color{blue}{\frac{\frac{y}{x}}{x}} \]
    12. Simplified78.1%

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

    if -1.8999999999999999e-77 < t < 2.5000000000000001e-173

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-14}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-77}:\\ \;\;\;\;1 - z \cdot \frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{y \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]

Alternative 8: 81.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+24} \lor \neg \left(t \leq 1.08 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2e24 or 1.07999999999999997e-60 < t

    1. Initial program 88.1%

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

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

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

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

    if -1.2e24 < t < 1.07999999999999997e-60

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.9% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;x \leq -2.8 \cdot 10^{-61}:\\
\;\;\;\;z \cdot \frac{-y}{x}\\

\mathbf{elif}\;x \leq -7 \cdot 10^{-151}:\\
\;\;\;\;1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.32000000000000007e-5 or -2.8000000000000001e-61 < x < -6.99999999999999991e-151

    1. Initial program 96.5%

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

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

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

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

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

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

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

    if -1.32000000000000007e-5 < x < -2.8000000000000001e-61

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{1 + x} \cdot \frac{z}{x}} \]
      3. distribute-rgt-neg-in50.7%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{x}} \]
    11. Step-by-step derivation
      1. mul-1-neg47.9%

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

        \[\leadsto -\color{blue}{\frac{y}{x} \cdot z} \]
    12. Simplified48.0%

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

    if -6.99999999999999991e-151 < x < 9.99999999999999978e-138

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

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

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

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

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

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

    if 9.99999999999999978e-138 < x

    1. Initial program 91.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.32 \cdot 10^{-5}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-61}:\\ \;\;\;\;z \cdot \frac{-y}{x}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 10^{-137}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]

Alternative 10: 64.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-77} \lor \neg \left(t \leq 2.6 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.20000000000000007e-77 or 2.59999999999999998e-59 < t

    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 t around inf 68.3%

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

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

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

    if -2.20000000000000007e-77 < t < 2.59999999999999998e-59

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.3% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 92.6%

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

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

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

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

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

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

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

    if -6.99999999999999991e-151 < x < 3.3999999999999998e-141

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

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

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

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

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

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

    if 3.3999999999999998e-141 < x

    1. Initial program 91.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-141}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]

Alternative 12: 66.8% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.5000000000000002e-151 or 2.79999999999999995e-52 < x

    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. Taylor expanded in t around inf 72.1%

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

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

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

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

    if -4.5000000000000002e-151 < x < 2.79999999999999995e-52

    1. Initial program 91.3%

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

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified91.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.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-151}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 13: 52.8% 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 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. Taylor expanded in t around inf 55.1%

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

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

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

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

    \[\leadsto 1 \]

Developer target: 99.4% 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 2023229 
(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)))