Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.6% → 98.0%
Time: 20.1s
Alternatives: 19
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 66.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: 98.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_5 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_3 + \frac{\frac{x \cdot y}{b - y} - \frac{y}{\frac{t\_2}{t - a}}}{z}\\

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_4}{t\_1}\\

\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_6\\

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


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

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

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

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

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

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

      \[\leadsto \frac{x}{1 - z} + \color{blue}{\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)))) < -5.00000000000000025e-287

    1. Initial program 99.0%

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

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

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

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

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

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

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

        \[\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*100.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-sub100.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. Simplified100.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.00000000000000012e290

    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.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)}} \]

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

    1. Initial program 0.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 inf 31.4%

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_5 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_5\\

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

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_4}{t\_1}\\

\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_6\\

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


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

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

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

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

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

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

      \[\leadsto \frac{x}{1 - z} + \color{blue}{\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)))) < -5.00000000000000025e-287

    1. Initial program 99.0%

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

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

    1. Initial program 10.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{y}{z} \cdot \frac{x}{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.00000000000000012e290

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

Alternative 3: 93.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := \frac{x \cdot y + t\_2}{t\_1}\\ t_4 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} + \frac{y \cdot a}{{\left(b - y\right)}^{2}}}{z} - \frac{a}{b - y}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\ \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 (* z (- t a)))
        (t_3 (/ (+ (* x y) t_2) t_1))
        (t_4 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
   (if (<= t_3 (- INFINITY))
     t_4
     (if (<= t_3 -5e-287)
       t_3
       (if (<= t_3 0.0)
         (-
          (/ (+ (/ x (/ (- b y) y)) (/ (* y a) (pow (- b y) 2.0))) z)
          (/ a (- b y)))
         (if (<= t_3 2e+290) (+ (/ (* x y) t_1) (/ t_2 t_1)) 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 = z * (t - a);
	double t_3 = ((x * y) + t_2) / t_1;
	double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_4;
	} else if (t_3 <= -5e-287) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = (((x / ((b - y) / y)) + ((y * a) / pow((b - y), 2.0))) / z) - (a / (b - y));
	} else if (t_3 <= 2e+290) {
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	} 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 = z * (t - a);
	double t_3 = ((x * y) + t_2) / t_1;
	double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t_4;
	} else if (t_3 <= -5e-287) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = (((x / ((b - y) / y)) + ((y * a) / Math.pow((b - y), 2.0))) / z) - (a / (b - y));
	} else if (t_3 <= 2e+290) {
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = z * (t - a)
	t_3 = ((x * y) + t_2) / t_1
	t_4 = (x / (1.0 - z)) + ((t - a) / (b - y))
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t_4
	elif t_3 <= -5e-287:
		tmp = t_3
	elif t_3 <= 0.0:
		tmp = (((x / ((b - y) / y)) + ((y * a) / math.pow((b - y), 2.0))) / z) - (a / (b - y))
	elif t_3 <= 2e+290:
		tmp = ((x * y) / t_1) + (t_2 / t_1)
	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(z * Float64(t - a))
	t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1)
	t_4 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y)))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_4;
	elseif (t_3 <= -5e-287)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) + Float64(Float64(y * a) / (Float64(b - y) ^ 2.0))) / z) - Float64(a / Float64(b - y)));
	elseif (t_3 <= 2e+290)
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1));
	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 = z * (t - a);
	t_3 = ((x * y) + t_2) / t_1;
	t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t_4;
	elseif (t_3 <= -5e-287)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = (((x / ((b - y) / y)) + ((y * a) / ((b - y) ^ 2.0))) / z) - (a / (b - y));
	elseif (t_3 <= 2e+290)
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-287], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+290], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\

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

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

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

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

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

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

      \[\leadsto \frac{x}{1 - z} + \color{blue}{\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)))) < -5.00000000000000025e-287

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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.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)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification96.6%

    \[\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 -5 \cdot 10^{-287}:\\ \;\;\;\;\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{\frac{x}{\frac{b - y}{y}} + \frac{y \cdot a}{{\left(b - y\right)}^{2}}}{z} - \frac{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^{+290}:\\ \;\;\;\;\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: 93.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := \frac{x \cdot y + t\_2}{t\_1}\\ t_4 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\ \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 (* z (- t a)))
        (t_3 (/ (+ (* x y) t_2) t_1))
        (t_4 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
   (if (<= t_3 (- INFINITY))
     t_4
     (if (<= t_3 -5e-287)
       t_3
       (if (<= t_3 0.0)
         (/ (- (+ t (/ (* x y) z)) a) b)
         (if (<= t_3 2e+290) (+ (/ (* x y) t_1) (/ t_2 t_1)) 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 = z * (t - a);
	double t_3 = ((x * y) + t_2) / t_1;
	double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_4;
	} else if (t_3 <= -5e-287) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = ((t + ((x * y) / z)) - a) / b;
	} else if (t_3 <= 2e+290) {
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	} 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 = z * (t - a);
	double t_3 = ((x * y) + t_2) / t_1;
	double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t_4;
	} else if (t_3 <= -5e-287) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = ((t + ((x * y) / z)) - a) / b;
	} else if (t_3 <= 2e+290) {
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = z * (t - a)
	t_3 = ((x * y) + t_2) / t_1
	t_4 = (x / (1.0 - z)) + ((t - a) / (b - y))
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t_4
	elif t_3 <= -5e-287:
		tmp = t_3
	elif t_3 <= 0.0:
		tmp = ((t + ((x * y) / z)) - a) / b
	elif t_3 <= 2e+290:
		tmp = ((x * y) / t_1) + (t_2 / t_1)
	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(z * Float64(t - a))
	t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1)
	t_4 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y)))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_4;
	elseif (t_3 <= -5e-287)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(Float64(t + Float64(Float64(x * y) / z)) - a) / b);
	elseif (t_3 <= 2e+290)
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1));
	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 = z * (t - a);
	t_3 = ((x * y) + t_2) / t_1;
	t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t_4;
	elseif (t_3 <= -5e-287)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = ((t + ((x * y) / z)) - a) / b;
	elseif (t_3 <= 2e+290)
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-287], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$3, 2e+290], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\

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

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

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

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

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

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

      \[\leadsto \frac{x}{1 - z} + \color{blue}{\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)))) < -5.00000000000000025e-287

    1. Initial program 99.0%

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

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

    1. Initial program 37.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 37.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 b around inf 77.8%

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

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

    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.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)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification96.2%

    \[\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 -5 \cdot 10^{-287}:\\ \;\;\;\;\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{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\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 5: 93.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\

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

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

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


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

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

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

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

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

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

      \[\leadsto \frac{x}{1 - z} + \color{blue}{\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)))) < -5.00000000000000025e-287 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290

    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

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

    1. Initial program 37.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 37.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 b around inf 77.8%

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

    \[\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 -5 \cdot 10^{-287}:\\ \;\;\;\;\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{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\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: 76.3% accurate, 0.5× 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}{1 - z}\\ t_4 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -0.05:\\ \;\;\;\;t\_3 + t\_2\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-73}:\\ \;\;\;\;t\_3 + \frac{t\_4}{y}\\ \mathbf{elif}\;z \leq 0.082:\\ \;\;\;\;\frac{t\_4}{t\_1}\\ \mathbf{elif}\;z \leq 750:\\ \;\;\;\;\frac{x \cdot y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (/ x (- 1.0 z)))
        (t_4 (* z (- t a))))
   (if (<= z -0.05)
     (+ t_3 t_2)
     (if (<= z 1.1e-73)
       (+ t_3 (/ t_4 y))
       (if (<= z 0.082) (/ t_4 t_1) (if (<= z 750.0) (/ (* x y) t_1) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = x / (1.0 - z);
	double t_4 = z * (t - a);
	double tmp;
	if (z <= -0.05) {
		tmp = t_3 + t_2;
	} else if (z <= 1.1e-73) {
		tmp = t_3 + (t_4 / y);
	} else if (z <= 0.082) {
		tmp = t_4 / t_1;
	} else if (z <= 750.0) {
		tmp = (x * y) / 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) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    t_2 = (t - a) / (b - y)
    t_3 = x / (1.0d0 - z)
    t_4 = z * (t - a)
    if (z <= (-0.05d0)) then
        tmp = t_3 + t_2
    else if (z <= 1.1d-73) then
        tmp = t_3 + (t_4 / y)
    else if (z <= 0.082d0) then
        tmp = t_4 / t_1
    else if (z <= 750.0d0) then
        tmp = (x * y) / 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 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = x / (1.0 - z);
	double t_4 = z * (t - a);
	double tmp;
	if (z <= -0.05) {
		tmp = t_3 + t_2;
	} else if (z <= 1.1e-73) {
		tmp = t_3 + (t_4 / y);
	} else if (z <= 0.082) {
		tmp = t_4 / t_1;
	} else if (z <= 750.0) {
		tmp = (x * y) / t_1;
	} else {
		tmp = t_2;
	}
	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 / (1.0 - z)
	t_4 = z * (t - a)
	tmp = 0
	if z <= -0.05:
		tmp = t_3 + t_2
	elif z <= 1.1e-73:
		tmp = t_3 + (t_4 / y)
	elif z <= 0.082:
		tmp = t_4 / t_1
	elif z <= 750.0:
		tmp = (x * y) / t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(x / Float64(1.0 - z))
	t_4 = Float64(z * Float64(t - a))
	tmp = 0.0
	if (z <= -0.05)
		tmp = Float64(t_3 + t_2);
	elseif (z <= 1.1e-73)
		tmp = Float64(t_3 + Float64(t_4 / y));
	elseif (z <= 0.082)
		tmp = Float64(t_4 / t_1);
	elseif (z <= 750.0)
		tmp = Float64(Float64(x * y) / t_1);
	else
		tmp = t_2;
	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 / (1.0 - z);
	t_4 = z * (t - a);
	tmp = 0.0;
	if (z <= -0.05)
		tmp = t_3 + t_2;
	elseif (z <= 1.1e-73)
		tmp = t_3 + (t_4 / y);
	elseif (z <= 0.082)
		tmp = t_4 / t_1;
	elseif (z <= 750.0)
		tmp = (x * y) / t_1;
	else
		tmp = t_2;
	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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.05], N[(t$95$3 + t$95$2), $MachinePrecision], If[LessEqual[z, 1.1e-73], N[(t$95$3 + N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.082], N[(t$95$4 / t$95$1), $MachinePrecision], If[LessEqual[z, 750.0], N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]]]
\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}{1 - z}\\
t_4 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -0.05:\\
\;\;\;\;t\_3 + t\_2\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-73}:\\
\;\;\;\;t\_3 + \frac{t\_4}{y}\\

\mathbf{elif}\;z \leq 0.082:\\
\;\;\;\;\frac{t\_4}{t\_1}\\

\mathbf{elif}\;z \leq 750:\\
\;\;\;\;\frac{x \cdot y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -0.050000000000000003

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

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

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

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

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

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

    if -0.050000000000000003 < z < 1.1e-73

    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 x around 0 86.4%

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

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

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

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

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

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

    if 1.1e-73 < z < 0.0820000000000000034

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

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

    if 0.0820000000000000034 < z < 750

    1. Initial program 99.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 inf 98.7%

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

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

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

    if 750 < z

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

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

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

Alternative 7: 76.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{x}{1 - z}\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -0.05:\\ \;\;\;\;t\_2 + t\_4\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-73}:\\ \;\;\;\;t\_2 + \frac{1}{\frac{y}{t\_3}}\\ \mathbf{elif}\;z \leq 0.045:\\ \;\;\;\;\frac{t\_3}{t\_1}\\ \mathbf{elif}\;z \leq 42000:\\ \;\;\;\;\frac{x \cdot y}{t\_1}\\ \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 (/ x (- 1.0 z)))
        (t_3 (* z (- t a)))
        (t_4 (/ (- t a) (- b y))))
   (if (<= z -0.05)
     (+ t_2 t_4)
     (if (<= z 1.55e-73)
       (+ t_2 (/ 1.0 (/ y t_3)))
       (if (<= z 0.045)
         (/ t_3 t_1)
         (if (<= z 42000.0) (/ (* x y) t_1) 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 = x / (1.0 - z);
	double t_3 = z * (t - a);
	double t_4 = (t - a) / (b - y);
	double tmp;
	if (z <= -0.05) {
		tmp = t_2 + t_4;
	} else if (z <= 1.55e-73) {
		tmp = t_2 + (1.0 / (y / t_3));
	} else if (z <= 0.045) {
		tmp = t_3 / t_1;
	} else if (z <= 42000.0) {
		tmp = (x * y) / t_1;
	} else {
		tmp = t_4;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    t_2 = x / (1.0d0 - z)
    t_3 = z * (t - a)
    t_4 = (t - a) / (b - y)
    if (z <= (-0.05d0)) then
        tmp = t_2 + t_4
    else if (z <= 1.55d-73) then
        tmp = t_2 + (1.0d0 / (y / t_3))
    else if (z <= 0.045d0) then
        tmp = t_3 / t_1
    else if (z <= 42000.0d0) then
        tmp = (x * y) / t_1
    else
        tmp = t_4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = x / (1.0 - z);
	double t_3 = z * (t - a);
	double t_4 = (t - a) / (b - y);
	double tmp;
	if (z <= -0.05) {
		tmp = t_2 + t_4;
	} else if (z <= 1.55e-73) {
		tmp = t_2 + (1.0 / (y / t_3));
	} else if (z <= 0.045) {
		tmp = t_3 / t_1;
	} else if (z <= 42000.0) {
		tmp = (x * y) / t_1;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = x / (1.0 - z)
	t_3 = z * (t - a)
	t_4 = (t - a) / (b - y)
	tmp = 0
	if z <= -0.05:
		tmp = t_2 + t_4
	elif z <= 1.55e-73:
		tmp = t_2 + (1.0 / (y / t_3))
	elif z <= 0.045:
		tmp = t_3 / t_1
	elif z <= 42000.0:
		tmp = (x * y) / t_1
	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(x / Float64(1.0 - z))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -0.05)
		tmp = Float64(t_2 + t_4);
	elseif (z <= 1.55e-73)
		tmp = Float64(t_2 + Float64(1.0 / Float64(y / t_3)));
	elseif (z <= 0.045)
		tmp = Float64(t_3 / t_1);
	elseif (z <= 42000.0)
		tmp = Float64(Float64(x * y) / t_1);
	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 = x / (1.0 - z);
	t_3 = z * (t - a);
	t_4 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -0.05)
		tmp = t_2 + t_4;
	elseif (z <= 1.55e-73)
		tmp = t_2 + (1.0 / (y / t_3));
	elseif (z <= 0.045)
		tmp = t_3 / t_1;
	elseif (z <= 42000.0)
		tmp = (x * y) / t_1;
	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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.05], N[(t$95$2 + t$95$4), $MachinePrecision], If[LessEqual[z, 1.55e-73], N[(t$95$2 + N[(1.0 / N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.045], N[(t$95$3 / t$95$1), $MachinePrecision], If[LessEqual[z, 42000.0], N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-73}:\\
\;\;\;\;t\_2 + \frac{1}{\frac{y}{t\_3}}\\

\mathbf{elif}\;z \leq 0.045:\\
\;\;\;\;\frac{t\_3}{t\_1}\\

\mathbf{elif}\;z \leq 42000:\\
\;\;\;\;\frac{x \cdot y}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -0.050000000000000003

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

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

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

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

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

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

    if -0.050000000000000003 < z < 1.54999999999999985e-73

    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 x around 0 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.54999999999999985e-73 < z < 0.044999999999999998

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

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

    if 0.044999999999999998 < z < 42000

    1. Initial program 99.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 inf 98.7%

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

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

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

    if 42000 < z

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

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

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

Alternative 8: 85.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-13} \lor \neg \left(z \leq 1.3 \cdot 10^{+17}\right):\\
\;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3999999999999999e-13 or 1.3e17 < z

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

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

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

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

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

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

    if -2.3999999999999999e-13 < z < 1.3e17

    1. Initial program 89.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 b around inf 87.4%

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

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

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

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

Alternative 9: 35.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-14}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+185} \lor \neg \left(z \leq 2.6 \cdot 10^{+272}\right):\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.5000000000000003e34 or 1.75000000000000012e185 < z < 2.59999999999999999e272

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b - y} \]
    8. Simplified51.1%

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

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

    if -8.5000000000000003e34 < z < 2.5000000000000001e-14

    1. Initial program 86.5%

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

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

    if 2.5000000000000001e-14 < z < 1.75000000000000012e185 or 2.59999999999999999e272 < z

    1. Initial program 57.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 t around inf 25.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+34}:\\ \;\;\;\;\frac{a}{y}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+185} \lor \neg \left(z \leq 2.6 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 74.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4e22 or 3.89999999999999986e-26 < z

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

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

    if -4e22 < z < 3.89999999999999986e-26

    1. Initial program 86.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 86.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)}} \]
    4. Taylor expanded in y around inf 82.3%

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

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

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

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

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

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

