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

Percentage Accurate: 76.1% → 87.9%
Time: 10.9s
Alternatives: 13
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 13 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: 76.1% 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: 87.9% 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 -5 \cdot 10^{-318} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+243}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{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 (or (<= t_1 -5e-318) (and (not (<= t_1 0.0)) (<= t_1 2e+243)))
     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 + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if ((t_1 <= -5e-318) || (!(t_1 <= 0.0) && (t_1 <= 2e+243))) {
		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 + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))
    if ((t_1 <= (-5d-318)) .or. (.not. (t_1 <= 0.0d0)) .and. (t_1 <= 2d+243)) 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 + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if ((t_1 <= -5e-318) || (!(t_1 <= 0.0) && (t_1 <= 2e+243))) {
		tmp = t_1;
	} else {
		tmp = (z + (x * (t / 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 <= -5e-318) or (not (t_1 <= 0.0) and (t_1 <= 2e+243)):
		tmp = t_1
	else:
		tmp = (z + (x * (t / 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 <= -5e-318) || (!(t_1 <= 0.0) && (t_1 <= 2e+243)))
		tmp = t_1;
	else
		tmp = Float64(Float64(z + Float64(x * Float64(t / 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 <= -5e-318) || (~((t_1 <= 0.0)) && (t_1 <= 2e+243)))
		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[(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[Or[LessEqual[t$95$1, -5e-318], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 2e+243]]], t$95$1, N[(N[(z + N[(x * N[(t / 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 -5 \cdot 10^{-318} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+243}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999987e-318 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e243

    1. Initial program 96.5%

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

    if -4.9999987e-318 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or 2.0000000000000001e243 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 25.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{t \cdot x}{y} + z}{b}} \]
    8. Step-by-step derivation
      1. +-commutative78.6%

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

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

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/81.0%

        \[\leadsto \frac{z + \color{blue}{\frac{t}{y} \cdot x}}{b} \]
    11. Applied egg-rr81.0%

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

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

Alternative 2: 82.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+104}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.1999999999999997e104

    1. Initial program 36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified74.2%

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

    if -4.1999999999999997e104 < y < 2.20000000000000003e80

    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. *-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.6%

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

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

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

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

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

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

    if 2.20000000000000003e80 < y

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified69.8%

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/71.7%

        \[\leadsto \frac{z + \color{blue}{\frac{t}{y} \cdot x}}{b} \]
    11. Applied egg-rr71.7%

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

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

Alternative 3: 63.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{if}\;y \leq -4.3 \cdot 10^{+104}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-29}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+58}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ 1.0 (+ a (/ (* y b) t))))))
   (if (<= y -4.3e+104)
     (/ (+ z (/ t (/ y x))) b)
     (if (<= y 2e-65)
       t_1
       (if (<= y 4.7e-29)
         (/ z b)
         (if (<= y 2.3e+35)
           t_1
           (if (<= y 9.2e+58)
             (* (/ y t) (/ z (+ a 1.0)))
             (/ (+ 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 + ((y * b) / t)));
	double tmp;
	if (y <= -4.3e+104) {
		tmp = (z + (t / (y / x))) / b;
	} else if (y <= 2e-65) {
		tmp = t_1;
	} else if (y <= 4.7e-29) {
		tmp = z / b;
	} else if (y <= 2.3e+35) {
		tmp = t_1;
	} else if (y <= 9.2e+58) {
		tmp = (y / t) * (z / (a + 1.0));
	} 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 + ((y * b) / t)))
    if (y <= (-4.3d+104)) then
        tmp = (z + (t / (y / x))) / b
    else if (y <= 2d-65) then
        tmp = t_1
    else if (y <= 4.7d-29) then
        tmp = z / b
    else if (y <= 2.3d+35) then
        tmp = t_1
    else if (y <= 9.2d+58) then
        tmp = (y / t) * (z / (a + 1.0d0))
    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 + ((y * b) / t)));
	double tmp;
	if (y <= -4.3e+104) {
		tmp = (z + (t / (y / x))) / b;
	} else if (y <= 2e-65) {
		tmp = t_1;
	} else if (y <= 4.7e-29) {
		tmp = z / b;
	} else if (y <= 2.3e+35) {
		tmp = t_1;
	} else if (y <= 9.2e+58) {
		tmp = (y / t) * (z / (a + 1.0));
	} else {
		tmp = (z + (x * (t / y))) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (1.0 + (a + ((y * b) / t)))
	tmp = 0
	if y <= -4.3e+104:
		tmp = (z + (t / (y / x))) / b
	elif y <= 2e-65:
		tmp = t_1
	elif y <= 4.7e-29:
		tmp = z / b
	elif y <= 2.3e+35:
		tmp = t_1
	elif y <= 9.2e+58:
		tmp = (y / t) * (z / (a + 1.0))
	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(Float64(y * b) / t))))
	tmp = 0.0
	if (y <= -4.3e+104)
		tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b);
	elseif (y <= 2e-65)
		tmp = t_1;
	elseif (y <= 4.7e-29)
		tmp = Float64(z / b);
	elseif (y <= 2.3e+35)
		tmp = t_1;
	elseif (y <= 9.2e+58)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)));
	else
		tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (1.0 + (a + ((y * b) / t)));
	tmp = 0.0;
	if (y <= -4.3e+104)
		tmp = (z + (t / (y / x))) / b;
	elseif (y <= 2e-65)
		tmp = t_1;
	elseif (y <= 4.7e-29)
		tmp = z / b;
	elseif (y <= 2.3e+35)
		tmp = t_1;
	elseif (y <= 9.2e+58)
		tmp = (y / t) * (z / (a + 1.0));
	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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.3e+104], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2e-65], t$95$1, If[LessEqual[y, 4.7e-29], N[(z / b), $MachinePrecision], If[LessEqual[y, 2.3e+35], t$95$1, If[LessEqual[y, 9.2e+58], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+58}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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


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

    1. Initial program 36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified74.2%

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

    if -4.3000000000000002e104 < y < 1.99999999999999985e-65 or 4.6999999999999998e-29 < y < 2.2999999999999998e35

    1. Initial program 95.7%

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

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

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

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

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

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

    if 1.99999999999999985e-65 < y < 4.6999999999999998e-29

    1. Initial program 72.9%

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

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

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

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

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

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

    if 2.2999999999999998e35 < y < 9.2000000000000001e58

    1. Initial program 67.2%

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

        \[\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}{\frac{t}{y}}}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      3. associate-*l/68.0%

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

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

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

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

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

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

    if 9.2000000000000001e58 < y

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{t \cdot x}{y} + z}{b}} \]
    8. Step-by-step derivation
      1. +-commutative66.5%

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified68.5%

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/70.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+104}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-65}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-29}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+35}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+58}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \end{array} \]

