Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 65.6% → 96.8%
Time: 28.8s
Alternatives: 20
Speedup: 0.6×

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

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

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

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

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2 + \frac{\frac{x \cdot y}{b - y} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z}\\

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_5\\


\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 18.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 x around 0 18.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-187.6%

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

    1. Initial program 26.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 z around -inf 89.7%

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

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

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

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

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

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

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

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

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

    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. Taylor expanded in x around 0 99.6%

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

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

Alternative 2: 96.6% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\left(t_2 + \frac{x}{\frac{z}{\frac{y}{b - y}}}\right) - \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\\

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_5\\


\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 18.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 x around 0 18.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-187.6%

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

    1. Initial program 26.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 z around inf 70.8%

      \[\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+70.8%

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

        \[\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+70.8%

        \[\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. associate-/l*74.2%

        \[\leadsto \left(\color{blue}{\frac{x}{\frac{z \cdot \left(b - y\right)}{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}} \]
      5. associate-/l*88.2%

        \[\leadsto \left(\frac{x}{\color{blue}{\frac{z}{\frac{y}{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-sub88.2%

        \[\leadsto \left(\frac{x}{\frac{z}{\frac{y}{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. times-frac93.4%

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

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

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

    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. Taylor expanded in x around 0 99.6%

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

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

Alternative 3: 94.5% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2 + \frac{y}{z} \cdot \frac{x}{b}\\

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_5\\


\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 18.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 x around 0 18.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-187.6%

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

    1. Initial program 29.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 x around 0 29.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{\mathsf{fma}\left(z, b - y, y\right)}} + \frac{t - a}{b - y} \]
    7. Taylor expanded in y around 0 67.4%

      \[\leadsto \color{blue}{\frac{x \cdot y}{b \cdot z}} + \frac{t - a}{b - y} \]
    8. Step-by-step derivation
      1. times-frac79.9%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{y}{z}} + \frac{t - a}{b - y} \]
    9. Simplified79.9%

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

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

    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. Taylor expanded in x around 0 99.6%

      \[\leadsto \color{blue}{\frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification93.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{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -2 \cdot 10^{-273}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{y}{z} \cdot \frac{x}{b}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 94.5% accurate, 0.2× 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 \left(b - y\right)}\\ t_3 := \frac{x}{1 - z} + t_1\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-273}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t_1 + \frac{y}{z} \cdot \frac{x}{b}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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 y)))))
        (t_3 (+ (/ x (- 1.0 z)) t_1)))
   (if (<= t_2 (- INFINITY))
     t_3
     (if (<= t_2 -2e-273)
       t_2
       (if (<= t_2 0.0)
         (+ t_1 (* (/ y z) (/ x b)))
         (if (<= t_2 2e+306) t_2 t_3))))))
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 - y)));
	double t_3 = (x / (1.0 - z)) + t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= -2e-273) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t_1 + ((y / z) * (x / b));
	} else if (t_2 <= 2e+306) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
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 - y)));
	double t_3 = (x / (1.0 - z)) + t_1;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else if (t_2 <= -2e-273) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t_1 + ((y / z) * (x / b));
	} else if (t_2 <= 2e+306) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 - y)))
	t_3 = (x / (1.0 - z)) + t_1
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_3
	elif t_2 <= -2e-273:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t_1 + ((y / z) * (x / b))
	elif t_2 <= 2e+306:
		tmp = t_2
	else:
		tmp = t_3
	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 * Float64(b - y))))
	t_3 = Float64(Float64(x / Float64(1.0 - z)) + t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= -2e-273)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t_1 + Float64(Float64(y / z) * Float64(x / b)));
	elseif (t_2 <= 2e+306)
		tmp = t_2;
	else
		tmp = t_3;
	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 - y)));
	t_3 = (x / (1.0 - z)) + t_1;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_3;
	elseif (t_2 <= -2e-273)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t_1 + ((y / z) * (x / b));
	elseif (t_2 <= 2e+306)
		tmp = t_2;
	else
		tmp = t_3;
	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 * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-273], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t$95$1 + N[(N[(y / z), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, t$95$3]]]]]]]
