Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 65.7% → 92.8%
Time: 22.7s
Alternatives: 16
Speedup: 0.4×

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.7% 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: 92.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -1.5 \cdot 10^{-291}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_2\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\

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


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

    1. Initial program 27.2%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. mul-1-neg47.5%

        \[\leadsto -1 \cdot \frac{x}{z - 1} + \color{blue}{\left(-\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. unsub-neg47.5%

        \[\leadsto \color{blue}{-1 \cdot \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}} \]
      3. associate-*r/47.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot 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} \]
      4. neg-mul-147.5%

        \[\leadsto \frac{\color{blue}{-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} \]
      5. sub-neg47.5%

        \[\leadsto \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} \]
      6. metadata-eval47.5%

        \[\leadsto \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} \]
    5. Simplified63.6%

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

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

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

    1. Initial program 99.5%

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

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

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

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

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

    if -1.5e-291 < (/.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 15.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

    \[\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.5 \cdot 10^{-291}:\\ \;\;\;\;\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:\\ \;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) - \frac{y}{\frac{{\left(b - y\right)}^{2}}{\frac{t - a}{z}}}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+283}:\\ \;\;\;\;\frac{x \cdot y + 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 \infty:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) - \frac{y}{\frac{{\left(b - y\right)}^{2}}{\frac{t - a}{z}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 92.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1.5 \cdot 10^{-291}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 27.2%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. mul-1-neg47.5%

        \[\leadsto -1 \cdot \frac{x}{z - 1} + \color{blue}{\left(-\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. unsub-neg47.5%

        \[\leadsto \color{blue}{-1 \cdot \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}} \]
      3. associate-*r/47.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot 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} \]
      4. neg-mul-147.5%

        \[\leadsto \frac{\color{blue}{-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} \]
      5. sub-neg47.5%

        \[\leadsto \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} \]
      6. metadata-eval47.5%

        \[\leadsto \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} \]
    5. Simplified63.6%

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.5e-291 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999991e283

    1. Initial program 99.5%

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

    if -1.5e-291 < (/.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 15.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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.5 \cdot 10^{-291}:\\ \;\;\;\;\frac{x \cdot y + 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:\\ \;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) - \frac{y}{\frac{{\left(b - y\right)}^{2}}{\frac{t - a}{z}}}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+283}:\\ \;\;\;\;\frac{x \cdot y + 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 \infty:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) - \frac{y}{\frac{{\left(b - y\right)}^{2}}{\frac{t - a}{z}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1.5 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t - a}{b - y}\\

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

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


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

    1. Initial program 19.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 33.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}} \]
    4. Step-by-step derivation
      1. mul-1-neg33.6%

        \[\leadsto -1 \cdot \frac{x}{z - 1} + \color{blue}{\left(-\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. unsub-neg33.6%

        \[\leadsto \color{blue}{-1 \cdot \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}} \]
      3. associate-*r/33.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot 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} \]
      4. neg-mul-133.6%

        \[\leadsto \frac{\color{blue}{-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} \]
      5. sub-neg33.6%

        \[\leadsto \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} \]
      6. metadata-eval33.6%

        \[\leadsto \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} \]
    5. Simplified50.3%

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.5e-291 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999991e283

    1. Initial program 99.5%

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

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

    1. Initial program 44.5%

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

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

    \[\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.5 \cdot 10^{-291}:\\ \;\;\;\;\frac{x \cdot y + 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{t - a}{b - y}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+283}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{if}\;z \leq -3.55 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1020000000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-65}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-123}:\\ \;\;\;\;x + z \cdot \left(\frac{t - a}{y} - \frac{b}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-306}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-236}:\\ \;\;\;\;x + \left(\left(t - a\right) \cdot \frac{z}{y} - \frac{b}{\frac{y}{x \cdot z}}\right)\\ \mathbf{elif}\;z \leq 135:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y)))
        (t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
   (if (<= z -3.55e+59)
     t_1
     (if (<= z -1020000000000.0)
       (* (/ x z) (/ y (- b y)))
       (if (<= z -4.2e-65)
         t_2
         (if (<= z -4.2e-123)
           (+ x (* z (- (/ (- t a) y) (/ b (/ y x)))))
           (if (<= z -7.2e-306)
             t_2
             (if (<= z 6e-236)
               (+ x (- (* (- t a) (/ z y)) (/ b (/ y (* x z)))))
               (if (<= z 135.0) t_2 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	double tmp;
	if (z <= -3.55e+59) {
		tmp = t_1;
	} else if (z <= -1020000000000.0) {
		tmp = (x / z) * (y / (b - y));
	} else if (z <= -4.2e-65) {
		tmp = t_2;
	} else if (z <= -4.2e-123) {
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	} else if (z <= -7.2e-306) {
		tmp = t_2;
	} else if (z <= 6e-236) {
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))));
	} else if (z <= 135.0) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    t_2 = ((x * y) + (z * (t - a))) / (y + (z * b))
    if (z <= (-3.55d+59)) then
        tmp = t_1
    else if (z <= (-1020000000000.0d0)) then
        tmp = (x / z) * (y / (b - y))
    else if (z <= (-4.2d-65)) then
        tmp = t_2
    else if (z <= (-4.2d-123)) then
        tmp = x + (z * (((t - a) / y) - (b / (y / x))))
    else if (z <= (-7.2d-306)) then
        tmp = t_2
    else if (z <= 6d-236) then
        tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))))
    else if (z <= 135.0d0) then
        tmp = t_2
    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 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	double tmp;
	if (z <= -3.55e+59) {
		tmp = t_1;
	} else if (z <= -1020000000000.0) {
		tmp = (x / z) * (y / (b - y));
	} else if (z <= -4.2e-65) {
		tmp = t_2;
	} else if (z <= -4.2e-123) {
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	} else if (z <= -7.2e-306) {
		tmp = t_2;
	} else if (z <= 6e-236) {
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))));
	} else if (z <= 135.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	t_2 = ((x * y) + (z * (t - a))) / (y + (z * b))
	tmp = 0
	if z <= -3.55e+59:
		tmp = t_1
	elif z <= -1020000000000.0:
		tmp = (x / z) * (y / (b - y))
	elif z <= -4.2e-65:
		tmp = t_2
	elif z <= -4.2e-123:
		tmp = x + (z * (((t - a) / y) - (b / (y / x))))
	elif z <= -7.2e-306:
		tmp = t_2
	elif z <= 6e-236:
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))))
	elif z <= 135.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b)))
	tmp = 0.0
	if (z <= -3.55e+59)
		tmp = t_1;
	elseif (z <= -1020000000000.0)
		tmp = Float64(Float64(x / z) * Float64(y / Float64(b - y)));
	elseif (z <= -4.2e-65)
		tmp = t_2;
	elseif (z <= -4.2e-123)
		tmp = Float64(x + Float64(z * Float64(Float64(Float64(t - a) / y) - Float64(b / Float64(y / x)))));
	elseif (z <= -7.2e-306)
		tmp = t_2;
	elseif (z <= 6e-236)
		tmp = Float64(x + Float64(Float64(Float64(t - a) * Float64(z / y)) - Float64(b / Float64(y / Float64(x * z)))));
	elseif (z <= 135.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	tmp = 0.0;
	if (z <= -3.55e+59)
		tmp = t_1;
	elseif (z <= -1020000000000.0)
		tmp = (x / z) * (y / (b - y));
	elseif (z <= -4.2e-65)
		tmp = t_2;
	elseif (z <= -4.2e-123)
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	elseif (z <= -7.2e-306)
		tmp = t_2;
	elseif (z <= 6e-236)
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))));
	elseif (z <= 135.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.55e+59], t$95$1, If[LessEqual[z, -1020000000000.0], N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-65], t$95$2, If[LessEqual[z, -4.2e-123], N[(x + N[(z * N[(N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] - N[(b / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-306], t$95$2, If[LessEqual[z, 6e-236], N[(x + N[(N[(N[(t - a), $MachinePrecision] * N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 135.0], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1020000000000:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-65}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-306}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 135:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.55000000000000002e59 or 135 < z

    1. Initial program 37.6%

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

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

    if -3.55000000000000002e59 < z < -1.02e12

    1. Initial program 75.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} \]
    8. Simplified81.5%

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

    if -1.02e12 < z < -4.20000000000000006e-65 or -4.1999999999999998e-123 < z < -7.19999999999999982e-306 or 6.00000000000000027e-236 < z < 135

    1. Initial program 87.0%

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

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

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

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

    if -4.20000000000000006e-65 < z < -4.1999999999999998e-123

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999982e-306 < z < 6.00000000000000027e-236

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.55 \cdot 10^{+59}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1020000000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-65}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-123}:\\ \;\;\;\;x + z \cdot \left(\frac{t - a}{y} - \frac{b}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-306}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-236}:\\ \;\;\;\;x + \left(\left(t - a\right) \cdot \frac{z}{y} - \frac{b}{\frac{y}{x \cdot z}}\right)\\ \mathbf{elif}\;z \leq 135:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-15}:\\ \;\;\;\;\frac{\frac{a}{\frac{y}{z}}}{z + -1} - \frac{x}{z + -1}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-122}:\\ \;\;\;\;x + z \cdot \left(\frac{t - a}{y} - \frac{b}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-304}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-237}:\\ \;\;\;\;x + \left(\left(t - a\right) \cdot \frac{z}{y} - \frac{b}{\frac{y}{x \cdot z}}\right)\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y)))
        (t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
   (if (<= z -2.1e+19)
     t_1
     (if (<= z -3.9e-15)
       (- (/ (/ a (/ y z)) (+ z -1.0)) (/ x (+ z -1.0)))
       (if (<= z -5.8e-56)
         t_1
         (if (<= z -2.6e-122)
           (+ x (* z (- (/ (- t a) y) (/ b (/ y x)))))
           (if (<= z -3.9e-304)
             t_2
             (if (<= z 1.8e-237)
               (+ x (- (* (- t a) (/ z y)) (/ b (/ y (* x z)))))
               (if (<= z 1.0) t_2 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	double tmp;
	if (z <= -2.1e+19) {
		tmp = t_1;
	} else if (z <= -3.9e-15) {
		tmp = ((a / (y / z)) / (z + -1.0)) - (x / (z + -1.0));
	} else if (z <= -5.8e-56) {
		tmp = t_1;
	} else if (z <= -2.6e-122) {
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	} else if (z <= -3.9e-304) {
		tmp = t_2;
	} else if (z <= 1.8e-237) {
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))));
	} else if (z <= 1.0) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    t_2 = ((x * y) + (z * (t - a))) / (y + (z * b))
    if (z <= (-2.1d+19)) then
        tmp = t_1
    else if (z <= (-3.9d-15)) then
        tmp = ((a / (y / z)) / (z + (-1.0d0))) - (x / (z + (-1.0d0)))
    else if (z <= (-5.8d-56)) then
        tmp = t_1
    else if (z <= (-2.6d-122)) then
        tmp = x + (z * (((t - a) / y) - (b / (y / x))))
    else if (z <= (-3.9d-304)) then
        tmp = t_2
    else if (z <= 1.8d-237) then
        tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))))
    else if (z <= 1.0d0) then
        tmp = t_2
    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 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	double tmp;
	if (z <= -2.1e+19) {
		tmp = t_1;
	} else if (z <= -3.9e-15) {
		tmp = ((a / (y / z)) / (z + -1.0)) - (x / (z + -1.0));
	} else if (z <= -5.8e-56) {
		tmp = t_1;
	} else if (z <= -2.6e-122) {
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	} else if (z <= -3.9e-304) {
		tmp = t_2;
	} else if (z <= 1.8e-237) {
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))));
	} else if (z <= 1.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	t_2 = ((x * y) + (z * (t - a))) / (y + (z * b))
	tmp = 0
	if z <= -2.1e+19:
		tmp = t_1
	elif z <= -3.9e-15:
		tmp = ((a / (y / z)) / (z + -1.0)) - (x / (z + -1.0))
	elif z <= -5.8e-56:
		tmp = t_1
	elif z <= -2.6e-122:
		tmp = x + (z * (((t - a) / y) - (b / (y / x))))
	elif z <= -3.9e-304:
		tmp = t_2
	elif z <= 1.8e-237:
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))))
	elif z <= 1.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b)))
	tmp = 0.0
	if (z <= -2.1e+19)
		tmp = t_1;
	elseif (z <= -3.9e-15)
		tmp = Float64(Float64(Float64(a / Float64(y / z)) / Float64(z + -1.0)) - Float64(x / Float64(z + -1.0)));
	elseif (z <= -5.8e-56)
		tmp = t_1;
	elseif (z <= -2.6e-122)
		tmp = Float64(x + Float64(z * Float64(Float64(Float64(t - a) / y) - Float64(b / Float64(y / x)))));
	elseif (z <= -3.9e-304)
		tmp = t_2;
	elseif (z <= 1.8e-237)
		tmp = Float64(x + Float64(Float64(Float64(t - a) * Float64(z / y)) - Float64(b / Float64(y / Float64(x * z)))));
	elseif (z <= 1.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	tmp = 0.0;
	if (z <= -2.1e+19)
		tmp = t_1;
	elseif (z <= -3.9e-15)
		tmp = ((a / (y / z)) / (z + -1.0)) - (x / (z + -1.0));
	elseif (z <= -5.8e-56)
		tmp = t_1;
	elseif (z <= -2.6e-122)
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	elseif (z <= -3.9e-304)
		tmp = t_2;
	elseif (z <= 1.8e-237)
		tmp = x + (((t - a) * (z / y)) - (b / (y / (x * z))));
	elseif (z <= 1.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+19], t$95$1, If[LessEqual[z, -3.9e-15], N[(N[(N[(a / N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e-56], t$95$1, If[LessEqual[z, -2.6e-122], N[(x + N[(z * N[(N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] - N[(b / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.9e-304], t$95$2, If[LessEqual[z, 1.8e-237], N[(x + N[(N[(N[(t - a), $MachinePrecision] * N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{a}{\frac{y}{z}}}{z + -1} - \frac{x}{z + -1}\\

\mathbf{elif}\;z \leq -5.8 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.1e19 or -3.90000000000000026e-15 < z < -5.79999999999999982e-56 or 1 < z

    1. Initial program 41.8%

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

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

    if -2.1e19 < z < -3.90000000000000026e-15

    1. Initial program 52.2%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto -1 \cdot \frac{x}{z - 1} + \color{blue}{\left(-\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. unsub-neg75.0%

        \[\leadsto \color{blue}{-1 \cdot \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}} \]
      3. associate-*r/75.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot 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} \]
      4. neg-mul-175.0%

        \[\leadsto \frac{\color{blue}{-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} \]
      5. sub-neg75.0%

        \[\leadsto \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} \]
      6. metadata-eval75.0%

        \[\leadsto \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} \]
    5. Simplified75.0%

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

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

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

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

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

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

        \[\leadsto \frac{-x}{z + -1} - \color{blue}{\frac{-\frac{a \cdot z}{y}}{z + -1}} \]
      6. associate-/l*76.7%

        \[\leadsto \frac{-x}{z + -1} - \frac{-\color{blue}{\frac{a}{\frac{y}{z}}}}{z + -1} \]
      7. distribute-neg-frac76.7%

        \[\leadsto \frac{-x}{z + -1} - \frac{\color{blue}{\frac{-a}{\frac{y}{z}}}}{z + -1} \]
    8. Simplified76.7%

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

    if -5.79999999999999982e-56 < z < -2.59999999999999975e-122

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999975e-122 < z < -3.89999999999999975e-304 or 1.79999999999999998e-237 < z < 1

    1. Initial program 88.7%

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

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

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

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

    if -3.89999999999999975e-304 < z < 1.79999999999999998e-237

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+19}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-15}:\\ \;\;\;\;\frac{\frac{a}{\frac{y}{z}}}{z + -1} - \frac{x}{z + -1}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-56}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-122}:\\ \;\;\;\;x + z \cdot \left(\frac{t - a}{y} - \frac{b}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-304}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-237}:\\ \;\;\;\;x + \left(\left(t - a\right) \cdot \frac{z}{y} - \frac{b}{\frac{y}{x \cdot z}}\right)\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{if}\;z \leq -3.55 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1020000000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-62}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-122}:\\ \;\;\;\;x + z \cdot \left(\frac{t - a}{y} - \frac{b}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq 20:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y)))
        (t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
   (if (<= z -3.55e+59)
     t_1
     (if (<= z -1020000000000.0)
       (* (/ x z) (/ y (- b y)))
       (if (<= z -3.3e-62)
         t_2
         (if (<= z -2.9e-122)
           (+ x (* z (- (/ (- t a) y) (/ b (/ y x)))))
           (if (<= z 20.0) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	double tmp;
	if (z <= -3.55e+59) {
		tmp = t_1;
	} else if (z <= -1020000000000.0) {
		tmp = (x / z) * (y / (b - y));
	} else if (z <= -3.3e-62) {
		tmp = t_2;
	} else if (z <= -2.9e-122) {
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	} else if (z <= 20.0) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    t_2 = ((x * y) + (z * (t - a))) / (y + (z * b))
    if (z <= (-3.55d+59)) then
        tmp = t_1
    else if (z <= (-1020000000000.0d0)) then
        tmp = (x / z) * (y / (b - y))
    else if (z <= (-3.3d-62)) then
        tmp = t_2
    else if (z <= (-2.9d-122)) then
        tmp = x + (z * (((t - a) / y) - (b / (y / x))))
    else if (z <= 20.0d0) then
        tmp = t_2
    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 = (t - a) / (b - y);
	double t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	double tmp;
	if (z <= -3.55e+59) {
		tmp = t_1;
	} else if (z <= -1020000000000.0) {
		tmp = (x / z) * (y / (b - y));
	} else if (z <= -3.3e-62) {
		tmp = t_2;
	} else if (z <= -2.9e-122) {
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	} else if (z <= 20.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	t_2 = ((x * y) + (z * (t - a))) / (y + (z * b))
	tmp = 0
	if z <= -3.55e+59:
		tmp = t_1
	elif z <= -1020000000000.0:
		tmp = (x / z) * (y / (b - y))
	elif z <= -3.3e-62:
		tmp = t_2
	elif z <= -2.9e-122:
		tmp = x + (z * (((t - a) / y) - (b / (y / x))))
	elif z <= 20.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b)))
	tmp = 0.0
	if (z <= -3.55e+59)
		tmp = t_1;
	elseif (z <= -1020000000000.0)
		tmp = Float64(Float64(x / z) * Float64(y / Float64(b - y)));
	elseif (z <= -3.3e-62)
		tmp = t_2;
	elseif (z <= -2.9e-122)
		tmp = Float64(x + Float64(z * Float64(Float64(Float64(t - a) / y) - Float64(b / Float64(y / x)))));
	elseif (z <= 20.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	t_2 = ((x * y) + (z * (t - a))) / (y + (z * b));
	tmp = 0.0;
	if (z <= -3.55e+59)
		tmp = t_1;
	elseif (z <= -1020000000000.0)
		tmp = (x / z) * (y / (b - y));
	elseif (z <= -3.3e-62)
		tmp = t_2;
	elseif (z <= -2.9e-122)
		tmp = x + (z * (((t - a) / y) - (b / (y / x))));
	elseif (z <= 20.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.55e+59], t$95$1, If[LessEqual[z, -1020000000000.0], N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e-62], t$95$2, If[LessEqual[z, -2.9e-122], N[(x + N[(z * N[(N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision] - N[(b / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 20.0], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1020000000000:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-62}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 20:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.55000000000000002e59 or 20 < z

    1. Initial program 37.6%

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

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

    if -3.55000000000000002e59 < z < -1.02e12

    1. Initial program 75.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} \]
    8. Simplified81.5%

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

    if -1.02e12 < z < -3.30000000000000004e-62 or -2.9000000000000002e-122 < z < 20

    1. Initial program 83.6%

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

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

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

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

    if -3.30000000000000004e-62 < z < -2.9000000000000002e-122

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.55 \cdot 10^{+59}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1020000000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-62}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-122}:\\ \;\;\;\;x + z \cdot \left(\frac{t - a}{y} - \frac{b}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq 20:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 65.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y} - \frac{x}{z + -1}\\ t_2 := \frac{t - a}{b - y}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -0.000135:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-110}:\\ \;\;\;\;\frac{1}{\frac{\left(b - y\right) + \frac{y}{z}}{t}}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+81}:\\ \;\;\;\;t\_2\\ \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)))) (t_2 (/ (- t a) (- b y))))
   (if (<= y -1.4e+37)
     t_1
     (if (<= y -0.000135)
       (/ (+ (* x y) (* z (- t a))) y)
       (if (<= y -1e-74)
         t_2
         (if (<= y -5e-110)
           (/ 1.0 (/ (+ (- b y) (/ y z)) t))
           (if (<= y 9.6e+81) t_2 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 t_2 = (t - a) / (b - y);
	double tmp;
	if (y <= -1.4e+37) {
		tmp = t_1;
	} else if (y <= -0.000135) {
		tmp = ((x * y) + (z * (t - a))) / y;
	} else if (y <= -1e-74) {
		tmp = t_2;
	} else if (y <= -5e-110) {
		tmp = 1.0 / (((b - y) + (y / z)) / t);
	} else if (y <= 9.6e+81) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = ((a - t) / y) - (x / (z + (-1.0d0)))
    t_2 = (t - a) / (b - y)
    if (y <= (-1.4d+37)) then
        tmp = t_1
    else if (y <= (-0.000135d0)) then
        tmp = ((x * y) + (z * (t - a))) / y
    else if (y <= (-1d-74)) then
        tmp = t_2
    else if (y <= (-5d-110)) then
        tmp = 1.0d0 / (((b - y) + (y / z)) / t)
    else if (y <= 9.6d+81) then
        tmp = t_2
    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 t_2 = (t - a) / (b - y);
	double tmp;
	if (y <= -1.4e+37) {
		tmp = t_1;
	} else if (y <= -0.000135) {
		tmp = ((x * y) + (z * (t - a))) / y;
	} else if (y <= -1e-74) {
		tmp = t_2;
	} else if (y <= -5e-110) {
		tmp = 1.0 / (((b - y) + (y / z)) / t);
	} else if (y <= 9.6e+81) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a - t) / y) - (x / (z + -1.0))
	t_2 = (t - a) / (b - y)
	tmp = 0
	if y <= -1.4e+37:
		tmp = t_1
	elif y <= -0.000135:
		tmp = ((x * y) + (z * (t - a))) / y
	elif y <= -1e-74:
		tmp = t_2
	elif y <= -5e-110:
		tmp = 1.0 / (((b - y) + (y / z)) / t)
	elif y <= 9.6e+81:
		tmp = t_2
	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)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (y <= -1.4e+37)
		tmp = t_1;
	elseif (y <= -0.000135)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / y);
	elseif (y <= -1e-74)
		tmp = t_2;
	elseif (y <= -5e-110)
		tmp = Float64(1.0 / Float64(Float64(Float64(b - y) + Float64(y / z)) / t));
	elseif (y <= 9.6e+81)
		tmp = t_2;
	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));
	t_2 = (t - a) / (b - y);
	tmp = 0.0;
	if (y <= -1.4e+37)
		tmp = t_1;
	elseif (y <= -0.000135)
		tmp = ((x * y) + (z * (t - a))) / y;
	elseif (y <= -1e-74)
		tmp = t_2;
	elseif (y <= -5e-110)
		tmp = 1.0 / (((b - y) + (y / z)) / t);
	elseif (y <= 9.6e+81)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+37], t$95$1, If[LessEqual[y, -0.000135], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1e-74], t$95$2, If[LessEqual[y, -5e-110], N[(1.0 / N[(N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+81], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;y \leq 9.6 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3999999999999999e37 or 9.59999999999999958e81 < y

    1. Initial program 42.6%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. mul-1-neg62.1%

        \[\leadsto -1 \cdot \frac{x}{z - 1} + \color{blue}{\left(-\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. unsub-neg62.1%

        \[\leadsto \color{blue}{-1 \cdot \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}} \]
      3. associate-*r/62.1%

        \[\leadsto \color{blue}{\frac{-1 \cdot 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} \]
      4. neg-mul-162.1%

        \[\leadsto \frac{\color{blue}{-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} \]
      5. sub-neg62.1%

        \[\leadsto \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} \]
      6. metadata-eval62.1%

        \[\leadsto \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} \]
    5. Simplified73.2%

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

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

    if -1.3999999999999999e37 < y < -1.35000000000000002e-4

    1. Initial program 85.1%

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

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

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

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

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

    if -1.35000000000000002e-4 < y < -9.99999999999999958e-75 or -5e-110 < y < 9.59999999999999958e81

    1. Initial program 75.4%

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

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

    if -9.99999999999999958e-75 < y < -5e-110

    1. Initial program 82.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{z}}} \]
    6. Taylor expanded in z around 0 64.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{b + \left(\frac{y}{z} - y\right)}{t}}} \]
      2. associate-+r-64.5%

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

        \[\leadsto \frac{1}{\frac{\color{blue}{\left(\frac{y}{z} + b\right)} - y}{t}} \]
      4. associate-+r-64.5%

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

        \[\leadsto \frac{1}{\frac{\color{blue}{\left(b - y\right) + \frac{y}{z}}}{t}} \]
    10. Simplified64.5%

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

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

Alternative 8: 65.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot \left(t - a\right)\\ t_2 := \frac{a - t}{y} - \frac{x}{z + -1}\\ t_3 := \frac{t - a}{b - y}\\ \mathbf{if}\;y \leq -8.1 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{t\_1}{y}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-110}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-173}:\\ \;\;\;\;\frac{t\_1}{z \cdot b}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+88}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z (- t a))))
        (t_2 (- (/ (- a t) y) (/ x (+ z -1.0))))
        (t_3 (/ (- t a) (- b y))))
   (if (<= y -8.1e+42)
     t_2
     (if (<= y -7.5e-7)
       (/ t_1 y)
       (if (<= y -5.6e-110)
         t_3
         (if (<= y -1.55e-173)
           (/ t_1 (* z b))
           (if (<= y 6.4e+88) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * y) + (z * (t - a));
	double t_2 = ((a - t) / y) - (x / (z + -1.0));
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (y <= -8.1e+42) {
		tmp = t_2;
	} else if (y <= -7.5e-7) {
		tmp = t_1 / y;
	} else if (y <= -5.6e-110) {
		tmp = t_3;
	} else if (y <= -1.55e-173) {
		tmp = t_1 / (z * b);
	} else if (y <= 6.4e+88) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = (x * y) + (z * (t - a))
    t_2 = ((a - t) / y) - (x / (z + (-1.0d0)))
    t_3 = (t - a) / (b - y)
    if (y <= (-8.1d+42)) then
        tmp = t_2
    else if (y <= (-7.5d-7)) then
        tmp = t_1 / y
    else if (y <= (-5.6d-110)) then
        tmp = t_3
    else if (y <= (-1.55d-173)) then
        tmp = t_1 / (z * b)
    else if (y <= 6.4d+88) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * y) + (z * (t - a));
	double t_2 = ((a - t) / y) - (x / (z + -1.0));
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (y <= -8.1e+42) {
		tmp = t_2;
	} else if (y <= -7.5e-7) {
		tmp = t_1 / y;
	} else if (y <= -5.6e-110) {
		tmp = t_3;
	} else if (y <= -1.55e-173) {
		tmp = t_1 / (z * b);
	} else if (y <= 6.4e+88) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x * y) + (z * (t - a))
	t_2 = ((a - t) / y) - (x / (z + -1.0))
	t_3 = (t - a) / (b - y)
	tmp = 0
	if y <= -8.1e+42:
		tmp = t_2
	elif y <= -7.5e-7:
		tmp = t_1 / y
	elif y <= -5.6e-110:
		tmp = t_3
	elif y <= -1.55e-173:
		tmp = t_1 / (z * b)
	elif y <= 6.4e+88:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a)))
	t_2 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0)))
	t_3 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (y <= -8.1e+42)
		tmp = t_2;
	elseif (y <= -7.5e-7)
		tmp = Float64(t_1 / y);
	elseif (y <= -5.6e-110)
		tmp = t_3;
	elseif (y <= -1.55e-173)
		tmp = Float64(t_1 / Float64(z * b));
	elseif (y <= 6.4e+88)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x * y) + (z * (t - a));
	t_2 = ((a - t) / y) - (x / (z + -1.0));
	t_3 = (t - a) / (b - y);
	tmp = 0.0;
	if (y <= -8.1e+42)
		tmp = t_2;
	elseif (y <= -7.5e-7)
		tmp = t_1 / y;
	elseif (y <= -5.6e-110)
		tmp = t_3;
	elseif (y <= -1.55e-173)
		tmp = t_1 / (z * b);
	elseif (y <= 6.4e+88)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.1e+42], t$95$2, If[LessEqual[y, -7.5e-7], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[y, -5.6e-110], t$95$3, If[LessEqual[y, -1.55e-173], N[(t$95$1 / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+88], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{t\_1}{y}\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{-110}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -1.55 \cdot 10^{-173}:\\
\;\;\;\;\frac{t\_1}{z \cdot b}\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+88}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.0999999999999996e42 or 6.3999999999999997e88 < y

    1. Initial program 42.6%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. mul-1-neg62.1%

        \[\leadsto -1 \cdot \frac{x}{z - 1} + \color{blue}{\left(-\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. unsub-neg62.1%

        \[\leadsto \color{blue}{-1 \cdot \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}} \]
      3. associate-*r/62.1%

        \[\leadsto \color{blue}{\frac{-1 \cdot 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} \]
      4. neg-mul-162.1%

        \[\leadsto \frac{\color{blue}{-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} \]
      5. sub-neg62.1%

        \[\leadsto \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} \]
      6. metadata-eval62.1%

        \[\leadsto \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} \]
    5. Simplified73.2%

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

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

    if -8.0999999999999996e42 < y < -7.5000000000000002e-7

    1. Initial program 85.1%

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

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

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

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

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

    if -7.5000000000000002e-7 < y < -5.6000000000000001e-110 or -1.55000000000000003e-173 < y < 6.3999999999999997e88

    1. Initial program 73.9%

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

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

    if -5.6000000000000001e-110 < y < -1.55000000000000003e-173

    1. Initial program 92.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.1 \cdot 10^{+42}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-110}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-173}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+88}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 42.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 9.4 \cdot 10^{-287}:\\
\;\;\;\;\frac{-a}{b}\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.10000000000000019e-9 or 7.20000000000000031e120 < y

    1. Initial program 45.1%

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

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

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

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

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

    if -2.10000000000000019e-9 < y < -5.2e-271 or 9.3999999999999997e-287 < y < 7.20000000000000031e120

    1. Initial program 77.0%

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

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{z}} \]
    5. Simplified47.1%

      \[\leadsto \color{blue}{\frac{t}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{z}}} \]
    6. Taylor expanded in z around inf 45.3%

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

    if -5.2e-271 < y < 9.3999999999999997e-287

    1. Initial program 69.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    6. Simplified77.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-9}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-271}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 9.4 \cdot 10^{-287}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+120}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 34.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-38}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-279}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-285}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-96}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.15e-38)
   x
   (if (<= y -1.9e-279)
     (/ t b)
     (if (<= y 1.15e-285) (/ (- a) b) (if (<= y 4.2e-96) (/ t b) x)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.15e-38) {
		tmp = x;
	} else if (y <= -1.9e-279) {
		tmp = t / b;
	} else if (y <= 1.15e-285) {
		tmp = -a / b;
	} else if (y <= 4.2e-96) {
		tmp = t / b;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-1.15d-38)) then
        tmp = x
    else if (y <= (-1.9d-279)) then
        tmp = t / b
    else if (y <= 1.15d-285) then
        tmp = -a / b
    else if (y <= 4.2d-96) then
        tmp = t / b
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.15e-38) {
		tmp = x;
	} else if (y <= -1.9e-279) {
		tmp = t / b;
	} else if (y <= 1.15e-285) {
		tmp = -a / b;
	} else if (y <= 4.2e-96) {
		tmp = t / b;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.15e-38:
		tmp = x
	elif y <= -1.9e-279:
		tmp = t / b
	elif y <= 1.15e-285:
		tmp = -a / b
	elif y <= 4.2e-96:
		tmp = t / b
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.15e-38)
		tmp = x;
	elseif (y <= -1.9e-279)
		tmp = Float64(t / b);
	elseif (y <= 1.15e-285)
		tmp = Float64(Float64(-a) / b);
	elseif (y <= 4.2e-96)
		tmp = Float64(t / b);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.15e-38)
		tmp = x;
	elseif (y <= -1.9e-279)
		tmp = t / b;
	elseif (y <= 1.15e-285)
		tmp = -a / b;
	elseif (y <= 4.2e-96)
		tmp = t / b;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.15e-38], x, If[LessEqual[y, -1.9e-279], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.15e-285], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 4.2e-96], N[(t / b), $MachinePrecision], x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-38}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-285}:\\
