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

Percentage Accurate: 75.9% → 90.2%
Time: 12.0s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 75.9% 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: 90.2% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999998e-299 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e289

    1. Initial program 99.8%

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

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

    1. Initial program 43.5%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified49.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 63.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. +-commutative63.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/63.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--63.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*63.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-eval63.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-identity63.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. Simplified78.9%

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

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

    1. Initial program 6.8%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified24.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 63.8%

      \[\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. +-commutative63.8%

        \[\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/63.8%

        \[\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--63.8%

        \[\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*63.8%

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

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

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

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

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

        \[\leadsto \frac{z}{b} + \frac{\color{blue}{\frac{t}{b} \cdot x}}{y} \]
      2. *-commutative88.0%

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

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

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

Alternative 2: 90.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-299} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+289}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (* (/ y t) (/ z (+ 1.0 (+ a (/ y (/ t b))))))
     (if (or (<= t_1 -2e-299) (and (not (<= t_1 0.0)) (<= t_1 2e+289)))
       t_1
       (+ (/ z b) (/ (* x (/ t b)) y))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (y / t) * (z / (1.0 + (a + (y / (t / b)))));
	} else if ((t_1 <= -2e-299) || (!(t_1 <= 0.0) && (t_1 <= 2e+289))) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((x * (t / b)) / y);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (y / t) * (z / (1.0 + (a + (y / (t / b)))));
	} else if ((t_1 <= -2e-299) || (!(t_1 <= 0.0) && (t_1 <= 2e+289))) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((x * (t / b)) / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (y / t) * (z / (1.0 + (a + (y / (t / b)))))
	elif (t_1 <= -2e-299) or (not (t_1 <= 0.0) and (t_1 <= 2e+289)):
		tmp = t_1
	else:
		tmp = (z / b) + ((x * (t / b)) / y)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))));
	elseif ((t_1 <= -2e-299) || (!(t_1 <= 0.0) && (t_1 <= 2e+289)))
		tmp = t_1;
	else
		tmp = Float64(Float64(z / b) + Float64(Float64(x * Float64(t / b)) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (y / t) * (z / (1.0 + (a + (y / (t / b)))));
	elseif ((t_1 <= -2e-299) || (~((t_1 <= 0.0)) && (t_1 <= 2e+289)))
		tmp = t_1;
	else
		tmp = (z / b) + ((x * (t / b)) / y);
	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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -2e-299], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 2e+289]]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(x * N[(t / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-299} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999998e-299 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e289

    1. Initial program 99.8%

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

    if -1.99999999999999998e-299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 2.0000000000000001e289 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 29.1%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified39.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 63.6%

      \[\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. +-commutative63.6%

        \[\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/63.6%

        \[\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--63.6%

        \[\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*63.6%

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

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

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

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

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

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

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

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

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

Alternative 3: 81.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+140} \lor \neg \left(y \leq 1.7 \cdot 10^{+219}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.5000000000000004e129 or 2.6000000000000002e69 < y < 3.1e140 or 1.70000000000000008e219 < y

    1. Initial program 32.8%

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000004e129 < y < 2.6000000000000002e69

    1. Initial program 88.3%

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

        \[\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/89.4%

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

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

    if 3.1e140 < y < 1.70000000000000008e219

    1. Initial program 69.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+129}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+69}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+140} \lor \neg \left(y \leq 1.7 \cdot 10^{+219}\right):\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \]

Alternative 4: 81.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+131} \lor \neg \left(y \leq 7.6 \cdot 10^{+70}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.45000000000000005e131 or 7.5999999999999996e70 < y

    1. Initial program 40.6%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified46.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 53.6%

      \[\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. +-commutative53.6%

        \[\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/53.6%

        \[\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--53.6%

        \[\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*53.6%

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

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

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

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

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

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

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

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

    if -1.45000000000000005e131 < y < 7.5999999999999996e70

    1. Initial program 88.3%

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

        \[\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/89.4%

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

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

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

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

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

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

Alternative 5: 81.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+130} \lor \neg \left(y \leq 2.2 \cdot 10^{+72}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.14999999999999992e130 or 2.2e72 < y

    1. Initial program 40.6%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified46.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 53.6%

      \[\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. +-commutative53.6%

        \[\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/53.6%

        \[\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--53.6%

        \[\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*53.6%

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

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

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

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

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

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

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

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

    if -2.14999999999999992e130 < y < 2.2e72

    1. Initial program 88.3%

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

        \[\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/89.4%

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

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

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

Alternative 6: 65.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\ t_2 := \frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\ \mathbf{if}\;y \leq -7.4 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0)))
        (t_2 (+ (/ z b) (/ (* x (/ t b)) y))))
   (if (<= y -7.4e-54)
     t_2
     (if (<= y 2.3e-69)
       t_1
       (if (<= y 1.7e-28)
         (/ (* y z) (+ (* y b) (* t (+ a 1.0))))
         (if (<= y 7.6e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (a + 1.0);
	double t_2 = (z / b) + ((x * (t / b)) / y);
	double tmp;
	if (y <= -7.4e-54) {
		tmp = t_2;
	} else if (y <= 2.3e-69) {
		tmp = t_1;
	} else if (y <= 1.7e-28) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (y <= 7.6e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
    t_2 = (z / b) + ((x * (t / b)) / y)
    if (y <= (-7.4d-54)) then
        tmp = t_2
    else if (y <= 2.3d-69) then
        tmp = t_1
    else if (y <= 1.7d-28) then
        tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
    else if (y <= 7.6d+37) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (a + 1.0);
	double t_2 = (z / b) + ((x * (t / b)) / y);
	double tmp;
	if (y <= -7.4e-54) {
		tmp = t_2;
	} else if (y <= 2.3e-69) {
		tmp = t_1;
	} else if (y <= 1.7e-28) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (y <= 7.6e+37) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (a + 1.0)
	t_2 = (z / b) + ((x * (t / b)) / y)
	tmp = 0
	if y <= -7.4e-54:
		tmp = t_2
	elif y <= 2.3e-69:
		tmp = t_1
	elif y <= 1.7e-28:
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)))
	elif y <= 7.6e+37:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0))
	t_2 = Float64(Float64(z / b) + Float64(Float64(x * Float64(t / b)) / y))
	tmp = 0.0
	if (y <= -7.4e-54)
		tmp = t_2;
	elseif (y <= 2.3e-69)
		tmp = t_1;
	elseif (y <= 1.7e-28)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))));
	elseif (y <= 7.6e+37)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / (a + 1.0);
	t_2 = (z / b) + ((x * (t / b)) / y);
	tmp = 0.0;
	if (y <= -7.4e-54)
		tmp = t_2;
	elseif (y <= 2.3e-69)
		tmp = t_1;
	elseif (y <= 1.7e-28)
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	elseif (y <= 7.6e+37)
		tmp = t_1;
	else
		tmp = t_2;
	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[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * N[(t / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.4e-54], t$95$2, If[LessEqual[y, 2.3e-69], t$95$1, If[LessEqual[y, 1.7e-28], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.4000000000000006e-54 or 7.59999999999999979e37 < y

    1. Initial program 49.3%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified54.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 51.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. +-commutative51.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/51.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--51.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*51.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-eval51.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-identity51.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. Simplified60.1%

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

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

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

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

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

    if -7.4000000000000006e-54 < y < 2.3000000000000001e-69 or 1.7e-28 < y < 7.59999999999999979e37

    1. Initial program 96.5%

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

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

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

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

      \[\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 85.6%

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

    if 2.3000000000000001e-69 < y < 1.7e-28

    1. Initial program 89.5%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified89.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 0 90.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-69}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+37}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\ \end{array} \]

Alternative 7: 58.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-55} \lor \neg \left(y \leq 2.2 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.99999999999999941e-55 or 2.19999999999999997e-71 < y

    1. Initial program 55.0%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified59.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 50.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. +-commutative50.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/50.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--50.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*50.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-eval50.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-identity50.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. Simplified57.2%

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

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

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

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

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

    if -8.99999999999999941e-55 < y < 2.19999999999999997e-71

    1. Initial program 96.2%

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

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

        \[\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 70.5%

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

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

Alternative 8: 65.3% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.49999999999999938e-126 or 27500 < t

    1. Initial program 79.7%

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

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

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

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

      \[\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 64.8%

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

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

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

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

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

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

    if -8.49999999999999938e-126 < t < 27500

    1. Initial program 60.5%

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

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

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

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

      \[\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 60.3%

      \[\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. +-commutative60.3%

        \[\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/60.3%

        \[\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--60.3%

        \[\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*60.3%

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

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

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

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

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

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

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

Alternative 9: 66.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-53} \lor \neg \left(y \leq 1.65 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.74999999999999997e-53 or 1.65e37 < y

    1. Initial program 49.3%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified54.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 51.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. +-commutative51.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/51.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--51.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*51.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-eval51.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-identity51.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. Simplified60.1%

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

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

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

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

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

    if -1.74999999999999997e-53 < y < 1.65e37

    1. Initial program 96.0%

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

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

        \[\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 b around 0 82.7%

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

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

Alternative 10: 57.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-54} \lor \neg \left(y \leq 3.5 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9000000000000001e-54 or 3.4999999999999998e-73 < y

    1. Initial program 55.0%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified59.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 50.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. +-commutative50.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/50.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--50.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*50.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-eval50.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-identity50.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. Simplified57.2%

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

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

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

    if -1.9000000000000001e-54 < y < 3.4999999999999998e-73

    1. Initial program 96.2%

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

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

        \[\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 70.5%

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

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

Alternative 11: 42.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+60}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-9}:\\
\;\;\;\;x - x \cdot a\\

\mathbf{elif}\;a \leq 8.6 \cdot 10^{+14}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.9999999999999998e60 or 8.6e14 < a

    1. Initial program 81.3%

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

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

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

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

      \[\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 60.9%

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

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

    if -3.9999999999999998e60 < a < 9.5000000000000004e-66 or 1.90000000000000006e-9 < a < 8.6e14

    1. Initial program 63.9%

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

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

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

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

      \[\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 50.9%

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

    if 9.5000000000000004e-66 < a < 1.90000000000000006e-9

    1. Initial program 76.2%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified88.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 inf 64.9%

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
      2. mul-1-neg64.9%

        \[\leadsto x + \color{blue}{\left(-a \cdot x\right)} \]
      3. unsub-neg64.9%

        \[\leadsto \color{blue}{x - a \cdot x} \]
      4. *-commutative64.9%

        \[\leadsto x - \color{blue}{x \cdot a} \]
    7. Simplified64.9%

      \[\leadsto \color{blue}{x - x \cdot a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+60}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-66}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-9}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+14}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 12: 55.6% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15e-125 or 24500 < t

    1. Initial program 79.7%

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

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

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

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

      \[\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 57.9%

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

    if -1.15e-125 < t < 24500

    1. Initial program 60.5%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified47.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 63.4%

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

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

Alternative 13: 42.4% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.6e-19 or 2.55e7 < a

    1. Initial program 79.6%

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

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

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

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

      \[\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 57.8%

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

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

    if -7.6e-19 < a < 2.55e7

    1. Initial program 63.2%

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

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

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

        \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \color{blue}{\frac{y}{t} \cdot b}} \]
    3. Simplified69.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 31.3%

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

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

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

Alternative 14: 42.6% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.1999999999999998e67 or 6.8e14 < a

    1. Initial program 81.3%

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

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

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

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

      \[\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 60.9%

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

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

    if -7.1999999999999998e67 < a < 6.8e14

    1. Initial program 64.6%

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

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

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

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

      \[\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 48.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+14}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 15: 20.7% 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 71.8%

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

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

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

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

    \[\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 40.9%

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification16.9%

    \[\leadsto x \]

Developer target: 80.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 2023223 
(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))))