Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.7% → 88.1%
Time: 16.5s
Alternatives: 13
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 88.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(b - y\right)}^{2}\\ t_2 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -27000:\\ \;\;\;\;\frac{x \cdot \frac{y}{b - y} + y \cdot \frac{a - t}{t\_1}}{z} + t\_2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+29}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(t\_2 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + y \cdot \frac{a - t}{z \cdot t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (pow (- b y) 2.0)) (t_2 (/ (- t a) (- b y))))
   (if (<= z -27000.0)
     (+ (/ (+ (* x (/ y (- b y))) (* y (/ (- a t) t_1))) z) t_2)
     (if (<= z 4.4e+29)
       (/ (fma x y (* z (- t a))) (fma z (- b y) y))
       (+ (+ t_2 (* (/ y z) (/ x (- b y)))) (* y (/ (- a t) (* z t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = pow((b - y), 2.0);
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -27000.0) {
		tmp = (((x * (y / (b - y))) + (y * ((a - t) / t_1))) / z) + t_2;
	} else if (z <= 4.4e+29) {
		tmp = fma(x, y, (z * (t - a))) / fma(z, (b - y), y);
	} else {
		tmp = (t_2 + ((y / z) * (x / (b - y)))) + (y * ((a - t) / (z * t_1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(b - y) ^ 2.0
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -27000.0)
		tmp = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / t_1))) / z) + t_2);
	elseif (z <= 4.4e+29)
		tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / fma(z, Float64(b - y), y));
	else
		tmp = Float64(Float64(t_2 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(y * Float64(Float64(a - t) / Float64(z * t_1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -27000.0], N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[z, 4.4e+29], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+29}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\

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


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

    1. Initial program 36.6%

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

      \[\leadsto \color{blue}{\left(-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+64.4%

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

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

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

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

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

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

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

    if -27000 < z < 4.4000000000000003e29

    1. Initial program 90.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    4. Add Preprocessing

    if 4.4000000000000003e29 < z

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.8% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-17} \lor \neg \left(z \leq 4.4 \cdot 10^{+29}\right):\\
\;\;\;\;\left(\frac{t - a}{b - y} + \frac{y}{z} \cdot \frac{x}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.20000000000000006e-17 or 4.4000000000000003e29 < z

    1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000006e-17 < z < 4.4000000000000003e29

    1. Initial program 90.4%

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

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

Alternative 3: 88.1% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 36.6%

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

      \[\leadsto \color{blue}{\left(-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+64.4%

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

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

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

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

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

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

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

    if -27000 < z < 5.5999999999999999e29

    1. Initial program 90.7%

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

    if 5.5999999999999999e29 < z

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 52.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y}\\ t_2 := z \cdot \frac{t - a}{y}\\ t_3 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{+31}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-46}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-75}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 0.07:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4400000000000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) y)) (t_2 (* z (/ (- t a) y))) (t_3 (/ x (- 1.0 z))))
   (if (<= y -3.1e+31)
     t_3
     (if (<= y -4.6e-17)
       t_1
       (if (<= y -9e-46)
         t_2
         (if (<= y 1.9e-75)
           (/ (- t a) b)
           (if (<= y 0.07) t_1 (if (<= y 4400000000000.0) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / y;
	double t_2 = z * ((t - a) / y);
	double t_3 = x / (1.0 - z);
	double tmp;
	if (y <= -3.1e+31) {
		tmp = t_3;
	} else if (y <= -4.6e-17) {
		tmp = t_1;
	} else if (y <= -9e-46) {
		tmp = t_2;
	} else if (y <= 1.9e-75) {
		tmp = (t - a) / b;
	} else if (y <= 0.07) {
		tmp = t_1;
	} else if (y <= 4400000000000.0) {
		tmp = t_2;
	} 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 = (a - t) / y
    t_2 = z * ((t - a) / y)
    t_3 = x / (1.0d0 - z)
    if (y <= (-3.1d+31)) then
        tmp = t_3
    else if (y <= (-4.6d-17)) then
        tmp = t_1
    else if (y <= (-9d-46)) then
        tmp = t_2
    else if (y <= 1.9d-75) then
        tmp = (t - a) / b
    else if (y <= 0.07d0) then
        tmp = t_1
    else if (y <= 4400000000000.0d0) then
        tmp = t_2
    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 = (a - t) / y;
	double t_2 = z * ((t - a) / y);
	double t_3 = x / (1.0 - z);
	double tmp;
	if (y <= -3.1e+31) {
		tmp = t_3;
	} else if (y <= -4.6e-17) {
		tmp = t_1;
	} else if (y <= -9e-46) {
		tmp = t_2;
	} else if (y <= 1.9e-75) {
		tmp = (t - a) / b;
	} else if (y <= 0.07) {
		tmp = t_1;
	} else if (y <= 4400000000000.0) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / y
	t_2 = z * ((t - a) / y)
	t_3 = x / (1.0 - z)
	tmp = 0
	if y <= -3.1e+31:
		tmp = t_3
	elif y <= -4.6e-17:
		tmp = t_1
	elif y <= -9e-46:
		tmp = t_2
	elif y <= 1.9e-75:
		tmp = (t - a) / b
	elif y <= 0.07:
		tmp = t_1
	elif y <= 4400000000000.0:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / y)
	t_2 = Float64(z * Float64(Float64(t - a) / y))
	t_3 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -3.1e+31)
		tmp = t_3;
	elseif (y <= -4.6e-17)
		tmp = t_1;
	elseif (y <= -9e-46)
		tmp = t_2;
	elseif (y <= 1.9e-75)
		tmp = Float64(Float64(t - a) / b);
	elseif (y <= 0.07)
		tmp = t_1;
	elseif (y <= 4400000000000.0)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / y;
	t_2 = z * ((t - a) / y);
	t_3 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -3.1e+31)
		tmp = t_3;
	elseif (y <= -4.6e-17)
		tmp = t_1;
	elseif (y <= -9e-46)
		tmp = t_2;
	elseif (y <= 1.9e-75)
		tmp = (t - a) / b;
	elseif (y <= 0.07)
		tmp = t_1;
	elseif (y <= 4400000000000.0)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+31], t$95$3, If[LessEqual[y, -4.6e-17], t$95$1, If[LessEqual[y, -9e-46], t$95$2, If[LessEqual[y, 1.9e-75], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 0.07], t$95$1, If[LessEqual[y, 4400000000000.0], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
t_2 := z \cdot \frac{t - a}{y}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+31}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -4.6 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 0.07:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 4400000000000:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.1000000000000002e31 or 4.4e12 < y

    1. Initial program 52.4%

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

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

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

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

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

    if -3.1000000000000002e31 < y < -4.60000000000000018e-17 or 1.89999999999999997e-75 < y < 0.070000000000000007

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

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

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

        \[\leadsto \color{blue}{-\frac{t - a}{y}} \]
      2. distribute-neg-frac254.8%

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

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

    if -4.60000000000000018e-17 < y < -9.00000000000000001e-46 or 0.070000000000000007 < y < 4.4e12

    1. Initial program 92.3%

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{t - a}{y}} \]
    6. Simplified44.8%

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

    if -9.00000000000000001e-46 < y < 1.89999999999999997e-75

    1. Initial program 82.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 56.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+31}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-17}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-46}:\\ \;\;\;\;z \cdot \frac{t - a}{y}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-75}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 0.07:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 4400000000000:\\ \;\;\;\;z \cdot \frac{t - a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 62.6% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq 5.1 \cdot 10^{-139}:\\
\;\;\;\;z \cdot \frac{t - a}{y}\\

\mathbf{elif}\;z \leq 1.46 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.00000000000000007e-43 or 1.46000000000000008e-5 < z

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

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

    if -6.00000000000000007e-43 < z < 1.14999999999999996e-203

    1. Initial program 86.4%

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

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

    if 1.14999999999999996e-203 < z < 5.10000000000000036e-139

    1. Initial program 99.5%

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{t - a}{y}} \]
    6. Simplified39.5%

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

    if 5.10000000000000036e-139 < z < 1.46000000000000008e-5

    1. Initial program 93.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 47.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-43}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-203}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-139}:\\ \;\;\;\;z \cdot \frac{t - a}{y}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7e18 or 2.70000000000000011e54 < z

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

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

    if -2.7e18 < z < 2.70000000000000011e54

    1. Initial program 90.5%

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

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

