Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.1% → 88.8%
Time: 17.6s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 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.1% 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: 88.8% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1999999999999999e27 or 1.5e28 < z

    1. Initial program 44.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 64.4%

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

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

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

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

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

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

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

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

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

    if -2.1999999999999999e27 < z < 1.5e28

    1. Initial program 92.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+27} \lor \neg \left(z \leq 1.5 \cdot 10^{+28}\right):\\ \;\;\;\;\left(\frac{x \cdot \frac{y}{z}}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\ \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 2: 87.1% 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 -\infty:\\ \;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_2}{x \cdot t\_1}\right)\\ \mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-276}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq 0 \lor \neg \left(t\_3 \leq 10^{+298}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\ \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 (- INFINITY))
     (* x (+ (/ y t_1) (/ t_2 (* x t_1))))
     (if (<= t_3 -4e-276)
       t_3
       (if (or (<= t_3 0.0) (not (<= t_3 1e+298)))
         (/ (- t a) (- b y))
         (+ (/ (* x y) t_1) (/ t_2 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 = z * (t - a);
	double t_3 = ((x * y) + t_2) / t_1;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = x * ((y / t_1) + (t_2 / (x * t_1)));
	} else if (t_3 <= -4e-276) {
		tmp = t_3;
	} else if ((t_3 <= 0.0) || !(t_3 <= 1e+298)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = z * (t - a);
	double t_3 = ((x * y) + t_2) / t_1;
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = x * ((y / t_1) + (t_2 / (x * t_1)));
	} else if (t_3 <= -4e-276) {
		tmp = t_3;
	} else if ((t_3 <= 0.0) || !(t_3 <= 1e+298)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = ((x * y) / t_1) + (t_2 / t_1);
	}
	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 <= -math.inf:
		tmp = x * ((y / t_1) + (t_2 / (x * t_1)))
	elif t_3 <= -4e-276:
		tmp = t_3
	elif (t_3 <= 0.0) or not (t_3 <= 1e+298):
		tmp = (t - a) / (b - y)
	else:
		tmp = ((x * y) / t_1) + (t_2 / t_1)
	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 <= Float64(-Inf))
		tmp = Float64(x * Float64(Float64(y / t_1) + Float64(t_2 / Float64(x * t_1))));
	elseif (t_3 <= -4e-276)
		tmp = t_3;
	elseif ((t_3 <= 0.0) || !(t_3 <= 1e+298))
		tmp = Float64(Float64(t - a) / Float64(b - y));
	else
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1));
	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 <= -Inf)
		tmp = x * ((y / t_1) + (t_2 / (x * t_1)));
	elseif (t_3 <= -4e-276)
		tmp = t_3;
	elseif ((t_3 <= 0.0) || ~((t_3 <= 1e+298)))
		tmp = (t - a) / (b - y);
	else
		tmp = ((x * y) / t_1) + (t_2 / 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[(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, (-Infinity)], 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, -4e-276], t$95$3, If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, 1e+298]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $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 -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_2}{x \cdot t\_1}\right)\\

