Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 67.2% → 90.0%
Time: 16.9s
Alternatives: 18
Speedup: 0.8×

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: 67.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.0% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8e12 or 1.45e31 < z

    1. Initial program 37.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 61.7%

      \[\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+61.7%

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

        \[\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+61.7%

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

        \[\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-frac69.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-sub69.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*95.1%

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

      \[\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 -3.8e12 < z < 1.45e31

    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 x around inf 94.0%

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

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

Alternative 2: 72.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z} + \frac{z}{y} \cdot \frac{a - t}{z + -1}\\ \mathbf{if}\;y \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-93}:\\ \;\;\;\;\left(\frac{t}{b} + \frac{y \cdot x}{z \cdot b}\right) - \frac{a}{b}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+42}:\\ \;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+108}:\\ \;\;\;\;\frac{t - a}{b - 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)) (* (/ z y) (/ (- a t) (+ z -1.0))))))
   (if (<= y -1.42e-98)
     t_1
     (if (<= y 7.6e-93)
       (- (+ (/ t b) (/ (* y x) (* z b))) (/ a b))
       (if (<= y 1.15e+42)
         (/ (+ (* y x) (* z t)) (+ y (* z (- b y))))
         (if (<= y 1.7e+108) (/ (- t a) (- b y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0)));
	double tmp;
	if (y <= -1.42e-98) {
		tmp = t_1;
	} else if (y <= 7.6e-93) {
		tmp = ((t / b) + ((y * x) / (z * b))) - (a / b);
	} else if (y <= 1.15e+42) {
		tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
	} else if (y <= 1.7e+108) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x / (1.0d0 - z)) + ((z / y) * ((a - t) / (z + (-1.0d0))))
    if (y <= (-1.42d-98)) then
        tmp = t_1
    else if (y <= 7.6d-93) then
        tmp = ((t / b) + ((y * x) / (z * b))) - (a / b)
    else if (y <= 1.15d+42) then
        tmp = ((y * x) + (z * t)) / (y + (z * (b - y)))
    else if (y <= 1.7d+108) then
        tmp = (t - a) / (b - y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0)));
	double tmp;
	if (y <= -1.42e-98) {
		tmp = t_1;
	} else if (y <= 7.6e-93) {
		tmp = ((t / b) + ((y * x) / (z * b))) - (a / b);
	} else if (y <= 1.15e+42) {
		tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
	} else if (y <= 1.7e+108) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0)))
	tmp = 0
	if y <= -1.42e-98:
		tmp = t_1
	elif y <= 7.6e-93:
		tmp = ((t / b) + ((y * x) / (z * b))) - (a / b)
	elif y <= 1.15e+42:
		tmp = ((y * x) + (z * t)) / (y + (z * (b - y)))
	elif y <= 1.7e+108:
		tmp = (t - a) / (b - y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(z / y) * Float64(Float64(a - t) / Float64(z + -1.0))))
	tmp = 0.0
	if (y <= -1.42e-98)
		tmp = t_1;
	elseif (y <= 7.6e-93)
		tmp = Float64(Float64(Float64(t / b) + Float64(Float64(y * x) / Float64(z * b))) - Float64(a / b));
	elseif (y <= 1.15e+42)
		tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y))));
	elseif (y <= 1.7e+108)
		tmp = Float64(Float64(t - a) / Float64(b - 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)) + ((z / y) * ((a - t) / (z + -1.0)));
	tmp = 0.0;
	if (y <= -1.42e-98)
		tmp = t_1;
	elseif (y <= 7.6e-93)
		tmp = ((t / b) + ((y * x) / (z * b))) - (a / b);
	elseif (y <= 1.15e+42)
		tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
	elseif (y <= 1.7e+108)
		tmp = (t - a) / (b - y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(z / y), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.42e-98], t$95$1, If[LessEqual[y, 7.6e-93], N[(N[(N[(t / b), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+42], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+108], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+108}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.41999999999999999e-98 or 1.69999999999999998e108 < y

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

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

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

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

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

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

        \[\leadsto \frac{x}{1 - z} + \color{blue}{\frac{z}{y} \cdot \frac{t - a}{1 - z}} \]
    8. Simplified85.4%

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

    if -1.41999999999999999e-98 < y < 7.5999999999999998e-93

    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 x around inf 72.0%

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

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

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

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

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

    if 7.5999999999999998e-93 < y < 1.15e42

    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 a around 0 78.7%

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

    if 1.15e42 < y < 1.69999999999999998e108

    1. Initial program 32.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 70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{-98}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{z}{y} \cdot \frac{a - t}{z + -1}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-93}:\\ \;\;\;\;\left(\frac{t}{b} + \frac{y \cdot x}{z \cdot b}\right) - \frac{a}{b}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+42}:\\ \;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+108}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z} + \frac{z}{y} \cdot \frac{a - t}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 86.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{+23} \lor \neg \left(z \leq 4.5 \cdot 10^{+40}\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 -3e+23) (not (<= z 4.5e+40)))
     (/ (- 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 <= -3e+23) || !(z <= 4.5e+40)) {
		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 <= (-3d+23)) .or. (.not. (z <= 4.5d+40))) 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 <= -3e+23) || !(z <= 4.5e+40)) {
		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 <= -3e+23) or not (z <= 4.5e+40):
		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 <= -3e+23) || !(z <= 4.5e+40))
		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 <= -3e+23) || ~((z <= 4.5e+40)))
		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, -3e+23], N[Not[LessEqual[z, 4.5e+40]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+23} \lor \neg \left(z \leq 4.5 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.0000000000000001e23 or 4.50000000000000032e40 < z

    1. Initial program 37.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 81.5%

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

    if -3.0000000000000001e23 < z < 4.50000000000000032e40

    1. Initial program 89.9%

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

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

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

Alternative 4: 69.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -0.0085:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-280}:\\ \;\;\;\;x + z \cdot \left(\frac{t}{y} + \left(x - \frac{a}{y}\right)\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-188}:\\ \;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\ \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 -0.0085)
     t_1
     (if (<= z -8.4e-280)
       (+ x (* z (+ (/ t y) (- x (/ a y)))))
       (if (<= z 5e-188)
         (/ (* y x) (+ y (* z (- b y))))
         (if (<= z 3.6e-18) (/ (+ (* z (- t a)) (* y x)) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double tmp;
	if (z <= -0.0085) {
		tmp = t_1;
	} else if (z <= -8.4e-280) {
		tmp = x + (z * ((t / y) + (x - (a / y))));
	} else if (z <= 5e-188) {
		tmp = (y * x) / (y + (z * (b - y)));
	} else if (z <= 3.6e-18) {
		tmp = ((z * (t - a)) + (y * x)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    if (z <= (-0.0085d0)) then
        tmp = t_1
    else if (z <= (-8.4d-280)) then
        tmp = x + (z * ((t / y) + (x - (a / y))))
    else if (z <= 5d-188) then
        tmp = (y * x) / (y + (z * (b - y)))
    else if (z <= 3.6d-18) then
        tmp = ((z * (t - a)) + (y * x)) / y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - a) / (b - y);
	double tmp;
	if (z <= -0.0085) {
		tmp = t_1;
	} else if (z <= -8.4e-280) {
		tmp = x + (z * ((t / y) + (x - (a / y))));
	} else if (z <= 5e-188) {
		tmp = (y * x) / (y + (z * (b - y)));
	} else if (z <= 3.6e-18) {
		tmp = ((z * (t - a)) + (y * x)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	tmp = 0
	if z <= -0.0085:
		tmp = t_1
	elif z <= -8.4e-280:
		tmp = x + (z * ((t / y) + (x - (a / y))))
	elif z <= 5e-188:
		tmp = (y * x) / (y + (z * (b - y)))
	elif z <= 3.6e-18:
		tmp = ((z * (t - a)) + (y * x)) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -0.0085)
		tmp = t_1;
	elseif (z <= -8.4e-280)
		tmp = Float64(x + Float64(z * Float64(Float64(t / y) + Float64(x - Float64(a / y)))));
	elseif (z <= 5e-188)
		tmp = Float64(Float64(y * x) / Float64(y + Float64(z * Float64(b - y))));
	elseif (z <= 3.6e-18)
		tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -0.0085)
		tmp = t_1;
	elseif (z <= -8.4e-280)
		tmp = x + (z * ((t / y) + (x - (a / y))));
	elseif (z <= 5e-188)
		tmp = (y * x) / (y + (z * (b - y)));
	elseif (z <= 3.6e-18)
		tmp = ((z * (t - a)) + (y * x)) / y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0085], t$95$1, If[LessEqual[z, -8.4e-280], N[(x + N[(z * N[(N[(t / y), $MachinePrecision] + N[(x - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-188], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-18], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.0085:\\
\;\;\;\;t\_1\\

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

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

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

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


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

    1. Initial program 44.5%

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

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

    if -0.0085000000000000006 < z < -8.40000000000000003e-280

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

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

        \[\leadsto \frac{z \cdot t}{y \cdot \left(1 + \color{blue}{\left(-z\right)}\right)} \]
      2. unsub-neg16.6%

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

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

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

    if -8.40000000000000003e-280 < z < 5.0000000000000001e-188

    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 inf 82.8%

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

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

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

    if 5.0000000000000001e-188 < z < 3.6000000000000001e-18

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0085:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-280}:\\ \;\;\;\;x + z \cdot \left(\frac{t}{y} + \left(x - \frac{a}{y}\right)\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-188}:\\ \;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 53.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-94}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-89}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 6.2:\\ \;\;\;\;\frac{t}{b - 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 -4.2e+52)
     t_1
     (if (<= y -1.2e-12)
       (/ (- a t) y)
       (if (<= y -1.9e-94)
         t_1
         (if (<= y 5.5e-89)
           (/ (- t a) b)
           (if (<= y 6.2) (/ t (- b 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 <= -4.2e+52) {
		tmp = t_1;
	} else if (y <= -1.2e-12) {
		tmp = (a - t) / y;
	} else if (y <= -1.9e-94) {
		tmp = t_1;
	} else if (y <= 5.5e-89) {
		tmp = (t - a) / b;
	} else if (y <= 6.2) {
		tmp = t / (b - y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (1.0d0 - z)
    if (y <= (-4.2d+52)) then
        tmp = t_1
    else if (y <= (-1.2d-12)) then
        tmp = (a - t) / y
    else if (y <= (-1.9d-94)) then
        tmp = t_1
    else if (y <= 5.5d-89) then
        tmp = (t - a) / b
    else if (y <= 6.2d0) then
        tmp = t / (b - y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (1.0 - z);
	double tmp;
	if (y <= -4.2e+52) {
		tmp = t_1;
	} else if (y <= -1.2e-12) {
		tmp = (a - t) / y;
	} else if (y <= -1.9e-94) {
		tmp = t_1;
	} else if (y <= 5.5e-89) {
		tmp = (t - a) / b;
	} else if (y <= 6.2) {
		tmp = t / (b - 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 <= -4.2e+52:
		tmp = t_1
	elif y <= -1.2e-12:
		tmp = (a - t) / y
	elif y <= -1.9e-94:
		tmp = t_1
	elif y <= 5.5e-89:
		tmp = (t - a) / b
	elif y <= 6.2:
		tmp = t / (b - 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 <= -4.2e+52)
		tmp = t_1;
	elseif (y <= -1.2e-12)
		tmp = Float64(Float64(a - t) / y);
	elseif (y <= -1.9e-94)
		tmp = t_1;
	elseif (y <= 5.5e-89)
		tmp = Float64(Float64(t - a) / b);
	elseif (y <= 6.2)
		tmp = Float64(t / Float64(b - 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 <= -4.2e+52)
		tmp = t_1;
	elseif (y <= -1.2e-12)
		tmp = (a - t) / y;
	elseif (y <= -1.9e-94)
		tmp = t_1;
	elseif (y <= 5.5e-89)
		tmp = (t - a) / b;
	elseif (y <= 6.2)
		tmp = t / (b - 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, -4.2e+52], t$95$1, If[LessEqual[y, -1.2e-12], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.9e-94], t$95$1, If[LessEqual[y, 5.5e-89], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 6.2], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{a - t}{y}\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.2e52 or -1.19999999999999994e-12 < y < -1.9e-94 or 6.20000000000000018 < y

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

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

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

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

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

    if -4.2e52 < y < -1.19999999999999994e-12

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

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

        \[\leadsto \frac{z \cdot t}{y \cdot \left(1 + \color{blue}{\left(-z\right)}\right)} \]
      2. unsub-neg10.7%

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

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

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

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

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

    if -1.9e-94 < y < 5.50000000000000012e-89

    1. Initial program 83.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 71.8%

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

    if 5.50000000000000012e-89 < y < 6.20000000000000018

    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 t around inf 43.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-94}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-89}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 6.2:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1999999999999999e25 or 2.9000000000000001e28 < z

    1. Initial program 39.4%

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

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

    if -3.1999999999999999e25 < z < 2.9000000000000001e28

    1. Initial program 90.9%

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

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

Alternative 7: 44.5% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 4.9 \cdot 10^{+210} \lor \neg \left(z \leq 1.35 \cdot 10^{+264}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0499999999999999e-14 or 0.066000000000000003 < z < 4.90000000000000007e210 or 1.3500000000000001e264 < z

    1. Initial program 47.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 25.3%

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

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

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

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

    if -1.0499999999999999e-14 < z < 0.066000000000000003

    1. Initial program 92.0%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x}}{y \cdot \left(1 - z\right)} \]
    9. Taylor expanded in z around 0 57.6%

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

    if 4.90000000000000007e210 < z < 1.3500000000000001e264

    1. Initial program 24.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 16.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    9. Simplified68.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-14}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq 0.066:\\ \;\;\;\;x + z \cdot x\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+210} \lor \neg \left(z \leq 1.35 \cdot 10^{+264}\right):\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0800000000000001e23 or 2.25e16 < z

    1. Initial program 39.4%

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

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

    if -1.0800000000000001e23 < z < 2.25e16

    1. Initial program 90.9%

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

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

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

Alternative 9: 63.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -20 or 4.79999999999999988e-18 < z

    1. Initial program 44.1%

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

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

    if -20 < z < 4.79999999999999988e-18

    1. Initial program 92.8%

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

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

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

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

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

Alternative 10: 70.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1400000000000001e-14 or 2.1e-18 < 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 74.1%

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

    if -1.1400000000000001e-14 < z < 2.1e-18

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

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

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

Alternative 11: 36.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+90}:\\
\;\;\;\;\frac{t}{-y}\\

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

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

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


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

    1. Initial program 27.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 16.9%

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

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

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

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

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

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

      \[\leadsto \frac{z \cdot t}{\color{blue}{y \cdot \left(1 - z\right)}} \]
    9. Taylor expanded in z around inf 30.6%

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

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

        \[\leadsto \frac{\color{blue}{-t}}{y} \]
    11. Simplified30.6%

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

    if -3.6e90 < z < -1.21999999999999994e-14

    1. Initial program 65.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 38.2%

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

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

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

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

    if -1.21999999999999994e-14 < z < 4.4e8

    1. Initial program 92.0%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x}}{y \cdot \left(1 - z\right)} \]
    9. Taylor expanded in z around 0 57.1%

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

    if 4.4e8 < z

    1. Initial program 50.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    9. Simplified35.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+90}:\\ \;\;\;\;\frac{t}{-y}\\ \mathbf{elif}\;z \leq -1.22 \cdot 10^{-14}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 440000000:\\ \;\;\;\;x + z \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 53.8% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.44999999999999998e-94 or 6.79999999999999982 < y

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

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

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

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

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

    if -1.44999999999999998e-94 < y < 4.80000000000000032e-89

    1. Initial program 83.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 71.8%

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

    if 4.80000000000000032e-89 < y < 6.79999999999999982

    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 t around inf 43.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{-94}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-89}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 6.8:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 37.8% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-17}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.0000000000000005e121 or 1.3999999999999999e-17 < z

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

    if -6.0000000000000005e121 < z < -9.99999999999999999e-15

    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 t around inf 33.7%

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

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

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

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

    if -9.99999999999999999e-15 < z < 1.3999999999999999e-17

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+121}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-14}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 36.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+91}:\\
\;\;\;\;\frac{t}{-y}\\

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{-17}:\\
\;\;\;\;x\\

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


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

    1. Initial program 27.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 16.9%

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

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

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

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

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

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

      \[\leadsto \frac{z \cdot t}{\color{blue}{y \cdot \left(1 - z\right)}} \]
    9. Taylor expanded in z around inf 30.6%

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

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

        \[\leadsto \frac{\color{blue}{-t}}{y} \]
    11. Simplified30.6%

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

    if -2.10000000000000008e91 < z < -9.70000000000000032e-14

    1. Initial program 65.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 38.2%

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

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

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

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

    if -9.70000000000000032e-14 < z < 3.3999999999999998e-17

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

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

    if 3.3999999999999998e-17 < z

    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 x around inf 50.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)} \]
    4. Taylor expanded in b around inf 44.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{-y}\\ \mathbf{elif}\;z \leq -9.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-17}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 64.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 41.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 79.1%

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

    if -64 < z < 200

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

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

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

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

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

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

Alternative 16: 40.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+192} \lor \neg \left(t \leq 1.3 \cdot 10^{+114}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.00000000000000004e192 or 1.3e114 < t

    1. Initial program 58.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 49.5%

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

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

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

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

    if -1.00000000000000004e192 < t < 1.3e114

    1. Initial program 70.2%

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

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

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

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

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

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

Alternative 17: 37.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-13} \lor \neg \left(z \leq 1.25 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.09999999999999989e-13 or 1.25000000000000009e-18 < 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 t around inf 25.5%

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

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

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

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

    if -2.09999999999999989e-13 < z < 1.25000000000000009e-18

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

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

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

Alternative 18: 25.8% accurate, 17.0× speedup?

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

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

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 74.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 2024077 
(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)))))