Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.4% → 90.8%
Time: 21.7s
Alternatives: 24
Speedup: 1.1×

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

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

Initial Program: 66.4% accurate, 1.0× speedup?

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

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

Alternative 1: 90.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+283}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 35.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2e259 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.9999999999999998e-308 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.0000000000000004e283

    1. Initial program 99.6%

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

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

    1. Initial program 20.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 83.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. +-commutative83.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+83.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. Simplified94.3%

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

    if 5.0000000000000004e283 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 6.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 38.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. associate--l+38.2%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg38.2%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--38.2%

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

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

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

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

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

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

Alternative 2: 91.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -250000000000 \lor \neg \left(z \leq 23000000\right):\\ \;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} - \left(\left(\frac{a}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\right) - \frac{t}{b - y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -250000000000.0) (not (<= z 23000000.0)))
   (-
    (* (/ y (- b y)) (/ x z))
    (-
     (- (/ a (- b y)) (* (/ y (pow (- b y) 2.0)) (/ (- a t) z)))
     (/ t (- b y))))
   (/ (fma x y (* z (- t a))) (fma z (- b y) y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -250000000000.0) || !(z <= 23000000.0)) {
		tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / pow((b - y), 2.0)) * ((a - t) / z))) - (t / (b - y)));
	} else {
		tmp = fma(x, y, (z * (t - a))) / fma(z, (b - y), y);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -250000000000.0) || !(z <= 23000000.0))
		tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) - Float64(Float64(Float64(a / Float64(b - y)) - Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(Float64(a - t) / z))) - Float64(t / Float64(b - y))));
	else
		tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / fma(z, Float64(b - y), y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -250000000000.0], N[Not[LessEqual[z, 23000000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -250000000000 \lor \neg \left(z \leq 23000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} - \left(\left(\frac{a}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\right) - \frac{t}{b - y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5e11 or 2.3e7 < z

    1. Initial program 39.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.3%

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

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

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

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

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

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

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

    if -2.5e11 < z < 2.3e7

    1. Initial program 89.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -250000000000 \lor \neg \left(z \leq 23000000\right):\\ \;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} - \left(\left(\frac{a}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\right) - \frac{t}{b - y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \end{array} \]

Alternative 3: 91.1% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3950000000 \lor \neg \left(z \leq 1350000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} - \left(\left(\frac{a}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\right) - \frac{t}{b - y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.95e9 or 1.35e6 < z

    1. Initial program 39.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.3%

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

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

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

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

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

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

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

    if -3.95e9 < z < 1.35e6

    1. Initial program 89.4%

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

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

Alternative 4: 71.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.20000000000000019e-6

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

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

    if -5.20000000000000019e-6 < z < -1.3000000000000001e-270 or 3.7999999999999996e-183 < z < 1.2e-94

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3000000000000001e-270 < z < 3.7999999999999996e-183

    1. Initial program 91.2%

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

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

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

    if 1.2e-94 < z < 1.26e16

    1. Initial program 90.4%

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

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

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

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

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

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

    if 1.26e16 < z

    1. Initial program 38.1%

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

      \[\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. associate--l+70.3%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg70.3%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--70.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-270}:\\ \;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-183}:\\ \;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\ \;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+16}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \end{array} \]

Alternative 5: 62.7% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -2.65 \cdot 10^{-275}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-79}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.50000000000000019e-6

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

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

    if -7.50000000000000019e-6 < z < -9.59999999999999932e-164

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv53.0%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr53.0%

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

    if -9.59999999999999932e-164 < z < -2.64999999999999993e-275 or 8.7999999999999999e-183 < z < 4.3999999999999998e-79

    1. Initial program 92.1%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y - a \cdot z}}{y + z \cdot b} \]
      4. *-commutative70.6%

        \[\leadsto \frac{\color{blue}{y \cdot x} - a \cdot z}{y + z \cdot b} \]
    5. Simplified70.6%

      \[\leadsto \frac{\color{blue}{y \cdot x - a \cdot z}}{y + z \cdot b} \]
    6. Taylor expanded in b around 0 60.7%

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

    if -2.64999999999999993e-275 < z < 8.7999999999999999e-183

    1. Initial program 90.7%

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

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

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

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

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

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

    if 4.3999999999999998e-79 < z

    1. Initial program 49.9%

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

      \[\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. associate--l+67.6%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg67.6%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--67.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-164}:\\ \;\;\;\;x \cdot \frac{1}{1 - z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-275}:\\ \;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-183}:\\ \;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-79}:\\ \;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \end{array} \]

