Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.2% → 96.3%
Time: 22.5s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 96.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y}\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{x \cdot y + t\_3}{t\_1}\\ t_5 := \frac{x}{1 - z} + t\_2\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-271}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_4 \leq 0:\\ \;\;\;\;t\_2 + \frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z}\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+285}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ (* x y) t_3) t_1))
        (t_5 (+ (/ x (- 1.0 z)) t_2)))
   (if (<= t_4 (- INFINITY))
     t_5
     (if (<= t_4 -4e-271)
       t_4
       (if (<= t_4 0.0)
         (+
          t_2
          (/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z))
         (if (<= t_4 5e+285) (/ (fma x y t_3) t_1) t_5))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = z * (t - a);
	double t_4 = ((x * y) + t_3) / t_1;
	double t_5 = (x / (1.0 - z)) + t_2;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = t_5;
	} else if (t_4 <= -4e-271) {
		tmp = t_4;
	} else if (t_4 <= 0.0) {
		tmp = t_2 + (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z);
	} else if (t_4 <= 5e+285) {
		tmp = fma(x, y, t_3) / t_1;
	} else {
		tmp = t_5;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1)
	t_5 = Float64(Float64(x / Float64(1.0 - z)) + t_2)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = t_5;
	elseif (t_4 <= -4e-271)
		tmp = t_4;
	elseif (t_4 <= 0.0)
		tmp = Float64(t_2 + Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z));
	elseif (t_4 <= 5e+285)
		tmp = Float64(fma(x, y, t_3) / t_1);
	else
		tmp = t_5;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -4e-271], t$95$4, If[LessEqual[t$95$4, 0.0], N[(t$95$2 + N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 5e+285], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$5]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-271}:\\
\;\;\;\;t\_4\\

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

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+285}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{\color{blue}{-1 \cdot \left(\frac{x \cdot y}{b - y} - \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}\right)}}{z}\right) + \left(\frac{t}{b - y} - \frac{a}{b - y}\right) \]
      4. associate-/l*89.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*96.7%

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

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

      \[\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}} \]

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

    1. Initial program 99.6%

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

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

      \[\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 4 regimes into one program.
  4. Final simplification98.9%

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

Alternative 2: 94.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-271}:\\
\;\;\;\;t\_4\\

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

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+285}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

      \[\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 4 regimes into one program.
  4. Add Preprocessing

Alternative 3: 94.8% accurate, 0.2× speedup?

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

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

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

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

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

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


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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-271 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000016e285

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

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

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

Alternative 4: 78.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-123}:\\
\;\;\;\;t\_1 + \frac{t\_3}{y \cdot \left(1 - z\right)}\\

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

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

\mathbf{elif}\;z \leq 6 \cdot 10^{-12}:\\
\;\;\;\;t\_1 + \frac{t\_3}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -0.27000000000000002 or 6.0000000000000003e-12 < z

    1. Initial program 48.9%

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

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

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

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

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

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

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

    if -0.27000000000000002 < z < -8.4999999999999995e-123

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999995e-123 < z < -6.5999999999999999e-139

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

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

    if -6.5999999999999999e-139 < z < -3.7999999999999997e-151

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

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

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

    if -3.7999999999999997e-151 < z < 6.0000000000000003e-12

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

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

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

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

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

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

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

Alternative 5: 78.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-96}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-139}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.25e-41 or -1.3000000000000001e-96 < z < -1.5e-139 or 1.24999999999999997e-13 < z

    1. Initial program 55.5%

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

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

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

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

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

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

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

    if -2.25e-41 < z < -1.3000000000000001e-96 or -2.7499999999999999e-157 < z < 1.24999999999999997e-13

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

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

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

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

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

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

    if -1.5e-139 < z < -2.7499999999999999e-157

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

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

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

