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

Percentage Accurate: 74.5% → 91.7%
Time: 21.3s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 74.5% accurate, 1.0× speedup?

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

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

Alternative 1: 91.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z}{b} \cdot \frac{t}{b}\right)}{y}\\ t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_3 := a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{y}{t \cdot \frac{t_3}{z}}\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-308}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+283}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_3}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (/ z b) (/ (fma -1.0 (/ t (/ b x)) (* (/ z b) (/ t b))) y)))
        (t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
        (t_3 (+ a (fma y (/ b t) 1.0))))
   (if (<= t_2 (- INFINITY))
     (/ y (* t (/ t_3 z)))
     (if (<= t_2 -1e-308)
       t_2
       (if (<= t_2 0.0)
         t_1
         (if (<= t_2 1e+283)
           t_2
           (if (<= t_2 INFINITY) (* (/ y t) (/ z t_3)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z / b) - (fma(-1.0, (t / (b / x)), ((z / b) * (t / b))) / y);
	double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_3 = a + fma(y, (b / t), 1.0);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = y / (t * (t_3 / z));
	} else if (t_2 <= -1e-308) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t_1;
	} else if (t_2 <= 1e+283) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = (y / t) * (z / t_3);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z / b) - Float64(fma(-1.0, Float64(t / Float64(b / x)), Float64(Float64(z / b) * Float64(t / b))) / y))
	t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	t_3 = Float64(a + fma(y, Float64(b / t), 1.0))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(y / Float64(t * Float64(t_3 / z)));
	elseif (t_2 <= -1e-308)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t_1;
	elseif (t_2 <= 1e+283)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(y / t) * Float64(z / t_3));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] - N[(N[(-1.0 * N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / b), $MachinePrecision] * N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y / N[(t * N[(t$95$3 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-308], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 1e+283], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 10^{+283}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t_3}\\

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


\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 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
    7. Step-by-step derivation
      1. *-commutative56.9%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot y}{\frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{z} \cdot t}} \]
      4. *-un-lft-identity82.6%

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282

    1. Initial program 99.2%

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

    if -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 30.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{b} + -1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot z}{{b}^{2}}}{y}} \]
      2. mul-1-neg79.1%

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

        \[\leadsto \color{blue}{\frac{z}{b} - \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot z}{{b}^{2}}}{y}} \]
      4. fma-neg79.1%

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

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

        \[\leadsto \frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, -\color{blue}{\left(-\frac{t \cdot z}{{b}^{2}}\right)}\right)}{y} \]
      7. remove-double-neg82.6%

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

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

        \[\leadsto \frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z \cdot t}{\color{blue}{b \cdot b}}\right)}{y} \]
      10. times-frac86.2%

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

      \[\leadsto \color{blue}{\frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z}{b} \cdot \frac{t}{b}\right)}{y}} \]

    if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{t} \cdot \frac{z}{\color{blue}{a + \left(y \cdot \frac{b}{t} + 1\right)}} \]
      8. fma-udef94.0%

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

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification95.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{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{z}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{-308}:\\ \;\;\;\;\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{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z}{b} \cdot \frac{t}{b}\right)}{y}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 10^{+283}:\\ \;\;\;\;\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 \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z}{b} \cdot \frac{t}{b}\right)}{y}\\ \end{array} \]