Alternative 6: 85.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+33} \lor \neg \left(z \leq 1.2 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{t}{b - y} - \left(\frac{x}{z} + \frac{a}{b - y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.29999999999999976e33 or 1.2e19 < z

    1. Initial program 35.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 64.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. associate--l+64.1%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg64.1%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--64.1%

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

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

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

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

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

    if -3.29999999999999976e33 < z < 1.2e19

    1. Initial program 90.0%

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

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

Alternative 7: 61.2% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{-122}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-26}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+19}:\\
\;\;\;\;\frac{z}{y} \cdot \frac{a}{z + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.29999999999999989e-4 or 3.1e19 < z

    1. Initial program 40.3%

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

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

    if -1.29999999999999989e-4 < z < -4.6999999999999999e-169

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv53.0%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr53.0%

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

    if -4.6999999999999999e-169 < z < 7.0000000000000003e-122

    1. Initial program 91.7%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y - a \cdot z}}{y + z \cdot b} \]
      4. *-commutative75.5%

        \[\leadsto \frac{\color{blue}{y \cdot x} - a \cdot z}{y + z \cdot b} \]
    5. Simplified75.5%

      \[\leadsto \frac{\color{blue}{y \cdot x - a \cdot z}}{y + z \cdot b} \]
    6. Taylor expanded in b around 0 60.5%

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

    if 7.0000000000000003e-122 < z < 4.0000000000000002e-26

    1. Initial program 84.9%

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

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

      \[\leadsto \frac{\color{blue}{t \cdot z}}{y + z \cdot b} \]

    if 4.0000000000000002e-26 < z < 3.1e19

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{z - 1} \cdot \frac{z}{y}} \]
      2. sub-neg55.7%

        \[\leadsto \frac{a}{\color{blue}{z + \left(-1\right)}} \cdot \frac{z}{y} \]
      3. metadata-eval55.7%

        \[\leadsto \frac{a}{z + \color{blue}{-1}} \cdot \frac{z}{y} \]
      4. +-commutative55.7%

        \[\leadsto \frac{a}{\color{blue}{-1 + z}} \cdot \frac{z}{y} \]
    10. Simplified55.7%

      \[\leadsto \color{blue}{\frac{a}{-1 + z} \cdot \frac{z}{y}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification66.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00013:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-169}:\\ \;\;\;\;x \cdot \frac{1}{1 - z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-122}:\\ \;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-26}:\\ \;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+19}:\\ \;\;\;\;\frac{z}{y} \cdot \frac{a}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]

Alternative 8: 71.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00033:\\
\;\;\;\;\frac{t - a}{b - y}\\

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

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

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


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

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

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

    if -3.3e-4 < z < 1.2e-94

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e-94 < z < 1.85e15

    1. Initial program 90.4%

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

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

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

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

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

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

    if 1.85e15 < z

    1. Initial program 38.1%

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

      \[\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. associate--l+70.3%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg70.3%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--70.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00033:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\ \;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \end{array} \]

Alternative 9: 84.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.49999999999999989e30 or 50 < z

    1. Initial program 37.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 64.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. associate--l+64.4%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg64.4%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--64.4%

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

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

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

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

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

    if -1.49999999999999989e30 < z < 50

    1. Initial program 89.7%

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

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

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

Alternative 10: 82.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+17}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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

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


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

    1. Initial program 36.5%

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

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

    if -1.3e17 < z < 7.29999999999999982

    1. Initial program 89.4%

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

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

    if 7.29999999999999982 < z

    1. Initial program 42.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 70.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. associate--l+70.4%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg70.4%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--70.4%

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

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

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

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

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

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

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

