Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.3% → 93.7%
Time: 16.7s
Alternatives: 15
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 93.7% accurate, 0.5× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} + \frac{t - a}{b - y} \]
    8. Simplified97.2%

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

    if -1.0200000000000001e-5 < z < 4.8e8

    1. Initial program 85.5%

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

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

    if 4.8e8 < z

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} + \frac{t - a}{b - y} \]
    8. Simplified97.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot y}{b - y}} + \frac{t - a}{b - y} \]
    10. Applied egg-rr98.9%

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

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

Alternative 2: 69.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.38 \cdot 10^{-213}:\\
\;\;\;\;x\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999989e27 < z < -4.9000000000000002e-198

    1. Initial program 89.6%

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

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

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

    if -4.9000000000000002e-198 < z < 1.37999999999999998e-213

    1. Initial program 88.3%

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

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

    if 1.37999999999999998e-213 < z < 4.4e8

    1. Initial program 79.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+27}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-198}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{z \cdot \left(\left(b + \frac{y}{z}\right) - y\right)}\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-213}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 440000000:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 69.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{-213}:\\
\;\;\;\;x\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999989e27 < z < -3.19999999999999983e-200 or 2.2000000000000001e-213 < z < 3.2e8

    1. Initial program 84.5%

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

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

    if -3.19999999999999983e-200 < z < 2.2000000000000001e-213

    1. Initial program 88.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+27}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-200}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-213}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 320000000:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 68.4% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{-213}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.4000000000000001e24 or 13 < z

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000001e24 < z < -1.9e-86

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

    if -1.9e-86 < z < 2.2000000000000001e-213

    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. Taylor expanded in z around 0 62.7%

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

    if 2.2000000000000001e-213 < z < 13

    1. Initial program 78.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-86}:\\ \;\;\;\;\frac{t + \left(x \cdot \frac{y}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-213}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 13:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -360000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-88}:\\ \;\;\;\;\frac{t + \left(x \cdot \frac{y}{z} - a\right)}{b}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-213}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \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 -360000.0)
     t_1
     (if (<= z -1.3e-88)
       (/ (+ t (- (* x (/ y z)) a)) b)
       (if (<= z 2.2e-213)
         x
         (if (<= z 1.0) (/ (* z (- t a)) (+ y (* z b))) 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 <= -360000.0) {
		tmp = t_1;
	} else if (z <= -1.3e-88) {
		tmp = (t + ((x * (y / z)) - a)) / b;
	} else if (z <= 2.2e-213) {
		tmp = x;
	} else if (z <= 1.0) {
		tmp = (z * (t - a)) / (y + (z * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    if (z <= (-360000.0d0)) then
        tmp = t_1
    else if (z <= (-1.3d-88)) then
        tmp = (t + ((x * (y / z)) - a)) / b
    else if (z <= 2.2d-213) then
        tmp = x
    else if (z <= 1.0d0) then
        tmp = (z * (t - a)) / (y + (z * b))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double tmp;
	if (z <= -360000.0) {
		tmp = t_1;
	} else if (z <= -1.3e-88) {
		tmp = (t + ((x * (y / z)) - a)) / b;
	} else if (z <= 2.2e-213) {
		tmp = x;
	} else if (z <= 1.0) {
		tmp = (z * (t - a)) / (y + (z * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	tmp = 0
	if z <= -360000.0:
		tmp = t_1
	elif z <= -1.3e-88:
		tmp = (t + ((x * (y / z)) - a)) / b
	elif z <= 2.2e-213:
		tmp = x
	elif z <= 1.0:
		tmp = (z * (t - a)) / (y + (z * b))
	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 <= -360000.0)
		tmp = t_1;
	elseif (z <= -1.3e-88)
		tmp = Float64(Float64(t + Float64(Float64(x * Float64(y / z)) - a)) / b);
	elseif (z <= 2.2e-213)
		tmp = x;
	elseif (z <= 1.0)
		tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * b)));
	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 <= -360000.0)
		tmp = t_1;
	elseif (z <= -1.3e-88)
		tmp = (t + ((x * (y / z)) - a)) / b;
	elseif (z <= 2.2e-213)
		tmp = x;
	elseif (z <= 1.0)
		tmp = (z * (t - a)) / (y + (z * b));
	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, -360000.0], t$95$1, If[LessEqual[z, -1.3e-88], N[(N[(t + N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.2e-213], x, If[LessEqual[z, 1.0], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{-213}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 55.0%

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

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

    if -3.6e5 < z < -1.30000000000000007e-88

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

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

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

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

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

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

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

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

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

    if -1.30000000000000007e-88 < z < 2.2000000000000001e-213

    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. Taylor expanded in z around 0 62.7%

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

    if 2.2000000000000001e-213 < z < 1

    1. Initial program 78.8%

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

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

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

Alternative 6: 66.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-213}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 56.0%

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

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

    if -1.05e-24 < z < -1.10000000000000007e-200 or 2.0999999999999998e-213 < z < 1

    1. Initial program 83.8%

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

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

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

    if -1.10000000000000007e-200 < z < 2.0999999999999998e-213

    1. Initial program 88.3%

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

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

Alternative 7: 93.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.19999999999999989e27 or 5e13 < z

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} + \frac{t - a}{b - y} \]
    8. Simplified98.4%

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

    if -4.19999999999999989e27 < z < 5e13

    1. Initial program 86.3%

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

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

Alternative 8: 81.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5e-9 or 5e13 < z

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} + \frac{t - a}{b - y} \]
    8. Simplified98.5%

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

    if -8.5e-9 < z < 5e13

    1. Initial program 85.8%

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

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

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

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

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

Alternative 9: 74.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+27} \lor \neg \left(z \leq 2.5 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.19999999999999989e27 or 2.5e21 < z

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999989e27 < z < 2.5e21

    1. Initial program 86.0%

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

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

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

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

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

Alternative 10: 64.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8499999999999999e-94 or 4.2e15 < z

    1. Initial program 59.2%

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

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

    if -1.8499999999999999e-94 < z < 4.2e15

    1. Initial program 83.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 inf 52.2%

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

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

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

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

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

Alternative 11: 55.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{-27} \lor \neg \left(y \leq 2.8 \cdot 10^{+34}\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 -1.65e-27) (not (<= y 2.8e+34))) (/ 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 <= -1.65e-27) || !(y <= 2.8e+34)) {
		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 <= (-1.65d-27)) .or. (.not. (y <= 2.8d+34))) 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 <= -1.65e-27) || !(y <= 2.8e+34)) {
		tmp = x / (1.0 - z);
	} else {
		tmp = (t - a) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -1.65e-27) or not (y <= 2.8e+34):
		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 <= -1.65e-27) || !(y <= 2.8e+34))
		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 <= -1.65e-27) || ~((y <= 2.8e+34)))
		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, -1.65e-27], N[Not[LessEqual[y, 2.8e+34]], $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 -1.65 \cdot 10^{-27} \lor \neg \left(y \leq 2.8 \cdot 10^{+34}\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 < -1.64999999999999999e-27 or 2.80000000000000008e34 < y

    1. Initial program 54.1%

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

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

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

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

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

    if -1.64999999999999999e-27 < y < 2.80000000000000008e34

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

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

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

Alternative 12: 44.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-5} \lor \neg \left(y \leq 1.45 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.10000000000000014e-5 or 1.45000000000000009e40 < y

    1. Initial program 53.8%

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

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

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

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

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

    if -3.10000000000000014e-5 < y < 1.45000000000000009e40

    1. Initial program 85.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 -inf 71.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} + \frac{t - a}{b - y} \]
    8. Simplified72.3%

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

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

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

Alternative 13: 44.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-86} \lor \neg \left(z \leq 4 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.19999999999999932e-86 or 4.00000000000000015e-42 < z

    1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} + \frac{t - a}{b - y} \]
    8. Simplified88.4%

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

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

    if -7.19999999999999932e-86 < z < 4.00000000000000015e-42

    1. Initial program 82.9%

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

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

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

Alternative 14: 35.0% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+38}:\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.00000000000000012e-49 or 1.3e38 < y

    1. Initial program 55.5%

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

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

    if -7.00000000000000012e-49 < y < 1.3e38

    1. Initial program 85.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 inf 83.9%

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

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

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

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

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

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

Alternative 15: 25.5% 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 70.4%

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

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

Developer Target 1: 73.2% accurate, 0.7× speedup?

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

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

Reproduce

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

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

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