Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.9% → 94.6%
Time: 18.2s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 66.9% accurate, 1.0× speedup?

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

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

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

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

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

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+257}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\

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


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

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

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

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

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

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

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

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

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

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

    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. Step-by-step derivation
      1. sub-neg99.6%

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

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

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

    if -2.0000000000000001e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999991e-199

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

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

        \[\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. +-commutative73.1%

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

        \[\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. *-commutative73.1%

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

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

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

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

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

    if 9.9999999999999991e-199 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000028e257

    1. Initial program 99.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/95.3%

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+257}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\

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


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

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

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

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

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

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

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

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

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

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

    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. Step-by-step derivation
      1. sub-neg99.6%

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

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

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

    if -2.0000000000000001e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e-224

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

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

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

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

    if 1e-224 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000028e257

    1. Initial program 99.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/95.3%

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

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

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

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

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

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

Alternative 3: 92.3% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-292}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+257}:\\
\;\;\;\;t\_2\\

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


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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-292 or 1e-224 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000028e257

    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. Step-by-step derivation
      1. sub-neg99.6%

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

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

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

    if -2.0000000000000001e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e-224

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/95.3%

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

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

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

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

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

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

Alternative 4: 92.3% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+257}:\\
\;\;\;\;t\_1\\

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


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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-292 or 1e-224 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000028e257

    1. Initial program 99.6%

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

    if -2.0000000000000001e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e-224

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/95.3%

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

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

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

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

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

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

Alternative 5: 92.3% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+257}:\\
\;\;\;\;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 5.00000000000000028e257 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 19.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/95.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z - 1}} + \frac{t - a}{b - y} \]
      2. mul-1-neg95.4%

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z + -1}} + \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)))) < -2.0000000000000001e-292 or 1e-224 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000028e257

    1. Initial program 99.6%

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

    if -2.0000000000000001e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e-224

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

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

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

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

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

Alternative 6: 70.7% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.3000000000000001e51 or 7.20000000000000025e-106 < 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 z around inf 77.8%

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

    if -1.3000000000000001e51 < z < -9e15

    1. Initial program 35.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/88.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z + -1}} + \frac{t - a}{b - y} \]
    8. Taylor expanded in a around 0 88.8%

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

        \[\leadsto \color{blue}{\frac{t}{b - y} + -1 \cdot \frac{x}{z - 1}} \]
      2. mul-1-neg88.8%

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

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

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

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

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

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

    if -9e15 < z < -6.09999999999999997e-72

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

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

    if -6.09999999999999997e-72 < z < 7.20000000000000025e-106

    1. Initial program 82.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+51}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t}{b - y}\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{-72}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-106}:\\ \;\;\;\;x + \frac{z \cdot \left(t - \left(a + x \cdot b\right)\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 72.5% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.65 \cdot 10^{-27}:\\
\;\;\;\;t\_1 + x \cdot \frac{y}{z \cdot b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.00000000000000003e-42 or 2.65000000000000003e-27 < y

    1. Initial program 42.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/85.6%

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

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

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

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

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

    if -5.00000000000000003e-42 < y < -8.6999999999999996e-131

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

      \[\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. +-commutative81.4%

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

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

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

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

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

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

    if -8.6999999999999996e-131 < y < 2.65000000000000003e-27

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{b \cdot z}} + \frac{t - a}{b - y} \]
      2. *-commutative80.5%

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

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

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

Alternative 8: 75.4% accurate, 0.6× speedup?

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

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

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

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

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


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

    1. Initial program 42.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/85.2%

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

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

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

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

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

    if -2.25e-39 < z < 2.9e-106

    1. Initial program 82.6%

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

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

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

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

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

    if 2.9e-106 < z < 1.79999999999999992e-6

    1. Initial program 94.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-39}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-106}:\\ \;\;\;\;x + \frac{z \cdot \left(t - \left(a + x \cdot b\right)\right)}{y}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-6}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b} + \frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.4999999999999999e-44 or 7.5000000000000003e-28 < y

    1. Initial program 42.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z - 1}} + \frac{t - a}{b - y} \]
    6. Step-by-step derivation
      1. associate-*r/85.6%

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

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

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

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

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

    if -4.4999999999999999e-44 < y < 7.5000000000000003e-28

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

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

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

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

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

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

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

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

