Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.2% → 90.4%
Time: 16.1s
Alternatives: 16
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 90.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -0.00023 \lor \neg \left(z \leq 250000000\right):\\ \;\;\;\;\frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z} + \frac{t - a}{b - y}\\ \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 -0.00023) (not (<= z 250000000.0)))
     (+
      (/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z)
      (/ (- t a) (- b y)))
     (* 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 <= -0.00023) || !(z <= 250000000.0)) {
		tmp = (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
	} 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 <= (-0.00023d0)) .or. (.not. (z <= 250000000.0d0))) then
        tmp = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ** 2.0d0)))) / z) + ((t - a) / (b - y))
    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 <= -0.00023) || !(z <= 250000000.0)) {
		tmp = (((x * (y / (b - y))) - (y * ((t - a) / Math.pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
	} 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 <= -0.00023) or not (z <= 250000000.0):
		tmp = (((x * (y / (b - y))) - (y * ((t - a) / math.pow((b - y), 2.0)))) / z) + ((t - a) / (b - y))
	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 <= -0.00023) || !(z <= 250000000.0))
		tmp = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z) + Float64(Float64(t - a) / Float64(b - y)));
	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 <= -0.00023) || ~((z <= 250000000.0)))
		tmp = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ^ 2.0)))) / z) + ((t - a) / (b - y));
	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, -0.00023], N[Not[LessEqual[z, 250000000.0]], $MachinePrecision]], N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 -0.00023 \lor \neg \left(z \leq 250000000\right):\\
\;\;\;\;\frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z} + \frac{t - a}{b - y}\\

\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 < -2.3000000000000001e-4 or 2.5e8 < z

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

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

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

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

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

        \[\leadsto \left(-\frac{-1 \cdot \left(\color{blue}{x \cdot \frac{y}{b - y}} - \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}\right)}{z}\right) + \left(\frac{t}{b - y} - \frac{a}{b - y}\right) \]
      5. associate-/l*93.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-sub93.0%

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

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

    if -2.3000000000000001e-4 < z < 2.5e8

    1. Initial program 89.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00023 \lor \neg \left(z \leq 250000000\right):\\ \;\;\;\;\frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z} + \frac{t - a}{b - y}\\ \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 2: 68.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -2.05 \cdot 10^{-100}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-140}:\\
