Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 65.9% → 94.7%
Time: 32.5s
Alternatives: 16
Speedup: 1.5×

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 16 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: 65.9% 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.7% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ t_3 := \sqrt[3]{\frac{z}{\frac{t_1}{t - a}}}\\ t_4 := z \cdot \left(t - a\right)\\ t_5 := \frac{x \cdot y + t_4}{t_1}\\ t_6 := x + t_3 \cdot \left(t_3 \cdot t_3\right)\\ \mathbf{if}\;t_5 \leq -\infty:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t_5 \leq -1 \cdot 10^{-222}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t_4\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;t_5 \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_5 \leq 10^{+303}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\ \mathbf{elif}\;t_5 \leq \infty:\\ \;\;\;\;t_6\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2
         (+
          (/ (- (/ x (/ (- b y) y)) (/ y (/ (pow (- b y) 2.0) (- t a)))) z)
          (/ (- t a) (- b y))))
        (t_3 (cbrt (/ z (/ t_1 (- t a)))))
        (t_4 (* z (- t a)))
        (t_5 (/ (+ (* x y) t_4) t_1))
        (t_6 (+ x (* t_3 (* t_3 t_3)))))
   (if (<= t_5 (- INFINITY))
     t_6
     (if (<= t_5 -1e-222)
       (/ (fma x y t_4) (fma z (- b y) y))
       (if (<= t_5 0.0)
         t_2
         (if (<= t_5 1e+303)
           (/ (+ (* x y) (- (* z t) (* z a))) t_1)
           (if (<= t_5 INFINITY) t_6 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (((x / ((b - y) / y)) - (y / (pow((b - y), 2.0) / (t - a)))) / z) + ((t - a) / (b - y));
	double t_3 = cbrt((z / (t_1 / (t - a))));
	double t_4 = z * (t - a);
	double t_5 = ((x * y) + t_4) / t_1;
	double t_6 = x + (t_3 * (t_3 * t_3));
	double tmp;
	if (t_5 <= -((double) INFINITY)) {
		tmp = t_6;
	} else if (t_5 <= -1e-222) {
		tmp = fma(x, y, t_4) / fma(z, (b - y), y);
	} else if (t_5 <= 0.0) {
		tmp = t_2;
	} else if (t_5 <= 1e+303) {
		tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t_6;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(t - a)))) / z) + Float64(Float64(t - a) / Float64(b - y)))
	t_3 = cbrt(Float64(z / Float64(t_1 / Float64(t - a))))
	t_4 = Float64(z * Float64(t - a))
	t_5 = Float64(Float64(Float64(x * y) + t_4) / t_1)
	t_6 = Float64(x + Float64(t_3 * Float64(t_3 * t_3)))
	tmp = 0.0
	if (t_5 <= Float64(-Inf))
		tmp = t_6;
	elseif (t_5 <= -1e-222)
		tmp = Float64(fma(x, y, t_4) / fma(z, Float64(b - y), y));
	elseif (t_5 <= 0.0)
		tmp = t_2;
	elseif (t_5 <= 1e+303)
		tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1);
	elseif (t_5 <= Inf)
		tmp = t_6;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(z / N[(t$95$1 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x * y), $MachinePrecision] + t$95$4), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(x + N[(t$95$3 * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$6, If[LessEqual[t$95$5, -1e-222], N[(N[(x * y + t$95$4), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], t$95$2, If[LessEqual[t$95$5, 1e+303], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$6, t$95$2]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\
t_3 := \sqrt[3]{\frac{z}{\frac{t_1}{t - a}}}\\
t_4 := z \cdot \left(t - a\right)\\
t_5 := \frac{x \cdot y + t_4}{t_1}\\
t_6 := x + t_3 \cdot \left(t_3 \cdot t_3\right)\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_6\\

\mathbf{elif}\;t_5 \leq -1 \cdot 10^{-222}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_4\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\

\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_5 \leq 10^{+303}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_6\\

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


\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)))) < -inf.0 or 1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 32.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 32.6%

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

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

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

        \[\leadsto \frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \left(\sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}} \cdot \sqrt[3]{\color{blue}{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}}}\right) \cdot \sqrt[3]{\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}} \]
      4. associate-/l*67.5%

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

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

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

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

    1. Initial program 99.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-def99.2%

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

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

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

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

    if -1.00000000000000005e-222 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 13.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around -inf 63.6%

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

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

        \[\leadsto \color{blue}{\left(-\frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\right)} + \left(\frac{t}{b - y} - \frac{a}{b - y}\right) \]
      3. distribute-lft-out--63.6%

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

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

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

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

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

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

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;x + \sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}} \cdot \left(\sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}} \cdot \sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}}\right)\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -1 \cdot 10^{-222}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 10^{+303}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq \infty:\\ \;\;\;\;x + \sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}} \cdot \left(\sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}} \cdot \sqrt[3]{\frac{z}{\frac{y + z \cdot \left(b - y\right)}{t - a}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 2: 91.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \mathsf{fma}\left(z, b - y, y\right)\\ t_3 := \frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ t_4 := z \cdot \left(t - a\right)\\ t_5 := \frac{x \cdot y + t_4}{t_1}\\ \mathbf{if}\;t_5 \leq -\infty:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;t_5 \leq -1 \cdot 10^{-222}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t_4\right)}{t_2}\\ \mathbf{elif}\;t_5 \leq 0:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_5 \leq 10^{+303}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\ \mathbf{elif}\;t_5 \leq \infty:\\ \;\;\;\;\frac{z}{\frac{t_2}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (fma z (- b y) y))
        (t_3
         (+
          (/ (- (/ x (/ (- b y) y)) (/ y (/ (pow (- b y) 2.0) (- t a)))) z)
          (/ (- t a) (- b y))))
        (t_4 (* z (- t a)))
        (t_5 (/ (+ (* x y) t_4) t_1)))
   (if (<= t_5 (- INFINITY))
     (- (/ (- a t) y) (/ x (+ z -1.0)))
     (if (<= t_5 -1e-222)
       (/ (fma x y t_4) t_2)
       (if (<= t_5 0.0)
         t_3
         (if (<= t_5 1e+303)
           (/ (+ (* x y) (- (* z t) (* z a))) t_1)
           (if (<= t_5 INFINITY) (/ z (/ t_2 (- t a))) t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = fma(z, (b - y), y);
	double t_3 = (((x / ((b - y) / y)) - (y / (pow((b - y), 2.0) / (t - a)))) / z) + ((t - a) / (b - y));
	double t_4 = z * (t - a);
	double t_5 = ((x * y) + t_4) / t_1;
	double tmp;
	if (t_5 <= -((double) INFINITY)) {
		tmp = ((a - t) / y) - (x / (z + -1.0));
	} else if (t_5 <= -1e-222) {
		tmp = fma(x, y, t_4) / t_2;
	} else if (t_5 <= 0.0) {
		tmp = t_3;
	} else if (t_5 <= 1e+303) {
		tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = z / (t_2 / (t - a));
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = fma(z, Float64(b - y), y)
	t_3 = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(t - a)))) / z) + Float64(Float64(t - a) / Float64(b - y)))
	t_4 = Float64(z * Float64(t - a))
	t_5 = Float64(Float64(Float64(x * y) + t_4) / t_1)
	tmp = 0.0
	if (t_5 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0)));
	elseif (t_5 <= -1e-222)
		tmp = Float64(fma(x, y, t_4) / t_2);
	elseif (t_5 <= 0.0)
		tmp = t_3;
	elseif (t_5 <= 1e+303)
		tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1);
	elseif (t_5 <= Inf)
		tmp = Float64(z / Float64(t_2 / Float64(t - a)));
	else
		tmp = t_3;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x * y), $MachinePrecision] + t$95$4), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -1e-222], N[(N[(x * y + t$95$4), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$5, 0.0], t$95$3, If[LessEqual[t$95$5, 1e+303], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(z / N[(t$95$2 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \mathsf{fma}\left(z, b - y, y\right)\\
t_3 := \frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\
t_4 := z \cdot \left(t - a\right)\\
t_5 := \frac{x \cdot y + t_4}{t_1}\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\

\mathbf{elif}\;t_5 \leq -1 \cdot 10^{-222}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_4\right)}{t_2}\\

\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_5 \leq 10^{+303}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\frac{z}{\frac{t_2}{t - a}}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\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 27.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around -inf 47.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1} + -1 \cdot \frac{\frac{z \cdot \left(t - a\right)}{z - 1} - -1 \cdot \frac{b \cdot \left(x \cdot z\right)}{{\left(z - 1\right)}^{2}}}{y}} \]
    3. Step-by-step derivation
      1. distribute-lft-out47.7%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{x}{z + -1} + \frac{\frac{z \cdot \left(t - a\right)}{z + -1} - \left(-\frac{b}{\frac{{\left(z + -1\right)}^{2}}{z \cdot x}}\right)}{y}\right)} \]
    5. Taylor expanded in z around inf 73.4%

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

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

    1. Initial program 99.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-def99.2%

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

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

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

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

    if -1.00000000000000005e-222 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 13.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around -inf 63.6%

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

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

        \[\leadsto \color{blue}{\left(-\frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\right)} + \left(\frac{t}{b - y} - \frac{a}{b - y}\right) \]
      3. distribute-lft-out--63.6%

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

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

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

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

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

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

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

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

    1. Initial program 36.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 35.1%

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

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

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

        \[\leadsto \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{t - a}} \]
    4. Simplified73.4%

      \[\leadsto \color{blue}{\frac{z}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{t - a}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification94.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -1 \cdot 10^{-222}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 10^{+303}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq \infty:\\ \;\;\;\;\frac{z}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 3: 91.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{x \cdot y + t_3}{t_1}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;t_4 \leq -1 \cdot 10^{-222}:\\ \;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_4 \leq 10^{+303}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;\frac{z}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2
         (+
          (/ (- (/ x (/ (- b y) y)) (/ y (/ (pow (- b y) 2.0) (- t a)))) z)
          (/ (- t a) (- b y))))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ (* x y) t_3) t_1)))
   (if (<= t_4 (- INFINITY))
     (- (/ (- a t) y) (/ x (+ z -1.0)))
     (if (<= t_4 -1e-222)
       (+ (/ (* x y) t_1) (/ t_3 t_1))
       (if (<= t_4 0.0)
         t_2
         (if (<= t_4 1e+303)
           (/ (+ (* x y) (- (* z t) (* z a))) t_1)
           (if (<= t_4 INFINITY) (/ z (/ (fma z (- b y) y) (- t a))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (((x / ((b - y) / y)) - (y / (pow((b - y), 2.0) / (t - a)))) / z) + ((t - a) / (b - y));
	double t_3 = z * (t - a);
	double t_4 = ((x * y) + t_3) / t_1;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = ((a - t) / y) - (x / (z + -1.0));
	} else if (t_4 <= -1e-222) {
		tmp = ((x * y) / t_1) + (t_3 / t_1);
	} else if (t_4 <= 0.0) {
		tmp = t_2;
	} else if (t_4 <= 1e+303) {
		tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = z / (fma(z, (b - y), y) / (t - a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(t - a)))) / z) + Float64(Float64(t - a) / Float64(b - y)))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0)));
	elseif (t_4 <= -1e-222)
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1));
	elseif (t_4 <= 0.0)
		tmp = t_2;
	elseif (t_4 <= 1e+303)
		tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1);
	elseif (t_4 <= Inf)
		tmp = Float64(z / Float64(fma(z, Float64(b - y), y) / Float64(t - a)));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -1e-222], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 1e+303], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(z / N[(N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-222}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_4 \leq 10^{+303}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\frac{z}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{t - a}}\\

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


\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 27.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around -inf 47.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1} + -1 \cdot \frac{\frac{z \cdot \left(t - a\right)}{z - 1} - -1 \cdot \frac{b \cdot \left(x \cdot z\right)}{{\left(z - 1\right)}^{2}}}{y}} \]
    3. Step-by-step derivation
      1. distribute-lft-out47.7%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{x}{z + -1} + \frac{\frac{z \cdot \left(t - a\right)}{z + -1} - \left(-\frac{b}{\frac{{\left(z + -1\right)}^{2}}{z \cdot x}}\right)}{y}\right)} \]
    5. Taylor expanded in z around inf 73.4%

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

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

    1. Initial program 99.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 99.2%

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

    if -1.00000000000000005e-222 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 13.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around -inf 63.6%

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

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

        \[\leadsto \color{blue}{\left(-\frac{-1 \cdot \frac{x \cdot y}{b - y} - -1 \cdot \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\right)} + \left(\frac{t}{b - y} - \frac{a}{b - y}\right) \]
      3. distribute-lft-out--63.6%

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

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

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

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

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

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

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

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

    1. Initial program 36.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 35.1%

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

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

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

        \[\leadsto \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{t - a}} \]
    4. Simplified73.4%

      \[\leadsto \color{blue}{\frac{z}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{t - a}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification94.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -1 \cdot 10^{-222}:\\ \;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 10^{+303}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq \infty:\\ \;\;\;\;\frac{z}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 4: 83.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := \frac{t - a}{b - y}\\ t_4 := \frac{t_2}{t_1}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+54}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 9.4 \cdot 10^{-291}:\\ \;\;\;\;\frac{x \cdot y}{t_1} + t_4\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{-101}:\\ \;\;\;\;x + t_4\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+33}:\\ \;\;\;\;\frac{x \cdot y + t_2}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (* z (- t a)))
        (t_3 (/ (- t a) (- b y)))
        (t_4 (/ t_2 t_1)))
   (if (<= z -3e+54)
     t_3
     (if (<= z 9.4e-291)
       (+ (/ (* x y) t_1) t_4)
       (if (<= z 1.18e-101)
         (+ x t_4)
         (if (<= z 4.6e+33) (/ (+ (* x y) t_2) t_1) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = z * (t - a);
	double t_3 = (t - a) / (b - y);
	double t_4 = t_2 / t_1;
	double tmp;
	if (z <= -3e+54) {
		tmp = t_3;
	} else if (z <= 9.4e-291) {
		tmp = ((x * y) / t_1) + t_4;
	} else if (z <= 1.18e-101) {
		tmp = x + t_4;
	} else if (z <= 4.6e+33) {
		tmp = ((x * y) + t_2) / 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) :: t_4
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    t_2 = z * (t - a)
    t_3 = (t - a) / (b - y)
    t_4 = t_2 / t_1
    if (z <= (-3d+54)) then
        tmp = t_3
    else if (z <= 9.4d-291) then
        tmp = ((x * y) / t_1) + t_4
    else if (z <= 1.18d-101) then
        tmp = x + t_4
    else if (z <= 4.6d+33) then
        tmp = ((x * y) + t_2) / 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 = y + (z * (b - y));
	double t_2 = z * (t - a);
	double t_3 = (t - a) / (b - y);
	double t_4 = t_2 / t_1;
	double tmp;
	if (z <= -3e+54) {
		tmp = t_3;
	} else if (z <= 9.4e-291) {
		tmp = ((x * y) / t_1) + t_4;
	} else if (z <= 1.18e-101) {
		tmp = x + t_4;
	} else if (z <= 4.6e+33) {
		tmp = ((x * y) + t_2) / t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = z * (t - a)
	t_3 = (t - a) / (b - y)
	t_4 = t_2 / t_1
	tmp = 0
	if z <= -3e+54:
		tmp = t_3
	elif z <= 9.4e-291:
		tmp = ((x * y) / t_1) + t_4
	elif z <= 1.18e-101:
		tmp = x + t_4
	elif z <= 4.6e+33:
		tmp = ((x * y) + t_2) / t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(z * Float64(t - a))
	t_3 = Float64(Float64(t - a) / Float64(b - y))
	t_4 = Float64(t_2 / t_1)
	tmp = 0.0
	if (z <= -3e+54)
		tmp = t_3;
	elseif (z <= 9.4e-291)
		tmp = Float64(Float64(Float64(x * y) / t_1) + t_4);
	elseif (z <= 1.18e-101)
		tmp = Float64(x + t_4);
	elseif (z <= 4.6e+33)
		tmp = Float64(Float64(Float64(x * y) + t_2) / t_1);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = z * (t - a);
	t_3 = (t - a) / (b - y);
	t_4 = t_2 / t_1;
	tmp = 0.0;
	if (z <= -3e+54)
		tmp = t_3;
	elseif (z <= 9.4e-291)
		tmp = ((x * y) / t_1) + t_4;
	elseif (z <= 1.18e-101)
		tmp = x + t_4;
	elseif (z <= 4.6e+33)
		tmp = ((x * y) + t_2) / t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$1), $MachinePrecision]}, If[LessEqual[z, -3e+54], t$95$3, If[LessEqual[z, 9.4e-291], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[z, 1.18e-101], N[(x + t$95$4), $MachinePrecision], If[LessEqual[z, 4.6e+33], N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{t_2}{t_1}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+54}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 9.4 \cdot 10^{-291}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + t_4\\

\mathbf{elif}\;z \leq 1.18 \cdot 10^{-101}:\\
\;\;\;\;x + t_4\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+33}:\\
\;\;\;\;\frac{x \cdot y + t_2}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9999999999999999e54 or 4.60000000000000021e33 < z

    1. Initial program 36.8%

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

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

    if -2.9999999999999999e54 < z < 9.3999999999999997e-291

    1. Initial program 91.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 91.8%

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

    if 9.3999999999999997e-291 < z < 1.1800000000000001e-101

    1. Initial program 79.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 79.1%

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

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

    if 1.1800000000000001e-101 < z < 4.60000000000000021e33

    1. Initial program 90.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+54}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 9.4 \cdot 10^{-291}:\\ \;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+33}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]