Alternative 2: 89.4% accurate, 0.1× 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{z}{b}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{z}{b} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\ \mathbf{elif}\;t_1 \leq 10^{+283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (/ z b)
     (if (<= t_1 -1e-308)
       t_1
       (if (<= t_1 0.0)
         (+
          (/ z b)
          (+ (* (/ t b) (/ x y)) (* (/ t (* b b)) (/ (* z (- -1.0 a)) y))))
         (if (<= t_1 1e+283)
           t_1
           (if (<= t_1 INFINITY)
             (* (/ y t) (/ z (+ a (fma y (/ b t) 1.0))))
             (/ z b))))))))
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 = z / b;
	} else if (t_1 <= -1e-308) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y)));
	} else if (t_1 <= 1e+283) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (y / t) * (z / (a + fma(y, (b / t), 1.0)));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z / b);
	elseif (t_1 <= -1e-308)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x / y)) + Float64(Float64(t / Float64(b * b)) * Float64(Float64(z * Float64(-1.0 - a)) / y))));
	elseif (t_1 <= 1e+283)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(a + fma(y, Float64(b / t), 1.0))));
	else
		tmp = Float64(z / b);
	end
	return 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[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+283], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $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{z}{b}\\

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

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

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

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

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


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

    1. Initial program 8.2%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282

    1. Initial program 99.2%

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

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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{t} \cdot \frac{z}{\color{blue}{a + \left(y \cdot \frac{b}{t} + 1\right)}} \]
      8. fma-udef94.0%

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

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

    \[\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{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{-308}:\\ \;\;\;\;\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} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 10^{+283}:\\ \;\;\;\;\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 \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 3: 91.0% accurate, 0.1× 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}}\\ t_2 := a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{y}{t \cdot \frac{t_2}{z}}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{z}{b} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\ \mathbf{elif}\;t_1 \leq 10^{+283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
        (t_2 (+ a (fma y (/ b t) 1.0))))
   (if (<= t_1 (- INFINITY))
     (/ y (* t (/ t_2 z)))
     (if (<= t_1 -1e-308)
       t_1
       (if (<= t_1 0.0)
         (+
          (/ z b)
          (+ (* (/ t b) (/ x y)) (* (/ t (* b b)) (/ (* z (- -1.0 a)) y))))
         (if (<= t_1 1e+283)
           t_1
           (if (<= t_1 INFINITY) (* (/ y t) (/ z t_2)) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_2 = a + fma(y, (b / t), 1.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y / (t * (t_2 / z));
	} else if (t_1 <= -1e-308) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y)));
	} else if (t_1 <= 1e+283) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (y / t) * (z / t_2);
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	t_2 = Float64(a + fma(y, Float64(b / t), 1.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y / Float64(t * Float64(t_2 / z)));
	elseif (t_1 <= -1e-308)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x / y)) + Float64(Float64(t / Float64(b * b)) * Float64(Float64(z * Float64(-1.0 - a)) / y))));
	elseif (t_1 <= 1e+283)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(y / t) * Float64(z / t_2));
	else
		tmp = Float64(z / b);
	end
	return 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]}, Block[{t$95$2 = N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y / N[(t * N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+283], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], N[(z / b), $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}}\\
t_2 := a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t \cdot \frac{t_2}{z}}\\

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

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

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t_2}\\

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


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

    1. Initial program 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
    7. Step-by-step derivation
      1. *-commutative56.9%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot y}{\frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{z} \cdot t}} \]
      4. *-un-lft-identity82.6%

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282

    1. Initial program 99.2%

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

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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{t} \cdot \frac{z}{\color{blue}{a + \left(y \cdot \frac{b}{t} + 1\right)}} \]
      8. fma-udef94.0%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

    \[\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{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{z}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{-308}:\\ \;\;\;\;\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} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 10^{+283}:\\ \;\;\;\;\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 \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z}{b}\\

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

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


\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 or -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 29.4%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309

    1. Initial program 99.8%

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

    if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \color{blue}{\left(y \cdot b\right) \cdot \frac{1}{t}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.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{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{-308}:\\ \;\;\;\;\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}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{1}{t} \cdot \left(y \cdot b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

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

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

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

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

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


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

    1. Initial program 8.2%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309

    1. Initial program 99.8%

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

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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 10^{+283}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 32.9%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282

    1. Initial program 99.2%

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

    \[\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{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{-308} \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 10^{+283}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 7: 56.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{if}\;a + 1 \leq -500000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a + 1 \leq 1.05:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\

\mathbf{elif}\;a + 1 \leq 10^{+72}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a + 1 \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 a 1) < -5e8 or 1.05000000000000004 < (+.f64 a 1) < 9.99999999999999944e71

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

    if -5e8 < (+.f64 a 1) < 1.05000000000000004

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{1 + b \cdot \color{blue}{\frac{y \cdot 1}{t}}} \]
      8. *-rgt-identity57.1%

        \[\leadsto \frac{x}{1 + b \cdot \frac{\color{blue}{y}}{t}} \]
    9. Simplified57.1%

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

    if 9.99999999999999944e71 < (+.f64 a 1) < 5.0000000000000001e94

    1. Initial program 43.3%

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

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

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

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

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

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

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

    if 5.0000000000000001e94 < (+.f64 a 1)

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a + 1 \leq -500000000:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\ \mathbf{elif}\;a + 1 \leq 1.05:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;a + 1 \leq 10^{+72}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\ \mathbf{elif}\;a + 1 \leq 5 \cdot 10^{+94}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a}\\ \end{array} \]

