Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 67.3% → 95.1%
Time: 18.7s
Alternatives: 18
Speedup: 0.7×

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 18 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: 67.3% 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: 95.1% accurate, 0.1× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 26.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 inf 66.4%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306

    1. Initial program 99.5%

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

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

    1. Initial program 26.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 inf 26.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t - a}{x \cdot \left(b - y\right)}, \frac{x}{z} \cdot \frac{y}{b - y}\right)} \]
    10. Taylor expanded in z around 0 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.1% accurate, 0.1× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 26.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 inf 66.4%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306

    1. Initial program 99.5%

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

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

    1. Initial program 26.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 inf 26.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t - a}{x \cdot \left(b - y\right)}, \frac{x}{z} \cdot \frac{y}{b - y}\right)} \]
    10. Taylor expanded in z around 0 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\

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


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

    1. Initial program 26.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 inf 66.4%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-238 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306

    1. Initial program 99.5%

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

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

    1. Initial program 10.9%

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

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

Alternative 4: 70.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{-168}:\\
\;\;\;\;\frac{x \cdot y + t\_1}{y - y \cdot z}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{t\_1}{y + z \cdot b}\\

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


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

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

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

    if -6.0000000000000001e-64 < z < -1.6000000000000001e-215

    1. Initial program 87.1%

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

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

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

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

    if -1.6000000000000001e-215 < z < 3.40000000000000022e-168

    1. Initial program 83.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 b around 0 74.3%

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

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

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

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

    if 3.40000000000000022e-168 < z < 1

    1. Initial program 90.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-64}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-215}:\\ \;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-168}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y - y \cdot z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.6% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{t\_1}{y + z \cdot b}\\

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


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

    1. Initial program 40.0%

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

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

    if -1.7e27 < z < -7.99999999999999986e-199

    1. Initial program 85.4%

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

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

    if -7.99999999999999986e-199 < z < 4.2000000000000001e-169

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y - a \cdot z}}{y - y \cdot z} \]
      4. *-commutative65.8%

        \[\leadsto \frac{x \cdot y - a \cdot z}{y - \color{blue}{z \cdot y}} \]
      5. cancel-sign-sub-inv65.8%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{\color{blue}{1 \cdot y} + \left(-z\right) \cdot y} \]
      7. distribute-rgt-in65.8%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{y \cdot \color{blue}{\left(1 - z\right)}} \]
    8. Simplified65.8%

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

    if 4.2000000000000001e-169 < z < 1

    1. Initial program 90.4%

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

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

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

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

Alternative 6: 67.9% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{t\_1}{y + z \cdot b}\\

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


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

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

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

    if -5.2e7 < z < -2.20000000000000022e-174

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

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

    if -2.20000000000000022e-174 < z < 5.50000000000000023e-142

    1. Initial program 82.8%

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

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

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

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

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

    if 5.50000000000000023e-142 < z < 1

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

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

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

Alternative 7: 67.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 40.0%

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

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

    if -1.7e27 < z < -4.00000000000000016e-166 or 1.20000000000000007e-139 < z < 1

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

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

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

    if -4.00000000000000016e-166 < z < 1.20000000000000007e-139

    1. Initial program 82.8%

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

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

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

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

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

Alternative 8: 84.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999998e42 or 5.99999999999999998e63 < z

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

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

    if -3.7999999999999998e42 < z < 5.99999999999999998e63

    1. Initial program 86.8%

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

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

Alternative 9: 71.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.0000000000000001e-64 or 1.5999999999999999e-6 < z

    1. Initial program 46.0%

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

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

    if -6.0000000000000001e-64 < z < 1.5999999999999999e-6

    1. Initial program 86.5%

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

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

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

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

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

Alternative 10: 54.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-32}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 0.00035:\\ \;\;\;\;\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 -3.8e+35)
     t_1
     (if (<= y -2.15e-32)
       (/ (- a t) y)
       (if (<= y 0.00035) (/ (- 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 <= -3.8e+35) {
		tmp = t_1;
	} else if (y <= -2.15e-32) {
		tmp = (a - t) / y;
	} else if (y <= 0.00035) {
		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 <= (-3.8d+35)) then
        tmp = t_1
    else if (y <= (-2.15d-32)) then
        tmp = (a - t) / y
    else if (y <= 0.00035d0) 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 <= -3.8e+35) {
		tmp = t_1;
	} else if (y <= -2.15e-32) {
		tmp = (a - t) / y;
	} else if (y <= 0.00035) {
		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 <= -3.8e+35:
		tmp = t_1
	elif y <= -2.15e-32:
		tmp = (a - t) / y
	elif y <= 0.00035:
		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 <= -3.8e+35)
		tmp = t_1;
	elseif (y <= -2.15e-32)
		tmp = Float64(Float64(a - t) / y);
	elseif (y <= 0.00035)
		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 <= -3.8e+35)
		tmp = t_1;
	elseif (y <= -2.15e-32)
		tmp = (a - t) / y;
	elseif (y <= 0.00035)
		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, -3.8e+35], t$95$1, If[LessEqual[y, -2.15e-32], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.00035], 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 -3.8 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.15 \cdot 10^{-32}:\\
