Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.1% → 87.4%
Time: 17.9s
Alternatives: 16
Speedup: 1.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

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

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+44}:\\ \;\;\;\;t_1 - \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{-238}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right) + z \cdot b}\\ \mathbf{elif}\;z \leq 6.7 \cdot 10^{-9}:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- t a) (- b y))))
   (if (<= z -1e+44)
     (- t_1 (/ x z))
     (if (<= z -3.05e-238)
       (/ (+ (* x y) (* z (- t a))) (+ (* y (- 1.0 z)) (* z b)))
       (if (<= z 6.7e-9)
         (- x (/ (* z (- a t)) (+ y (* z (- b y)))))
         (+
          t_1
          (/
           (+ (/ y (/ (- b y) x)) (/ (- a t) (/ (pow (- b y) 2.0) y)))
           z)))))))
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 <= -1e+44) {
		tmp = t_1 - (x / z);
	} else if (z <= -3.05e-238) {
		tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
	} else if (z <= 6.7e-9) {
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
	} else {
		tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (pow((b - y), 2.0) / y))) / 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) :: t_1
    real(8) :: tmp
    t_1 = (t - a) / (b - y)
    if (z <= (-1d+44)) then
        tmp = t_1 - (x / z)
    else if (z <= (-3.05d-238)) then
        tmp = ((x * y) + (z * (t - a))) / ((y * (1.0d0 - z)) + (z * b))
    else if (z <= 6.7d-9) then
        tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
    else
        tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ** 2.0d0) / y))) / z)
    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 <= -1e+44) {
		tmp = t_1 - (x / z);
	} else if (z <= -3.05e-238) {
		tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
	} else if (z <= 6.7e-9) {
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
	} else {
		tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - a) / (b - y)
	tmp = 0
	if z <= -1e+44:
		tmp = t_1 - (x / z)
	elif z <= -3.05e-238:
		tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b))
	elif z <= 6.7e-9:
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
	else:
		tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -1e+44)
		tmp = Float64(t_1 - Float64(x / z));
	elseif (z <= -3.05e-238)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(Float64(y * Float64(1.0 - z)) + Float64(z * b)));
	elseif (z <= 6.7e-9)
		tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / Float64(y + Float64(z * Float64(b - y)))));
	else
		tmp = Float64(t_1 + Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z));
	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 <= -1e+44)
		tmp = t_1 - (x / z);
	elseif (z <= -3.05e-238)
		tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
	elseif (z <= 6.7e-9)
		tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
	else
		tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z);
	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, -1e+44], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.05e-238], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.7e-9], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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

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


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

    1. Initial program 47.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/89.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-189.3%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified89.3%

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

    if -1.0000000000000001e44 < z < -3.05e-238

    1. Initial program 94.9%

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

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

    if -3.05e-238 < z < 6.69999999999999961e-9

    1. Initial program 79.6%

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

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

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

    if 6.69999999999999961e-9 < z

    1. Initial program 44.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+44}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{-238}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right) + z \cdot b}\\ \mathbf{elif}\;z \leq 6.7 \cdot 10^{-9}:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z}\\ \end{array} \]

Alternative 2: 86.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.36 \cdot 10^{-263}:\\
\;\;\;\;\frac{x \cdot y + t_3}{y \cdot \left(1 - z\right) + z \cdot b}\\

\mathbf{elif}\;z \leq 3.35 \cdot 10^{+50}:\\
\;\;\;\;\frac{t_3}{t_1} + \frac{y}{\frac{t_1}{x}}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.29999999999999994e49 or 3.3499999999999999e50 < z

    1. Initial program 41.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/91.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-191.3%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified91.3%

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

    if -1.29999999999999994e49 < z < 1.3599999999999999e-263

    1. Initial program 93.7%

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

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

    if 1.3599999999999999e-263 < z < 3.3499999999999999e50

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+49}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{-263}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right) + z \cdot b}\\ \mathbf{elif}\;z \leq 3.35 \cdot 10^{+50}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} + \frac{y}{\frac{y + z \cdot \left(b - y\right)}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]

Alternative 3: 85.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 3800000000000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{t_2}\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+61}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.79999999999999961e42 or 1.6499999999999999e61 < z

    1. Initial program 41.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/91.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-191.3%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified91.3%

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

    if -5.79999999999999961e42 < z < -8.0000000000000004e-236

    1. Initial program 94.9%

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

    if -8.0000000000000004e-236 < z < 3.8e12

    1. Initial program 78.9%

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

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

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

    if 3.8e12 < z < 1.6499999999999999e61

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b - y} + \color{blue}{\frac{y}{b - y} \cdot \frac{x}{z}} \]
      3. *-commutative95.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+42}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-236}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3800000000000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+61}:\\ \;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]

