Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.0% → 83.9%
Time: 16.2s
Alternatives: 17
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

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

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

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

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

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


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

    1. Initial program 34.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e8 < z < 6.4999999999999996e89

    1. Initial program 87.1%

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

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

    if 6.4999999999999996e89 < z

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

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

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

Alternative 2: 83.4% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 27.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 66.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+66.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-neg66.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--66.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. *-commutative66.4%

        \[\leadsto \left(-\frac{-1 \cdot \left(\frac{\color{blue}{y \cdot x}}{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*77.4%

        \[\leadsto \left(-\frac{-1 \cdot \left(\frac{y \cdot x}{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-sub77.4%

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

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

    if -1.6e54 < z < 2.25e91

    1. Initial program 86.6%

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

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

    if 2.25e91 < z

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

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

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

Alternative 3: 89.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y}\\ t_3 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_1}\\ t_4 := \frac{y}{t\_1}\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;x \cdot \left(t\_4 + \frac{t - a}{y \cdot \left(\frac{x}{z} - x\right)}\right)\\ \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-268}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+256}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;x \cdot \left(t\_4 + \frac{\frac{a - t}{x}}{y - b}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (/ (+ (* z (- t a)) (* y x)) t_1))
        (t_4 (/ y t_1)))
   (if (<= t_3 (- INFINITY))
     (* x (+ t_4 (/ (- t a) (* y (- (/ x z) x)))))
     (if (<= t_3 -1e-268)
       t_3
       (if (<= t_3 0.0)
         t_2
         (if (<= t_3 2e+256)
           t_3
           (if (<= t_3 INFINITY)
             (* x (+ t_4 (/ (/ (- a t) x) (- y b))))
             t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = ((z * (t - a)) + (y * x)) / t_1;
	double t_4 = y / t_1;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x))));
	} else if (t_3 <= -1e-268) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = t_2;
	} else if (t_3 <= 2e+256) {
		tmp = t_3;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = x * (t_4 + (((a - t) / x) / (y - b)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = ((z * (t - a)) + (y * x)) / t_1;
	double t_4 = y / t_1;
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x))));
	} else if (t_3 <= -1e-268) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = t_2;
	} else if (t_3 <= 2e+256) {
		tmp = t_3;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = x * (t_4 + (((a - t) / x) / (y - b)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = (t - a) / (b - y)
	t_3 = ((z * (t - a)) + (y * x)) / t_1
	t_4 = y / t_1
	tmp = 0
	if t_3 <= -math.inf:
		tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x))))
	elif t_3 <= -1e-268:
		tmp = t_3
	elif t_3 <= 0.0:
		tmp = t_2
	elif t_3 <= 2e+256:
		tmp = t_3
	elif t_3 <= math.inf:
		tmp = x * (t_4 + (((a - t) / x) / (y - b)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_1)
	t_4 = Float64(y / t_1)
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(x * Float64(t_4 + Float64(Float64(t - a) / Float64(y * Float64(Float64(x / z) - x)))));
	elseif (t_3 <= -1e-268)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = t_2;
	elseif (t_3 <= 2e+256)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = Float64(x * Float64(t_4 + Float64(Float64(Float64(a - t) / x) / Float64(y - b))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = (t - a) / (b - y);
	t_3 = ((z * (t - a)) + (y * x)) / t_1;
	t_4 = y / t_1;
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x))));
	elseif (t_3 <= -1e-268)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = t_2;
	elseif (t_3 <= 2e+256)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = x * (t_4 + (((a - t) / x) / (y - b)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(y / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(t$95$4 + N[(N[(t - a), $MachinePrecision] / N[(y * N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-268], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 2e+256], t$95$3, If[LessEqual[t$95$3, Infinity], N[(x * N[(t$95$4 + N[(N[(N[(a - t), $MachinePrecision] / x), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+256}:\\
\;\;\;\;t\_3\\

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

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


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

    1. Initial program 40.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 65.4%

      \[\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)} \]
    4. Taylor expanded in z around inf 41.5%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999958e-269 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e256

    1. Initial program 99.6%

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

    if -9.99999999999999958e-269 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

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

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

    if 2.0000000000000001e256 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 26.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 75.0%

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

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

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

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

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

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

Alternative 4: 90.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y}\\ t_3 := x \cdot \left(\frac{y}{t\_1} + \frac{\frac{a - t}{x}}{y - b}\right)\\ t_4 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_1}\\ \mathbf{if}\;t\_4 \leq -5 \cdot 10^{+302}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-268}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_4 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+256}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (* x (+ (/ y t_1) (/ (/ (- a t) x) (- y b)))))
        (t_4 (/ (+ (* z (- t a)) (* y x)) t_1)))
   (if (<= t_4 -5e+302)
     t_3
     (if (<= t_4 -1e-268)
       t_4
       (if (<= t_4 0.0)
         t_2
         (if (<= t_4 2e+256) t_4 (if (<= t_4 INFINITY) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = x * ((y / t_1) + (((a - t) / x) / (y - b)));
	double t_4 = ((z * (t - a)) + (y * x)) / t_1;
	double tmp;
	if (t_4 <= -5e+302) {
		tmp = t_3;
	} else if (t_4 <= -1e-268) {
		tmp = t_4;
	} else if (t_4 <= 0.0) {
		tmp = t_2;
	} else if (t_4 <= 2e+256) {
		tmp = t_4;
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = x * ((y / t_1) + (((a - t) / x) / (y - b)));
	double t_4 = ((z * (t - a)) + (y * x)) / t_1;
	double tmp;
	if (t_4 <= -5e+302) {
		tmp = t_3;
	} else if (t_4 <= -1e-268) {
		tmp = t_4;
	} else if (t_4 <= 0.0) {
		tmp = t_2;
	} else if (t_4 <= 2e+256) {
		tmp = t_4;
	} else if (t_4 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = (t - a) / (b - y)
	t_3 = x * ((y / t_1) + (((a - t) / x) / (y - b)))
	t_4 = ((z * (t - a)) + (y * x)) / t_1
	tmp = 0
	if t_4 <= -5e+302:
		tmp = t_3
	elif t_4 <= -1e-268:
		tmp = t_4
	elif t_4 <= 0.0:
		tmp = t_2
	elif t_4 <= 2e+256:
		tmp = t_4
	elif t_4 <= math.inf:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(Float64(a - t) / x) / Float64(y - b))))
	t_4 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_1)
	tmp = 0.0
	if (t_4 <= -5e+302)
		tmp = t_3;
	elseif (t_4 <= -1e-268)
		tmp = t_4;
	elseif (t_4 <= 0.0)
		tmp = t_2;
	elseif (t_4 <= 2e+256)
		tmp = t_4;
	elseif (t_4 <= Inf)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = (t - a) / (b - y);
	t_3 = x * ((y / t_1) + (((a - t) / x) / (y - b)));
	t_4 = ((z * (t - a)) + (y * x)) / t_1;
	tmp = 0.0;
	if (t_4 <= -5e+302)
		tmp = t_3;
	elseif (t_4 <= -1e-268)
		tmp = t_4;
	elseif (t_4 <= 0.0)
		tmp = t_2;
	elseif (t_4 <= 2e+256)
		tmp = t_4;
	elseif (t_4 <= Inf)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(N[(a - t), $MachinePrecision] / x), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+302], t$95$3, If[LessEqual[t$95$4, -1e-268], t$95$4, If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 2e+256], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+256}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 36.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 71.2%

      \[\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)} \]
    4. Taylor expanded in z around inf 43.3%

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

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

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

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

    if -5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999958e-269 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e256

    1. Initial program 99.6%

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

    if -9.99999999999999958e-269 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

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

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

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

Alternative 5: 84.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -3.55 \cdot 10^{+56} \lor \neg \left(z \leq 1.6 \cdot 10^{+89}\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 -3.55e+56) (not (<= z 1.6e+89)))
     (/ (- 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 <= -3.55e+56) || !(z <= 1.6e+89)) {
		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 <= (-3.55d+56)) .or. (.not. (z <= 1.6d+89))) 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 <= -3.55e+56) || !(z <= 1.6e+89)) {
		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 <= -3.55e+56) or not (z <= 1.6e+89):
		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 <= -3.55e+56) || !(z <= 1.6e+89))
		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 <= -3.55e+56) || ~((z <= 1.6e+89)))
		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, -3.55e+56], N[Not[LessEqual[z, 1.6e+89]], $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 -3.55 \cdot 10^{+56} \lor \neg \left(z \leq 1.6 \cdot 10^{+89}\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 < -3.55e56 or 1.59999999999999994e89 < z

    1. Initial program 33.6%

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

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

    if -3.55e56 < z < 1.59999999999999994e89

    1. Initial program 86.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 93.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.55 \cdot 10^{+56} \lor \neg \left(z \leq 1.6 \cdot 10^{+89}\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 6: 84.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.39999999999999998e54 or 2.5999999999999998e90 < z

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

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

    if -2.39999999999999998e54 < z < 2.5999999999999998e90

    1. Initial program 86.6%

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

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

Alternative 7: 72.1% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65e-31 or 4.80000000000000005e-42 < z

    1. Initial program 46.6%

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

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

    if -1.65e-31 < z < 1.00000000000000003e-161

    1. Initial program 85.6%

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

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

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

    if 1.00000000000000003e-161 < z < 4.80000000000000005e-42

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define99.8%

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 68.2%

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

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

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

Alternative 8: 72.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.02 \cdot 10^{-33}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot b}\\

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


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

    1. Initial program 46.6%

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

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

    if -5e-32 < z < 1.00000000000000003e-161

    1. Initial program 85.6%

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

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

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

    if 1.00000000000000003e-161 < z < 1.02e-33

    1. Initial program 99.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define99.8%

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 68.2%

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

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

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

      \[\leadsto \frac{y \cdot x}{y + z \cdot \color{blue}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 74.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-44} \lor \neg \left(z \leq 3.5 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.49999999999999993e-44 or 3.49999999999999997e-50 < z

    1. Initial program 47.8%

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

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

    if -5.49999999999999993e-44 < z < 3.49999999999999997e-50

    1. Initial program 88.0%

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

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

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

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

Alternative 10: 64.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-58} \lor \neg \left(z \leq 3.8 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3499999999999999e-58 or 3.80000000000000003e-51 < z

    1. Initial program 48.2%

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

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

    if -1.3499999999999999e-58 < z < 3.80000000000000003e-51

    1. Initial program 88.5%

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

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

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

Alternative 11: 54.2% accurate, 1.1× speedup?

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

    1. Initial program 53.8%

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

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

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

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

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

    if -9.49999999999999993e-46 < y < 1.25999999999999999e53

    1. Initial program 78.3%

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

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

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

Alternative 12: 43.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.96 \cdot 10^{+71} \lor \neg \left(z \leq 1.2 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.96000000000000011e71 or 1.20000000000000001e-50 < z

    1. Initial program 42.4%

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

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

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

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

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

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

    if -1.96000000000000011e71 < z < 1.20000000000000001e-50

    1. Initial program 85.8%

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

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

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

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

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

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

Alternative 13: 44.5% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.10000000000000001 or 5.3999999999999994e-51 < z

    1. Initial program 44.6%

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

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

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

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

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

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

    if -0.10000000000000001 < z < 5.3999999999999994e-51

    1. Initial program 88.7%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified54.6%

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

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

Alternative 14: 33.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.76:\\
\;\;\;\;-\frac{x}{z}\\

\mathbf{elif}\;z \leq 18000:\\
\;\;\;\;x + z \cdot x\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\


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

    1. Initial program 35.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/25.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. mul-1-neg25.6%

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    8. Simplified25.6%

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

    if -0.76000000000000001 < z < 18000

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified52.0%

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

    if 18000 < z

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.76:\\ \;\;\;\;-\frac{x}{z}\\ \mathbf{elif}\;z \leq 18000:\\ \;\;\;\;x + z \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 33.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+54} \lor \neg \left(z \leq 18000\right):\\
\;\;\;\;\frac{a}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.4000000000000001e54 or 18000 < z

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000001e54 < z < 18000

    1. Initial program 87.0%

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

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

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

Alternative 16: 33.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;-\frac{x}{z}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\


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

    1. Initial program 35.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/25.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. mul-1-neg25.6%

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    8. Simplified25.6%

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

    if -1 < z < 18000

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

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

    if 18000 < z

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;-\frac{x}{z}\\ \mathbf{elif}\;z \leq 18000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 24.8% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 66.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 29.4%

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

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

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

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