Alternative 11: 39.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ t_2 := \frac{t}{b - y}\\ \mathbf{if}\;t \leq -2.55 \cdot 10^{+151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9 \cdot 10^{+49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-296}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.62 \cdot 10^{-124}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;t \leq 210000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ t (- b y))))
   (if (<= t -2.55e+151)
     t_2
     (if (<= t -5e+74)
       t_1
       (if (<= t -9e+49)
         t_2
         (if (<= t -3.4e-296)
           t_1
           (if (<= t 1.62e-124)
             (- (/ a b))
             (if (<= t 210000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (1.0 - z);
	double t_2 = t / (b - y);
	double tmp;
	if (t <= -2.55e+151) {
		tmp = t_2;
	} else if (t <= -5e+74) {
		tmp = t_1;
	} else if (t <= -9e+49) {
		tmp = t_2;
	} else if (t <= -3.4e-296) {
		tmp = t_1;
	} else if (t <= 1.62e-124) {
		tmp = -(a / b);
	} else if (t <= 210000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / (1.0d0 - z)
    t_2 = t / (b - y)
    if (t <= (-2.55d+151)) then
        tmp = t_2
    else if (t <= (-5d+74)) then
        tmp = t_1
    else if (t <= (-9d+49)) then
        tmp = t_2
    else if (t <= (-3.4d-296)) then
        tmp = t_1
    else if (t <= 1.62d-124) then
        tmp = -(a / b)
    else if (t <= 210000000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (1.0 - z);
	double t_2 = t / (b - y);
	double tmp;
	if (t <= -2.55e+151) {
		tmp = t_2;
	} else if (t <= -5e+74) {
		tmp = t_1;
	} else if (t <= -9e+49) {
		tmp = t_2;
	} else if (t <= -3.4e-296) {
		tmp = t_1;
	} else if (t <= 1.62e-124) {
		tmp = -(a / b);
	} else if (t <= 210000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (1.0 - z)
	t_2 = t / (b - y)
	tmp = 0
	if t <= -2.55e+151:
		tmp = t_2
	elif t <= -5e+74:
		tmp = t_1
	elif t <= -9e+49:
		tmp = t_2
	elif t <= -3.4e-296:
		tmp = t_1
	elif t <= 1.62e-124:
		tmp = -(a / b)
	elif t <= 210000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(1.0 - z))
	t_2 = Float64(t / Float64(b - y))
	tmp = 0.0
	if (t <= -2.55e+151)
		tmp = t_2;
	elseif (t <= -5e+74)
		tmp = t_1;
	elseif (t <= -9e+49)
		tmp = t_2;
	elseif (t <= -3.4e-296)
		tmp = t_1;
	elseif (t <= 1.62e-124)
		tmp = Float64(-Float64(a / b));
	elseif (t <= 210000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (1.0 - z);
	t_2 = t / (b - y);
	tmp = 0.0;
	if (t <= -2.55e+151)
		tmp = t_2;
	elseif (t <= -5e+74)
		tmp = t_1;
	elseif (t <= -9e+49)
		tmp = t_2;
	elseif (t <= -3.4e-296)
		tmp = t_1;
	elseif (t <= 1.62e-124)
		tmp = -(a / b);
	elseif (t <= 210000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e+151], t$95$2, If[LessEqual[t, -5e+74], t$95$1, If[LessEqual[t, -9e+49], t$95$2, If[LessEqual[t, -3.4e-296], t$95$1, If[LessEqual[t, 1.62e-124], (-N[(a / b), $MachinePrecision]), If[LessEqual[t, 210000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9 \cdot 10^{+49}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-296}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.62 \cdot 10^{-124}:\\
\;\;\;\;-\frac{a}{b}\\

\mathbf{elif}\;t \leq 210000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.54999999999999998e151 or -4.99999999999999963e74 < t < -8.99999999999999965e49 or 2.1e11 < t

    1. Initial program 55.5%

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

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

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

    if -2.54999999999999998e151 < t < -4.99999999999999963e74 or -8.99999999999999965e49 < t < -3.39999999999999997e-296 or 1.62000000000000006e-124 < t < 2.1e11

    1. Initial program 69.4%

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

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

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

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

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

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

    if -3.39999999999999997e-296 < t < 1.62000000000000006e-124

    1. Initial program 69.9%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x} - a \cdot z}{y + z \cdot b} \]
    5. Simplified64.4%

      \[\leadsto \frac{\color{blue}{y \cdot x - a \cdot z}}{y + z \cdot b} \]
    6. Taylor expanded in y around 0 41.0%

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified41.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{+151}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+74}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{+49}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-296}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;t \leq 1.62 \cdot 10^{-124}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;t \leq 210000000000:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y}\\ \end{array} \]

Alternative 12: 53.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -9.8 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\

\mathbf{elif}\;y \leq -9 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.5e17

    1. Initial program 45.6%

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

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

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

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

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

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

    if -8.5e17 < y < -1.2e-36 or -9.79999999999999987e-67 < y < -8.99999999999999998e-68

    1. Initial program 50.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 75.1%

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

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

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

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

    if -1.2e-36 < y < -9.79999999999999987e-67

    1. Initial program 99.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv58.5%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr58.5%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative59.6%

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    9. Simplified59.6%

      \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]

    if -8.99999999999999998e-68 < y < 2.9e9

    1. Initial program 81.4%

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

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

    if 2.9e9 < y

    1. Initial program 52.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 52.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv52.9%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr52.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+17}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-36}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-67}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-68}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 2900000000:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{1 - z}\\ \end{array} \]

Alternative 13: 63.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0004:\\
\;\;\;\;\frac{t - a}{b - y}\\

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-77}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\

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


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

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

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

    if -4.00000000000000019e-4 < z < -1.10000000000000005e-163

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv53.0%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr53.0%

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

    if -1.10000000000000005e-163 < z < 1.12000000000000009e-77

    1. Initial program 91.5%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x - a \cdot z}}{y + z \cdot b} \]
    6. Taylor expanded in b around 0 55.8%

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

    if 1.12000000000000009e-77 < z

    1. Initial program 49.9%

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

      \[\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. associate--l+67.6%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg67.6%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--67.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0004:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \frac{1}{1 - z}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-77}:\\ \;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \end{array} \]

