Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B

Percentage Accurate: 74.2% → 91.7%
Time: 14.2s
Alternatives: 14
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b):
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b)
	return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\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 14 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: 74.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b):
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b)
	return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 91.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ t_2 := \left(a + 1\right) + \frac{y}{\frac{t}{b}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-315}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\ \mathbf{elif}\;t\_1 \leq 10^{+268}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
        (t_2 (+ (+ a 1.0) (/ y (/ t b)))))
   (if (<= t_1 (- INFINITY))
     (* z (+ (/ x (* z t_2)) (/ y (* t t_2))))
     (if (<= t_1 -2e-315)
       t_1
       (if (<= t_1 0.0)
         (/ (+ (* t (/ x b)) (* y (/ z b))) y)
         (if (<= t_1 1e+268)
           t_1
           (if (<= t_1 INFINITY)
             (* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))
             (/ (+ z (* t (/ x y))) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double t_2 = (a + 1.0) + (y / (t / b));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
	} else if (t_1 <= -2e-315) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 1e+268) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
	} else {
		tmp = (z + (t * (x / y))) / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double t_2 = (a + 1.0) + (y / (t / b));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
	} else if (t_1 <= -2e-315) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 1e+268) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
	} else {
		tmp = (z + (t * (x / y))) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))
	t_2 = (a + 1.0) + (y / (t / b))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = z * ((x / (z * t_2)) + (y / (t * t_2)))
	elif t_1 <= -2e-315:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = ((t * (x / b)) + (y * (z / b))) / y
	elif t_1 <= 1e+268:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))))
	else:
		tmp = (z + (t * (x / y))) / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)))
	t_2 = Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * t_2))));
	elseif (t_1 <= -2e-315)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y);
	elseif (t_1 <= 1e+268)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))));
	else
		tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	t_2 = (a + 1.0) + (y / (t / b));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
	elseif (t_1 <= -2e-315)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	elseif (t_1 <= 1e+268)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
	else
		tmp = (z + (t * (x / y))) / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-315], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 1e+268], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-315}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\

\mathbf{elif}\;t\_1 \leq 10^{+268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\frac{x}{z \cdot \left(\left(1 + a\right) + \frac{y}{\frac{t}{b}}\right)} + \frac{y}{t \cdot \left(\left(1 + a\right) + \color{blue}{\frac{y}{t} \cdot b}\right)}\right) \]
      8. associate-/r/85.4%

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000019e-315 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e267

    1. Initial program 99.5%

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

    if -2.0000000019e-315 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 54.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \frac{x}{b}} + \frac{y \cdot z}{b}}{y} \]
      2. associate-/l*86.7%

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

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

    if 9.9999999999999997e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 36.6%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num57.9%

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv81.7%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity81.7%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified81.7%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*91.1%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr91.1%

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

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

Alternative 2: 91.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(\left(a + 1\right) + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-315}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\ \mathbf{elif}\;t\_1 \leq 10^{+268}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 (- INFINITY))
     (* y (/ z (* t (+ (+ a 1.0) (/ y (/ t b))))))
     (if (<= t_1 -2e-315)
       t_1
       (if (<= t_1 0.0)
         (/ (+ (* t (/ x b)) (* y (/ z b))) y)
         (if (<= t_1 1e+268)
           t_1
           (if (<= t_1 INFINITY)
             (* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))
             (/ (+ z (* t (/ x y))) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y * (z / (t * ((a + 1.0) + (y / (t / b)))));
	} else if (t_1 <= -2e-315) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 1e+268) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
	} else {
		tmp = (z + (t * (x / y))) / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y * (z / (t * ((a + 1.0) + (y / (t / b)))));
	} else if (t_1 <= -2e-315) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 1e+268) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
	} else {
		tmp = (z + (t * (x / y))) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y * (z / (t * ((a + 1.0) + (y / (t / b)))))
	elif t_1 <= -2e-315:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = ((t * (x / b)) + (y * (z / b))) / y
	elif t_1 <= 1e+268:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))))
	else:
		tmp = (z + (t * (x / y))) / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y * Float64(z / Float64(t * Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))))));
	elseif (t_1 <= -2e-315)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y);
	elseif (t_1 <= 1e+268)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))));
	else
		tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y * (z / (t * ((a + 1.0) + (y / (t / b)))));
	elseif (t_1 <= -2e-315)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	elseif (t_1 <= 1e+268)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
	else
		tmp = (z + (t * (x / y))) / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(z / N[(t * N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-315], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 1e+268], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-315}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\