Alternative 4: 64.9% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;t \leq 10000000000:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{+36}:\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.1499999999999999e-41 or 2.15000000000000002e36 < t

    1. Initial program 82.0%

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

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

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

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

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

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

    if -2.1499999999999999e-41 < t < 1.9999999999999999e-48

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-48 < t < 1e10

    1. Initial program 80.4%

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

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

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

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

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

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

    if 1e10 < t < 2.15000000000000002e36

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified61.2%

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/61.2%

        \[\leadsto \frac{z + \color{blue}{\frac{t}{y} \cdot x}}{b} \]
    11. Applied egg-rr61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{-41}:\\ \;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-48}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 10000000000:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+36}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\ \end{array} \]

Alternative 5: 70.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -0.00195:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-62}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-48}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
   (if (<= t -1.95e+14)
     t_1
     (if (<= t -0.00195)
       (/ (+ z (* x (/ t y))) b)
       (if (<= t -2.7e-62)
         (/ (+ x (/ (* y z) t)) (+ a 1.0))
         (if (<= t 2.45e-48) (/ (+ z (/ (* x t) y)) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y / (t / z))) / (a + 1.0);
	double tmp;
	if (t <= -1.95e+14) {
		tmp = t_1;
	} else if (t <= -0.00195) {
		tmp = (z + (x * (t / y))) / b;
	} else if (t <= -2.7e-62) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if (t <= 2.45e-48) {
		tmp = (z + ((x * t) / y)) / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (y / (t / z))) / (a + 1.0d0)
    if (t <= (-1.95d+14)) then
        tmp = t_1
    else if (t <= (-0.00195d0)) then
        tmp = (z + (x * (t / y))) / b
    else if (t <= (-2.7d-62)) then
        tmp = (x + ((y * z) / t)) / (a + 1.0d0)
    else if (t <= 2.45d-48) then
        tmp = (z + ((x * t) / y)) / b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y / (t / z))) / (a + 1.0);
	double tmp;
	if (t <= -1.95e+14) {
		tmp = t_1;
	} else if (t <= -0.00195) {
		tmp = (z + (x * (t / y))) / b;
	} else if (t <= -2.7e-62) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if (t <= 2.45e-48) {
		tmp = (z + ((x * t) / y)) / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y / (t / z))) / (a + 1.0)
	tmp = 0
	if t <= -1.95e+14:
		tmp = t_1
	elif t <= -0.00195:
		tmp = (z + (x * (t / y))) / b
	elif t <= -2.7e-62:
		tmp = (x + ((y * z) / t)) / (a + 1.0)
	elif t <= 2.45e-48:
		tmp = (z + ((x * t) / y)) / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.95e+14)
		tmp = t_1;
	elseif (t <= -0.00195)
		tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b);
	elseif (t <= -2.7e-62)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0));
	elseif (t <= 2.45e-48)
		tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + (y / (t / z))) / (a + 1.0);
	tmp = 0.0;
	if (t <= -1.95e+14)
		tmp = t_1;
	elseif (t <= -0.00195)
		tmp = (z + (x * (t / y))) / b;
	elseif (t <= -2.7e-62)
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	elseif (t <= 2.45e-48)
		tmp = (z + ((x * t) / y)) / b;
	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[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+14], t$95$1, If[LessEqual[t, -0.00195], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, -2.7e-62], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.45e-48], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.95e14 or 2.4500000000000001e-48 < t

    1. Initial program 82.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t} + x}{1 + a}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity73.7%

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

        \[\leadsto \frac{1 \cdot \color{blue}{\frac{y}{\frac{t}{z}}} + x}{1 + a} \]
    6. Applied egg-rr79.1%

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

    if -1.95e14 < t < -0.0019499999999999999

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{t \cdot x}{y} + z}{b}} \]
    8. Step-by-step derivation
      1. +-commutative100.0%

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

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

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto \frac{z + \color{blue}{\frac{t}{y} \cdot x}}{b} \]
    11. Applied egg-rr100.0%

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

    if -0.0019499999999999999 < t < -2.70000000000000019e-62

    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. *-commutative99.8%

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

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

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

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

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

    if -2.70000000000000019e-62 < t < 2.4500000000000001e-48

    1. Initial program 62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{+14}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq -0.00195:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-62}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-48}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \end{array} \]