Alternative 5: 81.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := \frac{x \cdot y + t_1}{y + z \cdot b}\\ t_3 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -4.2:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{-291}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_1}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 27.5:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7.9 \cdot 10^{+65} \lor \neg \left(z \leq 3.3 \cdot 10^{+121}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{t + \left(\frac{1}{\frac{\frac{z}{y}}{x}} - a\right)}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- t a)))
        (t_2 (/ (+ (* x y) t_1) (+ y (* z b))))
        (t_3 (/ (- t a) (- b y))))
   (if (<= z -4.2)
     t_3
     (if (<= z 6.1e-291)
       t_2
       (if (<= z 3e-101)
         (+ x (/ t_1 (+ y (* z (- b y)))))
         (if (<= z 27.5)
           t_2
           (if (or (<= z 7.9e+65) (not (<= z 3.3e+121)))
             t_3
             (/ (+ t (- (/ 1.0 (/ (/ z y) x)) a)) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = ((x * y) + t_1) / (y + (z * b));
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (z <= -4.2) {
		tmp = t_3;
	} else if (z <= 6.1e-291) {
		tmp = t_2;
	} else if (z <= 3e-101) {
		tmp = x + (t_1 / (y + (z * (b - y))));
	} else if (z <= 27.5) {
		tmp = t_2;
	} else if ((z <= 7.9e+65) || !(z <= 3.3e+121)) {
		tmp = t_3;
	} else {
		tmp = (t + ((1.0 / ((z / y) / x)) - 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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = z * (t - a)
    t_2 = ((x * y) + t_1) / (y + (z * b))
    t_3 = (t - a) / (b - y)
    if (z <= (-4.2d0)) then
        tmp = t_3
    else if (z <= 6.1d-291) then
        tmp = t_2
    else if (z <= 3d-101) then
        tmp = x + (t_1 / (y + (z * (b - y))))
    else if (z <= 27.5d0) then
        tmp = t_2
    else if ((z <= 7.9d+65) .or. (.not. (z <= 3.3d+121))) then
        tmp = t_3
    else
        tmp = (t + ((1.0d0 / ((z / y) / x)) - 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 t_1 = z * (t - a);
	double t_2 = ((x * y) + t_1) / (y + (z * b));
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (z <= -4.2) {
		tmp = t_3;
	} else if (z <= 6.1e-291) {
		tmp = t_2;
	} else if (z <= 3e-101) {
		tmp = x + (t_1 / (y + (z * (b - y))));
	} else if (z <= 27.5) {
		tmp = t_2;
	} else if ((z <= 7.9e+65) || !(z <= 3.3e+121)) {
		tmp = t_3;
	} else {
		tmp = (t + ((1.0 / ((z / y) / x)) - a)) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (t - a)
	t_2 = ((x * y) + t_1) / (y + (z * b))
	t_3 = (t - a) / (b - y)
	tmp = 0
	if z <= -4.2:
		tmp = t_3
	elif z <= 6.1e-291:
		tmp = t_2
	elif z <= 3e-101:
		tmp = x + (t_1 / (y + (z * (b - y))))
	elif z <= 27.5:
		tmp = t_2
	elif (z <= 7.9e+65) or not (z <= 3.3e+121):
		tmp = t_3
	else:
		tmp = (t + ((1.0 / ((z / y) / x)) - a)) / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(t - a))
	t_2 = Float64(Float64(Float64(x * y) + t_1) / Float64(y + Float64(z * b)))
	t_3 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -4.2)
		tmp = t_3;
	elseif (z <= 6.1e-291)
		tmp = t_2;
	elseif (z <= 3e-101)
		tmp = Float64(x + Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))));
	elseif (z <= 27.5)
		tmp = t_2;
	elseif ((z <= 7.9e+65) || !(z <= 3.3e+121))
		tmp = t_3;
	else
		tmp = Float64(Float64(t + Float64(Float64(1.0 / Float64(Float64(z / y) / x)) - a)) / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (t - a);
	t_2 = ((x * y) + t_1) / (y + (z * b));
	t_3 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -4.2)
		tmp = t_3;
	elseif (z <= 6.1e-291)
		tmp = t_2;
	elseif (z <= 3e-101)
		tmp = x + (t_1 / (y + (z * (b - y))));
	elseif (z <= 27.5)
		tmp = t_2;
	elseif ((z <= 7.9e+65) || ~((z <= 3.3e+121)))
		tmp = t_3;
	else
		tmp = (t + ((1.0 / ((z / y) / x)) - a)) / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2], t$95$3, If[LessEqual[z, 6.1e-291], t$95$2, If[LessEqual[z, 3e-101], N[(x + N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 27.5], t$95$2, If[Or[LessEqual[z, 7.9e+65], N[Not[LessEqual[z, 3.3e+121]], $MachinePrecision]], t$95$3, N[(N[(t + N[(N[(1.0 / N[(N[(z / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 6.1 \cdot 10^{-291}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 27.5:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 7.9 \cdot 10^{+65} \lor \neg \left(z \leq 3.3 \cdot 10^{+121}\right):\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.20000000000000018 or 27.5 < z < 7.8999999999999998e65 or 3.29999999999999979e121 < z

    1. Initial program 41.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around inf 83.2%

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

    if -4.20000000000000018 < z < 6.1e-291 or 3.0000000000000003e-101 < z < 27.5

    1. Initial program 92.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in b around inf 89.7%

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

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

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

    if 6.1e-291 < z < 3.0000000000000003e-101

    1. Initial program 79.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 79.1%

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

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

    if 7.8999999999999998e65 < z < 3.29999999999999979e121

    1. Initial program 46.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 46.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{-291}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 27.5:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 7.9 \cdot 10^{+65} \lor \neg \left(z \leq 3.3 \cdot 10^{+121}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + \left(\frac{1}{\frac{\frac{z}{y}}{x}} - a\right)}{b}\\ \end{array} \]

Alternative 6: 83.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := y + z \cdot \left(b - y\right)\\ t_3 := \frac{x \cdot y + t_1}{t_2}\\ t_4 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+55}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-290}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_1}{t_2}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+33}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- t a)))
        (t_2 (+ y (* z (- b y))))
        (t_3 (/ (+ (* x y) t_1) t_2))
        (t_4 (/ (- t a) (- b y))))
   (if (<= z -3.4e+55)
     t_4
     (if (<= z 1.4e-290)
       t_3
       (if (<= z 1.18e-101) (+ x (/ t_1 t_2)) (if (<= z 7.5e+33) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = y + (z * (b - y));
	double t_3 = ((x * y) + t_1) / t_2;
	double t_4 = (t - a) / (b - y);
	double tmp;
	if (z <= -3.4e+55) {
		tmp = t_4;
	} else if (z <= 1.4e-290) {
		tmp = t_3;
	} else if (z <= 1.18e-101) {
		tmp = x + (t_1 / t_2);
	} else if (z <= 7.5e+33) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = z * (t - a)
    t_2 = y + (z * (b - y))
    t_3 = ((x * y) + t_1) / t_2
    t_4 = (t - a) / (b - y)
    if (z <= (-3.4d+55)) then
        tmp = t_4
    else if (z <= 1.4d-290) then
        tmp = t_3
    else if (z <= 1.18d-101) then
        tmp = x + (t_1 / t_2)
    else if (z <= 7.5d+33) then
        tmp = t_3
    else
        tmp = t_4
    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 * (t - a);
	double t_2 = y + (z * (b - y));
	double t_3 = ((x * y) + t_1) / t_2;
	double t_4 = (t - a) / (b - y);
	double tmp;
	if (z <= -3.4e+55) {
		tmp = t_4;
	} else if (z <= 1.4e-290) {
		tmp = t_3;
	} else if (z <= 1.18e-101) {
		tmp = x + (t_1 / t_2);
	} else if (z <= 7.5e+33) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (t - a)
	t_2 = y + (z * (b - y))
	t_3 = ((x * y) + t_1) / t_2
	t_4 = (t - a) / (b - y)
	tmp = 0
	if z <= -3.4e+55:
		tmp = t_4
	elif z <= 1.4e-290:
		tmp = t_3
	elif z <= 1.18e-101:
		tmp = x + (t_1 / t_2)
	elif z <= 7.5e+33:
		tmp = t_3
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(t - a))
	t_2 = Float64(y + Float64(z * Float64(b - y)))
	t_3 = Float64(Float64(Float64(x * y) + t_1) / t_2)
	t_4 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -3.4e+55)
		tmp = t_4;
	elseif (z <= 1.4e-290)
		tmp = t_3;
	elseif (z <= 1.18e-101)
		tmp = Float64(x + Float64(t_1 / t_2));
	elseif (z <= 7.5e+33)
		tmp = t_3;
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (t - a);
	t_2 = y + (z * (b - y));
	t_3 = ((x * y) + t_1) / t_2;
	t_4 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -3.4e+55)
		tmp = t_4;
	elseif (z <= 1.4e-290)
		tmp = t_3;
	elseif (z <= 1.18e-101)
		tmp = x + (t_1 / t_2);
	elseif (z <= 7.5e+33)
		tmp = t_3;
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+55], t$95$4, If[LessEqual[z, 1.4e-290], t$95$3, If[LessEqual[z, 1.18e-101], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+33], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + t_1}{t_2}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+55}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-290}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 1.18 \cdot 10^{-101}:\\
\;\;\;\;x + \frac{t_1}{t_2}\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+33}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.3999999999999998e55 or 7.50000000000000046e33 < z

    1. Initial program 36.8%

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

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

    if -3.3999999999999998e55 < z < 1.39999999999999998e-290 or 1.1800000000000001e-101 < z < 7.50000000000000046e33

    1. Initial program 91.2%

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

    if 1.39999999999999998e-290 < z < 1.1800000000000001e-101

    1. Initial program 79.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 79.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+55}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-290}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+33}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]

Alternative 7: 67.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z \cdot t}{y}\\ t_2 := \frac{t - a}{b - y}\\ t_3 := \frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\ \mathbf{if}\;z \leq -1.65 \cdot 10^{-24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-32}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+65} \lor \neg \left(z \leq 3.3 \cdot 10^{+121}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (/ (* z t) y)))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (/ (+ t (- (/ x (/ z y)) a)) b)))
   (if (<= z -1.65e-24)
     t_2
     (if (<= z 1.12e-100)
       t_1
       (if (<= z 1.7e-32)
         t_3
         (if (<= z 1.8e-21)
           t_1
           (if (or (<= z 8e+65) (not (<= z 3.3e+121))) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((z * t) / y);
	double t_2 = (t - a) / (b - y);
	double t_3 = (t + ((x / (z / y)) - a)) / b;
	double tmp;
	if (z <= -1.65e-24) {
		tmp = t_2;
	} else if (z <= 1.12e-100) {
		tmp = t_1;
	} else if (z <= 1.7e-32) {
		tmp = t_3;
	} else if (z <= 1.8e-21) {
		tmp = t_1;
	} else if ((z <= 8e+65) || !(z <= 3.3e+121)) {
		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 = x + ((z * t) / y)
    t_2 = (t - a) / (b - y)
    t_3 = (t + ((x / (z / y)) - a)) / b
    if (z <= (-1.65d-24)) then
        tmp = t_2
    else if (z <= 1.12d-100) then
        tmp = t_1
    else if (z <= 1.7d-32) then
        tmp = t_3
    else if (z <= 1.8d-21) then
        tmp = t_1
    else if ((z <= 8d+65) .or. (.not. (z <= 3.3d+121))) 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 = x + ((z * t) / y);
	double t_2 = (t - a) / (b - y);
	double t_3 = (t + ((x / (z / y)) - a)) / b;
	double tmp;
	if (z <= -1.65e-24) {
		tmp = t_2;
	} else if (z <= 1.12e-100) {
		tmp = t_1;
	} else if (z <= 1.7e-32) {
		tmp = t_3;
	} else if (z <= 1.8e-21) {
		tmp = t_1;
	} else if ((z <= 8e+65) || !(z <= 3.3e+121)) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((z * t) / y)
	t_2 = (t - a) / (b - y)
	t_3 = (t + ((x / (z / y)) - a)) / b
	tmp = 0
	if z <= -1.65e-24:
		tmp = t_2
	elif z <= 1.12e-100:
		tmp = t_1
	elif z <= 1.7e-32:
		tmp = t_3
	elif z <= 1.8e-21:
		tmp = t_1
	elif (z <= 8e+65) or not (z <= 3.3e+121):
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(z * t) / y))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(Float64(t + Float64(Float64(x / Float64(z / y)) - a)) / b)
	tmp = 0.0
	if (z <= -1.65e-24)
		tmp = t_2;
	elseif (z <= 1.12e-100)
		tmp = t_1;
	elseif (z <= 1.7e-32)
		tmp = t_3;
	elseif (z <= 1.8e-21)
		tmp = t_1;
	elseif ((z <= 8e+65) || !(z <= 3.3e+121))
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + ((z * t) / y);
	t_2 = (t - a) / (b - y);
	t_3 = (t + ((x / (z / y)) - a)) / b;
	tmp = 0.0;
	if (z <= -1.65e-24)
		tmp = t_2;
	elseif (z <= 1.12e-100)
		tmp = t_1;
	elseif (z <= 1.7e-32)
		tmp = t_3;
	elseif (z <= 1.8e-21)
		tmp = t_1;
	elseif ((z <= 8e+65) || ~((z <= 3.3e+121)))
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t + N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[z, -1.65e-24], t$95$2, If[LessEqual[z, 1.12e-100], t$95$1, If[LessEqual[z, 1.7e-32], t$95$3, If[LessEqual[z, 1.8e-21], t$95$1, If[Or[LessEqual[z, 8e+65], N[Not[LessEqual[z, 3.3e+121]], $MachinePrecision]], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-100}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-32}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 8 \cdot 10^{+65} \lor \neg \left(z \leq 3.3 \cdot 10^{+121}\right):\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.64999999999999992e-24 or 1.79999999999999995e-21 < z < 7.9999999999999999e65 or 3.29999999999999979e121 < z

    1. Initial program 46.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around inf 80.1%

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

    if -1.64999999999999992e-24 < z < 1.11999999999999996e-100 or 1.69999999999999989e-32 < z < 1.79999999999999995e-21

    1. Initial program 86.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 86.5%

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

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

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

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

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

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

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

    if 1.11999999999999996e-100 < z < 1.69999999999999989e-32 or 7.9999999999999999e65 < z < 3.29999999999999979e121

    1. Initial program 67.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 67.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{-24}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-100}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-32}:\\ \;\;\;\;\frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-21}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+65} \lor \neg \left(z \leq 3.3 \cdot 10^{+121}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\ \end{array} \]

Alternative 8: 64.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-57}:\\ \;\;\;\;\frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\ \mathbf{elif}\;y \leq 4500000000000:\\ \;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+28}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (/ (- a t) y) (/ x (+ z -1.0)))))
   (if (<= y -1.4e+31)
     t_1
     (if (<= y 3.4e-57)
       (/ (+ t (- (/ x (/ z y)) a)) b)
       (if (<= y 4500000000000.0)
         (/ (* x y) (+ y (* z (- b y))))
         (if (<= y 1.05e+28) (/ (- t a) (- b y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a - t) / y) - (x / (z + -1.0));
	double tmp;
	if (y <= -1.4e+31) {
		tmp = t_1;
	} else if (y <= 3.4e-57) {
		tmp = (t + ((x / (z / y)) - a)) / b;
	} else if (y <= 4500000000000.0) {
		tmp = (x * y) / (y + (z * (b - y)));
	} else if (y <= 1.05e+28) {
		tmp = (t - a) / (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) - (x / (z + (-1.0d0)))
    if (y <= (-1.4d+31)) then
        tmp = t_1
    else if (y <= 3.4d-57) then
        tmp = (t + ((x / (z / y)) - a)) / b
    else if (y <= 4500000000000.0d0) then
        tmp = (x * y) / (y + (z * (b - y)))
    else if (y <= 1.05d+28) then
        tmp = (t - a) / (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) - (x / (z + -1.0));
	double tmp;
	if (y <= -1.4e+31) {
		tmp = t_1;
	} else if (y <= 3.4e-57) {
		tmp = (t + ((x / (z / y)) - a)) / b;
	} else if (y <= 4500000000000.0) {
		tmp = (x * y) / (y + (z * (b - y)));
	} else if (y <= 1.05e+28) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a - t) / y) - (x / (z + -1.0))
	tmp = 0
	if y <= -1.4e+31:
		tmp = t_1
	elif y <= 3.4e-57:
		tmp = (t + ((x / (z / y)) - a)) / b
	elif y <= 4500000000000.0:
		tmp = (x * y) / (y + (z * (b - y)))
	elif y <= 1.05e+28:
		tmp = (t - a) / (b - y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0)))
	tmp = 0.0
	if (y <= -1.4e+31)
		tmp = t_1;
	elseif (y <= 3.4e-57)
		tmp = Float64(Float64(t + Float64(Float64(x / Float64(z / y)) - a)) / b);
	elseif (y <= 4500000000000.0)
		tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y))));
	elseif (y <= 1.05e+28)
		tmp = Float64(Float64(t - a) / Float64(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) - (x / (z + -1.0));
	tmp = 0.0;
	if (y <= -1.4e+31)
		tmp = t_1;
	elseif (y <= 3.4e-57)
		tmp = (t + ((x / (z / y)) - a)) / b;
	elseif (y <= 4500000000000.0)
		tmp = (x * y) / (y + (z * (b - y)));
	elseif (y <= 1.05e+28)
		tmp = (t - a) / (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] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+31], t$95$1, If[LessEqual[y, 3.4e-57], N[(N[(t + N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4500000000000.0], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+28], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+28}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.40000000000000008e31 or 1.04999999999999995e28 < y

    1. Initial program 48.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around -inf 59.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1} + -1 \cdot \frac{\frac{z \cdot \left(t - a\right)}{z - 1} - -1 \cdot \frac{b \cdot \left(x \cdot z\right)}{{\left(z - 1\right)}^{2}}}{y}} \]
    3. Step-by-step derivation
      1. distribute-lft-out59.6%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{x}{z + -1} + \frac{\frac{z \cdot \left(t - a\right)}{z + -1} - \left(-\frac{b}{\frac{{\left(z + -1\right)}^{2}}{z \cdot x}}\right)}{y}\right)} \]
    5. Taylor expanded in z around inf 67.5%

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

    if -1.40000000000000008e31 < y < 3.40000000000000016e-57

    1. Initial program 77.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 77.5%

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

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

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

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

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

    if 3.40000000000000016e-57 < y < 4.5e12

    1. Initial program 88.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around inf 74.5%

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

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

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

    if 4.5e12 < y < 1.04999999999999995e28

    1. Initial program 23.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around inf 80.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+31}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-57}:\\ \;\;\;\;\frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\ \mathbf{elif}\;y \leq 4500000000000:\\ \;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+28}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \end{array} \]