Alternative 11: 78.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -0.078 \lor \neg \left(z \leq 1.9 \cdot 10^{-26}\right):\\
\;\;\;\;t\_1 + \frac{t - a}{b - y}\\

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


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

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

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

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

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

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

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

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

    if -0.0779999999999999999 < z < 1.90000000000000007e-26

    1. Initial program 87.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 87.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)}} \]
    4. Taylor expanded in y around inf 82.3%

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

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

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

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

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

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

Alternative 12: 46.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{1 - z}\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+164}:\\
\;\;\;\;\frac{t - a}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.09999999999999987e35

    1. Initial program 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.09999999999999987e35 < z < 6.5999999999999999e-80

    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 y around inf 53.5%

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

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

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

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

    if 6.5999999999999999e-80 < z < 1.24999999999999987e164

    1. Initial program 78.0%

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

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

    if 1.24999999999999987e164 < z

    1. Initial program 25.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+35}:\\ \;\;\;\;\frac{-a}{b - y}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-80}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+164}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.05 \lor \neg \left(z \leq 1.14 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.050000000000000003 or 1.13999999999999995e-29 < z

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

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

    if -0.050000000000000003 < z < 1.13999999999999995e-29

    1. Initial program 87.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 87.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)}} \]
    4. Taylor expanded in y around inf 82.3%

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

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

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

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

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

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

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

