Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.7% → 89.1%
Time: 18.9s
Alternatives: 14
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 89.1% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-206}:\\
\;\;\;\;t_4 + \frac{x \cdot y}{t_2}\\

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+224}:\\
\;\;\;\;t_3\\

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

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


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

    1. Initial program 46.0%

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

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

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

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

    1. Initial program 99.6%

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

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

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

    1. Initial program 12.1%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.5%

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

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

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.2% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+58} \lor \neg \left(z \leq 1.65 \cdot 10^{+16}\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.1999999999999998e58 or 1.65e16 < z

    1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999998e58 < z < 1.65e16

    1. Initial program 89.6%

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

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

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

Alternative 3: 84.9% accurate, 0.5× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.14999999999999998e36 < z < 4.7999999999999999e30

    1. Initial program 88.2%

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

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

    if 4.7999999999999999e30 < z

    1. Initial program 42.2%

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

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

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

Alternative 4: 63.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -1.95 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-128}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-63}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 1200000000:\\ \;\;\;\;\frac{x}{1 - z}\\ \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 -1.95e-69)
     t_1
     (if (<= z 1.12e-128)
       x
       (if (<= z 4.3e-63)
         (/ (- t a) b)
         (if (<= z 1200000000.0) (/ x (- 1.0 z)) 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 <= -1.95e-69) {
		tmp = t_1;
	} else if (z <= 1.12e-128) {
		tmp = x;
	} else if (z <= 4.3e-63) {
		tmp = (t - a) / b;
	} else if (z <= 1200000000.0) {
		tmp = x / (1.0 - z);
	} 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 <= (-1.95d-69)) then
        tmp = t_1
    else if (z <= 1.12d-128) then
        tmp = x
    else if (z <= 4.3d-63) then
        tmp = (t - a) / b
    else if (z <= 1200000000.0d0) then
        tmp = x / (1.0d0 - z)
    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 <= -1.95e-69) {
		tmp = t_1;
	} else if (z <= 1.12e-128) {
		tmp = x;
	} else if (z <= 4.3e-63) {
		tmp = (t - a) / b;
	} else if (z <= 1200000000.0) {
		tmp = x / (1.0 - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	tmp = 0
	if z <= -1.95e-69:
		tmp = t_1
	elif z <= 1.12e-128:
		tmp = x
	elif z <= 4.3e-63:
		tmp = (t - a) / b
	elif z <= 1200000000.0:
		tmp = x / (1.0 - z)
	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 <= -1.95e-69)
		tmp = t_1;
	elseif (z <= 1.12e-128)
		tmp = x;
	elseif (z <= 4.3e-63)
		tmp = Float64(Float64(t - a) / b);
	elseif (z <= 1200000000.0)
		tmp = Float64(x / Float64(1.0 - z));
	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 <= -1.95e-69)
		tmp = t_1;
	elseif (z <= 1.12e-128)
		tmp = x;
	elseif (z <= 4.3e-63)
		tmp = (t - a) / b;
	elseif (z <= 1200000000.0)
		tmp = x / (1.0 - z);
	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, -1.95e-69], t$95$1, If[LessEqual[z, 1.12e-128], x, If[LessEqual[z, 4.3e-63], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1200000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-128}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1200000000:\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.9499999999999999e-69 or 1.2e9 < z

    1. Initial program 54.1%

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

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

    if -1.9499999999999999e-69 < z < 1.12e-128

    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.8%

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

    if 1.12e-128 < z < 4.2999999999999999e-63

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

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

    if 4.2999999999999999e-63 < z < 1.2e9

    1. Initial program 86.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-69}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-128}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-63}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq 1200000000:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.9% accurate, 0.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -7.5999999999999999e35 < z < 4.9500000000000001e30

    1. Initial program 88.2%

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

    if 4.9500000000000001e30 < z

    1. Initial program 42.2%

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

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

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

Alternative 6: 44.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.05 \cdot 10^{-224}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7999999999999997e-23 or 5.8000000000000003e-8 < y

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

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

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

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

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

    if -2.7999999999999997e-23 < y < -1.05000000000000003e-224 or -3.70000000000000027e-287 < y < 5.8000000000000003e-8

    1. Initial program 79.2%

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

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

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

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

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

    if -1.05000000000000003e-224 < y < -3.70000000000000027e-287

    1. Initial program 94.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-224}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-287}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 80.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.04 \cdot 10^{-22}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\

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

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


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

    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 75.1%

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

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

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

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

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

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

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

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

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

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

    if -1.04e-22 < z < 62

    1. Initial program 88.3%

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

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

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

    if 62 < z

    1. Initial program 45.6%

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

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

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

Alternative 8: 75.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-36} \lor \neg \left(z \leq 9.2 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


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

    1. Initial program 52.1%

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

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

    if -1.9999999999999999e-36 < z < 9.20000000000000001e-5

    1. Initial program 88.1%

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

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

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

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

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

Alternative 9: 37.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-50} \lor \neg \left(z \leq 0.000115\right):\\
\;\;\;\;\frac{t}{b}\\

\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05e-50 or 1.15e-4 < z

    1. Initial program 53.8%

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

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

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

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

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

    if -1.05e-50 < z < 1.15e-4

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    6. Taylor expanded in z around 0 53.9%

      \[\leadsto \color{blue}{x + x \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative53.9%

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified53.9%

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

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

Alternative 10: 45.3% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.59999999999999989e-52 or 1.30000000000000006e-19 < z

    1. Initial program 54.5%

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

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

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

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

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

    if -5.59999999999999989e-52 < z < 1.30000000000000006e-19

    1. Initial program 87.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    6. Taylor expanded in z around 0 54.8%

      \[\leadsto \color{blue}{x + x \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative54.8%

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified54.8%

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

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

Alternative 11: 55.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65 \cdot 10^{-12} \lor \neg \left(y \leq 9.8 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.64999999999999982e-12 or 9.79999999999999989e-14 < y

    1. Initial program 57.5%

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

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

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

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

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

    if -2.64999999999999982e-12 < y < 9.79999999999999989e-14

    1. Initial program 80.8%

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

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

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

Alternative 12: 33.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{-42} \lor \neg \left(z \leq 4200000000000\right):\\
\;\;\;\;\frac{a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.6000000000000002e-42 or 4.2e12 < z

    1. Initial program 52.1%

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

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

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

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

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

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

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

    if -8.6000000000000002e-42 < z < 4.2e12

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

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

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

Alternative 13: 37.6% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.70000000000000007e-50 or 3.8999999999999999e-5 < z

    1. Initial program 53.8%

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

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

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

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

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

    if -1.70000000000000007e-50 < z < 3.8999999999999999e-5

    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 53.9%

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

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

Alternative 14: 25.6% accurate, 17.0× speedup?

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

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

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 74.0% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2024021 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

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

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