\;\;\;\;\frac{-a}{b}\\

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.15000000000000001e-38 or 4.20000000000000002e-96 < y

    1. Initial program 52.5%

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

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

    if -1.15000000000000001e-38 < y < -1.90000000000000016e-279 or 1.14999999999999998e-285 < y < 4.20000000000000002e-96

    1. Initial program 78.4%

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

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{z}} \]
    5. Simplified54.8%

      \[\leadsto \color{blue}{\frac{t}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{z}}} \]
    6. Taylor expanded in b around inf 44.4%

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

    if -1.90000000000000016e-279 < y < 1.14999999999999998e-285

    1. Initial program 69.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    6. Simplified77.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-38}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-279}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-285}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-96}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.5% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.28 \cdot 10^{+120}:\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.3e-5 or 1.27999999999999996e120 < y

    1. Initial program 44.6%

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

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

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

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

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

    if -2.3e-5 < y < 3.7e19

    1. Initial program 76.1%

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

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

    if 3.7e19 < y < 1.27999999999999996e120

    1. Initial program 78.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{z}}} \]
    6. Taylor expanded in z around inf 46.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+19}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 1.28 \cdot 10^{+120}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.4% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 4.1 \cdot 10^{+121}:\\
\;\;\;\;\frac{a - t}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.8e-5 or 4.1e121 < y

    1. Initial program 44.2%

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

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

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

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

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

    if -5.8e-5 < y < 4.2e-85

    1. Initial program 76.6%

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

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

    if 4.2e-85 < y < 4.1e121

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
    4. Taylor expanded in b around 0 37.4%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t - a\right)}{y}} \]
      2. neg-mul-137.4%

        \[\leadsto \frac{\color{blue}{-\left(t - a\right)}}{y} \]
      3. neg-sub037.4%

        \[\leadsto \frac{\color{blue}{0 - \left(t - a\right)}}{y} \]
      4. associate--r-37.4%

        \[\leadsto \frac{\color{blue}{\left(0 - t\right) + a}}{y} \]
      5. neg-sub037.4%

        \[\leadsto \frac{\color{blue}{\left(-t\right)} + a}{y} \]
    6. Simplified37.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-85}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+121}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 60.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.000215 \lor \neg \left(y \leq 2.9 \cdot 10^{+122}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.14999999999999995e-4 or 2.9000000000000001e122 < y

    1. Initial program 44.2%

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

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

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

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

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

    if -2.14999999999999995e-4 < y < 2.9000000000000001e122

    1. Initial program 76.6%

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

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

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

Alternative 14: 44.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-65} \lor \neg \left(z \leq 1.25 \cdot 10^{-47}\right):\\
\;\;\;\;\frac{t}{b - y}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e-65 or 1.25000000000000003e-47 < z

    1. Initial program 46.8%

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

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{z}} \]
    5. Simplified34.7%

      \[\leadsto \color{blue}{\frac{t}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{z}}} \]
    6. Taylor expanded in z around inf 41.0%

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

    if -1.15e-65 < z < 1.25000000000000003e-47

    1. Initial program 80.6%

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

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

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

Alternative 15: 34.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-37}:\\
\;\;\;\;x\\

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000013e-37 or 1.15e-95 < y

    1. Initial program 52.5%

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

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

    if -2.00000000000000013e-37 < y < 1.15e-95

    1. Initial program 77.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{z}}} \]
    6. Taylor expanded in b around inf 41.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{-37}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-95}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 25.5% 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 61.6%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.3%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 73.6% 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 2024029 
(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)))))