Alternative 14: 53.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - t}{y}\\ t_2 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -1.45 \cdot 10^{+18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1900000000:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- a t) y)) (t_2 (/ x (- 1.0 z))))
   (if (<= y -1.45e+18)
     t_2
     (if (<= y -3.4e-36)
       t_1
       (if (<= y -1.15e-66)
         (* x (+ z 1.0))
         (if (<= y -5.2e-68)
           t_1
           (if (<= y 1900000000.0) (/ (- t a) b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a - t) / y;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -1.45e+18) {
		tmp = t_2;
	} else if (y <= -3.4e-36) {
		tmp = t_1;
	} else if (y <= -1.15e-66) {
		tmp = x * (z + 1.0);
	} else if (y <= -5.2e-68) {
		tmp = t_1;
	} else if (y <= 1900000000.0) {
		tmp = (t - a) / b;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a - t) / y
    t_2 = x / (1.0d0 - z)
    if (y <= (-1.45d+18)) then
        tmp = t_2
    else if (y <= (-3.4d-36)) then
        tmp = t_1
    else if (y <= (-1.15d-66)) then
        tmp = x * (z + 1.0d0)
    else if (y <= (-5.2d-68)) then
        tmp = t_1
    else if (y <= 1900000000.0d0) then
        tmp = (t - a) / b
    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 = (a - t) / y;
	double t_2 = x / (1.0 - z);
	double tmp;
	if (y <= -1.45e+18) {
		tmp = t_2;
	} else if (y <= -3.4e-36) {
		tmp = t_1;
	} else if (y <= -1.15e-66) {
		tmp = x * (z + 1.0);
	} else if (y <= -5.2e-68) {
		tmp = t_1;
	} else if (y <= 1900000000.0) {
		tmp = (t - a) / b;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (a - t) / y
	t_2 = x / (1.0 - z)
	tmp = 0
	if y <= -1.45e+18:
		tmp = t_2
	elif y <= -3.4e-36:
		tmp = t_1
	elif y <= -1.15e-66:
		tmp = x * (z + 1.0)
	elif y <= -5.2e-68:
		tmp = t_1
	elif y <= 1900000000.0:
		tmp = (t - a) / b
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a - t) / y)
	t_2 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -1.45e+18)
		tmp = t_2;
	elseif (y <= -3.4e-36)
		tmp = t_1;
	elseif (y <= -1.15e-66)
		tmp = Float64(x * Float64(z + 1.0));
	elseif (y <= -5.2e-68)
		tmp = t_1;
	elseif (y <= 1900000000.0)
		tmp = Float64(Float64(t - a) / b);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a - t) / y;
	t_2 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -1.45e+18)
		tmp = t_2;
	elseif (y <= -3.4e-36)
		tmp = t_1;
	elseif (y <= -1.15e-66)
		tmp = x * (z + 1.0);
	elseif (y <= -5.2e-68)
		tmp = t_1;
	elseif (y <= 1900000000.0)
		tmp = (t - a) / b;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+18], t$95$2, If[LessEqual[y, -3.4e-36], t$95$1, If[LessEqual[y, -1.15e-66], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-68], t$95$1, If[LessEqual[y, 1900000000.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.4 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-66}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.45e18 or 1.9e9 < y

    1. Initial program 48.8%

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

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

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

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

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

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

    if -1.45e18 < y < -3.4000000000000003e-36 or -1.14999999999999996e-66 < y < -5.1999999999999996e-68

    1. Initial program 50.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 75.1%

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

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

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

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

    if -3.4000000000000003e-36 < y < -1.14999999999999996e-66

    1. Initial program 99.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv58.5%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr58.5%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative59.6%

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    9. Simplified59.6%

      \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]

    if -5.1999999999999996e-68 < y < 1.9e9

    1. Initial program 81.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+18}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-36}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-68}:\\ \;\;\;\;\frac{a - t}{y}\\ \mathbf{elif}\;y \leq 1900000000:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 15: 62.5% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;z \leq 8 \cdot 10^{-29}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\