\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-276}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq 0 \lor \neg \left(t\_3 \leq 10^{+298}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


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

    1. Initial program 27.5%

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

      \[\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 -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276

    1. Initial program 99.4%

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

    if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.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 79.6%

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

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

    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 simplification91.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 -\infty:\\ \;\;\;\;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 -4 \cdot 10^{-276}:\\ \;\;\;\;\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 10^{+298}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \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: 87.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := y \cdot \left(1 - z\right)\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{x \cdot y + t\_3}{t\_1}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;x \cdot \frac{y}{t\_2} + z \cdot \frac{t - a}{t\_2}\\ \mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-276}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_4 \leq 0 \lor \neg \left(t\_4 \leq 10^{+298}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_3}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (* y (- 1.0 z)))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ (* x y) t_3) t_1)))
   (if (<= t_4 (- INFINITY))
     (+ (* x (/ y t_2)) (* z (/ (- t a) t_2)))
     (if (<= t_4 -4e-276)
       t_4
       (if (or (<= t_4 0.0) (not (<= t_4 1e+298)))
         (/ (- t a) (- b y))
         (+ (/ (* x y) t_1) (/ t_3 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 = y * (1.0 - z);
	double t_3 = z * (t - a);
	double t_4 = ((x * y) + t_3) / t_1;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
	} else if (t_4 <= -4e-276) {
		tmp = t_4;
	} else if ((t_4 <= 0.0) || !(t_4 <= 1e+298)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = ((x * y) / t_1) + (t_3 / t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = y * (1.0 - z);
	double t_3 = z * (t - a);
	double t_4 = ((x * y) + t_3) / t_1;
	double tmp;
	if (t_4 <= -Double.POSITIVE_INFINITY) {
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
	} else if (t_4 <= -4e-276) {
		tmp = t_4;
	} else if ((t_4 <= 0.0) || !(t_4 <= 1e+298)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = ((x * y) / t_1) + (t_3 / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = y * (1.0 - z)
	t_3 = z * (t - a)
	t_4 = ((x * y) + t_3) / t_1
	tmp = 0
	if t_4 <= -math.inf:
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2))
	elif t_4 <= -4e-276:
		tmp = t_4
	elif (t_4 <= 0.0) or not (t_4 <= 1e+298):
		tmp = (t - a) / (b - y)
	else:
		tmp = ((x * y) / t_1) + (t_3 / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(y * Float64(1.0 - z))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = Float64(Float64(x * Float64(y / t_2)) + Float64(z * Float64(Float64(t - a) / t_2)));
	elseif (t_4 <= -4e-276)
		tmp = t_4;
	elseif ((t_4 <= 0.0) || !(t_4 <= 1e+298))
		tmp = Float64(Float64(t - a) / Float64(b - y));
	else
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = y * (1.0 - z);
	t_3 = z * (t - a);
	t_4 = ((x * y) + t_3) / t_1;
	tmp = 0.0;
	if (t_4 <= -Inf)
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
	elseif (t_4 <= -4e-276)
		tmp = t_4;
	elseif ((t_4 <= 0.0) || ~((t_4 <= 1e+298)))
		tmp = (t - a) / (b - y);
	else
		tmp = ((x * y) / t_1) + (t_3 / 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[(y * N[(1.0 - z), $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, (-Infinity)], N[(N[(x * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -4e-276], t$95$4, If[Or[LessEqual[t$95$4, 0.0], N[Not[LessEqual[t$95$4, 1e+298]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t\_4 \leq 0 \lor \neg \left(t\_4 \leq 10^{+298}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


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

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

    if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.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 79.6%

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

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

    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 simplification91.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)} + z \cdot \frac{t - a}{y \cdot \left(1 - z\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -4 \cdot 10^{-276}:\\ \;\;\;\;\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 10^{+298}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \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 4: 87.8% 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)}\\ t_2 := y \cdot \left(1 - z\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;x \cdot \frac{y}{t\_2} + z \cdot \frac{t - a}{t\_2}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-276} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 10^{+298}:\\ \;\;\;\;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 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
        (t_2 (* y (- 1.0 z))))
   (if (<= t_1 (- INFINITY))
     (+ (* x (/ y t_2)) (* z (/ (- t a) t_2)))
     (if (or (<= t_1 -4e-276) (and (not (<= t_1 0.0)) (<= t_1 1e+298)))
       t_1
       (/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_2 = y * (1.0 - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
	} else if ((t_1 <= -4e-276) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
		tmp = t_1;
	} else {
		tmp = (t - a) / (b - y);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	double t_2 = y * (1.0 - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
	} else if ((t_1 <= -4e-276) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
		tmp = t_1;
	} else {
		tmp = (t - a) / (b - y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
	t_2 = y * (1.0 - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2))
	elif (t_1 <= -4e-276) or (not (t_1 <= 0.0) and (t_1 <= 1e+298)):
		tmp = t_1
	else:
		tmp = (t - a) / (b - y)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = Float64(y * Float64(1.0 - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x * Float64(y / t_2)) + Float64(z * Float64(Float64(t - a) / t_2)));
	elseif ((t_1 <= -4e-276) || (!(t_1 <= 0.0) && (t_1 <= 1e+298)))
		tmp = 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
	t_2 = y * (1.0 - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
	elseif ((t_1 <= -4e-276) || (~((t_1 <= 0.0)) && (t_1 <= 1e+298)))
		tmp = 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[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -4e-276], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 1e+298]]], t$95$1, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-276} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 10^{+298}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999996e297

    1. Initial program 99.5%

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

    if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.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 79.6%

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

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

Alternative 5: 86.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := \frac{x \cdot y + t\_1}{y + z \cdot \left(b - y\right)}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z} + \frac{t\_1}{y \cdot \left(1 - z\right)}\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-276} \lor \neg \left(t\_2 \leq 0\right) \land t\_2 \leq 10^{+298}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- t a))) (t_2 (/ (+ (* x y) t_1) (+ y (* z (- b y))))))
   (if (<= t_2 (- INFINITY))
     (+ (/ x (- 1.0 z)) (/ t_1 (* y (- 1.0 z))))
     (if (or (<= t_2 -4e-276) (and (not (<= t_2 0.0)) (<= t_2 1e+298)))
       t_2
       (/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z)));
	} else if ((t_2 <= -4e-276) || (!(t_2 <= 0.0) && (t_2 <= 1e+298))) {
		tmp = t_2;
	} else {
		tmp = (t - a) / (b - y);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z)));
	} else if ((t_2 <= -4e-276) || (!(t_2 <= 0.0) && (t_2 <= 1e+298))) {
		tmp = t_2;
	} else {
		tmp = (t - a) / (b - y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (t - a)
	t_2 = ((x * y) + t_1) / (y + (z * (b - y)))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z)))
	elif (t_2 <= -4e-276) or (not (t_2 <= 0.0) and (t_2 <= 1e+298)):
		tmp = t_2
	else:
		tmp = (t - a) / (b - y)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(t - a))
	t_2 = Float64(Float64(Float64(x * y) + t_1) / Float64(y + Float64(z * Float64(b - y))))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(t_1 / Float64(y * Float64(1.0 - z))));
	elseif ((t_2 <= -4e-276) || (!(t_2 <= 0.0) && (t_2 <= 1e+298)))
		tmp = t_2;
	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 = z * (t - a);
	t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z)));
	elseif ((t_2 <= -4e-276) || (~((t_2 <= 0.0)) && (t_2 <= 1e+298)))
		tmp = t_2;
	else
		tmp = (t - a) / (b - y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -4e-276], And[N[Not[LessEqual[t$95$2, 0.0]], $MachinePrecision], LessEqual[t$95$2, 1e+298]]], t$95$2, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-276} \lor \neg \left(t\_2 \leq 0\right) \land t\_2 \leq 10^{+298}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 27.5%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999996e297

    1. Initial program 99.5%

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

    if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 16.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 79.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;\frac{x}{1 - z} + \frac{z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right)}\\ \mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -4 \cdot 10^{-276} \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 10^{+298}:\\ \;\;\;\;\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 6: 83.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9e12 or 1.32e20 < 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 82.5%

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

    if -3.9e12 < z < 1.32e20

    1. Initial program 92.1%

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

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

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

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

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

