Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.6% → 90.4%
Time: 18.3s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 66.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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


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

    1. Initial program 27.3%

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

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

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

    1. Initial program 99.6%

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

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

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

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

    if -2e-205 < (/.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 9.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 54.3%

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

        \[\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. +-commutative54.3%

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

        \[\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. *-commutative54.3%

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

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

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

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

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

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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


\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 -2e-205 < (/.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 15.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 78.5%

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

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

    1. Initial program 99.6%

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

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

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

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

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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ t_2 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-278}:\\ \;\;\;\;x + t \cdot \frac{z}{y}\\ \mathbf{elif}\;z \leq 140000000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ (* x y) (- (* z t) (* z a))) (+ y (* z (- b y)))))
        (t_2 (/ (- t a) (- b y))))
   (if (<= z -7.2e+58)
     t_2
     (if (<= z -4.5e-187)
       t_1
       (if (<= z -2.65e-278)
         (+ x (* t (/ z y)))
         (if (<= z 140000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -7.2e+58) {
		tmp = t_2;
	} else if (z <= -4.5e-187) {
		tmp = t_1;
	} else if (z <= -2.65e-278) {
		tmp = x + (t * (z / y));
	} else if (z <= 140000000000.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 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)))
    t_2 = (t - a) / (b - y)
    if (z <= (-7.2d+58)) then
        tmp = t_2
    else if (z <= (-4.5d-187)) then
        tmp = t_1
    else if (z <= (-2.65d-278)) then
        tmp = x + (t * (z / y))
    else if (z <= 140000000000.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 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -7.2e+58) {
		tmp = t_2;
	} else if (z <= -4.5e-187) {
		tmp = t_1;
	} else if (z <= -2.65e-278) {
		tmp = x + (t * (z / y));
	} else if (z <= 140000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)))
	t_2 = (t - a) / (b - y)
	tmp = 0
	if z <= -7.2e+58:
		tmp = t_2
	elif z <= -4.5e-187:
		tmp = t_1
	elif z <= -2.65e-278:
		tmp = x + (t * (z / y))
	elif z <= 140000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -7.2e+58)
		tmp = t_2;
	elseif (z <= -4.5e-187)
		tmp = t_1;
	elseif (z <= -2.65e-278)
		tmp = Float64(x + Float64(t * Float64(z / y)));
	elseif (z <= 140000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
	t_2 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -7.2e+58)
		tmp = t_2;
	elseif (z <= -4.5e-187)
		tmp = t_1;
	elseif (z <= -2.65e-278)
		tmp = x + (t * (z / y));
	elseif (z <= 140000000000.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[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+58], t$95$2, If[LessEqual[z, -4.5e-187], t$95$1, If[LessEqual[z, -2.65e-278], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 140000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.19999999999999993e58 or 1.4e11 < z

    1. Initial program 34.3%

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

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

    if -7.19999999999999993e58 < z < -4.4999999999999998e-187 or -2.65e-278 < z < 1.4e11

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

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

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

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

    if -4.4999999999999998e-187 < z < -2.65e-278

    1. Initial program 54.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{z}{y}} \]
    8. Simplified82.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+58}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-278}:\\ \;\;\;\;x + t \cdot \frac{z}{y}\\ \mathbf{elif}\;z \leq 140000000000:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 83.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ t_2 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -1.22 \cdot 10^{+59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-277}:\\ \;\;\;\;x + t \cdot \frac{z}{y}\\ \mathbf{elif}\;z \leq 140000000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
        (t_2 (/ (- t a) (- b y))))
   (if (<= z -1.22e+59)
     t_2
     (if (<= z -4.5e-187)
       t_1
       (if (<= z -1.4e-277)
         (+ x (* t (/ z y)))
         (if (<= z 140000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -1.22e+59) {
		tmp = t_2;
	} else if (z <= -4.5e-187) {
		tmp = t_1;
	} else if (z <= -1.4e-277) {
		tmp = x + (t * (z / y));
	} else if (z <= 140000000000.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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
    t_2 = (t - a) / (b - y)
    if (z <= (-1.22d+59)) then
        tmp = t_2
    else if (z <= (-4.5d-187)) then
        tmp = t_1
    else if (z <= (-1.4d-277)) then
        tmp = x + (t * (z / y))
    else if (z <= 140000000000.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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -1.22e+59) {
		tmp = t_2;
	} else if (z <= -4.5e-187) {
		tmp = t_1;
	} else if (z <= -1.4e-277) {
		tmp = x + (t * (z / y));
	} else if (z <= 140000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
	t_2 = (t - a) / (b - y)
	tmp = 0
	if z <= -1.22e+59:
		tmp = t_2
	elif z <= -4.5e-187:
		tmp = t_1
	elif z <= -1.4e-277:
		tmp = x + (t * (z / y))
	elif z <= 140000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -1.22e+59)
		tmp = t_2;
	elseif (z <= -4.5e-187)
		tmp = t_1;
	elseif (z <= -1.4e-277)
		tmp = Float64(x + Float64(t * Float64(z / y)));
	elseif (z <= 140000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	t_2 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -1.22e+59)
		tmp = t_2;
	elseif (z <= -4.5e-187)
		tmp = t_1;
	elseif (z <= -1.4e-277)
		tmp = x + (t * (z / y));
	elseif (z <= 140000000000.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[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e+59], t$95$2, If[LessEqual[z, -4.5e-187], t$95$1, If[LessEqual[z, -1.4e-277], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 140000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.22e59 or 1.4e11 < z

    1. Initial program 34.3%

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

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

    if -1.22e59 < z < -4.4999999999999998e-187 or -1.39999999999999988e-277 < z < 1.4e11

    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

    if -4.4999999999999998e-187 < z < -1.39999999999999988e-277

    1. Initial program 54.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{z}{y}} \]
    8. Simplified82.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+59}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-277}:\\ \;\;\;\;x + t \cdot \frac{z}{y}\\ \mathbf{elif}\;z \leq 140000000000:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.16 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.50000000000000001e-28 or 1.16000000000000002e-36 < z

    1. Initial program 43.6%

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

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

    if -9.50000000000000001e-28 < z < 7.5000000000000006e-232 or 9.0000000000000001e-146 < z < 1.16000000000000002e-36

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

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

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

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

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

    if 7.5000000000000006e-232 < z < 9.0000000000000001e-146

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-232}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-146}:\\ \;\;\;\;x - z \cdot \frac{a}{y}\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 54.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{-22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+23}:\\ \;\;\;\;x + t \cdot \frac{z}{y}\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
   (if (<= y -2.8e-22)
     t_2
     (if (<= y 1.25e-17)
       t_1
       (if (<= y 8.2e+23) (+ x (* t (/ z y))) (if (<= y 2.95e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -2.8e-22) {
		tmp = t_2;
	} else if (y <= 1.25e-17) {
		tmp = t_1;
	} else if (y <= 8.2e+23) {
		tmp = x + (t * (z / y));
	} else if (y <= 2.95e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - a) / b
    t_2 = x / (1.0d0 - z)
    if (y <= (-2.8d-22)) then
        tmp = t_2
    else if (y <= 1.25d-17) then
        tmp = t_1
    else if (y <= 8.2d+23) then
        tmp = x + (t * (z / y))
    else if (y <= 2.95d+68) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -2.8e-22) {
		tmp = t_2;
	} else if (y <= 1.25e-17) {
		tmp = t_1;
	} else if (y <= 8.2e+23) {
		tmp = x + (t * (z / y));
	} else if (y <= 2.95e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / b
	t_2 = x / (1.0 - z)
	tmp = 0
	if y <= -2.8e-22:
		tmp = t_2
	elif y <= 1.25e-17:
		tmp = t_1
	elif y <= 8.2e+23:
		tmp = x + (t * (z / y))
	elif y <= 2.95e+68:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / b)
	t_2 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -2.8e-22)
		tmp = t_2;
	elseif (y <= 1.25e-17)
		tmp = t_1;
	elseif (y <= 8.2e+23)
		tmp = Float64(x + Float64(t * Float64(z / y)));
	elseif (y <= 2.95e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / b;
	t_2 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -2.8e-22)
		tmp = t_2;
	elseif (y <= 1.25e-17)
		tmp = t_1;
	elseif (y <= 8.2e+23)
		tmp = x + (t * (z / y));
	elseif (y <= 2.95e+68)
		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[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-22], t$95$2, If[LessEqual[y, 1.25e-17], t$95$1, If[LessEqual[y, 8.2e+23], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+23}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\

\mathbf{elif}\;y \leq 2.95 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.79999999999999995e-22 or 2.94999999999999993e68 < y

    1. Initial program 46.1%

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

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

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

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

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

    if -2.79999999999999995e-22 < y < 1.25e-17 or 8.19999999999999992e23 < y < 2.94999999999999993e68

    1. Initial program 74.1%

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

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

    if 1.25e-17 < y < 8.19999999999999992e23

    1. Initial program 98.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{z}{y}} \]
    8. Simplified61.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-17}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+23}:\\ \;\;\;\;x + t \cdot \frac{z}{y}\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+68}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{-22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+23}:\\ \;\;\;\;x + z \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
   (if (<= y -3.5e-22)
     t_2
     (if (<= y 3.3e-13)
       t_1
       (if (<= y 9.8e+23) (+ x (* z (/ t y))) (if (<= y 3e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -3.5e-22) {
		tmp = t_2;
	} else if (y <= 3.3e-13) {
		tmp = t_1;
	} else if (y <= 9.8e+23) {
		tmp = x + (z * (t / y));
	} else if (y <= 3e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - a) / b
    t_2 = x / (1.0d0 - z)
    if (y <= (-3.5d-22)) then
        tmp = t_2
    else if (y <= 3.3d-13) then
        tmp = t_1
    else if (y <= 9.8d+23) then
        tmp = x + (z * (t / y))
    else if (y <= 3d+68) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -3.5e-22) {
		tmp = t_2;
	} else if (y <= 3.3e-13) {
		tmp = t_1;
	} else if (y <= 9.8e+23) {
		tmp = x + (z * (t / y));
	} else if (y <= 3e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / b
	t_2 = x / (1.0 - z)
	tmp = 0
	if y <= -3.5e-22:
		tmp = t_2
	elif y <= 3.3e-13:
		tmp = t_1
	elif y <= 9.8e+23:
		tmp = x + (z * (t / y))
	elif y <= 3e+68:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / b)
	t_2 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -3.5e-22)
		tmp = t_2;
	elseif (y <= 3.3e-13)
		tmp = t_1;
	elseif (y <= 9.8e+23)
		tmp = Float64(x + Float64(z * Float64(t / y)));
	elseif (y <= 3e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / b;
	t_2 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -3.5e-22)
		tmp = t_2;
	elseif (y <= 3.3e-13)
		tmp = t_1;
	elseif (y <= 9.8e+23)
		tmp = x + (z * (t / y));
	elseif (y <= 3e+68)
		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[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-22], t$95$2, If[LessEqual[y, 3.3e-13], t$95$1, If[LessEqual[y, 9.8e+23], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 9.8 \cdot 10^{+23}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\

\mathbf{elif}\;y \leq 3 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.50000000000000005e-22 or 3.0000000000000002e68 < y

    1. Initial program 46.1%

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

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

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

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

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

    if -3.50000000000000005e-22 < y < 3.3000000000000001e-13 or 9.8000000000000006e23 < y < 3.0000000000000002e68

    1. Initial program 74.1%

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

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

    if 3.3000000000000001e-13 < y < 9.8000000000000006e23

    1. Initial program 98.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-13}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+23}:\\ \;\;\;\;x + z \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+68}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 53.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{-22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+23}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;y \leq 4.05 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
   (if (<= y -3.5e-22)
     t_2
     (if (<= y 7.6e-23)
       t_1
       (if (<= y 2.4e+23) (/ (* z (- t a)) y) (if (<= y 4.05e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -3.5e-22) {
		tmp = t_2;
	} else if (y <= 7.6e-23) {
		tmp = t_1;
	} else if (y <= 2.4e+23) {
		tmp = (z * (t - a)) / y;
	} else if (y <= 4.05e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - a) / b
    t_2 = x / (1.0d0 - z)
    if (y <= (-3.5d-22)) then
        tmp = t_2
    else if (y <= 7.6d-23) then
        tmp = t_1
    else if (y <= 2.4d+23) then
        tmp = (z * (t - a)) / y
    else if (y <= 4.05d+68) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -3.5e-22) {
		tmp = t_2;
	} else if (y <= 7.6e-23) {
		tmp = t_1;
	} else if (y <= 2.4e+23) {
		tmp = (z * (t - a)) / y;
	} else if (y <= 4.05e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / b
	t_2 = x / (1.0 - z)
	tmp = 0
	if y <= -3.5e-22:
		tmp = t_2
	elif y <= 7.6e-23:
		tmp = t_1
	elif y <= 2.4e+23:
		tmp = (z * (t - a)) / y
	elif y <= 4.05e+68:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / b)
	t_2 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -3.5e-22)
		tmp = t_2;
	elseif (y <= 7.6e-23)
		tmp = t_1;
	elseif (y <= 2.4e+23)
		tmp = Float64(Float64(z * Float64(t - a)) / y);
	elseif (y <= 4.05e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / b;
	t_2 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -3.5e-22)
		tmp = t_2;
	elseif (y <= 7.6e-23)
		tmp = t_1;
	elseif (y <= 2.4e+23)
		tmp = (z * (t - a)) / y;
	elseif (y <= 4.05e+68)
		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[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-22], t$95$2, If[LessEqual[y, 7.6e-23], t$95$1, If[LessEqual[y, 2.4e+23], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 4.05e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.05 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.50000000000000005e-22 or 4.0500000000000001e68 < y

    1. Initial program 46.1%

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

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

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

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

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

    if -3.50000000000000005e-22 < y < 7.60000000000000023e-23 or 2.4e23 < y < 4.0500000000000001e68

    1. Initial program 73.9%

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

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

    if 7.60000000000000023e-23 < y < 2.4e23

    1. Initial program 98.9%

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

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

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

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

Alternative 9: 69.6% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.39999999999999992e-29 or 1.75000000000000013e-55 < z

    1. Initial program 45.2%

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

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

    if -2.39999999999999992e-29 < z < -4.7999999999999996e-246

    1. Initial program 82.0%

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

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

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

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

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

    if -4.7999999999999996e-246 < z < 1.75000000000000013e-55

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-29}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-246}:\\ \;\;\;\;x + \frac{z \cdot t}{y}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-55}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1600000000000001e-28 or 1.25000000000000001e-51 < z

    1. Initial program 45.2%

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

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

    if -1.1600000000000001e-28 < z < -1.64999999999999995e-192

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

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

    if -1.64999999999999995e-192 < z < 1.25000000000000001e-51

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 70.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999998e-29 or 1.44999999999999997e-38 < z

    1. Initial program 43.6%

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

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

    if -4.4999999999999998e-29 < z < 1.44999999999999997e-38

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

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

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

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

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

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

Alternative 12: 32.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.45 \cdot 10^{-157} \lor \neg \left(x \leq 2.3 \cdot 10^{-133}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.4499999999999999e-157 or 2.3e-133 < x

    1. Initial program 61.3%

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

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

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

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

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

    if -2.4499999999999999e-157 < x < 2.3e-133

    1. Initial program 61.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{y}} \]
    9. Simplified22.0%

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

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

Alternative 13: 33.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{-160} \lor \neg \left(x \leq 2.2 \cdot 10^{-131}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.60000000000000032e-160 or 2.2e-131 < x

    1. Initial program 61.3%

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

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

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

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

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

    if -5.60000000000000032e-160 < x < 2.2e-131

    1. Initial program 61.7%

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

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

      \[\leadsto \frac{\color{blue}{t \cdot z}}{y} \]
    5. Step-by-step derivation
      1. *-commutative22.1%

        \[\leadsto \frac{\color{blue}{z \cdot t}}{y} \]
    6. Simplified22.1%

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

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

Alternative 14: 54.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.50000000000000005e-22 or 3.8000000000000001e68 < y

    1. Initial program 46.1%

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

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

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

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

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

    if -3.50000000000000005e-22 < y < 3.8000000000000001e68

    1. Initial program 75.4%

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

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

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

Alternative 15: 25.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-70}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;t \cdot \frac{z}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.49999999999999974e-70 or 1.55000000000000004e-132 < x

    1. Initial program 59.9%

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

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

    if -3.49999999999999974e-70 < x < 1.55000000000000004e-132

    1. Initial program 64.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 z around 0 35.2%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{y}} \]
    9. Simplified19.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-70}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-132}:\\ \;\;\;\;t \cdot \frac{z}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 25.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-70}:\\
\;\;\;\;x + x \cdot z\\

\mathbf{elif}\;x \leq 8.2 \cdot 10^{-131}:\\
\;\;\;\;t \cdot \frac{z}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.44999999999999986e-70

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

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

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

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

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

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

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

    if -1.44999999999999986e-70 < x < 8.2000000000000004e-131

    1. Initial program 64.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 z around 0 35.2%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{y}} \]
    9. Simplified19.0%

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

    if 8.2000000000000004e-131 < x

    1. Initial program 60.8%

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

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

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

Alternative 17: 25.8% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 61.4%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.5%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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