Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.0% → 94.3%
Time: 26.7s
Alternatives: 25
Speedup: 0.9×

Specification

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

\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\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 25 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: 66.0% accurate, 1.0× speedup?

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

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

Alternative 1: 94.3% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(y - b\right) - y\\
t_2 := z \cdot \left(a - t\right) - y \cdot x\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \frac{a - t}{y - b}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \frac{a - t}{t\_1} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t\_2}{\left(z \cdot y - z \cdot b\right) - y}\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4 + \frac{1}{\frac{1 - z}{x}}\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 24.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified24.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 23.5%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub23.5%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg23.5%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out23.5%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out24.8%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg24.8%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*49.6%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/99.9%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified99.9%

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified99.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \color{blue}{\left(y + \left(-b\right)\right)} - y} \]
      2. distribute-lft-in99.7%

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

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

    if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 24.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified24.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 24.7%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub24.7%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg24.7%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out24.7%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out24.7%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg24.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*31.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/32.5%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified32.5%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 57.5%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 71.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Step-by-step derivation
      1. clear-num72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{z + \color{blue}{-1}}{x}\right)}^{-1} \]
    10. Applied egg-rr72.3%

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

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

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified72.3%

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

    if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297

    1. Initial program 99.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing

    if 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.2%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified16.2%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 14.3%

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

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

        \[\leadsto \left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} + \color{blue}{\left(-\frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)}\right) - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      3. unsub-neg14.3%

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

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg16.1%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out16.1%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out16.2%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*32.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/49.8%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified49.8%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 86.1%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 93.2%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification95.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -\infty:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -2 \cdot 10^{-294}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{\left(z \cdot y - z \cdot b\right) - y}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 0:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 96.9% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+14} \lor \neg \left(z \leq 135000000000\right):\\
\;\;\;\;\frac{a - t}{y - b} + \frac{\left(a - t\right) \cdot \frac{y}{{\left(y - b\right)}^{2}} + x \cdot \frac{y}{b - y}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2e14 or 1.35e11 < z

    1. Initial program 48.2%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified48.2%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 67.8%

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

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

    if -2e14 < z < 1.35e11

    1. Initial program 83.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified83.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. div-sub83.7%

        \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y}} \]
      2. associate-/l*96.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+14} \lor \neg \left(z \leq 135000000000\right):\\ \;\;\;\;\frac{a - t}{y - b} + \frac{\left(a - t\right) \cdot \frac{y}{{\left(y - b\right)}^{2}} + x \cdot \frac{y}{b - y}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 93.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_2 + \frac{1}{\frac{1 - z}{x}}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e302 or 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 19.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified19.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 18.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub19.4%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg19.4%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out19.4%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out19.8%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg19.8%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*38.6%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/66.1%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified66.1%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 89.4%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 93.0%

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

    if -5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297

    1. Initial program 99.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing

    if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 24.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified24.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 24.7%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub24.7%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg24.7%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out24.7%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out24.7%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg24.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*31.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/32.5%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified32.5%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 57.5%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 71.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Step-by-step derivation
      1. clear-num72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{z + \color{blue}{-1}}{x}\right)}^{-1} \]
    10. Applied egg-rr72.3%

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

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

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified72.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -5 \cdot 10^{+302}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -2 \cdot 10^{-294}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 0:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 93.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_2 + \frac{1}{\frac{1 - z}{x}}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 38.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified38.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 37.7%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub37.7%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg37.7%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out37.7%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out38.7%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*58.9%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/99.8%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified99.8%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 96.8%

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

    if -1e251 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297

    1. Initial program 99.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing

    if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 24.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified24.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 24.7%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub24.7%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg24.7%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out24.7%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out24.7%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg24.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*31.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/32.5%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified32.5%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 57.5%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 71.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Step-by-step derivation
      1. clear-num72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{z + \color{blue}{-1}}{x}\right)}^{-1} \]
    10. Applied egg-rr72.3%

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

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

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified72.3%

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

    if 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.2%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified16.2%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 14.3%

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

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

        \[\leadsto \left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} + \color{blue}{\left(-\frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)}\right) - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      3. unsub-neg14.3%

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

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg16.1%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out16.1%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out16.2%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*32.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/49.8%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified49.8%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 86.1%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 93.2%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification95.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -1 \cdot 10^{+251}:\\ \;\;\;\;\frac{a - t}{y - b} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -2 \cdot 10^{-294}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 0:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 94.1% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(a - t\right) - y \cdot x\\
t_2 := \frac{t\_1}{z \cdot \left(y - b\right) - y}\\
t_3 := \frac{a - t}{y - b}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+302}:\\
\;\;\;\;t\_3 + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t\_1}{\left(z \cdot y - z \cdot b\right) - y}\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_3 + \frac{1}{\frac{1 - z}{x}}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 27.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified27.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 26.3%

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

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

        \[\leadsto \left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} + \color{blue}{\left(-\frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)}\right) - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      3. unsub-neg26.3%

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub26.3%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg26.3%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out26.3%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out27.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg27.5%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*51.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/99.9%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified99.9%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 96.3%

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

    if -5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified99.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \color{blue}{\left(y + \left(-b\right)\right)} - y} \]
      2. distribute-lft-in99.8%

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

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

    if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 24.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified24.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 24.7%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub24.7%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg24.7%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out24.7%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out24.7%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg24.7%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*31.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/32.5%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified32.5%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 57.5%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 71.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Step-by-step derivation
      1. clear-num72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow72.3%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval72.3%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{z + \color{blue}{-1}}{x}\right)}^{-1} \]
    10. Applied egg-rr72.3%

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

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

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified72.3%

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

    if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297

    1. Initial program 99.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing

    if 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.2%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified16.2%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 14.3%

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

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

        \[\leadsto \left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} + \color{blue}{\left(-\frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)}\right) - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      3. unsub-neg14.3%

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

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg16.1%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out16.1%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out16.2%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*32.4%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/49.8%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified49.8%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 86.1%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 93.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -5 \cdot 10^{+302}:\\ \;\;\;\;\frac{a - t}{y - b} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq -2 \cdot 10^{-294}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{\left(z \cdot y - z \cdot b\right) - y}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 0:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \mathbf{elif}\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 71.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b}\\ t_2 := t\_1 + \frac{x}{1 - z}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{-89}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-174}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + \frac{1}{\frac{1 - z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) (- y b))) (t_2 (+ t_1 (/ x (- 1.0 z)))))
   (if (<= z -1.5e-89)
     t_2
     (if (<= z -2.8e-150)
       (/ (+ (* y x) (* z (- t a))) (* z b))
       (if (<= z -5.2e-174)
         t_2
         (if (<= z 1.3e-82)
           (* x (/ y (+ y (* z b))))
           (if (<= z 1.36e+17)
             (* z (/ (- a t) (- (* z (- y b)) y)))
             (+ t_1 (/ 1.0 (/ (- 1.0 z) x))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double t_2 = t_1 + (x / (1.0 - z));
	double tmp;
	if (z <= -1.5e-89) {
		tmp = t_2;
	} else if (z <= -2.8e-150) {
		tmp = ((y * x) + (z * (t - a))) / (z * b);
	} else if (z <= -5.2e-174) {
		tmp = t_2;
	} else if (z <= 1.3e-82) {
		tmp = x * (y / (y + (z * b)));
	} else if (z <= 1.36e+17) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1 + (1.0 / ((1.0 - z) / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a - t) / (y - b)
    t_2 = t_1 + (x / (1.0d0 - z))
    if (z <= (-1.5d-89)) then
        tmp = t_2
    else if (z <= (-2.8d-150)) then
        tmp = ((y * x) + (z * (t - a))) / (z * b)
    else if (z <= (-5.2d-174)) then
        tmp = t_2
    else if (z <= 1.3d-82) then
        tmp = x * (y / (y + (z * b)))
    else if (z <= 1.36d+17) then
        tmp = z * ((a - t) / ((z * (y - b)) - y))
    else
        tmp = t_1 + (1.0d0 / ((1.0d0 - z) / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double t_2 = t_1 + (x / (1.0 - z));
	double tmp;
	if (z <= -1.5e-89) {
		tmp = t_2;
	} else if (z <= -2.8e-150) {
		tmp = ((y * x) + (z * (t - a))) / (z * b);
	} else if (z <= -5.2e-174) {
		tmp = t_2;
	} else if (z <= 1.3e-82) {
		tmp = x * (y / (y + (z * b)));
	} else if (z <= 1.36e+17) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1 + (1.0 / ((1.0 - z) / x));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / (y - b)
	t_2 = t_1 + (x / (1.0 - z))
	tmp = 0
	if z <= -1.5e-89:
		tmp = t_2
	elif z <= -2.8e-150:
		tmp = ((y * x) + (z * (t - a))) / (z * b)
	elif z <= -5.2e-174:
		tmp = t_2
	elif z <= 1.3e-82:
		tmp = x * (y / (y + (z * b)))
	elif z <= 1.36e+17:
		tmp = z * ((a - t) / ((z * (y - b)) - y))
	else:
		tmp = t_1 + (1.0 / ((1.0 - z) / x))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / Float64(y - b))
	t_2 = Float64(t_1 + Float64(x / Float64(1.0 - z)))
	tmp = 0.0
	if (z <= -1.5e-89)
		tmp = t_2;
	elseif (z <= -2.8e-150)
		tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(z * b));
	elseif (z <= -5.2e-174)
		tmp = t_2;
	elseif (z <= 1.3e-82)
		tmp = Float64(x * Float64(y / Float64(y + Float64(z * b))));
	elseif (z <= 1.36e+17)
		tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y)));
	else
		tmp = Float64(t_1 + Float64(1.0 / Float64(Float64(1.0 - z) / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / (y - b);
	t_2 = t_1 + (x / (1.0 - z));
	tmp = 0.0;
	if (z <= -1.5e-89)
		tmp = t_2;
	elseif (z <= -2.8e-150)
		tmp = ((y * x) + (z * (t - a))) / (z * b);
	elseif (z <= -5.2e-174)
		tmp = t_2;
	elseif (z <= 1.3e-82)
		tmp = x * (y / (y + (z * b)));
	elseif (z <= 1.36e+17)
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	else
		tmp = t_1 + (1.0 / ((1.0 - z) / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-89], t$95$2, If[LessEqual[z, -2.8e-150], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-174], t$95$2, If[LessEqual[z, 1.3e-82], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+17], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
t_2 := t\_1 + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\

\mathbf{elif}\;z \leq -5.2 \cdot 10^{-174}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-82}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 1.36 \cdot 10^{+17}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.5e-89 or -2.79999999999999996e-150 < z < -5.2000000000000004e-174

    1. Initial program 61.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified61.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 61.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub61.2%

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

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out61.2%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out61.4%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg61.4%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*63.0%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/68.2%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified68.2%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 81.8%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 78.2%

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

    if -1.5e-89 < z < -2.79999999999999996e-150

    1. Initial program 81.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.9%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 75.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(a - t\right) - x \cdot y}{b \cdot z}} \]
    5. Step-by-step derivation
      1. associate-*r/75.9%

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

        \[\leadsto \frac{-1 \cdot \left(z \cdot \left(a - t\right) - x \cdot y\right)}{\color{blue}{z \cdot b}} \]
      3. cancel-sign-sub-inv75.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-y \cdot \left(-x\right)\right)} + -1 \cdot \left(z \cdot \left(a - t\right)\right)}{z \cdot b} \]
      8. distribute-rgt-neg-in75.9%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} + -1 \cdot \left(z \cdot \left(a - t\right)\right)}{z \cdot b} \]
      11. neg-mul-175.9%

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(-z \cdot \left(a - t\right)\right)}}{z \cdot b} \]
      12. unsub-neg75.9%

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot \left(a - t\right)}}{z \cdot b} \]
    6. Simplified75.9%

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

    if -5.2000000000000004e-174 < z < 1.3e-82

    1. Initial program 79.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified79.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 50.9%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in68.8%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac68.8%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified68.8%

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

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

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b \cdot z\right)} - y} \]
      2. distribute-lft-neg-out68.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b\right) \cdot z} - y} \]
      3. *-commutative68.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{z \cdot \left(-b\right)} - y} \]
    9. Simplified68.8%

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

    if 1.3e-82 < z < 1.36e17

    1. Initial program 96.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified96.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 81.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. associate-/l*81.2%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified81.2%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]

    if 1.36e17 < z

    1. Initial program 43.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified43.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 43.3%

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

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

        \[\leadsto \left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} + \color{blue}{\left(-\frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)}\right) - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      3. unsub-neg43.3%

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub43.3%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg43.3%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out43.3%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out43.6%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg43.6%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*58.1%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/60.4%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified60.4%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 86.0%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 89.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Step-by-step derivation
      1. clear-num90.0%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow90.0%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg90.0%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval90.0%

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

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

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z + -1}{x}}} \]
      2. +-commutative90.0%

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified90.0%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{-1 + z}{x}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification78.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-89}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-174}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 70.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{if}\;z \leq -6.2 \cdot 10^{-93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ (- a t) (- y b)) (/ x (- 1.0 z)))))
   (if (<= z -6.2e-93)
     t_1
     (if (<= z -2.8e-150)
       (/ (+ (* y x) (* z (- t a))) (* z b))
       (if (<= z -7.8e-174)
         t_1
         (if (<= z 2.1e-83)
           (* x (/ y (+ y (* z b))))
           (if (<= z 9.2e+17) (* z (/ (- a t) (- (* z (- y b)) y))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
	double tmp;
	if (z <= -6.2e-93) {
		tmp = t_1;
	} else if (z <= -2.8e-150) {
		tmp = ((y * x) + (z * (t - a))) / (z * b);
	} else if (z <= -7.8e-174) {
		tmp = t_1;
	} else if (z <= 2.1e-83) {
		tmp = x * (y / (y + (z * b)));
	} else if (z <= 9.2e+17) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((a - t) / (y - b)) + (x / (1.0d0 - z))
    if (z <= (-6.2d-93)) then
        tmp = t_1
    else if (z <= (-2.8d-150)) then
        tmp = ((y * x) + (z * (t - a))) / (z * b)
    else if (z <= (-7.8d-174)) then
        tmp = t_1
    else if (z <= 2.1d-83) then
        tmp = x * (y / (y + (z * b)))
    else if (z <= 9.2d+17) then
        tmp = z * ((a - t) / ((z * (y - b)) - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
	double tmp;
	if (z <= -6.2e-93) {
		tmp = t_1;
	} else if (z <= -2.8e-150) {
		tmp = ((y * x) + (z * (t - a))) / (z * b);
	} else if (z <= -7.8e-174) {
		tmp = t_1;
	} else if (z <= 2.1e-83) {
		tmp = x * (y / (y + (z * b)));
	} else if (z <= 9.2e+17) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a - t) / (y - b)) + (x / (1.0 - z))
	tmp = 0
	if z <= -6.2e-93:
		tmp = t_1
	elif z <= -2.8e-150:
		tmp = ((y * x) + (z * (t - a))) / (z * b)
	elif z <= -7.8e-174:
		tmp = t_1
	elif z <= 2.1e-83:
		tmp = x * (y / (y + (z * b)))
	elif z <= 9.2e+17:
		tmp = z * ((a - t) / ((z * (y - b)) - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) + Float64(x / Float64(1.0 - z)))
	tmp = 0.0
	if (z <= -6.2e-93)
		tmp = t_1;
	elseif (z <= -2.8e-150)
		tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(z * b));
	elseif (z <= -7.8e-174)
		tmp = t_1;
	elseif (z <= 2.1e-83)
		tmp = Float64(x * Float64(y / Float64(y + Float64(z * b))));
	elseif (z <= 9.2e+17)
		tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
	tmp = 0.0;
	if (z <= -6.2e-93)
		tmp = t_1;
	elseif (z <= -2.8e-150)
		tmp = ((y * x) + (z * (t - a))) / (z * b);
	elseif (z <= -7.8e-174)
		tmp = t_1;
	elseif (z <= 2.1e-83)
		tmp = x * (y / (y + (z * b)));
	elseif (z <= 9.2e+17)
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-93], t$95$1, If[LessEqual[z, -2.8e-150], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-174], t$95$1, If[LessEqual[z, 2.1e-83], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+17], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\

\mathbf{elif}\;z \leq -7.8 \cdot 10^{-174}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+17}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.19999999999999999e-93 or -2.79999999999999996e-150 < z < -7.7999999999999997e-174 or 9.2e17 < z

    1. Initial program 52.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified52.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 52.6%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub52.6%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg52.6%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out52.6%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out52.9%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*60.6%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/64.4%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified64.4%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 83.8%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 83.7%

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

    if -6.19999999999999999e-93 < z < -2.79999999999999996e-150

    1. Initial program 81.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.9%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 75.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(a - t\right) - x \cdot y}{b \cdot z}} \]
    5. Step-by-step derivation
      1. associate-*r/75.9%

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

        \[\leadsto \frac{-1 \cdot \left(z \cdot \left(a - t\right) - x \cdot y\right)}{\color{blue}{z \cdot b}} \]
      3. cancel-sign-sub-inv75.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-y \cdot \left(-x\right)\right)} + -1 \cdot \left(z \cdot \left(a - t\right)\right)}{z \cdot b} \]
      8. distribute-rgt-neg-in75.9%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} + -1 \cdot \left(z \cdot \left(a - t\right)\right)}{z \cdot b} \]
      11. neg-mul-175.9%

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(-z \cdot \left(a - t\right)\right)}}{z \cdot b} \]
      12. unsub-neg75.9%

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot \left(a - t\right)}}{z \cdot b} \]
    6. Simplified75.9%

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

    if -7.7999999999999997e-174 < z < 2.0999999999999999e-83

    1. Initial program 79.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified79.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 50.9%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in68.8%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac68.8%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified68.8%

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

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

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b \cdot z\right)} - y} \]
      2. distribute-lft-neg-out68.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b\right) \cdot z} - y} \]
      3. *-commutative68.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{z \cdot \left(-b\right)} - y} \]
    9. Simplified68.8%

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

    if 2.0999999999999999e-83 < z < 9.2e17

    1. Initial program 96.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified96.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 81.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. associate-/l*81.2%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified81.2%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-93}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-174}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 92.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+38}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+22}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65e38

    1. Initial program 50.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified50.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 49.8%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub49.8%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg49.8%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out49.8%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out50.1%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*54.3%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/56.6%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified56.6%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 84.3%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 90.3%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Taylor expanded in z around inf 90.3%

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

    if -1.65e38 < z < 1.4e22

    1. Initial program 83.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified83.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. div-sub83.7%

        \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y}} \]
      2. associate-/l*96.1%

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

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

    if 1.4e22 < z

    1. Initial program 43.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified43.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 43.3%

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

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

        \[\leadsto \left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} + \color{blue}{\left(-\frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)}\right) - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      3. unsub-neg43.3%

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub43.3%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg43.3%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out43.3%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out43.6%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg43.6%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*58.1%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/60.4%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified60.4%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 86.0%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 89.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Step-by-step derivation
      1. clear-num90.0%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow90.0%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg90.0%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval90.0%

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

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

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z + -1}{x}}} \]
      2. +-commutative90.0%

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified90.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+38}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+22}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 44.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{b - y}\\ t_2 := \frac{a}{y - b}\\ t_3 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -2.35 \cdot 10^{+36}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-248}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-268}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 11.2:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ t (- b y))) (t_2 (/ a (- y b))) (t_3 (/ x (- 1.0 z))))
   (if (<= y -2.35e+36)
     t_3
     (if (<= y -2.05e-172)
       t_1
       (if (<= y -1e-248)
         t_2
         (if (<= y 1.75e-268) t_1 (if (<= y 11.2) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t / (b - y);
	double t_2 = a / (y - b);
	double t_3 = x / (1.0 - z);
	double tmp;
	if (y <= -2.35e+36) {
		tmp = t_3;
	} else if (y <= -2.05e-172) {
		tmp = t_1;
	} else if (y <= -1e-248) {
		tmp = t_2;
	} else if (y <= 1.75e-268) {
		tmp = t_1;
	} else if (y <= 11.2) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t / (b - y)
    t_2 = a / (y - b)
    t_3 = x / (1.0d0 - z)
    if (y <= (-2.35d+36)) then
        tmp = t_3
    else if (y <= (-2.05d-172)) then
        tmp = t_1
    else if (y <= (-1d-248)) then
        tmp = t_2
    else if (y <= 1.75d-268) then
        tmp = t_1
    else if (y <= 11.2d0) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t / (b - y);
	double t_2 = a / (y - b);
	double t_3 = x / (1.0 - z);
	double tmp;
	if (y <= -2.35e+36) {
		tmp = t_3;
	} else if (y <= -2.05e-172) {
		tmp = t_1;
	} else if (y <= -1e-248) {
		tmp = t_2;
	} else if (y <= 1.75e-268) {
		tmp = t_1;
	} else if (y <= 11.2) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t / (b - y)
	t_2 = a / (y - b)
	t_3 = x / (1.0 - z)
	tmp = 0
	if y <= -2.35e+36:
		tmp = t_3
	elif y <= -2.05e-172:
		tmp = t_1
	elif y <= -1e-248:
		tmp = t_2
	elif y <= 1.75e-268:
		tmp = t_1
	elif y <= 11.2:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t / Float64(b - y))
	t_2 = Float64(a / Float64(y - b))
	t_3 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -2.35e+36)
		tmp = t_3;
	elseif (y <= -2.05e-172)
		tmp = t_1;
	elseif (y <= -1e-248)
		tmp = t_2;
	elseif (y <= 1.75e-268)
		tmp = t_1;
	elseif (y <= 11.2)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t / (b - y);
	t_2 = a / (y - b);
	t_3 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -2.35e+36)
		tmp = t_3;
	elseif (y <= -2.05e-172)
		tmp = t_1;
	elseif (y <= -1e-248)
		tmp = t_2;
	elseif (y <= 1.75e-268)
		tmp = t_1;
	elseif (y <= 11.2)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.35e+36], t$95$3, If[LessEqual[y, -2.05e-172], t$95$1, If[LessEqual[y, -1e-248], t$95$2, If[LessEqual[y, 1.75e-268], t$95$1, If[LessEqual[y, 11.2], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{a}{y - b}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.35 \cdot 10^{+36}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -2.05 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1 \cdot 10^{-248}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.75 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 11.2:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.34999999999999994e36 or 11.199999999999999 < y

    1. Initial program 49.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified49.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around -inf 62.4%

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

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

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

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

    if -2.34999999999999994e36 < y < -2.05e-172 or -9.9999999999999998e-249 < y < 1.75000000000000003e-268

    1. Initial program 81.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.1%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 79.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub80.6%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg80.6%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out80.6%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out81.1%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*85.0%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/84.7%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified84.7%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 81.8%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 57.8%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Taylor expanded in t around inf 44.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{t}{y - b}} \]
    10. Step-by-step derivation
      1. associate-*r/44.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{y - b}} \]
      2. neg-mul-144.7%

        \[\leadsto \frac{\color{blue}{-t}}{y - b} \]
    11. Simplified44.7%

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

    if -2.05e-172 < y < -9.9999999999999998e-249 or 1.75000000000000003e-268 < y < 11.199999999999999

    1. Initial program 83.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified83.9%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 41.9%

      \[\leadsto \color{blue}{\frac{a \cdot z}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. *-commutative41.9%

        \[\leadsto \frac{\color{blue}{z \cdot a}}{z \cdot \left(y - b\right) - y} \]
    6. Simplified41.9%

      \[\leadsto \color{blue}{\frac{z \cdot a}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 46.6%

      \[\leadsto \color{blue}{\frac{a}{y - b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+36}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-172}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-248}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-268}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 11.2:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 70.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (/ (- a t) (- y b)) (/ x z))))
   (if (<= z -1.75e+36)
     t_1
     (if (<= z 1.6e-81)
       (* x (/ y (+ y (* z (- b y)))))
       (if (<= z 2.1e+16) (* z (/ (- a t) (- (* z (- y b)) y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) - (x / z);
	double tmp;
	if (z <= -1.75e+36) {
		tmp = t_1;
	} else if (z <= 1.6e-81) {
		tmp = x * (y / (y + (z * (b - y))));
	} else if (z <= 2.1e+16) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((a - t) / (y - b)) - (x / z)
    if (z <= (-1.75d+36)) then
        tmp = t_1
    else if (z <= 1.6d-81) then
        tmp = x * (y / (y + (z * (b - y))))
    else if (z <= 2.1d+16) then
        tmp = z * ((a - t) / ((z * (y - b)) - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) - (x / z);
	double tmp;
	if (z <= -1.75e+36) {
		tmp = t_1;
	} else if (z <= 1.6e-81) {
		tmp = x * (y / (y + (z * (b - y))));
	} else if (z <= 2.1e+16) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a - t) / (y - b)) - (x / z)
	tmp = 0
	if z <= -1.75e+36:
		tmp = t_1
	elif z <= 1.6e-81:
		tmp = x * (y / (y + (z * (b - y))))
	elif z <= 2.1e+16:
		tmp = z * ((a - t) / ((z * (y - b)) - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z))
	tmp = 0.0
	if (z <= -1.75e+36)
		tmp = t_1;
	elseif (z <= 1.6e-81)
		tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))));
	elseif (z <= 2.1e+16)
		tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((a - t) / (y - b)) - (x / z);
	tmp = 0.0;
	if (z <= -1.75e+36)
		tmp = t_1;
	elseif (z <= 1.6e-81)
		tmp = x * (y / (y + (z * (b - y))));
	elseif (z <= 2.1e+16)
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+36], t$95$1, If[LessEqual[z, 1.6e-81], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+16], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7499999999999999e36 or 2.1e16 < z

    1. Initial program 46.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified46.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 46.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg46.0%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out46.0%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out46.3%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg46.3%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*56.5%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/58.8%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified58.8%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 85.2%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 90.0%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Taylor expanded in z around inf 90.0%

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

    if -1.7499999999999999e36 < z < 1.6e-81

    1. Initial program 80.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified80.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 48.1%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in62.5%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac62.5%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified62.5%

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

    if 1.6e-81 < z < 2.1e16

    1. Initial program 96.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified96.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 81.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. associate-/l*81.2%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified81.2%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 72.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{-174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-85}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ (- a t) (- y b)) (/ x (- 1.0 z)))))
   (if (<= z -7.8e-174)
     t_1
     (if (<= z 9e-85)
       (* x (/ y (+ y (* z b))))
       (if (<= z 2.1e+16) (* z (/ (- a t) (- (* z (- y b)) y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
	double tmp;
	if (z <= -7.8e-174) {
		tmp = t_1;
	} else if (z <= 9e-85) {
		tmp = x * (y / (y + (z * b)));
	} else if (z <= 2.1e+16) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((a - t) / (y - b)) + (x / (1.0d0 - z))
    if (z <= (-7.8d-174)) then
        tmp = t_1
    else if (z <= 9d-85) then
        tmp = x * (y / (y + (z * b)))
    else if (z <= 2.1d+16) then
        tmp = z * ((a - t) / ((z * (y - b)) - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
	double tmp;
	if (z <= -7.8e-174) {
		tmp = t_1;
	} else if (z <= 9e-85) {
		tmp = x * (y / (y + (z * b)));
	} else if (z <= 2.1e+16) {
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a - t) / (y - b)) + (x / (1.0 - z))
	tmp = 0
	if z <= -7.8e-174:
		tmp = t_1
	elif z <= 9e-85:
		tmp = x * (y / (y + (z * b)))
	elif z <= 2.1e+16:
		tmp = z * ((a - t) / ((z * (y - b)) - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) + Float64(x / Float64(1.0 - z)))
	tmp = 0.0
	if (z <= -7.8e-174)
		tmp = t_1;
	elseif (z <= 9e-85)
		tmp = Float64(x * Float64(y / Float64(y + Float64(z * b))));
	elseif (z <= 2.1e+16)
		tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
	tmp = 0.0;
	if (z <= -7.8e-174)
		tmp = t_1;
	elseif (z <= 9e-85)
		tmp = x * (y / (y + (z * b)));
	elseif (z <= 2.1e+16)
		tmp = z * ((a - t) / ((z * (y - b)) - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e-174], t$95$1, If[LessEqual[z, 9e-85], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+16], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{-174}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 9 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.7999999999999997e-174 or 2.1e16 < z

    1. Initial program 55.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified55.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 55.0%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub55.6%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg55.6%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out55.6%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out55.8%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg55.8%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*62.2%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/65.9%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified65.9%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 83.9%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 80.2%

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

    if -7.7999999999999997e-174 < z < 9.00000000000000008e-85

    1. Initial program 79.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified79.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 50.9%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in68.8%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac68.8%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified68.8%

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

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

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b \cdot z\right)} - y} \]
      2. distribute-lft-neg-out68.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b\right) \cdot z} - y} \]
      3. *-commutative68.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{z \cdot \left(-b\right)} - y} \]
    9. Simplified68.8%

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

    if 9.00000000000000008e-85 < z < 2.1e16

    1. Initial program 96.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified96.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 81.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. associate-/l*81.2%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified81.2%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-174}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-85}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+41} \lor \neg \left(y \leq 12\right) \land \left(y \leq 1.35 \cdot 10^{+101} \lor \neg \left(y \leq 6 \cdot 10^{+159}\right)\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -2.9e+41)
         (and (not (<= y 12.0)) (or (<= y 1.35e+101) (not (<= y 6e+159)))))
   (/ x (- 1.0 z))
   (/ (- a t) (- y b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -2.9e+41) || (!(y <= 12.0) && ((y <= 1.35e+101) || !(y <= 6e+159)))) {
		tmp = x / (1.0 - z);
	} else {
		tmp = (a - t) / (y - b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((y <= (-2.9d+41)) .or. (.not. (y <= 12.0d0)) .and. (y <= 1.35d+101) .or. (.not. (y <= 6d+159))) then
        tmp = x / (1.0d0 - z)
    else
        tmp = (a - t) / (y - b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -2.9e+41) || (!(y <= 12.0) && ((y <= 1.35e+101) || !(y <= 6e+159)))) {
		tmp = x / (1.0 - z);
	} else {
		tmp = (a - t) / (y - b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -2.9e+41) or (not (y <= 12.0) and ((y <= 1.35e+101) or not (y <= 6e+159))):
		tmp = x / (1.0 - z)
	else:
		tmp = (a - t) / (y - b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -2.9e+41) || (!(y <= 12.0) && ((y <= 1.35e+101) || !(y <= 6e+159))))
		tmp = Float64(x / Float64(1.0 - z));
	else
		tmp = Float64(Float64(a - t) / Float64(y - b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -2.9e+41) || (~((y <= 12.0)) && ((y <= 1.35e+101) || ~((y <= 6e+159)))))
		tmp = x / (1.0 - z);
	else
		tmp = (a - t) / (y - b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.9e+41], And[N[Not[LessEqual[y, 12.0]], $MachinePrecision], Or[LessEqual[y, 1.35e+101], N[Not[LessEqual[y, 6e+159]], $MachinePrecision]]]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+41} \lor \neg \left(y \leq 12\right) \land \left(y \leq 1.35 \cdot 10^{+101} \lor \neg \left(y \leq 6 \cdot 10^{+159}\right)\right):\\