Alternative 4: 84.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\ t_2 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-237}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_2}\\ \mathbf{elif}\;z \leq 960000000000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{t_2}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+65}:\\ \;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - 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)) (/ x z))) (t_2 (+ y (* z (- b y)))))
   (if (<= z -2.4e+46)
     t_1
     (if (<= z -2.7e-237)
       (/ (+ (* x y) (- (* z t) (* z a))) t_2)
       (if (<= z 960000000000.0)
         (- x (/ (* z (- a t)) t_2))
         (if (<= z 1.06e+65)
           (+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t - a) / (b - y)) - (x / z);
	double t_2 = y + (z * (b - y));
	double tmp;
	if (z <= -2.4e+46) {
		tmp = t_1;
	} else if (z <= -2.7e-237) {
		tmp = ((x * y) + ((z * t) - (z * a))) / t_2;
	} else if (z <= 960000000000.0) {
		tmp = x - ((z * (a - t)) / t_2);
	} else if (z <= 1.06e+65) {
		tmp = (t / (b - y)) + ((x / z) * (y / (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) :: t_2
    real(8) :: tmp
    t_1 = ((t - a) / (b - y)) - (x / z)
    t_2 = y + (z * (b - y))
    if (z <= (-2.4d+46)) then
        tmp = t_1
    else if (z <= (-2.7d-237)) then
        tmp = ((x * y) + ((z * t) - (z * a))) / t_2
    else if (z <= 960000000000.0d0) then
        tmp = x - ((z * (a - t)) / t_2)
    else if (z <= 1.06d+65) then
        tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t - a) / (b - y)) - (x / z);
	double t_2 = y + (z * (b - y));
	double tmp;
	if (z <= -2.4e+46) {
		tmp = t_1;
	} else if (z <= -2.7e-237) {
		tmp = ((x * y) + ((z * t) - (z * a))) / t_2;
	} else if (z <= 960000000000.0) {
		tmp = x - ((z * (a - t)) / t_2);
	} else if (z <= 1.06e+65) {
		tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((t - a) / (b - y)) - (x / z)
	t_2 = y + (z * (b - y))
	tmp = 0
	if z <= -2.4e+46:
		tmp = t_1
	elif z <= -2.7e-237:
		tmp = ((x * y) + ((z * t) - (z * a))) / t_2
	elif z <= 960000000000.0:
		tmp = x - ((z * (a - t)) / t_2)
	elif z <= 1.06e+65:
		tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z))
	t_2 = Float64(y + Float64(z * Float64(b - y)))
	tmp = 0.0
	if (z <= -2.4e+46)
		tmp = t_1;
	elseif (z <= -2.7e-237)
		tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_2);
	elseif (z <= 960000000000.0)
		tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / t_2));
	elseif (z <= 1.06e+65)
		tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((t - a) / (b - y)) - (x / z);
	t_2 = y + (z * (b - y));
	tmp = 0.0;
	if (z <= -2.4e+46)
		tmp = t_1;
	elseif (z <= -2.7e-237)
		tmp = ((x * y) + ((z * t) - (z * a))) / t_2;
	elseif (z <= 960000000000.0)
		tmp = x - ((z * (a - t)) / t_2);
	elseif (z <= 1.06e+65)
		tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+46], t$95$1, If[LessEqual[z, -2.7e-237], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 960000000000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+65], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 960000000000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{t_2}\\

\mathbf{elif}\;z \leq 1.06 \cdot 10^{+65}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.40000000000000008e46 or 1.06e65 < z

    1. Initial program 41.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/91.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-191.3%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified91.3%

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

    if -2.40000000000000008e46 < z < -2.69999999999999984e-237

    1. Initial program 94.9%

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

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

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(z \cdot t + z \cdot \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)} \]
    3. Applied egg-rr94.9%

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

    if -2.69999999999999984e-237 < z < 9.6e11

    1. Initial program 78.9%

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

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

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

    if 9.6e11 < z < 1.06e65

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b - y} + \color{blue}{\frac{y}{b - y} \cdot \frac{x}{z}} \]
      3. *-commutative95.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+46}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-237}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 960000000000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+65}:\\ \;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]

Alternative 5: 84.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.20000000000000006e50 or 1.8e53 < z

    1. Initial program 41.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/91.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-191.3%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified91.3%

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

    if -6.20000000000000006e50 < z < -6.3999999999999998e-239

    1. Initial program 94.9%

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

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

    if -6.3999999999999998e-239 < z < 9.6e11

    1. Initial program 78.9%

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

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

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

    if 9.6e11 < z < 1.8e53

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b - y} + \color{blue}{\frac{y}{b - y} \cdot \frac{x}{z}} \]
      3. *-commutative95.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+50}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-239}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right) + z \cdot b}\\ \mathbf{elif}\;z \leq 960000000000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+53}:\\ \;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]

