Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.8% → 89.1%
Time: 18.6s
Alternatives: 17
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 66.8% 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: 89.1% accurate, 0.1× speedup?

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

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

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

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


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

    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 65.2%

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

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

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

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

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

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

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

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

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

    if -1e13 < z < 2.1e5

    1. Initial program 87.9%

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

      \[\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 2.1e5 < z

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -1200000000000 \lor \neg \left(z \leq 1.36 \cdot 10^{+25}\right):\\ \;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y)))))
   (if (or (<= z -1200000000000.0) (not (<= z 1.36e+25)))
     (- (/ (- a t) (- y b)) (/ x z))
     (* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if ((z <= -1200000000000.0) || !(z <= 1.36e+25)) {
		tmp = ((a - t) / (y - b)) - (x / z);
	} else {
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y))
    if ((z <= (-1200000000000.0d0)) .or. (.not. (z <= 1.36d+25))) then
        tmp = ((a - t) / (y - b)) - (x / z)
    else
        tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if ((z <= -1200000000000.0) || !(z <= 1.36e+25)) {
		tmp = ((a - t) / (y - b)) - (x / z);
	} else {
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	tmp = 0
	if (z <= -1200000000000.0) or not (z <= 1.36e+25):
		tmp = ((a - t) / (y - b)) - (x / z)
	else:
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	tmp = 0.0
	if ((z <= -1200000000000.0) || !(z <= 1.36e+25))
		tmp = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z));
	else
		tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	tmp = 0.0;
	if ((z <= -1200000000000.0) || ~((z <= 1.36e+25)))
		tmp = ((a - t) / (y - b)) - (x / z);
	else
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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]}, If[Or[LessEqual[z, -1200000000000.0], N[Not[LessEqual[z, 1.36e+25]], $MachinePrecision]], N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -1200000000000 \lor \neg \left(z \leq 1.36 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e12 or 1.36e25 < z

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

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

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

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

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

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

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

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

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

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

    if -1.2e12 < z < 1.36e25

    1. Initial program 87.1%

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

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

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

Alternative 3: 71.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b}\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+19}:\\ \;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) (- y b))))
   (if (<= z -1.9e-44)
     t_1
     (if (<= z 4.3e-26)
       (+ x (/ (* z (- t a)) y))
       (if (<= z 1.4e+19)
         (/ (- (* x (/ y z)) a) b)
         (if (<= z 1.12e+101) (/ x (+ (- (* b (/ z y)) z) 1.0)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double tmp;
	if (z <= -1.9e-44) {
		tmp = t_1;
	} else if (z <= 4.3e-26) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.4e+19) {
		tmp = ((x * (y / z)) - a) / b;
	} else if (z <= 1.12e+101) {
		tmp = x / (((b * (z / y)) - z) + 1.0);
	} 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 - b)
    if (z <= (-1.9d-44)) then
        tmp = t_1
    else if (z <= 4.3d-26) then
        tmp = x + ((z * (t - a)) / y)
    else if (z <= 1.4d+19) then
        tmp = ((x * (y / z)) - a) / b
    else if (z <= 1.12d+101) then
        tmp = x / (((b * (z / y)) - z) + 1.0d0)
    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 - b);
	double tmp;
	if (z <= -1.9e-44) {
		tmp = t_1;
	} else if (z <= 4.3e-26) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.4e+19) {
		tmp = ((x * (y / z)) - a) / b;
	} else if (z <= 1.12e+101) {
		tmp = x / (((b * (z / y)) - z) + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / (y - b)
	tmp = 0
	if z <= -1.9e-44:
		tmp = t_1
	elif z <= 4.3e-26:
		tmp = x + ((z * (t - a)) / y)
	elif z <= 1.4e+19:
		tmp = ((x * (y / z)) - a) / b
	elif z <= 1.12e+101:
		tmp = x / (((b * (z / y)) - z) + 1.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / Float64(y - b))
	tmp = 0.0
	if (z <= -1.9e-44)
		tmp = t_1;
	elseif (z <= 4.3e-26)
		tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y));
	elseif (z <= 1.4e+19)
		tmp = Float64(Float64(Float64(x * Float64(y / z)) - a) / b);
	elseif (z <= 1.12e+101)
		tmp = Float64(x / Float64(Float64(Float64(b * Float64(z / y)) - z) + 1.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / (y - b);
	tmp = 0.0;
	if (z <= -1.9e-44)
		tmp = t_1;
	elseif (z <= 4.3e-26)
		tmp = x + ((z * (t - a)) / y);
	elseif (z <= 1.4e+19)
		tmp = ((x * (y / z)) - a) / b;
	elseif (z <= 1.12e+101)
		tmp = x / (((b * (z / y)) - z) + 1.0);
	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] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e-44], t$95$1, If[LessEqual[z, 4.3e-26], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+19], N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.12e+101], N[(x / N[(N[(N[(b * N[(z / y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.9e-44 or 1.1199999999999999e101 < z

    1. Initial program 49.5%

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

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

    if -1.9e-44 < z < 4.29999999999999988e-26

    1. Initial program 87.0%

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

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

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

    if 4.29999999999999988e-26 < z < 1.4e19

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot \frac{y}{z}} - a}{b} \]
    11. Simplified58.7%

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

    if 1.4e19 < z < 1.1199999999999999e101

    1. Initial program 42.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{-44}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+19}:\\ \;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 71.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b}\\ \mathbf{if}\;z \leq -9 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+19}:\\ \;\;\;\;\frac{\left(t + x \cdot \frac{y}{z}\right) - a}{b}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) (- y b))))
   (if (<= z -9e-42)
     t_1
     (if (<= z 1.8e-74)
       (+ x (/ (* z (- t a)) y))
       (if (<= z 1.9e+19)
         (/ (- (+ t (* x (/ y z))) a) b)
         (if (<= z 1.12e+101) (/ x (+ (- (* b (/ z y)) z) 1.0)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double tmp;
	if (z <= -9e-42) {
		tmp = t_1;
	} else if (z <= 1.8e-74) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.9e+19) {
		tmp = ((t + (x * (y / z))) - a) / b;
	} else if (z <= 1.12e+101) {
		tmp = x / (((b * (z / y)) - z) + 1.0);
	} 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 - b)
    if (z <= (-9d-42)) then
        tmp = t_1
    else if (z <= 1.8d-74) then
        tmp = x + ((z * (t - a)) / y)
    else if (z <= 1.9d+19) then
        tmp = ((t + (x * (y / z))) - a) / b
    else if (z <= 1.12d+101) then
        tmp = x / (((b * (z / y)) - z) + 1.0d0)
    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 - b);
	double tmp;
	if (z <= -9e-42) {
		tmp = t_1;
	} else if (z <= 1.8e-74) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.9e+19) {
		tmp = ((t + (x * (y / z))) - a) / b;
	} else if (z <= 1.12e+101) {
		tmp = x / (((b * (z / y)) - z) + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / (y - b)
	tmp = 0
	if z <= -9e-42:
		tmp = t_1
	elif z <= 1.8e-74:
		tmp = x + ((z * (t - a)) / y)
	elif z <= 1.9e+19:
		tmp = ((t + (x * (y / z))) - a) / b
	elif z <= 1.12e+101:
		tmp = x / (((b * (z / y)) - z) + 1.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / Float64(y - b))
	tmp = 0.0
	if (z <= -9e-42)
		tmp = t_1;
	elseif (z <= 1.8e-74)
		tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y));
	elseif (z <= 1.9e+19)
		tmp = Float64(Float64(Float64(t + Float64(x * Float64(y / z))) - a) / b);
	elseif (z <= 1.12e+101)
		tmp = Float64(x / Float64(Float64(Float64(b * Float64(z / y)) - z) + 1.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / (y - b);
	tmp = 0.0;
	if (z <= -9e-42)
		tmp = t_1;
	elseif (z <= 1.8e-74)
		tmp = x + ((z * (t - a)) / y);
	elseif (z <= 1.9e+19)
		tmp = ((t + (x * (y / z))) - a) / b;
	elseif (z <= 1.12e+101)
		tmp = x / (((b * (z / y)) - z) + 1.0);
	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] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-42], t$95$1, If[LessEqual[z, 1.8e-74], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+19], N[(N[(N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.12e+101], N[(x / N[(N[(N[(b * N[(z / y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9e-42 or 1.1199999999999999e101 < z

    1. Initial program 49.5%

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

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

    if -9e-42 < z < 1.8000000000000001e-74

    1. Initial program 85.8%

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

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

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

    if 1.8000000000000001e-74 < z < 1.9e19

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

    if 1.9e19 < z < 1.1199999999999999e101

    1. Initial program 42.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-42}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+19}:\\ \;\;\;\;\frac{\left(t + x \cdot \frac{y}{z}\right) - a}{b}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 43.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{+232}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+106}:\\
\;\;\;\;a \cdot \frac{-1}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.8e253 or -8.20000000000000005e232 < z < -2.8999999999999998e-53 or 7.2000000000000002e106 < z

    1. Initial program 51.5%

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

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

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

    if -1.8e253 < z < -8.20000000000000005e232

    1. Initial program 44.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 a around inf 41.0%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{-z}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    5. Simplified41.2%

      \[\leadsto \color{blue}{a \cdot \frac{-z}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    6. Taylor expanded in b around inf 69.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/69.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg69.4%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified69.4%

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

    if -2.8999999999999998e-53 < z < 1.14999999999999994e-73

    1. Initial program 85.4%

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

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

    if 1.14999999999999994e-73 < z < 7.2000000000000002e106

    1. Initial program 66.4%

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{\color{blue}{-z}}{y + z \cdot \left(b - y\right)} \]
      7. +-commutative38.9%

        \[\leadsto a \cdot \frac{-z}{\color{blue}{z \cdot \left(b - y\right) + y}} \]
      8. fma-define39.0%

        \[\leadsto a \cdot \frac{-z}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    5. Simplified39.0%

      \[\leadsto \color{blue}{a \cdot \frac{-z}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    6. Taylor expanded in b around inf 33.6%

      \[\leadsto a \cdot \color{blue}{\frac{-1}{b}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+253}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+232}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-53}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+106}:\\ \;\;\;\;a \cdot \frac{-1}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 36.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a}{-b}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+120} \lor \neg \left(z \leq 4.4 \cdot 10^{+223}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ a (- b))))
   (if (<= z -5.2e+231)
     t_1
     (if (<= z -2.4e-54)
       (/ t b)
       (if (<= z 1.15e-73)
         x
         (if (or (<= z 7.2e+120) (not (<= z 4.4e+223))) t_1 (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a / -b;
	double tmp;
	if (z <= -5.2e+231) {
		tmp = t_1;
	} else if (z <= -2.4e-54) {
		tmp = t / b;
	} else if (z <= 1.15e-73) {
		tmp = x;
	} else if ((z <= 7.2e+120) || !(z <= 4.4e+223)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = a / -b
    if (z <= (-5.2d+231)) then
        tmp = t_1
    else if (z <= (-2.4d-54)) then
        tmp = t / b
    else if (z <= 1.15d-73) then
        tmp = x
    else if ((z <= 7.2d+120) .or. (.not. (z <= 4.4d+223))) then
        tmp = t_1
    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 t_1 = a / -b;
	double tmp;
	if (z <= -5.2e+231) {
		tmp = t_1;
	} else if (z <= -2.4e-54) {
		tmp = t / b;
	} else if (z <= 1.15e-73) {
		tmp = x;
	} else if ((z <= 7.2e+120) || !(z <= 4.4e+223)) {
		tmp = t_1;
	} else {
		tmp = t / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a / -b
	tmp = 0
	if z <= -5.2e+231:
		tmp = t_1
	elif z <= -2.4e-54:
		tmp = t / b
	elif z <= 1.15e-73:
		tmp = x
	elif (z <= 7.2e+120) or not (z <= 4.4e+223):
		tmp = t_1
	else:
		tmp = t / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a / Float64(-b))
	tmp = 0.0
	if (z <= -5.2e+231)
		tmp = t_1;
	elseif (z <= -2.4e-54)
		tmp = Float64(t / b);
	elseif (z <= 1.15e-73)
		tmp = x;
	elseif ((z <= 7.2e+120) || !(z <= 4.4e+223))
		tmp = t_1;
	else
		tmp = Float64(t / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a / -b;
	tmp = 0.0;
	if (z <= -5.2e+231)
		tmp = t_1;
	elseif (z <= -2.4e-54)
		tmp = t / b;
	elseif (z <= 1.15e-73)
		tmp = x;
	elseif ((z <= 7.2e+120) || ~((z <= 4.4e+223)))
		tmp = t_1;
	else
		tmp = t / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -5.2e+231], t$95$1, If[LessEqual[z, -2.4e-54], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.15e-73], x, If[Or[LessEqual[z, 7.2e+120], N[Not[LessEqual[z, 4.4e+223]], $MachinePrecision]], t$95$1, N[(t / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+120} \lor \neg \left(z \leq 4.4 \cdot 10^{+223}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.1999999999999997e231 or 1.14999999999999994e-73 < z < 7.20000000000000031e120 or 4.3999999999999999e223 < z

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{-z}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    5. Simplified34.2%

      \[\leadsto \color{blue}{a \cdot \frac{-z}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    6. Taylor expanded in b around inf 36.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/36.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg36.7%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified36.7%

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

    if -5.1999999999999997e231 < z < -2.40000000000000013e-54 or 7.20000000000000031e120 < z < 4.3999999999999999e223

    1. Initial program 60.2%

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

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

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

    if -2.40000000000000013e-54 < z < 1.14999999999999994e-73

    1. Initial program 85.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+231}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+120} \lor \neg \left(z \leq 4.4 \cdot 10^{+223}\right):\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 36.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -7.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-73}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+109}:\\
\;\;\;\;a \cdot \frac{-1}{b}\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+223}:\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.0000000000000003e231 or 5.4999999999999999e223 < z

    1. Initial program 24.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 a around inf 20.5%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{-z}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{a \cdot \frac{-z}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    6. Taylor expanded in b around inf 41.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/41.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg41.0%

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

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

    if -6.0000000000000003e231 < z < -7.5999999999999993e-55 or 1.45e109 < z < 5.4999999999999999e223

    1. Initial program 60.2%

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

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

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

    if -7.5999999999999993e-55 < z < 1.1e-73

    1. Initial program 85.4%

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

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

    if 1.1e-73 < z < 1.45e109

    1. Initial program 66.4%

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{\color{blue}{-z}}{y + z \cdot \left(b - y\right)} \]
      7. +-commutative38.9%

        \[\leadsto a \cdot \frac{-z}{\color{blue}{z \cdot \left(b - y\right) + y}} \]
      8. fma-define39.0%

        \[\leadsto a \cdot \frac{-z}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    5. Simplified39.0%

      \[\leadsto \color{blue}{a \cdot \frac{-z}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    6. Taylor expanded in b around inf 33.6%

      \[\leadsto a \cdot \color{blue}{\frac{-1}{b}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification42.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+231}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-73}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+109}:\\ \;\;\;\;a \cdot \frac{-1}{b}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+223}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 72.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y - b}\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{-41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+23}:\\ \;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\ \;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) (- y b))))
   (if (<= z -4.8e-41)
     t_1
     (if (<= z 4.5e-26)
       (+ x (/ (* z (- t a)) y))
       (if (<= z 1.6e+23)
         (/ (- (* x (/ y z)) a) b)
         (if (<= z 1.12e+101) (- (/ t (- b y)) (/ x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / (y - b);
	double tmp;
	if (z <= -4.8e-41) {
		tmp = t_1;
	} else if (z <= 4.5e-26) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.6e+23) {
		tmp = ((x * (y / z)) - a) / b;
	} else if (z <= 1.12e+101) {
		tmp = (t / (b - y)) - (x / 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 - b)
    if (z <= (-4.8d-41)) then
        tmp = t_1
    else if (z <= 4.5d-26) then
        tmp = x + ((z * (t - a)) / y)
    else if (z <= 1.6d+23) then
        tmp = ((x * (y / z)) - a) / b
    else if (z <= 1.12d+101) then
        tmp = (t / (b - y)) - (x / 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 - b);
	double tmp;
	if (z <= -4.8e-41) {
		tmp = t_1;
	} else if (z <= 4.5e-26) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.6e+23) {
		tmp = ((x * (y / z)) - a) / b;
	} else if (z <= 1.12e+101) {
		tmp = (t / (b - y)) - (x / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / (y - b)
	tmp = 0
	if z <= -4.8e-41:
		tmp = t_1
	elif z <= 4.5e-26:
		tmp = x + ((z * (t - a)) / y)
	elif z <= 1.6e+23:
		tmp = ((x * (y / z)) - a) / b
	elif z <= 1.12e+101:
		tmp = (t / (b - y)) - (x / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / Float64(y - b))
	tmp = 0.0
	if (z <= -4.8e-41)
		tmp = t_1;
	elseif (z <= 4.5e-26)
		tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y));
	elseif (z <= 1.6e+23)
		tmp = Float64(Float64(Float64(x * Float64(y / z)) - a) / b);
	elseif (z <= 1.12e+101)
		tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / (y - b);
	tmp = 0.0;
	if (z <= -4.8e-41)
		tmp = t_1;
	elseif (z <= 4.5e-26)
		tmp = x + ((z * (t - a)) / y);
	elseif (z <= 1.6e+23)
		tmp = ((x * (y / z)) - a) / b;
	elseif (z <= 1.12e+101)
		tmp = (t / (b - y)) - (x / 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] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-41], t$95$1, If[LessEqual[z, 4.5e-26], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+23], N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.12e+101], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.80000000000000044e-41 or 1.1199999999999999e101 < z

    1. Initial program 49.5%

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

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

    if -4.80000000000000044e-41 < z < 4.4999999999999999e-26

    1. Initial program 87.0%

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

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

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

    if 4.4999999999999999e-26 < z < 1.6e23

    1. Initial program 79.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.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot \frac{y}{z}} - a}{b} \]
    11. Simplified57.8%

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

    if 1.6e23 < z < 1.1199999999999999e101

    1. Initial program 42.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 47.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-41}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+23}:\\ \;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\ \;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{a - t}{y - b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4e21 or 6.19999999999999941e23 < z

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

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

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

    if -7.4e21 < z < 6.19999999999999941e23

    1. Initial program 87.7%

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

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

Alternative 10: 39.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -9.6 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-209}:\\
\;\;\;\;\frac{a}{-b}\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.5999999999999999e41 or 4.40000000000000001e104 < t

    1. Initial program 63.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 64.9%

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

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

    if -5.5999999999999999e41 < t < -9.6e-204 or 5.19999999999999969e-209 < t < 4.40000000000000001e104

    1. Initial program 64.2%

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

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

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

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

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

    if -9.6e-204 < t < 5.19999999999999969e-209

    1. Initial program 79.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 a around inf 54.9%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{-z}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    5. Simplified60.2%

      \[\leadsto \color{blue}{a \cdot \frac{-z}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    6. Taylor expanded in b around inf 49.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/49.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. mul-1-neg49.0%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified49.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+41}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-204}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-209}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+104}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 75.9% accurate, 0.8× speedup?

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

\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 < -6.9999999999999999e-41 or 1.1e-16 < z

    1. Initial program 51.7%

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999999e-41 < z < 1.1e-16

    1. Initial program 86.4%

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

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

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

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

Alternative 12: 53.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.20000000000000021e-40 or 5.5999999999999996e49 < y

    1. Initial program 50.5%

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

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

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

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

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

    if -6.20000000000000021e-40 < y < 2.1000000000000001e-93

    1. Initial program 81.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 63.9%

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

    if 2.1000000000000001e-93 < y < 5.5999999999999996e49

    1. Initial program 77.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-93}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+49}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.3% accurate, 0.9× speedup?

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

\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 < -6.9999999999999999e-41 or 7.3999999999999995e-17 < z

    1. Initial program 51.7%

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

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

    if -6.9999999999999999e-41 < z < 7.3999999999999995e-17

    1. Initial program 86.4%

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

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

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

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

Alternative 14: 64.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-55} \lor \neg \left(z \leq 4.8 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.0000000000000002e-55 or 4.80000000000000026e-76 < z

    1. Initial program 55.2%

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

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

    if -5.0000000000000002e-55 < z < 4.80000000000000026e-76

    1. Initial program 85.4%

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

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

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

Alternative 15: 54.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-38} \lor \neg \left(y \leq 1.12 \cdot 10^{-26}\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.15e-38) (not (<= y 1.12e-26)))
   (/ 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.15e-38) || !(y <= 1.12e-26)) {
		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.15d-38)) .or. (.not. (y <= 1.12d-26))) 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.15e-38) || !(y <= 1.12e-26)) {
		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.15e-38) or not (y <= 1.12e-26):
		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.15e-38) || !(y <= 1.12e-26))
		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.15e-38) || ~((y <= 1.12e-26)))
		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.15e-38], N[Not[LessEqual[y, 1.12e-26]], $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.15 \cdot 10^{-38} \lor \neg \left(y \leq 1.12 \cdot 10^{-26}\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.15000000000000001e-38 or 1.12e-26 < y

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

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

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

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

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

    if -1.15000000000000001e-38 < y < 1.12e-26

    1. Initial program 80.7%

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

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

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

Alternative 16: 36.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-53} \lor \neg \left(z \leq 5.2 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3000000000000001e-53 or 5.2e20 < z

    1. Initial program 50.1%

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

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

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

    if -2.3000000000000001e-53 < z < 5.2e20

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

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

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

Alternative 17: 24.8% accurate, 17.0× speedup?

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

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification25.0%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 74.2% accurate, 0.7× speedup?

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

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

Reproduce

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

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

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