Alternative 6: 68.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 10^{-85}:\\
\;\;\;\;t\_1\\

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


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

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

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

    if -5.59999999999999989e-52 < z < -8.4999999999999995e-123 or -3e-151 < z < 9.9999999999999998e-86

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

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

      \[\leadsto \frac{x \cdot y + z \cdot \color{blue}{t}}{y} \]
    5. Taylor expanded in x around 0 64.8%

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

    if -8.4999999999999995e-123 < z < -8.20000000000000028e-139

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

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

    if -8.20000000000000028e-139 < z < -3e-151

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{-52}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-123}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-139}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-151}:\\ \;\;\;\;\frac{x \cdot y + z \cdot t}{y}\\ \mathbf{elif}\;z \leq 10^{-85}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -0.0037:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-70}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{t - a}{x \cdot y} + 1\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-82}:\\ \;\;\;\;\frac{t + \left(x \cdot \frac{y}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-15}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y))))
   (if (<= z -0.0037)
     t_1
     (if (<= z -7.8e-70)
       (* x (+ (* z (/ (- t a) (* x y))) 1.0))
       (if (<= z -3.9e-82)
         (/ (+ t (- (* x (/ y z)) a)) b)
         (if (<= z 4.5e-15) (* x (/ y (+ y (* z (- b 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.0037) {
		tmp = t_1;
	} else if (z <= -7.8e-70) {
		tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
	} else if (z <= -3.9e-82) {
		tmp = (t + ((x * (y / z)) - a)) / b;
	} else if (z <= 4.5e-15) {
		tmp = x * (y / (y + (z * (b - y))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    if (z <= (-0.0037d0)) then
        tmp = t_1
    else if (z <= (-7.8d-70)) then
        tmp = x * ((z * ((t - a) / (x * y))) + 1.0d0)
    else if (z <= (-3.9d-82)) then
        tmp = (t + ((x * (y / z)) - a)) / b
    else if (z <= 4.5d-15) then
        tmp = x * (y / (y + (z * (b - y))))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double tmp;
	if (z <= -0.0037) {
		tmp = t_1;
	} else if (z <= -7.8e-70) {
		tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
	} else if (z <= -3.9e-82) {
		tmp = (t + ((x * (y / z)) - a)) / b;
	} else if (z <= 4.5e-15) {
		tmp = x * (y / (y + (z * (b - 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.0037:
		tmp = t_1
	elif z <= -7.8e-70:
		tmp = x * ((z * ((t - a) / (x * y))) + 1.0)
	elif z <= -3.9e-82:
		tmp = (t + ((x * (y / z)) - a)) / b
	elif z <= 4.5e-15:
		tmp = x * (y / (y + (z * (b - 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.0037)
		tmp = t_1;
	elseif (z <= -7.8e-70)
		tmp = Float64(x * Float64(Float64(z * Float64(Float64(t - a) / Float64(x * y))) + 1.0));
	elseif (z <= -3.9e-82)
		tmp = Float64(Float64(t + Float64(Float64(x * Float64(y / z)) - a)) / b);
	elseif (z <= 4.5e-15)
		tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -0.0037)
		tmp = t_1;
	elseif (z <= -7.8e-70)
		tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
	elseif (z <= -3.9e-82)
		tmp = (t + ((x * (y / z)) - a)) / b;
	elseif (z <= 4.5e-15)
		tmp = x * (y / (y + (z * (b - y))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0037], t$95$1, If[LessEqual[z, -7.8e-70], N[(x * N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.9e-82], N[(N[(t + N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 4.5e-15], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -0.0037000000000000002 or 4.4999999999999998e-15 < z

    1. Initial program 48.9%

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

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

    if -0.0037000000000000002 < z < -7.80000000000000038e-70

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

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

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

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

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

    if -7.80000000000000038e-70 < z < -3.89999999999999973e-82

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

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

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

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

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

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

    if -3.89999999999999973e-82 < z < 4.4999999999999998e-15

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0037:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-70}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{t - a}{x \cdot y} + 1\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-82}:\\ \;\;\;\;\frac{t + \left(x \cdot \frac{y}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-15}:\\ \;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.8000000000000003e-52 or 1.4500000000000001e-14 < z

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

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

    if -4.8000000000000003e-52 < z < 3.89999999999999975e-304 or 9.5000000000000001e-217 < z < 1.4500000000000001e-14

    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 x around 0 89.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 x around inf 57.3%

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

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

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

    if 3.89999999999999975e-304 < z < 9.5000000000000001e-217

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

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

Alternative 9: 53.5% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-40}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.3999999999999999e76 or 5.2e-24 < y

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

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

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

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

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

    if -7.3999999999999999e76 < y < -1.12e-35

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

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

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

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

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

    if -1.12e-35 < y < -1.19999999999999996e-40

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

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

    if -1.19999999999999996e-40 < y < 5.2e-24

    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 0 65.9%

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

Alternative 10: 75.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.35e16 or 0.0015 < 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 85.7%

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

    if -3.35e16 < z < 0.0015

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

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

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

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

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

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

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

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

Alternative 11: 68.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e-52 or 2.39999999999999998e-8 < z

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

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

    if -4.5e-52 < z < 2.39999999999999998e-8

    1. Initial program 90.5%

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

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

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

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

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

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

Alternative 12: 35.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7e-45 or 8.9999999999999995e-105 < y

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

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

    if -7e-45 < y < -1.1000000000000001e-288

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

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

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

        \[\leadsto \color{blue}{-\frac{a}{b}} \]
      2. distribute-neg-frac50.7%

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

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

    if -1.1000000000000001e-288 < y < 8.9999999999999995e-105

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

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

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

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

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

Alternative 13: 69.4% accurate, 1.0× speedup?

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

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

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


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

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

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

    if -4.3000000000000003e-52 < z < 1.30000000000000006e-85

    1. Initial program 89.3%

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

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

      \[\leadsto \frac{x \cdot y + z \cdot \color{blue}{t}}{y} \]
    5. Taylor expanded in x around 0 62.8%

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

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

Alternative 14: 46.3% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.80000000000000017e-44 or 1.36e9 < z

    1. Initial program 51.0%

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

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

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

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

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

    if -4.80000000000000017e-44 < z < 1.36e9

    1. Initial program 91.0%

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

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

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

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

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

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

Alternative 15: 45.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-44} \lor \neg \left(z \leq 9.2 \cdot 10^{-39}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9500000000000001e-44 or 9.20000000000000033e-39 < z

    1. Initial program 54.0%

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

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

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

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

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

    if -1.9500000000000001e-44 < z < 9.20000000000000033e-39

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

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

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

Alternative 16: 37.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.9 \cdot 10^{-52} \lor \neg \left(z \leq 9.6 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.90000000000000019e-52 or 9.5999999999999994e-30 < z

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

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

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

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

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

    if -5.90000000000000019e-52 < z < 9.5999999999999994e-30

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

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

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

Alternative 17: 26.4% 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.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 25.0%

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

Developer target: 73.1% 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 2024110 
(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)))))