\;\;\;\;\frac{x \cdot y}{t\_2}\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\
\;\;\;\;\frac{t\_1 + x \cdot y}{y}\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 7000:\\
\;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.79999999999999996e-5 or 7e3 < z

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

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

    if -2.79999999999999996e-5 < z < -2.0499999999999999e-100 or 4.9999999999999999e-201 < z < 1.74999999999999993e-75

    1. Initial program 94.9%

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

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

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

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

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

    if -2.0499999999999999e-100 < z < -2.8000000000000002e-140

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \frac{y \cdot x}{y + \color{blue}{b \cdot z}} \]
    7. Step-by-step derivation
      1. *-commutative17.9%

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

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

    if -2.8000000000000002e-140 < z < 4.9999999999999999e-201

    1. Initial program 91.7%

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

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

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

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

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

    if 1.74999999999999993e-75 < z < 7e3

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y}{y \cdot 1 + \color{blue}{y \cdot \left(-z\right)}} \]
      5. distribute-lft-in52.7%

        \[\leadsto x \cdot \frac{y}{\color{blue}{y \cdot \left(1 + \left(-z\right)\right)}} \]
      6. sub-neg52.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-5}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-100}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-140}:\\ \;\;\;\;\frac{x \cdot y}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-75}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 7000:\\ \;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -0.00023 \lor \neg \left(z \leq 2.2 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \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 -0.00023) (not (<= z 2.2e+88)))
     (/ (- t a) (- b y))
     (* 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 <= -0.00023) || !(z <= 2.2e+88)) {
		tmp = (t - a) / (b - y);
	} 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 <= (-0.00023d0)) .or. (.not. (z <= 2.2d+88))) then
        tmp = (t - a) / (b - y)
    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 <= -0.00023) || !(z <= 2.2e+88)) {
		tmp = (t - a) / (b - y);
	} 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 <= -0.00023) or not (z <= 2.2e+88):
		tmp = (t - a) / (b - y)
	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 <= -0.00023) || !(z <= 2.2e+88))
		tmp = Float64(Float64(t - a) / Float64(b - y));
	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 <= -0.00023) || ~((z <= 2.2e+88)))
		tmp = (t - a) / (b - y);
	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, -0.00023], N[Not[LessEqual[z, 2.2e+88]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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 -0.00023 \lor \neg \left(z \leq 2.2 \cdot 10^{+88}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

\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 < -2.3000000000000001e-4 or 2.20000000000000009e88 < z

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

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

    if -2.3000000000000001e-4 < z < 2.20000000000000009e88

    1. Initial program 88.5%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 88.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00023 \lor \neg \left(z \leq 2.2 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \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 4: 41.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{b - y}\\ \mathbf{if}\;z \leq -2.55 \cdot 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.64:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+179} \lor \neg \left(z \leq 2.8 \cdot 10^{+228}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ t (- b y))))
   (if (<= z -2.55e-95)
     t_1
     (if (<= z 5e-201)
       x
       (if (<= z 1.55e-101)
         t_1
         (if (<= z 0.64)
           x
           (if (or (<= z 2.25e+179) (not (<= z 2.8e+228)))
             t_1
             (/ a (- b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t / (b - y);
	double tmp;
	if (z <= -2.55e-95) {
		tmp = t_1;
	} else if (z <= 5e-201) {
		tmp = x;
	} else if (z <= 1.55e-101) {
		tmp = t_1;
	} else if (z <= 0.64) {
		tmp = x;
	} else if ((z <= 2.25e+179) || !(z <= 2.8e+228)) {
		tmp = t_1;
	} else {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = t / (b - y)
    if (z <= (-2.55d-95)) then
        tmp = t_1
    else if (z <= 5d-201) then
        tmp = x
    else if (z <= 1.55d-101) then
        tmp = t_1
    else if (z <= 0.64d0) then
        tmp = x
    else if ((z <= 2.25d+179) .or. (.not. (z <= 2.8d+228))) then
        tmp = t_1
    else
        tmp = 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 t_1 = t / (b - y);
	double tmp;
	if (z <= -2.55e-95) {
		tmp = t_1;
	} else if (z <= 5e-201) {
		tmp = x;
	} else if (z <= 1.55e-101) {
		tmp = t_1;
	} else if (z <= 0.64) {
		tmp = x;
	} else if ((z <= 2.25e+179) || !(z <= 2.8e+228)) {
		tmp = t_1;
	} else {
		tmp = a / -b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t / (b - y)
	tmp = 0
	if z <= -2.55e-95:
		tmp = t_1
	elif z <= 5e-201:
		tmp = x
	elif z <= 1.55e-101:
		tmp = t_1
	elif z <= 0.64:
		tmp = x
	elif (z <= 2.25e+179) or not (z <= 2.8e+228):
		tmp = t_1
	else:
		tmp = a / -b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t / Float64(b - y))
	tmp = 0.0
	if (z <= -2.55e-95)
		tmp = t_1;
	elseif (z <= 5e-201)
		tmp = x;
	elseif (z <= 1.55e-101)
		tmp = t_1;
	elseif (z <= 0.64)
		tmp = x;
	elseif ((z <= 2.25e+179) || !(z <= 2.8e+228))
		tmp = t_1;
	else
		tmp = Float64(a / Float64(-b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t / (b - y);
	tmp = 0.0;
	if (z <= -2.55e-95)
		tmp = t_1;
	elseif (z <= 5e-201)
		tmp = x;
	elseif (z <= 1.55e-101)
		tmp = t_1;
	elseif (z <= 0.64)
		tmp = x;
	elseif ((z <= 2.25e+179) || ~((z <= 2.8e+228)))
		tmp = t_1;
	else
		tmp = a / -b;
	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, -2.55e-95], t$95$1, If[LessEqual[z, 5e-201], x, If[LessEqual[z, 1.55e-101], t$95$1, If[LessEqual[z, 0.64], x, If[Or[LessEqual[z, 2.25e+179], N[Not[LessEqual[z, 2.8e+228]], $MachinePrecision]], t$95$1, N[(a / (-b)), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+179} \lor \neg \left(z \leq 2.8 \cdot 10^{+228}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.55e-95 or 4.9999999999999999e-201 < z < 1.54999999999999987e-101 or 0.640000000000000013 < z < 2.2500000000000001e179 or 2.7999999999999999e228 < z

    1. Initial program 56.9%

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

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

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

    if -2.55e-95 < z < 4.9999999999999999e-201 or 1.54999999999999987e-101 < z < 0.640000000000000013

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

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

    if 2.2500000000000001e179 < z < 2.7999999999999999e228

    1. Initial program 25.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{-b}} \]
    6. Simplified56.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{-95}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-101}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq 0.64:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+179} \lor \neg \left(z \leq 2.8 \cdot 10^{+228}\right):\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-201}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 0.76:\\
\;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\

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


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

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

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

    if -2.3000000000000001e-4 < z < -1.9500000000000001e-103 or 4.80000000000000018e-201 < z < 1.3499999999999999e-75

    1. Initial program 94.9%

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

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

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

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

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

    if -1.9500000000000001e-103 < z < 4.80000000000000018e-201

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

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

    if 1.3499999999999999e-75 < z < 0.76000000000000001

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y}{y \cdot 1 + \color{blue}{y \cdot \left(-z\right)}} \]
      5. distribute-lft-in52.7%

        \[\leadsto x \cdot \frac{y}{\color{blue}{y \cdot \left(1 + \left(-z\right)\right)}} \]
      6. sub-neg52.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00023:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-103}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-201}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-75}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 0.76:\\ \;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 69.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\
\;\;\;\;\frac{t\_2 + x \cdot y}{y}\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-78}:\\
\;\;\;\;\frac{t\_2}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2e16 or 0.650000000000000022 < z

    1. Initial program 43.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 78.6%

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

    if -1.2e16 < z < -1.64999999999999992e-84

    1. Initial program 88.2%

      \[\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-neg88.2%

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

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

      \[\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 x around 0 82.2%

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

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

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

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

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

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

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

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

    if -1.64999999999999992e-84 < z < 4.9999999999999999e-201

    1. Initial program 92.8%

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

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

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

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

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

    if 4.9999999999999999e-201 < z < 3.70000000000000006e-78

    1. Initial program 99.9%

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

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

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

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

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

    if 3.70000000000000006e-78 < z < 0.650000000000000022

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y}{y \cdot 1 + \color{blue}{y \cdot \left(-z\right)}} \]
      5. distribute-lft-in52.7%

        \[\leadsto x \cdot \frac{y}{\color{blue}{y \cdot \left(1 + \left(-z\right)\right)}} \]
      6. sub-neg52.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-84}:\\ \;\;\;\;z \cdot \frac{t - a}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-78}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 0.65:\\ \;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 63.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-201}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 0.85:\\
\;\;\;\;x \cdot \frac{y}{y \cdot \left(1 - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.64999999999999997e-96 or 0.849999999999999978 < z

    1. Initial program 49.0%

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

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

    if -3.64999999999999997e-96 < z < 4.9999999999999999e-201

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

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

    if 4.9999999999999999e-201 < z < 1.02000000000000009e-87

    1. Initial program 99.9%

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

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

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

    if 1.02000000000000009e-87 < z < 0.849999999999999978

    1. Initial program 70.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 42.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y}{y \cdot 1 + \color{blue}{y \cdot \left(-z\right)}} \]
      5. distribute-lft-in52.7%

        \[\leadsto x \cdot \frac{y}{\color{blue}{y \cdot \left(1 + \left(-z\right)\right)}} \]
      6. sub-neg52.7%

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

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

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

Alternative 8: 84.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.05e38 or 1.8000000000000001e88 < z

    1. Initial program 34.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 80.8%

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

    if -3.05e38 < z < 1.8000000000000001e88

    1. Initial program 89.0%

      \[\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-neg89.0%

        \[\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-in89.0%

        \[\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-rr89.0%

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

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

Alternative 9: 63.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 3 \cdot 10^{-201}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.08e-95 or 1.25 < z

    1. Initial program 49.0%

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

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

    if -1.08e-95 < z < 3.00000000000000002e-201

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

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

    if 3.00000000000000002e-201 < z < 1.02000000000000009e-87

    1. Initial program 99.9%

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

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

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

    if 1.02000000000000009e-87 < z < 1.25

    1. Initial program 70.9%

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

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

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

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

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

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

Alternative 10: 84.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.51999999999999996e38 or 2.05000000000000014e88 < z

    1. Initial program 34.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 80.8%

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

    if -1.51999999999999996e38 < z < 2.05000000000000014e88

    1. Initial program 89.0%

      \[\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 simplification85.6%

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

Alternative 11: 83.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 43.4%

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

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

    if -2.3000000000000001e-4 < z < 8e8

    1. Initial program 89.5%

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

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

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

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

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

Alternative 12: 42.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1600 \lor \neg \left(t \leq 4.7 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1600 or 4.69999999999999976e27 < t

    1. Initial program 62.1%

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

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

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

    if -1600 < t < 4.69999999999999976e27

    1. Initial program 71.1%

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

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

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

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

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

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

Alternative 13: 53.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{-73} \lor \neg \left(y \leq 3.1 \cdot 10^{-46}\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.35e-73) (not (<= y 3.1e-46))) (/ 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.35e-73) || !(y <= 3.1e-46)) {
		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.35d-73)) .or. (.not. (y <= 3.1d-46))) 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.35e-73) || !(y <= 3.1e-46)) {
		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.35e-73) or not (y <= 3.1e-46):
		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.35e-73) || !(y <= 3.1e-46))
		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.35e-73) || ~((y <= 3.1e-46)))
		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.35e-73], N[Not[LessEqual[y, 3.1e-46]], $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.35 \cdot 10^{-73} \lor \neg \left(y \leq 3.1 \cdot 10^{-46}\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.34999999999999997e-73 or 3.1000000000000001e-46 < y

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

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

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

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

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

    if -1.34999999999999997e-73 < y < 3.1000000000000001e-46

    1. Initial program 80.6%

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

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

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

Alternative 14: 35.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{-95}:\\
\;\;\;\;\frac{t}{b}\\

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

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


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

    1. Initial program 53.5%

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

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

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

    if -2.55e-95 < z < 0.640000000000000013

    1. Initial program 89.5%

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

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

    if 0.640000000000000013 < z

    1. Initial program 43.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{-b}} \]
    6. Simplified28.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{-95}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 0.64:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 35.9% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.55e-95 or 0.640000000000000013 < z

    1. Initial program 49.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 b around inf 31.3%

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

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

    if -2.55e-95 < z < 0.640000000000000013

    1. Initial program 89.5%

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

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

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

Alternative 16: 24.7% 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 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 z around 0 24.7%

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 73.3% 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 2024075 
(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)))))