Alternative 6: 60.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 68000000000000:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.4e16 or 1.4e38 < t

    1. Initial program 82.4%

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

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

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

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

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

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

    if -1.4e16 < t < 2.70000000000000011e-48

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.70000000000000011e-48 < t < 6.8e13

    1. Initial program 80.4%

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

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

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

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

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

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

    if 6.8e13 < t < 1.4e38

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified61.2%

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/61.2%

        \[\leadsto \frac{z + \color{blue}{\frac{t}{y} \cdot x}}{b} \]
    11. Applied egg-rr61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-48}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 68000000000000:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 7: 67.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-41}:\\ \;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-48}:\\ \;\;\;\;\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 (<= t -6.2e-41)
   (/ x (+ (* b (/ y t)) (+ a 1.0)))
   (if (<= t 1.65e-48)
     (/ (+ 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 (t <= -6.2e-41) {
		tmp = x / ((b * (y / t)) + (a + 1.0));
	} else if (t <= 1.65e-48) {
		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 (t <= (-6.2d-41)) then
        tmp = x / ((b * (y / t)) + (a + 1.0d0))
    else if (t <= 1.65d-48) 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 (t <= -6.2e-41) {
		tmp = x / ((b * (y / t)) + (a + 1.0));
	} else if (t <= 1.65e-48) {
		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 t <= -6.2e-41:
		tmp = x / ((b * (y / t)) + (a + 1.0))
	elif t <= 1.65e-48:
		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 (t <= -6.2e-41)
		tmp = Float64(x / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0)));
	elseif (t <= 1.65e-48)
		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 (t <= -6.2e-41)
		tmp = x / ((b * (y / t)) + (a + 1.0));
	elseif (t <= 1.65e-48)
		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[LessEqual[t, -6.2e-41], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-48], 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}\;t \leq -6.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-48}:\\
\;\;\;\;\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 3 regimes
  2. if t < -6.20000000000000001e-41

    1. Initial program 79.0%

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

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

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

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

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

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

    if -6.20000000000000001e-41 < t < 1.65e-48

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.65e-48 < t

    1. Initial program 84.1%

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

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

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

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

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

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

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

Alternative 8: 60.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3600000000000 \lor \neg \left(t \leq 8.2 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6e12 or 8.20000000000000026e36 < t

    1. Initial program 82.4%

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

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

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

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

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

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

    if -3.6e12 < t < 8.20000000000000026e36

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified59.6%

      \[\leadsto \color{blue}{\frac{z + \frac{t}{\frac{y}{x}}}{b}} \]
    10. Step-by-step derivation
      1. associate-/r/64.6%

        \[\leadsto \frac{z + \color{blue}{\frac{t}{y} \cdot x}}{b} \]
    11. Applied egg-rr64.6%

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

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

Alternative 9: 60.4% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.8e13 or 6.6000000000000001e41 < t

    1. Initial program 82.4%

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

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

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

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

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

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

    if -6.8e13 < t < 6.6000000000000001e41

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 55.7% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5e12 or 5.3999999999999997e-14 < t

    1. Initial program 82.5%

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

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

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

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

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

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

    if -4.5e12 < t < 5.3999999999999997e-14

    1. Initial program 65.0%

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

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

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

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

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

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

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

Alternative 11: 41.2% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2499999999999999e-8 or 1 < a

    1. Initial program 76.6%

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

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

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

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

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

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

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

    if -1.2499999999999999e-8 < a < 1

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 12: 42.6% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;t \leq 7.3 \cdot 10^{+47}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.99999999999999977e37 or 7.3000000000000001e47 < t

    1. Initial program 84.1%

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

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

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

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

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

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

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

    if -9.99999999999999977e37 < t < 7.3000000000000001e47

    1. Initial program 66.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+38}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq 7.3 \cdot 10^{+47}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 13: 19.6% 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 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{x}{\color{blue}{1}} \]
  7. Final simplification17.1%

    \[\leadsto x \]

Developer target: 79.1% 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 2023240 
(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))))