Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.4% → 92.4%
Time: 23.2s
Alternatives: 22
Speedup: 0.5×

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 22 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.4% 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: 92.4% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_5 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_5\\

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

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_4}{t\_1}\\

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


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

    1. Initial program 12.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 12.6%

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

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

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

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

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

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

    if -1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287

    1. Initial program 99.6%

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

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

    1. Initial program 40.7%

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

        \[\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*99.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-sub99.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. Simplified99.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}} \]

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

    1. Initial program 99.6%

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

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

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

Alternative 2: 91.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := b + \left(\frac{y}{z} - y\right)\\ t_3 := x \cdot \left(\frac{\frac{t - a}{t\_2}}{x} + \frac{\frac{y}{z}}{t\_2}\right)\\ t_4 := z \cdot \left(t - a\right)\\ t_5 := \frac{x \cdot y + t\_4}{t\_1}\\ \mathbf{if}\;t\_5 \leq -1 \cdot 10^{+303}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{-270}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_5 \leq 0 \lor \neg \left(t\_5 \leq 2 \cdot 10^{+290}\right):\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_4}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (+ b (- (/ y z) y)))
        (t_3 (* x (+ (/ (/ (- t a) t_2) x) (/ (/ y z) t_2))))
        (t_4 (* z (- t a)))
        (t_5 (/ (+ (* x y) t_4) t_1)))
   (if (<= t_5 -1e+303)
     t_3
     (if (<= t_5 -2e-270)
       t_5
       (if (or (<= t_5 0.0) (not (<= t_5 2e+290)))
         t_3
         (+ (/ (* x y) t_1) (/ t_4 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = b + ((y / z) - y);
	double t_3 = x * ((((t - a) / t_2) / x) + ((y / z) / t_2));
	double t_4 = z * (t - a);
	double t_5 = ((x * y) + t_4) / t_1;
	double tmp;
	if (t_5 <= -1e+303) {
		tmp = t_3;
	} else if (t_5 <= -2e-270) {
		tmp = t_5;
	} else if ((t_5 <= 0.0) || !(t_5 <= 2e+290)) {
		tmp = t_3;
	} else {
		tmp = ((x * y) / t_1) + (t_4 / 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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    t_2 = b + ((y / z) - y)
    t_3 = x * ((((t - a) / t_2) / x) + ((y / z) / t_2))
    t_4 = z * (t - a)
    t_5 = ((x * y) + t_4) / t_1
    if (t_5 <= (-1d+303)) then
        tmp = t_3
    else if (t_5 <= (-2d-270)) then
        tmp = t_5
    else if ((t_5 <= 0.0d0) .or. (.not. (t_5 <= 2d+290))) then
        tmp = t_3
    else
        tmp = ((x * y) / t_1) + (t_4 / t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = b + ((y / z) - y);
	double t_3 = x * ((((t - a) / t_2) / x) + ((y / z) / t_2));
	double t_4 = z * (t - a);
	double t_5 = ((x * y) + t_4) / t_1;
	double tmp;
	if (t_5 <= -1e+303) {
		tmp = t_3;
	} else if (t_5 <= -2e-270) {
		tmp = t_5;
	} else if ((t_5 <= 0.0) || !(t_5 <= 2e+290)) {
		tmp = t_3;
	} else {
		tmp = ((x * y) / t_1) + (t_4 / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = b + ((y / z) - y)
	t_3 = x * ((((t - a) / t_2) / x) + ((y / z) / t_2))
	t_4 = z * (t - a)
	t_5 = ((x * y) + t_4) / t_1
	tmp = 0
	if t_5 <= -1e+303:
		tmp = t_3
	elif t_5 <= -2e-270:
		tmp = t_5
	elif (t_5 <= 0.0) or not (t_5 <= 2e+290):
		tmp = t_3
	else:
		tmp = ((x * y) / t_1) + (t_4 / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(b + Float64(Float64(y / z) - y))
	t_3 = Float64(x * Float64(Float64(Float64(Float64(t - a) / t_2) / x) + Float64(Float64(y / z) / t_2)))
	t_4 = Float64(z * Float64(t - a))
	t_5 = Float64(Float64(Float64(x * y) + t_4) / t_1)
	tmp = 0.0
	if (t_5 <= -1e+303)
		tmp = t_3;
	elseif (t_5 <= -2e-270)
		tmp = t_5;
	elseif ((t_5 <= 0.0) || !(t_5 <= 2e+290))
		tmp = t_3;
	else
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_4 / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = b + ((y / z) - y);
	t_3 = x * ((((t - a) / t_2) / x) + ((y / z) / t_2));
	t_4 = z * (t - a);
	t_5 = ((x * y) + t_4) / t_1;
	tmp = 0.0;
	if (t_5 <= -1e+303)
		tmp = t_3;
	elseif (t_5 <= -2e-270)
		tmp = t_5;
	elseif ((t_5 <= 0.0) || ~((t_5 <= 2e+290)))
		tmp = t_3;
	else
		tmp = ((x * y) / t_1) + (t_4 / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b + N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] / x), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x * y), $MachinePrecision] + t$95$4), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$5, -1e+303], t$95$3, If[LessEqual[t$95$5, -2e-270], t$95$5, If[Or[LessEqual[t$95$5, 0.0], N[Not[LessEqual[t$95$5, 2e+290]], $MachinePrecision]], t$95$3, N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_5 \leq -2 \cdot 10^{-270}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;t\_5 \leq 0 \lor \neg \left(t\_5 \leq 2 \cdot 10^{+290}\right):\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e303 or -2.0000000000000001e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 19.7%

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

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

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

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \frac{y}{z \cdot \left(\left(b + \frac{y}{z}\right) - y\right)} + -1 \cdot \frac{\frac{t}{\left(b + \frac{y}{z}\right) - y} - \frac{a}{\left(b + \frac{y}{z}\right) - y}}{x}\right) \cdot x} \]
      3. distribute-rgt-neg-in81.0%

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

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

    if -1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-270

    1. Initial program 99.6%

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

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

    1. Initial program 99.6%

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

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

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

Alternative 3: 84.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\

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


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

    1. Initial program 21.4%

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

      \[\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.9999999999999999e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287

    1. Initial program 99.6%

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

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

    1. Initial program 40.7%

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

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

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

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \frac{y}{z \cdot \left(\left(b + \frac{y}{z}\right) - y\right)} + -1 \cdot \frac{\frac{t}{\left(b + \frac{y}{z}\right) - y} - \frac{a}{\left(b + \frac{y}{z}\right) - y}}{x}\right) \cdot x} \]
      3. distribute-rgt-neg-in82.9%

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

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

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

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

    1. Initial program 99.6%

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

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

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

    1. Initial program 10.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 78.4%

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

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

Alternative 4: 84.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_4\\

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_3}{t\_1}\\

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


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

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

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

    if -1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287

    1. Initial program 99.6%

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

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

    1. Initial program 40.7%

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

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

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

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \frac{y}{z \cdot \left(\left(b + \frac{y}{z}\right) - y\right)} + -1 \cdot \frac{\frac{t}{\left(b + \frac{y}{z}\right) - y} - \frac{a}{\left(b + \frac{y}{z}\right) - y}}{x}\right) \cdot x} \]
      3. distribute-rgt-neg-in82.9%

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

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

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

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

    1. Initial program 99.6%

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

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

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