Alternative 7: 53.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+226}:\\
\;\;\;\;\frac{a - t}{y}\\

\mathbf{elif}\;z \leq -6.6 \cdot 10^{-23} \lor \neg \left(z \leq 1.9 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b}\\

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


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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{t - a}{y} - \frac{x - -1 \cdot \frac{t - a}{y}}{z}} \]
      3. associate-*r/65.6%

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

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

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

        \[\leadsto \frac{-\left(t - a\right)}{y} - \frac{x + \left(-\color{blue}{\left(-\frac{t - a}{y}\right)}\right)}{z} \]
      7. remove-double-neg65.6%

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

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

      \[\leadsto \color{blue}{\frac{a}{y} - \frac{t}{y}} \]
    10. Step-by-step derivation
      1. div-sub74.7%

        \[\leadsto \color{blue}{\frac{a - t}{y}} \]
    11. Simplified74.7%

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

    if -2.19999999999999994e226 < z < -6.60000000000000041e-23 or 1.90000000000000007e-7 < z

    1. Initial program 53.9%

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

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

    if -6.60000000000000041e-23 < z < 1.90000000000000007e-7

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 51.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+227}:\\
\;\;\;\;\frac{a - t}{y}\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-28} \lor \neg \left(z \leq 1.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b}\\

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


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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{t - a}{y} - \frac{x - -1 \cdot \frac{t - a}{y}}{z}} \]
      3. associate-*r/65.6%

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

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

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

        \[\leadsto \frac{-\left(t - a\right)}{y} - \frac{x + \left(-\color{blue}{\left(-\frac{t - a}{y}\right)}\right)}{z} \]
      7. remove-double-neg65.6%

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

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

      \[\leadsto \color{blue}{\frac{a}{y} - \frac{t}{y}} \]
    10. Step-by-step derivation
      1. div-sub74.7%

        \[\leadsto \color{blue}{\frac{a - t}{y}} \]
    11. Simplified74.7%

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

    if -1.0200000000000001e227 < z < -3.4000000000000001e-28 or 1.4999999999999999e-7 < z

    1. Initial program 53.9%

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

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

    if -3.4000000000000001e-28 < z < 1.4999999999999999e-7

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 42.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq 23000000000:\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.54999999999999996e83 or 2.3e10 < z

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{t - a}{y} - \frac{x - -1 \cdot \frac{t - a}{y}}{z}} \]
      3. associate-*r/49.3%

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

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

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

        \[\leadsto \frac{-\left(t - a\right)}{y} - \frac{x + \left(-\color{blue}{\left(-\frac{t - a}{y}\right)}\right)}{z} \]
      7. remove-double-neg49.3%

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

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

      \[\leadsto \color{blue}{\frac{a}{y} - \frac{t}{y}} \]
    10. Step-by-step derivation
      1. div-sub43.2%

        \[\leadsto \color{blue}{\frac{a - t}{y}} \]
    11. Simplified43.2%

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

    if -1.54999999999999996e83 < z < -3.5000000000000002e-17

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

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

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

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

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

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

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

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

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

    if -3.5000000000000002e-17 < z < 2.3e10

    1. Initial program 91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+83}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 23000000000:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 36.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+156}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-7}:\\