\;\;\;\;\frac{x}{1 - z}\\

\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y - b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.89999999999999988e41 or 12 < y < 1.35000000000000003e101 or 6.0000000000000004e159 < y

    1. Initial program 50.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified50.1%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around -inf 66.7%

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

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

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

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

    if -2.89999999999999988e41 < y < 12 or 1.35000000000000003e101 < y < 6.0000000000000004e159

    1. Initial program 79.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified79.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 66.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+41} \lor \neg \left(y \leq 12\right) \land \left(y \leq 1.35 \cdot 10^{+101} \lor \neg \left(y \leq 6 \cdot 10^{+159}\right)\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 60.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+45}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 11.2:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+101}:\\ \;\;\;\;x \cdot \frac{y}{y - z \cdot y}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+159}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) (- y b))) (t_2 (/ x (- 1.0 z))))
   (if (<= y -1.4e+45)
     t_2
     (if (<= y 11.2)
       t_1
       (if (<= y 1.85e+101)
         (* x (/ y (- y (* z y))))
         (if (<= y 6e+159) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -1.4e+45) {
		tmp = t_2;
	} else if (y <= 11.2) {
		tmp = t_1;
	} else if (y <= 1.85e+101) {
		tmp = x * (y / (y - (z * y)));
	} else if (y <= 6e+159) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a - t) / (y - b)
    t_2 = x / (1.0d0 - z)
    if (y <= (-1.4d+45)) then
        tmp = t_2
    else if (y <= 11.2d0) then
        tmp = t_1
    else if (y <= 1.85d+101) then
        tmp = x * (y / (y - (z * y)))
    else if (y <= 6d+159) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -1.4e+45) {
		tmp = t_2;
	} else if (y <= 11.2) {
		tmp = t_1;
	} else if (y <= 1.85e+101) {
		tmp = x * (y / (y - (z * y)));
	} else if (y <= 6e+159) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / (y - b)
	t_2 = x / (1.0 - z)
	tmp = 0
	if y <= -1.4e+45:
		tmp = t_2
	elif y <= 11.2:
		tmp = t_1
	elif y <= 1.85e+101:
		tmp = x * (y / (y - (z * y)))
	elif y <= 6e+159:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / Float64(y - b))
	t_2 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -1.4e+45)
		tmp = t_2;
	elseif (y <= 11.2)
		tmp = t_1;
	elseif (y <= 1.85e+101)
		tmp = Float64(x * Float64(y / Float64(y - Float64(z * y))));
	elseif (y <= 6e+159)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / (y - b);
	t_2 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -1.4e+45)
		tmp = t_2;
	elseif (y <= 11.2)
		tmp = t_1;
	elseif (y <= 1.85e+101)
		tmp = x * (y / (y - (z * y)));
	elseif (y <= 6e+159)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+45], t$95$2, If[LessEqual[y, 11.2], t$95$1, If[LessEqual[y, 1.85e+101], N[(x * N[(y / N[(y - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+159], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 11.2:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.85 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \frac{y}{y - z \cdot y}\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4e45 or 6.0000000000000004e159 < y

    1. Initial program 45.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified45.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around -inf 66.2%

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    6. Simplified66.2%

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

    if -1.4e45 < y < 11.199999999999999 or 1.8499999999999999e101 < y < 6.0000000000000004e159

    1. Initial program 79.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified79.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 66.3%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} \]

    if 11.199999999999999 < y < 1.8499999999999999e101

    1. Initial program 79.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified79.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 65.9%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in72.4%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac72.4%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified72.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+45}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 11.2:\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+101}:\\ \;\;\;\;x \cdot \frac{y}{y - z \cdot y}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+159}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 68.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 10:\\
\;\;\;\;\frac{t - a}{b}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7499999999999999e36 or 10 < z

    1. Initial program 48.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified48.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 48.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub48.2%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg48.2%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out48.2%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out48.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg48.5%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*58.3%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/60.4%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified60.4%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 85.3%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 89.0%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Taylor expanded in z around inf 88.5%

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

    if -1.7499999999999999e36 < z < 1.15000000000000006e-79

    1. Initial program 81.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 47.7%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in62.0%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac62.0%

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

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

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

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b \cdot z\right)} - y} \]
      2. distribute-lft-neg-out60.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b\right) \cdot z} - y} \]
      3. *-commutative60.8%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{z \cdot \left(-b\right)} - y} \]
    9. Simplified60.8%

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

    if 1.15000000000000006e-79 < z < 10

    1. Initial program 95.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified95.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 58.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{a - t}{b}} \]
    5. Step-by-step derivation
      1. mul-1-neg58.1%

        \[\leadsto \color{blue}{-\frac{a - t}{b}} \]
      2. distribute-neg-frac258.1%

        \[\leadsto \color{blue}{\frac{a - t}{-b}} \]
    6. Simplified58.1%

      \[\leadsto \color{blue}{\frac{a - t}{-b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-79}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 10:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 69.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 36:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (/ (- a t) (- y b)) (/ x z))))
   (if (<= z -1.75e+36)
     t_1
     (if (<= z 3.5e-76)
       (* x (/ y (+ y (* z (- b y)))))
       (if (<= z 36.0) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) - (x / z);
	double tmp;
	if (z <= -1.75e+36) {
		tmp = t_1;
	} else if (z <= 3.5e-76) {
		tmp = x * (y / (y + (z * (b - y))));
	} else if (z <= 36.0) {
		tmp = (t - a) / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((a - t) / (y - b)) - (x / z)
    if (z <= (-1.75d+36)) then
        tmp = t_1
    else if (z <= 3.5d-76) then
        tmp = x * (y / (y + (z * (b - y))))
    else if (z <= 36.0d0) then
        tmp = (t - a) / b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / (y - b)) - (x / z);
	double tmp;
	if (z <= -1.75e+36) {
		tmp = t_1;
	} else if (z <= 3.5e-76) {
		tmp = x * (y / (y + (z * (b - y))));
	} else if (z <= 36.0) {
		tmp = (t - a) / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a - t) / (y - b)) - (x / z)
	tmp = 0
	if z <= -1.75e+36:
		tmp = t_1
	elif z <= 3.5e-76:
		tmp = x * (y / (y + (z * (b - y))))
	elif z <= 36.0:
		tmp = (t - a) / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z))
	tmp = 0.0
	if (z <= -1.75e+36)
		tmp = t_1;
	elseif (z <= 3.5e-76)
		tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))));
	elseif (z <= 36.0)
		tmp = Float64(Float64(t - a) / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((a - t) / (y - b)) - (x / z);
	tmp = 0.0;
	if (z <= -1.75e+36)
		tmp = t_1;
	elseif (z <= 3.5e-76)
		tmp = x * (y / (y + (z * (b - y))));
	elseif (z <= 36.0)
		tmp = (t - a) / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+36], t$95$1, If[LessEqual[z, 3.5e-76], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 36.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;z \leq 36:\\
\;\;\;\;\frac{t - a}{b}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7499999999999999e36 or 36 < z

    1. Initial program 48.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified48.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 48.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub48.2%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg48.2%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out48.2%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out48.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg48.5%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*58.3%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/60.4%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified60.4%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 85.3%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 89.0%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Taylor expanded in z around inf 88.5%

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

    if -1.7499999999999999e36 < z < 3.49999999999999997e-76

    1. Initial program 81.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 47.7%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in62.0%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac62.0%

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

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

    if 3.49999999999999997e-76 < z < 36

    1. Initial program 95.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified95.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 58.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{a - t}{b}} \]
    5. Step-by-step derivation
      1. mul-1-neg58.1%

        \[\leadsto \color{blue}{-\frac{a - t}{b}} \]
      2. distribute-neg-frac258.1%

        \[\leadsto \color{blue}{\frac{a - t}{-b}} \]
    6. Simplified58.1%

      \[\leadsto \color{blue}{\frac{a - t}{-b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 36:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 70.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;z \cdot \frac{t - a}{y + z \cdot b}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7499999999999999e36 or 1 < z

    1. Initial program 48.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified48.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 48.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub48.2%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg48.2%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out48.2%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out48.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg48.5%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*58.3%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/60.4%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified60.4%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 85.3%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 89.0%

      \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{x}{z - 1}} \]
    9. Taylor expanded in z around inf 88.5%

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

    if -1.7499999999999999e36 < z < 4.3999999999999998e-81

    1. Initial program 80.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified80.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 48.1%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in62.5%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac62.5%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified62.5%

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

    if 4.3999999999999998e-81 < z < 1

    1. Initial program 95.2%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified95.2%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 81.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. associate-/l*81.6%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified81.6%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in y around 0 80.4%

      \[\leadsto z \cdot \frac{a - t}{\color{blue}{-1 \cdot \left(b \cdot z\right)} - y} \]
    8. Step-by-step derivation
      1. mul-1-neg19.0%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b \cdot z\right)} - y} \]
      2. distribute-lft-neg-out19.0%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b\right) \cdot z} - y} \]
      3. *-commutative19.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;z \cdot \frac{t - a}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 83.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_1 + \frac{x}{1 - z}\\