Alternative 9: 80.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 40.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around inf 80.5%

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

    if -880 < z < 1.2e14

    1. Initial program 88.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 88.0%

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

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

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

Alternative 10: 42.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-a}{b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{-52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-262}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-284}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a) b)) (t_2 (/ x (- 1.0 z))))
   (if (<= y -3.5e-52)
     t_2
     (if (<= y -9e-262)
       (/ t b)
       (if (<= y 2.5e-284)
         t_1
         (if (<= y 8.8e-242) (/ t b) (if (<= y 1.35e-52) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -a / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -3.5e-52) {
		tmp = t_2;
	} else if (y <= -9e-262) {
		tmp = t / b;
	} else if (y <= 2.5e-284) {
		tmp = t_1;
	} else if (y <= 8.8e-242) {
		tmp = t / b;
	} else if (y <= 1.35e-52) {
		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 / b
    t_2 = x / (1.0d0 - z)
    if (y <= (-3.5d-52)) then
        tmp = t_2
    else if (y <= (-9d-262)) then
        tmp = t / b
    else if (y <= 2.5d-284) then
        tmp = t_1
    else if (y <= 8.8d-242) then
        tmp = t / b
    else if (y <= 1.35d-52) 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 / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -3.5e-52) {
		tmp = t_2;
	} else if (y <= -9e-262) {
		tmp = t / b;
	} else if (y <= 2.5e-284) {
		tmp = t_1;
	} else if (y <= 8.8e-242) {
		tmp = t / b;
	} else if (y <= 1.35e-52) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = -a / b
	t_2 = x / (1.0 - z)
	tmp = 0
	if y <= -3.5e-52:
		tmp = t_2
	elif y <= -9e-262:
		tmp = t / b
	elif y <= 2.5e-284:
		tmp = t_1
	elif y <= 8.8e-242:
		tmp = t / b
	elif y <= 1.35e-52:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(-a) / b)
	t_2 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -3.5e-52)
		tmp = t_2;
	elseif (y <= -9e-262)
		tmp = Float64(t / b);
	elseif (y <= 2.5e-284)
		tmp = t_1;
	elseif (y <= 8.8e-242)
		tmp = Float64(t / b);
	elseif (y <= 1.35e-52)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = -a / b;
	t_2 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -3.5e-52)
		tmp = t_2;
	elseif (y <= -9e-262)
		tmp = t / b;
	elseif (y <= 2.5e-284)
		tmp = t_1;
	elseif (y <= 8.8e-242)
		tmp = t / b;
	elseif (y <= 1.35e-52)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-52], t$95$2, If[LessEqual[y, -9e-262], N[(t / b), $MachinePrecision], If[LessEqual[y, 2.5e-284], t$95$1, If[LessEqual[y, 8.8e-242], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.35e-52], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{-52}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-284}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 8.8 \cdot 10^{-242}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;y \leq 1.35 \cdot 10^{-52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.5e-52 or 1.35000000000000005e-52 < y

    1. Initial program 56.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around inf 43.7%

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

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

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

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

    if -3.5e-52 < y < -8.99999999999999997e-262 or 2.49999999999999987e-284 < y < 8.80000000000000006e-242

    1. Initial program 78.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in b around inf 58.6%

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

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

    if -8.99999999999999997e-262 < y < 2.49999999999999987e-284 or 8.80000000000000006e-242 < y < 1.35000000000000005e-52

    1. Initial program 72.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in b around inf 54.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    4. Step-by-step derivation
      1. associate-*r/54.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg54.8%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    5. Simplified54.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{-52}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-262}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-284}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-52}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 11: 67.9% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-25} \lor \neg \left(z \leq 7 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05000000000000001e-25 or 6.9999999999999994e-89 < z

    1. Initial program 50.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around inf 74.7%

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

    if -1.05000000000000001e-25 < z < 6.9999999999999994e-89

    1. Initial program 85.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 85.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-25} \lor \neg \left(z \leq 7 \cdot 10^{-89}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \end{array} \]