\mathbf{elif}\;z \leq 460:\\
\;\;\;\;\frac{x}{1 - z}\\

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


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

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

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

    if -0.017000000000000001 < z < 9.7999999999999995e-118

    1. Initial program 88.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv50.1%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr50.1%

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

    if 9.7999999999999995e-118 < z < 7.99999999999999955e-29

    1. Initial program 93.8%

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

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

      \[\leadsto \frac{\color{blue}{t \cdot z}}{y + z \cdot b} \]

    if 7.99999999999999955e-29 < z < 460

    1. Initial program 84.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.017:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-118}:\\ \;\;\;\;x \cdot \frac{1}{1 - z}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-29}:\\ \;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 460:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]

Alternative 16: 68.0% accurate, 1.1× speedup?

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

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

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

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


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

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

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

    if -5.6999999999999996e-6 < z < 1.14999999999999999e-77

    1. Initial program 89.4%

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

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

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

    if 1.14999999999999999e-77 < z

    1. Initial program 49.9%

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

      \[\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. associate--l+67.6%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg67.6%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--67.6%

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

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

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

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

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

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

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

Alternative 17: 71.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.00037:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 0.00012:\\ \;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -0.00037)
   (/ (- t a) (- b y))
   (if (<= z 0.00012)
     (+ x (* z (+ x (/ (- t a) y))))
     (- (/ t (- b y)) (/ a (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -0.00037) {
		tmp = (t - a) / (b - y);
	} else if (z <= 0.00012) {
		tmp = x + (z * (x + ((t - a) / y)));
	} else {
		tmp = (t / (b - y)) - (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 (z <= (-0.00037d0)) then
        tmp = (t - a) / (b - y)
    else if (z <= 0.00012d0) then
        tmp = x + (z * (x + ((t - a) / y)))
    else
        tmp = (t / (b - y)) - (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 (z <= -0.00037) {
		tmp = (t - a) / (b - y);
	} else if (z <= 0.00012) {
		tmp = x + (z * (x + ((t - a) / y)));
	} else {
		tmp = (t / (b - y)) - (a / (b - y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -0.00037:
		tmp = (t - a) / (b - y)
	elif z <= 0.00012:
		tmp = x + (z * (x + ((t - a) / y)))
	else:
		tmp = (t / (b - y)) - (a / (b - y))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -0.00037)
		tmp = Float64(Float64(t - a) / Float64(b - y));
	elseif (z <= 0.00012)
		tmp = Float64(x + Float64(z * Float64(x + Float64(Float64(t - a) / y))));
	else
		tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -0.00037)
		tmp = (t - a) / (b - y);
	elseif (z <= 0.00012)
		tmp = x + (z * (x + ((t - a) / y)));
	else
		tmp = (t / (b - y)) - (a / (b - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00037], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00012], N[(x + N[(z * N[(x + N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00037:\\
\;\;\;\;\frac{t - a}{b - y}\\

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

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


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

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

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

    if -3.6999999999999999e-4 < z < 1.20000000000000003e-4

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000003e-4 < z

    1. Initial program 42.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 70.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. associate--l+70.4%

        \[\leadsto \color{blue}{\frac{t}{b - y} + \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{a}{b - y}\right)} \]
      2. mul-1-neg70.4%

        \[\leadsto \frac{t}{b - y} + \left(\color{blue}{\left(-\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}\right) \]
      3. distribute-lft-out--70.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00037:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 0.00012:\\ \;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\ \end{array} \]

Alternative 18: 43.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+125}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4 \cdot 10^{+54}:\\
\;\;\;\;-\frac{x}{z}\\

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-6} \lor \neg \left(z \leq 1.12 \cdot 10^{-94}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.00000000000000023e125 or -4.0000000000000003e54 < z < -7.50000000000000019e-6 or 1.12e-94 < z

    1. Initial program 48.0%

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

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

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

    if -7.00000000000000023e125 < z < -4.0000000000000003e54

    1. Initial program 37.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    7. Simplified52.2%

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

    if -7.50000000000000019e-6 < z < 1.12e-94

    1. Initial program 89.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv48.8%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr48.8%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative48.6%

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    9. Simplified48.6%

      \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+125}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+54}:\\ \;\;\;\;-\frac{x}{z}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-6} \lor \neg \left(z \leq 1.12 \cdot 10^{-94}\right):\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \end{array} \]

Alternative 19: 36.4% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;z \leq -3 \cdot 10^{+53}:\\
\;\;\;\;-\frac{x}{z}\\

\mathbf{elif}\;z \leq -0.0033:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\

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


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

    1. Initial program 34.4%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x - a \cdot z}}{y + z \cdot b} \]
    6. Taylor expanded in y around 0 28.2%

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified28.2%

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

    if -2.84999999999999989e133 < z < -2.99999999999999998e53

    1. Initial program 30.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    7. Simplified47.3%

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

    if -2.99999999999999998e53 < z < -0.0033 or 1.2e-94 < z

    1. Initial program 56.7%

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

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

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

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

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

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

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

    if -0.0033 < z < 1.2e-94

    1. Initial program 89.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv48.8%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr48.8%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative48.6%

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    9. Simplified48.6%

      \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification37.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+133}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+53}:\\ \;\;\;\;-\frac{x}{z}\\ \mathbf{elif}\;z \leq -0.0033:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]

Alternative 20: 52.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -3.35 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-131}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+15}:\\ \;\;\;\;\frac{t - a}{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 -3.35e+25)
     t_1
     (if (<= y -9.5e-31)
       (/ t (- b y))
       (if (<= y -5.5e-131)
         (* x (+ z 1.0))
         (if (<= y 1.9e+15) (/ (- t a) 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 <= -3.35e+25) {
		tmp = t_1;
	} else if (y <= -9.5e-31) {
		tmp = t / (b - y);
	} else if (y <= -5.5e-131) {
		tmp = x * (z + 1.0);
	} else if (y <= 1.9e+15) {
		tmp = (t - a) / 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 <= (-3.35d+25)) then
        tmp = t_1
    else if (y <= (-9.5d-31)) then
        tmp = t / (b - y)
    else if (y <= (-5.5d-131)) then
        tmp = x * (z + 1.0d0)
    else if (y <= 1.9d+15) then
        tmp = (t - a) / 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 <= -3.35e+25) {
		tmp = t_1;
	} else if (y <= -9.5e-31) {
		tmp = t / (b - y);
	} else if (y <= -5.5e-131) {
		tmp = x * (z + 1.0);
	} else if (y <= 1.9e+15) {
		tmp = (t - a) / 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 <= -3.35e+25:
		tmp = t_1
	elif y <= -9.5e-31:
		tmp = t / (b - y)
	elif y <= -5.5e-131:
		tmp = x * (z + 1.0)
	elif y <= 1.9e+15:
		tmp = (t - a) / 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 <= -3.35e+25)
		tmp = t_1;
	elseif (y <= -9.5e-31)
		tmp = Float64(t / Float64(b - y));
	elseif (y <= -5.5e-131)
		tmp = Float64(x * Float64(z + 1.0));
	elseif (y <= 1.9e+15)
		tmp = Float64(Float64(t - a) / 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 <= -3.35e+25)
		tmp = t_1;
	elseif (y <= -9.5e-31)
		tmp = t / (b - y);
	elseif (y <= -5.5e-131)
		tmp = x * (z + 1.0);
	elseif (y <= 1.9e+15)
		tmp = (t - a) / 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, -3.35e+25], t$95$1, If[LessEqual[y, -9.5e-31], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.5e-131], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+15], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-131}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.35000000000000019e25 or 1.9e15 < y

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

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

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

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

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

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

    if -3.35000000000000019e25 < y < -9.5000000000000008e-31

    1. Initial program 45.0%

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

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

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

    if -9.5000000000000008e-31 < y < -5.4999999999999997e-131

    1. Initial program 86.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv35.5%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr35.5%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative35.9%

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    9. Simplified35.9%

      \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]

    if -5.4999999999999997e-131 < y < 1.9e15

    1. Initial program 80.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.35 \cdot 10^{+25}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-131}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+15}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 21: 36.2% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{+54}:\\