Alternative 14: 63.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.9999999999999993e23 or 1.59999999999999993e-73 < z

    1. Initial program 55.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 inf 76.6%

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

    if -7.9999999999999993e23 < z < 1.59999999999999993e-73

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

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

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

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

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

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

Alternative 15: 45.4% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7000000000000001e-19 or 1.40000000000000008e-10 < z

    1. Initial program 51.0%

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

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

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

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

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

    if -1.7000000000000001e-19 < z < 1.40000000000000008e-10

    1. Initial program 88.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 0 50.8%

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

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

Alternative 16: 45.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+29} \lor \neg \left(z \leq 1.7 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2e29 or 1.70000000000000003e-6 < z

    1. Initial program 49.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 t around inf 23.7%

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

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

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

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

    if -5.2e29 < z < 1.70000000000000003e-6

    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 y around inf 49.7%

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

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

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

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

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

Alternative 17: 54.7% accurate, 1.1× speedup?

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

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

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

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

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

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

    if -5.59999999999999994e-34 < y < 1.9000000000000001e-35

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

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

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

Alternative 18: 34.3% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000003e34 or 0.0820000000000000034 < z

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b - y} \]
    8. Simplified45.1%

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

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

    if -8.5000000000000003e34 < z < 0.0820000000000000034

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

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

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

Alternative 19: 25.9% accurate, 17.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 69.5%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification27.1%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 73.7% accurate, 0.7× speedup?

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

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

Reproduce

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