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

Percentage Accurate: 89.1% → 96.9%
Time: 10.3s
Alternatives: 12
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 89.1% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1 + \left(\frac{t_4}{t} - \frac{t_1}{z \cdot t}\right)\\


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

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

    if 5.00000000000000001e276 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 19.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

    if 5.00000000000000001e276 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))

    1. Initial program 19.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq -\infty:\\ \;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 5 \cdot 10^{+276}:\\ \;\;\;\;\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: 83.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-39} \lor \neg \left(t \leq 5.5 \cdot 10^{-35}\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 -2.2e-39) (not (<= t 5.5e-35)))
   (/ (+ 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 <= -2.2e-39) || !(t <= 5.5e-35)) {
		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 <= (-2.2d-39)) .or. (.not. (t <= 5.5d-35))) 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 <= -2.2e-39) || !(t <= 5.5e-35)) {
		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 <= -2.2e-39) or not (t <= 5.5e-35):
		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 <= -2.2e-39) || !(t <= 5.5e-35))
		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 <= -2.2e-39) || ~((t <= 5.5e-35)))
		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, -2.2e-39], N[Not[LessEqual[t, 5.5e-35]], $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 -2.2 \cdot 10^{-39} \lor \neg \left(t \leq 5.5 \cdot 10^{-35}\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 < -2.20000000000000001e-39 or 5.4999999999999997e-35 < t

    1. Initial program 87.4%

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

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

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

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

    if -2.20000000000000001e-39 < t < 5.4999999999999997e-35

    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 0 78.9%

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

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

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

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

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

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

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

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

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

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

      \[\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.7%

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

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

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

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

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

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

Alternative 4: 70.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{-24} \lor \neg \left(x \leq 1.45 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.22000000000000004e-24 or 1.44999999999999987e-63 < x

    1. Initial program 88.0%

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

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

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

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

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

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

    if -1.22000000000000004e-24 < x < 1.44999999999999987e-63

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 78.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-137} \lor \neg \left(t \leq 3.7 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.8000000000000001e-137 or 3.70000000000000012e-63 < 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 81.9%

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

    if -4.8000000000000001e-137 < t < 3.70000000000000012e-63

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 70.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-23}:\\
\;\;\;\;1 - \frac{z}{x} \cdot \frac{y}{x}\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{-63}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot t - x}\\

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


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

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e-23 < x < 3.29999999999999994e-63

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

    if 3.29999999999999994e-63 < x

    1. Initial program 84.3%

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

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

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

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

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

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

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

Alternative 7: 70.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-21}:\\
\;\;\;\;1 - \frac{\frac{y}{x}}{\frac{x}{z}}\\

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

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


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

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 - \frac{z}{x} \cdot \color{blue}{\frac{y}{x}} \]
    8. Step-by-step derivation
      1. *-commutative91.1%

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

        \[\leadsto 1 - \frac{y}{x} \cdot \color{blue}{\frac{1}{\frac{x}{z}}} \]
      3. un-div-inv91.1%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{x}}{\frac{x}{z}}} \]
    9. Applied egg-rr91.1%

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

    if -2.10000000000000013e-21 < x < 2.2e-63

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.2e-63 < x

    1. Initial program 84.3%

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

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

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

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

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

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

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

Alternative 8: 69.7% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;x \leq -7.1 \cdot 10^{-153}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.8000000000000003e-8 or 3.99999999999999976e-106 < x

    1. Initial program 88.6%

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

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

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

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

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

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

    if -5.8000000000000003e-8 < x < -7.1000000000000001e-153

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 - \color{blue}{\frac{y \cdot z}{x}} \]
    11. Step-by-step derivation
      1. *-commutative51.3%

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

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

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

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

    if -7.1000000000000001e-153 < x < 3.99999999999999976e-106

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{elif}\;x \leq -7.1 \cdot 10^{-153}:\\ \;\;\;\;1 - y \cdot \frac{z}{x}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-106}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]

Alternative 9: 67.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-155} \lor \neg \left(x \leq 2.8 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.19999999999999977e-155 or 2.79999999999999988e-106 < x

    1. Initial program 90.2%

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

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

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

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

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

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

    if -7.19999999999999977e-155 < x < 2.79999999999999988e-106

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 68.1% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.4999999999999996e-19 or 1.60000000000000006e-9 < x

    1. Initial program 88.6%

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

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

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

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

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

    if -5.4999999999999996e-19 < x < 1.60000000000000006e-9

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 56.3% accurate, 3.3× speedup?

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

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

\mathbf{elif}\;x \leq 7.4 \cdot 10^{-9}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.2000000000000002e-21 or 7.4e-9 < x

    1. Initial program 88.6%

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

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

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

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

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

    if -3.2000000000000002e-21 < x < 7.4e-9

    1. Initial program 90.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{-21}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-9}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 12: 54.0% 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 89.6%

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  6. Final simplification53.7%

    \[\leadsto 1 \]

Developer target: 99.5% accurate, 0.8× speedup?

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

\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}

Reproduce

?
herbie shell --seed 2023215 
(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)))