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

Percentage Accurate: 75.3% → 87.7%
Time: 13.8s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 75.3% accurate, 1.0× speedup?

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

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

Alternative 1: 87.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\left(\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\right) + \frac{t}{y} \cdot \frac{z \cdot \left(-1 - a\right)}{b \cdot b}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(t, \mathsf{fma}\left(y, \frac{b}{t}, a\right), t\right)} + \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\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)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 -1e-292)
     t_1
     (if (<= t_1 0.0)
       (+
        (+ (/ z b) (* (/ t y) (/ x b)))
        (* (/ t y) (/ (* z (- -1.0 a)) (* b b))))
       (if (<= t_1 INFINITY)
         (+
          (* y (/ z (fma t (fma y (/ b t) a) t)))
          (/ x (+ 1.0 (+ a (* b (/ y t))))))
         (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -1e-292) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((z / b) + ((t / y) * (x / b))) + ((t / y) * ((z * (-1.0 - a)) / (b * b)));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (y * (z / fma(t, fma(y, (b / t), a), t))) + (x / (1.0 + (a + (b * (y / t)))));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= -1e-292)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))) + Float64(Float64(t / y) * Float64(Float64(z * Float64(-1.0 - a)) / Float64(b * b))));
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(y * Float64(z / fma(t, fma(y, Float64(b / t), a), t))) + Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))));
	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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-292], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(y * N[(z / N[(t * N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(t, \mathsf{fma}\left(y, \frac{b}{t}, a\right), t\right)} + \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\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))) < -1.0000000000000001e-292

    1. Initial program 94.4%

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

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

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.2% accurate, 0.2× speedup?

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

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

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

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

\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))) < -1.0000000000000001e-292

    1. Initial program 94.4%

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

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

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.5% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-292} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 10^{+287}:\\
\;\;\;\;t_1\\

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


\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))) < -1.0000000000000001e-292 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e287

    1. Initial program 96.9%

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

    if -1.0000000000000001e-292 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or 1.0000000000000001e287 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.0% accurate, 0.2× speedup?

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

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

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

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

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


\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))) < -1.0000000000000001e-292 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e287

    1. Initial program 96.9%

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

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

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.0% accurate, 0.2× speedup?

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

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

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

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

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


\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))) < -1.0000000000000001e-292 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e287

    1. Initial program 96.9%

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

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

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 73.7% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.7999999999999999e-126 or 1.65999999999999989e-125 < b < 1.8e106 or 3.49999999999999997e142 < b

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999999e-126 < b < 1.65999999999999989e-125 or 1.8e106 < b < 3.49999999999999997e142

    1. Initial program 83.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.8 \cdot 10^{-126} \lor \neg \left(b \leq 1.66 \cdot 10^{-125} \lor \neg \left(b \leq 1.8 \cdot 10^{+106}\right) \land b \leq 3.5 \cdot 10^{+142}\right):\\ \;\;\;\;\frac{z}{b} + \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \end{array} \]

Alternative 7: 65.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-122}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-95}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{z}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.9000000000000001e-152 or 3.8999999999999999e-122 < t < 4.29999999999999997e-95 or 7.99999999999999962e68 < t

    1. Initial program 79.3%

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

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

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

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

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

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

    if -2.9000000000000001e-152 < t < 3.8999999999999999e-122 or 4.29999999999999997e-95 < t < 2.59999999999999996e-53

    1. Initial program 53.0%

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

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

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

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

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

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

    if 2.59999999999999996e-53 < t < 7.99999999999999962e68

    1. Initial program 93.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{-152}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-122}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-95}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-53}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+68}:\\ \;\;\;\;\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 8: 65.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 1.08 \cdot 10^{-121}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-97} \lor \neg \left(t \leq 8.5 \cdot 10^{-51}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.00000000000000053e-152 or 1.08000000000000004e-121 < t < 4.3e-97 or 8.50000000000000036e-51 < t

    1. Initial program 81.5%

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

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

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

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

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

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

    if -8.00000000000000053e-152 < t < 1.08000000000000004e-121

    1. Initial program 53.0%

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

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

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

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

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

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

    if 4.3e-97 < t < 8.50000000000000036e-51

    1. Initial program 56.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-152}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-121}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-97} \lor \neg \left(t \leq 8.5 \cdot 10^{-51}\right):\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot b}\\ \end{array} \]

Alternative 9: 83.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.1999999999999999e-57 or 6.49999999999999938e-123 < t

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-57 < t < 6.49999999999999938e-123

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 83.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 81.0%

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

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

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

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

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

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

    if -3.2000000000000001e-57 < t < 5.5999999999999998e-123

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5999999999999998e-123 < t

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 83.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 81.0%

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

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

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

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

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

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

    if -4.49999999999999973e-57 < t < 3.40000000000000001e-121

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000001e-121 < t

    1. Initial program 83.9%

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

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

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

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

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

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

Alternative 12: 61.3% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.64999999999999999e-152 or 1.12e-122 < t

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999999e-152 < t < 1.12e-122

    1. Initial program 53.0%

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

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

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

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

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

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

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

Alternative 13: 42.0% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-289}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{-245}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-117}:\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -38 or 1.70000000000000017e-117 < y

    1. Initial program 55.3%

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

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

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

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

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

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

    if -38 < y < 4.1999999999999995e-289 or 5.20000000000000013e-245 < y < 1.70000000000000017e-117

    1. Initial program 93.2%

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

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

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

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

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

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

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

    if 4.1999999999999995e-289 < y < 5.20000000000000013e-245

    1. Initial program 99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -38:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-289}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-245}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-117}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 14: 42.0% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq 8.4 \cdot 10^{-280}:\\
\;\;\;\;\frac{x}{a}\\

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

\mathbf{elif}\;y \leq 2.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3e3 or 2.3999999999999999e-120 < y

    1. Initial program 55.3%

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

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

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

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

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

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

    if -3e3 < y < 8.40000000000000003e-280 or 1.9e-249 < y < 2.3999999999999999e-120

    1. Initial program 93.2%

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

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

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

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

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

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

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

    if 8.40000000000000003e-280 < y < 1.9e-249

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - a \cdot x} \]
    7. Simplified74.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 8.4 \cdot 10^{-280}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-249}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-120}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 15: 53.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+136}:\\
\;\;\;\;\frac{z}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.8000000000000002e136 or 5.6000000000000001e-48 < y

    1. Initial program 48.1%

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

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

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

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

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

    if -2.8000000000000002e136 < y < 5.6000000000000001e-48

    1. Initial program 91.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+136}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 16: 41.1% accurate, 2.4× speedup?

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

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

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

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


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

    1. Initial program 75.2%

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

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

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

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

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

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

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

    if -1 < a < 1

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

Alternative 17: 19.6% accurate, 17.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]

Developer target: 79.5% 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 2023200 
(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))))