Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.6% → 93.1%
Time: 20.3s
Alternatives: 19
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 66.6% accurate, 1.0× speedup?

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

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

Alternative 1: 93.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -37000000 \lor \neg \left(z \leq 340000000\right):\\ \;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -37000000.0) (not (<= z 340000000.0)))
   (+ (* (/ y (- b y)) (/ x z)) (/ (- t a) (- b y)))
   (/ (fma x y (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -37000000.0) || !(z <= 340000000.0)) {
		tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y));
	} else {
		tmp = fma(x, y, (z * (t - a))) / (y + (z * (b - y)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -37000000.0) || !(z <= 340000000.0))
		tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t - a) / Float64(b - y)));
	else
		tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -37000000.0], N[Not[LessEqual[z, 340000000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -37000000 \lor \neg \left(z \leq 340000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7e7 or 3.4e8 < z

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7e7 < z < 3.4e8

    1. Initial program 87.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -37000000 \lor \neg \left(z \leq 340000000\right):\\ \;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 87.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - \frac{x}{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 38.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 25.7%

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.0000000000000003e-290 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5e307

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

    1. Initial program 18.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;x + z \cdot \frac{t}{y}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)} \leq -4 \cdot 10^{-290}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)} \leq 0:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)} \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\ t_2 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -2.55 \cdot 10^{+26}:\\ \;\;\;\;t\_2 - \frac{x}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-151}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-67}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-19}:\\ \;\;\;\;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)) (+ y (* z (- b y)))))
        (t_2 (/ (- t a) (- b y))))
   (if (<= z -2.55e+26)
     (- t_2 (/ x z))
     (if (<= z 7e-151)
       t_1
       (if (<= z 2.6e-67) (- x (/ (* z a) y)) (if (<= z 1.52e-19) 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)) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -2.55e+26) {
		tmp = t_2 - (x / z);
	} else if (z <= 7e-151) {
		tmp = t_1;
	} else if (z <= 2.6e-67) {
		tmp = x - ((z * a) / y);
	} else if (z <= 1.52e-19) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)))
    t_2 = (t - a) / (b - y)
    if (z <= (-2.55d+26)) then
        tmp = t_2 - (x / z)
    else if (z <= 7d-151) then
        tmp = t_1
    else if (z <= 2.6d-67) then
        tmp = x - ((z * a) / y)
    else if (z <= 1.52d-19) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -2.55e+26) {
		tmp = t_2 - (x / z);
	} else if (z <= 7e-151) {
		tmp = t_1;
	} else if (z <= 2.6e-67) {
		tmp = x - ((z * a) / y);
	} else if (z <= 1.52e-19) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)))
	t_2 = (t - a) / (b - y)
	tmp = 0
	if z <= -2.55e+26:
		tmp = t_2 - (x / z)
	elif z <= 7e-151:
		tmp = t_1
	elif z <= 2.6e-67:
		tmp = x - ((z * a) / y)
	elif z <= 1.52e-19:
		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 * t)) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -2.55e+26)
		tmp = Float64(t_2 - Float64(x / z));
	elseif (z <= 7e-151)
		tmp = t_1;
	elseif (z <= 2.6e-67)
		tmp = Float64(x - Float64(Float64(z * a) / y));
	elseif (z <= 1.52e-19)
		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)) / (y + (z * (b - y)));
	t_2 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -2.55e+26)
		tmp = t_2 - (x / z);
	elseif (z <= 7e-151)
		tmp = t_1;
	elseif (z <= 2.6e-67)
		tmp = x - ((z * a) / y);
	elseif (z <= 1.52e-19)
		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 * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e+26], N[(t$95$2 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-151], t$95$1, If[LessEqual[z, 2.6e-67], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e-19], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 7 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-67}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\

\mathbf{elif}\;z \leq 1.52 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\

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


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

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

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

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

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

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

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

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

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

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

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

    if -2.5499999999999999e26 < z < 6.99999999999999991e-151 or 2.5999999999999999e-67 < z < 1.5199999999999999e-19

    1. Initial program 88.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 a around 0 71.9%

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

    if 6.99999999999999991e-151 < z < 2.5999999999999999e-67

    1. Initial program 79.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 54.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. Taylor expanded in a around inf 79.8%

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

    if 1.5199999999999999e-19 < z

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+26}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-151}:\\ \;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-67}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-19}:\\ \;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-152}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{t\_2}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-105}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\