\mathbf{elif}\;z \leq 1.85:\\
\;\;\;\;x - \frac{z \cdot \left(t - a\right)}{z \cdot \left(y - b\right) - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2000000000000001e-6

    1. Initial program 51.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified51.1%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 50.9%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub50.9%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg50.9%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out50.9%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out51.2%

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*55.0%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/58.8%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified58.8%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 83.9%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 85.9%

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

    if -2.2000000000000001e-6 < z < 1.8500000000000001

    1. Initial program 83.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified83.9%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. div-sub83.9%

        \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y}} \]
      2. associate-/l*96.6%

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

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

      \[\leadsto \frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} - \color{blue}{-1 \cdot x} \]
    7. Step-by-step derivation
      1. mul-1-neg77.1%

        \[\leadsto \frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} - \color{blue}{\left(-x\right)} \]
    8. Simplified77.1%

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

    if 1.8500000000000001 < z

    1. Initial program 47.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified47.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around 0 47.2%

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a \cdot z}{z \cdot \left(y - b\right) - y} - \frac{t \cdot z}{z \cdot \left(y - b\right) - y}\right)} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      4. div-sub47.2%

        \[\leadsto \color{blue}{\frac{a \cdot z - t \cdot z}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      5. unsub-neg47.2%

        \[\leadsto \frac{\color{blue}{a \cdot z + \left(-t \cdot z\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      6. distribute-lft-neg-out47.2%

        \[\leadsto \frac{a \cdot z + \color{blue}{\left(-t\right) \cdot z}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      7. distribute-rgt-out47.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(a + \left(-t\right)\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      8. sub-neg47.5%

        \[\leadsto \frac{z \cdot \color{blue}{\left(a - t\right)}}{z \cdot \left(y - b\right) - y} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      9. associate-/l*61.0%

        \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}} - \frac{x \cdot y}{z \cdot \left(y - b\right) - y} \]
      10. associate-*r/63.1%

        \[\leadsto z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - \color{blue}{x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified63.1%

      \[\leadsto \color{blue}{z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 86.0%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} - x \cdot \frac{y}{z \cdot \left(y - b\right) - y} \]
    8. Taylor expanded in y around inf 88.2%

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

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{\frac{1}{\frac{z - 1}{x}}} \]
      2. inv-pow88.4%

        \[\leadsto \frac{a - t}{y - b} - \color{blue}{{\left(\frac{z - 1}{x}\right)}^{-1}} \]
      3. sub-neg88.4%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{\color{blue}{z + \left(-1\right)}}{x}\right)}^{-1} \]
      4. metadata-eval88.4%

        \[\leadsto \frac{a - t}{y - b} - {\left(\frac{z + \color{blue}{-1}}{x}\right)}^{-1} \]
    10. Applied egg-rr88.4%

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

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

        \[\leadsto \frac{a - t}{y - b} - \frac{1}{\frac{\color{blue}{-1 + z}}{x}} \]
    12. Simplified88.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq 1.85:\\ \;\;\;\;x - \frac{z \cdot \left(t - a\right)}{z \cdot \left(y - b\right) - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{1}{\frac{1 - z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 36.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := -\frac{a}{b}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+221}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.36 \cdot 10^{+98}:\\
\;\;\;\;\frac{x}{-z}\\

\mathbf{elif}\;z \leq -15.5 \lor \neg \left(z \leq 3.3 \cdot 10^{-70}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05000000000000001e221 or -1.36000000000000004e98 < z < -15.5 or 3.30000000000000016e-70 < z

    1. Initial program 54.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified54.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 28.1%

      \[\leadsto \color{blue}{\frac{a \cdot z}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. *-commutative28.1%

        \[\leadsto \frac{\color{blue}{z \cdot a}}{z \cdot \left(y - b\right) - y} \]
    6. Simplified28.1%

      \[\leadsto \color{blue}{\frac{z \cdot a}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in y around 0 30.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    8. Step-by-step derivation
      1. associate-*r/30.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg30.4%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    9. Simplified30.4%

      \[\leadsto \color{blue}{\frac{-a}{b}} \]

    if -1.05000000000000001e221 < z < -1.36000000000000004e98

    1. Initial program 58.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified58.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 17.6%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in21.6%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac21.6%

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

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

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

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

        \[\leadsto x \cdot \left(-\color{blue}{\frac{\frac{y}{z}}{y - b}}\right) \]
      3. sub-neg43.8%

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

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

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

        \[\leadsto x \cdot \frac{\frac{y}{z}}{-\left(y + \color{blue}{\left(-b\right)}\right)} \]
      7. sub-neg43.8%

        \[\leadsto x \cdot \frac{\frac{y}{z}}{-\color{blue}{\left(y - b\right)}} \]
    9. Simplified43.8%

      \[\leadsto x \cdot \color{blue}{\frac{\frac{y}{z}}{-\left(y - b\right)}} \]
    10. Taylor expanded in y around inf 33.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    11. Step-by-step derivation
      1. associate-*r/33.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. neg-mul-133.9%

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    12. Simplified33.9%

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

    if -15.5 < z < 3.30000000000000016e-70

    1. Initial program 81.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around 0 48.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+221}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;z \leq -1.36 \cdot 10^{+98}:\\ \;\;\;\;\frac{x}{-z}\\ \mathbf{elif}\;z \leq -15.5 \lor \neg \left(z \leq 3.3 \cdot 10^{-70}\right):\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 67.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.43 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.429999999999999993 or 2.0499999999999999e-78 < z

    1. Initial program 55.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified55.4%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 70.5%

      \[\leadsto \color{blue}{\frac{a - t}{y - b}} \]

    if -0.429999999999999993 < z < 2.0499999999999999e-78

    1. Initial program 81.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 48.0%

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

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{z \cdot \left(y - b\right) - y}} \]
      3. distribute-rgt-neg-in62.7%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{z \cdot \left(y - b\right) - y}\right)} \]
      4. distribute-neg-frac62.7%

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z \cdot \left(y - b\right) - y}} \]
    6. Simplified62.7%

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

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

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b \cdot z\right)} - y} \]
      2. distribute-lft-neg-out61.4%

        \[\leadsto x \cdot \frac{-y}{\color{blue}{\left(-b\right) \cdot z} - y} \]
      3. *-commutative61.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.43 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\right):\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 45.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.45 \lor \neg \left(z \leq 2.5 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{a}{y - b}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.450000000000000011 or 2.49999999999999999e-71 < z

    1. Initial program 54.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified54.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 26.5%

      \[\leadsto \color{blue}{\frac{a \cdot z}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. *-commutative26.5%

        \[\leadsto \frac{\color{blue}{z \cdot a}}{z \cdot \left(y - b\right) - y} \]
    6. Simplified26.5%

      \[\leadsto \color{blue}{\frac{z \cdot a}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 42.2%

      \[\leadsto \color{blue}{\frac{a}{y - b}} \]

    if -0.450000000000000011 < z < 2.49999999999999999e-71

    1. Initial program 81.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around 0 48.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.45 \lor \neg \left(z \leq 2.5 \cdot 10^{-71}\right):\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 44.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-91} \lor \neg \left(y \leq 9.2\right):\\
\;\;\;\;\frac{x}{1 - z}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{y - b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.00000000000000002e-91 or 9.1999999999999993 < y

    1. Initial program 56.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified56.1%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around -inf 53.8%

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    6. Simplified53.8%

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

    if -1.00000000000000002e-91 < y < 9.1999999999999993

    1. Initial program 81.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 36.3%

      \[\leadsto \color{blue}{\frac{a \cdot z}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. *-commutative36.3%

        \[\leadsto \frac{\color{blue}{z \cdot a}}{z \cdot \left(y - b\right) - y} \]
    6. Simplified36.3%

      \[\leadsto \color{blue}{\frac{z \cdot a}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 40.0%

      \[\leadsto \color{blue}{\frac{a}{y - b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-91} \lor \neg \left(y \leq 9.2\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y - b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 54.8% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.1e43 or 10 < y

    1. Initial program 49.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified49.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around -inf 62.6%

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

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

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

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

    if -4.1e43 < y < 10

    1. Initial program 82.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified82.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 54.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{a - t}{b}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.6%

        \[\leadsto \color{blue}{-\frac{a - t}{b}} \]
      2. distribute-neg-frac254.6%

        \[\leadsto \color{blue}{\frac{a - t}{-b}} \]
    6. Simplified54.6%

      \[\leadsto \color{blue}{\frac{a - t}{-b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+43} \lor \neg \left(y \leq 10\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 37.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.43 \lor \neg \left(z \leq 3.6 \cdot 10^{-70}\right):\\
\;\;\;\;-\frac{a}{b}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.429999999999999993 or 3.6000000000000002e-70 < z

    1. Initial program 54.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified54.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 26.5%

      \[\leadsto \color{blue}{\frac{a \cdot z}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. *-commutative26.5%

        \[\leadsto \frac{\color{blue}{z \cdot a}}{z \cdot \left(y - b\right) - y} \]
    6. Simplified26.5%

      \[\leadsto \color{blue}{\frac{z \cdot a}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in y around 0 27.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    8. Step-by-step derivation
      1. associate-*r/27.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg27.6%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    9. Simplified27.6%

      \[\leadsto \color{blue}{\frac{-a}{b}} \]

    if -0.429999999999999993 < z < 3.6000000000000002e-70

    1. Initial program 81.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified81.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around 0 48.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.43 \lor \neg \left(z \leq 3.6 \cdot 10^{-70}\right):\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 34.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+38} \lor \neg \left(z \leq 0.19\right):\\
\;\;\;\;\frac{a}{y}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.90000000000000007e38 or 0.19 < z

    1. Initial program 48.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified48.5%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 23.9%

      \[\leadsto \color{blue}{\frac{a \cdot z}{z \cdot \left(y - b\right) - y}} \]
    5. Step-by-step derivation
      1. *-commutative23.9%

        \[\leadsto \frac{\color{blue}{z \cdot a}}{z \cdot \left(y - b\right) - y} \]
    6. Simplified23.9%

      \[\leadsto \color{blue}{\frac{z \cdot a}{z \cdot \left(y - b\right) - y}} \]
    7. Taylor expanded in z around inf 43.8%

      \[\leadsto \color{blue}{\frac{a}{y - b}} \]
    8. Taylor expanded in y around inf 21.4%

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

    if -2.90000000000000007e38 < z < 0.19

    1. Initial program 83.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Simplified83.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
    3. Add Preprocessing
    4. Taylor expanded in z around 0 43.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+38} \lor \neg \left(z \leq 0.19\right):\\ \;\;\;\;\frac{a}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 25.9% accurate, 17.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 66.7%

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
  2. Simplified66.7%

    \[\leadsto \color{blue}{\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}} \]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 24.4%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification24.4%

    \[\leadsto x \]
  6. Add Preprocessing

Developer target: 73.1% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2024048 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

  :alt
  (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))

  (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))