\mathbf{elif}\;t\_1 \leq 10^{+268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0

    1. Initial program 24.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 56.5%

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

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

        \[\leadsto y \cdot \frac{z}{t \cdot \color{blue}{\left(\left(1 + a\right) + \frac{b \cdot y}{t}\right)}} \]
      3. associate-*r/66.1%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000019e-315 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e267

    1. Initial program 99.5%

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

    if -2.0000000019e-315 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 54.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \frac{x}{b}} + \frac{y \cdot z}{b}}{y} \]
      2. associate-/l*86.7%

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

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

    if 9.9999999999999997e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 36.6%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num57.9%

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv81.7%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity81.7%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified81.7%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*91.1%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr91.1%

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

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

Alternative 3: 66.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+23}:\\ \;\;\;\;\frac{x + z \cdot \left(y \cdot \frac{1}{t}\right)}{a + 1}\\ \mathbf{elif}\;y \leq -120000:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+28} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (* t (/ x y))) b)))
   (if (<= y -1.35e+59)
     t_1
     (if (<= y -4.5e+23)
       (/ (+ x (* z (* y (/ 1.0 t)))) (+ a 1.0))
       (if (<= y -120000.0)
         (/ (+ z (/ (* x t) y)) b)
         (if (<= y 2.5e-25)
           (/ (+ x (/ (* y z) t)) (+ a 1.0))
           (if (or (<= y 5.6e+28) (not (<= y 6e+179)))
             t_1
             (/ x (+ (+ a 1.0) (/ y (/ t b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -1.35e+59) {
		tmp = t_1;
	} else if (y <= -4.5e+23) {
		tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0);
	} else if (y <= -120000.0) {
		tmp = (z + ((x * t) / y)) / b;
	} else if (y <= 2.5e-25) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if ((y <= 5.6e+28) || !(y <= 6e+179)) {
		tmp = t_1;
	} else {
		tmp = x / ((a + 1.0) + (y / (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) :: t_1
    real(8) :: tmp
    t_1 = (z + (t * (x / y))) / b
    if (y <= (-1.35d+59)) then
        tmp = t_1
    else if (y <= (-4.5d+23)) then
        tmp = (x + (z * (y * (1.0d0 / t)))) / (a + 1.0d0)
    else if (y <= (-120000.0d0)) then
        tmp = (z + ((x * t) / y)) / b
    else if (y <= 2.5d-25) then
        tmp = (x + ((y * z) / t)) / (a + 1.0d0)
    else if ((y <= 5.6d+28) .or. (.not. (y <= 6d+179))) then
        tmp = t_1
    else
        tmp = x / ((a + 1.0d0) + (y / (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 t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -1.35e+59) {
		tmp = t_1;
	} else if (y <= -4.5e+23) {
		tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0);
	} else if (y <= -120000.0) {
		tmp = (z + ((x * t) / y)) / b;
	} else if (y <= 2.5e-25) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if ((y <= 5.6e+28) || !(y <= 6e+179)) {
		tmp = t_1;
	} else {
		tmp = x / ((a + 1.0) + (y / (t / b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * (x / y))) / b
	tmp = 0
	if y <= -1.35e+59:
		tmp = t_1
	elif y <= -4.5e+23:
		tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0)
	elif y <= -120000.0:
		tmp = (z + ((x * t) / y)) / b
	elif y <= 2.5e-25:
		tmp = (x + ((y * z) / t)) / (a + 1.0)
	elif (y <= 5.6e+28) or not (y <= 6e+179):
		tmp = t_1
	else:
		tmp = x / ((a + 1.0) + (y / (t / b)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b)
	tmp = 0.0
	if (y <= -1.35e+59)
		tmp = t_1;
	elseif (y <= -4.5e+23)
		tmp = Float64(Float64(x + Float64(z * Float64(y * Float64(1.0 / t)))) / Float64(a + 1.0));
	elseif (y <= -120000.0)
		tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b);
	elseif (y <= 2.5e-25)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0));
	elseif ((y <= 5.6e+28) || !(y <= 6e+179))
		tmp = t_1;
	else
		tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * (x / y))) / b;
	tmp = 0.0;
	if (y <= -1.35e+59)
		tmp = t_1;
	elseif (y <= -4.5e+23)
		tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0);
	elseif (y <= -120000.0)
		tmp = (z + ((x * t) / y)) / b;
	elseif (y <= 2.5e-25)
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	elseif ((y <= 5.6e+28) || ~((y <= 6e+179)))
		tmp = t_1;
	else
		tmp = x / ((a + 1.0) + (y / (t / b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.35e+59], t$95$1, If[LessEqual[y, -4.5e+23], N[(N[(x + N[(z * N[(y * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -120000.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.5e-25], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5.6e+28], N[Not[LessEqual[y, 6e+179]], $MachinePrecision]], t$95$1, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -120000:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+28} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.3500000000000001e59 or 2.49999999999999981e-25 < y < 5.6000000000000003e28 or 5.9999999999999996e179 < y

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv67.9%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity67.9%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified67.9%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr74.3%

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

    if -1.3500000000000001e59 < y < -4.49999999999999979e23

    1. Initial program 83.2%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 66.9%

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{1 + a} \]
      2. *-commutative75.1%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
      3. div-inv75.1%

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

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

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

    if -4.49999999999999979e23 < y < -1.2e5

    1. Initial program 51.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv100.0%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity100.0%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified100.0%

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

    if -1.2e5 < y < 2.49999999999999981e-25

    1. Initial program 95.2%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 81.4%

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

    if 5.6000000000000003e28 < y < 5.9999999999999996e179

    1. Initial program 59.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
      4. associate-/r/63.0%

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
    7. Simplified63.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+59}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+23}:\\ \;\;\;\;\frac{x + z \cdot \left(y \cdot \frac{1}{t}\right)}{a + 1}\\ \mathbf{elif}\;y \leq -120000:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+28} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{+21}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;y \leq -1900:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+26} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (* t (/ x y))) b)))
   (if (<= y -3.8e+57)
     t_1
     (if (<= y -2.3e+21)
       (/ (+ x (* z (/ y t))) (+ a 1.0))
       (if (<= y -1900.0)
         (/ (+ z (/ (* x t) y)) b)
         (if (<= y 2.5e-25)
           (/ (+ x (/ (* y z) t)) (+ a 1.0))
           (if (or (<= y 1.22e+26) (not (<= y 6e+179)))
             t_1
             (/ x (+ (+ a 1.0) (/ y (/ t b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -3.8e+57) {
		tmp = t_1;
	} else if (y <= -2.3e+21) {
		tmp = (x + (z * (y / t))) / (a + 1.0);
	} else if (y <= -1900.0) {
		tmp = (z + ((x * t) / y)) / b;
	} else if (y <= 2.5e-25) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if ((y <= 1.22e+26) || !(y <= 6e+179)) {
		tmp = t_1;
	} else {
		tmp = x / ((a + 1.0) + (y / (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) :: t_1
    real(8) :: tmp
    t_1 = (z + (t * (x / y))) / b
    if (y <= (-3.8d+57)) then
        tmp = t_1
    else if (y <= (-2.3d+21)) then
        tmp = (x + (z * (y / t))) / (a + 1.0d0)
    else if (y <= (-1900.0d0)) then
        tmp = (z + ((x * t) / y)) / b
    else if (y <= 2.5d-25) then
        tmp = (x + ((y * z) / t)) / (a + 1.0d0)
    else if ((y <= 1.22d+26) .or. (.not. (y <= 6d+179))) then
        tmp = t_1
    else
        tmp = x / ((a + 1.0d0) + (y / (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 t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -3.8e+57) {
		tmp = t_1;
	} else if (y <= -2.3e+21) {
		tmp = (x + (z * (y / t))) / (a + 1.0);
	} else if (y <= -1900.0) {
		tmp = (z + ((x * t) / y)) / b;
	} else if (y <= 2.5e-25) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if ((y <= 1.22e+26) || !(y <= 6e+179)) {
		tmp = t_1;
	} else {
		tmp = x / ((a + 1.0) + (y / (t / b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * (x / y))) / b
	tmp = 0
	if y <= -3.8e+57:
		tmp = t_1
	elif y <= -2.3e+21:
		tmp = (x + (z * (y / t))) / (a + 1.0)
	elif y <= -1900.0:
		tmp = (z + ((x * t) / y)) / b
	elif y <= 2.5e-25:
		tmp = (x + ((y * z) / t)) / (a + 1.0)
	elif (y <= 1.22e+26) or not (y <= 6e+179):
		tmp = t_1
	else:
		tmp = x / ((a + 1.0) + (y / (t / b)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b)
	tmp = 0.0
	if (y <= -3.8e+57)
		tmp = t_1;
	elseif (y <= -2.3e+21)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0));
	elseif (y <= -1900.0)
		tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b);
	elseif (y <= 2.5e-25)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0));
	elseif ((y <= 1.22e+26) || !(y <= 6e+179))
		tmp = t_1;
	else
		tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * (x / y))) / b;
	tmp = 0.0;
	if (y <= -3.8e+57)
		tmp = t_1;
	elseif (y <= -2.3e+21)
		tmp = (x + (z * (y / t))) / (a + 1.0);
	elseif (y <= -1900.0)
		tmp = (z + ((x * t) / y)) / b;
	elseif (y <= 2.5e-25)
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	elseif ((y <= 1.22e+26) || ~((y <= 6e+179)))
		tmp = t_1;
	else
		tmp = x / ((a + 1.0) + (y / (t / b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3.8e+57], t$95$1, If[LessEqual[y, -2.3e+21], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1900.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.5e-25], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.22e+26], N[Not[LessEqual[y, 6e+179]], $MachinePrecision]], t$95$1, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\

\mathbf{elif}\;y \leq -1900:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\

\mathbf{elif}\;y \leq 1.22 \cdot 10^{+26} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.7999999999999999e57 or 2.49999999999999981e-25 < y < 1.2200000000000001e26 or 5.9999999999999996e179 < y

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv67.9%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity67.9%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified67.9%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr74.3%

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

    if -3.7999999999999999e57 < y < -2.3e21

    1. Initial program 83.2%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 66.9%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    6. Step-by-step derivation
      1. *-commutative83.2%

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

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

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

    if -2.3e21 < y < -1900

    1. Initial program 51.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv100.0%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity100.0%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified100.0%

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

    if -1900 < y < 2.49999999999999981e-25

    1. Initial program 95.2%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 81.4%

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

    if 1.2200000000000001e26 < y < 5.9999999999999996e179

    1. Initial program 59.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
      4. associate-/r/63.0%

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
    7. Simplified63.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+57}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{+21}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;y \leq -1900:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+26} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -7.6 \cdot 10^{-295}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.4000000000000003e-101 or 2.2499999999999999e-235 < t

    1. Initial program 77.5%

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

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

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

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

    if -5.4000000000000003e-101 < t < -7.60000000000000037e-295 or 1.49999999999999994e-276 < t < 2.2499999999999999e-235

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv81.7%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity81.7%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified81.7%

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

    if -7.60000000000000037e-295 < t < 1.49999999999999994e-276

    1. Initial program 71.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{-101}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-295}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-276}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-235}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 78.5% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq 8 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.40000000000000006e59 or 2.39999999999999996e-23 < y < 8.00000000000000072e25

    1. Initial program 42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv71.8%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity71.8%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified71.8%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*77.4%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr77.4%

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

    if -3.40000000000000006e59 < y < 2.39999999999999996e-23

    1. Initial program 93.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative93.1%

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

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

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

    if 8.00000000000000072e25 < y

    1. Initial program 50.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+59}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+25}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 66.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -9.8 \cdot 10^{+58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+38} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (* t (/ x y))) b)))
   (if (<= y -9.8e+58)
     t_1
     (if (<= y 2.5e-25)
       (/ (+ x (* z (/ y t))) (+ a 1.0))
       (if (or (<= y 2.45e+38) (not (<= y 6e+179)))
         t_1
         (/ x (+ (+ a 1.0) (/ y (/ t b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -9.8e+58) {
		tmp = t_1;
	} else if (y <= 2.5e-25) {
		tmp = (x + (z * (y / t))) / (a + 1.0);
	} else if ((y <= 2.45e+38) || !(y <= 6e+179)) {
		tmp = t_1;
	} else {
		tmp = x / ((a + 1.0) + (y / (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) :: t_1
    real(8) :: tmp
    t_1 = (z + (t * (x / y))) / b
    if (y <= (-9.8d+58)) then
        tmp = t_1
    else if (y <= 2.5d-25) then
        tmp = (x + (z * (y / t))) / (a + 1.0d0)
    else if ((y <= 2.45d+38) .or. (.not. (y <= 6d+179))) then
        tmp = t_1
    else
        tmp = x / ((a + 1.0d0) + (y / (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 t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -9.8e+58) {
		tmp = t_1;
	} else if (y <= 2.5e-25) {
		tmp = (x + (z * (y / t))) / (a + 1.0);
	} else if ((y <= 2.45e+38) || !(y <= 6e+179)) {
		tmp = t_1;
	} else {
		tmp = x / ((a + 1.0) + (y / (t / b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * (x / y))) / b
	tmp = 0
	if y <= -9.8e+58:
		tmp = t_1
	elif y <= 2.5e-25:
		tmp = (x + (z * (y / t))) / (a + 1.0)
	elif (y <= 2.45e+38) or not (y <= 6e+179):
		tmp = t_1
	else:
		tmp = x / ((a + 1.0) + (y / (t / b)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b)
	tmp = 0.0
	if (y <= -9.8e+58)
		tmp = t_1;
	elseif (y <= 2.5e-25)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0));
	elseif ((y <= 2.45e+38) || !(y <= 6e+179))
		tmp = t_1;
	else
		tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * (x / y))) / b;
	tmp = 0.0;
	if (y <= -9.8e+58)
		tmp = t_1;
	elseif (y <= 2.5e-25)
		tmp = (x + (z * (y / t))) / (a + 1.0);
	elseif ((y <= 2.45e+38) || ~((y <= 6e+179)))
		tmp = t_1;
	else
		tmp = x / ((a + 1.0) + (y / (t / b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -9.8e+58], t$95$1, If[LessEqual[y, 2.5e-25], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.45e+38], N[Not[LessEqual[y, 6e+179]], $MachinePrecision]], t$95$1, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\

\mathbf{elif}\;y \leq 2.45 \cdot 10^{+38} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.80000000000000037e58 or 2.49999999999999981e-25 < y < 2.45000000000000001e38 or 5.9999999999999996e179 < y

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv67.9%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity67.9%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified67.9%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr74.3%

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

    if -9.80000000000000037e58 < y < 2.49999999999999981e-25

    1. Initial program 93.0%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 78.1%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    6. Step-by-step derivation
      1. *-commutative93.0%

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

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

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

    if 2.45000000000000001e38 < y < 5.9999999999999996e179

    1. Initial program 59.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
      4. associate-/r/63.0%

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
    7. Simplified63.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{+58}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+38} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -2.3 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-155}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (* t (/ x y))) b)))
   (if (<= y -2.3e-12)
     t_1
     (if (<= y -3.1e-155)
       (/ (+ x (/ (* y z) t)) a)
       (if (<= y 3e-36) (/ x (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -2.3e-12) {
		tmp = t_1;
	} else if (y <= -3.1e-155) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (y <= 3e-36) {
		tmp = x / (a + 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 = (z + (t * (x / y))) / b
    if (y <= (-2.3d-12)) then
        tmp = t_1
    else if (y <= (-3.1d-155)) then
        tmp = (x + ((y * z) / t)) / a
    else if (y <= 3d-36) then
        tmp = x / (a + 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 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -2.3e-12) {
		tmp = t_1;
	} else if (y <= -3.1e-155) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (y <= 3e-36) {
		tmp = x / (a + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * (x / y))) / b
	tmp = 0
	if y <= -2.3e-12:
		tmp = t_1
	elif y <= -3.1e-155:
		tmp = (x + ((y * z) / t)) / a
	elif y <= 3e-36:
		tmp = x / (a + 1.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b)
	tmp = 0.0
	if (y <= -2.3e-12)
		tmp = t_1;
	elseif (y <= -3.1e-155)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	elseif (y <= 3e-36)
		tmp = Float64(x / Float64(a + 1.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * (x / y))) / b;
	tmp = 0.0;
	if (y <= -2.3e-12)
		tmp = t_1;
	elseif (y <= -3.1e-155)
		tmp = (x + ((y * z) / t)) / a;
	elseif (y <= 3e-36)
		tmp = x / (a + 1.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.3e-12], t$95$1, If[LessEqual[y, -3.1e-155], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3e-36], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 3 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.29999999999999989e-12 or 3.0000000000000002e-36 < y

    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv58.8%

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

        \[\leadsto \frac{z + \color{blue}{1} \cdot \frac{t \cdot x}{y}}{b} \]
      3. *-lft-identity58.8%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified58.8%

      \[\leadsto \color{blue}{\frac{z + \frac{t \cdot x}{y}}{b}} \]
    11. Step-by-step derivation
      1. associate-/l*62.8%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    12. Applied egg-rr62.8%

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

    if -2.29999999999999989e-12 < y < -3.1e-155

    1. Initial program 99.8%

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

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

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

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

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

    if -3.1e-155 < y < 3.0000000000000002e-36

    1. Initial program 94.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 68.2%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{-12}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-155}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0017 \lor \neg \left(t \leq 2 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.00169999999999999991 or 1.99999999999999993e-105 < t

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

    if -0.00169999999999999991 < t < 1.99999999999999993e-105

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv65.1%

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified65.1%

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

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

Alternative 10: 66.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0065:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\

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

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


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

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

    if -0.0064999999999999997 < t < 2.2499999999999999e-105

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv65.1%

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
    10. Simplified65.1%

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

    if 2.2499999999999999e-105 < t

    1. Initial program 81.5%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
      4. associate-/r/68.2%

        \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
    7. Simplified68.2%

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

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

Alternative 11: 54.7% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.22 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8e5 or 1.22000000000000007e-23 < y

    1. Initial program 50.3%

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

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

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

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

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

    if -3.8e5 < y < -3.1e-155

    1. Initial program 99.8%

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

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

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

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

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

    if -3.1e-155 < y < 1.22000000000000007e-23

    1. Initial program 93.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 65.9%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -380000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-155}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 56.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+33} \lor \neg \left(y \leq 8 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{z}{b}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.45000000000000012e33 or 7.99999999999999939e-24 < y

    1. Initial program 48.5%

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

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

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

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

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

    if -1.45000000000000012e33 < y < 7.99999999999999939e-24

    1. Initial program 94.1%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 58.4%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.5%

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

Alternative 13: 43.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+62} \lor \neg \left(a \leq 2.2 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.00000000000000029e62 or 2.20000000000000007e102 < a

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\left(1 + a\right) + b \cdot \frac{y}{t}}} \]
    12. Taylor expanded in a around inf 58.3%

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

    if -5.00000000000000029e62 < a < 2.20000000000000007e102

    1. Initial program 70.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.8%

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

Alternative 14: 25.8% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{x}{a} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
	return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x / a;
}
def code(x, y, z, t, a, b):
	return x / a
function code(x, y, z, t, a, b)
	return Float64(x / a)
end
function tmp = code(x, y, z, t, a, b)
	tmp = x / a;
end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\left(1 + a\right) + \color{blue}{b \cdot \frac{y}{t}}} \]
  11. Simplified53.4%

    \[\leadsto \color{blue}{\frac{x}{\left(1 + a\right) + b \cdot \frac{y}{t}}} \]
  12. Taylor expanded in a around inf 27.9%

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  13. Add Preprocessing

Developer target: 78.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024098 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :alt
  (if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))

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