\;\;\;\;x + z \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.49999999999999996e156 or 2.39999999999999979e-7 < z

    1. Initial program 48.0%

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

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

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

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

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

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

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

    if -2.49999999999999996e156 < z < -1.3e-18

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

    if -1.3e-18 < z < 2.39999999999999979e-7

    1. Initial program 91.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified49.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+156}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-18}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-7}:\\ \;\;\;\;x + z \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 75.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-23} \lor \neg \left(z \leq 2.25 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1999999999999999e-23 or 2.2499999999999999e-7 < z

    1. Initial program 52.0%

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

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

    if -2.1999999999999999e-23 < z < 2.2499999999999999e-7

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 36.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+156}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq -6.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-7}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.29999999999999982e156 or 1.4999999999999999e-7 < z

    1. Initial program 48.0%

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

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

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

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

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

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

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

    if -6.29999999999999982e156 < z < -6.9000000000000003e-18

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

    if -6.9000000000000003e-18 < z < 1.4999999999999999e-7

    1. Initial program 91.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{+156}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq -6.9 \cdot 10^{-18}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 69.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-28} \lor \neg \left(z \leq 1.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6999999999999999e-28 or 1.4999999999999999e-7 < z

    1. Initial program 52.0%

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

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

    if -2.6999999999999999e-28 < z < 1.4999999999999999e-7

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-\color{blue}{z \cdot a}}{y} \]
    11. Simplified67.5%

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

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

Alternative 14: 69.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-23} \lor \neg \left(z \leq 1.55 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1999999999999999e-23 or 1.55e-7 < z

    1. Initial program 52.0%

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

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

    if -2.1999999999999999e-23 < z < 1.55e-7

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{a \cdot z}{y}} \]
    10. Step-by-step derivation
      1. mul-1-neg67.5%

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

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

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

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

        \[\leadsto x + a \cdot \color{blue}{\frac{-1 \cdot z}{y}} \]
      6. mul-1-neg62.4%

        \[\leadsto x + a \cdot \frac{\color{blue}{-z}}{y} \]
    11. Simplified62.4%

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

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

Alternative 15: 69.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.0000000000000002e-35 or 1.6e-7 < z

    1. Initial program 52.4%

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

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

    if -9.0000000000000002e-35 < z < 1.6e-7

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 54.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-13} \lor \neg \left(y \leq 7.5 \cdot 10^{+44}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.55e-13 or 7.50000000000000027e44 < y

    1. Initial program 53.4%

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

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

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

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

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

    if -1.55e-13 < y < 7.50000000000000027e44

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

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

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

Alternative 17: 41.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-19} \lor \neg \left(y \leq 1.65 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85000000000000003e-19 or 1.65e21 < y

    1. Initial program 56.0%

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

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

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

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

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

    if -1.85000000000000003e-19 < y < 1.65e21

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

Alternative 18: 36.8% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5999999999999997e-32 or 1.4999999999999999e-7 < z

    1. Initial program 52.4%

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

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

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

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

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

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

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

    if -2.5999999999999997e-32 < z < 1.4999999999999999e-7

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

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

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

Alternative 19: 25.0% 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.2%

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

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

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

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