\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 \left(b - y\right)}\\
t_3 := \frac{x}{1 - z} + t_1\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-273}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1 + \frac{y}{z} \cdot \frac{x}{b}\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 18.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 x around 0 18.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-187.6%

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-273 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306

    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 -2e-273 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0

    1. Initial program 29.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 x around 0 29.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{\mathsf{fma}\left(z, b - y, y\right)}} + \frac{t - a}{b - y} \]
    7. Taylor expanded in y around 0 67.4%

      \[\leadsto \color{blue}{\frac{x \cdot y}{b \cdot z}} + \frac{t - a}{b - y} \]
    8. Step-by-step derivation
      1. times-frac79.9%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{y}{z}} + \frac{t - a}{b - y} \]
    9. Simplified79.9%

      \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{y}{z}} + \frac{t - a}{b - y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.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{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -2 \cdot 10^{-273}:\\ \;\;\;\;\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} + \frac{y}{z} \cdot \frac{x}{b}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 94.5% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_2 + \frac{y}{z} \cdot \frac{x}{b}\\

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_3\\

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


\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 18.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 x around 0 18.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-187.6%

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

    1. Initial program 29.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 x around 0 29.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{\mathsf{fma}\left(z, b - y, y\right)}} + \frac{t - a}{b - y} \]
    7. Taylor expanded in y around 0 67.4%

      \[\leadsto \color{blue}{\frac{x \cdot y}{b \cdot z}} + \frac{t - a}{b - y} \]
    8. Step-by-step derivation
      1. times-frac79.9%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{y}{z}} + \frac{t - a}{b - y} \]
    9. Simplified79.9%

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

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

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