Alternative 6: 75.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -8 \cdot 10^{-22}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.0000000000000004e-22 or 5.8000000000000004e53 < z

    1. Initial program 44.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/88.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-188.3%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified88.3%

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

    if -8.0000000000000004e-22 < z < 2.24999999999999987e-23

    1. Initial program 86.0%

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

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

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

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

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

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

    if 2.24999999999999987e-23 < z < 5.8000000000000004e53

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b - y} + \color{blue}{\frac{y}{b - y} \cdot \frac{x}{z}} \]
      3. *-commutative86.5%

        \[\leadsto \frac{t}{b - y} + \color{blue}{\frac{x}{z} \cdot \frac{y}{b - y}} \]
    8. Simplified86.5%

      \[\leadsto \color{blue}{\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-22}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+53}:\\ \;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]

Alternative 7: 83.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+63}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05e13 or 3.3000000000000002e63 < z

    1. Initial program 42.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/89.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-189.7%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified89.7%

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

    if -1.05e13 < z < 4.1e12

    1. Initial program 86.0%

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

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

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

    if 4.1e12 < z < 3.3000000000000002e63

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b - y} + \color{blue}{\frac{y}{b - y} \cdot \frac{x}{z}} \]
      3. *-commutative95.4%

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

      \[\leadsto \color{blue}{\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -10500000000000:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{elif}\;z \leq 4100000000000:\\ \;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+63}:\\ \;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \end{array} \]

Alternative 8: 31.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+252}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+58}:\\ \;\;\;\;\frac{-x}{z}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-281}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{-285}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-18}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.2e+252)
   x
   (if (<= y -1.9e+58)
     (/ (- x) z)
     (if (<= y -3.6e-30)
       x
       (if (<= y -1.02e-281)
         (/ t b)
         (if (<= y 5.9e-285) (/ (- a) b) (if (<= y 9e-18) (/ t b) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.2e+252) {
		tmp = x;
	} else if (y <= -1.9e+58) {
		tmp = -x / z;
	} else if (y <= -3.6e-30) {
		tmp = x;
	} else if (y <= -1.02e-281) {
		tmp = t / b;
	} else if (y <= 5.9e-285) {
		tmp = -a / b;
	} else if (y <= 9e-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 (y <= (-1.2d+252)) then
        tmp = x
    else if (y <= (-1.9d+58)) then
        tmp = -x / z
    else if (y <= (-3.6d-30)) then
        tmp = x
    else if (y <= (-1.02d-281)) then
        tmp = t / b
    else if (y <= 5.9d-285) then
        tmp = -a / b
    else if (y <= 9d-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 (y <= -1.2e+252) {
		tmp = x;
	} else if (y <= -1.9e+58) {
		tmp = -x / z;
	} else if (y <= -3.6e-30) {
		tmp = x;
	} else if (y <= -1.02e-281) {
		tmp = t / b;
	} else if (y <= 5.9e-285) {
		tmp = -a / b;
	} else if (y <= 9e-18) {
		tmp = t / b;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.2e+252:
		tmp = x
	elif y <= -1.9e+58:
		tmp = -x / z
	elif y <= -3.6e-30:
		tmp = x
	elif y <= -1.02e-281:
		tmp = t / b
	elif y <= 5.9e-285:
		tmp = -a / b
	elif y <= 9e-18:
		tmp = t / b
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.2e+252)
		tmp = x;
	elseif (y <= -1.9e+58)
		tmp = Float64(Float64(-x) / z);
	elseif (y <= -3.6e-30)
		tmp = x;
	elseif (y <= -1.02e-281)
		tmp = Float64(t / b);
	elseif (y <= 5.9e-285)
		tmp = Float64(Float64(-a) / b);
	elseif (y <= 9e-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 (y <= -1.2e+252)
		tmp = x;
	elseif (y <= -1.9e+58)
		tmp = -x / z;
	elseif (y <= -3.6e-30)
		tmp = x;
	elseif (y <= -1.02e-281)
		tmp = t / b;
	elseif (y <= 5.9e-285)
		tmp = -a / b;
	elseif (y <= 9e-18)
		tmp = t / b;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e+252], x, If[LessEqual[y, -1.9e+58], N[((-x) / z), $MachinePrecision], If[LessEqual[y, -3.6e-30], x, If[LessEqual[y, -1.02e-281], N[(t / b), $MachinePrecision], If[LessEqual[y, 5.9e-285], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 9e-18], N[(t / b), $MachinePrecision], x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+252}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{+58}:\\
\;\;\;\;\frac{-x}{z}\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.02 \cdot 10^{-281}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;y \leq 5.9 \cdot 10^{-285}:\\
\;\;\;\;\frac{-a}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.2e252 or -1.8999999999999999e58 < y < -3.6000000000000003e-30 or 8.99999999999999987e-18 < y

    1. Initial program 57.0%

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

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

    if -1.2e252 < y < -1.8999999999999999e58

    1. Initial program 46.7%

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

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

        \[\leadsto \frac{x}{\color{blue}{1 + -1 \cdot z}} \]
      2. mul-1-neg43.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    7. Simplified33.8%

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

    if -3.6000000000000003e-30 < y < -1.01999999999999996e-281 or 5.89999999999999963e-285 < y < 8.99999999999999987e-18

    1. Initial program 83.5%

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

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

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

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

    if -1.01999999999999996e-281 < y < 5.89999999999999963e-285

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    7. Simplified67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+252}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+58}:\\ \;\;\;\;\frac{-x}{z}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-281}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{-285}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-18}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 75.6% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.0000000000000004e-22 or 2.69999999999999985e-23 < z

    1. Initial program 48.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} + \frac{t - a}{b - y} \]
    7. Step-by-step derivation
      1. associate-*r/84.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} + \frac{t - a}{b - y} \]
      2. neg-mul-184.7%

        \[\leadsto \frac{\color{blue}{-x}}{z} + \frac{t - a}{b - y} \]
    8. Simplified84.7%

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

    if -8.0000000000000004e-22 < z < 2.69999999999999985e-23

    1. Initial program 86.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-22} \lor \neg \left(z \leq 2.7 \cdot 10^{-23}\right):\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\ \end{array} \]