Alternative 7: 53.5% 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 -2.8 \cdot 10^{+45}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.00075:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 5800000000000:\\ \;\;\;\;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 -2.8e+45)
     t_2
     (if (<= y 1.55e-90)
       t_1
       (if (<= y 0.00075)
         (/ t (- b y))
         (if (<= y 5800000000000.0) 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 <= -2.8e+45) {
		tmp = t_2;
	} else if (y <= 1.55e-90) {
		tmp = t_1;
	} else if (y <= 0.00075) {
		tmp = t / (b - y);
	} else if (y <= 5800000000000.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 = (t - a) / b
    t_2 = x / (1.0d0 - z)
    if (y <= (-2.8d+45)) then
        tmp = t_2
    else if (y <= 1.55d-90) then
        tmp = t_1
    else if (y <= 0.00075d0) then
        tmp = t / (b - y)
    else if (y <= 5800000000000.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 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -2.8e+45) {
		tmp = t_2;
	} else if (y <= 1.55e-90) {
		tmp = t_1;
	} else if (y <= 0.00075) {
		tmp = t / (b - y);
	} else if (y <= 5800000000000.0) {
		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 <= -2.8e+45:
		tmp = t_2
	elif y <= 1.55e-90:
		tmp = t_1
	elif y <= 0.00075:
		tmp = t / (b - y)
	elif y <= 5800000000000.0:
		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 <= -2.8e+45)
		tmp = t_2;
	elseif (y <= 1.55e-90)
		tmp = t_1;
	elseif (y <= 0.00075)
		tmp = Float64(t / Float64(b - y));
	elseif (y <= 5800000000000.0)
		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 <= -2.8e+45)
		tmp = t_2;
	elseif (y <= 1.55e-90)
		tmp = t_1;
	elseif (y <= 0.00075)
		tmp = t / (b - y);
	elseif (y <= 5800000000000.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[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+45], t$95$2, If[LessEqual[y, 1.55e-90], t$95$1, If[LessEqual[y, 0.00075], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5800000000000.0], 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 -2.8 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 5800000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7999999999999999e45 or 5.8e12 < y

    1. Initial program 52.4%

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

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

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

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

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

    if -2.7999999999999999e45 < y < 1.5500000000000001e-90 or 7.5000000000000002e-4 < y < 5.8e12

    1. Initial program 82.3%

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

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

    if 1.5500000000000001e-90 < y < 7.5000000000000002e-4

    1. Initial program 84.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 84.9%

      \[\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 t around inf 47.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+45}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-90}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 0.00075:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 5800000000000:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 52.9% 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 -7 \cdot 10^{+45}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.0205:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 14600000000000:\\ \;\;\;\;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 -7e+45)
     t_2
     (if (<= y 2.7e-75)
       t_1
       (if (<= y 0.0205)
         (/ (- a t) y)
         (if (<= y 14600000000000.0) 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 <= -7e+45) {
		tmp = t_2;
	} else if (y <= 2.7e-75) {
		tmp = t_1;
	} else if (y <= 0.0205) {
		tmp = (a - t) / y;
	} else if (y <= 14600000000000.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 = (t - a) / b
    t_2 = x / (1.0d0 - z)
    if (y <= (-7d+45)) then
        tmp = t_2
    else if (y <= 2.7d-75) then
        tmp = t_1
    else if (y <= 0.0205d0) then
        tmp = (a - t) / y
    else if (y <= 14600000000000.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 = (t - a) / b;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -7e+45) {
		tmp = t_2;
	} else if (y <= 2.7e-75) {
		tmp = t_1;
	} else if (y <= 0.0205) {
		tmp = (a - t) / y;
	} else if (y <= 14600000000000.0) {
		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 <= -7e+45:
		tmp = t_2
	elif y <= 2.7e-75:
		tmp = t_1
	elif y <= 0.0205:
		tmp = (a - t) / y
	elif y <= 14600000000000.0:
		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 <= -7e+45)
		tmp = t_2;
	elseif (y <= 2.7e-75)
		tmp = t_1;
	elseif (y <= 0.0205)
		tmp = Float64(Float64(a - t) / y);
	elseif (y <= 14600000000000.0)
		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 <= -7e+45)
		tmp = t_2;
	elseif (y <= 2.7e-75)
		tmp = t_1;
	elseif (y <= 0.0205)
		tmp = (a - t) / y;
	elseif (y <= 14600000000000.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[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+45], t$95$2, If[LessEqual[y, 2.7e-75], t$95$1, If[LessEqual[y, 0.0205], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 14600000000000.0], 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 -7 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 0.0205:\\
\;\;\;\;\frac{a - t}{y}\\

\mathbf{elif}\;y \leq 14600000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.00000000000000046e45 or 1.46e13 < y

    1. Initial program 52.4%

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

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

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

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

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

    if -7.00000000000000046e45 < y < 2.6999999999999998e-75 or 0.0205000000000000009 < y < 1.46e13

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

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

    if 2.6999999999999998e-75 < y < 0.0205000000000000009

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

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

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

        \[\leadsto \color{blue}{-\frac{t - a}{y}} \]
      2. distribute-neg-frac254.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+45}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-75}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 0.0205:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 14600000000000:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 75.2% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 48.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 80.2%

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

    if -2.2000000000000001e-26 < z < 1.11999999999999998e-4

    1. Initial program 90.1%

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

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

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

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

Alternative 10: 44.5% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8e-41 or 6.1999999999999999e36 < z

    1. Initial program 46.8%

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

      \[\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 t around inf 44.7%

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

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

    if -1.8e-41 < z < 6.1999999999999999e36

    1. Initial program 90.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 41.4%

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

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

Alternative 11: 42.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+83} \lor \neg \left(y \leq 1.02 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.14999999999999997e83 or 1.01999999999999999e61 < y

    1. Initial program 49.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 57.1%

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

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

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

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

    if -1.14999999999999997e83 < y < 1.01999999999999999e61

    1. Initial program 82.9%

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

      \[\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 t around inf 41.1%

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

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

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

Alternative 12: 37.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-9} \lor \neg \left(z \leq 2.3 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.90000000000000006e-9 or 2.3e-5 < z

    1. Initial program 48.0%

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

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

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

    if -1.90000000000000006e-9 < z < 2.3e-5

    1. Initial program 90.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 0 42.2%

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

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

Alternative 13: 26.0% accurate, 17.0× speedup?

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

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

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

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 73.6% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2024071 
(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)))))