Alternative 6: 72.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-43}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{t_1}{y}\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{-46}:\\ \;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+18}:\\ \;\;\;\;x + \frac{t_1}{y \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- t a))) (t_2 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
   (if (<= z -1.15e+143)
     t_2
     (if (<= z -2.6e+86)
       (/ (- (/ x (/ z y)) (- a t)) b)
       (if (<= z -3.2e-43)
         t_2
         (if (<= z 1.4e-133)
           (+ x (/ t_1 y))
           (if (<= z 1.56e-46)
             (/ (+ t (- (* y (/ x z)) a)) b)
             (if (<= z 7e+18) (+ x (/ t_1 (* y (- 1.0 z)))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
	double tmp;
	if (z <= -1.15e+143) {
		tmp = t_2;
	} else if (z <= -2.6e+86) {
		tmp = ((x / (z / y)) - (a - t)) / b;
	} else if (z <= -3.2e-43) {
		tmp = t_2;
	} else if (z <= 1.4e-133) {
		tmp = x + (t_1 / y);
	} else if (z <= 1.56e-46) {
		tmp = (t + ((y * (x / z)) - a)) / b;
	} else if (z <= 7e+18) {
		tmp = x + (t_1 / (y * (1.0 - z)));
	} 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 = z * (t - a)
    t_2 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
    if (z <= (-1.15d+143)) then
        tmp = t_2
    else if (z <= (-2.6d+86)) then
        tmp = ((x / (z / y)) - (a - t)) / b
    else if (z <= (-3.2d-43)) then
        tmp = t_2
    else if (z <= 1.4d-133) then
        tmp = x + (t_1 / y)
    else if (z <= 1.56d-46) then
        tmp = (t + ((y * (x / z)) - a)) / b
    else if (z <= 7d+18) then
        tmp = x + (t_1 / (y * (1.0d0 - z)))
    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 = z * (t - a);
	double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
	double tmp;
	if (z <= -1.15e+143) {
		tmp = t_2;
	} else if (z <= -2.6e+86) {
		tmp = ((x / (z / y)) - (a - t)) / b;
	} else if (z <= -3.2e-43) {
		tmp = t_2;
	} else if (z <= 1.4e-133) {
		tmp = x + (t_1 / y);
	} else if (z <= 1.56e-46) {
		tmp = (t + ((y * (x / z)) - a)) / b;
	} else if (z <= 7e+18) {
		tmp = x + (t_1 / (y * (1.0 - z)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (t - a)
	t_2 = (x / (1.0 - z)) + ((t - a) / (b - y))
	tmp = 0
	if z <= -1.15e+143:
		tmp = t_2
	elif z <= -2.6e+86:
		tmp = ((x / (z / y)) - (a - t)) / b
	elif z <= -3.2e-43:
		tmp = t_2
	elif z <= 1.4e-133:
		tmp = x + (t_1 / y)
	elif z <= 1.56e-46:
		tmp = (t + ((y * (x / z)) - a)) / b
	elif z <= 7e+18:
		tmp = x + (t_1 / (y * (1.0 - z)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(t - a))
	t_2 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y)))
	tmp = 0.0
	if (z <= -1.15e+143)
		tmp = t_2;
	elseif (z <= -2.6e+86)
		tmp = Float64(Float64(Float64(x / Float64(z / y)) - Float64(a - t)) / b);
	elseif (z <= -3.2e-43)
		tmp = t_2;
	elseif (z <= 1.4e-133)
		tmp = Float64(x + Float64(t_1 / y));
	elseif (z <= 1.56e-46)
		tmp = Float64(Float64(t + Float64(Float64(y * Float64(x / z)) - a)) / b);
	elseif (z <= 7e+18)
		tmp = Float64(x + Float64(t_1 / Float64(y * Float64(1.0 - z))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (t - a);
	t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
	tmp = 0.0;
	if (z <= -1.15e+143)
		tmp = t_2;
	elseif (z <= -2.6e+86)
		tmp = ((x / (z / y)) - (a - t)) / b;
	elseif (z <= -3.2e-43)
		tmp = t_2;
	elseif (z <= 1.4e-133)
		tmp = x + (t_1 / y);
	elseif (z <= 1.56e-46)
		tmp = (t + ((y * (x / z)) - a)) / b;
	elseif (z <= 7e+18)
		tmp = x + (t_1 / (y * (1.0 - z)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+143], t$95$2, If[LessEqual[z, -2.6e+86], N[(N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a - t), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -3.2e-43], t$95$2, If[LessEqual[z, 1.4e-133], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e-46], N[(N[(t + N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 7e+18], N[(x + N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-43}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{t_1}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.15e143 or -2.5999999999999998e86 < z < -3.19999999999999985e-43 or 7e18 < z

    1. Initial program 43.3%

      \[\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 0 43.3%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-186.8%

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

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

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

    if -1.15e143 < z < -2.5999999999999998e86

    1. Initial program 83.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 0 83.0%

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

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

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

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

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

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

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

    if -3.19999999999999985e-43 < z < 1.3999999999999999e-133

    1. Initial program 83.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 x around 0 83.9%

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

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

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

    if 1.3999999999999999e-133 < z < 1.55999999999999991e-46

    1. Initial program 94.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 x around 0 94.8%

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

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

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

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

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

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

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

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

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

    if 1.55999999999999991e-46 < z < 7e18

    1. Initial program 92.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 x around 0 92.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+143}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-43}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{-46}:\\ \;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+18}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-38}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-135}:\\
\;\;\;\;x + \frac{t_1}{y}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.09999999999999988e143 or -2.2999999999999999e86 < z < -1.7000000000000001e-38 or 7.5e8 < z

    1. Initial program 43.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 x around 0 43.5%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-186.2%

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

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

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

    if -2.09999999999999988e143 < z < -2.2999999999999999e86

    1. Initial program 83.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 0 83.0%

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

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

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

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

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

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

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

    if -1.7000000000000001e-38 < z < 2.5500000000000001e-135

    1. Initial program 83.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 x around 0 83.8%

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

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

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

    if 2.5500000000000001e-135 < z < 7.5e8

    1. Initial program 96.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 x around 0 75.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+143}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-135}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 750000000:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 81.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ t_2 := \frac{x}{1 - z} + t_1\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\ \mathbf{elif}\;z \leq -35000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 140000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y))) (t_2 (+ (/ x (- 1.0 z)) t_1)))
   (if (<= z -1.15e+143)
     t_2
     (if (<= z -2.6e+86)
       (/ (- (/ x (/ z y)) (- a t)) b)
       (if (<= z -35000000.0)
         t_1
         (if (<= z 140000.0)
           (- x (/ (* z (- a t)) (+ y (* z (- b y)))))
           t_2))))))
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 / (1.0 - z)) + t_1;
	double tmp;
	if (z <= -1.15e+143) {
		tmp = t_2;
	} else if (z <= -2.6e+86) {
		tmp = ((x / (z / y)) - (a - t)) / b;
	} else if (z <= -35000000.0) {
		tmp = t_1;
	} else if (z <= 140000.0) {
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
	} 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 - a) / (b - y)
    t_2 = (x / (1.0d0 - z)) + t_1
    if (z <= (-1.15d+143)) then
        tmp = t_2
    else if (z <= (-2.6d+86)) then
        tmp = ((x / (z / y)) - (a - t)) / b
    else if (z <= (-35000000.0d0)) then
        tmp = t_1
    else if (z <= 140000.0d0) then
        tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
    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 - a) / (b - y);
	double t_2 = (x / (1.0 - z)) + t_1;
	double tmp;
	if (z <= -1.15e+143) {
		tmp = t_2;
	} else if (z <= -2.6e+86) {
		tmp = ((x / (z / y)) - (a - t)) / b;
	} else if (z <= -35000000.0) {
		tmp = t_1;
	} else if (z <= 140000.0) {
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	t_2 = (x / (1.0 - z)) + t_1
	tmp = 0
	if z <= -1.15e+143:
		tmp = t_2
	elif z <= -2.6e+86:
		tmp = ((x / (z / y)) - (a - t)) / b
	elif z <= -35000000.0:
		tmp = t_1
	elif z <= 140000.0:
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	t_2 = Float64(Float64(x / Float64(1.0 - z)) + t_1)
	tmp = 0.0
	if (z <= -1.15e+143)
		tmp = t_2;
	elseif (z <= -2.6e+86)
		tmp = Float64(Float64(Float64(x / Float64(z / y)) - Float64(a - t)) / b);
	elseif (z <= -35000000.0)
		tmp = t_1;
	elseif (z <= 140000.0)
		tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / Float64(y + Float64(z * Float64(b - y)))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	t_2 = (x / (1.0 - z)) + t_1;
	tmp = 0.0;
	if (z <= -1.15e+143)
		tmp = t_2;
	elseif (z <= -2.6e+86)
		tmp = ((x / (z / y)) - (a - t)) / b;
	elseif (z <= -35000000.0)
		tmp = t_1;
	elseif (z <= 140000.0)
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
	else
		tmp = t_2;
	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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[z, -1.15e+143], t$95$2, If[LessEqual[z, -2.6e+86], N[(N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a - t), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -35000000.0], t$95$1, If[LessEqual[z, 140000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -35000000:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.15e143 or 1.4e5 < z

    1. Initial program 37.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 x around 0 37.0%

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. neg-mul-187.8%

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

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

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

    if -1.15e143 < z < -2.5999999999999998e86

    1. Initial program 83.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 0 83.0%

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

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

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

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

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

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

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

    if -2.5999999999999998e86 < z < -3.5e7

    1. Initial program 58.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 92.7%

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

    if -3.5e7 < z < 1.4e5

    1. Initial program 87.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 x around 0 87.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+143}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\ \mathbf{elif}\;z \leq -35000000:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 140000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 72.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{t_1}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.25e-13 or 7e18 < z

    1. Initial program 45.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 z around inf 80.6%

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

    if -2.25e-13 < z < 1.3999999999999999e-133

    1. Initial program 83.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 x around 0 83.9%

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

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

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

    if 1.3999999999999999e-133 < z < 3.80000000000000015e-47

    1. Initial program 94.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 x around 0 94.8%

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

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

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

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

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

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

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

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

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

    if 3.80000000000000015e-47 < z < 7e18

    1. Initial program 92.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 x around 0 92.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-13}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-47}:\\ \;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+18}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 46.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b}\\ t_2 := \frac{-a}{b - y}\\ \mathbf{if}\;z \leq -9 \cdot 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+240}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) b)) (t_2 (/ (- a) (- b y))))
   (if (<= z -9e+149)
     t_2
     (if (<= z -4.6e-67)
       t_1
       (if (<= z 1.4e-133)
         x
         (if (<= z 6.2e+135) t_1 (if (<= z 3e+240) (/ t (- b y)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = -a / (b - y);
	double tmp;
	if (z <= -9e+149) {
		tmp = t_2;
	} else if (z <= -4.6e-67) {
		tmp = t_1;
	} else if (z <= 1.4e-133) {
		tmp = x;
	} else if (z <= 6.2e+135) {
		tmp = t_1;
	} else if (z <= 3e+240) {
		tmp = t / (b - y);
	} 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 - a) / b
    t_2 = -a / (b - y)
    if (z <= (-9d+149)) then
        tmp = t_2
    else if (z <= (-4.6d-67)) then
        tmp = t_1
    else if (z <= 1.4d-133) then
        tmp = x
    else if (z <= 6.2d+135) then
        tmp = t_1
    else if (z <= 3d+240) then
        tmp = t / (b - y)
    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 - a) / b;
	double t_2 = -a / (b - y);
	double tmp;
	if (z <= -9e+149) {
		tmp = t_2;
	} else if (z <= -4.6e-67) {
		tmp = t_1;
	} else if (z <= 1.4e-133) {
		tmp = x;
	} else if (z <= 6.2e+135) {
		tmp = t_1;
	} else if (z <= 3e+240) {
		tmp = t / (b - y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / b
	t_2 = -a / (b - y)
	tmp = 0
	if z <= -9e+149:
		tmp = t_2
	elif z <= -4.6e-67:
		tmp = t_1
	elif z <= 1.4e-133:
		tmp = x
	elif z <= 6.2e+135:
		tmp = t_1
	elif z <= 3e+240:
		tmp = t / (b - y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / b)
	t_2 = Float64(Float64(-a) / Float64(b - y))
	tmp = 0.0
	if (z <= -9e+149)
		tmp = t_2;
	elseif (z <= -4.6e-67)
		tmp = t_1;
	elseif (z <= 1.4e-133)
		tmp = x;
	elseif (z <= 6.2e+135)
		tmp = t_1;
	elseif (z <= 3e+240)
		tmp = Float64(t / Float64(b - y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / b;
	t_2 = -a / (b - y);
	tmp = 0.0;
	if (z <= -9e+149)
		tmp = t_2;
	elseif (z <= -4.6e-67)
		tmp = t_1;
	elseif (z <= 1.4e-133)
		tmp = x;
	elseif (z <= 6.2e+135)
		tmp = t_1;
	elseif (z <= 3e+240)
		tmp = t / (b - y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+149], t$95$2, If[LessEqual[z, -4.6e-67], t$95$1, If[LessEqual[z, 1.4e-133], x, If[LessEqual[z, 6.2e+135], t$95$1, If[LessEqual[z, 3e+240], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{-a}{b - y}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+149}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+135}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+240}:\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.99999999999999965e149 or 2.9999999999999999e240 < z

    1. Initial program 26.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 x around 0 26.0%

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} + \frac{t - a}{b - y} \]
    6. Applied egg-rr84.0%

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b - y} \]
    9. Simplified64.9%

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

    if -8.99999999999999965e149 < z < -4.6000000000000001e-67 or 1.3999999999999999e-133 < z < 6.20000000000000044e135

    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 y around 0 50.0%

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

    if -4.6000000000000001e-67 < z < 1.3999999999999999e-133

    1. Initial program 83.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 z around 0 59.3%

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

    if 6.20000000000000044e135 < z < 2.9999999999999999e240

    1. Initial program 40.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 x around 0 40.7%

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} + \frac{t - a}{b - y} \]
    6. Applied egg-rr87.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+149}:\\ \;\;\;\;\frac{-a}{b - y}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-67}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+135}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+240}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 70.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 6.1 \cdot 10^{-103}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-38}:\\