Alternative 8: 80.1% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 84.5%

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

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

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

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

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

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

    if -4.9999999999999998e-179 < t < 6.8e-126

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

Alternative 9: 80.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000006e-181 < t < 8.5e-127

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

    if 8.5e-127 < t

    1. Initial program 82.5%

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

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

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

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

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

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

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

Alternative 10: 79.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999995e-235 < t < 2.9e-130

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

    if 2.9e-130 < t

    1. Initial program 82.5%

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

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

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

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

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

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

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

Alternative 11: 60.7% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+105}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.45e21 or 6.99999999999999982e105 < y

    1. Initial program 45.1%

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

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

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

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

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

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

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

    if -1.45e21 < y < 8.9999999999999996e-187 or 6.39999999999999964e-156 < y < 6.99999999999999982e105

    1. Initial program 92.0%

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

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

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

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

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

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

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

    if 8.9999999999999996e-187 < y < 6.39999999999999964e-156

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+21}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-187}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-156}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+105}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 12: 55.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -500000000 \lor \neg \left(a + 1 \leq 1.05\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a 1) < -5e8 or 1.05000000000000004 < (+.f64 a 1)

    1. Initial program 80.0%

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

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

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

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

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

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

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

    if -5e8 < (+.f64 a 1) < 1.05000000000000004

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{1 + b \cdot \color{blue}{\frac{y \cdot 1}{t}}} \]
      8. *-rgt-identity57.1%

        \[\leadsto \frac{x}{1 + b \cdot \frac{\color{blue}{y}}{t}} \]
    9. Simplified57.1%

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

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

Alternative 13: 55.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -500000000 \lor \neg \left(a + 1 \leq 1.05\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a 1) < -5e8 or 1.05000000000000004 < (+.f64 a 1)

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

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

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

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

    if -5e8 < (+.f64 a 1) < 1.05000000000000004

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{1 + b \cdot \color{blue}{\frac{y \cdot 1}{t}}} \]
      8. *-rgt-identity57.1%

        \[\leadsto \frac{x}{1 + b \cdot \frac{\color{blue}{y}}{t}} \]
    9. Simplified57.1%

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

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

Alternative 14: 55.4% accurate, 1.1× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.1e20 or 9.00000000000000087e71 < y

    1. Initial program 48.7%

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

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

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

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

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

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

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

    if -1.1e20 < y < 8.9999999999999996e-187 or 3.99999999999999974e-148 < y < 9.00000000000000087e71

    1. Initial program 93.7%

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

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

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

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

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

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

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

    if 8.9999999999999996e-187 < y < 3.99999999999999974e-148

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+20}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-187}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-148}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 15: 61.6% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5e-33 or 1.14999999999999995e-112 < z

    1. Initial program 70.6%

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

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

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

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

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

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

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

    if -5.5e-33 < z < 1.14999999999999995e-112

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

Alternative 16: 61.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-32} \lor \neg \left(z \leq 8.8 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2000000000000001e-32 or 8.80000000000000018e-99 < z

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1.2000000000000001e-32 < z < 8.80000000000000018e-99

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

Alternative 17: 62.7% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000001e-34 < z < 1.14999999999999993e-102

    1. Initial program 88.1%

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

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

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

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

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

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

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

    if 1.14999999999999993e-102 < z

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 56.4% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9e20 or 8.4999999999999996e71 < y

    1. Initial program 48.7%

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

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

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

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

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

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

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

    if -9e20 < y < 8.4999999999999996e71

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

Alternative 19: 40.8% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\

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

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


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

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

    if -1 < a < 0.0570000000000000021

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 0.057:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 20: 42.7% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -32500000000000:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 90.0%

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

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

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

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

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

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

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

    if -3.25e13 < t < 1.7e65

    1. Initial program 70.1%

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

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

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

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

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

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

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

    if 1.7e65 < t

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

Alternative 21: 19.5% 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 77.7%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification21.4%

    \[\leadsto x \]

Developer target: 79.9% 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 2023275 
(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))))