Alternative 10: 70.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-40} \lor \neg \left(z \leq 7.5 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3e-40 or 7.5000000000000002e-106 < z

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

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

    if -2.3e-40 < z < 7.5000000000000002e-106

    1. Initial program 82.6%

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

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

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

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

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

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

Alternative 11: 52.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{a}{y - b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.55000000000000005e61 or 1.2000000000000001e50 < y

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

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

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

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

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

    if -2.55000000000000005e61 < y < 8.199999999999999e-127

    1. Initial program 80.2%

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

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

    if 8.199999999999999e-127 < y < 1.2000000000000001e50

    1. Initial program 74.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{+61}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+50}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 39.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+49}:\\
\;\;\;\;\frac{a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.26e-85 or 2.59999999999999989e49 < y

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

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

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

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

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

    if -1.26e-85 < y < 1.34999999999999998e-66

    1. Initial program 83.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 a around inf 34.8%

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

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

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

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

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

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

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

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

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

    if 1.34999999999999998e-66 < y < 2.59999999999999989e49

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b - y} \]
    6. Simplified44.0%

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

      \[\leadsto \color{blue}{\frac{a}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 68.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-62} \lor \neg \left(z \leq 6.8 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5000000000000001e-62 or 6.79999999999999965e-106 < z

    1. Initial program 50.2%

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

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

    if -1.5000000000000001e-62 < z < 6.79999999999999965e-106

    1. Initial program 81.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 0 47.5%

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

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

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

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

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

      \[\leadsto x + z \cdot \color{blue}{\frac{t - a}{y}} \]
    9. Taylor expanded in t around inf 72.8%

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

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

Alternative 14: 53.5% accurate, 1.1× speedup?

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

    1. Initial program 38.6%

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

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

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

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

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

    if -2.45000000000000013e61 < y < 1.9000000000000001e45

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

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

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

Alternative 15: 43.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-63} \lor \neg \left(z \leq 3.8 \cdot 10^{-97}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e-63 or 3.8000000000000001e-97 < z

    1. Initial program 49.9%

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

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

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

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

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

    if -1.1e-63 < z < 3.8000000000000001e-97

    1. Initial program 82.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 0 62.1%

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

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

Alternative 16: 35.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-67} \lor \neg \left(z \leq 6.3 \cdot 10^{-90}\right):\\
\;\;\;\;\frac{-a}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.00000000000000065e-67 or 6.29999999999999977e-90 < z

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000065e-67 < z < 6.29999999999999977e-90

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-67} \lor \neg \left(z \leq 6.3 \cdot 10^{-90}\right):\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 34.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \lor \neg \left(z \leq 1.02\right):\\
\;\;\;\;\frac{a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8500000000000001 or 1.02 < z

    1. Initial program 39.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 inf 78.8%

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

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

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

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

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

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

    if -1.8500000000000001 < z < 1.02

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \lor \neg \left(z \leq 1.02\right):\\ \;\;\;\;\frac{a}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 34.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -52:\\
\;\;\;\;\frac{a}{y}\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-97}:\\
\;\;\;\;x\\

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


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

    1. Initial program 42.8%

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

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

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

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

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

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

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

    if -52 < z < 3.8000000000000001e-97

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

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

    if 3.8000000000000001e-97 < z

    1. Initial program 49.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 19: 25.5% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 41.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 a around inf 26.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified28.4%

      \[\leadsto \color{blue}{\frac{-a}{b}} \]
    9. Step-by-step derivation
      1. div-inv28.3%

        \[\leadsto \color{blue}{\left(-a\right) \cdot \frac{1}{b}} \]
      2. add-sqr-sqrt16.7%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \frac{1}{b} \]
      3. sqrt-unprod18.2%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \frac{1}{b} \]
      4. sqr-neg18.2%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \frac{1}{b} \]
      5. sqrt-unprod4.6%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \frac{1}{b} \]
      6. add-sqr-sqrt10.9%

        \[\leadsto \color{blue}{a} \cdot \frac{1}{b} \]
    10. Applied egg-rr10.9%

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

        \[\leadsto \color{blue}{\frac{a \cdot 1}{b}} \]
      2. *-rgt-identity10.9%

        \[\leadsto \frac{\color{blue}{a}}{b} \]
    12. Simplified10.9%

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

    if -6.19999999999999992e27 < z

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 24.8% 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 62.0%

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

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

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

  :alt
  (! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))

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