\;\;\;\;\frac{t - a}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.19999999999999998e-21 or 2.00000000000000007e-10 < z

    1. Initial program 46.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.1%

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

    if -9.19999999999999998e-21 < z < 6.1000000000000001e-103 or 1.54999999999999991e-38 < z < 2.00000000000000007e-10

    1. Initial program 86.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 x around 0 86.2%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{y}{t - a}}} \]
    7. Simplified69.4%

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

    if 6.1000000000000001e-103 < z < 1.54999999999999991e-38

    1. Initial program 91.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 y around 0 83.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{-21}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-38}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-10}:\\ \;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 73.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-47}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y))))
   (if (<= z -8.6e-13)
     t_1
     (if (<= z 6.1e-103)
       (+ x (/ (* z (- t a)) y))
       (if (<= z 2.8e-47)
         (/ (- t a) b)
         (if (<= z 2.9e-8) (+ x (/ z (/ y (- t a)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double tmp;
	if (z <= -8.6e-13) {
		tmp = t_1;
	} else if (z <= 6.1e-103) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 2.8e-47) {
		tmp = (t - a) / b;
	} else if (z <= 2.9e-8) {
		tmp = x + (z / (y / (t - a)));
	} 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 = (t - a) / (b - y)
    if (z <= (-8.6d-13)) then
        tmp = t_1
    else if (z <= 6.1d-103) then
        tmp = x + ((z * (t - a)) / y)
    else if (z <= 2.8d-47) then
        tmp = (t - a) / b
    else if (z <= 2.9d-8) then
        tmp = x + (z / (y / (t - a)))
    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 tmp;
	if (z <= -8.6e-13) {
		tmp = t_1;
	} else if (z <= 6.1e-103) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 2.8e-47) {
		tmp = (t - a) / b;
	} else if (z <= 2.9e-8) {
		tmp = x + (z / (y / (t - a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	tmp = 0
	if z <= -8.6e-13:
		tmp = t_1
	elif z <= 6.1e-103:
		tmp = x + ((z * (t - a)) / y)
	elif z <= 2.8e-47:
		tmp = (t - a) / b
	elif z <= 2.9e-8:
		tmp = x + (z / (y / (t - a)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -8.6e-13)
		tmp = t_1;
	elseif (z <= 6.1e-103)
		tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y));
	elseif (z <= 2.8e-47)
		tmp = Float64(Float64(t - a) / b);
	elseif (z <= 2.9e-8)
		tmp = Float64(x + Float64(z / Float64(y / Float64(t - a))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -8.6e-13)
		tmp = t_1;
	elseif (z <= 6.1e-103)
		tmp = x + ((z * (t - a)) / y);
	elseif (z <= 2.8e-47)
		tmp = (t - a) / b;
	elseif (z <= 2.9e-8)
		tmp = x + (z / (y / (t - a)));
	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]}, If[LessEqual[z, -8.6e-13], t$95$1, If[LessEqual[z, 6.1e-103], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-47], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.9e-8], N[(x + N[(z / N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{t - a}{b}\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.5999999999999997e-13 or 2.9000000000000002e-8 < z

    1. Initial program 46.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.1%

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

    if -8.5999999999999997e-13 < z < 6.1000000000000001e-103

    1. Initial program 85.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 x around 0 85.0%

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

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

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

    if 6.1000000000000001e-103 < z < 2.79999999999999993e-47

    1. Initial program 91.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 y around 0 83.0%

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

    if 2.79999999999999993e-47 < z < 2.9000000000000002e-8

    1. Initial program 99.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 x around 0 99.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-47}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 72.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{-19}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.70000000000000005e-19 or 5.00000000000000018e-11 < z

    1. Initial program 46.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.1%

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

    if -3.70000000000000005e-19 < z < 1.3999999999999999e-133

    1. Initial program 83.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 x around 0 83.9%

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

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

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

    if 1.3999999999999999e-133 < z < 4.2999999999999999e-41

    1. Initial program 94.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 x around 0 94.8%

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

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

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

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

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

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

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

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

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

    if 4.2999999999999999e-41 < z < 5.00000000000000018e-11

    1. Initial program 99.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 x around 0 99.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-19}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-41}:\\ \;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+83} \lor \neg \left(y \leq -9.5 \cdot 10^{+16}\right) \land \left(y \leq -1.2 \cdot 10^{-31} \lor \neg \left(y \leq 9.2 \cdot 10^{-26}\right)\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.45e83 or -9.5e16 < y < -1.2e-31 or 9.20000000000000035e-26 < y

    1. Initial program 58.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 y around inf 50.5%

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

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

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

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

    if -1.45e83 < y < -9.5e16 or -1.2e-31 < y < 9.20000000000000035e-26

    1. Initial program 74.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 y around 0 60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+83} \lor \neg \left(y \leq -9.5 \cdot 10^{+16}\right) \land \left(y \leq -1.2 \cdot 10^{-31} \lor \neg \left(y \leq 9.2 \cdot 10^{-26}\right)\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 34.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+182}:\\
\;\;\;\;\frac{a}{y}\\

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-56} \lor \neg \left(z \leq 2.6 \cdot 10^{-119}\right):\\
\;\;\;\;\frac{t}{b}\\

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


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

    1. Initial program 24.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 0 24.6%

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

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

        \[\leadsto \color{blue}{\frac{z}{y} \cdot \frac{t - a}{1 + -1 \cdot z}} \]
      2. neg-mul-143.7%

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

        \[\leadsto \frac{z}{y} \cdot \frac{t - a}{\color{blue}{1 - z}} \]
    6. Simplified43.7%

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

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

        \[\leadsto \frac{z}{y} \cdot \color{blue}{\frac{-1 \cdot a}{1 - z}} \]
      2. neg-mul-128.6%

        \[\leadsto \frac{z}{y} \cdot \frac{\color{blue}{-a}}{1 - z} \]
    9. Simplified28.6%

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

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

    if -8.6000000000000003e182 < z < -1.79999999999999989e-56 or 2.60000000000000012e-119 < z

    1. Initial program 63.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 0 49.3%

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

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

    if -1.79999999999999989e-56 < z < 2.60000000000000012e-119

    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 z around 0 58.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+182}:\\ \;\;\;\;\frac{a}{y}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-56} \lor \neg \left(z \leq 2.6 \cdot 10^{-119}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 34.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+168}:\\
\;\;\;\;\frac{-a}{b}\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-54} \lor \neg \left(z \leq 2.8 \cdot 10^{-119}\right):\\
\;\;\;\;\frac{t}{b}\\

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


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

    1. Initial program 26.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 y around 0 47.8%

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

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

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

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

    if -1.1000000000000001e168 < z < -1e-54 or 2.8e-119 < z

    1. Initial program 64.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 y around 0 48.5%

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

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

    if -1e-54 < z < 2.8e-119

    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 z around 0 58.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+168}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-54} \lor \neg \left(z \leq 2.8 \cdot 10^{-119}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 63.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-57} \lor \neg \left(z \leq 1.4 \cdot 10^{-133}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.90000000000000006e-57 or 1.3999999999999999e-133 < z

    1. Initial program 57.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 71.8%

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

    if -3.90000000000000006e-57 < z < 1.3999999999999999e-133

    1. Initial program 83.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 z around 0 59.3%

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

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

Alternative 18: 42.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{-58} \lor \neg \left(z \leq 7.5 \cdot 10^{-124}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.14999999999999999e-58 or 7.4999999999999996e-124 < z

    1. Initial program 57.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 x around 0 57.1%

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} + \frac{t - a}{b - y} \]
    6. Applied egg-rr79.8%

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

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

    if -3.14999999999999999e-58 < z < 7.4999999999999996e-124

    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 z around 0 58.3%

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

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

Alternative 19: 34.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+38} \lor \neg \left(z \leq 6600\right):\\
\;\;\;\;\frac{a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.69999999999999996e38 or 6600 < z

    1. Initial program 42.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 x around 0 36.2%

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

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

        \[\leadsto \color{blue}{\frac{z}{y} \cdot \frac{t - a}{1 + -1 \cdot z}} \]
      2. neg-mul-134.6%

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

        \[\leadsto \frac{z}{y} \cdot \frac{t - a}{\color{blue}{1 - z}} \]
    6. Simplified34.6%

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

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

        \[\leadsto \frac{z}{y} \cdot \color{blue}{\frac{-1 \cdot a}{1 - z}} \]
      2. neg-mul-119.9%

        \[\leadsto \frac{z}{y} \cdot \frac{\color{blue}{-a}}{1 - z} \]
    9. Simplified19.9%

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

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

    if -2.69999999999999996e38 < z < 6600

    1. Initial program 86.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 0 43.0%

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

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

Alternative 20: 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 66.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.9%

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 73.3% 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 2024014 
(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)))))