\mathbf{elif}\;z \leq 1.08 \cdot 10^{+66}:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{t\_2}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999998e25 < z < 3.29999999999999998e-152

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

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

    if 3.29999999999999998e-152 < z < 1.20000000000000007e-105

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

      \[\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. Taylor expanded in a around inf 85.1%

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

    if 1.20000000000000007e-105 < z < 1.08000000000000008e66

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

    if 1.08000000000000008e66 < z

    1. Initial program 47.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+25}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-152}:\\ \;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-105}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+66}:\\ \;\;\;\;\frac{x \cdot y - z \cdot a}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 41.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.15000000000000001e58 or 1.9000000000000001e-125 < y

    1. Initial program 51.8%

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

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

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

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

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

    if -1.15000000000000001e58 < y < -4.59999999999999975e-179

    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 t around inf 37.3%

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

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

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

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

    if -4.59999999999999975e-179 < y < -1.09999999999999997e-264 or -1.60000000000000011e-300 < y < 1.9000000000000001e-125

    1. Initial program 85.1%

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

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

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

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

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

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

    if -1.09999999999999997e-264 < y < -1.60000000000000011e-300

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+58}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-179}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-264}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-125}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.1% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-27}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-35}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.8000000000000004e33 or 1.80000000000000009e-35 < z

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

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

    if -7.8000000000000004e33 < z < -9.20000000000000035e-26

    1. Initial program 60.8%

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

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

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

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

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

    if -9.20000000000000035e-26 < z < -6.39999999999999982e-27

    1. Initial program 98.4%

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

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

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

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

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

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

    if -6.39999999999999982e-27 < z < 1.80000000000000009e-35

    1. Initial program 89.2%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 53.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. Taylor expanded in t around inf 59.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-27}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-35}:\\ \;\;\;\;x + z \cdot \frac{t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 66.1% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 4 \cdot 10^{-36}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.8000000000000004e33 or 3.9999999999999998e-36 < z

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

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

    if -7.8000000000000004e33 < z < -7.5000000000000002e-87

    1. Initial program 77.2%

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

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

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

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

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

    if -7.5000000000000002e-87 < z < -1.05000000000000001e-110

    1. Initial program 99.4%

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

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

    if -1.05000000000000001e-110 < z < 3.9999999999999998e-36

    1. Initial program 88.4%

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

      \[\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. Taylor expanded in a around inf 62.7%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{a \cdot z}{y}} \]
    5. Step-by-step derivation
      1. mul-1-neg62.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-87}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-110}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-36}:\\ \;\;\;\;x - a \cdot \frac{z}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.7% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{-36}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.8000000000000004e33 or 1.9999999999999999e-36 < z

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

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

    if -7.8000000000000004e33 < z < -3.19999999999999979e-87

    1. Initial program 77.2%

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

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

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

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

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

    if -3.19999999999999979e-87 < z < -4.8000000000000001e-111

    1. Initial program 99.4%

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

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

    if -4.8000000000000001e-111 < z < 1.9999999999999999e-36

    1. Initial program 88.4%

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

      \[\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. Taylor expanded in a around inf 62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-87}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-111}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-36}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.0% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-35}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.8000000000000004e33 or 2.4000000000000001e-35 < z

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

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

    if -7.8000000000000004e33 < z < -1.79999999999999996e-87

    1. Initial program 77.2%

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

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

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

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

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

    if -1.79999999999999996e-87 < z < -1.4e-155

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e-155 < z < 2.4000000000000001e-35

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

      \[\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. Taylor expanded in a around inf 65.6%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{a \cdot z}{y}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification70.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-87}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-155}:\\ \;\;\;\;\frac{\left(t - a\right) + x \cdot \frac{y}{z}}{b}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-35}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 68.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.03:\\