\;\;\;\;\frac{a - t}{y}\\

\mathbf{elif}\;y \leq 0.00035:\\
\;\;\;\;\frac{t - a}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8e35 or 3.49999999999999996e-4 < y

    1. Initial program 52.7%

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

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

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

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

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

    if -3.8e35 < y < -2.14999999999999995e-32

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t - a}{y}} \]
    5. Step-by-step derivation
      1. mul-1-neg59.0%

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

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

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

    if -2.14999999999999995e-32 < y < 3.49999999999999996e-4

    1. Initial program 80.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+35}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-32}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 0.00035:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 63.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-64} \lor \neg \left(z \leq 1.32 \cdot 10^{-135}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.19999999999999975e-64 or 1.32000000000000007e-135 < z

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

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

    if -3.19999999999999975e-64 < z < 1.32000000000000007e-135

    1. Initial program 84.7%

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

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

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

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

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

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

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

Alternative 12: 54.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-32} \lor \neg \left(y \leq 6.5 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000011e-32 or 6.4999999999999996e-6 < y

    1. Initial program 53.4%

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

    if -2.00000000000000011e-32 < y < 6.4999999999999996e-6

    1. Initial program 80.6%

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

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

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

Alternative 13: 43.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+46} \lor \neg \left(y \leq 17000\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7999999999999999e46 or 17000 < y

    1. Initial program 52.7%

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

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

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

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

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

    if -1.7999999999999999e46 < y < 17000

    1. Initial program 77.7%

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

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

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

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

Alternative 14: 43.8% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.79999999999999997e-64 or 8.6e-48 < z

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

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

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

    if -4.79999999999999997e-64 < z < 8.6e-48

    1. Initial program 85.8%

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

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

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

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

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

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

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

Alternative 15: 32.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -16000000000:\\
\;\;\;\;\frac{x}{-z}\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\
\;\;\;\;x + x \cdot z\\

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


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

    1. Initial program 36.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/21.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. mul-1-neg21.9%

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    8. Simplified21.9%

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

    if -1.6e10 < z < 1.4500000000000001e-43

    1. Initial program 86.4%

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

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

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

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

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

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

    if 1.4500000000000001e-43 < z

    1. Initial program 48.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 b around 0 26.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y - a \cdot z}}{y - y \cdot z} \]
      4. *-commutative16.4%

        \[\leadsto \frac{x \cdot y - a \cdot z}{y - \color{blue}{z \cdot y}} \]
      5. cancel-sign-sub-inv16.4%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{\color{blue}{1 \cdot y} + \left(-z\right) \cdot y} \]
      7. distribute-rgt-in16.4%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{y \cdot \color{blue}{\left(1 - z\right)}} \]
    8. Simplified16.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -16000000000:\\ \;\;\;\;\frac{x}{-z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 33.7% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.00000000000000005e-4 or 1.4500000000000001e-43 < z

    1. Initial program 45.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 b around 0 25.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y - a \cdot z}}{y - y \cdot z} \]
      4. *-commutative15.0%

        \[\leadsto \frac{x \cdot y - a \cdot z}{y - \color{blue}{z \cdot y}} \]
      5. cancel-sign-sub-inv15.0%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{\color{blue}{1 \cdot y} + \left(-z\right) \cdot y} \]
      7. distribute-rgt-in15.0%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{y \cdot \color{blue}{\left(1 - z\right)}} \]
    8. Simplified15.0%

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

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

    if -1.00000000000000005e-4 < z < 1.4500000000000001e-43

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

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

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

Alternative 17: 32.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0001:\\
\;\;\;\;\frac{x}{-z}\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\
\;\;\;\;x\\

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


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

    1. Initial program 40.6%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/20.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. mul-1-neg20.7%

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    8. Simplified20.7%

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

    if -1.00000000000000005e-4 < z < 1.4500000000000001e-43

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

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

    if 1.4500000000000001e-43 < z

    1. Initial program 48.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 b around 0 26.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y - a \cdot z}}{y - y \cdot z} \]
      4. *-commutative16.4%

        \[\leadsto \frac{x \cdot y - a \cdot z}{y - \color{blue}{z \cdot y}} \]
      5. cancel-sign-sub-inv16.4%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{\color{blue}{1 \cdot y} + \left(-z\right) \cdot y} \]
      7. distribute-rgt-in16.4%

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

        \[\leadsto \frac{x \cdot y - a \cdot z}{y \cdot \color{blue}{\left(1 - z\right)}} \]
    8. Simplified16.4%

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

      \[\leadsto \color{blue}{\frac{a}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0001:\\ \;\;\;\;\frac{x}{-z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 25.2% accurate, 17.0× speedup?

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

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

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

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

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

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