Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.4% → 92.4%
Time: 18.7s
Alternatives: 18
Speedup: 0.6×

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 18 alternatives:

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

Initial Program: 66.4% accurate, 1.0× speedup?

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

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

Alternative 1: 92.4% accurate, 0.1× speedup?

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

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

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

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

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

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


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

    1. Initial program 12.9%

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

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

Alternative 2: 91.9% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

    1. Initial program 99.6%

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

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

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

Alternative 3: 65.5% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2e107 or -1.3500000000000001e94 < z < -130 or 980 < z

    1. Initial program 45.9%

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

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

    if -1.2e107 < z < -1.3500000000000001e94

    1. Initial program 99.3%

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

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

    if -130 < z < -3.00000000000000016e-77 or 9.1999999999999999e-37 < z < 980

    1. Initial program 73.0%

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

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

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

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

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

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

    if -3.00000000000000016e-77 < z < 4.80000000000000004e-228

    1. Initial program 94.5%

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

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

    if 4.80000000000000004e-228 < z < 9.1999999999999999e-37

    1. Initial program 88.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+107}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{+94}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq -130:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-77}:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-37}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq 980:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 65.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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


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

    1. Initial program 48.8%

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

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

    if -40 < z < -3.2e-77 or 1.4e-33 < z < 1200

    1. Initial program 73.0%

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

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

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

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

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

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

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

    1. Initial program 94.5%

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

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

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

    1. Initial program 88.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -40:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-77}:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-33}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b}\\ \mathbf{elif}\;z \leq 1200:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 83.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+107} \lor \neg \left(z \leq 2.15 \cdot 10^{+136}\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 -1.2e+107) (not (<= z 2.15e+136)))
     (/ (- 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 <= -1.2e+107) || !(z <= 2.15e+136)) {
		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 <= (-1.2d+107)) .or. (.not. (z <= 2.15d+136))) 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 <= -1.2e+107) || !(z <= 2.15e+136)) {
		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 <= -1.2e+107) or not (z <= 2.15e+136):
		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 <= -1.2e+107) || !(z <= 2.15e+136))
		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 <= -1.2e+107) || ~((z <= 2.15e+136)))
		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, -1.2e+107], N[Not[LessEqual[z, 2.15e+136]], $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 -1.2 \cdot 10^{+107} \lor \neg \left(z \leq 2.15 \cdot 10^{+136}\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 < -1.2e107 or 2.1499999999999999e136 < 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 91.6%

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

    if -1.2e107 < z < 2.1499999999999999e136

    1. Initial program 84.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+107} \lor \neg \left(z \leq 2.15 \cdot 10^{+136}\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: 67.2% accurate, 0.5× speedup?

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

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

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

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

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

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


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

    1. Initial program 48.8%

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

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

    if -1.8500000000000001 < z < -1.05999999999999991e-77 or 4.80000000000000034e-173 < z < 1250

    1. Initial program 80.7%

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

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

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

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

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

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

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

    1. Initial program 93.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{-77}:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-173}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1250:\\ \;\;\;\;x \cdot \frac{y}{z \cdot \left(b + \left(\frac{y}{z} - y\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 83.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3000000000000001e107 or 2.1499999999999999e136 < 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 91.6%

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

    if -1.3000000000000001e107 < z < 2.1499999999999999e136

    1. Initial program 84.0%

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

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

Alternative 8: 54.8% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 4 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.99999999999999994e-16 or 4.00000000000000037e56 < y

    1. Initial program 54.5%

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

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

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

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

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

    if -2.99999999999999994e-16 < y < 1.8500000000000001e-91 or 7200 < y < 4.00000000000000037e56

    1. Initial program 81.6%

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

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

    if 1.8500000000000001e-91 < y < 7200

    1. Initial program 66.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-91}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 7200:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+56}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 54.6% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.2999999999999999e-16 or 6.5000000000000001e66 < y

    1. Initial program 55.1%

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

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

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

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

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

    if -1.2999999999999999e-16 < y < 1.94999999999999997e-91

    1. Initial program 85.4%

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

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

    if 1.94999999999999997e-91 < y < 1e6

    1. Initial program 66.4%

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

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

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

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

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

    if 1e6 < y < 6.5000000000000001e66

    1. Initial program 51.4%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 62.6% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 48.8%

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

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

    if -0.92000000000000004 < z < 1700

    1. Initial program 87.3%

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

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

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

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

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

Alternative 11: 54.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.39999999999999994e-18 or 2.7000000000000001e102 < y

    1. Initial program 53.6%

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

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

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

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

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

    if -2.39999999999999994e-18 < y < 8.1999999999999995e-18

    1. Initial program 85.1%

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

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

    if 8.1999999999999995e-18 < y < 2.7000000000000001e102

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-18}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+102}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 37.0% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

    if -1.18e148 < z < -2.15000000000000017e-6 or 580 < z

    1. Initial program 57.8%

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

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

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

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

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

    if -2.15000000000000017e-6 < z < 580

    1. Initial program 87.9%

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

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

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

Alternative 13: 36.1% accurate, 0.9× speedup?

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

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

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

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

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


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

    1. Initial program 21.2%

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

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

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

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

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

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

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

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

    if -7.99999999999999985e150 < z < -2.7e9

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

    if -2.7e9 < z < 580

    1. Initial program 87.5%

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

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

    if 580 < z

    1. Initial program 49.9%

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

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

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

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

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

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

Alternative 14: 61.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -15200 or 2.04999999999999992e104 < y

    1. Initial program 52.7%

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

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

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

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

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

    if -15200 < y < 2.04999999999999992e104

    1. Initial program 77.6%

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

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

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

Alternative 15: 44.8% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.80000000000000006e-14 or 0.28999999999999998 < z

    1. Initial program 48.2%

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

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

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

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

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

    if -6.80000000000000006e-14 < z < 0.28999999999999998

    1. Initial program 88.5%

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

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

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

Alternative 16: 45.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-8} \lor \neg \left(z \leq 650\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 < -5.99999999999999946e-8 or 650 < z

    1. Initial program 48.5%

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

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

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

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

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

    if -5.99999999999999946e-8 < z < 650

    1. Initial program 87.9%

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

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

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

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

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

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

Alternative 17: 36.8% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 48.5%

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

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

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

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

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

    if -3.10000000000000004e-14 < z < 580

    1. Initial program 87.9%

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

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

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

Alternative 18: 24.9% accurate, 17.0× speedup?

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

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

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

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 73.9% accurate, 0.7× speedup?

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

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

Reproduce

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

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

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