\;\;\;\;-\frac{x}{z}\\

\mathbf{elif}\;z \leq -65:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-96}:\\
\;\;\;\;x\\

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


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

    1. Initial program 34.4%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x - a \cdot z}}{y + z \cdot b} \]
    6. Taylor expanded in y around 0 28.2%

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified28.2%

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

    if -3.1e133 < z < -4.0000000000000003e54

    1. Initial program 30.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    7. Simplified47.3%

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

    if -4.0000000000000003e54 < z < -65 or 1.60000000000000006e-96 < z

    1. Initial program 56.2%

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

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

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

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

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

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

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

    if -65 < z < 1.60000000000000006e-96

    1. Initial program 89.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+133}:\\ \;\;\;\;-\frac{a}{b}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+54}:\\ \;\;\;\;-\frac{x}{z}\\ \mathbf{elif}\;z \leq -65:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-96}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]

Alternative 22: 63.2% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.6e-6 or 2.09999999999999992e-98 < z

    1. Initial program 46.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 70.1%

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

    if -4.6e-6 < z < 2.09999999999999992e-98

    1. Initial program 89.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    5. Step-by-step derivation
      1. div-inv48.8%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - z}} \]
    6. Applied egg-rr48.8%

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

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

Alternative 23: 36.6% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -70:\\
\;\;\;\;\frac{t}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -70 or 1.4e-95 < z

    1. Initial program 46.4%

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

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

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

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

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

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

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

    if -70 < z < 1.4e-95

    1. Initial program 89.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -70:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-95}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]

Alternative 24: 25.9% accurate, 17.0× speedup?

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

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

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification22.7%

    \[\leadsto x \]

Developer target: 73.5% accurate, 0.7× speedup?

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

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

Reproduce

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