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

Percentage Accurate: 76.0% → 91.6%
Time: 16.3s
Alternatives: 13
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 76.0% accurate, 1.0× speedup?

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

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

Alternative 1: 91.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot b}{t}\\ t_2 := t\_1 + \left(a + 1\right)\\ t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_2}\\ t_4 := 1 + \left(a + t\_1\right)\\ t_5 := z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-309}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_2}\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{z}{b} - \frac{\mathsf{fma}\left(-1, t \cdot \frac{x}{b}, \frac{\left(z \cdot t\right) \cdot \left(a + 1\right)}{{b}^{2}}\right)}{y}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* y b) t))
        (t_2 (+ t_1 (+ a 1.0)))
        (t_3 (/ (+ x (/ (* y z) t)) t_2))
        (t_4 (+ 1.0 (+ a t_1)))
        (t_5 (* z (+ (/ x (* z t_4)) (/ y (* t t_4))))))
   (if (<= t_3 (- INFINITY))
     t_5
     (if (<= t_3 -2e-309)
       (/ (+ x (/ z (/ t y))) t_2)
       (if (<= t_3 0.0)
         (-
          (/ z b)
          (/ (fma -1.0 (* t (/ x b)) (/ (* (* z t) (+ a 1.0)) (pow b 2.0))) y))
         (if (<= t_3 5e+304) t_3 (if (<= t_3 INFINITY) t_5 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * b) / t;
	double t_2 = t_1 + (a + 1.0);
	double t_3 = (x + ((y * z) / t)) / t_2;
	double t_4 = 1.0 + (a + t_1);
	double t_5 = z * ((x / (z * t_4)) + (y / (t * t_4)));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_5;
	} else if (t_3 <= -2e-309) {
		tmp = (x + (z / (t / y))) / t_2;
	} else if (t_3 <= 0.0) {
		tmp = (z / b) - (fma(-1.0, (t * (x / b)), (((z * t) * (a + 1.0)) / pow(b, 2.0))) / y);
	} else if (t_3 <= 5e+304) {
		tmp = t_3;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_5;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * b) / t)
	t_2 = Float64(t_1 + Float64(a + 1.0))
	t_3 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_2)
	t_4 = Float64(1.0 + Float64(a + t_1))
	t_5 = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4))))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_5;
	elseif (t_3 <= -2e-309)
		tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / t_2);
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(z / b) - Float64(fma(-1.0, Float64(t * Float64(x / b)), Float64(Float64(Float64(z * t) * Float64(a + 1.0)) / (b ^ 2.0))) / y));
	elseif (t_3 <= 5e+304)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = t_5;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$5, If[LessEqual[t$95$3, -2e-309], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(z / b), $MachinePrecision] - N[(N[(-1.0 * N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * t), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+304], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$5, N[(z / b), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := t\_1 + \left(a + 1\right)\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_2}\\
t_4 := 1 + \left(a + t\_1\right)\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-309}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_2}\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{z}{b} - \frac{\mathsf{fma}\left(-1, t \cdot \frac{x}{b}, \frac{\left(z \cdot t\right) \cdot \left(a + 1\right)}{{b}^{2}}\right)}{y}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_5\\

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


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

    1. Initial program 33.5%

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999988e-309

    1. Initial program 97.7%

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

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

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

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

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

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

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

    if -1.9999999999999988e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.7%

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.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. associate-/l*0.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)} + \frac{y}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-309}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\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{\mathsf{fma}\left(-1, t \cdot \frac{x}{b}, \frac{\left(z \cdot t\right) \cdot \left(a + 1\right)}{{b}^{2}}\right)}{y}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+304}:\\ \;\;\;\;\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 \infty:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)} + \frac{y}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 91.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot b}{t}\\ t_2 := t\_1 + \left(a + 1\right)\\ t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_2}\\ t_4 := 1 + \left(a + t\_1\right)\\ t_5 := z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-309}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_2}\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\left(\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\right) - t \cdot \left(z \cdot \frac{a + 1}{y \cdot {b}^{2}}\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* y b) t))
        (t_2 (+ t_1 (+ a 1.0)))
        (t_3 (/ (+ x (/ (* y z) t)) t_2))
        (t_4 (+ 1.0 (+ a t_1)))
        (t_5 (* z (+ (/ x (* z t_4)) (/ y (* t t_4))))))
   (if (<= t_3 (- INFINITY))
     t_5
     (if (<= t_3 -2e-309)
       (/ (+ x (/ z (/ t y))) t_2)
       (if (<= t_3 0.0)
         (-
          (+ (/ z b) (* t (/ (/ x b) y)))
          (* t (* z (/ (+ a 1.0) (* y (pow b 2.0))))))
         (if (<= t_3 5e+304) t_3 (if (<= t_3 INFINITY) t_5 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * b) / t;
	double t_2 = t_1 + (a + 1.0);
	double t_3 = (x + ((y * z) / t)) / t_2;
	double t_4 = 1.0 + (a + t_1);
	double t_5 = z * ((x / (z * t_4)) + (y / (t * t_4)));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_5;
	} else if (t_3 <= -2e-309) {
		tmp = (x + (z / (t / y))) / t_2;
	} else if (t_3 <= 0.0) {
		tmp = ((z / b) + (t * ((x / b) / y))) - (t * (z * ((a + 1.0) / (y * pow(b, 2.0)))));
	} else if (t_3 <= 5e+304) {
		tmp = t_3;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_5;
	} 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 = (y * b) / t;
	double t_2 = t_1 + (a + 1.0);
	double t_3 = (x + ((y * z) / t)) / t_2;
	double t_4 = 1.0 + (a + t_1);
	double t_5 = z * ((x / (z * t_4)) + (y / (t * t_4)));
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t_5;
	} else if (t_3 <= -2e-309) {
		tmp = (x + (z / (t / y))) / t_2;
	} else if (t_3 <= 0.0) {
		tmp = ((z / b) + (t * ((x / b) / y))) - (t * (z * ((a + 1.0) / (y * Math.pow(b, 2.0)))));
	} else if (t_3 <= 5e+304) {
		tmp = t_3;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_5;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * b) / t
	t_2 = t_1 + (a + 1.0)
	t_3 = (x + ((y * z) / t)) / t_2
	t_4 = 1.0 + (a + t_1)
	t_5 = z * ((x / (z * t_4)) + (y / (t * t_4)))
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t_5
	elif t_3 <= -2e-309:
		tmp = (x + (z / (t / y))) / t_2
	elif t_3 <= 0.0:
		tmp = ((z / b) + (t * ((x / b) / y))) - (t * (z * ((a + 1.0) / (y * math.pow(b, 2.0)))))
	elif t_3 <= 5e+304:
		tmp = t_3
	elif t_3 <= math.inf:
		tmp = t_5
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * b) / t)
	t_2 = Float64(t_1 + Float64(a + 1.0))
	t_3 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_2)
	t_4 = Float64(1.0 + Float64(a + t_1))
	t_5 = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4))))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_5;
	elseif (t_3 <= -2e-309)
		tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / t_2);
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))) - Float64(t * Float64(z * Float64(Float64(a + 1.0) / Float64(y * (b ^ 2.0))))));
	elseif (t_3 <= 5e+304)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = t_5;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (y * b) / t;
	t_2 = t_1 + (a + 1.0);
	t_3 = (x + ((y * z) / t)) / t_2;
	t_4 = 1.0 + (a + t_1);
	t_5 = z * ((x / (z * t_4)) + (y / (t * t_4)));
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t_5;
	elseif (t_3 <= -2e-309)
		tmp = (x + (z / (t / y))) / t_2;
	elseif (t_3 <= 0.0)
		tmp = ((z / b) + (t * ((x / b) / y))) - (t * (z * ((a + 1.0) / (y * (b ^ 2.0)))));
	elseif (t_3 <= 5e+304)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = t_5;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$5, If[LessEqual[t$95$3, -2e-309], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z * N[(N[(a + 1.0), $MachinePrecision] / N[(y * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+304], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$5, N[(z / b), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := t\_1 + \left(a + 1\right)\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_2}\\
t_4 := 1 + \left(a + t\_1\right)\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-309}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_2}\\

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_5\\

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


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

    1. Initial program 33.5%

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999988e-309

    1. Initial program 97.7%

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

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

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

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

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

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

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

    if -1.9999999999999988e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.7%

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.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. associate-/l*0.3%

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-261}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-309}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_1}\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 33.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.99999999999999981e-261 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.7%

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

    if -4.99999999999999981e-261 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999988e-309

    1. Initial program 72.5%

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

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

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

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

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

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

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

    if -1.9999999999999988e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 47.1%

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.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. associate-/l*0.3%

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

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

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

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

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