Alternative 5: 86.5% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+303} \lor \neg \left(t\_1 \leq -5 \cdot 10^{-287} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 2 \cdot 10^{+290}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e303 or -5.00000000000000025e-287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 18.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 71.5%

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

    if -1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290

    1. Initial program 99.6%

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

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

Alternative 6: 84.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\

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

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

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


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

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

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

    if -1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290

    1. Initial program 99.6%

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

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

    1. Initial program 40.7%

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

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

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

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \frac{y}{z \cdot \left(\left(b + \frac{y}{z}\right) - y\right)} + -1 \cdot \frac{\frac{t}{\left(b + \frac{y}{z}\right) - y} - \frac{a}{\left(b + \frac{y}{z}\right) - y}}{x}\right) \cdot x} \]
      3. distribute-rgt-neg-in82.9%

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

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

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

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

Alternative 7: 84.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\

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

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

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


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

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

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

    if -1e303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290

    1. Initial program 99.6%

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

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

    1. Initial program 40.7%

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

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

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

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

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

Alternative 8: 65.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.35 \cdot 10^{+94}:\\
\;\;\;\;\frac{t\_2}{z \cdot \left(b - y\right)}\\

\mathbf{elif}\;z \leq -2.5:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-228}:\\
\;\;\;\;\frac{t\_2}{y}\\

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-34}:\\
\;\;\;\;\frac{t\_2}{z \cdot b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.7500000000000002e107 or -1.3500000000000001e94 < z < -2.5 or 750 < z

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

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

    if -2.7500000000000002e107 < z < -1.3500000000000001e94

    1. Initial program 99.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 99.3%

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

    if -2.5 < z < -1.69999999999999991e-77 or 5.69999999999999974e-34 < z < 750

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

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

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

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

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

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

    if -1.69999999999999991e-77 < z < 5.8000000000000002e-228

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

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

    if 5.8000000000000002e-228 < z < 5.69999999999999974e-34

    1. Initial program 88.6%

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

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

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

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

Alternative 9: 73.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -0.6:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-35}:\\
\;\;\;\;\frac{t\_1}{z \cdot b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2e107 or -7.5000000000000002e93 < z < -0.599999999999999978 or 750 < z

    1. Initial program 45.5%

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

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

    if -1.2e107 < z < -7.5000000000000002e93

    1. Initial program 99.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 99.3%

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

    if -0.599999999999999978 < z < 2.8e-119

    1. Initial program 89.8%

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y + z \cdot \frac{t - a}{x}}{\color{blue}{y - y \cdot z}} \]
      5. *-commutative54.7%

        \[\leadsto x \cdot \frac{y + z \cdot \frac{t - a}{x}}{y - \color{blue}{z \cdot y}} \]
    6. Simplified54.7%

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

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

    if 2.8e-119 < z < 1.55000000000000006e-35

    1. Initial program 95.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 69.7%

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

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

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

    if 1.55000000000000006e-35 < z < 750

    1. Initial program 66.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+107}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+93}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq -0.6:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{z \cdot \left(a - t\right)}{y \cdot \left(z + -1\right)}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-35}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq 750:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 65.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ t_2 := \frac{t - a}{b - y}\\ t_3 := x \cdot y + z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -2.2:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{t\_3}{y}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-33}:\\ \;\;\;\;\frac{t\_3}{z \cdot b}\\ \mathbf{elif}\;z \leq 2050:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ y (* z (+ b (- (/ y z) y))))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (+ (* x y) (* z (- t a)))))
   (if (<= z -2.2)
     t_2
     (if (<= z -2.5e-77)
       t_1
       (if (<= z 5.8e-228)
         (/ t_3 y)
         (if (<= z 9.8e-33) (/ t_3 (* z b)) (if (<= z 2050.0) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (y / (z * (b + ((y / z) - y))));
	double t_2 = (t - a) / (b - y);
	double t_3 = (x * y) + (z * (t - a));
	double tmp;
	if (z <= -2.2) {
		tmp = t_2;
	} else if (z <= -2.5e-77) {
		tmp = t_1;
	} else if (z <= 5.8e-228) {
		tmp = t_3 / y;
	} else if (z <= 9.8e-33) {
		tmp = t_3 / (z * b);
	} else if (z <= 2050.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) :: t_3
    real(8) :: tmp
    t_1 = x * (y / (z * (b + ((y / z) - y))))
    t_2 = (t - a) / (b - y)
    t_3 = (x * y) + (z * (t - a))
    if (z <= (-2.2d0)) then
        tmp = t_2
    else if (z <= (-2.5d-77)) then
        tmp = t_1
    else if (z <= 5.8d-228) then
        tmp = t_3 / y
    else if (z <= 9.8d-33) then
        tmp = t_3 / (z * b)
    else if (z <= 2050.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (y / (z * (b + ((y / z) - y))));
	double t_2 = (t - a) / (b - y);
	double t_3 = (x * y) + (z * (t - a));
	double tmp;
	if (z <= -2.2) {
		tmp = t_2;
	} else if (z <= -2.5e-77) {
		tmp = t_1;
	} else if (z <= 5.8e-228) {
		tmp = t_3 / y;
	} else if (z <= 9.8e-33) {
		tmp = t_3 / (z * b);
	} else if (z <= 2050.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * (y / (z * (b + ((y / z) - y))))
	t_2 = (t - a) / (b - y)
	t_3 = (x * y) + (z * (t - a))
	tmp = 0
	if z <= -2.2:
		tmp = t_2
	elif z <= -2.5e-77:
		tmp = t_1
	elif z <= 5.8e-228:
		tmp = t_3 / y
	elif z <= 9.8e-33:
		tmp = t_3 / (z * b)
	elif z <= 2050.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(y / Float64(z * Float64(b + Float64(Float64(y / z) - y)))))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(Float64(x * y) + Float64(z * Float64(t - a)))
	tmp = 0.0
	if (z <= -2.2)
		tmp = t_2;
	elseif (z <= -2.5e-77)
		tmp = t_1;
	elseif (z <= 5.8e-228)
		tmp = Float64(t_3 / y);
	elseif (z <= 9.8e-33)
		tmp = Float64(t_3 / Float64(z * b));
	elseif (z <= 2050.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (y / (z * (b + ((y / z) - y))));
	t_2 = (t - a) / (b - y);
	t_3 = (x * y) + (z * (t - a));
	tmp = 0.0;
	if (z <= -2.2)
		tmp = t_2;
	elseif (z <= -2.5e-77)
		tmp = t_1;
	elseif (z <= 5.8e-228)
		tmp = t_3 / y;
	elseif (z <= 9.8e-33)
		tmp = t_3 / (z * b);
	elseif (z <= 2050.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[(x * N[(y / N[(z * N[(b + N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2], t$95$2, If[LessEqual[z, -2.5e-77], t$95$1, If[LessEqual[z, 5.8e-228], N[(t$95$3 / y), $MachinePrecision], If[LessEqual[z, 9.8e-33], N[(t$95$3 / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2050.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.5 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-228}:\\
\;\;\;\;\frac{t\_3}{y}\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{t\_3}{z \cdot b}\\

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

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


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

    1. Initial program 48.8%

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

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

    if -2.2000000000000002 < z < -2.49999999999999982e-77 or 9.7999999999999996e-33 < z < 2050

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

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

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

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

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

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

    if -2.49999999999999982e-77 < z < 5.8000000000000002e-228

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

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

    if 5.8000000000000002e-228 < z < 9.7999999999999996e-33

    1. Initial program 88.6%

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

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

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

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

Alternative 11: 67.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.06 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 48.8%

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

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

    if -5800 < z < -1.05999999999999991e-77 or 4.80000000000000034e-173 < z < 1360

    1. Initial program 80.7%

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

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

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

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

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

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

    if -1.05999999999999991e-77 < z < 4.80000000000000034e-173

    1. Initial program 93.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 62.5%

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

Alternative 12: 54.6% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 1.32 \cdot 10^{+64}:\\
\;\;\;\;\frac{a}{y - b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.0000000000000001e-18 or 1.3200000000000001e64 < y

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

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

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

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

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

    if -1.0000000000000001e-18 < y < 1.94999999999999997e-91

    1. Initial program 85.4%

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

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

    if 1.94999999999999997e-91 < y < 4.4e5

    1. Initial program 66.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 t around inf 46.8%

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

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

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

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

    if 4.4e5 < y < 1.3200000000000001e64

    1. Initial program 51.4%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{\frac{t}{x} - \frac{a}{x}}{b - y}} \]
      2. div-sub36.0%

        \[\leadsto x \cdot \frac{\color{blue}{\frac{t - a}{x}}}{b - y} \]
    6. Simplified36.0%

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

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

        \[\leadsto \color{blue}{-\frac{a}{b - y}} \]
    9. Simplified41.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-91}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 440000:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 1.32 \cdot 10^{+64}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 54.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-91}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.7999999999999998e-18 or 2.10000000000000012e58 < y

    1. Initial program 54.5%

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

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

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

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

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

    if -3.7999999999999998e-18 < y < 1.20000000000000005e-91 or 1e6 < y < 2.10000000000000012e58

    1. Initial program 81.6%

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

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

    if 1.20000000000000005e-91 < y < 1e6

    1. Initial program 66.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 t around inf 46.8%

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

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

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

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

Alternative 14: 62.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.7 \lor \neg \left(z \leq 900\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{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 -0.7) (not (<= z 900.0)))
   (/ (- t a) (- b y))
   (/ (* x y) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -0.7) || !(z <= 900.0)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = (x * y) / (y + (z * (b - y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((z <= (-0.7d0)) .or. (.not. (z <= 900.0d0))) then
        tmp = (t - a) / (b - y)
    else
        tmp = (x * y) / (y + (z * (b - y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -0.7) || !(z <= 900.0)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = (x * y) / (y + (z * (b - y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -0.7) or not (z <= 900.0):
		tmp = (t - a) / (b - y)
	else:
		tmp = (x * y) / (y + (z * (b - y)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -0.7) || !(z <= 900.0))
		tmp = Float64(Float64(t - a) / Float64(b - y));
	else
		tmp = Float64(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 <= -0.7) || ~((z <= 900.0)))
		tmp = (t - a) / (b - y);
	else
		tmp = (x * y) / (y + (z * (b - y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.7], N[Not[LessEqual[z, 900.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.7 \lor \neg \left(z \leq 900\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.69999999999999996 or 900 < z

    1. Initial program 48.8%

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

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

    if -0.69999999999999996 < z < 900

    1. Initial program 87.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 inf 52.3%

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

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

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

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

Alternative 15: 54.6% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5499999999999999e-15 or 5.1999999999999997e109 < y

    1. Initial program 53.6%

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

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

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

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

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

    if -1.5499999999999999e-15 < y < 7.50000000000000015e-18

    1. Initial program 85.1%

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

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

    if 7.50000000000000015e-18 < y < 5.1999999999999997e109

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{\frac{t}{x} - \frac{a}{x}}{b - y}} \]
      2. div-sub46.7%

        \[\leadsto x \cdot \frac{\color{blue}{\frac{t - a}{x}}}{b - y} \]
    6. Simplified46.7%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t - a\right)}{y}} \]
      2. mul-1-neg40.0%

        \[\leadsto \frac{\color{blue}{-\left(t - a\right)}}{y} \]
    9. Simplified40.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-15}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+109}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 37.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+146}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq -7.4 \cdot 10^{-14} \lor \neg \left(z \leq 580\right):\\
\;\;\;\;\frac{t}{b}\\

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


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

    1. Initial program 22.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 13.6%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    7. Step-by-step derivation
      1. mul-1-neg29.9%

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

        \[\leadsto \color{blue}{\frac{a}{-b}} \]
    8. Simplified29.9%

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

    if -7.40000000000000009e146 < z < -7.40000000000000002e-14 or 580 < z

    1. Initial program 57.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 28.7%

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

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

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

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

    if -7.40000000000000002e-14 < z < 580

    1. Initial program 87.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 43.3%

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

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

Alternative 17: 36.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.3 \cdot 10^{+151}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq -2700000000:\\
\;\;\;\;\frac{t}{-y}\\

\mathbf{elif}\;z \leq 580:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.2999999999999999e151

    1. Initial program 21.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{-b}} \]
    8. Simplified31.5%

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

    if -8.2999999999999999e151 < z < -2.7e9

    1. Initial program 69.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. mul-1-neg32.0%

        \[\leadsto \frac{\color{blue}{-t}}{y} \]
    9. Simplified32.0%

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

    if -2.7e9 < z < 580

    1. Initial program 87.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 42.3%

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

    if 580 < z

    1. Initial program 49.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.3 \cdot 10^{+151}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq -2700000000:\\ \;\;\;\;\frac{t}{-y}\\ \mathbf{elif}\;z \leq 580:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 61.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6200 or 6.60000000000000015e106 < y

    1. Initial program 52.7%

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

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

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

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

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

    if -6200 < y < 6.60000000000000015e106

    1. Initial program 77.6%

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

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

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

Alternative 19: 45.0% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.60000000000000029e-10 or 1700 < z

    1. Initial program 48.5%

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

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

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

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

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

    if -8.60000000000000029e-10 < z < 1700

    1. Initial program 87.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 45.4%

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

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

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

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

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

Alternative 20: 44.8% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.19999999999999981e-10 or 0.37 < z

    1. Initial program 48.2%

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

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

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

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

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

    if -3.19999999999999981e-10 < z < 0.37

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

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

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

Alternative 21: 36.8% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 48.5%

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

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

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

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

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

    if -9.9999999999999995e-8 < z < 580

    1. Initial program 87.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 43.3%

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

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

Alternative 22: 24.9% 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 68.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 23.4%

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

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

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

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