\;\;\;\;t\_1 - \frac{x}{z}\\

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-85}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-35}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if -0.029999999999999999 < z < -3.49999999999999978e-85

    1. Initial program 80.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 42.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. Taylor expanded in t around inf 60.4%

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

    if -3.49999999999999978e-85 < z < -1.3199999999999999e-164

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3199999999999999e-164 < z < 1.74999999999999998e-35

    1. Initial program 88.4%

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

      \[\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. Taylor expanded in a around inf 66.3%

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

    if 1.74999999999999998e-35 < z

    1. Initial program 57.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.03:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-85}:\\ \;\;\;\;x + z \cdot \frac{t}{y}\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{-164}:\\ \;\;\;\;\frac{\left(t - a\right) + x \cdot \frac{y}{z}}{b}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-35}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 93.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -56000000000 \lor \neg \left(z \leq 1000000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6e10 or 1e9 < z

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6e10 < z < 1e9

    1. Initial program 87.9%

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

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

Alternative 12: 44.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;x + z \cdot x\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.60000000000000009e85 or 2.50000000000000003e42 < z

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

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

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

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

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

    if -1.60000000000000009e85 < z < -6.39999999999999982e-27 or 6.6e-20 < z < 2.50000000000000003e42

    1. Initial program 78.1%

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

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

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

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

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

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

    if -6.39999999999999982e-27 < z < 6.6e-20

    1. Initial program 89.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 53.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. Taylor expanded in y around inf 49.4%

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    6. Simplified49.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+85}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-27}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-20}:\\ \;\;\;\;x + z \cdot x\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 36.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+141}:\\
\;\;\;\;\frac{a}{y}\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\

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


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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\left(t - a\right)}{y}} \]
    7. Taylor expanded in t around 0 38.4%

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

    if -5.69999999999999998e141 < z < -6.1999999999999997e-27 or 9.5e-20 < z < 5.39999999999999998e163

    1. Initial program 63.4%

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

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

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

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

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

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

    if -6.1999999999999997e-27 < z < 9.5e-20

    1. Initial program 89.4%

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

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

    if 5.39999999999999998e163 < z

    1. Initial program 41.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+141}:\\ \;\;\;\;\frac{a}{y}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-27}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+163}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 36.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.85 \cdot 10^{-21}:\\
\;\;\;\;x + z \cdot x\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\

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


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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\left(t - a\right)}{y}} \]
    7. Taylor expanded in t around 0 38.4%

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

    if -8.4999999999999996e141 < z < -6.1999999999999997e-27 or 2.8499999999999998e-21 < z < 1.60000000000000001e161

    1. Initial program 63.4%

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

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

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

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

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

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

    if -6.1999999999999997e-27 < z < 2.8499999999999998e-21

    1. Initial program 89.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 53.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. Taylor expanded in y around inf 49.4%

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    6. Simplified49.4%

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

    if 1.60000000000000001e161 < z

    1. Initial program 41.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+141}:\\ \;\;\;\;\frac{a}{y}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-27}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-21}:\\ \;\;\;\;x + z \cdot x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+161}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 35.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-11}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.7 \cdot 10^{+94}:\\
\;\;\;\;\frac{t}{-y}\\

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


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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\left(t - a\right)}{y}} \]
    7. Taylor expanded in t around 0 26.2%

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

    if -18 < z < 2.4499999999999999e-11

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

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

    if 2.4499999999999999e-11 < z < 5.7000000000000002e94

    1. Initial program 86.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\left(t - a\right)}{y}} \]
    7. Taylor expanded in t around inf 26.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{t}{y}} \]
    8. Step-by-step derivation
      1. mul-1-neg26.2%

        \[\leadsto \color{blue}{-\frac{t}{y}} \]
      2. distribute-neg-frac226.2%

        \[\leadsto \color{blue}{\frac{t}{-y}} \]
    9. Simplified26.2%

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

    if 5.7000000000000002e94 < z

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -18:\\ \;\;\;\;\frac{a}{y}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+94}:\\ \;\;\;\;\frac{t}{-y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 53.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+57} \lor \neg \left(y \leq 2.5 \cdot 10^{-77}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.7999999999999999e57 or 2.49999999999999982e-77 < y

    1. Initial program 51.1%

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

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

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

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

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

    if -3.7999999999999999e57 < y < 2.49999999999999982e-77

    1. Initial program 83.0%

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

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

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

Alternative 17: 35.1% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -16 or 580 < 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 76.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\left(t - a\right)}{y}} \]
    7. Taylor expanded in t around 0 23.2%

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

    if -16 < z < 580

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

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

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

Alternative 18: 34.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+53}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.00000000000000038e53 or 3.00000000000000016e-87 < y

    1. Initial program 51.4%

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

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

    if -7.00000000000000038e53 < y < 3.00000000000000016e-87

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+53}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-87}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 26.0% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 66.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 23.8%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification23.8%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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