Alternative 4: 91.8% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := t\_1 + \left(a + 1\right)\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_2}\\
t_4 := 1 + \left(a + t\_1\right)\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-309}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_2}\\

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_5\\

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


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

    1. Initial program 33.5%

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999988e-309

    1. Initial program 97.7%

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

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

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

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

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

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

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

    if -1.9999999999999988e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 47.1%

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

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

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

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.7%

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.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. associate-/l*0.3%

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

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

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

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

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

Alternative 5: 60.6% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.60000000000000007e155 or 4.2000000000000003e69 < y

    1. Initial program 39.6%

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

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

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

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

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

    if -3.60000000000000007e155 < y < -3.6e90

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if -3.6e90 < y < -1.99999999999999989e66

    1. Initial program 61.0%

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

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

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

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

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

    if -1.99999999999999989e66 < y < 4.2000000000000003e69

    1. Initial program 90.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+155}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{+66}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+69}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq -5.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.8000000000000002e156 or 7.80000000000000037e68 < y

    1. Initial program 39.6%

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

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

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

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

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

    if -4.8000000000000002e156 < y < -1.8999999999999998e88

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if -1.8999999999999998e88 < y < -5.89999999999999988e66

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{1 + \color{blue}{b \cdot \frac{y}{t}}} \]
    10. Applied egg-rr52.3%

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

    if -5.89999999999999988e66 < y < 7.80000000000000037e68

    1. Initial program 90.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+156}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+88}:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq -5.9 \cdot 10^{+66}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+68}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 77.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+148} \lor \neg \left(y \leq 5.4 \cdot 10^{+51}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.15e148 or 5.39999999999999983e51 < y

    1. Initial program 41.6%

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

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

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

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

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

    if -1.15e148 < y < 5.39999999999999983e51

    1. Initial program 90.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+148} \lor \neg \left(y \leq 5.4 \cdot 10^{+51}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 79.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.1e-184 or 6.79999999999999949e-210 < t

    1. Initial program 78.0%

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

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

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

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

    if -4.1e-184 < t < 6.79999999999999949e-210

    1. Initial program 57.3%

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

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

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

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

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

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

Alternative 9: 65.1% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.12e148 or 2.5000000000000001e70 < y

    1. Initial program 40.6%

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

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

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

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

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

    if -1.12e148 < y < 205

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if 205 < y < 2.5000000000000001e70

    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. associate-/l*82.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+148}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 205:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+70}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.5% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.60000000000000007e155 or 1.0999999999999999e-19 < y

    1. Initial program 46.8%

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

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

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

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

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

    if -3.60000000000000007e155 < y < -8.19999999999999972e95

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if -8.19999999999999972e95 < y < -7.49999999999999957e-19

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{1 + \color{blue}{b \cdot \frac{y}{t}}} \]
    10. Applied egg-rr49.6%

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

    if -7.49999999999999957e-19 < y < 1.0999999999999999e-19

    1. Initial program 93.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+155}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+148} \lor \neg \left(y \leq 2.1 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.15e148 or 2.0999999999999999e-19 < y

    1. Initial program 47.4%

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

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

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

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

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

    if -1.15e148 < y < 2.0999999999999999e-19

    1. Initial program 91.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+148} \lor \neg \left(y \leq 2.1 \cdot 10^{-19}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 42.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-23} \lor \neg \left(y \leq 9.6 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.00000000000000006e-23 or 9.6e-67 < y

    1. Initial program 60.2%

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

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

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

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

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

    if -6.00000000000000006e-23 < y < 9.6e-67

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{-23} \lor \neg \left(y \leq 9.6 \cdot 10^{-67}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 25.7% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{x}{a} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
	return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x / a;
}
def code(x, y, z, t, a, b):
	return x / a
function code(x, y, z, t, a, b)
	return Float64(x / a)
end
function tmp = code(x, y, z, t, a, b)
	tmp = x / a;
end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{x}{\color{blue}{a}} \]
  9. Add Preprocessing

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

  :alt
  (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))))