Alternative 12: 55.2% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{-47} \lor \neg \left(y \leq 5.7 \cdot 10^{-49}\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 -3.1e-47) (not (<= y 5.7e-49))) (/ 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 <= -3.1e-47) || !(y <= 5.7e-49)) {
		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 <= (-3.1d-47)) .or. (.not. (y <= 5.7d-49))) 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 <= -3.1e-47) || !(y <= 5.7e-49)) {
		tmp = x / (1.0 - z);
	} else {
		tmp = (t - a) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -3.1e-47) or not (y <= 5.7e-49):
		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 <= -3.1e-47) || !(y <= 5.7e-49))
		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 <= -3.1e-47) || ~((y <= 5.7e-49)))
		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, -3.1e-47], N[Not[LessEqual[y, 5.7e-49]], $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 -3.1 \cdot 10^{-47} \lor \neg \left(y \leq 5.7 \cdot 10^{-49}\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 < -3.0999999999999998e-47 or 5.7000000000000003e-49 < y

    1. Initial program 56.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around inf 43.7%

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

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

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

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

    if -3.0999999999999998e-47 < y < 5.7000000000000003e-49

    1. Initial program 75.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around 0 71.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{-47} \lor \neg \left(y \leq 5.7 \cdot 10^{-49}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]

Alternative 13: 52.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{-49}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{t - a}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.35000000000000011e-49

    1. Initial program 59.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in x around 0 59.4%

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

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

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

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

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

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

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

    if -2.35000000000000011e-49 < y < 4.79999999999999985e-49

    1. Initial program 75.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around 0 71.9%

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

    if 4.79999999999999985e-49 < y

    1. Initial program 54.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in y around inf 44.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{-49}:\\ \;\;\;\;x + z \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-49}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 14: 36.6% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\
\;\;\;\;x\\

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


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

    1. Initial program 47.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in b around inf 28.5%

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

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

    if -2.8000000000000001e-26 < z < 2.79999999999999998e-75

    1. Initial program 85.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around 0 49.8%

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

    if 2.79999999999999998e-75 < z

    1. Initial program 53.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in b around inf 34.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    4. Step-by-step derivation
      1. associate-*r/27.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg27.9%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    5. Simplified27.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-26}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-a}{b}\\ \end{array} \]

Alternative 15: 36.5% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-26}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{-89}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e-26 or 6.9999999999999994e-89 < z

    1. Initial program 50.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in b around inf 32.3%

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

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

    if -1.12e-26 < z < 6.9999999999999994e-89

    1. Initial program 85.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Taylor expanded in z around 0 50.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-26}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]

Alternative 16: 25.4% 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 64.6%

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
  2. Taylor expanded in z around 0 22.9%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification22.9%

    \[\leadsto x \]

Developer target: 72.7% 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 2023279 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

  :herbie-target
  (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))

  (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))