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

Percentage Accurate: 75.3% → 89.7%
Time: 13.4s
Alternatives: 12
Speedup: 0.8×

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 12 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: 75.3% 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: 89.7% accurate, 0.2× 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:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-320}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+279}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{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 t) (/ z (+ 1.0 (+ a (* b (/ y t))))))
     (if (<= t_1 -1e-320)
       t_1
       (if (<= t_1 0.0)
         (/ (+ z (/ (* x t) y)) b)
         (if (<= t_1 5e+279) t_1 (/ z 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 / t) * (z / (1.0 + (a + (b * (y / t)))));
	} else if (t_1 <= -1e-320) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (z + ((x * t) / y)) / b;
	} else if (t_1 <= 5e+279) {
		tmp = t_1;
	} else {
		tmp = z / 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 / t) * (z / (1.0 + (a + (b * (y / t)))));
	} else if (t_1 <= -1e-320) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (z + ((x * t) / y)) / b;
	} else if (t_1 <= 5e+279) {
		tmp = t_1;
	} else {
		tmp = z / 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 / t) * (z / (1.0 + (a + (b * (y / t)))))
	elif t_1 <= -1e-320:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = (z + ((x * t) / y)) / b
	elif t_1 <= 5e+279:
		tmp = t_1
	else:
		tmp = z / 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(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))));
	elseif (t_1 <= -1e-320)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b);
	elseif (t_1 <= 5e+279)
		tmp = t_1;
	else
		tmp = Float64(z / 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 / t) * (z / (1.0 + (a + (b * (y / t)))));
	elseif (t_1 <= -1e-320)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = (z + ((x * t) / y)) / b;
	elseif (t_1 <= 5e+279)
		tmp = t_1;
	else
		tmp = z / 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[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-320], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+279], t$95$1, N[(z / 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:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-320}:\\
\;\;\;\;t_1\\

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

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

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


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

    1. Initial program 15.9%

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.99989e-321 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e279

    1. Initial program 99.1%

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

    if -9.99989e-321 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 46.8%

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 8.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -1 \cdot 10^{-320}:\\ \;\;\;\;\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{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+279}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 2: 79.6% accurate, 0.8× speedup?

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

    1. Initial program 78.4%

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

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

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

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

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

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

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

    if -3.14999999999999978e-274 < t < 2.10000000000000005e-103

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 82.5% accurate, 0.8× speedup?

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

    1. Initial program 79.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*82.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 - \color{blue}{\left(-b\right) \cdot \frac{y}{t}}\right)} \]
      10. cancel-sign-sub88.1%

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

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

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

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

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

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

    if -3.60000000000000003e-171 < t < 1.05000000000000002e-103

    1. Initial program 45.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -7 \cdot 10^{-80}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

\mathbf{elif}\;t \leq -1 \cdot 10^{-169} \lor \neg \left(t \leq 1.5 \cdot 10^{-103}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.00000000000000001e-35 or -7.00000000000000029e-80 < t < -1.00000000000000002e-169 or 1.5e-103 < t

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000001e-35 < t < -7.00000000000000029e-80

    1. Initial program 62.8%

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

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

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

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

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

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

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

      \[\leadsto \frac{x + \frac{z}{t} \cdot y}{\color{blue}{1 + a}} \]
    5. Taylor expanded in x around 0 71.3%

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a}} \]
    7. Simplified71.1%

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

    if -1.00000000000000002e-169 < t < 1.5e-103

    1. Initial program 45.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-80}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-169} \lor \neg \left(t \leq 1.5 \cdot 10^{-103}\right):\\ \;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \end{array} \]

Alternative 5: 69.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+61} \lor \neg \left(y \leq 1.42 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1e61 or 1.4200000000000001e38 < y

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

    if -1.1e61 < y < 1.4200000000000001e38

    1. Initial program 90.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    5. Step-by-step derivation
      1. div-inv78.9%

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

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

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

Alternative 6: 67.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+61} \lor \neg \left(y \leq 2.3 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.29999999999999986e61 or 2.3000000000000001e38 < y

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999986e61 < y < 2.3000000000000001e38

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

Alternative 7: 69.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.00000000000000018e61 or 1.02000000000000006e38 < y

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000018e61 < y < 1.02000000000000006e38

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

Alternative 8: 59.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+60} \lor \neg \left(y \leq 3.7 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5e60 or 3.70000000000000009e-25 < y

    1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

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

    if -7.5e60 < y < 3.70000000000000009e-25

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

Alternative 9: 56.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+61} \lor \neg \left(y \leq 2.8 \cdot 10^{+36}\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.05e+61) (not (<= y 2.8e+36))) (/ 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.05e+61) || !(y <= 2.8e+36)) {
		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.05d+61)) .or. (.not. (y <= 2.8d+36))) 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.05e+61) || !(y <= 2.8e+36)) {
		tmp = z / b;
	} else {
		tmp = x / (a + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -1.05e+61) or not (y <= 2.8e+36):
		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.05e+61) || !(y <= 2.8e+36))
		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.05e+61) || ~((y <= 2.8e+36)))
		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.05e+61], N[Not[LessEqual[y, 2.8e+36]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+61} \lor \neg \left(y \leq 2.8 \cdot 10^{+36}\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.0500000000000001e61 or 2.8000000000000001e36 < y

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

    if -1.0500000000000001e61 < y < 2.8000000000000001e36

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

Alternative 10: 40.3% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -435000000 \lor \neg \left(a \leq 1.32 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.35e8 or 1.32e14 < a

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

    if -4.35e8 < a < 1.32e14

    1. Initial program 72.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    5. Taylor expanded in a around 0 28.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -435000000 \lor \neg \left(a \leq 1.32 \cdot 10^{+14}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 43.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+116} \lor \neg \left(a \leq 6.5 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.19999999999999941e116 or 6.5000000000000005e49 < a

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999941e116 < a < 6.5000000000000005e49

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+116} \lor \neg \left(a \leq 6.5 \cdot 10^{+49}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 12: 19.1% accurate, 17.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  5. Taylor expanded in a around 0 15.1%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification15.1%

    \[\leadsto x \]

Developer target: 79.6% accurate, 0.7× 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 2023309 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (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))))