Alternative 10: 42.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-280}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-287}:\\
\;\;\;\;\frac{-a}{b}\\

\mathbf{elif}\;y \leq 2.25 \cdot 10^{-20}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.1999999999999995e-32 or 2.2500000000000001e-20 < y

    1. Initial program 54.9%

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

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

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

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

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

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

    if -8.1999999999999995e-32 < y < -5.2e-280 or 5.7999999999999996e-287 < y < 2.2500000000000001e-20

    1. Initial program 83.5%

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

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

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

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

    if -5.2e-280 < y < 5.7999999999999996e-287

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    7. Simplified67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-280}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-287}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{-20}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 11: 74.0% accurate, 1.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.20000000000000059e-23 or 2.4499999999999999e-23 < z

    1. Initial program 48.7%

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

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

    if -8.20000000000000059e-23 < z < 2.4499999999999999e-23

    1. Initial program 86.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-23} \lor \neg \left(z \leq 2.45 \cdot 10^{-23}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\ \end{array} \]

Alternative 12: 35.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-31}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -6.6 \cdot 10^{-282}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;y \leq 1.85 \cdot 10^{-285}:\\
\;\;\;\;\frac{-a}{b}\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.8000000000000002e-31 or 2.7e-20 < y

    1. Initial program 54.9%

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

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

    if -6.8000000000000002e-31 < y < -6.6e-282 or 1.8499999999999999e-285 < y < 2.7e-20

    1. Initial program 83.5%

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

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

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

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

    if -6.6e-282 < y < 1.8499999999999999e-285

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    7. Simplified67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{-282}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-285}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 60.1% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.2e11 or 5.20000000000000014e45 < y

    1. Initial program 52.2%

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

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

        \[\leadsto \frac{x}{\color{blue}{1 + -1 \cdot z}} \]
      2. mul-1-neg60.3%

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

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

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

    if -6.2e11 < y < 5.20000000000000014e45

    1. Initial program 81.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -620000000000 \lor \neg \left(y \leq 5.2 \cdot 10^{+45}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]

Alternative 14: 54.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-29} \lor \neg \left(y \leq 4.5 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.99999999999999989e-29 or 4.49999999999999994e-18 < y

    1. Initial program 54.9%

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

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

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

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

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

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

    if -1.99999999999999989e-29 < y < 4.49999999999999994e-18

    1. Initial program 83.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{-29} \lor \neg \left(y \leq 4.5 \cdot 10^{-18}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]

Alternative 15: 34.8% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-29}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5000000000000001e-29 or 7.5999999999999996e-18 < y

    1. Initial program 54.9%

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

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

    if -1.5000000000000001e-29 < y < 7.5999999999999996e-18

    1. Initial program 83.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 25.4% 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 67.5%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification27.5%

    \[\leadsto x \]

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

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

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